diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..6438d80c --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +src-tauri/vendored/**/* linguist-generated=true +src-tauri/gen/schemas/**/* linguist-generated=true diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index a8d81975..508eeaba 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -22,12 +22,6 @@ npm -v rustc --version ``` -Clone the [plugins repository](https://github.com/yaakapp/plugins) to your machine: - -```shell -git clone https://github.com/yaakapp/plugins.git /path/to/your/plugins-directory -``` - Install the NPM dependencies: ```shell @@ -40,6 +34,8 @@ Run the `bootstrap` command to do some initial setup: npm run bootstrap ``` +_NOTE: Run with `YAAK_PLUGINS_DIR=` to re-build bundled plugins_ + ## Run the App After bootstrapping, start the app in development mode: @@ -48,6 +44,8 @@ After bootstrapping, start the app in development mode: npm start ``` +_NOTE: If working on bundled plugins, run with `YAAK_PLUGINS_DIR=`_ + ## SQLite Migrations New migrations can be created from the `src-tauri/` directory: diff --git a/plugin-runtime-types/src/bindings/events.ts b/plugin-runtime-types/src/bindings/events.ts index 7e5a5fbc..747c9c3f 100644 --- a/plugin-runtime-types/src/bindings/events.ts +++ b/plugin-runtime-types/src/bindings/events.ts @@ -6,7 +6,7 @@ import type { HttpRequest } from "./models"; import type { HttpResponse } from "./models"; import type { Workspace } from "./models"; -export type BootRequest = { dir: string, }; +export type BootRequest = { dir: string, watch: boolean, }; export type BootResponse = { name: string, version: string, capabilities: Array, }; diff --git a/plugin-runtime/src/PluginHandle.ts b/plugin-runtime/src/PluginHandle.ts index 49c91e86..8dcfecf8 100644 --- a/plugin-runtime/src/PluginHandle.ts +++ b/plugin-runtime/src/PluginHandle.ts @@ -1,14 +1,15 @@ -import { InternalEvent } from '@yaakapp/api'; +import { BootRequest, InternalEvent } from '@yaakapp-internal/plugin'; import path from 'node:path'; import { Worker } from 'node:worker_threads'; import { EventChannel } from './EventChannel'; +import { PluginWorkerData } from './index.worker'; export class PluginHandle { #worker: Worker; constructor( - readonly pluginDir: string, readonly pluginRefId: string, + readonly bootRequest: BootRequest, readonly events: EventChannel, ) { this.#worker = this.#createWorker(); @@ -24,28 +25,32 @@ export class PluginHandle { #createWorker(): Worker { const workerPath = process.env.YAAK_WORKER_PATH ?? path.join(__dirname, 'index.worker.cjs'); + const workerData: PluginWorkerData = { + pluginRefId: this.pluginRefId, + bootRequest: this.bootRequest, + }; const worker = new Worker(workerPath, { - workerData: { pluginDir: this.pluginDir, pluginRefId: this.pluginRefId }, + workerData, }); worker.on('message', (e) => this.events.emit(e)); worker.on('error', this.#handleError.bind(this)); worker.on('exit', this.#handleExit.bind(this)); - console.log('Created plugin worker for ', this.pluginDir); + console.log('Created plugin worker for ', this.bootRequest.dir); return worker; } async #handleError(err: Error) { - console.error('Plugin errored', this.pluginDir, err); + console.error('Plugin errored', this.bootRequest.dir, err); } async #handleExit(code: number) { if (code === 0) { - console.log('Plugin exited successfully', this.pluginDir); + console.log('Plugin exited successfully', this.bootRequest.dir); } else { - console.log('Plugin exited with status', code, this.pluginDir); + console.log('Plugin exited with status', code, this.bootRequest.dir); } } } diff --git a/plugin-runtime/src/index.ts b/plugin-runtime/src/index.ts index dc60a2b0..6ba2ffda 100644 --- a/plugin-runtime/src/index.ts +++ b/plugin-runtime/src/index.ts @@ -18,7 +18,7 @@ const plugins: Record = {}; const pluginEvent: InternalEvent = JSON.parse(e.event); // Handle special event to bootstrap plugin if (pluginEvent.payload.type === 'boot_request') { - const plugin = new PluginHandle(pluginEvent.payload.dir, pluginEvent.pluginRefId, events); + const plugin = new PluginHandle(pluginEvent.pluginRefId, pluginEvent.payload, events); plugins[pluginEvent.pluginRefId] = plugin; } diff --git a/plugin-runtime/src/index.worker.ts b/plugin-runtime/src/index.worker.ts index c5496369..e917863b 100644 --- a/plugin-runtime/src/index.worker.ts +++ b/plugin-runtime/src/index.worker.ts @@ -1,4 +1,5 @@ import { + BootRequest, Context, FindHttpResponsesResponse, GetHttpRequestByIdResponse, @@ -14,13 +15,21 @@ import { HttpRequestActionPlugin } from '@yaakapp/api/lib/plugins/HttpRequestAct import { TemplateFunctionPlugin } from '@yaakapp/api/lib/plugins/TemplateFunctionPlugin'; import interceptStdout from 'intercept-stdout'; import * as console from 'node:console'; -import { Stats, readFileSync, statSync, watch } from 'node:fs'; +import { readFileSync, Stats, statSync, watch } from 'node:fs'; import path from 'node:path'; import * as util from 'node:util'; import { parentPort, workerData } from 'node:worker_threads'; +export interface PluginWorkerData { + bootRequest: BootRequest; + pluginRefId: string; +} + async function initialize() { - const { pluginDir, pluginRefId } = workerData; + const { + bootRequest: { dir: pluginDir, watch: enableWatch }, + pluginRefId, + }: PluginWorkerData = workerData; const pathPkg = path.join(pluginDir, 'package.json'); const pathMod = path.posix.join(pluginDir, 'build', 'index.js'); @@ -102,8 +111,10 @@ async function initialize() { return sendPayload({ type: 'reload_response' }, null); }; - watchFile(pathMod, cb); - watchFile(pathPkg, cb); + if (enableWatch) { + watchFile(pathMod, cb); + watchFile(pathPkg, cb); + } const ctx: Context = { clipboard: { diff --git a/scripts/vendor-plugins.cjs b/scripts/vendor-plugins.cjs index fb91b3af..bd32d39b 100644 --- a/scripts/vendor-plugins.cjs +++ b/scripts/vendor-plugins.cjs @@ -3,8 +3,8 @@ const path = require('node:path'); const { execSync } = require('node:child_process'); const pluginsDir = process.env.YAAK_PLUGINS_DIR; if (!pluginsDir) { - console.log('YAAK_PLUGINS_DIR is not set'); - process.exit(1); + console.log('Skipping bundled plugins build because YAAK_PLUGINS_DIR is not set'); + return; } console.log('Installing Yaak plugins dependencies', pluginsDir); diff --git a/src-tauri/.gitignore b/src-tauri/.gitignore index de71bdbf..4388a4cf 100644 --- a/src-tauri/.gitignore +++ b/src-tauri/.gitignore @@ -2,4 +2,5 @@ # will have compiled files and executables target/ -vendored +vendored/* +!vendored/plugins diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs index fadb3c3f..14a24d6c 100644 --- a/src-tauri/src/lib.rs +++ b/src-tauri/src/lib.rs @@ -1183,7 +1183,7 @@ async fn cmd_install_plugin( w: WebviewWindow, ) -> Result { plugin_manager - .add_plugin_by_dir(&directory) + .add_plugin_by_dir(&directory, true) .await .map_err(|e| e.to_string())?; @@ -1511,13 +1511,12 @@ async fn cmd_plugin_info( plugin_manager: State<'_, PluginManager>, ) -> Result { let plugin = get_plugin(&w, id).await.map_err(|e| e.to_string())?; - plugin_manager + Ok(plugin_manager .get_plugin_by_dir(plugin.directory.as_str()) .await - .ok_or("Failed to find plugin info".to_string())? + .ok_or("Failed to find plugin for info".to_string())? .info() - .await - .ok_or("Failed to find plugin".to_string()) + .await) } #[tauri::command] diff --git a/src-tauri/vendored/plugins/exporter-curl/build/index.js b/src-tauri/vendored/plugins/exporter-curl/build/index.js new file mode 100644 index 00000000..ca859501 --- /dev/null +++ b/src-tauri/vendored/plugins/exporter-curl/build/index.js @@ -0,0 +1,98 @@ +"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); + +// src/index.ts +var src_exports = {}; +__export(src_exports, { + plugin: () => plugin, + pluginHookExport: () => pluginHookExport +}); +module.exports = __toCommonJS(src_exports); +var NEWLINE = "\\\n "; +var plugin = { + httpRequestActions: [{ + key: "export-curl", + label: "Copy as Curl", + icon: "copy", + async onSelect(ctx, args) { + const rendered_request = await ctx.httpRequest.render({ httpRequest: args.httpRequest, purpose: "preview" }); + const data = await pluginHookExport(ctx, rendered_request); + ctx.clipboard.copyText(data); + ctx.toast.show({ message: "Curl copied to clipboard", icon: "copy" }); + } + }] +}; +async function pluginHookExport(_ctx, request) { + const xs = ["curl"]; + if (request.method) xs.push("-X", request.method); + if (request.url) xs.push(quote(request.url)); + xs.push(NEWLINE); + for (const p of (request.urlParameters ?? []).filter(onlyEnabled)) { + xs.push("--url-query", quote(`${p.name}=${p.value}`)); + xs.push(NEWLINE); + } + for (const h of (request.headers ?? []).filter(onlyEnabled)) { + xs.push("--header", quote(`${h.name}: ${h.value}`)); + xs.push(NEWLINE); + } + if (Array.isArray(request.body?.form)) { + const flag = request.bodyType === "multipart/form-data" ? "--form" : "--data"; + for (const p of (request.body?.form ?? []).filter(onlyEnabled)) { + if (p.file) { + let v = `${p.name}=@${p.file}`; + v += p.contentType ? `;type=${p.contentType}` : ""; + xs.push(flag, v); + } else { + xs.push(flag, quote(`${p.name}=${p.value}`)); + } + xs.push(NEWLINE); + } + } else if (typeof request.body?.text === "string") { + xs.push("--data-raw", `$${quote(request.body.text)}`); + xs.push(NEWLINE); + } + if (request.authenticationType === "basic" || request.authenticationType === "digest") { + if (request.authenticationType === "digest") xs.push("--digest"); + xs.push( + "--user", + quote(`${request.authentication?.username ?? ""}:${request.authentication?.password ?? ""}`) + ); + xs.push(NEWLINE); + } + if (request.authenticationType === "bearer") { + xs.push("--header", quote(`Authorization: Bearer ${request.authentication?.token ?? ""}`)); + xs.push(NEWLINE); + } + if (xs[xs.length - 1] === NEWLINE) { + xs.splice(xs.length - 1, 1); + } + return xs.join(" "); +} +function quote(arg) { + const escaped = arg.replace(/'/g, "\\'"); + return `'${escaped}'`; +} +function onlyEnabled(v) { + return v.enabled !== false && !!v.name; +} +// Annotate the CommonJS export names for ESM import in node: +0 && (module.exports = { + plugin, + pluginHookExport +}); diff --git a/src-tauri/vendored/plugins/exporter-curl/package.json b/src-tauri/vendored/plugins/exporter-curl/package.json new file mode 100644 index 00000000..809db666 --- /dev/null +++ b/src-tauri/vendored/plugins/exporter-curl/package.json @@ -0,0 +1,17 @@ +{ + "name": "exporter-curl", + "private": true, + "version": "0.0.1", + "scripts": { + "build": "yaakcli build ./src/index.js" + }, + "dependencies": { + "@yaakapp/api": "^0.2.9" + }, + "devDependencies": { + "@types/node": "^20.14.9", + "typescript": "^5.5.2", + "vitest": "^1.4.0", + "@yaakapp/cli": "^0.0.42" + } +} diff --git a/src-tauri/vendored/plugins/filter-jsonpath/build/index.js b/src-tauri/vendored/plugins/filter-jsonpath/build/index.js new file mode 100644 index 00000000..1ccc3d2b --- /dev/null +++ b/src-tauri/vendored/plugins/filter-jsonpath/build/index.js @@ -0,0 +1,510 @@ +"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); + +// src/index.ts +var src_exports = {}; +__export(src_exports, { + pluginHookResponseFilter: () => pluginHookResponseFilter +}); +module.exports = __toCommonJS(src_exports); + +// ../../node_modules/jsonpath-plus/dist/index-node-esm.js +var import_vm = __toESM(require("vm"), 1); +var { + hasOwnProperty: hasOwnProp +} = Object.prototype; +function push(arr, item) { + arr = arr.slice(); + arr.push(item); + return arr; +} +function unshift(item, arr) { + arr = arr.slice(); + arr.unshift(item); + return arr; +} +var NewError = class extends Error { + /** + * @param {AnyResult} value The evaluated scalar value + */ + constructor(value) { + super('JSONPath should not be called with "new" (it prevents return of (unwrapped) scalar values)'); + this.avoidNew = true; + this.value = value; + this.name = "NewError"; + } +}; +function JSONPath(opts, expr, obj, callback, otherTypeCallback) { + if (!(this instanceof JSONPath)) { + try { + return new JSONPath(opts, expr, obj, callback, otherTypeCallback); + } catch (e) { + if (!e.avoidNew) { + throw e; + } + return e.value; + } + } + if (typeof opts === "string") { + otherTypeCallback = callback; + callback = obj; + obj = expr; + expr = opts; + opts = null; + } + const optObj = opts && typeof opts === "object"; + opts = opts || {}; + this.json = opts.json || obj; + this.path = opts.path || expr; + this.resultType = opts.resultType || "value"; + this.flatten = opts.flatten || false; + this.wrap = hasOwnProp.call(opts, "wrap") ? opts.wrap : true; + this.sandbox = opts.sandbox || {}; + this.eval = opts.eval === void 0 ? "safe" : opts.eval; + this.ignoreEvalErrors = typeof opts.ignoreEvalErrors === "undefined" ? false : opts.ignoreEvalErrors; + this.parent = opts.parent || null; + this.parentProperty = opts.parentProperty || null; + this.callback = opts.callback || callback || null; + this.otherTypeCallback = opts.otherTypeCallback || otherTypeCallback || function() { + throw new TypeError("You must supply an otherTypeCallback callback option with the @other() operator."); + }; + if (opts.autostart !== false) { + const args = { + path: optObj ? opts.path : expr + }; + if (!optObj) { + args.json = obj; + } else if ("json" in opts) { + args.json = opts.json; + } + const ret = this.evaluate(args); + if (!ret || typeof ret !== "object") { + throw new NewError(ret); + } + return ret; + } +} +JSONPath.prototype.evaluate = function(expr, json, callback, otherTypeCallback) { + let currParent = this.parent, currParentProperty = this.parentProperty; + let { + flatten, + wrap + } = this; + this.currResultType = this.resultType; + this.currEval = this.eval; + this.currSandbox = this.sandbox; + callback = callback || this.callback; + this.currOtherTypeCallback = otherTypeCallback || this.otherTypeCallback; + json = json || this.json; + expr = expr || this.path; + if (expr && typeof expr === "object" && !Array.isArray(expr)) { + if (!expr.path && expr.path !== "") { + throw new TypeError('You must supply a "path" property when providing an object argument to JSONPath.evaluate().'); + } + if (!hasOwnProp.call(expr, "json")) { + throw new TypeError('You must supply a "json" property when providing an object argument to JSONPath.evaluate().'); + } + ({ + json + } = expr); + flatten = hasOwnProp.call(expr, "flatten") ? expr.flatten : flatten; + this.currResultType = hasOwnProp.call(expr, "resultType") ? expr.resultType : this.currResultType; + this.currSandbox = hasOwnProp.call(expr, "sandbox") ? expr.sandbox : this.currSandbox; + wrap = hasOwnProp.call(expr, "wrap") ? expr.wrap : wrap; + this.currEval = hasOwnProp.call(expr, "eval") ? expr.eval : this.currEval; + callback = hasOwnProp.call(expr, "callback") ? expr.callback : callback; + this.currOtherTypeCallback = hasOwnProp.call(expr, "otherTypeCallback") ? expr.otherTypeCallback : this.currOtherTypeCallback; + currParent = hasOwnProp.call(expr, "parent") ? expr.parent : currParent; + currParentProperty = hasOwnProp.call(expr, "parentProperty") ? expr.parentProperty : currParentProperty; + expr = expr.path; + } + currParent = currParent || null; + currParentProperty = currParentProperty || null; + if (Array.isArray(expr)) { + expr = JSONPath.toPathString(expr); + } + if (!expr && expr !== "" || !json) { + return void 0; + } + const exprList = JSONPath.toPathArray(expr); + if (exprList[0] === "$" && exprList.length > 1) { + exprList.shift(); + } + this._hasParentSelector = null; + const result = this._trace(exprList, json, ["$"], currParent, currParentProperty, callback).filter(function(ea) { + return ea && !ea.isParentSelector; + }); + if (!result.length) { + return wrap ? [] : void 0; + } + if (!wrap && result.length === 1 && !result[0].hasArrExpr) { + return this._getPreferredOutput(result[0]); + } + return result.reduce((rslt, ea) => { + const valOrPath = this._getPreferredOutput(ea); + if (flatten && Array.isArray(valOrPath)) { + rslt = rslt.concat(valOrPath); + } else { + rslt.push(valOrPath); + } + return rslt; + }, []); +}; +JSONPath.prototype._getPreferredOutput = function(ea) { + const resultType = this.currResultType; + switch (resultType) { + case "all": { + const path = Array.isArray(ea.path) ? ea.path : JSONPath.toPathArray(ea.path); + ea.pointer = JSONPath.toPointer(path); + ea.path = typeof ea.path === "string" ? ea.path : JSONPath.toPathString(ea.path); + return ea; + } + case "value": + case "parent": + case "parentProperty": + return ea[resultType]; + case "path": + return JSONPath.toPathString(ea[resultType]); + case "pointer": + return JSONPath.toPointer(ea.path); + default: + throw new TypeError("Unknown result type"); + } +}; +JSONPath.prototype._handleCallback = function(fullRetObj, callback, type) { + if (callback) { + const preferredOutput = this._getPreferredOutput(fullRetObj); + fullRetObj.path = typeof fullRetObj.path === "string" ? fullRetObj.path : JSONPath.toPathString(fullRetObj.path); + callback(preferredOutput, type, fullRetObj); + } +}; +JSONPath.prototype._trace = function(expr, val, path, parent, parentPropName, callback, hasArrExpr, literalPriority) { + let retObj; + if (!expr.length) { + retObj = { + path, + value: val, + parent, + parentProperty: parentPropName, + hasArrExpr + }; + this._handleCallback(retObj, callback, "value"); + return retObj; + } + const loc = expr[0], x = expr.slice(1); + const ret = []; + function addRet(elems) { + if (Array.isArray(elems)) { + elems.forEach((t) => { + ret.push(t); + }); + } else { + ret.push(elems); + } + } + if ((typeof loc !== "string" || literalPriority) && val && hasOwnProp.call(val, loc)) { + addRet(this._trace(x, val[loc], push(path, loc), val, loc, callback, hasArrExpr)); + } else if (loc === "*") { + this._walk(val, (m) => { + addRet(this._trace(x, val[m], push(path, m), val, m, callback, true, true)); + }); + } else if (loc === "..") { + addRet(this._trace(x, val, path, parent, parentPropName, callback, hasArrExpr)); + this._walk(val, (m) => { + if (typeof val[m] === "object") { + addRet(this._trace(expr.slice(), val[m], push(path, m), val, m, callback, true)); + } + }); + } else if (loc === "^") { + this._hasParentSelector = true; + return { + path: path.slice(0, -1), + expr: x, + isParentSelector: true + }; + } else if (loc === "~") { + retObj = { + path: push(path, loc), + value: parentPropName, + parent, + parentProperty: null + }; + this._handleCallback(retObj, callback, "property"); + return retObj; + } else if (loc === "$") { + addRet(this._trace(x, val, path, null, null, callback, hasArrExpr)); + } else if (/^(-?\d*):(-?\d*):?(\d*)$/u.test(loc)) { + addRet(this._slice(loc, x, val, path, parent, parentPropName, callback)); + } else if (loc.indexOf("?(") === 0) { + if (this.currEval === false) { + throw new Error("Eval [?(expr)] prevented in JSONPath expression."); + } + const safeLoc = loc.replace(/^\?\((.*?)\)$/u, "$1"); + const nested = /@.?([^?]*)[['](\??\(.*?\))(?!.\)\])[\]']/gu.exec(safeLoc); + if (nested) { + this._walk(val, (m) => { + const npath = [nested[2]]; + const nvalue = nested[1] ? val[m][nested[1]] : val[m]; + const filterResults = this._trace(npath, nvalue, path, parent, parentPropName, callback, true); + if (filterResults.length > 0) { + addRet(this._trace(x, val[m], push(path, m), val, m, callback, true)); + } + }); + } else { + this._walk(val, (m) => { + if (this._eval(safeLoc, val[m], m, path, parent, parentPropName)) { + addRet(this._trace(x, val[m], push(path, m), val, m, callback, true)); + } + }); + } + } else if (loc[0] === "(") { + if (this.currEval === false) { + throw new Error("Eval [(expr)] prevented in JSONPath expression."); + } + addRet(this._trace(unshift(this._eval(loc, val, path[path.length - 1], path.slice(0, -1), parent, parentPropName), x), val, path, parent, parentPropName, callback, hasArrExpr)); + } else if (loc[0] === "@") { + let addType = false; + const valueType = loc.slice(1, -2); + switch (valueType) { + case "scalar": + if (!val || !["object", "function"].includes(typeof val)) { + addType = true; + } + break; + case "boolean": + case "string": + case "undefined": + case "function": + if (typeof val === valueType) { + addType = true; + } + break; + case "integer": + if (Number.isFinite(val) && !(val % 1)) { + addType = true; + } + break; + case "number": + if (Number.isFinite(val)) { + addType = true; + } + break; + case "nonFinite": + if (typeof val === "number" && !Number.isFinite(val)) { + addType = true; + } + break; + case "object": + if (val && typeof val === valueType) { + addType = true; + } + break; + case "array": + if (Array.isArray(val)) { + addType = true; + } + break; + case "other": + addType = this.currOtherTypeCallback(val, path, parent, parentPropName); + break; + case "null": + if (val === null) { + addType = true; + } + break; + default: + throw new TypeError("Unknown value type " + valueType); + } + if (addType) { + retObj = { + path, + value: val, + parent, + parentProperty: parentPropName + }; + this._handleCallback(retObj, callback, "value"); + return retObj; + } + } else if (loc[0] === "`" && val && hasOwnProp.call(val, loc.slice(1))) { + const locProp = loc.slice(1); + addRet(this._trace(x, val[locProp], push(path, locProp), val, locProp, callback, hasArrExpr, true)); + } else if (loc.includes(",")) { + const parts = loc.split(","); + for (const part of parts) { + addRet(this._trace(unshift(part, x), val, path, parent, parentPropName, callback, true)); + } + } else if (!literalPriority && val && hasOwnProp.call(val, loc)) { + addRet(this._trace(x, val[loc], push(path, loc), val, loc, callback, hasArrExpr, true)); + } + if (this._hasParentSelector) { + for (let t = 0; t < ret.length; t++) { + const rett = ret[t]; + if (rett && rett.isParentSelector) { + const tmp = this._trace(rett.expr, val, rett.path, parent, parentPropName, callback, hasArrExpr); + if (Array.isArray(tmp)) { + ret[t] = tmp[0]; + const tl = tmp.length; + for (let tt = 1; tt < tl; tt++) { + t++; + ret.splice(t, 0, tmp[tt]); + } + } else { + ret[t] = tmp; + } + } + } + } + return ret; +}; +JSONPath.prototype._walk = function(val, f) { + if (Array.isArray(val)) { + const n = val.length; + for (let i = 0; i < n; i++) { + f(i); + } + } else if (val && typeof val === "object") { + Object.keys(val).forEach((m) => { + f(m); + }); + } +}; +JSONPath.prototype._slice = function(loc, expr, val, path, parent, parentPropName, callback) { + if (!Array.isArray(val)) { + return void 0; + } + const len = val.length, parts = loc.split(":"), step = parts[2] && Number.parseInt(parts[2]) || 1; + let start = parts[0] && Number.parseInt(parts[0]) || 0, end = parts[1] && Number.parseInt(parts[1]) || len; + start = start < 0 ? Math.max(0, start + len) : Math.min(len, start); + end = end < 0 ? Math.max(0, end + len) : Math.min(len, end); + const ret = []; + for (let i = start; i < end; i += step) { + const tmp = this._trace(unshift(i, expr), val, path, parent, parentPropName, callback, true); + tmp.forEach((t) => { + ret.push(t); + }); + } + return ret; +}; +JSONPath.prototype._eval = function(code, _v, _vname, path, parent, parentPropName) { + this.currSandbox._$_parentProperty = parentPropName; + this.currSandbox._$_parent = parent; + this.currSandbox._$_property = _vname; + this.currSandbox._$_root = this.json; + this.currSandbox._$_v = _v; + const containsPath = code.includes("@path"); + if (containsPath) { + this.currSandbox._$_path = JSONPath.toPathString(path.concat([_vname])); + } + const scriptCacheKey = this.currEval + "Script:" + code; + if (!JSONPath.cache[scriptCacheKey]) { + let script = code.replace(/@parentProperty/gu, "_$_parentProperty").replace(/@parent/gu, "_$_parent").replace(/@property/gu, "_$_property").replace(/@root/gu, "_$_root").replace(/@([.\s)[])/gu, "_$_v$1"); + if (containsPath) { + script = script.replace(/@path/gu, "_$_path"); + } + if (this.currEval === "safe" || this.currEval === true || this.currEval === void 0) { + JSONPath.cache[scriptCacheKey] = new this.safeVm.Script(script); + } else if (this.currEval === "native") { + JSONPath.cache[scriptCacheKey] = new this.vm.Script(script); + } else if (typeof this.currEval === "function" && this.currEval.prototype && hasOwnProp.call(this.currEval.prototype, "runInNewContext")) { + const CurrEval = this.currEval; + JSONPath.cache[scriptCacheKey] = new CurrEval(script); + } else if (typeof this.currEval === "function") { + JSONPath.cache[scriptCacheKey] = { + runInNewContext: (context) => this.currEval(script, context) + }; + } else { + throw new TypeError(`Unknown "eval" property "${this.currEval}"`); + } + } + try { + return JSONPath.cache[scriptCacheKey].runInNewContext(this.currSandbox); + } catch (e) { + if (this.ignoreEvalErrors) { + return false; + } + throw new Error("jsonPath: " + e.message + ": " + code); + } +}; +JSONPath.cache = {}; +JSONPath.toPathString = function(pathArr) { + const x = pathArr, n = x.length; + let p = "$"; + for (let i = 1; i < n; i++) { + if (!/^(~|\^|@.*?\(\))$/u.test(x[i])) { + p += /^[0-9*]+$/u.test(x[i]) ? "[" + x[i] + "]" : "['" + x[i] + "']"; + } + } + return p; +}; +JSONPath.toPointer = function(pointer) { + const x = pointer, n = x.length; + let p = ""; + for (let i = 1; i < n; i++) { + if (!/^(~|\^|@.*?\(\))$/u.test(x[i])) { + p += "/" + x[i].toString().replace(/~/gu, "~0").replace(/\//gu, "~1"); + } + } + return p; +}; +JSONPath.toPathArray = function(expr) { + const { + cache + } = JSONPath; + if (cache[expr]) { + return cache[expr].concat(); + } + const subx = []; + const normalized = expr.replace(/@(?:null|boolean|number|string|integer|undefined|nonFinite|scalar|array|object|function|other)\(\)/gu, ";$&;").replace(/[['](\??\(.*?\))[\]'](?!.\])/gu, function($0, $1) { + return "[#" + (subx.push($1) - 1) + "]"; + }).replace(/\[['"]([^'\]]*)['"]\]/gu, function($0, prop) { + return "['" + prop.replace(/\./gu, "%@%").replace(/~/gu, "%%@@%%") + "']"; + }).replace(/~/gu, ";~;").replace(/['"]?\.['"]?(?![^[]*\])|\[['"]?/gu, ";").replace(/%@%/gu, ".").replace(/%%@@%%/gu, "~").replace(/(?:;)?(\^+)(?:;)?/gu, function($0, ups) { + return ";" + ups.split("").join(";") + ";"; + }).replace(/;;;|;;/gu, ";..;").replace(/;$|'?\]|'$/gu, ""); + const exprList = normalized.split(";").map(function(exp) { + const match = exp.match(/#(\d+)/u); + return !match || !match[1] ? exp : subx[match[1]]; + }); + cache[expr] = exprList; + return cache[expr].concat(); +}; +JSONPath.prototype.vm = import_vm.default; +JSONPath.prototype.safeVm = import_vm.default; +var SafeScript = import_vm.default.Script; + +// src/index.ts +function pluginHookResponseFilter(_ctx, args) { + const parsed = JSON.parse(args.body); + const filtered = JSONPath({ path: args.filter, json: parsed }); + return JSON.stringify(filtered, null, 2); +} +// Annotate the CommonJS export names for ESM import in node: +0 && (module.exports = { + pluginHookResponseFilter +}); diff --git a/src-tauri/vendored/plugins/filter-jsonpath/package.json b/src-tauri/vendored/plugins/filter-jsonpath/package.json new file mode 100644 index 00000000..ad8cf0f6 --- /dev/null +++ b/src-tauri/vendored/plugins/filter-jsonpath/package.json @@ -0,0 +1,17 @@ +{ + "name": "filter-jsonpath", + "private": true, + "version": "0.0.1", + "scripts": { + "build": "yaakcli build ./src/index.ts" + }, + "dependencies": { + "jsonpath-plus": "^9.0.0", + "@yaakapp/api": "^0.2.9" + }, + "devDependencies": { + "@yaakapp/cli": "^0.0.42", + "@types/node": "^20.14.9", + "typescript": "^5.5.2" + } +} diff --git a/src-tauri/vendored/plugins/filter-xpath/build/index.js b/src-tauri/vendored/plugins/filter-xpath/build/index.js new file mode 100644 index 00000000..783259c2 --- /dev/null +++ b/src-tauri/vendored/plugins/filter-xpath/build/index.js @@ -0,0 +1,8366 @@ +"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 __commonJS = (cb, mod) => function __require() { + return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; +}; +var __export = (target, all) => { + for (var name2 in all) + __defProp(target, name2, { get: all[name2], 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); + +// ../../node_modules/@xmldom/xmldom/lib/conventions.js +var require_conventions = __commonJS({ + "../../node_modules/@xmldom/xmldom/lib/conventions.js"(exports2) { + "use strict"; + function find(list, predicate, ac) { + if (ac === void 0) { + ac = Array.prototype; + } + if (list && typeof ac.find === "function") { + return ac.find.call(list, predicate); + } + for (var i = 0; i < list.length; i++) { + if (Object.prototype.hasOwnProperty.call(list, i)) { + var item = list[i]; + if (predicate.call(void 0, item, i, list)) { + return item; + } + } + } + } + function freeze(object, oc) { + if (oc === void 0) { + oc = Object; + } + return oc && typeof oc.freeze === "function" ? oc.freeze(object) : object; + } + function assign(target, source) { + if (target === null || typeof target !== "object") { + throw new TypeError("target is not an object"); + } + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + return target; + } + var MIME_TYPE = freeze({ + /** + * `text/html`, the only mime type that triggers treating an XML document as HTML. + * + * @see DOMParser.SupportedType.isHTML + * @see https://www.iana.org/assignments/media-types/text/html IANA MimeType registration + * @see https://en.wikipedia.org/wiki/HTML Wikipedia + * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMParser/parseFromString MDN + * @see https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-domparser-parsefromstring WHATWG HTML Spec + */ + HTML: "text/html", + /** + * Helper method to check a mime type if it indicates an HTML document + * + * @param {string} [value] + * @returns {boolean} + * + * @see https://www.iana.org/assignments/media-types/text/html IANA MimeType registration + * @see https://en.wikipedia.org/wiki/HTML Wikipedia + * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMParser/parseFromString MDN + * @see https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-domparser-parsefromstring */ + isHTML: function(value) { + return value === MIME_TYPE.HTML; + }, + /** + * `application/xml`, the standard mime type for XML documents. + * + * @see https://www.iana.org/assignments/media-types/application/xml IANA MimeType registration + * @see https://tools.ietf.org/html/rfc7303#section-9.1 RFC 7303 + * @see https://en.wikipedia.org/wiki/XML_and_MIME Wikipedia + */ + XML_APPLICATION: "application/xml", + /** + * `text/html`, an alias for `application/xml`. + * + * @see https://tools.ietf.org/html/rfc7303#section-9.2 RFC 7303 + * @see https://www.iana.org/assignments/media-types/text/xml IANA MimeType registration + * @see https://en.wikipedia.org/wiki/XML_and_MIME Wikipedia + */ + XML_TEXT: "text/xml", + /** + * `application/xhtml+xml`, indicates an XML document that has the default HTML namespace, + * but is parsed as an XML document. + * + * @see https://www.iana.org/assignments/media-types/application/xhtml+xml IANA MimeType registration + * @see https://dom.spec.whatwg.org/#dom-domimplementation-createdocument WHATWG DOM Spec + * @see https://en.wikipedia.org/wiki/XHTML Wikipedia + */ + XML_XHTML_APPLICATION: "application/xhtml+xml", + /** + * `image/svg+xml`, + * + * @see https://www.iana.org/assignments/media-types/image/svg+xml IANA MimeType registration + * @see https://www.w3.org/TR/SVG11/ W3C SVG 1.1 + * @see https://en.wikipedia.org/wiki/Scalable_Vector_Graphics Wikipedia + */ + XML_SVG_IMAGE: "image/svg+xml" + }); + var NAMESPACE = freeze({ + /** + * The XHTML namespace. + * + * @see http://www.w3.org/1999/xhtml + */ + HTML: "http://www.w3.org/1999/xhtml", + /** + * Checks if `uri` equals `NAMESPACE.HTML`. + * + * @param {string} [uri] + * + * @see NAMESPACE.HTML + */ + isHTML: function(uri) { + return uri === NAMESPACE.HTML; + }, + /** + * The SVG namespace. + * + * @see http://www.w3.org/2000/svg + */ + SVG: "http://www.w3.org/2000/svg", + /** + * The `xml:` namespace. + * + * @see http://www.w3.org/XML/1998/namespace + */ + XML: "http://www.w3.org/XML/1998/namespace", + /** + * The `xmlns:` namespace + * + * @see https://www.w3.org/2000/xmlns/ + */ + XMLNS: "http://www.w3.org/2000/xmlns/" + }); + exports2.assign = assign; + exports2.find = find; + exports2.freeze = freeze; + exports2.MIME_TYPE = MIME_TYPE; + exports2.NAMESPACE = NAMESPACE; + } +}); + +// ../../node_modules/@xmldom/xmldom/lib/dom.js +var require_dom = __commonJS({ + "../../node_modules/@xmldom/xmldom/lib/dom.js"(exports2) { + var conventions = require_conventions(); + var find = conventions.find; + var NAMESPACE = conventions.NAMESPACE; + function notEmptyString(input) { + return input !== ""; + } + function splitOnASCIIWhitespace(input) { + return input ? input.split(/[\t\n\f\r ]+/).filter(notEmptyString) : []; + } + function orderedSetReducer(current, element) { + if (!current.hasOwnProperty(element)) { + current[element] = true; + } + return current; + } + function toOrderedSet(input) { + if (!input) return []; + var list = splitOnASCIIWhitespace(input); + return Object.keys(list.reduce(orderedSetReducer, {})); + } + function arrayIncludes(list) { + return function(element) { + return list && list.indexOf(element) !== -1; + }; + } + function copy(src, dest) { + for (var p in src) { + if (Object.prototype.hasOwnProperty.call(src, p)) { + dest[p] = src[p]; + } + } + } + function _extends(Class, Super) { + var pt = Class.prototype; + if (!(pt instanceof Super)) { + let t2 = function() { + }; + var t = t2; + ; + t2.prototype = Super.prototype; + t2 = new t2(); + copy(pt, t2); + Class.prototype = pt = t2; + } + if (pt.constructor != Class) { + if (typeof Class != "function") { + console.error("unknown Class:" + Class); + } + pt.constructor = Class; + } + } + var NodeType = {}; + var ELEMENT_NODE = NodeType.ELEMENT_NODE = 1; + var ATTRIBUTE_NODE = NodeType.ATTRIBUTE_NODE = 2; + var TEXT_NODE = NodeType.TEXT_NODE = 3; + var CDATA_SECTION_NODE = NodeType.CDATA_SECTION_NODE = 4; + var ENTITY_REFERENCE_NODE = NodeType.ENTITY_REFERENCE_NODE = 5; + var ENTITY_NODE = NodeType.ENTITY_NODE = 6; + var PROCESSING_INSTRUCTION_NODE = NodeType.PROCESSING_INSTRUCTION_NODE = 7; + var COMMENT_NODE = NodeType.COMMENT_NODE = 8; + var DOCUMENT_NODE = NodeType.DOCUMENT_NODE = 9; + var DOCUMENT_TYPE_NODE = NodeType.DOCUMENT_TYPE_NODE = 10; + var DOCUMENT_FRAGMENT_NODE = NodeType.DOCUMENT_FRAGMENT_NODE = 11; + var NOTATION_NODE = NodeType.NOTATION_NODE = 12; + var ExceptionCode = {}; + var ExceptionMessage = {}; + var INDEX_SIZE_ERR = ExceptionCode.INDEX_SIZE_ERR = (ExceptionMessage[1] = "Index size error", 1); + var DOMSTRING_SIZE_ERR = ExceptionCode.DOMSTRING_SIZE_ERR = (ExceptionMessage[2] = "DOMString size error", 2); + var HIERARCHY_REQUEST_ERR = ExceptionCode.HIERARCHY_REQUEST_ERR = (ExceptionMessage[3] = "Hierarchy request error", 3); + var WRONG_DOCUMENT_ERR = ExceptionCode.WRONG_DOCUMENT_ERR = (ExceptionMessage[4] = "Wrong document", 4); + var INVALID_CHARACTER_ERR = ExceptionCode.INVALID_CHARACTER_ERR = (ExceptionMessage[5] = "Invalid character", 5); + var NO_DATA_ALLOWED_ERR = ExceptionCode.NO_DATA_ALLOWED_ERR = (ExceptionMessage[6] = "No data allowed", 6); + var NO_MODIFICATION_ALLOWED_ERR = ExceptionCode.NO_MODIFICATION_ALLOWED_ERR = (ExceptionMessage[7] = "No modification allowed", 7); + var NOT_FOUND_ERR = ExceptionCode.NOT_FOUND_ERR = (ExceptionMessage[8] = "Not found", 8); + var NOT_SUPPORTED_ERR = ExceptionCode.NOT_SUPPORTED_ERR = (ExceptionMessage[9] = "Not supported", 9); + var INUSE_ATTRIBUTE_ERR = ExceptionCode.INUSE_ATTRIBUTE_ERR = (ExceptionMessage[10] = "Attribute in use", 10); + var INVALID_STATE_ERR = ExceptionCode.INVALID_STATE_ERR = (ExceptionMessage[11] = "Invalid state", 11); + var SYNTAX_ERR = ExceptionCode.SYNTAX_ERR = (ExceptionMessage[12] = "Syntax error", 12); + var INVALID_MODIFICATION_ERR = ExceptionCode.INVALID_MODIFICATION_ERR = (ExceptionMessage[13] = "Invalid modification", 13); + var NAMESPACE_ERR = ExceptionCode.NAMESPACE_ERR = (ExceptionMessage[14] = "Invalid namespace", 14); + var INVALID_ACCESS_ERR = ExceptionCode.INVALID_ACCESS_ERR = (ExceptionMessage[15] = "Invalid access", 15); + function DOMException(code, message) { + if (message instanceof Error) { + var error = message; + } else { + error = this; + Error.call(this, ExceptionMessage[code]); + this.message = ExceptionMessage[code]; + if (Error.captureStackTrace) Error.captureStackTrace(this, DOMException); + } + error.code = code; + if (message) this.message = this.message + ": " + message; + return error; + } + DOMException.prototype = Error.prototype; + copy(ExceptionCode, DOMException); + function NodeList() { + } + NodeList.prototype = { + /** + * The number of nodes in the list. The range of valid child node indices is 0 to length-1 inclusive. + * @standard level1 + */ + length: 0, + /** + * Returns the indexth item in the collection. If index is greater than or equal to the number of nodes in the list, this returns null. + * @standard level1 + * @param index unsigned long + * Index into the collection. + * @return Node + * The node at the indexth position in the NodeList, or null if that is not a valid index. + */ + item: function(index) { + return index >= 0 && index < this.length ? this[index] : null; + }, + toString: function(isHTML, nodeFilter) { + for (var buf = [], i = 0; i < this.length; i++) { + serializeToString(this[i], buf, isHTML, nodeFilter); + } + return buf.join(""); + }, + /** + * @private + * @param {function (Node):boolean} predicate + * @returns {Node[]} + */ + filter: function(predicate) { + return Array.prototype.filter.call(this, predicate); + }, + /** + * @private + * @param {Node} item + * @returns {number} + */ + indexOf: function(item) { + return Array.prototype.indexOf.call(this, item); + } + }; + function LiveNodeList(node, refresh) { + this._node = node; + this._refresh = refresh; + _updateLiveList(this); + } + function _updateLiveList(list) { + var inc = list._node._inc || list._node.ownerDocument._inc; + if (list._inc !== inc) { + var ls = list._refresh(list._node); + __set__(list, "length", ls.length); + if (!list.$$length || ls.length < list.$$length) { + for (var i = ls.length; i in list; i++) { + if (Object.prototype.hasOwnProperty.call(list, i)) { + delete list[i]; + } + } + } + copy(ls, list); + list._inc = inc; + } + } + LiveNodeList.prototype.item = function(i) { + _updateLiveList(this); + return this[i] || null; + }; + _extends(LiveNodeList, NodeList); + function NamedNodeMap() { + } + function _findNodeIndex(list, node) { + var i = list.length; + while (i--) { + if (list[i] === node) { + return i; + } + } + } + function _addNamedNode(el, list, newAttr, oldAttr) { + if (oldAttr) { + list[_findNodeIndex(list, oldAttr)] = newAttr; + } else { + list[list.length++] = newAttr; + } + if (el) { + newAttr.ownerElement = el; + var doc = el.ownerDocument; + if (doc) { + oldAttr && _onRemoveAttribute(doc, el, oldAttr); + _onAddAttribute(doc, el, newAttr); + } + } + } + function _removeNamedNode(el, list, attr) { + var i = _findNodeIndex(list, attr); + if (i >= 0) { + var lastIndex = list.length - 1; + while (i < lastIndex) { + list[i] = list[++i]; + } + list.length = lastIndex; + if (el) { + var doc = el.ownerDocument; + if (doc) { + _onRemoveAttribute(doc, el, attr); + attr.ownerElement = null; + } + } + } else { + throw new DOMException(NOT_FOUND_ERR, new Error(el.tagName + "@" + attr)); + } + } + NamedNodeMap.prototype = { + length: 0, + item: NodeList.prototype.item, + getNamedItem: function(key) { + var i = this.length; + while (i--) { + var attr = this[i]; + if (attr.nodeName == key) { + return attr; + } + } + }, + setNamedItem: function(attr) { + var el = attr.ownerElement; + if (el && el != this._ownerElement) { + throw new DOMException(INUSE_ATTRIBUTE_ERR); + } + var oldAttr = this.getNamedItem(attr.nodeName); + _addNamedNode(this._ownerElement, this, attr, oldAttr); + return oldAttr; + }, + /* returns Node */ + setNamedItemNS: function(attr) { + var el = attr.ownerElement, oldAttr; + if (el && el != this._ownerElement) { + throw new DOMException(INUSE_ATTRIBUTE_ERR); + } + oldAttr = this.getNamedItemNS(attr.namespaceURI, attr.localName); + _addNamedNode(this._ownerElement, this, attr, oldAttr); + return oldAttr; + }, + /* returns Node */ + removeNamedItem: function(key) { + var attr = this.getNamedItem(key); + _removeNamedNode(this._ownerElement, this, attr); + return attr; + }, + // raises: NOT_FOUND_ERR,NO_MODIFICATION_ALLOWED_ERR + //for level2 + removeNamedItemNS: function(namespaceURI, localName) { + var attr = this.getNamedItemNS(namespaceURI, localName); + _removeNamedNode(this._ownerElement, this, attr); + return attr; + }, + getNamedItemNS: function(namespaceURI, localName) { + var i = this.length; + while (i--) { + var node = this[i]; + if (node.localName == localName && node.namespaceURI == namespaceURI) { + return node; + } + } + return null; + } + }; + function DOMImplementation() { + } + DOMImplementation.prototype = { + /** + * The DOMImplementation.hasFeature() method returns a Boolean flag indicating if a given feature is supported. + * The different implementations fairly diverged in what kind of features were reported. + * The latest version of the spec settled to force this method to always return true, where the functionality was accurate and in use. + * + * @deprecated It is deprecated and modern browsers return true in all cases. + * + * @param {string} feature + * @param {string} [version] + * @returns {boolean} always true + * + * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation/hasFeature MDN + * @see https://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html#ID-5CED94D7 DOM Level 1 Core + * @see https://dom.spec.whatwg.org/#dom-domimplementation-hasfeature DOM Living Standard + */ + hasFeature: function(feature, version) { + return true; + }, + /** + * Creates an XML Document object of the specified type with its document element. + * + * __It behaves slightly different from the description in the living standard__: + * - There is no interface/class `XMLDocument`, it returns a `Document` instance. + * - `contentType`, `encoding`, `mode`, `origin`, `url` fields are currently not declared. + * - this implementation is not validating names or qualified names + * (when parsing XML strings, the SAX parser takes care of that) + * + * @param {string|null} namespaceURI + * @param {string} qualifiedName + * @param {DocumentType=null} doctype + * @returns {Document} + * + * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation/createDocument MDN + * @see https://www.w3.org/TR/DOM-Level-2-Core/core.html#Level-2-Core-DOM-createDocument DOM Level 2 Core (initial) + * @see https://dom.spec.whatwg.org/#dom-domimplementation-createdocument DOM Level 2 Core + * + * @see https://dom.spec.whatwg.org/#validate-and-extract DOM: Validate and extract + * @see https://www.w3.org/TR/xml/#NT-NameStartChar XML Spec: Names + * @see https://www.w3.org/TR/xml-names/#ns-qualnames XML Namespaces: Qualified names + */ + createDocument: function(namespaceURI, qualifiedName, doctype) { + var doc = new Document(); + doc.implementation = this; + doc.childNodes = new NodeList(); + doc.doctype = doctype || null; + if (doctype) { + doc.appendChild(doctype); + } + if (qualifiedName) { + var root = doc.createElementNS(namespaceURI, qualifiedName); + doc.appendChild(root); + } + return doc; + }, + /** + * Returns a doctype, with the given `qualifiedName`, `publicId`, and `systemId`. + * + * __This behavior is slightly different from the in the specs__: + * - this implementation is not validating names or qualified names + * (when parsing XML strings, the SAX parser takes care of that) + * + * @param {string} qualifiedName + * @param {string} [publicId] + * @param {string} [systemId] + * @returns {DocumentType} which can either be used with `DOMImplementation.createDocument` upon document creation + * or can be put into the document via methods like `Node.insertBefore()` or `Node.replaceChild()` + * + * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation/createDocumentType MDN + * @see https://www.w3.org/TR/DOM-Level-2-Core/core.html#Level-2-Core-DOM-createDocType DOM Level 2 Core + * @see https://dom.spec.whatwg.org/#dom-domimplementation-createdocumenttype DOM Living Standard + * + * @see https://dom.spec.whatwg.org/#validate-and-extract DOM: Validate and extract + * @see https://www.w3.org/TR/xml/#NT-NameStartChar XML Spec: Names + * @see https://www.w3.org/TR/xml-names/#ns-qualnames XML Namespaces: Qualified names + */ + createDocumentType: function(qualifiedName, publicId, systemId) { + var node = new DocumentType(); + node.name = qualifiedName; + node.nodeName = qualifiedName; + node.publicId = publicId || ""; + node.systemId = systemId || ""; + return node; + } + }; + function Node() { + } + Node.prototype = { + firstChild: null, + lastChild: null, + previousSibling: null, + nextSibling: null, + attributes: null, + parentNode: null, + childNodes: null, + ownerDocument: null, + nodeValue: null, + namespaceURI: null, + prefix: null, + localName: null, + // Modified in DOM Level 2: + insertBefore: function(newChild, refChild) { + return _insertBefore(this, newChild, refChild); + }, + replaceChild: function(newChild, oldChild) { + _insertBefore(this, newChild, oldChild, assertPreReplacementValidityInDocument); + if (oldChild) { + this.removeChild(oldChild); + } + }, + removeChild: function(oldChild) { + return _removeChild(this, oldChild); + }, + appendChild: function(newChild) { + return this.insertBefore(newChild, null); + }, + hasChildNodes: function() { + return this.firstChild != null; + }, + cloneNode: function(deep) { + return cloneNode(this.ownerDocument || this, this, deep); + }, + // Modified in DOM Level 2: + normalize: function() { + var child = this.firstChild; + while (child) { + var next = child.nextSibling; + if (next && next.nodeType == TEXT_NODE && child.nodeType == TEXT_NODE) { + this.removeChild(next); + child.appendData(next.data); + } else { + child.normalize(); + child = next; + } + } + }, + // Introduced in DOM Level 2: + isSupported: function(feature, version) { + return this.ownerDocument.implementation.hasFeature(feature, version); + }, + // Introduced in DOM Level 2: + hasAttributes: function() { + return this.attributes.length > 0; + }, + /** + * Look up the prefix associated to the given namespace URI, starting from this node. + * **The default namespace declarations are ignored by this method.** + * See Namespace Prefix Lookup for details on the algorithm used by this method. + * + * _Note: The implementation seems to be incomplete when compared to the algorithm described in the specs._ + * + * @param {string | null} namespaceURI + * @returns {string | null} + * @see https://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-lookupNamespacePrefix + * @see https://www.w3.org/TR/DOM-Level-3-Core/namespaces-algorithms.html#lookupNamespacePrefixAlgo + * @see https://dom.spec.whatwg.org/#dom-node-lookupprefix + * @see https://github.com/xmldom/xmldom/issues/322 + */ + lookupPrefix: function(namespaceURI) { + var el = this; + while (el) { + var map = el._nsMap; + if (map) { + for (var n in map) { + if (Object.prototype.hasOwnProperty.call(map, n) && map[n] === namespaceURI) { + return n; + } + } + } + el = el.nodeType == ATTRIBUTE_NODE ? el.ownerDocument : el.parentNode; + } + return null; + }, + // Introduced in DOM Level 3: + lookupNamespaceURI: function(prefix) { + var el = this; + while (el) { + var map = el._nsMap; + if (map) { + if (Object.prototype.hasOwnProperty.call(map, prefix)) { + return map[prefix]; + } + } + el = el.nodeType == ATTRIBUTE_NODE ? el.ownerDocument : el.parentNode; + } + return null; + }, + // Introduced in DOM Level 3: + isDefaultNamespace: function(namespaceURI) { + var prefix = this.lookupPrefix(namespaceURI); + return prefix == null; + } + }; + function _xmlEncoder(c) { + return c == "<" && "<" || c == ">" && ">" || c == "&" && "&" || c == '"' && """ || "&#" + c.charCodeAt() + ";"; + } + copy(NodeType, Node); + copy(NodeType, Node.prototype); + function _visitNode(node, callback) { + if (callback(node)) { + return true; + } + if (node = node.firstChild) { + do { + if (_visitNode(node, callback)) { + return true; + } + } while (node = node.nextSibling); + } + } + function Document() { + this.ownerDocument = this; + } + function _onAddAttribute(doc, el, newAttr) { + doc && doc._inc++; + var ns = newAttr.namespaceURI; + if (ns === NAMESPACE.XMLNS) { + el._nsMap[newAttr.prefix ? newAttr.localName : ""] = newAttr.value; + } + } + function _onRemoveAttribute(doc, el, newAttr, remove) { + doc && doc._inc++; + var ns = newAttr.namespaceURI; + if (ns === NAMESPACE.XMLNS) { + delete el._nsMap[newAttr.prefix ? newAttr.localName : ""]; + } + } + function _onUpdateChild(doc, el, newChild) { + if (doc && doc._inc) { + doc._inc++; + var cs = el.childNodes; + if (newChild) { + cs[cs.length++] = newChild; + } else { + var child = el.firstChild; + var i = 0; + while (child) { + cs[i++] = child; + child = child.nextSibling; + } + cs.length = i; + delete cs[cs.length]; + } + } + } + function _removeChild(parentNode, child) { + var previous = child.previousSibling; + var next = child.nextSibling; + if (previous) { + previous.nextSibling = next; + } else { + parentNode.firstChild = next; + } + if (next) { + next.previousSibling = previous; + } else { + parentNode.lastChild = previous; + } + child.parentNode = null; + child.previousSibling = null; + child.nextSibling = null; + _onUpdateChild(parentNode.ownerDocument, parentNode); + return child; + } + function hasValidParentNodeType(node) { + return node && (node.nodeType === Node.DOCUMENT_NODE || node.nodeType === Node.DOCUMENT_FRAGMENT_NODE || node.nodeType === Node.ELEMENT_NODE); + } + function hasInsertableNodeType(node) { + return node && (isElementNode(node) || isTextNode(node) || isDocTypeNode(node) || node.nodeType === Node.DOCUMENT_FRAGMENT_NODE || node.nodeType === Node.COMMENT_NODE || node.nodeType === Node.PROCESSING_INSTRUCTION_NODE); + } + function isDocTypeNode(node) { + return node && node.nodeType === Node.DOCUMENT_TYPE_NODE; + } + function isElementNode(node) { + return node && node.nodeType === Node.ELEMENT_NODE; + } + function isTextNode(node) { + return node && node.nodeType === Node.TEXT_NODE; + } + function isElementInsertionPossible(doc, child) { + var parentChildNodes = doc.childNodes || []; + if (find(parentChildNodes, isElementNode) || isDocTypeNode(child)) { + return false; + } + var docTypeNode = find(parentChildNodes, isDocTypeNode); + return !(child && docTypeNode && parentChildNodes.indexOf(docTypeNode) > parentChildNodes.indexOf(child)); + } + function isElementReplacementPossible(doc, child) { + var parentChildNodes = doc.childNodes || []; + function hasElementChildThatIsNotChild(node) { + return isElementNode(node) && node !== child; + } + if (find(parentChildNodes, hasElementChildThatIsNotChild)) { + return false; + } + var docTypeNode = find(parentChildNodes, isDocTypeNode); + return !(child && docTypeNode && parentChildNodes.indexOf(docTypeNode) > parentChildNodes.indexOf(child)); + } + function assertPreInsertionValidity1to5(parent, node, child) { + if (!hasValidParentNodeType(parent)) { + throw new DOMException(HIERARCHY_REQUEST_ERR, "Unexpected parent node type " + parent.nodeType); + } + if (child && child.parentNode !== parent) { + throw new DOMException(NOT_FOUND_ERR, "child not in parent"); + } + if ( + // 4. If `node` is not a DocumentFragment, DocumentType, Element, or CharacterData node, then throw a "HierarchyRequestError" DOMException. + !hasInsertableNodeType(node) || // 5. If either `node` is a Text node and `parent` is a document, + // the sax parser currently adds top level text nodes, this will be fixed in 0.9.0 + // || (node.nodeType === Node.TEXT_NODE && parent.nodeType === Node.DOCUMENT_NODE) + // or `node` is a doctype and `parent` is not a document, then throw a "HierarchyRequestError" DOMException. + isDocTypeNode(node) && parent.nodeType !== Node.DOCUMENT_NODE + ) { + throw new DOMException( + HIERARCHY_REQUEST_ERR, + "Unexpected node type " + node.nodeType + " for parent node type " + parent.nodeType + ); + } + } + function assertPreInsertionValidityInDocument(parent, node, child) { + var parentChildNodes = parent.childNodes || []; + var nodeChildNodes = node.childNodes || []; + if (node.nodeType === Node.DOCUMENT_FRAGMENT_NODE) { + var nodeChildElements = nodeChildNodes.filter(isElementNode); + if (nodeChildElements.length > 1 || find(nodeChildNodes, isTextNode)) { + throw new DOMException(HIERARCHY_REQUEST_ERR, "More than one element or text in fragment"); + } + if (nodeChildElements.length === 1 && !isElementInsertionPossible(parent, child)) { + throw new DOMException(HIERARCHY_REQUEST_ERR, "Element in fragment can not be inserted before doctype"); + } + } + if (isElementNode(node)) { + if (!isElementInsertionPossible(parent, child)) { + throw new DOMException(HIERARCHY_REQUEST_ERR, "Only one element can be added and only after doctype"); + } + } + if (isDocTypeNode(node)) { + if (find(parentChildNodes, isDocTypeNode)) { + throw new DOMException(HIERARCHY_REQUEST_ERR, "Only one doctype is allowed"); + } + var parentElementChild = find(parentChildNodes, isElementNode); + if (child && parentChildNodes.indexOf(parentElementChild) < parentChildNodes.indexOf(child)) { + throw new DOMException(HIERARCHY_REQUEST_ERR, "Doctype can only be inserted before an element"); + } + if (!child && parentElementChild) { + throw new DOMException(HIERARCHY_REQUEST_ERR, "Doctype can not be appended since element is present"); + } + } + } + function assertPreReplacementValidityInDocument(parent, node, child) { + var parentChildNodes = parent.childNodes || []; + var nodeChildNodes = node.childNodes || []; + if (node.nodeType === Node.DOCUMENT_FRAGMENT_NODE) { + var nodeChildElements = nodeChildNodes.filter(isElementNode); + if (nodeChildElements.length > 1 || find(nodeChildNodes, isTextNode)) { + throw new DOMException(HIERARCHY_REQUEST_ERR, "More than one element or text in fragment"); + } + if (nodeChildElements.length === 1 && !isElementReplacementPossible(parent, child)) { + throw new DOMException(HIERARCHY_REQUEST_ERR, "Element in fragment can not be inserted before doctype"); + } + } + if (isElementNode(node)) { + if (!isElementReplacementPossible(parent, child)) { + throw new DOMException(HIERARCHY_REQUEST_ERR, "Only one element can be added and only after doctype"); + } + } + if (isDocTypeNode(node)) { + let hasDoctypeChildThatIsNotChild2 = function(node2) { + return isDocTypeNode(node2) && node2 !== child; + }; + var hasDoctypeChildThatIsNotChild = hasDoctypeChildThatIsNotChild2; + if (find(parentChildNodes, hasDoctypeChildThatIsNotChild2)) { + throw new DOMException(HIERARCHY_REQUEST_ERR, "Only one doctype is allowed"); + } + var parentElementChild = find(parentChildNodes, isElementNode); + if (child && parentChildNodes.indexOf(parentElementChild) < parentChildNodes.indexOf(child)) { + throw new DOMException(HIERARCHY_REQUEST_ERR, "Doctype can only be inserted before an element"); + } + } + } + function _insertBefore(parent, node, child, _inDocumentAssertion) { + assertPreInsertionValidity1to5(parent, node, child); + if (parent.nodeType === Node.DOCUMENT_NODE) { + (_inDocumentAssertion || assertPreInsertionValidityInDocument)(parent, node, child); + } + var cp = node.parentNode; + if (cp) { + cp.removeChild(node); + } + if (node.nodeType === DOCUMENT_FRAGMENT_NODE) { + var newFirst = node.firstChild; + if (newFirst == null) { + return node; + } + var newLast = node.lastChild; + } else { + newFirst = newLast = node; + } + var pre = child ? child.previousSibling : parent.lastChild; + newFirst.previousSibling = pre; + newLast.nextSibling = child; + if (pre) { + pre.nextSibling = newFirst; + } else { + parent.firstChild = newFirst; + } + if (child == null) { + parent.lastChild = newLast; + } else { + child.previousSibling = newLast; + } + do { + newFirst.parentNode = parent; + } while (newFirst !== newLast && (newFirst = newFirst.nextSibling)); + _onUpdateChild(parent.ownerDocument || parent, parent); + if (node.nodeType == DOCUMENT_FRAGMENT_NODE) { + node.firstChild = node.lastChild = null; + } + return node; + } + function _appendSingleChild(parentNode, newChild) { + if (newChild.parentNode) { + newChild.parentNode.removeChild(newChild); + } + newChild.parentNode = parentNode; + newChild.previousSibling = parentNode.lastChild; + newChild.nextSibling = null; + if (newChild.previousSibling) { + newChild.previousSibling.nextSibling = newChild; + } else { + parentNode.firstChild = newChild; + } + parentNode.lastChild = newChild; + _onUpdateChild(parentNode.ownerDocument, parentNode, newChild); + return newChild; + } + Document.prototype = { + //implementation : null, + nodeName: "#document", + nodeType: DOCUMENT_NODE, + /** + * The DocumentType node of the document. + * + * @readonly + * @type DocumentType + */ + doctype: null, + documentElement: null, + _inc: 1, + insertBefore: function(newChild, refChild) { + if (newChild.nodeType == DOCUMENT_FRAGMENT_NODE) { + var child = newChild.firstChild; + while (child) { + var next = child.nextSibling; + this.insertBefore(child, refChild); + child = next; + } + return newChild; + } + _insertBefore(this, newChild, refChild); + newChild.ownerDocument = this; + if (this.documentElement === null && newChild.nodeType === ELEMENT_NODE) { + this.documentElement = newChild; + } + return newChild; + }, + removeChild: function(oldChild) { + if (this.documentElement == oldChild) { + this.documentElement = null; + } + return _removeChild(this, oldChild); + }, + replaceChild: function(newChild, oldChild) { + _insertBefore(this, newChild, oldChild, assertPreReplacementValidityInDocument); + newChild.ownerDocument = this; + if (oldChild) { + this.removeChild(oldChild); + } + if (isElementNode(newChild)) { + this.documentElement = newChild; + } + }, + // Introduced in DOM Level 2: + importNode: function(importedNode, deep) { + return importNode(this, importedNode, deep); + }, + // Introduced in DOM Level 2: + getElementById: function(id) { + var rtv = null; + _visitNode(this.documentElement, function(node) { + if (node.nodeType == ELEMENT_NODE) { + if (node.getAttribute("id") == id) { + rtv = node; + return true; + } + } + }); + return rtv; + }, + /** + * The `getElementsByClassName` method of `Document` interface returns an array-like object + * of all child elements which have **all** of the given class name(s). + * + * Returns an empty list if `classeNames` is an empty string or only contains HTML white space characters. + * + * + * Warning: This is a live LiveNodeList. + * Changes in the DOM will reflect in the array as the changes occur. + * If an element selected by this array no longer qualifies for the selector, + * it will automatically be removed. Be aware of this for iteration purposes. + * + * @param {string} classNames is a string representing the class name(s) to match; multiple class names are separated by (ASCII-)whitespace + * + * @see https://developer.mozilla.org/en-US/docs/Web/API/Document/getElementsByClassName + * @see https://dom.spec.whatwg.org/#concept-getelementsbyclassname + */ + getElementsByClassName: function(classNames) { + var classNamesSet = toOrderedSet(classNames); + return new LiveNodeList(this, function(base) { + var ls = []; + if (classNamesSet.length > 0) { + _visitNode(base.documentElement, function(node) { + if (node !== base && node.nodeType === ELEMENT_NODE) { + var nodeClassNames = node.getAttribute("class"); + if (nodeClassNames) { + var matches = classNames === nodeClassNames; + if (!matches) { + var nodeClassNamesSet = toOrderedSet(nodeClassNames); + matches = classNamesSet.every(arrayIncludes(nodeClassNamesSet)); + } + if (matches) { + ls.push(node); + } + } + } + }); + } + return ls; + }); + }, + //document factory method: + createElement: function(tagName) { + var node = new Element(); + node.ownerDocument = this; + node.nodeName = tagName; + node.tagName = tagName; + node.localName = tagName; + node.childNodes = new NodeList(); + var attrs = node.attributes = new NamedNodeMap(); + attrs._ownerElement = node; + return node; + }, + createDocumentFragment: function() { + var node = new DocumentFragment(); + node.ownerDocument = this; + node.childNodes = new NodeList(); + return node; + }, + createTextNode: function(data) { + var node = new Text(); + node.ownerDocument = this; + node.appendData(data); + return node; + }, + createComment: function(data) { + var node = new Comment(); + node.ownerDocument = this; + node.appendData(data); + return node; + }, + createCDATASection: function(data) { + var node = new CDATASection(); + node.ownerDocument = this; + node.appendData(data); + return node; + }, + createProcessingInstruction: function(target, data) { + var node = new ProcessingInstruction(); + node.ownerDocument = this; + node.tagName = node.nodeName = node.target = target; + node.nodeValue = node.data = data; + return node; + }, + createAttribute: function(name2) { + var node = new Attr(); + node.ownerDocument = this; + node.name = name2; + node.nodeName = name2; + node.localName = name2; + node.specified = true; + return node; + }, + createEntityReference: function(name2) { + var node = new EntityReference(); + node.ownerDocument = this; + node.nodeName = name2; + return node; + }, + // Introduced in DOM Level 2: + createElementNS: function(namespaceURI, qualifiedName) { + var node = new Element(); + var pl = qualifiedName.split(":"); + var attrs = node.attributes = new NamedNodeMap(); + node.childNodes = new NodeList(); + node.ownerDocument = this; + node.nodeName = qualifiedName; + node.tagName = qualifiedName; + node.namespaceURI = namespaceURI; + if (pl.length == 2) { + node.prefix = pl[0]; + node.localName = pl[1]; + } else { + node.localName = qualifiedName; + } + attrs._ownerElement = node; + return node; + }, + // Introduced in DOM Level 2: + createAttributeNS: function(namespaceURI, qualifiedName) { + var node = new Attr(); + var pl = qualifiedName.split(":"); + node.ownerDocument = this; + node.nodeName = qualifiedName; + node.name = qualifiedName; + node.namespaceURI = namespaceURI; + node.specified = true; + if (pl.length == 2) { + node.prefix = pl[0]; + node.localName = pl[1]; + } else { + node.localName = qualifiedName; + } + return node; + } + }; + _extends(Document, Node); + function Element() { + this._nsMap = {}; + } + Element.prototype = { + nodeType: ELEMENT_NODE, + hasAttribute: function(name2) { + return this.getAttributeNode(name2) != null; + }, + getAttribute: function(name2) { + var attr = this.getAttributeNode(name2); + return attr && attr.value || ""; + }, + getAttributeNode: function(name2) { + return this.attributes.getNamedItem(name2); + }, + setAttribute: function(name2, value) { + var attr = this.ownerDocument.createAttribute(name2); + attr.value = attr.nodeValue = "" + value; + this.setAttributeNode(attr); + }, + removeAttribute: function(name2) { + var attr = this.getAttributeNode(name2); + attr && this.removeAttributeNode(attr); + }, + //four real opeartion method + appendChild: function(newChild) { + if (newChild.nodeType === DOCUMENT_FRAGMENT_NODE) { + return this.insertBefore(newChild, null); + } else { + return _appendSingleChild(this, newChild); + } + }, + setAttributeNode: function(newAttr) { + return this.attributes.setNamedItem(newAttr); + }, + setAttributeNodeNS: function(newAttr) { + return this.attributes.setNamedItemNS(newAttr); + }, + removeAttributeNode: function(oldAttr) { + return this.attributes.removeNamedItem(oldAttr.nodeName); + }, + //get real attribute name,and remove it by removeAttributeNode + removeAttributeNS: function(namespaceURI, localName) { + var old = this.getAttributeNodeNS(namespaceURI, localName); + old && this.removeAttributeNode(old); + }, + hasAttributeNS: function(namespaceURI, localName) { + return this.getAttributeNodeNS(namespaceURI, localName) != null; + }, + getAttributeNS: function(namespaceURI, localName) { + var attr = this.getAttributeNodeNS(namespaceURI, localName); + return attr && attr.value || ""; + }, + setAttributeNS: function(namespaceURI, qualifiedName, value) { + var attr = this.ownerDocument.createAttributeNS(namespaceURI, qualifiedName); + attr.value = attr.nodeValue = "" + value; + this.setAttributeNode(attr); + }, + getAttributeNodeNS: function(namespaceURI, localName) { + return this.attributes.getNamedItemNS(namespaceURI, localName); + }, + getElementsByTagName: function(tagName) { + return new LiveNodeList(this, function(base) { + var ls = []; + _visitNode(base, function(node) { + if (node !== base && node.nodeType == ELEMENT_NODE && (tagName === "*" || node.tagName == tagName)) { + ls.push(node); + } + }); + return ls; + }); + }, + getElementsByTagNameNS: function(namespaceURI, localName) { + return new LiveNodeList(this, function(base) { + var ls = []; + _visitNode(base, function(node) { + if (node !== base && node.nodeType === ELEMENT_NODE && (namespaceURI === "*" || node.namespaceURI === namespaceURI) && (localName === "*" || node.localName == localName)) { + ls.push(node); + } + }); + return ls; + }); + } + }; + Document.prototype.getElementsByTagName = Element.prototype.getElementsByTagName; + Document.prototype.getElementsByTagNameNS = Element.prototype.getElementsByTagNameNS; + _extends(Element, Node); + function Attr() { + } + Attr.prototype.nodeType = ATTRIBUTE_NODE; + _extends(Attr, Node); + function CharacterData() { + } + CharacterData.prototype = { + data: "", + substringData: function(offset, count) { + return this.data.substring(offset, offset + count); + }, + appendData: function(text) { + text = this.data + text; + this.nodeValue = this.data = text; + this.length = text.length; + }, + insertData: function(offset, text) { + this.replaceData(offset, 0, text); + }, + appendChild: function(newChild) { + throw new Error(ExceptionMessage[HIERARCHY_REQUEST_ERR]); + }, + deleteData: function(offset, count) { + this.replaceData(offset, count, ""); + }, + replaceData: function(offset, count, text) { + var start = this.data.substring(0, offset); + var end = this.data.substring(offset + count); + text = start + text + end; + this.nodeValue = this.data = text; + this.length = text.length; + } + }; + _extends(CharacterData, Node); + function Text() { + } + Text.prototype = { + nodeName: "#text", + nodeType: TEXT_NODE, + splitText: function(offset) { + var text = this.data; + var newText = text.substring(offset); + text = text.substring(0, offset); + this.data = this.nodeValue = text; + this.length = text.length; + var newNode = this.ownerDocument.createTextNode(newText); + if (this.parentNode) { + this.parentNode.insertBefore(newNode, this.nextSibling); + } + return newNode; + } + }; + _extends(Text, CharacterData); + function Comment() { + } + Comment.prototype = { + nodeName: "#comment", + nodeType: COMMENT_NODE + }; + _extends(Comment, CharacterData); + function CDATASection() { + } + CDATASection.prototype = { + nodeName: "#cdata-section", + nodeType: CDATA_SECTION_NODE + }; + _extends(CDATASection, CharacterData); + function DocumentType() { + } + DocumentType.prototype.nodeType = DOCUMENT_TYPE_NODE; + _extends(DocumentType, Node); + function Notation() { + } + Notation.prototype.nodeType = NOTATION_NODE; + _extends(Notation, Node); + function Entity() { + } + Entity.prototype.nodeType = ENTITY_NODE; + _extends(Entity, Node); + function EntityReference() { + } + EntityReference.prototype.nodeType = ENTITY_REFERENCE_NODE; + _extends(EntityReference, Node); + function DocumentFragment() { + } + DocumentFragment.prototype.nodeName = "#document-fragment"; + DocumentFragment.prototype.nodeType = DOCUMENT_FRAGMENT_NODE; + _extends(DocumentFragment, Node); + function ProcessingInstruction() { + } + ProcessingInstruction.prototype.nodeType = PROCESSING_INSTRUCTION_NODE; + _extends(ProcessingInstruction, Node); + function XMLSerializer() { + } + XMLSerializer.prototype.serializeToString = function(node, isHtml, nodeFilter) { + return nodeSerializeToString.call(node, isHtml, nodeFilter); + }; + Node.prototype.toString = nodeSerializeToString; + function nodeSerializeToString(isHtml, nodeFilter) { + var buf = []; + var refNode = this.nodeType == 9 && this.documentElement || this; + var prefix = refNode.prefix; + var uri = refNode.namespaceURI; + if (uri && prefix == null) { + var prefix = refNode.lookupPrefix(uri); + if (prefix == null) { + var visibleNamespaces = [ + { namespace: uri, prefix: null } + //{namespace:uri,prefix:''} + ]; + } + } + serializeToString(this, buf, isHtml, nodeFilter, visibleNamespaces); + return buf.join(""); + } + function needNamespaceDefine(node, isHTML, visibleNamespaces) { + var prefix = node.prefix || ""; + var uri = node.namespaceURI; + if (!uri) { + return false; + } + if (prefix === "xml" && uri === NAMESPACE.XML || uri === NAMESPACE.XMLNS) { + return false; + } + var i = visibleNamespaces.length; + while (i--) { + var ns = visibleNamespaces[i]; + if (ns.prefix === prefix) { + return ns.namespace !== uri; + } + } + return true; + } + function addSerializedAttribute(buf, qualifiedName, value) { + buf.push(" ", qualifiedName, '="', value.replace(/[<>&"\t\n\r]/g, _xmlEncoder), '"'); + } + function serializeToString(node, buf, isHTML, nodeFilter, visibleNamespaces) { + if (!visibleNamespaces) { + visibleNamespaces = []; + } + if (nodeFilter) { + node = nodeFilter(node); + if (node) { + if (typeof node == "string") { + buf.push(node); + return; + } + } else { + return; + } + } + switch (node.nodeType) { + case ELEMENT_NODE: + var attrs = node.attributes; + var len = attrs.length; + var child = node.firstChild; + var nodeName = node.tagName; + isHTML = NAMESPACE.isHTML(node.namespaceURI) || isHTML; + var prefixedNodeName = nodeName; + if (!isHTML && !node.prefix && node.namespaceURI) { + var defaultNS; + for (var ai = 0; ai < attrs.length; ai++) { + if (attrs.item(ai).name === "xmlns") { + defaultNS = attrs.item(ai).value; + break; + } + } + if (!defaultNS) { + for (var nsi = visibleNamespaces.length - 1; nsi >= 0; nsi--) { + var namespace = visibleNamespaces[nsi]; + if (namespace.prefix === "" && namespace.namespace === node.namespaceURI) { + defaultNS = namespace.namespace; + break; + } + } + } + if (defaultNS !== node.namespaceURI) { + for (var nsi = visibleNamespaces.length - 1; nsi >= 0; nsi--) { + var namespace = visibleNamespaces[nsi]; + if (namespace.namespace === node.namespaceURI) { + if (namespace.prefix) { + prefixedNodeName = namespace.prefix + ":" + nodeName; + } + break; + } + } + } + } + buf.push("<", prefixedNodeName); + for (var i = 0; i < len; i++) { + var attr = attrs.item(i); + if (attr.prefix == "xmlns") { + visibleNamespaces.push({ prefix: attr.localName, namespace: attr.value }); + } else if (attr.nodeName == "xmlns") { + visibleNamespaces.push({ prefix: "", namespace: attr.value }); + } + } + for (var i = 0; i < len; i++) { + var attr = attrs.item(i); + if (needNamespaceDefine(attr, isHTML, visibleNamespaces)) { + var prefix = attr.prefix || ""; + var uri = attr.namespaceURI; + addSerializedAttribute(buf, prefix ? "xmlns:" + prefix : "xmlns", uri); + visibleNamespaces.push({ prefix, namespace: uri }); + } + serializeToString(attr, buf, isHTML, nodeFilter, visibleNamespaces); + } + if (nodeName === prefixedNodeName && needNamespaceDefine(node, isHTML, visibleNamespaces)) { + var prefix = node.prefix || ""; + var uri = node.namespaceURI; + addSerializedAttribute(buf, prefix ? "xmlns:" + prefix : "xmlns", uri); + visibleNamespaces.push({ prefix, namespace: uri }); + } + if (child || isHTML && !/^(?:meta|link|img|br|hr|input)$/i.test(nodeName)) { + buf.push(">"); + if (isHTML && /^script$/i.test(nodeName)) { + while (child) { + if (child.data) { + buf.push(child.data); + } else { + serializeToString(child, buf, isHTML, nodeFilter, visibleNamespaces.slice()); + } + child = child.nextSibling; + } + } else { + while (child) { + serializeToString(child, buf, isHTML, nodeFilter, visibleNamespaces.slice()); + child = child.nextSibling; + } + } + buf.push(""); + } else { + buf.push("/>"); + } + return; + case DOCUMENT_NODE: + case DOCUMENT_FRAGMENT_NODE: + var child = node.firstChild; + while (child) { + serializeToString(child, buf, isHTML, nodeFilter, visibleNamespaces.slice()); + child = child.nextSibling; + } + return; + case ATTRIBUTE_NODE: + return addSerializedAttribute(buf, node.name, node.value); + case TEXT_NODE: + return buf.push( + node.data.replace(/[<&>]/g, _xmlEncoder) + ); + case CDATA_SECTION_NODE: + return buf.push(""); + case COMMENT_NODE: + return buf.push(""); + case DOCUMENT_TYPE_NODE: + var pubid = node.publicId; + var sysid = node.systemId; + buf.push(""); + } else if (sysid && sysid != ".") { + buf.push(" SYSTEM ", sysid, ">"); + } else { + var sub = node.internalSubset; + if (sub) { + buf.push(" [", sub, "]"); + } + buf.push(">"); + } + return; + case PROCESSING_INSTRUCTION_NODE: + return buf.push(""); + case ENTITY_REFERENCE_NODE: + return buf.push("&", node.nodeName, ";"); + default: + buf.push("??", node.nodeName); + } + } + function importNode(doc, node, deep) { + var node2; + switch (node.nodeType) { + case ELEMENT_NODE: + node2 = node.cloneNode(false); + node2.ownerDocument = doc; + case DOCUMENT_FRAGMENT_NODE: + break; + case ATTRIBUTE_NODE: + deep = true; + break; + } + if (!node2) { + node2 = node.cloneNode(false); + } + node2.ownerDocument = doc; + node2.parentNode = null; + if (deep) { + var child = node.firstChild; + while (child) { + node2.appendChild(importNode(doc, child, deep)); + child = child.nextSibling; + } + } + return node2; + } + function cloneNode(doc, node, deep) { + var node2 = new node.constructor(); + for (var n in node) { + if (Object.prototype.hasOwnProperty.call(node, n)) { + var v = node[n]; + if (typeof v != "object") { + if (v != node2[n]) { + node2[n] = v; + } + } + } + } + if (node.childNodes) { + node2.childNodes = new NodeList(); + } + node2.ownerDocument = doc; + switch (node2.nodeType) { + case ELEMENT_NODE: + var attrs = node.attributes; + var attrs2 = node2.attributes = new NamedNodeMap(); + var len = attrs.length; + attrs2._ownerElement = node2; + for (var i = 0; i < len; i++) { + node2.setAttributeNode(cloneNode(doc, attrs.item(i), true)); + } + break; + ; + case ATTRIBUTE_NODE: + deep = true; + } + if (deep) { + var child = node.firstChild; + while (child) { + node2.appendChild(cloneNode(doc, child, deep)); + child = child.nextSibling; + } + } + return node2; + } + function __set__(object, key, value) { + object[key] = value; + } + try { + if (Object.defineProperty) { + let getTextContent2 = function(node) { + switch (node.nodeType) { + case ELEMENT_NODE: + case DOCUMENT_FRAGMENT_NODE: + var buf = []; + node = node.firstChild; + while (node) { + if (node.nodeType !== 7 && node.nodeType !== 8) { + buf.push(getTextContent2(node)); + } + node = node.nextSibling; + } + return buf.join(""); + default: + return node.nodeValue; + } + }; + getTextContent = getTextContent2; + Object.defineProperty(LiveNodeList.prototype, "length", { + get: function() { + _updateLiveList(this); + return this.$$length; + } + }); + Object.defineProperty(Node.prototype, "textContent", { + get: function() { + return getTextContent2(this); + }, + set: function(data) { + switch (this.nodeType) { + case ELEMENT_NODE: + case DOCUMENT_FRAGMENT_NODE: + while (this.firstChild) { + this.removeChild(this.firstChild); + } + if (data || String(data)) { + this.appendChild(this.ownerDocument.createTextNode(data)); + } + break; + default: + this.data = data; + this.value = data; + this.nodeValue = data; + } + } + }); + __set__ = function(object, key, value) { + object["$$" + key] = value; + }; + } + } catch (e) { + } + var getTextContent; + exports2.DocumentType = DocumentType; + exports2.DOMException = DOMException; + exports2.DOMImplementation = DOMImplementation; + exports2.Element = Element; + exports2.Node = Node; + exports2.NodeList = NodeList; + exports2.XMLSerializer = XMLSerializer; + } +}); + +// ../../node_modules/@xmldom/xmldom/lib/entities.js +var require_entities = __commonJS({ + "../../node_modules/@xmldom/xmldom/lib/entities.js"(exports2) { + "use strict"; + var freeze = require_conventions().freeze; + exports2.XML_ENTITIES = freeze({ + amp: "&", + apos: "'", + gt: ">", + lt: "<", + quot: '"' + }); + exports2.HTML_ENTITIES = freeze({ + Aacute: "\xC1", + aacute: "\xE1", + Abreve: "\u0102", + abreve: "\u0103", + ac: "\u223E", + acd: "\u223F", + acE: "\u223E\u0333", + Acirc: "\xC2", + acirc: "\xE2", + acute: "\xB4", + Acy: "\u0410", + acy: "\u0430", + AElig: "\xC6", + aelig: "\xE6", + af: "\u2061", + Afr: "\u{1D504}", + afr: "\u{1D51E}", + Agrave: "\xC0", + agrave: "\xE0", + alefsym: "\u2135", + aleph: "\u2135", + Alpha: "\u0391", + alpha: "\u03B1", + Amacr: "\u0100", + amacr: "\u0101", + amalg: "\u2A3F", + AMP: "&", + amp: "&", + And: "\u2A53", + and: "\u2227", + andand: "\u2A55", + andd: "\u2A5C", + andslope: "\u2A58", + andv: "\u2A5A", + ang: "\u2220", + ange: "\u29A4", + angle: "\u2220", + angmsd: "\u2221", + angmsdaa: "\u29A8", + angmsdab: "\u29A9", + angmsdac: "\u29AA", + angmsdad: "\u29AB", + angmsdae: "\u29AC", + angmsdaf: "\u29AD", + angmsdag: "\u29AE", + angmsdah: "\u29AF", + angrt: "\u221F", + angrtvb: "\u22BE", + angrtvbd: "\u299D", + angsph: "\u2222", + angst: "\xC5", + angzarr: "\u237C", + Aogon: "\u0104", + aogon: "\u0105", + Aopf: "\u{1D538}", + aopf: "\u{1D552}", + ap: "\u2248", + apacir: "\u2A6F", + apE: "\u2A70", + ape: "\u224A", + apid: "\u224B", + apos: "'", + ApplyFunction: "\u2061", + approx: "\u2248", + approxeq: "\u224A", + Aring: "\xC5", + aring: "\xE5", + Ascr: "\u{1D49C}", + ascr: "\u{1D4B6}", + Assign: "\u2254", + ast: "*", + asymp: "\u2248", + asympeq: "\u224D", + Atilde: "\xC3", + atilde: "\xE3", + Auml: "\xC4", + auml: "\xE4", + awconint: "\u2233", + awint: "\u2A11", + backcong: "\u224C", + backepsilon: "\u03F6", + backprime: "\u2035", + backsim: "\u223D", + backsimeq: "\u22CD", + Backslash: "\u2216", + Barv: "\u2AE7", + barvee: "\u22BD", + Barwed: "\u2306", + barwed: "\u2305", + barwedge: "\u2305", + bbrk: "\u23B5", + bbrktbrk: "\u23B6", + bcong: "\u224C", + Bcy: "\u0411", + bcy: "\u0431", + bdquo: "\u201E", + becaus: "\u2235", + Because: "\u2235", + because: "\u2235", + bemptyv: "\u29B0", + bepsi: "\u03F6", + bernou: "\u212C", + Bernoullis: "\u212C", + Beta: "\u0392", + beta: "\u03B2", + beth: "\u2136", + between: "\u226C", + Bfr: "\u{1D505}", + bfr: "\u{1D51F}", + bigcap: "\u22C2", + bigcirc: "\u25EF", + bigcup: "\u22C3", + bigodot: "\u2A00", + bigoplus: "\u2A01", + bigotimes: "\u2A02", + bigsqcup: "\u2A06", + bigstar: "\u2605", + bigtriangledown: "\u25BD", + bigtriangleup: "\u25B3", + biguplus: "\u2A04", + bigvee: "\u22C1", + bigwedge: "\u22C0", + bkarow: "\u290D", + blacklozenge: "\u29EB", + blacksquare: "\u25AA", + blacktriangle: "\u25B4", + blacktriangledown: "\u25BE", + blacktriangleleft: "\u25C2", + blacktriangleright: "\u25B8", + blank: "\u2423", + blk12: "\u2592", + blk14: "\u2591", + blk34: "\u2593", + block: "\u2588", + bne: "=\u20E5", + bnequiv: "\u2261\u20E5", + bNot: "\u2AED", + bnot: "\u2310", + Bopf: "\u{1D539}", + bopf: "\u{1D553}", + bot: "\u22A5", + bottom: "\u22A5", + bowtie: "\u22C8", + boxbox: "\u29C9", + boxDL: "\u2557", + boxDl: "\u2556", + boxdL: "\u2555", + boxdl: "\u2510", + boxDR: "\u2554", + boxDr: "\u2553", + boxdR: "\u2552", + boxdr: "\u250C", + boxH: "\u2550", + boxh: "\u2500", + boxHD: "\u2566", + boxHd: "\u2564", + boxhD: "\u2565", + boxhd: "\u252C", + boxHU: "\u2569", + boxHu: "\u2567", + boxhU: "\u2568", + boxhu: "\u2534", + boxminus: "\u229F", + boxplus: "\u229E", + boxtimes: "\u22A0", + boxUL: "\u255D", + boxUl: "\u255C", + boxuL: "\u255B", + boxul: "\u2518", + boxUR: "\u255A", + boxUr: "\u2559", + boxuR: "\u2558", + boxur: "\u2514", + boxV: "\u2551", + boxv: "\u2502", + boxVH: "\u256C", + boxVh: "\u256B", + boxvH: "\u256A", + boxvh: "\u253C", + boxVL: "\u2563", + boxVl: "\u2562", + boxvL: "\u2561", + boxvl: "\u2524", + boxVR: "\u2560", + boxVr: "\u255F", + boxvR: "\u255E", + boxvr: "\u251C", + bprime: "\u2035", + Breve: "\u02D8", + breve: "\u02D8", + brvbar: "\xA6", + Bscr: "\u212C", + bscr: "\u{1D4B7}", + bsemi: "\u204F", + bsim: "\u223D", + bsime: "\u22CD", + bsol: "\\", + bsolb: "\u29C5", + bsolhsub: "\u27C8", + bull: "\u2022", + bullet: "\u2022", + bump: "\u224E", + bumpE: "\u2AAE", + bumpe: "\u224F", + Bumpeq: "\u224E", + bumpeq: "\u224F", + Cacute: "\u0106", + cacute: "\u0107", + Cap: "\u22D2", + cap: "\u2229", + capand: "\u2A44", + capbrcup: "\u2A49", + capcap: "\u2A4B", + capcup: "\u2A47", + capdot: "\u2A40", + CapitalDifferentialD: "\u2145", + caps: "\u2229\uFE00", + caret: "\u2041", + caron: "\u02C7", + Cayleys: "\u212D", + ccaps: "\u2A4D", + Ccaron: "\u010C", + ccaron: "\u010D", + Ccedil: "\xC7", + ccedil: "\xE7", + Ccirc: "\u0108", + ccirc: "\u0109", + Cconint: "\u2230", + ccups: "\u2A4C", + ccupssm: "\u2A50", + Cdot: "\u010A", + cdot: "\u010B", + cedil: "\xB8", + Cedilla: "\xB8", + cemptyv: "\u29B2", + cent: "\xA2", + CenterDot: "\xB7", + centerdot: "\xB7", + Cfr: "\u212D", + cfr: "\u{1D520}", + CHcy: "\u0427", + chcy: "\u0447", + check: "\u2713", + checkmark: "\u2713", + Chi: "\u03A7", + chi: "\u03C7", + cir: "\u25CB", + circ: "\u02C6", + circeq: "\u2257", + circlearrowleft: "\u21BA", + circlearrowright: "\u21BB", + circledast: "\u229B", + circledcirc: "\u229A", + circleddash: "\u229D", + CircleDot: "\u2299", + circledR: "\xAE", + circledS: "\u24C8", + CircleMinus: "\u2296", + CirclePlus: "\u2295", + CircleTimes: "\u2297", + cirE: "\u29C3", + cire: "\u2257", + cirfnint: "\u2A10", + cirmid: "\u2AEF", + cirscir: "\u29C2", + ClockwiseContourIntegral: "\u2232", + CloseCurlyDoubleQuote: "\u201D", + CloseCurlyQuote: "\u2019", + clubs: "\u2663", + clubsuit: "\u2663", + Colon: "\u2237", + colon: ":", + Colone: "\u2A74", + colone: "\u2254", + coloneq: "\u2254", + comma: ",", + commat: "@", + comp: "\u2201", + compfn: "\u2218", + complement: "\u2201", + complexes: "\u2102", + cong: "\u2245", + congdot: "\u2A6D", + Congruent: "\u2261", + Conint: "\u222F", + conint: "\u222E", + ContourIntegral: "\u222E", + Copf: "\u2102", + copf: "\u{1D554}", + coprod: "\u2210", + Coproduct: "\u2210", + COPY: "\xA9", + copy: "\xA9", + copysr: "\u2117", + CounterClockwiseContourIntegral: "\u2233", + crarr: "\u21B5", + Cross: "\u2A2F", + cross: "\u2717", + Cscr: "\u{1D49E}", + cscr: "\u{1D4B8}", + csub: "\u2ACF", + csube: "\u2AD1", + csup: "\u2AD0", + csupe: "\u2AD2", + ctdot: "\u22EF", + cudarrl: "\u2938", + cudarrr: "\u2935", + cuepr: "\u22DE", + cuesc: "\u22DF", + cularr: "\u21B6", + cularrp: "\u293D", + Cup: "\u22D3", + cup: "\u222A", + cupbrcap: "\u2A48", + CupCap: "\u224D", + cupcap: "\u2A46", + cupcup: "\u2A4A", + cupdot: "\u228D", + cupor: "\u2A45", + cups: "\u222A\uFE00", + curarr: "\u21B7", + curarrm: "\u293C", + curlyeqprec: "\u22DE", + curlyeqsucc: "\u22DF", + curlyvee: "\u22CE", + curlywedge: "\u22CF", + curren: "\xA4", + curvearrowleft: "\u21B6", + curvearrowright: "\u21B7", + cuvee: "\u22CE", + cuwed: "\u22CF", + cwconint: "\u2232", + cwint: "\u2231", + cylcty: "\u232D", + Dagger: "\u2021", + dagger: "\u2020", + daleth: "\u2138", + Darr: "\u21A1", + dArr: "\u21D3", + darr: "\u2193", + dash: "\u2010", + Dashv: "\u2AE4", + dashv: "\u22A3", + dbkarow: "\u290F", + dblac: "\u02DD", + Dcaron: "\u010E", + dcaron: "\u010F", + Dcy: "\u0414", + dcy: "\u0434", + DD: "\u2145", + dd: "\u2146", + ddagger: "\u2021", + ddarr: "\u21CA", + DDotrahd: "\u2911", + ddotseq: "\u2A77", + deg: "\xB0", + Del: "\u2207", + Delta: "\u0394", + delta: "\u03B4", + demptyv: "\u29B1", + dfisht: "\u297F", + Dfr: "\u{1D507}", + dfr: "\u{1D521}", + dHar: "\u2965", + dharl: "\u21C3", + dharr: "\u21C2", + DiacriticalAcute: "\xB4", + DiacriticalDot: "\u02D9", + DiacriticalDoubleAcute: "\u02DD", + DiacriticalGrave: "`", + DiacriticalTilde: "\u02DC", + diam: "\u22C4", + Diamond: "\u22C4", + diamond: "\u22C4", + diamondsuit: "\u2666", + diams: "\u2666", + die: "\xA8", + DifferentialD: "\u2146", + digamma: "\u03DD", + disin: "\u22F2", + div: "\xF7", + divide: "\xF7", + divideontimes: "\u22C7", + divonx: "\u22C7", + DJcy: "\u0402", + djcy: "\u0452", + dlcorn: "\u231E", + dlcrop: "\u230D", + dollar: "$", + Dopf: "\u{1D53B}", + dopf: "\u{1D555}", + Dot: "\xA8", + dot: "\u02D9", + DotDot: "\u20DC", + doteq: "\u2250", + doteqdot: "\u2251", + DotEqual: "\u2250", + dotminus: "\u2238", + dotplus: "\u2214", + dotsquare: "\u22A1", + doublebarwedge: "\u2306", + DoubleContourIntegral: "\u222F", + DoubleDot: "\xA8", + DoubleDownArrow: "\u21D3", + DoubleLeftArrow: "\u21D0", + DoubleLeftRightArrow: "\u21D4", + DoubleLeftTee: "\u2AE4", + DoubleLongLeftArrow: "\u27F8", + DoubleLongLeftRightArrow: "\u27FA", + DoubleLongRightArrow: "\u27F9", + DoubleRightArrow: "\u21D2", + DoubleRightTee: "\u22A8", + DoubleUpArrow: "\u21D1", + DoubleUpDownArrow: "\u21D5", + DoubleVerticalBar: "\u2225", + DownArrow: "\u2193", + Downarrow: "\u21D3", + downarrow: "\u2193", + DownArrowBar: "\u2913", + DownArrowUpArrow: "\u21F5", + DownBreve: "\u0311", + downdownarrows: "\u21CA", + downharpoonleft: "\u21C3", + downharpoonright: "\u21C2", + DownLeftRightVector: "\u2950", + DownLeftTeeVector: "\u295E", + DownLeftVector: "\u21BD", + DownLeftVectorBar: "\u2956", + DownRightTeeVector: "\u295F", + DownRightVector: "\u21C1", + DownRightVectorBar: "\u2957", + DownTee: "\u22A4", + DownTeeArrow: "\u21A7", + drbkarow: "\u2910", + drcorn: "\u231F", + drcrop: "\u230C", + Dscr: "\u{1D49F}", + dscr: "\u{1D4B9}", + DScy: "\u0405", + dscy: "\u0455", + dsol: "\u29F6", + Dstrok: "\u0110", + dstrok: "\u0111", + dtdot: "\u22F1", + dtri: "\u25BF", + dtrif: "\u25BE", + duarr: "\u21F5", + duhar: "\u296F", + dwangle: "\u29A6", + DZcy: "\u040F", + dzcy: "\u045F", + dzigrarr: "\u27FF", + Eacute: "\xC9", + eacute: "\xE9", + easter: "\u2A6E", + Ecaron: "\u011A", + ecaron: "\u011B", + ecir: "\u2256", + Ecirc: "\xCA", + ecirc: "\xEA", + ecolon: "\u2255", + Ecy: "\u042D", + ecy: "\u044D", + eDDot: "\u2A77", + Edot: "\u0116", + eDot: "\u2251", + edot: "\u0117", + ee: "\u2147", + efDot: "\u2252", + Efr: "\u{1D508}", + efr: "\u{1D522}", + eg: "\u2A9A", + Egrave: "\xC8", + egrave: "\xE8", + egs: "\u2A96", + egsdot: "\u2A98", + el: "\u2A99", + Element: "\u2208", + elinters: "\u23E7", + ell: "\u2113", + els: "\u2A95", + elsdot: "\u2A97", + Emacr: "\u0112", + emacr: "\u0113", + empty: "\u2205", + emptyset: "\u2205", + EmptySmallSquare: "\u25FB", + emptyv: "\u2205", + EmptyVerySmallSquare: "\u25AB", + emsp: "\u2003", + emsp13: "\u2004", + emsp14: "\u2005", + ENG: "\u014A", + eng: "\u014B", + ensp: "\u2002", + Eogon: "\u0118", + eogon: "\u0119", + Eopf: "\u{1D53C}", + eopf: "\u{1D556}", + epar: "\u22D5", + eparsl: "\u29E3", + eplus: "\u2A71", + epsi: "\u03B5", + Epsilon: "\u0395", + epsilon: "\u03B5", + epsiv: "\u03F5", + eqcirc: "\u2256", + eqcolon: "\u2255", + eqsim: "\u2242", + eqslantgtr: "\u2A96", + eqslantless: "\u2A95", + Equal: "\u2A75", + equals: "=", + EqualTilde: "\u2242", + equest: "\u225F", + Equilibrium: "\u21CC", + equiv: "\u2261", + equivDD: "\u2A78", + eqvparsl: "\u29E5", + erarr: "\u2971", + erDot: "\u2253", + Escr: "\u2130", + escr: "\u212F", + esdot: "\u2250", + Esim: "\u2A73", + esim: "\u2242", + Eta: "\u0397", + eta: "\u03B7", + ETH: "\xD0", + eth: "\xF0", + Euml: "\xCB", + euml: "\xEB", + euro: "\u20AC", + excl: "!", + exist: "\u2203", + Exists: "\u2203", + expectation: "\u2130", + ExponentialE: "\u2147", + exponentiale: "\u2147", + fallingdotseq: "\u2252", + Fcy: "\u0424", + fcy: "\u0444", + female: "\u2640", + ffilig: "\uFB03", + fflig: "\uFB00", + ffllig: "\uFB04", + Ffr: "\u{1D509}", + ffr: "\u{1D523}", + filig: "\uFB01", + FilledSmallSquare: "\u25FC", + FilledVerySmallSquare: "\u25AA", + fjlig: "fj", + flat: "\u266D", + fllig: "\uFB02", + fltns: "\u25B1", + fnof: "\u0192", + Fopf: "\u{1D53D}", + fopf: "\u{1D557}", + ForAll: "\u2200", + forall: "\u2200", + fork: "\u22D4", + forkv: "\u2AD9", + Fouriertrf: "\u2131", + fpartint: "\u2A0D", + frac12: "\xBD", + frac13: "\u2153", + frac14: "\xBC", + frac15: "\u2155", + frac16: "\u2159", + frac18: "\u215B", + frac23: "\u2154", + frac25: "\u2156", + frac34: "\xBE", + frac35: "\u2157", + frac38: "\u215C", + frac45: "\u2158", + frac56: "\u215A", + frac58: "\u215D", + frac78: "\u215E", + frasl: "\u2044", + frown: "\u2322", + Fscr: "\u2131", + fscr: "\u{1D4BB}", + gacute: "\u01F5", + Gamma: "\u0393", + gamma: "\u03B3", + Gammad: "\u03DC", + gammad: "\u03DD", + gap: "\u2A86", + Gbreve: "\u011E", + gbreve: "\u011F", + Gcedil: "\u0122", + Gcirc: "\u011C", + gcirc: "\u011D", + Gcy: "\u0413", + gcy: "\u0433", + Gdot: "\u0120", + gdot: "\u0121", + gE: "\u2267", + ge: "\u2265", + gEl: "\u2A8C", + gel: "\u22DB", + geq: "\u2265", + geqq: "\u2267", + geqslant: "\u2A7E", + ges: "\u2A7E", + gescc: "\u2AA9", + gesdot: "\u2A80", + gesdoto: "\u2A82", + gesdotol: "\u2A84", + gesl: "\u22DB\uFE00", + gesles: "\u2A94", + Gfr: "\u{1D50A}", + gfr: "\u{1D524}", + Gg: "\u22D9", + gg: "\u226B", + ggg: "\u22D9", + gimel: "\u2137", + GJcy: "\u0403", + gjcy: "\u0453", + gl: "\u2277", + gla: "\u2AA5", + glE: "\u2A92", + glj: "\u2AA4", + gnap: "\u2A8A", + gnapprox: "\u2A8A", + gnE: "\u2269", + gne: "\u2A88", + gneq: "\u2A88", + gneqq: "\u2269", + gnsim: "\u22E7", + Gopf: "\u{1D53E}", + gopf: "\u{1D558}", + grave: "`", + GreaterEqual: "\u2265", + GreaterEqualLess: "\u22DB", + GreaterFullEqual: "\u2267", + GreaterGreater: "\u2AA2", + GreaterLess: "\u2277", + GreaterSlantEqual: "\u2A7E", + GreaterTilde: "\u2273", + Gscr: "\u{1D4A2}", + gscr: "\u210A", + gsim: "\u2273", + gsime: "\u2A8E", + gsiml: "\u2A90", + Gt: "\u226B", + GT: ">", + gt: ">", + gtcc: "\u2AA7", + gtcir: "\u2A7A", + gtdot: "\u22D7", + gtlPar: "\u2995", + gtquest: "\u2A7C", + gtrapprox: "\u2A86", + gtrarr: "\u2978", + gtrdot: "\u22D7", + gtreqless: "\u22DB", + gtreqqless: "\u2A8C", + gtrless: "\u2277", + gtrsim: "\u2273", + gvertneqq: "\u2269\uFE00", + gvnE: "\u2269\uFE00", + Hacek: "\u02C7", + hairsp: "\u200A", + half: "\xBD", + hamilt: "\u210B", + HARDcy: "\u042A", + hardcy: "\u044A", + hArr: "\u21D4", + harr: "\u2194", + harrcir: "\u2948", + harrw: "\u21AD", + Hat: "^", + hbar: "\u210F", + Hcirc: "\u0124", + hcirc: "\u0125", + hearts: "\u2665", + heartsuit: "\u2665", + hellip: "\u2026", + hercon: "\u22B9", + Hfr: "\u210C", + hfr: "\u{1D525}", + HilbertSpace: "\u210B", + hksearow: "\u2925", + hkswarow: "\u2926", + hoarr: "\u21FF", + homtht: "\u223B", + hookleftarrow: "\u21A9", + hookrightarrow: "\u21AA", + Hopf: "\u210D", + hopf: "\u{1D559}", + horbar: "\u2015", + HorizontalLine: "\u2500", + Hscr: "\u210B", + hscr: "\u{1D4BD}", + hslash: "\u210F", + Hstrok: "\u0126", + hstrok: "\u0127", + HumpDownHump: "\u224E", + HumpEqual: "\u224F", + hybull: "\u2043", + hyphen: "\u2010", + Iacute: "\xCD", + iacute: "\xED", + ic: "\u2063", + Icirc: "\xCE", + icirc: "\xEE", + Icy: "\u0418", + icy: "\u0438", + Idot: "\u0130", + IEcy: "\u0415", + iecy: "\u0435", + iexcl: "\xA1", + iff: "\u21D4", + Ifr: "\u2111", + ifr: "\u{1D526}", + Igrave: "\xCC", + igrave: "\xEC", + ii: "\u2148", + iiiint: "\u2A0C", + iiint: "\u222D", + iinfin: "\u29DC", + iiota: "\u2129", + IJlig: "\u0132", + ijlig: "\u0133", + Im: "\u2111", + Imacr: "\u012A", + imacr: "\u012B", + image: "\u2111", + ImaginaryI: "\u2148", + imagline: "\u2110", + imagpart: "\u2111", + imath: "\u0131", + imof: "\u22B7", + imped: "\u01B5", + Implies: "\u21D2", + in: "\u2208", + incare: "\u2105", + infin: "\u221E", + infintie: "\u29DD", + inodot: "\u0131", + Int: "\u222C", + int: "\u222B", + intcal: "\u22BA", + integers: "\u2124", + Integral: "\u222B", + intercal: "\u22BA", + Intersection: "\u22C2", + intlarhk: "\u2A17", + intprod: "\u2A3C", + InvisibleComma: "\u2063", + InvisibleTimes: "\u2062", + IOcy: "\u0401", + iocy: "\u0451", + Iogon: "\u012E", + iogon: "\u012F", + Iopf: "\u{1D540}", + iopf: "\u{1D55A}", + Iota: "\u0399", + iota: "\u03B9", + iprod: "\u2A3C", + iquest: "\xBF", + Iscr: "\u2110", + iscr: "\u{1D4BE}", + isin: "\u2208", + isindot: "\u22F5", + isinE: "\u22F9", + isins: "\u22F4", + isinsv: "\u22F3", + isinv: "\u2208", + it: "\u2062", + Itilde: "\u0128", + itilde: "\u0129", + Iukcy: "\u0406", + iukcy: "\u0456", + Iuml: "\xCF", + iuml: "\xEF", + Jcirc: "\u0134", + jcirc: "\u0135", + Jcy: "\u0419", + jcy: "\u0439", + Jfr: "\u{1D50D}", + jfr: "\u{1D527}", + jmath: "\u0237", + Jopf: "\u{1D541}", + jopf: "\u{1D55B}", + Jscr: "\u{1D4A5}", + jscr: "\u{1D4BF}", + Jsercy: "\u0408", + jsercy: "\u0458", + Jukcy: "\u0404", + jukcy: "\u0454", + Kappa: "\u039A", + kappa: "\u03BA", + kappav: "\u03F0", + Kcedil: "\u0136", + kcedil: "\u0137", + Kcy: "\u041A", + kcy: "\u043A", + Kfr: "\u{1D50E}", + kfr: "\u{1D528}", + kgreen: "\u0138", + KHcy: "\u0425", + khcy: "\u0445", + KJcy: "\u040C", + kjcy: "\u045C", + Kopf: "\u{1D542}", + kopf: "\u{1D55C}", + Kscr: "\u{1D4A6}", + kscr: "\u{1D4C0}", + lAarr: "\u21DA", + Lacute: "\u0139", + lacute: "\u013A", + laemptyv: "\u29B4", + lagran: "\u2112", + Lambda: "\u039B", + lambda: "\u03BB", + Lang: "\u27EA", + lang: "\u27E8", + langd: "\u2991", + langle: "\u27E8", + lap: "\u2A85", + Laplacetrf: "\u2112", + laquo: "\xAB", + Larr: "\u219E", + lArr: "\u21D0", + larr: "\u2190", + larrb: "\u21E4", + larrbfs: "\u291F", + larrfs: "\u291D", + larrhk: "\u21A9", + larrlp: "\u21AB", + larrpl: "\u2939", + larrsim: "\u2973", + larrtl: "\u21A2", + lat: "\u2AAB", + lAtail: "\u291B", + latail: "\u2919", + late: "\u2AAD", + lates: "\u2AAD\uFE00", + lBarr: "\u290E", + lbarr: "\u290C", + lbbrk: "\u2772", + lbrace: "{", + lbrack: "[", + lbrke: "\u298B", + lbrksld: "\u298F", + lbrkslu: "\u298D", + Lcaron: "\u013D", + lcaron: "\u013E", + Lcedil: "\u013B", + lcedil: "\u013C", + lceil: "\u2308", + lcub: "{", + Lcy: "\u041B", + lcy: "\u043B", + ldca: "\u2936", + ldquo: "\u201C", + ldquor: "\u201E", + ldrdhar: "\u2967", + ldrushar: "\u294B", + ldsh: "\u21B2", + lE: "\u2266", + le: "\u2264", + LeftAngleBracket: "\u27E8", + LeftArrow: "\u2190", + Leftarrow: "\u21D0", + leftarrow: "\u2190", + LeftArrowBar: "\u21E4", + LeftArrowRightArrow: "\u21C6", + leftarrowtail: "\u21A2", + LeftCeiling: "\u2308", + LeftDoubleBracket: "\u27E6", + LeftDownTeeVector: "\u2961", + LeftDownVector: "\u21C3", + LeftDownVectorBar: "\u2959", + LeftFloor: "\u230A", + leftharpoondown: "\u21BD", + leftharpoonup: "\u21BC", + leftleftarrows: "\u21C7", + LeftRightArrow: "\u2194", + Leftrightarrow: "\u21D4", + leftrightarrow: "\u2194", + leftrightarrows: "\u21C6", + leftrightharpoons: "\u21CB", + leftrightsquigarrow: "\u21AD", + LeftRightVector: "\u294E", + LeftTee: "\u22A3", + LeftTeeArrow: "\u21A4", + LeftTeeVector: "\u295A", + leftthreetimes: "\u22CB", + LeftTriangle: "\u22B2", + LeftTriangleBar: "\u29CF", + LeftTriangleEqual: "\u22B4", + LeftUpDownVector: "\u2951", + LeftUpTeeVector: "\u2960", + LeftUpVector: "\u21BF", + LeftUpVectorBar: "\u2958", + LeftVector: "\u21BC", + LeftVectorBar: "\u2952", + lEg: "\u2A8B", + leg: "\u22DA", + leq: "\u2264", + leqq: "\u2266", + leqslant: "\u2A7D", + les: "\u2A7D", + lescc: "\u2AA8", + lesdot: "\u2A7F", + lesdoto: "\u2A81", + lesdotor: "\u2A83", + lesg: "\u22DA\uFE00", + lesges: "\u2A93", + lessapprox: "\u2A85", + lessdot: "\u22D6", + lesseqgtr: "\u22DA", + lesseqqgtr: "\u2A8B", + LessEqualGreater: "\u22DA", + LessFullEqual: "\u2266", + LessGreater: "\u2276", + lessgtr: "\u2276", + LessLess: "\u2AA1", + lesssim: "\u2272", + LessSlantEqual: "\u2A7D", + LessTilde: "\u2272", + lfisht: "\u297C", + lfloor: "\u230A", + Lfr: "\u{1D50F}", + lfr: "\u{1D529}", + lg: "\u2276", + lgE: "\u2A91", + lHar: "\u2962", + lhard: "\u21BD", + lharu: "\u21BC", + lharul: "\u296A", + lhblk: "\u2584", + LJcy: "\u0409", + ljcy: "\u0459", + Ll: "\u22D8", + ll: "\u226A", + llarr: "\u21C7", + llcorner: "\u231E", + Lleftarrow: "\u21DA", + llhard: "\u296B", + lltri: "\u25FA", + Lmidot: "\u013F", + lmidot: "\u0140", + lmoust: "\u23B0", + lmoustache: "\u23B0", + lnap: "\u2A89", + lnapprox: "\u2A89", + lnE: "\u2268", + lne: "\u2A87", + lneq: "\u2A87", + lneqq: "\u2268", + lnsim: "\u22E6", + loang: "\u27EC", + loarr: "\u21FD", + lobrk: "\u27E6", + LongLeftArrow: "\u27F5", + Longleftarrow: "\u27F8", + longleftarrow: "\u27F5", + LongLeftRightArrow: "\u27F7", + Longleftrightarrow: "\u27FA", + longleftrightarrow: "\u27F7", + longmapsto: "\u27FC", + LongRightArrow: "\u27F6", + Longrightarrow: "\u27F9", + longrightarrow: "\u27F6", + looparrowleft: "\u21AB", + looparrowright: "\u21AC", + lopar: "\u2985", + Lopf: "\u{1D543}", + lopf: "\u{1D55D}", + loplus: "\u2A2D", + lotimes: "\u2A34", + lowast: "\u2217", + lowbar: "_", + LowerLeftArrow: "\u2199", + LowerRightArrow: "\u2198", + loz: "\u25CA", + lozenge: "\u25CA", + lozf: "\u29EB", + lpar: "(", + lparlt: "\u2993", + lrarr: "\u21C6", + lrcorner: "\u231F", + lrhar: "\u21CB", + lrhard: "\u296D", + lrm: "\u200E", + lrtri: "\u22BF", + lsaquo: "\u2039", + Lscr: "\u2112", + lscr: "\u{1D4C1}", + Lsh: "\u21B0", + lsh: "\u21B0", + lsim: "\u2272", + lsime: "\u2A8D", + lsimg: "\u2A8F", + lsqb: "[", + lsquo: "\u2018", + lsquor: "\u201A", + Lstrok: "\u0141", + lstrok: "\u0142", + Lt: "\u226A", + LT: "<", + lt: "<", + ltcc: "\u2AA6", + ltcir: "\u2A79", + ltdot: "\u22D6", + lthree: "\u22CB", + ltimes: "\u22C9", + ltlarr: "\u2976", + ltquest: "\u2A7B", + ltri: "\u25C3", + ltrie: "\u22B4", + ltrif: "\u25C2", + ltrPar: "\u2996", + lurdshar: "\u294A", + luruhar: "\u2966", + lvertneqq: "\u2268\uFE00", + lvnE: "\u2268\uFE00", + macr: "\xAF", + male: "\u2642", + malt: "\u2720", + maltese: "\u2720", + Map: "\u2905", + map: "\u21A6", + mapsto: "\u21A6", + mapstodown: "\u21A7", + mapstoleft: "\u21A4", + mapstoup: "\u21A5", + marker: "\u25AE", + mcomma: "\u2A29", + Mcy: "\u041C", + mcy: "\u043C", + mdash: "\u2014", + mDDot: "\u223A", + measuredangle: "\u2221", + MediumSpace: "\u205F", + Mellintrf: "\u2133", + Mfr: "\u{1D510}", + mfr: "\u{1D52A}", + mho: "\u2127", + micro: "\xB5", + mid: "\u2223", + midast: "*", + midcir: "\u2AF0", + middot: "\xB7", + minus: "\u2212", + minusb: "\u229F", + minusd: "\u2238", + minusdu: "\u2A2A", + MinusPlus: "\u2213", + mlcp: "\u2ADB", + mldr: "\u2026", + mnplus: "\u2213", + models: "\u22A7", + Mopf: "\u{1D544}", + mopf: "\u{1D55E}", + mp: "\u2213", + Mscr: "\u2133", + mscr: "\u{1D4C2}", + mstpos: "\u223E", + Mu: "\u039C", + mu: "\u03BC", + multimap: "\u22B8", + mumap: "\u22B8", + nabla: "\u2207", + Nacute: "\u0143", + nacute: "\u0144", + nang: "\u2220\u20D2", + nap: "\u2249", + napE: "\u2A70\u0338", + napid: "\u224B\u0338", + napos: "\u0149", + napprox: "\u2249", + natur: "\u266E", + natural: "\u266E", + naturals: "\u2115", + nbsp: "\xA0", + nbump: "\u224E\u0338", + nbumpe: "\u224F\u0338", + ncap: "\u2A43", + Ncaron: "\u0147", + ncaron: "\u0148", + Ncedil: "\u0145", + ncedil: "\u0146", + ncong: "\u2247", + ncongdot: "\u2A6D\u0338", + ncup: "\u2A42", + Ncy: "\u041D", + ncy: "\u043D", + ndash: "\u2013", + ne: "\u2260", + nearhk: "\u2924", + neArr: "\u21D7", + nearr: "\u2197", + nearrow: "\u2197", + nedot: "\u2250\u0338", + NegativeMediumSpace: "\u200B", + NegativeThickSpace: "\u200B", + NegativeThinSpace: "\u200B", + NegativeVeryThinSpace: "\u200B", + nequiv: "\u2262", + nesear: "\u2928", + nesim: "\u2242\u0338", + NestedGreaterGreater: "\u226B", + NestedLessLess: "\u226A", + NewLine: "\n", + nexist: "\u2204", + nexists: "\u2204", + Nfr: "\u{1D511}", + nfr: "\u{1D52B}", + ngE: "\u2267\u0338", + nge: "\u2271", + ngeq: "\u2271", + ngeqq: "\u2267\u0338", + ngeqslant: "\u2A7E\u0338", + nges: "\u2A7E\u0338", + nGg: "\u22D9\u0338", + ngsim: "\u2275", + nGt: "\u226B\u20D2", + ngt: "\u226F", + ngtr: "\u226F", + nGtv: "\u226B\u0338", + nhArr: "\u21CE", + nharr: "\u21AE", + nhpar: "\u2AF2", + ni: "\u220B", + nis: "\u22FC", + nisd: "\u22FA", + niv: "\u220B", + NJcy: "\u040A", + njcy: "\u045A", + nlArr: "\u21CD", + nlarr: "\u219A", + nldr: "\u2025", + nlE: "\u2266\u0338", + nle: "\u2270", + nLeftarrow: "\u21CD", + nleftarrow: "\u219A", + nLeftrightarrow: "\u21CE", + nleftrightarrow: "\u21AE", + nleq: "\u2270", + nleqq: "\u2266\u0338", + nleqslant: "\u2A7D\u0338", + nles: "\u2A7D\u0338", + nless: "\u226E", + nLl: "\u22D8\u0338", + nlsim: "\u2274", + nLt: "\u226A\u20D2", + nlt: "\u226E", + nltri: "\u22EA", + nltrie: "\u22EC", + nLtv: "\u226A\u0338", + nmid: "\u2224", + NoBreak: "\u2060", + NonBreakingSpace: "\xA0", + Nopf: "\u2115", + nopf: "\u{1D55F}", + Not: "\u2AEC", + not: "\xAC", + NotCongruent: "\u2262", + NotCupCap: "\u226D", + NotDoubleVerticalBar: "\u2226", + NotElement: "\u2209", + NotEqual: "\u2260", + NotEqualTilde: "\u2242\u0338", + NotExists: "\u2204", + NotGreater: "\u226F", + NotGreaterEqual: "\u2271", + NotGreaterFullEqual: "\u2267\u0338", + NotGreaterGreater: "\u226B\u0338", + NotGreaterLess: "\u2279", + NotGreaterSlantEqual: "\u2A7E\u0338", + NotGreaterTilde: "\u2275", + NotHumpDownHump: "\u224E\u0338", + NotHumpEqual: "\u224F\u0338", + notin: "\u2209", + notindot: "\u22F5\u0338", + notinE: "\u22F9\u0338", + notinva: "\u2209", + notinvb: "\u22F7", + notinvc: "\u22F6", + NotLeftTriangle: "\u22EA", + NotLeftTriangleBar: "\u29CF\u0338", + NotLeftTriangleEqual: "\u22EC", + NotLess: "\u226E", + NotLessEqual: "\u2270", + NotLessGreater: "\u2278", + NotLessLess: "\u226A\u0338", + NotLessSlantEqual: "\u2A7D\u0338", + NotLessTilde: "\u2274", + NotNestedGreaterGreater: "\u2AA2\u0338", + NotNestedLessLess: "\u2AA1\u0338", + notni: "\u220C", + notniva: "\u220C", + notnivb: "\u22FE", + notnivc: "\u22FD", + NotPrecedes: "\u2280", + NotPrecedesEqual: "\u2AAF\u0338", + NotPrecedesSlantEqual: "\u22E0", + NotReverseElement: "\u220C", + NotRightTriangle: "\u22EB", + NotRightTriangleBar: "\u29D0\u0338", + NotRightTriangleEqual: "\u22ED", + NotSquareSubset: "\u228F\u0338", + NotSquareSubsetEqual: "\u22E2", + NotSquareSuperset: "\u2290\u0338", + NotSquareSupersetEqual: "\u22E3", + NotSubset: "\u2282\u20D2", + NotSubsetEqual: "\u2288", + NotSucceeds: "\u2281", + NotSucceedsEqual: "\u2AB0\u0338", + NotSucceedsSlantEqual: "\u22E1", + NotSucceedsTilde: "\u227F\u0338", + NotSuperset: "\u2283\u20D2", + NotSupersetEqual: "\u2289", + NotTilde: "\u2241", + NotTildeEqual: "\u2244", + NotTildeFullEqual: "\u2247", + NotTildeTilde: "\u2249", + NotVerticalBar: "\u2224", + npar: "\u2226", + nparallel: "\u2226", + nparsl: "\u2AFD\u20E5", + npart: "\u2202\u0338", + npolint: "\u2A14", + npr: "\u2280", + nprcue: "\u22E0", + npre: "\u2AAF\u0338", + nprec: "\u2280", + npreceq: "\u2AAF\u0338", + nrArr: "\u21CF", + nrarr: "\u219B", + nrarrc: "\u2933\u0338", + nrarrw: "\u219D\u0338", + nRightarrow: "\u21CF", + nrightarrow: "\u219B", + nrtri: "\u22EB", + nrtrie: "\u22ED", + nsc: "\u2281", + nsccue: "\u22E1", + nsce: "\u2AB0\u0338", + Nscr: "\u{1D4A9}", + nscr: "\u{1D4C3}", + nshortmid: "\u2224", + nshortparallel: "\u2226", + nsim: "\u2241", + nsime: "\u2244", + nsimeq: "\u2244", + nsmid: "\u2224", + nspar: "\u2226", + nsqsube: "\u22E2", + nsqsupe: "\u22E3", + nsub: "\u2284", + nsubE: "\u2AC5\u0338", + nsube: "\u2288", + nsubset: "\u2282\u20D2", + nsubseteq: "\u2288", + nsubseteqq: "\u2AC5\u0338", + nsucc: "\u2281", + nsucceq: "\u2AB0\u0338", + nsup: "\u2285", + nsupE: "\u2AC6\u0338", + nsupe: "\u2289", + nsupset: "\u2283\u20D2", + nsupseteq: "\u2289", + nsupseteqq: "\u2AC6\u0338", + ntgl: "\u2279", + Ntilde: "\xD1", + ntilde: "\xF1", + ntlg: "\u2278", + ntriangleleft: "\u22EA", + ntrianglelefteq: "\u22EC", + ntriangleright: "\u22EB", + ntrianglerighteq: "\u22ED", + Nu: "\u039D", + nu: "\u03BD", + num: "#", + numero: "\u2116", + numsp: "\u2007", + nvap: "\u224D\u20D2", + nVDash: "\u22AF", + nVdash: "\u22AE", + nvDash: "\u22AD", + nvdash: "\u22AC", + nvge: "\u2265\u20D2", + nvgt: ">\u20D2", + nvHarr: "\u2904", + nvinfin: "\u29DE", + nvlArr: "\u2902", + nvle: "\u2264\u20D2", + nvlt: "<\u20D2", + nvltrie: "\u22B4\u20D2", + nvrArr: "\u2903", + nvrtrie: "\u22B5\u20D2", + nvsim: "\u223C\u20D2", + nwarhk: "\u2923", + nwArr: "\u21D6", + nwarr: "\u2196", + nwarrow: "\u2196", + nwnear: "\u2927", + Oacute: "\xD3", + oacute: "\xF3", + oast: "\u229B", + ocir: "\u229A", + Ocirc: "\xD4", + ocirc: "\xF4", + Ocy: "\u041E", + ocy: "\u043E", + odash: "\u229D", + Odblac: "\u0150", + odblac: "\u0151", + odiv: "\u2A38", + odot: "\u2299", + odsold: "\u29BC", + OElig: "\u0152", + oelig: "\u0153", + ofcir: "\u29BF", + Ofr: "\u{1D512}", + ofr: "\u{1D52C}", + ogon: "\u02DB", + Ograve: "\xD2", + ograve: "\xF2", + ogt: "\u29C1", + ohbar: "\u29B5", + ohm: "\u03A9", + oint: "\u222E", + olarr: "\u21BA", + olcir: "\u29BE", + olcross: "\u29BB", + oline: "\u203E", + olt: "\u29C0", + Omacr: "\u014C", + omacr: "\u014D", + Omega: "\u03A9", + omega: "\u03C9", + Omicron: "\u039F", + omicron: "\u03BF", + omid: "\u29B6", + ominus: "\u2296", + Oopf: "\u{1D546}", + oopf: "\u{1D560}", + opar: "\u29B7", + OpenCurlyDoubleQuote: "\u201C", + OpenCurlyQuote: "\u2018", + operp: "\u29B9", + oplus: "\u2295", + Or: "\u2A54", + or: "\u2228", + orarr: "\u21BB", + ord: "\u2A5D", + order: "\u2134", + orderof: "\u2134", + ordf: "\xAA", + ordm: "\xBA", + origof: "\u22B6", + oror: "\u2A56", + orslope: "\u2A57", + orv: "\u2A5B", + oS: "\u24C8", + Oscr: "\u{1D4AA}", + oscr: "\u2134", + Oslash: "\xD8", + oslash: "\xF8", + osol: "\u2298", + Otilde: "\xD5", + otilde: "\xF5", + Otimes: "\u2A37", + otimes: "\u2297", + otimesas: "\u2A36", + Ouml: "\xD6", + ouml: "\xF6", + ovbar: "\u233D", + OverBar: "\u203E", + OverBrace: "\u23DE", + OverBracket: "\u23B4", + OverParenthesis: "\u23DC", + par: "\u2225", + para: "\xB6", + parallel: "\u2225", + parsim: "\u2AF3", + parsl: "\u2AFD", + part: "\u2202", + PartialD: "\u2202", + Pcy: "\u041F", + pcy: "\u043F", + percnt: "%", + period: ".", + permil: "\u2030", + perp: "\u22A5", + pertenk: "\u2031", + Pfr: "\u{1D513}", + pfr: "\u{1D52D}", + Phi: "\u03A6", + phi: "\u03C6", + phiv: "\u03D5", + phmmat: "\u2133", + phone: "\u260E", + Pi: "\u03A0", + pi: "\u03C0", + pitchfork: "\u22D4", + piv: "\u03D6", + planck: "\u210F", + planckh: "\u210E", + plankv: "\u210F", + plus: "+", + plusacir: "\u2A23", + plusb: "\u229E", + pluscir: "\u2A22", + plusdo: "\u2214", + plusdu: "\u2A25", + pluse: "\u2A72", + PlusMinus: "\xB1", + plusmn: "\xB1", + plussim: "\u2A26", + plustwo: "\u2A27", + pm: "\xB1", + Poincareplane: "\u210C", + pointint: "\u2A15", + Popf: "\u2119", + popf: "\u{1D561}", + pound: "\xA3", + Pr: "\u2ABB", + pr: "\u227A", + prap: "\u2AB7", + prcue: "\u227C", + prE: "\u2AB3", + pre: "\u2AAF", + prec: "\u227A", + precapprox: "\u2AB7", + preccurlyeq: "\u227C", + Precedes: "\u227A", + PrecedesEqual: "\u2AAF", + PrecedesSlantEqual: "\u227C", + PrecedesTilde: "\u227E", + preceq: "\u2AAF", + precnapprox: "\u2AB9", + precneqq: "\u2AB5", + precnsim: "\u22E8", + precsim: "\u227E", + Prime: "\u2033", + prime: "\u2032", + primes: "\u2119", + prnap: "\u2AB9", + prnE: "\u2AB5", + prnsim: "\u22E8", + prod: "\u220F", + Product: "\u220F", + profalar: "\u232E", + profline: "\u2312", + profsurf: "\u2313", + prop: "\u221D", + Proportion: "\u2237", + Proportional: "\u221D", + propto: "\u221D", + prsim: "\u227E", + prurel: "\u22B0", + Pscr: "\u{1D4AB}", + pscr: "\u{1D4C5}", + Psi: "\u03A8", + psi: "\u03C8", + puncsp: "\u2008", + Qfr: "\u{1D514}", + qfr: "\u{1D52E}", + qint: "\u2A0C", + Qopf: "\u211A", + qopf: "\u{1D562}", + qprime: "\u2057", + Qscr: "\u{1D4AC}", + qscr: "\u{1D4C6}", + quaternions: "\u210D", + quatint: "\u2A16", + quest: "?", + questeq: "\u225F", + QUOT: '"', + quot: '"', + rAarr: "\u21DB", + race: "\u223D\u0331", + Racute: "\u0154", + racute: "\u0155", + radic: "\u221A", + raemptyv: "\u29B3", + Rang: "\u27EB", + rang: "\u27E9", + rangd: "\u2992", + range: "\u29A5", + rangle: "\u27E9", + raquo: "\xBB", + Rarr: "\u21A0", + rArr: "\u21D2", + rarr: "\u2192", + rarrap: "\u2975", + rarrb: "\u21E5", + rarrbfs: "\u2920", + rarrc: "\u2933", + rarrfs: "\u291E", + rarrhk: "\u21AA", + rarrlp: "\u21AC", + rarrpl: "\u2945", + rarrsim: "\u2974", + Rarrtl: "\u2916", + rarrtl: "\u21A3", + rarrw: "\u219D", + rAtail: "\u291C", + ratail: "\u291A", + ratio: "\u2236", + rationals: "\u211A", + RBarr: "\u2910", + rBarr: "\u290F", + rbarr: "\u290D", + rbbrk: "\u2773", + rbrace: "}", + rbrack: "]", + rbrke: "\u298C", + rbrksld: "\u298E", + rbrkslu: "\u2990", + Rcaron: "\u0158", + rcaron: "\u0159", + Rcedil: "\u0156", + rcedil: "\u0157", + rceil: "\u2309", + rcub: "}", + Rcy: "\u0420", + rcy: "\u0440", + rdca: "\u2937", + rdldhar: "\u2969", + rdquo: "\u201D", + rdquor: "\u201D", + rdsh: "\u21B3", + Re: "\u211C", + real: "\u211C", + realine: "\u211B", + realpart: "\u211C", + reals: "\u211D", + rect: "\u25AD", + REG: "\xAE", + reg: "\xAE", + ReverseElement: "\u220B", + ReverseEquilibrium: "\u21CB", + ReverseUpEquilibrium: "\u296F", + rfisht: "\u297D", + rfloor: "\u230B", + Rfr: "\u211C", + rfr: "\u{1D52F}", + rHar: "\u2964", + rhard: "\u21C1", + rharu: "\u21C0", + rharul: "\u296C", + Rho: "\u03A1", + rho: "\u03C1", + rhov: "\u03F1", + RightAngleBracket: "\u27E9", + RightArrow: "\u2192", + Rightarrow: "\u21D2", + rightarrow: "\u2192", + RightArrowBar: "\u21E5", + RightArrowLeftArrow: "\u21C4", + rightarrowtail: "\u21A3", + RightCeiling: "\u2309", + RightDoubleBracket: "\u27E7", + RightDownTeeVector: "\u295D", + RightDownVector: "\u21C2", + RightDownVectorBar: "\u2955", + RightFloor: "\u230B", + rightharpoondown: "\u21C1", + rightharpoonup: "\u21C0", + rightleftarrows: "\u21C4", + rightleftharpoons: "\u21CC", + rightrightarrows: "\u21C9", + rightsquigarrow: "\u219D", + RightTee: "\u22A2", + RightTeeArrow: "\u21A6", + RightTeeVector: "\u295B", + rightthreetimes: "\u22CC", + RightTriangle: "\u22B3", + RightTriangleBar: "\u29D0", + RightTriangleEqual: "\u22B5", + RightUpDownVector: "\u294F", + RightUpTeeVector: "\u295C", + RightUpVector: "\u21BE", + RightUpVectorBar: "\u2954", + RightVector: "\u21C0", + RightVectorBar: "\u2953", + ring: "\u02DA", + risingdotseq: "\u2253", + rlarr: "\u21C4", + rlhar: "\u21CC", + rlm: "\u200F", + rmoust: "\u23B1", + rmoustache: "\u23B1", + rnmid: "\u2AEE", + roang: "\u27ED", + roarr: "\u21FE", + robrk: "\u27E7", + ropar: "\u2986", + Ropf: "\u211D", + ropf: "\u{1D563}", + roplus: "\u2A2E", + rotimes: "\u2A35", + RoundImplies: "\u2970", + rpar: ")", + rpargt: "\u2994", + rppolint: "\u2A12", + rrarr: "\u21C9", + Rrightarrow: "\u21DB", + rsaquo: "\u203A", + Rscr: "\u211B", + rscr: "\u{1D4C7}", + Rsh: "\u21B1", + rsh: "\u21B1", + rsqb: "]", + rsquo: "\u2019", + rsquor: "\u2019", + rthree: "\u22CC", + rtimes: "\u22CA", + rtri: "\u25B9", + rtrie: "\u22B5", + rtrif: "\u25B8", + rtriltri: "\u29CE", + RuleDelayed: "\u29F4", + ruluhar: "\u2968", + rx: "\u211E", + Sacute: "\u015A", + sacute: "\u015B", + sbquo: "\u201A", + Sc: "\u2ABC", + sc: "\u227B", + scap: "\u2AB8", + Scaron: "\u0160", + scaron: "\u0161", + sccue: "\u227D", + scE: "\u2AB4", + sce: "\u2AB0", + Scedil: "\u015E", + scedil: "\u015F", + Scirc: "\u015C", + scirc: "\u015D", + scnap: "\u2ABA", + scnE: "\u2AB6", + scnsim: "\u22E9", + scpolint: "\u2A13", + scsim: "\u227F", + Scy: "\u0421", + scy: "\u0441", + sdot: "\u22C5", + sdotb: "\u22A1", + sdote: "\u2A66", + searhk: "\u2925", + seArr: "\u21D8", + searr: "\u2198", + searrow: "\u2198", + sect: "\xA7", + semi: ";", + seswar: "\u2929", + setminus: "\u2216", + setmn: "\u2216", + sext: "\u2736", + Sfr: "\u{1D516}", + sfr: "\u{1D530}", + sfrown: "\u2322", + sharp: "\u266F", + SHCHcy: "\u0429", + shchcy: "\u0449", + SHcy: "\u0428", + shcy: "\u0448", + ShortDownArrow: "\u2193", + ShortLeftArrow: "\u2190", + shortmid: "\u2223", + shortparallel: "\u2225", + ShortRightArrow: "\u2192", + ShortUpArrow: "\u2191", + shy: "\xAD", + Sigma: "\u03A3", + sigma: "\u03C3", + sigmaf: "\u03C2", + sigmav: "\u03C2", + sim: "\u223C", + simdot: "\u2A6A", + sime: "\u2243", + simeq: "\u2243", + simg: "\u2A9E", + simgE: "\u2AA0", + siml: "\u2A9D", + simlE: "\u2A9F", + simne: "\u2246", + simplus: "\u2A24", + simrarr: "\u2972", + slarr: "\u2190", + SmallCircle: "\u2218", + smallsetminus: "\u2216", + smashp: "\u2A33", + smeparsl: "\u29E4", + smid: "\u2223", + smile: "\u2323", + smt: "\u2AAA", + smte: "\u2AAC", + smtes: "\u2AAC\uFE00", + SOFTcy: "\u042C", + softcy: "\u044C", + sol: "/", + solb: "\u29C4", + solbar: "\u233F", + Sopf: "\u{1D54A}", + sopf: "\u{1D564}", + spades: "\u2660", + spadesuit: "\u2660", + spar: "\u2225", + sqcap: "\u2293", + sqcaps: "\u2293\uFE00", + sqcup: "\u2294", + sqcups: "\u2294\uFE00", + Sqrt: "\u221A", + sqsub: "\u228F", + sqsube: "\u2291", + sqsubset: "\u228F", + sqsubseteq: "\u2291", + sqsup: "\u2290", + sqsupe: "\u2292", + sqsupset: "\u2290", + sqsupseteq: "\u2292", + squ: "\u25A1", + Square: "\u25A1", + square: "\u25A1", + SquareIntersection: "\u2293", + SquareSubset: "\u228F", + SquareSubsetEqual: "\u2291", + SquareSuperset: "\u2290", + SquareSupersetEqual: "\u2292", + SquareUnion: "\u2294", + squarf: "\u25AA", + squf: "\u25AA", + srarr: "\u2192", + Sscr: "\u{1D4AE}", + sscr: "\u{1D4C8}", + ssetmn: "\u2216", + ssmile: "\u2323", + sstarf: "\u22C6", + Star: "\u22C6", + star: "\u2606", + starf: "\u2605", + straightepsilon: "\u03F5", + straightphi: "\u03D5", + strns: "\xAF", + Sub: "\u22D0", + sub: "\u2282", + subdot: "\u2ABD", + subE: "\u2AC5", + sube: "\u2286", + subedot: "\u2AC3", + submult: "\u2AC1", + subnE: "\u2ACB", + subne: "\u228A", + subplus: "\u2ABF", + subrarr: "\u2979", + Subset: "\u22D0", + subset: "\u2282", + subseteq: "\u2286", + subseteqq: "\u2AC5", + SubsetEqual: "\u2286", + subsetneq: "\u228A", + subsetneqq: "\u2ACB", + subsim: "\u2AC7", + subsub: "\u2AD5", + subsup: "\u2AD3", + succ: "\u227B", + succapprox: "\u2AB8", + succcurlyeq: "\u227D", + Succeeds: "\u227B", + SucceedsEqual: "\u2AB0", + SucceedsSlantEqual: "\u227D", + SucceedsTilde: "\u227F", + succeq: "\u2AB0", + succnapprox: "\u2ABA", + succneqq: "\u2AB6", + succnsim: "\u22E9", + succsim: "\u227F", + SuchThat: "\u220B", + Sum: "\u2211", + sum: "\u2211", + sung: "\u266A", + Sup: "\u22D1", + sup: "\u2283", + sup1: "\xB9", + sup2: "\xB2", + sup3: "\xB3", + supdot: "\u2ABE", + supdsub: "\u2AD8", + supE: "\u2AC6", + supe: "\u2287", + supedot: "\u2AC4", + Superset: "\u2283", + SupersetEqual: "\u2287", + suphsol: "\u27C9", + suphsub: "\u2AD7", + suplarr: "\u297B", + supmult: "\u2AC2", + supnE: "\u2ACC", + supne: "\u228B", + supplus: "\u2AC0", + Supset: "\u22D1", + supset: "\u2283", + supseteq: "\u2287", + supseteqq: "\u2AC6", + supsetneq: "\u228B", + supsetneqq: "\u2ACC", + supsim: "\u2AC8", + supsub: "\u2AD4", + supsup: "\u2AD6", + swarhk: "\u2926", + swArr: "\u21D9", + swarr: "\u2199", + swarrow: "\u2199", + swnwar: "\u292A", + szlig: "\xDF", + Tab: " ", + target: "\u2316", + Tau: "\u03A4", + tau: "\u03C4", + tbrk: "\u23B4", + Tcaron: "\u0164", + tcaron: "\u0165", + Tcedil: "\u0162", + tcedil: "\u0163", + Tcy: "\u0422", + tcy: "\u0442", + tdot: "\u20DB", + telrec: "\u2315", + Tfr: "\u{1D517}", + tfr: "\u{1D531}", + there4: "\u2234", + Therefore: "\u2234", + therefore: "\u2234", + Theta: "\u0398", + theta: "\u03B8", + thetasym: "\u03D1", + thetav: "\u03D1", + thickapprox: "\u2248", + thicksim: "\u223C", + ThickSpace: "\u205F\u200A", + thinsp: "\u2009", + ThinSpace: "\u2009", + thkap: "\u2248", + thksim: "\u223C", + THORN: "\xDE", + thorn: "\xFE", + Tilde: "\u223C", + tilde: "\u02DC", + TildeEqual: "\u2243", + TildeFullEqual: "\u2245", + TildeTilde: "\u2248", + times: "\xD7", + timesb: "\u22A0", + timesbar: "\u2A31", + timesd: "\u2A30", + tint: "\u222D", + toea: "\u2928", + top: "\u22A4", + topbot: "\u2336", + topcir: "\u2AF1", + Topf: "\u{1D54B}", + topf: "\u{1D565}", + topfork: "\u2ADA", + tosa: "\u2929", + tprime: "\u2034", + TRADE: "\u2122", + trade: "\u2122", + triangle: "\u25B5", + triangledown: "\u25BF", + triangleleft: "\u25C3", + trianglelefteq: "\u22B4", + triangleq: "\u225C", + triangleright: "\u25B9", + trianglerighteq: "\u22B5", + tridot: "\u25EC", + trie: "\u225C", + triminus: "\u2A3A", + TripleDot: "\u20DB", + triplus: "\u2A39", + trisb: "\u29CD", + tritime: "\u2A3B", + trpezium: "\u23E2", + Tscr: "\u{1D4AF}", + tscr: "\u{1D4C9}", + TScy: "\u0426", + tscy: "\u0446", + TSHcy: "\u040B", + tshcy: "\u045B", + Tstrok: "\u0166", + tstrok: "\u0167", + twixt: "\u226C", + twoheadleftarrow: "\u219E", + twoheadrightarrow: "\u21A0", + Uacute: "\xDA", + uacute: "\xFA", + Uarr: "\u219F", + uArr: "\u21D1", + uarr: "\u2191", + Uarrocir: "\u2949", + Ubrcy: "\u040E", + ubrcy: "\u045E", + Ubreve: "\u016C", + ubreve: "\u016D", + Ucirc: "\xDB", + ucirc: "\xFB", + Ucy: "\u0423", + ucy: "\u0443", + udarr: "\u21C5", + Udblac: "\u0170", + udblac: "\u0171", + udhar: "\u296E", + ufisht: "\u297E", + Ufr: "\u{1D518}", + ufr: "\u{1D532}", + Ugrave: "\xD9", + ugrave: "\xF9", + uHar: "\u2963", + uharl: "\u21BF", + uharr: "\u21BE", + uhblk: "\u2580", + ulcorn: "\u231C", + ulcorner: "\u231C", + ulcrop: "\u230F", + ultri: "\u25F8", + Umacr: "\u016A", + umacr: "\u016B", + uml: "\xA8", + UnderBar: "_", + UnderBrace: "\u23DF", + UnderBracket: "\u23B5", + UnderParenthesis: "\u23DD", + Union: "\u22C3", + UnionPlus: "\u228E", + Uogon: "\u0172", + uogon: "\u0173", + Uopf: "\u{1D54C}", + uopf: "\u{1D566}", + UpArrow: "\u2191", + Uparrow: "\u21D1", + uparrow: "\u2191", + UpArrowBar: "\u2912", + UpArrowDownArrow: "\u21C5", + UpDownArrow: "\u2195", + Updownarrow: "\u21D5", + updownarrow: "\u2195", + UpEquilibrium: "\u296E", + upharpoonleft: "\u21BF", + upharpoonright: "\u21BE", + uplus: "\u228E", + UpperLeftArrow: "\u2196", + UpperRightArrow: "\u2197", + Upsi: "\u03D2", + upsi: "\u03C5", + upsih: "\u03D2", + Upsilon: "\u03A5", + upsilon: "\u03C5", + UpTee: "\u22A5", + UpTeeArrow: "\u21A5", + upuparrows: "\u21C8", + urcorn: "\u231D", + urcorner: "\u231D", + urcrop: "\u230E", + Uring: "\u016E", + uring: "\u016F", + urtri: "\u25F9", + Uscr: "\u{1D4B0}", + uscr: "\u{1D4CA}", + utdot: "\u22F0", + Utilde: "\u0168", + utilde: "\u0169", + utri: "\u25B5", + utrif: "\u25B4", + uuarr: "\u21C8", + Uuml: "\xDC", + uuml: "\xFC", + uwangle: "\u29A7", + vangrt: "\u299C", + varepsilon: "\u03F5", + varkappa: "\u03F0", + varnothing: "\u2205", + varphi: "\u03D5", + varpi: "\u03D6", + varpropto: "\u221D", + vArr: "\u21D5", + varr: "\u2195", + varrho: "\u03F1", + varsigma: "\u03C2", + varsubsetneq: "\u228A\uFE00", + varsubsetneqq: "\u2ACB\uFE00", + varsupsetneq: "\u228B\uFE00", + varsupsetneqq: "\u2ACC\uFE00", + vartheta: "\u03D1", + vartriangleleft: "\u22B2", + vartriangleright: "\u22B3", + Vbar: "\u2AEB", + vBar: "\u2AE8", + vBarv: "\u2AE9", + Vcy: "\u0412", + vcy: "\u0432", + VDash: "\u22AB", + Vdash: "\u22A9", + vDash: "\u22A8", + vdash: "\u22A2", + Vdashl: "\u2AE6", + Vee: "\u22C1", + vee: "\u2228", + veebar: "\u22BB", + veeeq: "\u225A", + vellip: "\u22EE", + Verbar: "\u2016", + verbar: "|", + Vert: "\u2016", + vert: "|", + VerticalBar: "\u2223", + VerticalLine: "|", + VerticalSeparator: "\u2758", + VerticalTilde: "\u2240", + VeryThinSpace: "\u200A", + Vfr: "\u{1D519}", + vfr: "\u{1D533}", + vltri: "\u22B2", + vnsub: "\u2282\u20D2", + vnsup: "\u2283\u20D2", + Vopf: "\u{1D54D}", + vopf: "\u{1D567}", + vprop: "\u221D", + vrtri: "\u22B3", + Vscr: "\u{1D4B1}", + vscr: "\u{1D4CB}", + vsubnE: "\u2ACB\uFE00", + vsubne: "\u228A\uFE00", + vsupnE: "\u2ACC\uFE00", + vsupne: "\u228B\uFE00", + Vvdash: "\u22AA", + vzigzag: "\u299A", + Wcirc: "\u0174", + wcirc: "\u0175", + wedbar: "\u2A5F", + Wedge: "\u22C0", + wedge: "\u2227", + wedgeq: "\u2259", + weierp: "\u2118", + Wfr: "\u{1D51A}", + wfr: "\u{1D534}", + Wopf: "\u{1D54E}", + wopf: "\u{1D568}", + wp: "\u2118", + wr: "\u2240", + wreath: "\u2240", + Wscr: "\u{1D4B2}", + wscr: "\u{1D4CC}", + xcap: "\u22C2", + xcirc: "\u25EF", + xcup: "\u22C3", + xdtri: "\u25BD", + Xfr: "\u{1D51B}", + xfr: "\u{1D535}", + xhArr: "\u27FA", + xharr: "\u27F7", + Xi: "\u039E", + xi: "\u03BE", + xlArr: "\u27F8", + xlarr: "\u27F5", + xmap: "\u27FC", + xnis: "\u22FB", + xodot: "\u2A00", + Xopf: "\u{1D54F}", + xopf: "\u{1D569}", + xoplus: "\u2A01", + xotime: "\u2A02", + xrArr: "\u27F9", + xrarr: "\u27F6", + Xscr: "\u{1D4B3}", + xscr: "\u{1D4CD}", + xsqcup: "\u2A06", + xuplus: "\u2A04", + xutri: "\u25B3", + xvee: "\u22C1", + xwedge: "\u22C0", + Yacute: "\xDD", + yacute: "\xFD", + YAcy: "\u042F", + yacy: "\u044F", + Ycirc: "\u0176", + ycirc: "\u0177", + Ycy: "\u042B", + ycy: "\u044B", + yen: "\xA5", + Yfr: "\u{1D51C}", + yfr: "\u{1D536}", + YIcy: "\u0407", + yicy: "\u0457", + Yopf: "\u{1D550}", + yopf: "\u{1D56A}", + Yscr: "\u{1D4B4}", + yscr: "\u{1D4CE}", + YUcy: "\u042E", + yucy: "\u044E", + Yuml: "\u0178", + yuml: "\xFF", + Zacute: "\u0179", + zacute: "\u017A", + Zcaron: "\u017D", + zcaron: "\u017E", + Zcy: "\u0417", + zcy: "\u0437", + Zdot: "\u017B", + zdot: "\u017C", + zeetrf: "\u2128", + ZeroWidthSpace: "\u200B", + Zeta: "\u0396", + zeta: "\u03B6", + Zfr: "\u2128", + zfr: "\u{1D537}", + ZHcy: "\u0416", + zhcy: "\u0436", + zigrarr: "\u21DD", + Zopf: "\u2124", + zopf: "\u{1D56B}", + Zscr: "\u{1D4B5}", + zscr: "\u{1D4CF}", + zwj: "\u200D", + zwnj: "\u200C" + }); + exports2.entityMap = exports2.HTML_ENTITIES; + } +}); + +// ../../node_modules/@xmldom/xmldom/lib/sax.js +var require_sax = __commonJS({ + "../../node_modules/@xmldom/xmldom/lib/sax.js"(exports2) { + var NAMESPACE = require_conventions().NAMESPACE; + var nameStartChar = /[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/; + var nameChar = new RegExp("[\\-\\.0-9" + nameStartChar.source.slice(1, -1) + "\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"); + var tagNamePattern = new RegExp("^" + nameStartChar.source + nameChar.source + "*(?::" + nameStartChar.source + nameChar.source + "*)?$"); + var S_TAG = 0; + var S_ATTR = 1; + var S_ATTR_SPACE = 2; + var S_EQ = 3; + var S_ATTR_NOQUOT_VALUE = 4; + var S_ATTR_END = 5; + var S_TAG_SPACE = 6; + var S_TAG_CLOSE = 7; + function ParseError(message, locator) { + this.message = message; + this.locator = locator; + if (Error.captureStackTrace) Error.captureStackTrace(this, ParseError); + } + ParseError.prototype = new Error(); + ParseError.prototype.name = ParseError.name; + function XMLReader() { + } + XMLReader.prototype = { + parse: function(source, defaultNSMap, entityMap) { + var domBuilder = this.domBuilder; + domBuilder.startDocument(); + _copy(defaultNSMap, defaultNSMap = {}); + parse( + source, + defaultNSMap, + entityMap, + domBuilder, + this.errorHandler + ); + domBuilder.endDocument(); + } + }; + function parse(source, defaultNSMapCopy, entityMap, domBuilder, errorHandler) { + function fixedFromCharCode(code) { + if (code > 65535) { + code -= 65536; + var surrogate1 = 55296 + (code >> 10), surrogate2 = 56320 + (code & 1023); + return String.fromCharCode(surrogate1, surrogate2); + } else { + return String.fromCharCode(code); + } + } + function entityReplacer(a2) { + var k = a2.slice(1, -1); + if (Object.hasOwnProperty.call(entityMap, k)) { + return entityMap[k]; + } else if (k.charAt(0) === "#") { + return fixedFromCharCode(parseInt(k.substr(1).replace("x", "0x"))); + } else { + errorHandler.error("entity not found:" + a2); + return a2; + } + } + function appendText(end2) { + if (end2 > start) { + var xt = source.substring(start, end2).replace(/&#?\w+;/g, entityReplacer); + locator && position(start); + domBuilder.characters(xt, 0, end2 - start); + start = end2; + } + } + function position(p, m) { + while (p >= lineEnd && (m = linePattern.exec(source))) { + lineStart = m.index; + lineEnd = lineStart + m[0].length; + locator.lineNumber++; + } + locator.columnNumber = p - lineStart + 1; + } + var lineStart = 0; + var lineEnd = 0; + var linePattern = /.*(?:\r\n?|\n)|.*$/g; + var locator = domBuilder.locator; + var parseStack = [{ currentNSMap: defaultNSMapCopy }]; + var closeMap = {}; + var start = 0; + while (true) { + try { + var tagStart = source.indexOf("<", start); + if (tagStart < 0) { + if (!source.substr(start).match(/^\s*$/)) { + var doc = domBuilder.doc; + var text = doc.createTextNode(source.substr(start)); + doc.appendChild(text); + domBuilder.currentElement = text; + } + return; + } + if (tagStart > start) { + appendText(tagStart); + } + switch (source.charAt(tagStart + 1)) { + case "/": + var end = source.indexOf(">", tagStart + 3); + var tagName = source.substring(tagStart + 2, end).replace(/[ \t\n\r]+$/g, ""); + var config = parseStack.pop(); + if (end < 0) { + tagName = source.substring(tagStart + 2).replace(/[\s<].*/, ""); + errorHandler.error("end tag name: " + tagName + " is not complete:" + config.tagName); + end = tagStart + 1 + tagName.length; + } else if (tagName.match(/\s start) { + start = end; + } else { + appendText(Math.max(tagStart, start) + 1); + } + } + } + function copyLocator(f, t) { + t.lineNumber = f.lineNumber; + t.columnNumber = f.columnNumber; + return t; + } + function parseElementStartPart(source, start, el, currentNSMap, entityReplacer, errorHandler) { + function addAttribute(qname, value2, startIndex) { + if (el.attributeNames.hasOwnProperty(qname)) { + errorHandler.fatalError("Attribute " + qname + " redefined"); + } + el.addValue( + qname, + // @see https://www.w3.org/TR/xml/#AVNormalize + // since the xmldom sax parser does not "interpret" DTD the following is not implemented: + // - recursive replacement of (DTD) entity references + // - trimming and collapsing multiple spaces into a single one for attributes that are not of type CDATA + value2.replace(/[\t\n\r]/g, " ").replace(/&#?\w+;/g, entityReplacer), + startIndex + ); + } + var attrName; + var value; + var p = ++start; + var s = S_TAG; + while (true) { + var c = source.charAt(p); + switch (c) { + case "=": + if (s === S_ATTR) { + attrName = source.slice(start, p); + s = S_EQ; + } else if (s === S_ATTR_SPACE) { + s = S_EQ; + } else { + throw new Error("attribute equal must after attrName"); + } + break; + case "'": + case '"': + if (s === S_EQ || s === S_ATTR) { + if (s === S_ATTR) { + errorHandler.warning('attribute value must after "="'); + attrName = source.slice(start, p); + } + start = p + 1; + p = source.indexOf(c, start); + if (p > 0) { + value = source.slice(start, p); + addAttribute(attrName, value, start - 1); + s = S_ATTR_END; + } else { + throw new Error("attribute value no end '" + c + "' match"); + } + } else if (s == S_ATTR_NOQUOT_VALUE) { + value = source.slice(start, p); + addAttribute(attrName, value, start); + errorHandler.warning('attribute "' + attrName + '" missed start quot(' + c + ")!!"); + start = p + 1; + s = S_ATTR_END; + } else { + throw new Error('attribute value must after "="'); + } + break; + case "/": + switch (s) { + case S_TAG: + el.setTagName(source.slice(start, p)); + case S_ATTR_END: + case S_TAG_SPACE: + case S_TAG_CLOSE: + s = S_TAG_CLOSE; + el.closed = true; + case S_ATTR_NOQUOT_VALUE: + case S_ATTR: + break; + case S_ATTR_SPACE: + el.closed = true; + break; + default: + throw new Error("attribute invalid close char('/')"); + } + break; + case "": + errorHandler.error("unexpected end of input"); + if (s == S_TAG) { + el.setTagName(source.slice(start, p)); + } + return p; + case ">": + switch (s) { + case S_TAG: + el.setTagName(source.slice(start, p)); + case S_ATTR_END: + case S_TAG_SPACE: + case S_TAG_CLOSE: + break; + case S_ATTR_NOQUOT_VALUE: + case S_ATTR: + value = source.slice(start, p); + if (value.slice(-1) === "/") { + el.closed = true; + value = value.slice(0, -1); + } + case S_ATTR_SPACE: + if (s === S_ATTR_SPACE) { + value = attrName; + } + if (s == S_ATTR_NOQUOT_VALUE) { + errorHandler.warning('attribute "' + value + '" missed quot(")!'); + addAttribute(attrName, value, start); + } else { + if (!NAMESPACE.isHTML(currentNSMap[""]) || !value.match(/^(?:disabled|checked|selected)$/i)) { + errorHandler.warning('attribute "' + value + '" missed value!! "' + value + '" instead!!'); + } + addAttribute(value, value, start); + } + break; + case S_EQ: + throw new Error("attribute value missed!!"); + } + return p; + case "\x80": + c = " "; + default: + if (c <= " ") { + switch (s) { + case S_TAG: + el.setTagName(source.slice(start, p)); + s = S_TAG_SPACE; + break; + case S_ATTR: + attrName = source.slice(start, p); + s = S_ATTR_SPACE; + break; + case S_ATTR_NOQUOT_VALUE: + var value = source.slice(start, p); + errorHandler.warning('attribute "' + value + '" missed quot(")!!'); + addAttribute(attrName, value, start); + case S_ATTR_END: + s = S_TAG_SPACE; + break; + } + } else { + switch (s) { + case S_ATTR_SPACE: + var tagName = el.tagName; + if (!NAMESPACE.isHTML(currentNSMap[""]) || !attrName.match(/^(?:disabled|checked|selected)$/i)) { + errorHandler.warning('attribute "' + attrName + '" missed value!! "' + attrName + '" instead2!!'); + } + addAttribute(attrName, attrName, start); + start = p; + s = S_ATTR; + break; + case S_ATTR_END: + errorHandler.warning('attribute space is required"' + attrName + '"!!'); + case S_TAG_SPACE: + s = S_ATTR; + start = p; + break; + case S_EQ: + s = S_ATTR_NOQUOT_VALUE; + start = p; + break; + case S_TAG_CLOSE: + throw new Error("elements closed character '/' and '>' must be connected to"); + } + } + } + p++; + } + } + function appendElement(el, domBuilder, currentNSMap) { + var tagName = el.tagName; + var localNSMap = null; + var i = el.length; + while (i--) { + var a = el[i]; + var qName = a.qName; + var value = a.value; + var nsp = qName.indexOf(":"); + if (nsp > 0) { + var prefix = a.prefix = qName.slice(0, nsp); + var localName = qName.slice(nsp + 1); + var nsPrefix = prefix === "xmlns" && localName; + } else { + localName = qName; + prefix = null; + nsPrefix = qName === "xmlns" && ""; + } + a.localName = localName; + if (nsPrefix !== false) { + if (localNSMap == null) { + localNSMap = {}; + _copy(currentNSMap, currentNSMap = {}); + } + currentNSMap[nsPrefix] = localNSMap[nsPrefix] = value; + a.uri = NAMESPACE.XMLNS; + domBuilder.startPrefixMapping(nsPrefix, value); + } + } + var i = el.length; + while (i--) { + a = el[i]; + var prefix = a.prefix; + if (prefix) { + if (prefix === "xml") { + a.uri = NAMESPACE.XML; + } + if (prefix !== "xmlns") { + a.uri = currentNSMap[prefix || ""]; + } + } + } + var nsp = tagName.indexOf(":"); + if (nsp > 0) { + prefix = el.prefix = tagName.slice(0, nsp); + localName = el.localName = tagName.slice(nsp + 1); + } else { + prefix = null; + localName = el.localName = tagName; + } + var ns = el.uri = currentNSMap[prefix || ""]; + domBuilder.startElement(ns, localName, tagName, el); + if (el.closed) { + domBuilder.endElement(ns, localName, tagName); + if (localNSMap) { + for (prefix in localNSMap) { + if (Object.prototype.hasOwnProperty.call(localNSMap, prefix)) { + domBuilder.endPrefixMapping(prefix); + } + } + } + } else { + el.currentNSMap = currentNSMap; + el.localNSMap = localNSMap; + return true; + } + } + function parseHtmlSpecialContent(source, elStartEnd, tagName, entityReplacer, domBuilder) { + if (/^(?:script|textarea)$/i.test(tagName)) { + var elEndStart = source.indexOf("", elStartEnd); + var text = source.substring(elStartEnd + 1, elEndStart); + if (/[&<]/.test(text)) { + if (/^script$/i.test(tagName)) { + domBuilder.characters(text, 0, text.length); + return elEndStart; + } + text = text.replace(/&#?\w+;/g, entityReplacer); + domBuilder.characters(text, 0, text.length); + return elEndStart; + } + } + return elStartEnd + 1; + } + function fixSelfClosed(source, elStartEnd, tagName, closeMap) { + var pos = closeMap[tagName]; + if (pos == null) { + pos = source.lastIndexOf(""); + if (pos < elStartEnd) { + pos = source.lastIndexOf("", start + 4); + if (end > start) { + domBuilder.comment(source, start + 4, end - start - 4); + return end + 3; + } else { + errorHandler.error("Unclosed comment"); + return -1; + } + } else { + return -1; + } + default: + if (source.substr(start + 3, 6) == "CDATA[") { + var end = source.indexOf("]]>", start + 9); + domBuilder.startCDATA(); + domBuilder.characters(source, start + 9, end - start - 9); + domBuilder.endCDATA(); + return end + 3; + } + var matchs = split(source, start); + var len = matchs.length; + if (len > 1 && /!doctype/i.test(matchs[0][0])) { + var name2 = matchs[1][0]; + var pubid = false; + var sysid = false; + if (len > 3) { + if (/^public$/i.test(matchs[2][0])) { + pubid = matchs[3][0]; + sysid = len > 4 && matchs[4][0]; + } else if (/^system$/i.test(matchs[2][0])) { + sysid = matchs[3][0]; + } + } + var lastMatch = matchs[len - 1]; + domBuilder.startDTD(name2, pubid, sysid); + domBuilder.endDTD(); + return lastMatch.index + lastMatch[0].length; + } + } + return -1; + } + function parseInstruction(source, start, domBuilder) { + var end = source.indexOf("?>", start); + if (end) { + var match = source.substring(start, end).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/); + if (match) { + var len = match[0].length; + domBuilder.processingInstruction(match[1], match[2]); + return end + 2; + } else { + return -1; + } + } + return -1; + } + function ElementAttributes() { + this.attributeNames = {}; + } + ElementAttributes.prototype = { + setTagName: function(tagName) { + if (!tagNamePattern.test(tagName)) { + throw new Error("invalid tagName:" + tagName); + } + this.tagName = tagName; + }, + addValue: function(qName, value, offset) { + if (!tagNamePattern.test(qName)) { + throw new Error("invalid attribute:" + qName); + } + this.attributeNames[qName] = this.length; + this[this.length++] = { qName, value, offset }; + }, + length: 0, + getLocalName: function(i) { + return this[i].localName; + }, + getLocator: function(i) { + return this[i].locator; + }, + getQName: function(i) { + return this[i].qName; + }, + getURI: function(i) { + return this[i].uri; + }, + getValue: function(i) { + return this[i].value; + } + // ,getIndex:function(uri, localName)){ + // if(localName){ + // + // }else{ + // var qName = uri + // } + // }, + // getValue:function(){return this.getValue(this.getIndex.apply(this,arguments))}, + // getType:function(uri,localName){} + // getType:function(i){}, + }; + function split(source, start) { + var match; + var buf = []; + var reg = /'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g; + reg.lastIndex = start; + reg.exec(source); + while (match = reg.exec(source)) { + buf.push(match); + if (match[1]) return buf; + } + } + exports2.XMLReader = XMLReader; + exports2.ParseError = ParseError; + } +}); + +// ../../node_modules/@xmldom/xmldom/lib/dom-parser.js +var require_dom_parser = __commonJS({ + "../../node_modules/@xmldom/xmldom/lib/dom-parser.js"(exports2) { + var conventions = require_conventions(); + var dom = require_dom(); + var entities = require_entities(); + var sax = require_sax(); + var DOMImplementation = dom.DOMImplementation; + var NAMESPACE = conventions.NAMESPACE; + var ParseError = sax.ParseError; + var XMLReader = sax.XMLReader; + function normalizeLineEndings(input) { + return input.replace(/\r[\n\u0085]/g, "\n").replace(/[\r\u0085\u2028]/g, "\n"); + } + function DOMParser2(options) { + this.options = options || { locator: {} }; + } + DOMParser2.prototype.parseFromString = function(source, mimeType) { + var options = this.options; + var sax2 = new XMLReader(); + var domBuilder = options.domBuilder || new DOMHandler(); + var errorHandler = options.errorHandler; + var locator = options.locator; + var defaultNSMap = options.xmlns || {}; + var isHTML = /\/x?html?$/.test(mimeType); + var entityMap = isHTML ? entities.HTML_ENTITIES : entities.XML_ENTITIES; + if (locator) { + domBuilder.setDocumentLocator(locator); + } + sax2.errorHandler = buildErrorHandler(errorHandler, domBuilder, locator); + sax2.domBuilder = options.domBuilder || domBuilder; + if (isHTML) { + defaultNSMap[""] = NAMESPACE.HTML; + } + defaultNSMap.xml = defaultNSMap.xml || NAMESPACE.XML; + var normalize = options.normalizeLineEndings || normalizeLineEndings; + if (source && typeof source === "string") { + sax2.parse( + normalize(source), + defaultNSMap, + entityMap + ); + } else { + sax2.errorHandler.error("invalid doc source"); + } + return domBuilder.doc; + }; + function buildErrorHandler(errorImpl, domBuilder, locator) { + if (!errorImpl) { + if (domBuilder instanceof DOMHandler) { + return domBuilder; + } + errorImpl = domBuilder; + } + var errorHandler = {}; + var isCallback = errorImpl instanceof Function; + locator = locator || {}; + function build(key) { + var fn2 = errorImpl[key]; + if (!fn2 && isCallback) { + fn2 = errorImpl.length == 2 ? function(msg) { + errorImpl(key, msg); + } : errorImpl; + } + errorHandler[key] = fn2 && function(msg) { + fn2("[xmldom " + key + "] " + msg + _locator(locator)); + } || function() { + }; + } + build("warning"); + build("error"); + build("fatalError"); + return errorHandler; + } + function DOMHandler() { + this.cdata = false; + } + function position(locator, node) { + node.lineNumber = locator.lineNumber; + node.columnNumber = locator.columnNumber; + } + DOMHandler.prototype = { + startDocument: function() { + this.doc = new DOMImplementation().createDocument(null, null, null); + if (this.locator) { + this.doc.documentURI = this.locator.systemId; + } + }, + startElement: function(namespaceURI, localName, qName, attrs) { + var doc = this.doc; + var el = doc.createElementNS(namespaceURI, qName || localName); + var len = attrs.length; + appendElement(this, el); + this.currentElement = el; + this.locator && position(this.locator, el); + for (var i = 0; i < len; i++) { + var namespaceURI = attrs.getURI(i); + var value = attrs.getValue(i); + var qName = attrs.getQName(i); + var attr = doc.createAttributeNS(namespaceURI, qName); + this.locator && position(attrs.getLocator(i), attr); + attr.value = attr.nodeValue = value; + el.setAttributeNode(attr); + } + }, + endElement: function(namespaceURI, localName, qName) { + var current = this.currentElement; + var tagName = current.tagName; + this.currentElement = current.parentNode; + }, + startPrefixMapping: function(prefix, uri) { + }, + endPrefixMapping: function(prefix) { + }, + processingInstruction: function(target, data) { + var ins = this.doc.createProcessingInstruction(target, data); + this.locator && position(this.locator, ins); + appendElement(this, ins); + }, + ignorableWhitespace: function(ch, start, length) { + }, + characters: function(chars, start, length) { + chars = _toString.apply(this, arguments); + if (chars) { + if (this.cdata) { + var charNode = this.doc.createCDATASection(chars); + } else { + var charNode = this.doc.createTextNode(chars); + } + if (this.currentElement) { + this.currentElement.appendChild(charNode); + } else if (/^\s*$/.test(chars)) { + this.doc.appendChild(charNode); + } + this.locator && position(this.locator, charNode); + } + }, + skippedEntity: function(name2) { + }, + endDocument: function() { + this.doc.normalize(); + }, + setDocumentLocator: function(locator) { + if (this.locator = locator) { + locator.lineNumber = 0; + } + }, + //LexicalHandler + comment: function(chars, start, length) { + chars = _toString.apply(this, arguments); + var comm = this.doc.createComment(chars); + this.locator && position(this.locator, comm); + appendElement(this, comm); + }, + startCDATA: function() { + this.cdata = true; + }, + endCDATA: function() { + this.cdata = false; + }, + startDTD: function(name2, publicId, systemId) { + var impl = this.doc.implementation; + if (impl && impl.createDocumentType) { + var dt = impl.createDocumentType(name2, publicId, systemId); + this.locator && position(this.locator, dt); + appendElement(this, dt); + this.doc.doctype = dt; + } + }, + /** + * @see org.xml.sax.ErrorHandler + * @link http://www.saxproject.org/apidoc/org/xml/sax/ErrorHandler.html + */ + warning: function(error) { + console.warn("[xmldom warning] " + error, _locator(this.locator)); + }, + error: function(error) { + console.error("[xmldom error] " + error, _locator(this.locator)); + }, + fatalError: function(error) { + throw new ParseError(error, this.locator); + } + }; + function _locator(l) { + if (l) { + return "\n@" + (l.systemId || "") + "#[line:" + l.lineNumber + ",col:" + l.columnNumber + "]"; + } + } + function _toString(chars, start, length) { + if (typeof chars == "string") { + return chars.substr(start, length); + } else { + if (chars.length >= start + length || start) { + return new java.lang.String(chars, start, length) + ""; + } + return chars; + } + } + "endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g, function(key) { + DOMHandler.prototype[key] = function() { + return null; + }; + }); + function appendElement(hander, node) { + if (!hander.currentElement) { + hander.doc.appendChild(node); + } else { + hander.currentElement.appendChild(node); + } + } + exports2.__DOMHandler = DOMHandler; + exports2.normalizeLineEndings = normalizeLineEndings; + exports2.DOMParser = DOMParser2; + } +}); + +// ../../node_modules/@xmldom/xmldom/lib/index.js +var require_lib = __commonJS({ + "../../node_modules/@xmldom/xmldom/lib/index.js"(exports2) { + var dom = require_dom(); + exports2.DOMImplementation = dom.DOMImplementation; + exports2.XMLSerializer = dom.XMLSerializer; + exports2.DOMParser = require_dom_parser().DOMParser; + } +}); + +// ../../node_modules/xpath/xpath.js +var require_xpath = __commonJS({ + "../../node_modules/xpath/xpath.js"(exports2) { + var xpath2 = typeof exports2 === "undefined" ? {} : exports2; + (function(exports3) { + "use strict"; + var NAMESPACE_NODE_NODETYPE = "__namespace"; + var isNil = function(x) { + return x === null || x === void 0; + }; + var isValidNodeType = function(nodeType) { + return nodeType === NAMESPACE_NODE_NODETYPE || Number.isInteger(nodeType) && nodeType >= 1 && nodeType <= 11; + }; + var isNodeLike = function(value) { + return value && isValidNodeType(value.nodeType) && typeof value.nodeName === "string"; + }; + function curry(func) { + var slice = Array.prototype.slice, totalargs = func.length, partial = function(args, fn3) { + return function() { + return fn3.apply(this, args.concat(slice.call(arguments))); + }; + }, fn2 = function() { + var args = slice.call(arguments); + return args.length < totalargs ? partial(args, fn2) : func.apply(this, slice.apply(arguments, [0, totalargs])); + }; + return fn2; + } + var forEach = function(f, xs) { + for (var i = 0; i < xs.length; i += 1) { + f(xs[i], i, xs); + } + }; + var reduce = function(f, seed, xs) { + var acc = seed; + forEach(function(x, i) { + acc = f(acc, x, i); + }, xs); + return acc; + }; + var map = function(f, xs) { + var mapped = new Array(xs.length); + forEach(function(x, i) { + mapped[i] = f(x); + }, xs); + return mapped; + }; + var filter = function(f, xs) { + var filtered = []; + forEach(function(x, i) { + if (f(x, i)) { + filtered.push(x); + } + }, xs); + return filtered; + }; + var includes = function(values, value) { + for (var i = 0; i < values.length; i += 1) { + if (values[i] === value) { + return true; + } + } + return false; + }; + function always(value) { + return function() { + return value; + }; + } + function toString(x) { + return x.toString(); + } + var join = function(s, xs) { + return xs.join(s); + }; + var wrap = function(pref, suf, str) { + return pref + str + suf; + }; + var prototypeConcat = Array.prototype.concat; + var sortNodes = function(nodes, reverse) { + var ns = new XNodeSet(); + ns.addArray(nodes); + var sorted = ns.toArray(); + return reverse ? sorted.reverse() : sorted; + }; + var MAX_ARGUMENT_LENGTH = 32767; + function flatten(arr) { + var result = []; + for (var start = 0; start < arr.length; start += MAX_ARGUMENT_LENGTH) { + var chunk = arr.slice(start, start + MAX_ARGUMENT_LENGTH); + result = prototypeConcat.apply(result, chunk); + } + return result; + } + function assign(target, varArgs) { + var to = Object(target); + for (var index = 1; index < arguments.length; index++) { + var nextSource = arguments[index]; + if (nextSource != null) { + for (var nextKey in nextSource) { + if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) { + to[nextKey] = nextSource[nextKey]; + } + } + } + } + return to; + } + var NodeTypes = { + ELEMENT_NODE: 1, + ATTRIBUTE_NODE: 2, + TEXT_NODE: 3, + CDATA_SECTION_NODE: 4, + PROCESSING_INSTRUCTION_NODE: 7, + COMMENT_NODE: 8, + DOCUMENT_NODE: 9, + DOCUMENT_TYPE_NODE: 10, + DOCUMENT_FRAGMENT_NODE: 11, + NAMESPACE_NODE: NAMESPACE_NODE_NODETYPE + }; + XPathParser.prototype = new Object(); + XPathParser.prototype.constructor = XPathParser; + XPathParser.superclass = Object.prototype; + function XPathParser() { + this.init(); + } + XPathParser.prototype.init = function() { + this.reduceActions = []; + this.reduceActions[3] = function(rhs) { + return new OrOperation(rhs[0], rhs[2]); + }; + this.reduceActions[5] = function(rhs) { + return new AndOperation(rhs[0], rhs[2]); + }; + this.reduceActions[7] = function(rhs) { + return new EqualsOperation(rhs[0], rhs[2]); + }; + this.reduceActions[8] = function(rhs) { + return new NotEqualOperation(rhs[0], rhs[2]); + }; + this.reduceActions[10] = function(rhs) { + return new LessThanOperation(rhs[0], rhs[2]); + }; + this.reduceActions[11] = function(rhs) { + return new GreaterThanOperation(rhs[0], rhs[2]); + }; + this.reduceActions[12] = function(rhs) { + return new LessThanOrEqualOperation(rhs[0], rhs[2]); + }; + this.reduceActions[13] = function(rhs) { + return new GreaterThanOrEqualOperation(rhs[0], rhs[2]); + }; + this.reduceActions[15] = function(rhs) { + return new PlusOperation(rhs[0], rhs[2]); + }; + this.reduceActions[16] = function(rhs) { + return new MinusOperation(rhs[0], rhs[2]); + }; + this.reduceActions[18] = function(rhs) { + return new MultiplyOperation(rhs[0], rhs[2]); + }; + this.reduceActions[19] = function(rhs) { + return new DivOperation(rhs[0], rhs[2]); + }; + this.reduceActions[20] = function(rhs) { + return new ModOperation(rhs[0], rhs[2]); + }; + this.reduceActions[22] = function(rhs) { + return new UnaryMinusOperation(rhs[1]); + }; + this.reduceActions[24] = function(rhs) { + return new BarOperation(rhs[0], rhs[2]); + }; + this.reduceActions[25] = function(rhs) { + return new PathExpr(void 0, void 0, rhs[0]); + }; + this.reduceActions[27] = function(rhs) { + rhs[0].locationPath = rhs[2]; + return rhs[0]; + }; + this.reduceActions[28] = function(rhs) { + rhs[0].locationPath = rhs[2]; + rhs[0].locationPath.steps.unshift(new Step(Step.DESCENDANTORSELF, NodeTest.nodeTest, [])); + return rhs[0]; + }; + this.reduceActions[29] = function(rhs) { + return new PathExpr(rhs[0], [], void 0); + }; + this.reduceActions[30] = function(rhs) { + if (Utilities.instance_of(rhs[0], PathExpr)) { + if (rhs[0].filterPredicates == void 0) { + rhs[0].filterPredicates = []; + } + rhs[0].filterPredicates.push(rhs[1]); + return rhs[0]; + } else { + return new PathExpr(rhs[0], [rhs[1]], void 0); + } + }; + this.reduceActions[32] = function(rhs) { + return rhs[1]; + }; + this.reduceActions[33] = function(rhs) { + return new XString(rhs[0]); + }; + this.reduceActions[34] = function(rhs) { + return new XNumber(rhs[0]); + }; + this.reduceActions[36] = function(rhs) { + return new FunctionCall(rhs[0], []); + }; + this.reduceActions[37] = function(rhs) { + return new FunctionCall(rhs[0], rhs[2]); + }; + this.reduceActions[38] = function(rhs) { + return [rhs[0]]; + }; + this.reduceActions[39] = function(rhs) { + rhs[2].unshift(rhs[0]); + return rhs[2]; + }; + this.reduceActions[43] = function(rhs) { + return new LocationPath(true, []); + }; + this.reduceActions[44] = function(rhs) { + rhs[1].absolute = true; + return rhs[1]; + }; + this.reduceActions[46] = function(rhs) { + return new LocationPath(false, [rhs[0]]); + }; + this.reduceActions[47] = function(rhs) { + rhs[0].steps.push(rhs[2]); + return rhs[0]; + }; + this.reduceActions[49] = function(rhs) { + return new Step(rhs[0], rhs[1], []); + }; + this.reduceActions[50] = function(rhs) { + return new Step(Step.CHILD, rhs[0], []); + }; + this.reduceActions[51] = function(rhs) { + return new Step(rhs[0], rhs[1], rhs[2]); + }; + this.reduceActions[52] = function(rhs) { + return new Step(Step.CHILD, rhs[0], rhs[1]); + }; + this.reduceActions[54] = function(rhs) { + return [rhs[0]]; + }; + this.reduceActions[55] = function(rhs) { + rhs[1].unshift(rhs[0]); + return rhs[1]; + }; + this.reduceActions[56] = function(rhs) { + if (rhs[0] == "ancestor") { + return Step.ANCESTOR; + } else if (rhs[0] == "ancestor-or-self") { + return Step.ANCESTORORSELF; + } else if (rhs[0] == "attribute") { + return Step.ATTRIBUTE; + } else if (rhs[0] == "child") { + return Step.CHILD; + } else if (rhs[0] == "descendant") { + return Step.DESCENDANT; + } else if (rhs[0] == "descendant-or-self") { + return Step.DESCENDANTORSELF; + } else if (rhs[0] == "following") { + return Step.FOLLOWING; + } else if (rhs[0] == "following-sibling") { + return Step.FOLLOWINGSIBLING; + } else if (rhs[0] == "namespace") { + return Step.NAMESPACE; + } else if (rhs[0] == "parent") { + return Step.PARENT; + } else if (rhs[0] == "preceding") { + return Step.PRECEDING; + } else if (rhs[0] == "preceding-sibling") { + return Step.PRECEDINGSIBLING; + } else if (rhs[0] == "self") { + return Step.SELF; + } + return -1; + }; + this.reduceActions[57] = function(rhs) { + return Step.ATTRIBUTE; + }; + this.reduceActions[59] = function(rhs) { + if (rhs[0] == "comment") { + return NodeTest.commentTest; + } else if (rhs[0] == "text") { + return NodeTest.textTest; + } else if (rhs[0] == "processing-instruction") { + return NodeTest.anyPiTest; + } else if (rhs[0] == "node") { + return NodeTest.nodeTest; + } + return new NodeTest(-1, void 0); + }; + this.reduceActions[60] = function(rhs) { + return new NodeTest.PITest(rhs[2]); + }; + this.reduceActions[61] = function(rhs) { + return rhs[1]; + }; + this.reduceActions[63] = function(rhs) { + rhs[1].absolute = true; + rhs[1].steps.unshift(new Step(Step.DESCENDANTORSELF, NodeTest.nodeTest, [])); + return rhs[1]; + }; + this.reduceActions[64] = function(rhs) { + rhs[0].steps.push(new Step(Step.DESCENDANTORSELF, NodeTest.nodeTest, [])); + rhs[0].steps.push(rhs[2]); + return rhs[0]; + }; + this.reduceActions[65] = function(rhs) { + return new Step(Step.SELF, NodeTest.nodeTest, []); + }; + this.reduceActions[66] = function(rhs) { + return new Step(Step.PARENT, NodeTest.nodeTest, []); + }; + this.reduceActions[67] = function(rhs) { + return new VariableReference(rhs[1]); + }; + this.reduceActions[68] = function(rhs) { + return NodeTest.nameTestAny; + }; + this.reduceActions[69] = function(rhs) { + return new NodeTest.NameTestPrefixAny(rhs[0].split(":")[0]); + }; + this.reduceActions[70] = function(rhs) { + return new NodeTest.NameTestQName(rhs[0]); + }; + }; + XPathParser.actionTable = [ + " s s sssssssss s ss s ss", + " s ", + "r rrrrrrrrr rrrrrrr rr r ", + " rrrrr ", + " s s sssssssss s ss s ss", + "rs rrrrrrrr s sssssrrrrrr rrs rs ", + " s s sssssssss s ss s ss", + " s ", + " s ", + "r rrrrrrrrr rrrrrrr rr rr ", + "r rrrrrrrrr rrrrrrr rr rr ", + "r rrrrrrrrr rrrrrrr rr rr ", + "r rrrrrrrrr rrrrrrr rr rr ", + "r rrrrrrrrr rrrrrrr rr rr ", + " s ", + " s ", + " s s sssss s s ", + "r rrrrrrrrr rrrrrrr rr r ", + "a ", + "r s rr r ", + "r sr rr r ", + "r s rr s rr r ", + "r rssrr rss rr r ", + "r rrrrr rrrss rr r ", + "r rrrrrsss rrrrr rr r ", + "r rrrrrrrr rrrrr rr r ", + "r rrrrrrrr rrrrrs rr r ", + "r rrrrrrrr rrrrrr rr r ", + "r rrrrrrrr rrrrrr rr r ", + "r srrrrrrrr rrrrrrs rr sr ", + "r srrrrrrrr rrrrrrs rr r ", + "r rrrrrrrrr rrrrrrr rr rr ", + "r rrrrrrrrr rrrrrrr rr rr ", + "r rrrrrrrrr rrrrrrr rr rr ", + "r rrrrrrrr rrrrrr rr r ", + "r rrrrrrrr rrrrrr rr r ", + "r rrrrrrrrr rrrrrrr rr r ", + "r rrrrrrrrr rrrrrrr rr r ", + " sssss ", + "r rrrrrrrrr rrrrrrr rr sr ", + "r rrrrrrrrr rrrrrrr rr r ", + "r rrrrrrrrr rrrrrrr rr rr ", + "r rrrrrrrrr rrrrrrr rr rr ", + " s ", + "r srrrrrrrr rrrrrrs rr r ", + "r rrrrrrrr rrrrr rr r ", + " s ", + " s ", + " rrrrr ", + " s s sssssssss s sss s ss", + "r srrrrrrrr rrrrrrs rr r ", + " s s sssssssss s ss s ss", + " s s sssssssss s ss s ss", + " s s sssssssss s ss s ss", + " s s sssssssss s ss s ss", + " s s sssssssss s ss s ss", + " s s sssssssss s ss s ss", + " s s sssssssss s ss s ss", + " s s sssssssss s ss s ss", + " s s sssssssss s ss s ss", + " s s sssssssss s ss s ss", + " s s sssssssss s ss s ss", + " s s sssssssss s ss s ss", + " s s sssssssss s ss s ss", + " s s sssssssss ss s ss", + " s s sssssssss s ss s ss", + " s s sssss s s ", + " s s sssss s s ", + "r rrrrrrrrr rrrrrrr rr rr ", + " s s sssss s s ", + " s s sssss s s ", + "r rrrrrrrrr rrrrrrr rr sr ", + "r rrrrrrrrr rrrrrrr rr sr ", + "r rrrrrrrrr rrrrrrr rr r ", + "r rrrrrrrrr rrrrrrr rr rr ", + " s ", + "r rrrrrrrrr rrrrrrr rr rr ", + "r rrrrrrrrr rrrrrrr rr rr ", + " rr ", + " s ", + " rs ", + "r sr rr r ", + "r s rr s rr r ", + "r rssrr rss rr r ", + "r rssrr rss rr r ", + "r rrrrr rrrss rr r ", + "r rrrrr rrrss rr r ", + "r rrrrr rrrss rr r ", + "r rrrrr rrrss rr r ", + "r rrrrrsss rrrrr rr r ", + "r rrrrrsss rrrrr rr r ", + "r rrrrrrrr rrrrr rr r ", + "r rrrrrrrr rrrrr rr r ", + "r rrrrrrrr rrrrr rr r ", + "r rrrrrrrr rrrrrr rr r ", + " r ", + " s ", + "r srrrrrrrr rrrrrrs rr r ", + "r srrrrrrrr rrrrrrs rr r ", + "r rrrrrrrrr rrrrrrr rr r ", + "r rrrrrrrrr rrrrrrr rr r ", + "r rrrrrrrrr rrrrrrr rr r ", + "r rrrrrrrrr rrrrrrr rr r ", + "r rrrrrrrrr rrrrrrr rr rr ", + "r rrrrrrrrr rrrrrrr rr rr ", + " s s sssssssss s ss s ss", + "r rrrrrrrrr rrrrrrr rr rr ", + " r " + ]; + XPathParser.actionTableNumber = [ + ` 1 0 /.-,+*)(' & %$ # "!`, + " J ", + "a aaaaaaaaa aaaaaaa aa a ", + " YYYYY ", + ` 1 0 /.-,+*)(' & %$ # "!`, + `K1 KKKKKKKK . +*)('KKKKKK KK# K" `, + ` 1 0 /.-,+*)(' & %$ # "!`, + " N ", + " O ", + "e eeeeeeeee eeeeeee ee ee ", + "f fffffffff fffffff ff ff ", + "d ddddddddd ddddddd dd dd ", + "B BBBBBBBBB BBBBBBB BB BB ", + "A AAAAAAAAA AAAAAAA AA AA ", + " P ", + " Q ", + ` 1 . +*)(' # " `, + "b bbbbbbbbb bbbbbbb bb b ", + " ", + "! S !! ! ", + '" T" "" " ', + "$ V $$ U $$ $ ", + "& &ZY&& &XW && & ", + ") ))))) )))\\[ )) ) ", + ". ....._^] ..... .. . ", + "1 11111111 11111 11 1 ", + "5 55555555 55555` 55 5 ", + "7 77777777 777777 77 7 ", + "9 99999999 999999 99 9 ", + ": c:::::::: ::::::b :: a: ", + "I fIIIIIIII IIIIIIe II I ", + "= ========= ======= == == ", + "? ????????? ??????? ?? ?? ", + "C CCCCCCCCC CCCCCCC CC CC ", + "J JJJJJJJJ JJJJJJ JJ J ", + "M MMMMMMMM MMMMMM MM M ", + "N NNNNNNNNN NNNNNNN NN N ", + "P PPPPPPPPP PPPPPPP PP P ", + " +*)(' ", + "R RRRRRRRRR RRRRRRR RR aR ", + "U UUUUUUUUU UUUUUUU UU U ", + "Z ZZZZZZZZZ ZZZZZZZ ZZ ZZ ", + "c ccccccccc ccccccc cc cc ", + " j ", + "L fLLLLLLLL LLLLLLe LL L ", + "6 66666666 66666 66 6 ", + " k ", + " l ", + " XXXXX ", + ` 1 0 /.-,+*)(' & %$m # "!`, + "_ f________ ______e __ _ ", + ` 1 0 /.-,+*)(' & %$ # "!`, + ` 1 0 /.-,+*)(' & %$ # "!`, + ` 1 0 /.-,+*)(' & %$ # "!`, + ` 1 0 /.-,+*)(' & %$ # "!`, + ` 1 0 /.-,+*)(' & %$ # "!`, + ` 1 0 /.-,+*)(' & %$ # "!`, + ` 1 0 /.-,+*)(' & %$ # "!`, + ` 1 0 /.-,+*)(' & %$ # "!`, + ` 1 0 /.-,+*)(' & %$ # "!`, + ` 1 0 /.-,+*)(' & %$ # "!`, + ` 1 0 /.-,+*)(' & %$ # "!`, + ` 1 0 /.-,+*)(' & %$ # "!`, + ` 1 0 /.-,+*)(' & %$ # "!`, + ` 1 0 /.-,+*)(' %$ # "!`, + ` 1 0 /.-,+*)(' & %$ # "!`, + ` 1 . +*)(' # " `, + ` 1 . +*)(' # " `, + "> >>>>>>>>> >>>>>>> >> >> ", + ` 1 . +*)(' # " `, + ` 1 . +*)(' # " `, + "Q QQQQQQQQQ QQQQQQQ QQ aQ ", + "V VVVVVVVVV VVVVVVV VV aV ", + "T TTTTTTTTT TTTTTTT TT T ", + "@ @@@@@@@@@ @@@@@@@ @@ @@ ", + " \x87 ", + "[ [[[[[[[[[ [[[[[[[ [[ [[ ", + "D DDDDDDDDD DDDDDDD DD DD ", + " HH ", + " \x88 ", + " F\x89 ", + "# T# ## # ", + "% V %% U %% % ", + "' 'ZY'' 'XW '' ' ", + "( (ZY(( (XW (( ( ", + "+ +++++ +++\\[ ++ + ", + "* ***** ***\\[ ** * ", + "- ----- ---\\[ -- - ", + ", ,,,,, ,,,\\[ ,, , ", + "0 00000_^] 00000 00 0 ", + "/ /////_^] ///// // / ", + "2 22222222 22222 22 2 ", + "3 33333333 33333 33 3 ", + "4 44444444 44444 44 4 ", + "8 88888888 888888 88 8 ", + " ^ ", + " \x8A ", + "; f;;;;;;;; ;;;;;;e ;; ; ", + "< f<<<<<<<< <<<<<?@ AB CDEFGH IJ ", + " ", + " ", + " ", + "L456789:;<=>?@ AB CDEFGH IJ ", + " M EFGH IJ ", + " N;<=>?@ AB CDEFGH IJ ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " S EFGH IJ ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " e ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " h J ", + " i j ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + "o456789:;<=>?@ ABpqCDEFGH IJ ", + " ", + " r6789:;<=>?@ AB CDEFGH IJ ", + " s789:;<=>?@ AB CDEFGH IJ ", + " t89:;<=>?@ AB CDEFGH IJ ", + " u89:;<=>?@ AB CDEFGH IJ ", + " v9:;<=>?@ AB CDEFGH IJ ", + " w9:;<=>?@ AB CDEFGH IJ ", + " x9:;<=>?@ AB CDEFGH IJ ", + " y9:;<=>?@ AB CDEFGH IJ ", + " z:;<=>?@ AB CDEFGH IJ ", + " {:;<=>?@ AB CDEFGH IJ ", + " |;<=>?@ AB CDEFGH IJ ", + " };<=>?@ AB CDEFGH IJ ", + " ~;<=>?@ AB CDEFGH IJ ", + " \x7F=>?@ AB CDEFGH IJ ", + "\x80456789:;<=>?@ AB CDEFGH IJ\x81", + " \x82 EFGH IJ ", + " \x83 EFGH IJ ", + " ", + " \x84 GH IJ ", + " \x85 GH IJ ", + " i \x86 ", + " i \x87 ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + "o456789:;<=>?@ AB\x8CqCDEFGH IJ ", + " ", + " " + ]; + XPathParser.productions = [ + [1, 1, 2], + [2, 1, 3], + [3, 1, 4], + [3, 3, 3, -9, 4], + [4, 1, 5], + [4, 3, 4, -8, 5], + [5, 1, 6], + [5, 3, 5, -22, 6], + [5, 3, 5, -5, 6], + [6, 1, 7], + [6, 3, 6, -23, 7], + [6, 3, 6, -24, 7], + [6, 3, 6, -6, 7], + [6, 3, 6, -7, 7], + [7, 1, 8], + [7, 3, 7, -25, 8], + [7, 3, 7, -26, 8], + [8, 1, 9], + [8, 3, 8, -12, 9], + [8, 3, 8, -11, 9], + [8, 3, 8, -10, 9], + [9, 1, 10], + [9, 2, -26, 9], + [10, 1, 11], + [10, 3, 10, -27, 11], + [11, 1, 12], + [11, 1, 13], + [11, 3, 13, -28, 14], + [11, 3, 13, -4, 14], + [13, 1, 15], + [13, 2, 13, 16], + [15, 1, 17], + [15, 3, -29, 2, -30], + [15, 1, -15], + [15, 1, -16], + [15, 1, 18], + [18, 3, -13, -29, -30], + [18, 4, -13, -29, 19, -30], + [19, 1, 20], + [19, 3, 20, -31, 19], + [20, 1, 2], + [12, 1, 14], + [12, 1, 21], + [21, 1, -28], + [21, 2, -28, 14], + [21, 1, 22], + [14, 1, 23], + [14, 3, 14, -28, 23], + [14, 1, 24], + [23, 2, 25, 26], + [23, 1, 26], + [23, 3, 25, 26, 27], + [23, 2, 26, 27], + [23, 1, 28], + [27, 1, 16], + [27, 2, 16, 27], + [25, 2, -14, -3], + [25, 1, -32], + [26, 1, 29], + [26, 3, -20, -29, -30], + [26, 4, -21, -29, -15, -30], + [16, 3, -33, 30, -34], + [30, 1, 2], + [22, 2, -4, 14], + [24, 3, 14, -4, 23], + [28, 1, -35], + [28, 1, -2], + [17, 2, -36, -18], + [29, 1, -17], + [29, 1, -19], + [29, 1, -18] + ]; + XPathParser.DOUBLEDOT = 2; + XPathParser.DOUBLECOLON = 3; + XPathParser.DOUBLESLASH = 4; + XPathParser.NOTEQUAL = 5; + XPathParser.LESSTHANOREQUAL = 6; + XPathParser.GREATERTHANOREQUAL = 7; + XPathParser.AND = 8; + XPathParser.OR = 9; + XPathParser.MOD = 10; + XPathParser.DIV = 11; + XPathParser.MULTIPLYOPERATOR = 12; + XPathParser.FUNCTIONNAME = 13; + XPathParser.AXISNAME = 14; + XPathParser.LITERAL = 15; + XPathParser.NUMBER = 16; + XPathParser.ASTERISKNAMETEST = 17; + XPathParser.QNAME = 18; + XPathParser.NCNAMECOLONASTERISK = 19; + XPathParser.NODETYPE = 20; + XPathParser.PROCESSINGINSTRUCTIONWITHLITERAL = 21; + XPathParser.EQUALS = 22; + XPathParser.LESSTHAN = 23; + XPathParser.GREATERTHAN = 24; + XPathParser.PLUS = 25; + XPathParser.MINUS = 26; + XPathParser.BAR = 27; + XPathParser.SLASH = 28; + XPathParser.LEFTPARENTHESIS = 29; + XPathParser.RIGHTPARENTHESIS = 30; + XPathParser.COMMA = 31; + XPathParser.AT = 32; + XPathParser.LEFTBRACKET = 33; + XPathParser.RIGHTBRACKET = 34; + XPathParser.DOT = 35; + XPathParser.DOLLAR = 36; + XPathParser.prototype.tokenize = function(s1) { + var types = []; + var values = []; + var s = s1 + "\0"; + var pos = 0; + var c = s.charAt(pos++); + while (1) { + while (c == " " || c == " " || c == "\r" || c == "\n") { + c = s.charAt(pos++); + } + if (c == "\0" || pos >= s.length) { + break; + } + if (c == "(") { + types.push(XPathParser.LEFTPARENTHESIS); + values.push(c); + c = s.charAt(pos++); + continue; + } + if (c == ")") { + types.push(XPathParser.RIGHTPARENTHESIS); + values.push(c); + c = s.charAt(pos++); + continue; + } + if (c == "[") { + types.push(XPathParser.LEFTBRACKET); + values.push(c); + c = s.charAt(pos++); + continue; + } + if (c == "]") { + types.push(XPathParser.RIGHTBRACKET); + values.push(c); + c = s.charAt(pos++); + continue; + } + if (c == "@") { + types.push(XPathParser.AT); + values.push(c); + c = s.charAt(pos++); + continue; + } + if (c == ",") { + types.push(XPathParser.COMMA); + values.push(c); + c = s.charAt(pos++); + continue; + } + if (c == "|") { + types.push(XPathParser.BAR); + values.push(c); + c = s.charAt(pos++); + continue; + } + if (c == "+") { + types.push(XPathParser.PLUS); + values.push(c); + c = s.charAt(pos++); + continue; + } + if (c == "-") { + types.push(XPathParser.MINUS); + values.push(c); + c = s.charAt(pos++); + continue; + } + if (c == "=") { + types.push(XPathParser.EQUALS); + values.push(c); + c = s.charAt(pos++); + continue; + } + if (c == "$") { + types.push(XPathParser.DOLLAR); + values.push(c); + c = s.charAt(pos++); + continue; + } + if (c == ".") { + c = s.charAt(pos++); + if (c == ".") { + types.push(XPathParser.DOUBLEDOT); + values.push(".."); + c = s.charAt(pos++); + continue; + } + if (c >= "0" && c <= "9") { + var number = "." + c; + c = s.charAt(pos++); + while (c >= "0" && c <= "9") { + number += c; + c = s.charAt(pos++); + } + types.push(XPathParser.NUMBER); + values.push(number); + continue; + } + types.push(XPathParser.DOT); + values.push("."); + continue; + } + if (c == "'" || c == '"') { + var delimiter = c; + var literal = ""; + while (pos < s.length && (c = s.charAt(pos)) !== delimiter) { + literal += c; + pos += 1; + } + if (c !== delimiter) { + throw XPathException.fromMessage("Unterminated string literal: " + delimiter + literal); + } + pos += 1; + types.push(XPathParser.LITERAL); + values.push(literal); + c = s.charAt(pos++); + continue; + } + if (c >= "0" && c <= "9") { + var number = c; + c = s.charAt(pos++); + while (c >= "0" && c <= "9") { + number += c; + c = s.charAt(pos++); + } + if (c == ".") { + if (s.charAt(pos) >= "0" && s.charAt(pos) <= "9") { + number += c; + number += s.charAt(pos++); + c = s.charAt(pos++); + while (c >= "0" && c <= "9") { + number += c; + c = s.charAt(pos++); + } + } + } + types.push(XPathParser.NUMBER); + values.push(number); + continue; + } + if (c == "*") { + if (types.length > 0) { + var last = types[types.length - 1]; + if (last != XPathParser.AT && last != XPathParser.DOUBLECOLON && last != XPathParser.LEFTPARENTHESIS && last != XPathParser.LEFTBRACKET && last != XPathParser.AND && last != XPathParser.OR && last != XPathParser.MOD && last != XPathParser.DIV && last != XPathParser.MULTIPLYOPERATOR && last != XPathParser.SLASH && last != XPathParser.DOUBLESLASH && last != XPathParser.BAR && last != XPathParser.PLUS && last != XPathParser.MINUS && last != XPathParser.EQUALS && last != XPathParser.NOTEQUAL && last != XPathParser.LESSTHAN && last != XPathParser.LESSTHANOREQUAL && last != XPathParser.GREATERTHAN && last != XPathParser.GREATERTHANOREQUAL) { + types.push(XPathParser.MULTIPLYOPERATOR); + values.push(c); + c = s.charAt(pos++); + continue; + } + } + types.push(XPathParser.ASTERISKNAMETEST); + values.push(c); + c = s.charAt(pos++); + continue; + } + if (c == ":") { + if (s.charAt(pos) == ":") { + types.push(XPathParser.DOUBLECOLON); + values.push("::"); + pos++; + c = s.charAt(pos++); + continue; + } + } + if (c == "/") { + c = s.charAt(pos++); + if (c == "/") { + types.push(XPathParser.DOUBLESLASH); + values.push("//"); + c = s.charAt(pos++); + continue; + } + types.push(XPathParser.SLASH); + values.push("/"); + continue; + } + if (c == "!") { + if (s.charAt(pos) == "=") { + types.push(XPathParser.NOTEQUAL); + values.push("!="); + pos++; + c = s.charAt(pos++); + continue; + } + } + if (c == "<") { + if (s.charAt(pos) == "=") { + types.push(XPathParser.LESSTHANOREQUAL); + values.push("<="); + pos++; + c = s.charAt(pos++); + continue; + } + types.push(XPathParser.LESSTHAN); + values.push("<"); + c = s.charAt(pos++); + continue; + } + if (c == ">") { + if (s.charAt(pos) == "=") { + types.push(XPathParser.GREATERTHANOREQUAL); + values.push(">="); + pos++; + c = s.charAt(pos++); + continue; + } + types.push(XPathParser.GREATERTHAN); + values.push(">"); + c = s.charAt(pos++); + continue; + } + if (c == "_" || Utilities.isLetter(c.charCodeAt(0))) { + var name2 = c; + c = s.charAt(pos++); + while (Utilities.isNCNameChar(c.charCodeAt(0))) { + name2 += c; + c = s.charAt(pos++); + } + if (types.length > 0) { + var last = types[types.length - 1]; + if (last != XPathParser.AT && last != XPathParser.DOUBLECOLON && last != XPathParser.LEFTPARENTHESIS && last != XPathParser.LEFTBRACKET && last != XPathParser.AND && last != XPathParser.OR && last != XPathParser.MOD && last != XPathParser.DIV && last != XPathParser.MULTIPLYOPERATOR && last != XPathParser.SLASH && last != XPathParser.DOUBLESLASH && last != XPathParser.BAR && last != XPathParser.PLUS && last != XPathParser.MINUS && last != XPathParser.EQUALS && last != XPathParser.NOTEQUAL && last != XPathParser.LESSTHAN && last != XPathParser.LESSTHANOREQUAL && last != XPathParser.GREATERTHAN && last != XPathParser.GREATERTHANOREQUAL) { + if (name2 == "and") { + types.push(XPathParser.AND); + values.push(name2); + continue; + } + if (name2 == "or") { + types.push(XPathParser.OR); + values.push(name2); + continue; + } + if (name2 == "mod") { + types.push(XPathParser.MOD); + values.push(name2); + continue; + } + if (name2 == "div") { + types.push(XPathParser.DIV); + values.push(name2); + continue; + } + } + } + if (c == ":") { + if (s.charAt(pos) == "*") { + types.push(XPathParser.NCNAMECOLONASTERISK); + values.push(name2 + ":*"); + pos++; + c = s.charAt(pos++); + continue; + } + if (s.charAt(pos) == "_" || Utilities.isLetter(s.charCodeAt(pos))) { + name2 += ":"; + c = s.charAt(pos++); + while (Utilities.isNCNameChar(c.charCodeAt(0))) { + name2 += c; + c = s.charAt(pos++); + } + if (c == "(") { + types.push(XPathParser.FUNCTIONNAME); + values.push(name2); + continue; + } + types.push(XPathParser.QNAME); + values.push(name2); + continue; + } + if (s.charAt(pos) == ":") { + types.push(XPathParser.AXISNAME); + values.push(name2); + continue; + } + } + if (c == "(") { + if (name2 == "comment" || name2 == "text" || name2 == "node") { + types.push(XPathParser.NODETYPE); + values.push(name2); + continue; + } + if (name2 == "processing-instruction") { + if (s.charAt(pos) == ")") { + types.push(XPathParser.NODETYPE); + } else { + types.push(XPathParser.PROCESSINGINSTRUCTIONWITHLITERAL); + } + values.push(name2); + continue; + } + types.push(XPathParser.FUNCTIONNAME); + values.push(name2); + continue; + } + types.push(XPathParser.QNAME); + values.push(name2); + continue; + } + throw new Error("Unexpected character " + c); + } + types.push(1); + values.push("[EOF]"); + return [types, values]; + }; + XPathParser.SHIFT = "s"; + XPathParser.REDUCE = "r"; + XPathParser.ACCEPT = "a"; + XPathParser.prototype.parse = function(s) { + if (!s) { + throw new Error("XPath expression unspecified."); + } + if (typeof s !== "string") { + throw new Error("XPath expression must be a string."); + } + var types; + var values; + var res = this.tokenize(s); + if (res == void 0) { + return void 0; + } + types = res[0]; + values = res[1]; + var tokenPos = 0; + var state = []; + var tokenType = []; + var tokenValue = []; + var s; + var a; + var t; + state.push(0); + tokenType.push(1); + tokenValue.push("_S"); + a = types[tokenPos]; + t = values[tokenPos++]; + while (1) { + s = state[state.length - 1]; + switch (XPathParser.actionTable[s].charAt(a - 1)) { + case XPathParser.SHIFT: + tokenType.push(-a); + tokenValue.push(t); + state.push(XPathParser.actionTableNumber[s].charCodeAt(a - 1) - 32); + a = types[tokenPos]; + t = values[tokenPos++]; + break; + case XPathParser.REDUCE: + var num = XPathParser.productions[XPathParser.actionTableNumber[s].charCodeAt(a - 1) - 32][1]; + var rhs = []; + for (var i = 0; i < num; i++) { + tokenType.pop(); + rhs.unshift(tokenValue.pop()); + state.pop(); + } + var s_ = state[state.length - 1]; + tokenType.push(XPathParser.productions[XPathParser.actionTableNumber[s].charCodeAt(a - 1) - 32][0]); + if (this.reduceActions[XPathParser.actionTableNumber[s].charCodeAt(a - 1) - 32] == void 0) { + tokenValue.push(rhs[0]); + } else { + tokenValue.push(this.reduceActions[XPathParser.actionTableNumber[s].charCodeAt(a - 1) - 32](rhs)); + } + state.push(XPathParser.gotoTable[s_].charCodeAt(XPathParser.productions[XPathParser.actionTableNumber[s].charCodeAt(a - 1) - 32][0] - 2) - 33); + break; + case XPathParser.ACCEPT: + return new XPath(tokenValue.pop()); + default: + throw new Error("XPath parse error"); + } + } + }; + XPath.prototype = new Object(); + XPath.prototype.constructor = XPath; + XPath.superclass = Object.prototype; + function XPath(e) { + this.expression = e; + } + XPath.prototype.toString = function() { + return this.expression.toString(); + }; + function setIfUnset(obj, prop, value) { + if (!(prop in obj)) { + obj[prop] = value; + } + } + XPath.prototype.evaluate = function(c) { + var node = c.expressionContextNode; + if (!(isNil(node) || isNodeLike(node))) { + throw new Error("Context node does not appear to be a valid DOM node."); + } + c.contextNode = c.expressionContextNode; + c.contextSize = 1; + c.contextPosition = 1; + if (c.isHtml) { + setIfUnset(c, "caseInsensitive", true); + setIfUnset(c, "allowAnyNamespaceForNoPrefix", true); + } + setIfUnset(c, "caseInsensitive", false); + return this.expression.evaluate(c); + }; + XPath.XML_NAMESPACE_URI = "http://www.w3.org/XML/1998/namespace"; + XPath.XMLNS_NAMESPACE_URI = "http://www.w3.org/2000/xmlns/"; + Expression.prototype = new Object(); + Expression.prototype.constructor = Expression; + Expression.superclass = Object.prototype; + function Expression() { + } + Expression.prototype.init = function() { + }; + Expression.prototype.toString = function() { + return ""; + }; + Expression.prototype.evaluate = function(c) { + throw new Error("Could not evaluate expression."); + }; + UnaryOperation.prototype = new Expression(); + UnaryOperation.prototype.constructor = UnaryOperation; + UnaryOperation.superclass = Expression.prototype; + function UnaryOperation(rhs) { + if (arguments.length > 0) { + this.init(rhs); + } + } + UnaryOperation.prototype.init = function(rhs) { + this.rhs = rhs; + }; + UnaryMinusOperation.prototype = new UnaryOperation(); + UnaryMinusOperation.prototype.constructor = UnaryMinusOperation; + UnaryMinusOperation.superclass = UnaryOperation.prototype; + function UnaryMinusOperation(rhs) { + if (arguments.length > 0) { + this.init(rhs); + } + } + UnaryMinusOperation.prototype.init = function(rhs) { + UnaryMinusOperation.superclass.init.call(this, rhs); + }; + UnaryMinusOperation.prototype.evaluate = function(c) { + return this.rhs.evaluate(c).number().negate(); + }; + UnaryMinusOperation.prototype.toString = function() { + return "-" + this.rhs.toString(); + }; + BinaryOperation.prototype = new Expression(); + BinaryOperation.prototype.constructor = BinaryOperation; + BinaryOperation.superclass = Expression.prototype; + function BinaryOperation(lhs, rhs) { + if (arguments.length > 0) { + this.init(lhs, rhs); + } + } + BinaryOperation.prototype.init = function(lhs, rhs) { + this.lhs = lhs; + this.rhs = rhs; + }; + OrOperation.prototype = new BinaryOperation(); + OrOperation.prototype.constructor = OrOperation; + OrOperation.superclass = BinaryOperation.prototype; + function OrOperation(lhs, rhs) { + if (arguments.length > 0) { + this.init(lhs, rhs); + } + } + OrOperation.prototype.init = function(lhs, rhs) { + OrOperation.superclass.init.call(this, lhs, rhs); + }; + OrOperation.prototype.toString = function() { + return "(" + this.lhs.toString() + " or " + this.rhs.toString() + ")"; + }; + OrOperation.prototype.evaluate = function(c) { + var b = this.lhs.evaluate(c).bool(); + if (b.booleanValue()) { + return b; + } + return this.rhs.evaluate(c).bool(); + }; + AndOperation.prototype = new BinaryOperation(); + AndOperation.prototype.constructor = AndOperation; + AndOperation.superclass = BinaryOperation.prototype; + function AndOperation(lhs, rhs) { + if (arguments.length > 0) { + this.init(lhs, rhs); + } + } + AndOperation.prototype.init = function(lhs, rhs) { + AndOperation.superclass.init.call(this, lhs, rhs); + }; + AndOperation.prototype.toString = function() { + return "(" + this.lhs.toString() + " and " + this.rhs.toString() + ")"; + }; + AndOperation.prototype.evaluate = function(c) { + var b = this.lhs.evaluate(c).bool(); + if (!b.booleanValue()) { + return b; + } + return this.rhs.evaluate(c).bool(); + }; + EqualsOperation.prototype = new BinaryOperation(); + EqualsOperation.prototype.constructor = EqualsOperation; + EqualsOperation.superclass = BinaryOperation.prototype; + function EqualsOperation(lhs, rhs) { + if (arguments.length > 0) { + this.init(lhs, rhs); + } + } + EqualsOperation.prototype.init = function(lhs, rhs) { + EqualsOperation.superclass.init.call(this, lhs, rhs); + }; + EqualsOperation.prototype.toString = function() { + return "(" + this.lhs.toString() + " = " + this.rhs.toString() + ")"; + }; + EqualsOperation.prototype.evaluate = function(c) { + return this.lhs.evaluate(c).equals(this.rhs.evaluate(c)); + }; + NotEqualOperation.prototype = new BinaryOperation(); + NotEqualOperation.prototype.constructor = NotEqualOperation; + NotEqualOperation.superclass = BinaryOperation.prototype; + function NotEqualOperation(lhs, rhs) { + if (arguments.length > 0) { + this.init(lhs, rhs); + } + } + NotEqualOperation.prototype.init = function(lhs, rhs) { + NotEqualOperation.superclass.init.call(this, lhs, rhs); + }; + NotEqualOperation.prototype.toString = function() { + return "(" + this.lhs.toString() + " != " + this.rhs.toString() + ")"; + }; + NotEqualOperation.prototype.evaluate = function(c) { + return this.lhs.evaluate(c).notequal(this.rhs.evaluate(c)); + }; + LessThanOperation.prototype = new BinaryOperation(); + LessThanOperation.prototype.constructor = LessThanOperation; + LessThanOperation.superclass = BinaryOperation.prototype; + function LessThanOperation(lhs, rhs) { + if (arguments.length > 0) { + this.init(lhs, rhs); + } + } + LessThanOperation.prototype.init = function(lhs, rhs) { + LessThanOperation.superclass.init.call(this, lhs, rhs); + }; + LessThanOperation.prototype.evaluate = function(c) { + return this.lhs.evaluate(c).lessthan(this.rhs.evaluate(c)); + }; + LessThanOperation.prototype.toString = function() { + return "(" + this.lhs.toString() + " < " + this.rhs.toString() + ")"; + }; + GreaterThanOperation.prototype = new BinaryOperation(); + GreaterThanOperation.prototype.constructor = GreaterThanOperation; + GreaterThanOperation.superclass = BinaryOperation.prototype; + function GreaterThanOperation(lhs, rhs) { + if (arguments.length > 0) { + this.init(lhs, rhs); + } + } + GreaterThanOperation.prototype.init = function(lhs, rhs) { + GreaterThanOperation.superclass.init.call(this, lhs, rhs); + }; + GreaterThanOperation.prototype.evaluate = function(c) { + return this.lhs.evaluate(c).greaterthan(this.rhs.evaluate(c)); + }; + GreaterThanOperation.prototype.toString = function() { + return "(" + this.lhs.toString() + " > " + this.rhs.toString() + ")"; + }; + LessThanOrEqualOperation.prototype = new BinaryOperation(); + LessThanOrEqualOperation.prototype.constructor = LessThanOrEqualOperation; + LessThanOrEqualOperation.superclass = BinaryOperation.prototype; + function LessThanOrEqualOperation(lhs, rhs) { + if (arguments.length > 0) { + this.init(lhs, rhs); + } + } + LessThanOrEqualOperation.prototype.init = function(lhs, rhs) { + LessThanOrEqualOperation.superclass.init.call(this, lhs, rhs); + }; + LessThanOrEqualOperation.prototype.evaluate = function(c) { + return this.lhs.evaluate(c).lessthanorequal(this.rhs.evaluate(c)); + }; + LessThanOrEqualOperation.prototype.toString = function() { + return "(" + this.lhs.toString() + " <= " + this.rhs.toString() + ")"; + }; + GreaterThanOrEqualOperation.prototype = new BinaryOperation(); + GreaterThanOrEqualOperation.prototype.constructor = GreaterThanOrEqualOperation; + GreaterThanOrEqualOperation.superclass = BinaryOperation.prototype; + function GreaterThanOrEqualOperation(lhs, rhs) { + if (arguments.length > 0) { + this.init(lhs, rhs); + } + } + GreaterThanOrEqualOperation.prototype.init = function(lhs, rhs) { + GreaterThanOrEqualOperation.superclass.init.call(this, lhs, rhs); + }; + GreaterThanOrEqualOperation.prototype.evaluate = function(c) { + return this.lhs.evaluate(c).greaterthanorequal(this.rhs.evaluate(c)); + }; + GreaterThanOrEqualOperation.prototype.toString = function() { + return "(" + this.lhs.toString() + " >= " + this.rhs.toString() + ")"; + }; + PlusOperation.prototype = new BinaryOperation(); + PlusOperation.prototype.constructor = PlusOperation; + PlusOperation.superclass = BinaryOperation.prototype; + function PlusOperation(lhs, rhs) { + if (arguments.length > 0) { + this.init(lhs, rhs); + } + } + PlusOperation.prototype.init = function(lhs, rhs) { + PlusOperation.superclass.init.call(this, lhs, rhs); + }; + PlusOperation.prototype.evaluate = function(c) { + return this.lhs.evaluate(c).number().plus(this.rhs.evaluate(c).number()); + }; + PlusOperation.prototype.toString = function() { + return "(" + this.lhs.toString() + " + " + this.rhs.toString() + ")"; + }; + MinusOperation.prototype = new BinaryOperation(); + MinusOperation.prototype.constructor = MinusOperation; + MinusOperation.superclass = BinaryOperation.prototype; + function MinusOperation(lhs, rhs) { + if (arguments.length > 0) { + this.init(lhs, rhs); + } + } + MinusOperation.prototype.init = function(lhs, rhs) { + MinusOperation.superclass.init.call(this, lhs, rhs); + }; + MinusOperation.prototype.evaluate = function(c) { + return this.lhs.evaluate(c).number().minus(this.rhs.evaluate(c).number()); + }; + MinusOperation.prototype.toString = function() { + return "(" + this.lhs.toString() + " - " + this.rhs.toString() + ")"; + }; + MultiplyOperation.prototype = new BinaryOperation(); + MultiplyOperation.prototype.constructor = MultiplyOperation; + MultiplyOperation.superclass = BinaryOperation.prototype; + function MultiplyOperation(lhs, rhs) { + if (arguments.length > 0) { + this.init(lhs, rhs); + } + } + MultiplyOperation.prototype.init = function(lhs, rhs) { + MultiplyOperation.superclass.init.call(this, lhs, rhs); + }; + MultiplyOperation.prototype.evaluate = function(c) { + return this.lhs.evaluate(c).number().multiply(this.rhs.evaluate(c).number()); + }; + MultiplyOperation.prototype.toString = function() { + return "(" + this.lhs.toString() + " * " + this.rhs.toString() + ")"; + }; + DivOperation.prototype = new BinaryOperation(); + DivOperation.prototype.constructor = DivOperation; + DivOperation.superclass = BinaryOperation.prototype; + function DivOperation(lhs, rhs) { + if (arguments.length > 0) { + this.init(lhs, rhs); + } + } + DivOperation.prototype.init = function(lhs, rhs) { + DivOperation.superclass.init.call(this, lhs, rhs); + }; + DivOperation.prototype.evaluate = function(c) { + return this.lhs.evaluate(c).number().div(this.rhs.evaluate(c).number()); + }; + DivOperation.prototype.toString = function() { + return "(" + this.lhs.toString() + " div " + this.rhs.toString() + ")"; + }; + ModOperation.prototype = new BinaryOperation(); + ModOperation.prototype.constructor = ModOperation; + ModOperation.superclass = BinaryOperation.prototype; + function ModOperation(lhs, rhs) { + if (arguments.length > 0) { + this.init(lhs, rhs); + } + } + ModOperation.prototype.init = function(lhs, rhs) { + ModOperation.superclass.init.call(this, lhs, rhs); + }; + ModOperation.prototype.evaluate = function(c) { + return this.lhs.evaluate(c).number().mod(this.rhs.evaluate(c).number()); + }; + ModOperation.prototype.toString = function() { + return "(" + this.lhs.toString() + " mod " + this.rhs.toString() + ")"; + }; + BarOperation.prototype = new BinaryOperation(); + BarOperation.prototype.constructor = BarOperation; + BarOperation.superclass = BinaryOperation.prototype; + function BarOperation(lhs, rhs) { + if (arguments.length > 0) { + this.init(lhs, rhs); + } + } + BarOperation.prototype.init = function(lhs, rhs) { + BarOperation.superclass.init.call(this, lhs, rhs); + }; + BarOperation.prototype.evaluate = function(c) { + return this.lhs.evaluate(c).nodeset().union(this.rhs.evaluate(c).nodeset()); + }; + BarOperation.prototype.toString = function() { + return map(toString, [this.lhs, this.rhs]).join(" | "); + }; + PathExpr.prototype = new Expression(); + PathExpr.prototype.constructor = PathExpr; + PathExpr.superclass = Expression.prototype; + function PathExpr(filter2, filterPreds, locpath) { + if (arguments.length > 0) { + this.init(filter2, filterPreds, locpath); + } + } + PathExpr.prototype.init = function(filter2, filterPreds, locpath) { + PathExpr.superclass.init.call(this); + this.filter = filter2; + this.filterPredicates = filterPreds; + this.locationPath = locpath; + }; + function findRoot(node) { + while (node && node.parentNode) { + node = node.parentNode; + } + return node; + } + var applyPredicates = function(predicates, c, nodes, reverse) { + if (predicates.length === 0) { + return nodes; + } + var ctx = c.extend({}); + return reduce( + function(inNodes, pred) { + ctx.contextSize = inNodes.length; + return filter( + function(node, i) { + ctx.contextNode = node; + ctx.contextPosition = i + 1; + return PathExpr.predicateMatches(pred, ctx); + }, + inNodes + ); + }, + sortNodes(nodes, reverse), + predicates + ); + }; + PathExpr.getRoot = function(xpc, nodes) { + var firstNode = nodes[0]; + if (firstNode && firstNode.nodeType === NodeTypes.DOCUMENT_NODE) { + return firstNode; + } + if (xpc.virtualRoot) { + return xpc.virtualRoot; + } + if (!firstNode) { + throw new Error("Context node not found when determining document root."); + } + var ownerDoc = firstNode.ownerDocument; + if (ownerDoc) { + return ownerDoc; + } + var n = firstNode; + while (n.parentNode != null) { + n = n.parentNode; + } + return n; + }; + var getPrefixForNamespaceNode = function(attrNode) { + var nm = String(attrNode.name); + if (nm === "xmlns") { + return ""; + } + if (nm.substring(0, 6) === "xmlns:") { + return nm.substring(6, nm.length); + } + return null; + }; + PathExpr.applyStep = function(step, xpc, node) { + if (!node) { + throw new Error("Context node not found when evaluating XPath step: " + step); + } + var newNodes = []; + xpc.contextNode = node; + switch (step.axis) { + case Step.ANCESTOR: + if (xpc.contextNode === xpc.virtualRoot) { + break; + } + var m; + if (xpc.contextNode.nodeType == NodeTypes.ATTRIBUTE_NODE) { + m = PathExpr.getOwnerElement(xpc.contextNode); + } else { + m = xpc.contextNode.parentNode; + } + while (m != null) { + if (step.nodeTest.matches(m, xpc)) { + newNodes.push(m); + } + if (m === xpc.virtualRoot) { + break; + } + m = m.parentNode; + } + break; + case Step.ANCESTORORSELF: + for (var m = xpc.contextNode; m != null; m = m.nodeType == NodeTypes.ATTRIBUTE_NODE ? PathExpr.getOwnerElement(m) : m.parentNode) { + if (step.nodeTest.matches(m, xpc)) { + newNodes.push(m); + } + if (m === xpc.virtualRoot) { + break; + } + } + break; + case Step.ATTRIBUTE: + var nnm = xpc.contextNode.attributes; + if (nnm != null) { + for (var k = 0; k < nnm.length; k++) { + var m = nnm.item(k); + if (step.nodeTest.matches(m, xpc)) { + newNodes.push(m); + } + } + } + break; + case Step.CHILD: + for (var m = xpc.contextNode.firstChild; m != null; m = m.nextSibling) { + if (step.nodeTest.matches(m, xpc)) { + newNodes.push(m); + } + } + break; + case Step.DESCENDANT: + var st = [xpc.contextNode.firstChild]; + while (st.length > 0) { + for (var m = st.pop(); m != null; ) { + if (step.nodeTest.matches(m, xpc)) { + newNodes.push(m); + } + if (m.firstChild != null) { + st.push(m.nextSibling); + m = m.firstChild; + } else { + m = m.nextSibling; + } + } + } + break; + case Step.DESCENDANTORSELF: + if (step.nodeTest.matches(xpc.contextNode, xpc)) { + newNodes.push(xpc.contextNode); + } + var st = [xpc.contextNode.firstChild]; + while (st.length > 0) { + for (var m = st.pop(); m != null; ) { + if (step.nodeTest.matches(m, xpc)) { + newNodes.push(m); + } + if (m.firstChild != null) { + st.push(m.nextSibling); + m = m.firstChild; + } else { + m = m.nextSibling; + } + } + } + break; + case Step.FOLLOWING: + if (xpc.contextNode === xpc.virtualRoot) { + break; + } + var st = []; + if (xpc.contextNode.firstChild != null) { + st.unshift(xpc.contextNode.firstChild); + } else { + st.unshift(xpc.contextNode.nextSibling); + } + for (var m = xpc.contextNode.parentNode; m != null && m.nodeType != NodeTypes.DOCUMENT_NODE && m !== xpc.virtualRoot; m = m.parentNode) { + st.unshift(m.nextSibling); + } + do { + for (var m = st.pop(); m != null; ) { + if (step.nodeTest.matches(m, xpc)) { + newNodes.push(m); + } + if (m.firstChild != null) { + st.push(m.nextSibling); + m = m.firstChild; + } else { + m = m.nextSibling; + } + } + } while (st.length > 0); + break; + case Step.FOLLOWINGSIBLING: + if (xpc.contextNode === xpc.virtualRoot) { + break; + } + for (var m = xpc.contextNode.nextSibling; m != null; m = m.nextSibling) { + if (step.nodeTest.matches(m, xpc)) { + newNodes.push(m); + } + } + break; + case Step.NAMESPACE: + var nodes = {}; + if (xpc.contextNode.nodeType == NodeTypes.ELEMENT_NODE) { + nodes["xml"] = new XPathNamespace("xml", null, XPath.XML_NAMESPACE_URI, xpc.contextNode); + for (var m = xpc.contextNode; m != null && m.nodeType == NodeTypes.ELEMENT_NODE; m = m.parentNode) { + for (var k = 0; k < m.attributes.length; k++) { + var attr = m.attributes.item(k); + var pre = getPrefixForNamespaceNode(attr); + if (pre != null && nodes[pre] == void 0) { + nodes[pre] = new XPathNamespace(pre, attr, attr.value, xpc.contextNode); + } + } + } + for (var pre in nodes) { + var node = nodes[pre]; + if (step.nodeTest.matches(node, xpc)) { + newNodes.push(node); + } + } + } + break; + case Step.PARENT: + m = null; + if (xpc.contextNode !== xpc.virtualRoot) { + if (xpc.contextNode.nodeType == NodeTypes.ATTRIBUTE_NODE) { + m = PathExpr.getOwnerElement(xpc.contextNode); + } else { + m = xpc.contextNode.parentNode; + } + } + if (m != null && step.nodeTest.matches(m, xpc)) { + newNodes.push(m); + } + break; + case Step.PRECEDING: + var st; + if (xpc.virtualRoot != null) { + st = [xpc.virtualRoot]; + } else { + st = [findRoot(xpc.contextNode)]; + } + outer: while (st.length > 0) { + for (var m = st.pop(); m != null; ) { + if (m == xpc.contextNode) { + break outer; + } + if (step.nodeTest.matches(m, xpc)) { + newNodes.unshift(m); + } + if (m.firstChild != null) { + st.push(m.nextSibling); + m = m.firstChild; + } else { + m = m.nextSibling; + } + } + } + break; + case Step.PRECEDINGSIBLING: + if (xpc.contextNode === xpc.virtualRoot) { + break; + } + for (var m = xpc.contextNode.previousSibling; m != null; m = m.previousSibling) { + if (step.nodeTest.matches(m, xpc)) { + newNodes.push(m); + } + } + break; + case Step.SELF: + if (step.nodeTest.matches(xpc.contextNode, xpc)) { + newNodes.push(xpc.contextNode); + } + break; + default: + } + return newNodes; + }; + function applyStepWithPredicates(step, xpc, node) { + return applyPredicates( + step.predicates, + xpc, + PathExpr.applyStep(step, xpc, node), + includes(REVERSE_AXES, step.axis) + ); + } + function applyStepToNodes(context, nodes, step) { + return flatten( + map( + applyStepWithPredicates.bind(null, step, context), + nodes + ) + ); + } + PathExpr.applySteps = function(steps, xpc, nodes) { + return reduce( + applyStepToNodes.bind(null, xpc), + nodes, + steps + ); + }; + PathExpr.prototype.applyFilter = function(c, xpc) { + if (!this.filter) { + return { nodes: [c.contextNode] }; + } + var ns = this.filter.evaluate(c); + if (!Utilities.instance_of(ns, XNodeSet)) { + if (this.filterPredicates != null && this.filterPredicates.length > 0 || this.locationPath != null) { + throw new Error("Path expression filter must evaluate to a nodeset if predicates or location path are used"); + } + return { nonNodes: ns }; + } + return { + nodes: applyPredicates( + this.filterPredicates || [], + xpc, + ns.toUnsortedArray(), + false + // reverse + ) + }; + }; + PathExpr.applyLocationPath = function(locationPath, xpc, nodes) { + if (!locationPath) { + return nodes; + } + var startNodes = locationPath.absolute ? [PathExpr.getRoot(xpc, nodes)] : nodes; + return PathExpr.applySteps(locationPath.steps, xpc, startNodes); + }; + PathExpr.prototype.evaluate = function(c) { + var xpc = assign(new XPathContext(), c); + var filterResult = this.applyFilter(c, xpc); + if ("nonNodes" in filterResult) { + return filterResult.nonNodes; + } + var ns = new XNodeSet(); + ns.addArray(PathExpr.applyLocationPath(this.locationPath, xpc, filterResult.nodes)); + return ns; + }; + PathExpr.predicateMatches = function(pred, c) { + var res = pred.evaluate(c); + return Utilities.instance_of(res, XNumber) ? c.contextPosition === res.numberValue() : res.booleanValue(); + }; + PathExpr.predicateString = function(predicate) { + return wrap("[", "]", predicate.toString()); + }; + PathExpr.predicatesString = function(predicates) { + return join( + "", + map(PathExpr.predicateString, predicates) + ); + }; + PathExpr.prototype.toString = function() { + if (this.filter != void 0) { + var filterStr = toString(this.filter); + if (Utilities.instance_of(this.filter, XString)) { + return wrap("'", "'", filterStr); + } + if (this.filterPredicates != void 0 && this.filterPredicates.length) { + return wrap("(", ")", filterStr) + PathExpr.predicatesString(this.filterPredicates); + } + if (this.locationPath != void 0) { + return filterStr + (this.locationPath.absolute ? "" : "/") + toString(this.locationPath); + } + return filterStr; + } + return toString(this.locationPath); + }; + PathExpr.getOwnerElement = function(n) { + if (n.ownerElement) { + return n.ownerElement; + } + try { + if (n.selectSingleNode) { + return n.selectSingleNode(".."); + } + } catch (e) { + } + var doc = n.nodeType == NodeTypes.DOCUMENT_NODE ? n : n.ownerDocument; + var elts = doc.getElementsByTagName("*"); + for (var i = 0; i < elts.length; i++) { + var elt = elts.item(i); + var nnm = elt.attributes; + for (var j = 0; j < nnm.length; j++) { + var an = nnm.item(j); + if (an === n) { + return elt; + } + } + } + return null; + }; + LocationPath.prototype = new Object(); + LocationPath.prototype.constructor = LocationPath; + LocationPath.superclass = Object.prototype; + function LocationPath(abs, steps) { + if (arguments.length > 0) { + this.init(abs, steps); + } + } + LocationPath.prototype.init = function(abs, steps) { + this.absolute = abs; + this.steps = steps; + }; + LocationPath.prototype.toString = function() { + return (this.absolute ? "/" : "") + map(toString, this.steps).join("/"); + }; + Step.prototype = new Object(); + Step.prototype.constructor = Step; + Step.superclass = Object.prototype; + function Step(axis, nodetest, preds) { + if (arguments.length > 0) { + this.init(axis, nodetest, preds); + } + } + Step.prototype.init = function(axis, nodetest, preds) { + this.axis = axis; + this.nodeTest = nodetest; + this.predicates = preds; + }; + Step.prototype.toString = function() { + return Step.STEPNAMES[this.axis] + "::" + this.nodeTest.toString() + PathExpr.predicatesString(this.predicates); + }; + Step.ANCESTOR = 0; + Step.ANCESTORORSELF = 1; + Step.ATTRIBUTE = 2; + Step.CHILD = 3; + Step.DESCENDANT = 4; + Step.DESCENDANTORSELF = 5; + Step.FOLLOWING = 6; + Step.FOLLOWINGSIBLING = 7; + Step.NAMESPACE = 8; + Step.PARENT = 9; + Step.PRECEDING = 10; + Step.PRECEDINGSIBLING = 11; + Step.SELF = 12; + Step.STEPNAMES = reduce(function(acc, x) { + return acc[x[0]] = x[1], acc; + }, {}, [ + [Step.ANCESTOR, "ancestor"], + [Step.ANCESTORORSELF, "ancestor-or-self"], + [Step.ATTRIBUTE, "attribute"], + [Step.CHILD, "child"], + [Step.DESCENDANT, "descendant"], + [Step.DESCENDANTORSELF, "descendant-or-self"], + [Step.FOLLOWING, "following"], + [Step.FOLLOWINGSIBLING, "following-sibling"], + [Step.NAMESPACE, "namespace"], + [Step.PARENT, "parent"], + [Step.PRECEDING, "preceding"], + [Step.PRECEDINGSIBLING, "preceding-sibling"], + [Step.SELF, "self"] + ]); + var REVERSE_AXES = [ + Step.ANCESTOR, + Step.ANCESTORORSELF, + Step.PARENT, + Step.PRECEDING, + Step.PRECEDINGSIBLING + ]; + NodeTest.prototype = new Object(); + NodeTest.prototype.constructor = NodeTest; + NodeTest.superclass = Object.prototype; + function NodeTest(type, value) { + if (arguments.length > 0) { + this.init(type, value); + } + } + NodeTest.prototype.init = function(type, value) { + this.type = type; + this.value = value; + }; + NodeTest.prototype.toString = function() { + return ""; + }; + NodeTest.prototype.matches = function(n, xpc) { + console.warn("unknown node test type"); + }; + NodeTest.NAMETESTANY = 0; + NodeTest.NAMETESTPREFIXANY = 1; + NodeTest.NAMETESTQNAME = 2; + NodeTest.COMMENT = 3; + NodeTest.TEXT = 4; + NodeTest.PI = 5; + NodeTest.NODE = 6; + NodeTest.isNodeType = function(types) { + return function(node) { + return includes(types, node.nodeType); + }; + }; + NodeTest.makeNodeTestType = function(type, members, ctor) { + var newType = ctor || function() { + }; + newType.prototype = new NodeTest(type); + newType.prototype.constructor = newType; + assign(newType.prototype, members); + return newType; + }; + NodeTest.makeNodeTypeTest = function(type, nodeTypes, stringVal) { + return new (NodeTest.makeNodeTestType(type, { + matches: NodeTest.isNodeType(nodeTypes), + toString: always(stringVal) + }))(); + }; + NodeTest.hasPrefix = function(node) { + return node.prefix || (node.nodeName || node.tagName).indexOf(":") !== -1; + }; + NodeTest.isElementOrAttribute = NodeTest.isNodeType([1, 2]); + NodeTest.nameSpaceMatches = function(prefix, xpc, n) { + var nNamespace = n.namespaceURI || ""; + if (!prefix) { + return !nNamespace || xpc.allowAnyNamespaceForNoPrefix && !NodeTest.hasPrefix(n); + } + var ns = xpc.namespaceResolver.getNamespace(prefix, xpc.expressionContextNode); + if (ns == null) { + throw new Error("Cannot resolve QName " + prefix); + } + return ns === nNamespace; + }; + NodeTest.localNameMatches = function(localName, xpc, n) { + var nLocalName = n.localName || n.nodeName; + return xpc.caseInsensitive ? localName.toLowerCase() === nLocalName.toLowerCase() : localName === nLocalName; + }; + NodeTest.NameTestPrefixAny = NodeTest.makeNodeTestType( + NodeTest.NAMETESTPREFIXANY, + { + matches: function(n, xpc) { + return NodeTest.isElementOrAttribute(n) && NodeTest.nameSpaceMatches(this.prefix, xpc, n); + }, + toString: function() { + return this.prefix + ":*"; + } + }, + function NameTestPrefixAny(prefix) { + this.prefix = prefix; + } + ); + NodeTest.NameTestQName = NodeTest.makeNodeTestType( + NodeTest.NAMETESTQNAME, + { + matches: function(n, xpc) { + return NodeTest.isNodeType( + [ + NodeTypes.ELEMENT_NODE, + NodeTypes.ATTRIBUTE_NODE, + NodeTypes.NAMESPACE_NODE + ] + )(n) && NodeTest.nameSpaceMatches(this.prefix, xpc, n) && NodeTest.localNameMatches(this.localName, xpc, n); + }, + toString: function() { + return this.name; + } + }, + function NameTestQName(name2) { + var nameParts = name2.split(":"); + this.name = name2; + this.prefix = nameParts.length > 1 ? nameParts[0] : null; + this.localName = nameParts[nameParts.length > 1 ? 1 : 0]; + } + ); + NodeTest.PITest = NodeTest.makeNodeTestType(NodeTest.PI, { + matches: function(n, xpc) { + return NodeTest.isNodeType( + [NodeTypes.PROCESSING_INSTRUCTION_NODE] + )(n) && (n.target || n.nodeName) === this.name; + }, + toString: function() { + return wrap('processing-instruction("', '")', this.name); + } + }, function(name2) { + this.name = name2; + }); + NodeTest.nameTestAny = NodeTest.makeNodeTypeTest( + NodeTest.NAMETESTANY, + [ + NodeTypes.ELEMENT_NODE, + NodeTypes.ATTRIBUTE_NODE, + NodeTypes.NAMESPACE_NODE + ], + "*" + ); + NodeTest.textTest = NodeTest.makeNodeTypeTest( + NodeTest.TEXT, + [ + NodeTypes.TEXT_NODE, + NodeTypes.CDATA_SECTION_NODE + ], + "text()" + ); + NodeTest.commentTest = NodeTest.makeNodeTypeTest( + NodeTest.COMMENT, + [NodeTypes.COMMENT_NODE], + "comment()" + ); + NodeTest.nodeTest = NodeTest.makeNodeTypeTest( + NodeTest.NODE, + [ + NodeTypes.ELEMENT_NODE, + NodeTypes.ATTRIBUTE_NODE, + NodeTypes.TEXT_NODE, + NodeTypes.CDATA_SECTION_NODE, + NodeTypes.PROCESSING_INSTRUCTION_NODE, + NodeTypes.COMMENT_NODE, + NodeTypes.DOCUMENT_NODE + ], + "node()" + ); + NodeTest.anyPiTest = NodeTest.makeNodeTypeTest( + NodeTest.PI, + [NodeTypes.PROCESSING_INSTRUCTION_NODE], + "processing-instruction()" + ); + VariableReference.prototype = new Expression(); + VariableReference.prototype.constructor = VariableReference; + VariableReference.superclass = Expression.prototype; + function VariableReference(v) { + if (arguments.length > 0) { + this.init(v); + } + } + VariableReference.prototype.init = function(v) { + this.variable = v; + }; + VariableReference.prototype.toString = function() { + return "$" + this.variable; + }; + VariableReference.prototype.evaluate = function(c) { + var parts = Utilities.resolveQName(this.variable, c.namespaceResolver, c.contextNode, false); + if (parts[0] == null) { + throw new Error("Cannot resolve QName " + fn); + } + var result = c.variableResolver.getVariable(parts[1], parts[0]); + if (!result) { + throw XPathException.fromMessage("Undeclared variable: " + this.toString()); + } + return result; + }; + FunctionCall.prototype = new Expression(); + FunctionCall.prototype.constructor = FunctionCall; + FunctionCall.superclass = Expression.prototype; + function FunctionCall(fn2, args) { + if (arguments.length > 0) { + this.init(fn2, args); + } + } + FunctionCall.prototype.init = function(fn2, args) { + this.functionName = fn2; + this.arguments = args; + }; + FunctionCall.prototype.toString = function() { + var s = this.functionName + "("; + for (var i = 0; i < this.arguments.length; i++) { + if (i > 0) { + s += ", "; + } + s += this.arguments[i].toString(); + } + return s + ")"; + }; + FunctionCall.prototype.evaluate = function(c) { + var f = FunctionResolver.getFunctionFromContext(this.functionName, c); + if (!f) { + throw new Error("Unknown function " + this.functionName); + } + var a = [c].concat(this.arguments); + return f.apply(c.functionResolver.thisArg, a); + }; + var Operators = new Object(); + Operators.equals = function(l, r) { + return l.equals(r); + }; + Operators.notequal = function(l, r) { + return l.notequal(r); + }; + Operators.lessthan = function(l, r) { + return l.lessthan(r); + }; + Operators.greaterthan = function(l, r) { + return l.greaterthan(r); + }; + Operators.lessthanorequal = function(l, r) { + return l.lessthanorequal(r); + }; + Operators.greaterthanorequal = function(l, r) { + return l.greaterthanorequal(r); + }; + XString.prototype = new Expression(); + XString.prototype.constructor = XString; + XString.superclass = Expression.prototype; + function XString(s) { + if (arguments.length > 0) { + this.init(s); + } + } + XString.prototype.init = function(s) { + this.str = String(s); + }; + XString.prototype.toString = function() { + return this.str; + }; + XString.prototype.evaluate = function(c) { + return this; + }; + XString.prototype.string = function() { + return this; + }; + XString.prototype.number = function() { + return new XNumber(this.str); + }; + XString.prototype.bool = function() { + return new XBoolean(this.str); + }; + XString.prototype.nodeset = function() { + throw new Error("Cannot convert string to nodeset"); + }; + XString.prototype.stringValue = function() { + return this.str; + }; + XString.prototype.numberValue = function() { + return this.number().numberValue(); + }; + XString.prototype.booleanValue = function() { + return this.bool().booleanValue(); + }; + XString.prototype.equals = function(r) { + if (Utilities.instance_of(r, XBoolean)) { + return this.bool().equals(r); + } + if (Utilities.instance_of(r, XNumber)) { + return this.number().equals(r); + } + if (Utilities.instance_of(r, XNodeSet)) { + return r.compareWithString(this, Operators.equals); + } + return new XBoolean(this.str == r.str); + }; + XString.prototype.notequal = function(r) { + if (Utilities.instance_of(r, XBoolean)) { + return this.bool().notequal(r); + } + if (Utilities.instance_of(r, XNumber)) { + return this.number().notequal(r); + } + if (Utilities.instance_of(r, XNodeSet)) { + return r.compareWithString(this, Operators.notequal); + } + return new XBoolean(this.str != r.str); + }; + XString.prototype.lessthan = function(r) { + return this.number().lessthan(r); + }; + XString.prototype.greaterthan = function(r) { + return this.number().greaterthan(r); + }; + XString.prototype.lessthanorequal = function(r) { + return this.number().lessthanorequal(r); + }; + XString.prototype.greaterthanorequal = function(r) { + return this.number().greaterthanorequal(r); + }; + XNumber.prototype = new Expression(); + XNumber.prototype.constructor = XNumber; + XNumber.superclass = Expression.prototype; + function XNumber(n) { + if (arguments.length > 0) { + this.init(n); + } + } + XNumber.prototype.init = function(n) { + this.num = typeof n === "string" ? this.parse(n) : Number(n); + }; + XNumber.prototype.numberFormat = /^\s*-?[0-9]*\.?[0-9]+\s*$/; + XNumber.prototype.parse = function(s) { + return this.numberFormat.test(s) ? parseFloat(s) : Number.NaN; + }; + function padSmallNumber(numberStr) { + var parts = numberStr.split("e-"); + var base = parts[0].replace(".", ""); + var exponent = Number(parts[1]); + for (var i = 0; i < exponent - 1; i += 1) { + base = "0" + base; + } + return "0." + base; + } + function padLargeNumber(numberStr) { + var parts = numberStr.split("e"); + var base = parts[0].replace(".", ""); + var exponent = Number(parts[1]); + var zerosToAppend = exponent + 1 - base.length; + for (var i = 0; i < zerosToAppend; i += 1) { + base += "0"; + } + return base; + } + XNumber.prototype.toString = function() { + var strValue = this.num.toString(); + if (strValue.indexOf("e-") !== -1) { + return padSmallNumber(strValue); + } + if (strValue.indexOf("e") !== -1) { + return padLargeNumber(strValue); + } + return strValue; + }; + XNumber.prototype.evaluate = function(c) { + return this; + }; + XNumber.prototype.string = function() { + return new XString(this.toString()); + }; + XNumber.prototype.number = function() { + return this; + }; + XNumber.prototype.bool = function() { + return new XBoolean(this.num); + }; + XNumber.prototype.nodeset = function() { + throw new Error("Cannot convert number to nodeset"); + }; + XNumber.prototype.stringValue = function() { + return this.string().stringValue(); + }; + XNumber.prototype.numberValue = function() { + return this.num; + }; + XNumber.prototype.booleanValue = function() { + return this.bool().booleanValue(); + }; + XNumber.prototype.negate = function() { + return new XNumber(-this.num); + }; + XNumber.prototype.equals = function(r) { + if (Utilities.instance_of(r, XBoolean)) { + return this.bool().equals(r); + } + if (Utilities.instance_of(r, XString)) { + return this.equals(r.number()); + } + if (Utilities.instance_of(r, XNodeSet)) { + return r.compareWithNumber(this, Operators.equals); + } + return new XBoolean(this.num == r.num); + }; + XNumber.prototype.notequal = function(r) { + if (Utilities.instance_of(r, XBoolean)) { + return this.bool().notequal(r); + } + if (Utilities.instance_of(r, XString)) { + return this.notequal(r.number()); + } + if (Utilities.instance_of(r, XNodeSet)) { + return r.compareWithNumber(this, Operators.notequal); + } + return new XBoolean(this.num != r.num); + }; + XNumber.prototype.lessthan = function(r) { + if (Utilities.instance_of(r, XNodeSet)) { + return r.compareWithNumber(this, Operators.greaterthan); + } + if (Utilities.instance_of(r, XBoolean) || Utilities.instance_of(r, XString)) { + return this.lessthan(r.number()); + } + return new XBoolean(this.num < r.num); + }; + XNumber.prototype.greaterthan = function(r) { + if (Utilities.instance_of(r, XNodeSet)) { + return r.compareWithNumber(this, Operators.lessthan); + } + if (Utilities.instance_of(r, XBoolean) || Utilities.instance_of(r, XString)) { + return this.greaterthan(r.number()); + } + return new XBoolean(this.num > r.num); + }; + XNumber.prototype.lessthanorequal = function(r) { + if (Utilities.instance_of(r, XNodeSet)) { + return r.compareWithNumber(this, Operators.greaterthanorequal); + } + if (Utilities.instance_of(r, XBoolean) || Utilities.instance_of(r, XString)) { + return this.lessthanorequal(r.number()); + } + return new XBoolean(this.num <= r.num); + }; + XNumber.prototype.greaterthanorequal = function(r) { + if (Utilities.instance_of(r, XNodeSet)) { + return r.compareWithNumber(this, Operators.lessthanorequal); + } + if (Utilities.instance_of(r, XBoolean) || Utilities.instance_of(r, XString)) { + return this.greaterthanorequal(r.number()); + } + return new XBoolean(this.num >= r.num); + }; + XNumber.prototype.plus = function(r) { + return new XNumber(this.num + r.num); + }; + XNumber.prototype.minus = function(r) { + return new XNumber(this.num - r.num); + }; + XNumber.prototype.multiply = function(r) { + return new XNumber(this.num * r.num); + }; + XNumber.prototype.div = function(r) { + return new XNumber(this.num / r.num); + }; + XNumber.prototype.mod = function(r) { + return new XNumber(this.num % r.num); + }; + XBoolean.prototype = new Expression(); + XBoolean.prototype.constructor = XBoolean; + XBoolean.superclass = Expression.prototype; + function XBoolean(b) { + if (arguments.length > 0) { + this.init(b); + } + } + XBoolean.prototype.init = function(b) { + this.b = Boolean(b); + }; + XBoolean.prototype.toString = function() { + return this.b.toString(); + }; + XBoolean.prototype.evaluate = function(c) { + return this; + }; + XBoolean.prototype.string = function() { + return new XString(this.b); + }; + XBoolean.prototype.number = function() { + return new XNumber(this.b); + }; + XBoolean.prototype.bool = function() { + return this; + }; + XBoolean.prototype.nodeset = function() { + throw new Error("Cannot convert boolean to nodeset"); + }; + XBoolean.prototype.stringValue = function() { + return this.string().stringValue(); + }; + XBoolean.prototype.numberValue = function() { + return this.number().numberValue(); + }; + XBoolean.prototype.booleanValue = function() { + return this.b; + }; + XBoolean.prototype.not = function() { + return new XBoolean(!this.b); + }; + XBoolean.prototype.equals = function(r) { + if (Utilities.instance_of(r, XString) || Utilities.instance_of(r, XNumber)) { + return this.equals(r.bool()); + } + if (Utilities.instance_of(r, XNodeSet)) { + return r.compareWithBoolean(this, Operators.equals); + } + return new XBoolean(this.b == r.b); + }; + XBoolean.prototype.notequal = function(r) { + if (Utilities.instance_of(r, XString) || Utilities.instance_of(r, XNumber)) { + return this.notequal(r.bool()); + } + if (Utilities.instance_of(r, XNodeSet)) { + return r.compareWithBoolean(this, Operators.notequal); + } + return new XBoolean(this.b != r.b); + }; + XBoolean.prototype.lessthan = function(r) { + return this.number().lessthan(r); + }; + XBoolean.prototype.greaterthan = function(r) { + return this.number().greaterthan(r); + }; + XBoolean.prototype.lessthanorequal = function(r) { + return this.number().lessthanorequal(r); + }; + XBoolean.prototype.greaterthanorequal = function(r) { + return this.number().greaterthanorequal(r); + }; + XBoolean.true_ = new XBoolean(true); + XBoolean.false_ = new XBoolean(false); + AVLTree.prototype = new Object(); + AVLTree.prototype.constructor = AVLTree; + AVLTree.superclass = Object.prototype; + function AVLTree(n) { + this.init(n); + } + AVLTree.prototype.init = function(n) { + this.left = null; + this.right = null; + this.node = n; + this.depth = 1; + }; + AVLTree.prototype.balance = function() { + var ldepth = this.left == null ? 0 : this.left.depth; + var rdepth = this.right == null ? 0 : this.right.depth; + if (ldepth > rdepth + 1) { + var lldepth = this.left.left == null ? 0 : this.left.left.depth; + var lrdepth = this.left.right == null ? 0 : this.left.right.depth; + if (lldepth < lrdepth) { + this.left.rotateRR(); + } + this.rotateLL(); + } else if (ldepth + 1 < rdepth) { + var rrdepth = this.right.right == null ? 0 : this.right.right.depth; + var rldepth = this.right.left == null ? 0 : this.right.left.depth; + if (rldepth > rrdepth) { + this.right.rotateLL(); + } + this.rotateRR(); + } + }; + AVLTree.prototype.rotateLL = function() { + var nodeBefore = this.node; + var rightBefore = this.right; + this.node = this.left.node; + this.right = this.left; + this.left = this.left.left; + this.right.left = this.right.right; + this.right.right = rightBefore; + this.right.node = nodeBefore; + this.right.updateInNewLocation(); + this.updateInNewLocation(); + }; + AVLTree.prototype.rotateRR = function() { + var nodeBefore = this.node; + var leftBefore = this.left; + this.node = this.right.node; + this.left = this.right; + this.right = this.right.right; + this.left.right = this.left.left; + this.left.left = leftBefore; + this.left.node = nodeBefore; + this.left.updateInNewLocation(); + this.updateInNewLocation(); + }; + AVLTree.prototype.updateInNewLocation = function() { + this.getDepthFromChildren(); + }; + AVLTree.prototype.getDepthFromChildren = function() { + this.depth = this.node == null ? 0 : 1; + if (this.left != null) { + this.depth = this.left.depth + 1; + } + if (this.right != null && this.depth <= this.right.depth) { + this.depth = this.right.depth + 1; + } + }; + function nodeOrder(n1, n2) { + if (n1 === n2) { + return 0; + } + if (n1.compareDocumentPosition) { + var cpos = n1.compareDocumentPosition(n2); + if (cpos & 1) { + return 1; + } + if (cpos & 10) { + return 1; + } + if (cpos & 20) { + return -1; + } + return 0; + } + var d1 = 0, d2 = 0; + for (var m1 = n1; m1 != null; m1 = m1.parentNode || m1.ownerElement) { + d1++; + } + for (var m2 = n2; m2 != null; m2 = m2.parentNode || m2.ownerElement) { + d2++; + } + if (d1 > d2) { + while (d1 > d2) { + n1 = n1.parentNode || n1.ownerElement; + d1--; + } + if (n1 === n2) { + return 1; + } + } else if (d2 > d1) { + while (d2 > d1) { + n2 = n2.parentNode || n2.ownerElement; + d2--; + } + if (n1 === n2) { + return -1; + } + } + var n1Par = n1.parentNode || n1.ownerElement, n2Par = n2.parentNode || n2.ownerElement; + while (n1Par !== n2Par) { + n1 = n1Par; + n2 = n2Par; + n1Par = n1.parentNode || n1.ownerElement; + n2Par = n2.parentNode || n2.ownerElement; + } + var n1isAttr = isAttributeLike(n1); + var n2isAttr = isAttributeLike(n2); + if (n1isAttr && !n2isAttr) { + return -1; + } + if (!n1isAttr && n2isAttr) { + return 1; + } + if (n1.isXPathNamespace) { + if (n1.nodeValue === XPath.XML_NAMESPACE_URI) { + return -1; + } + if (!n2.isXPathNamespace) { + return -1; + } + if (n2.nodeValue === XPath.XML_NAMESPACE_URI) { + return 1; + } + } else if (n2.isXPathNamespace) { + return 1; + } + if (n1Par) { + var cn = n1isAttr ? n1Par.attributes : n1Par.childNodes; + var len = cn.length; + var n1Compare = n1.baseNode || n1; + var n2Compare = n2.baseNode || n2; + for (var i = 0; i < len; i += 1) { + var n = cn[i]; + if (n === n1Compare) { + return -1; + } + if (n === n2Compare) { + return 1; + } + } + } + throw new Error("Unexpected: could not determine node order"); + } + AVLTree.prototype.add = function(n) { + if (n === this.node) { + return false; + } + var o = nodeOrder(n, this.node); + var ret = false; + if (o == -1) { + if (this.left == null) { + this.left = new AVLTree(n); + ret = true; + } else { + ret = this.left.add(n); + if (ret) { + this.balance(); + } + } + } else if (o == 1) { + if (this.right == null) { + this.right = new AVLTree(n); + ret = true; + } else { + ret = this.right.add(n); + if (ret) { + this.balance(); + } + } + } + if (ret) { + this.getDepthFromChildren(); + } + return ret; + }; + XNodeSet.prototype = new Expression(); + XNodeSet.prototype.constructor = XNodeSet; + XNodeSet.superclass = Expression.prototype; + function XNodeSet() { + this.init(); + } + XNodeSet.prototype.init = function() { + this.tree = null; + this.nodes = []; + this.size = 0; + }; + XNodeSet.prototype.toString = function() { + var p = this.first(); + if (p == null) { + return ""; + } + return this.stringForNode(p); + }; + XNodeSet.prototype.evaluate = function(c) { + return this; + }; + XNodeSet.prototype.string = function() { + return new XString(this.toString()); + }; + XNodeSet.prototype.stringValue = function() { + return this.toString(); + }; + XNodeSet.prototype.number = function() { + return new XNumber(this.string()); + }; + XNodeSet.prototype.numberValue = function() { + return Number(this.string()); + }; + XNodeSet.prototype.bool = function() { + return new XBoolean(this.booleanValue()); + }; + XNodeSet.prototype.booleanValue = function() { + return !!this.size; + }; + XNodeSet.prototype.nodeset = function() { + return this; + }; + XNodeSet.prototype.stringForNode = function(n) { + if (n.nodeType == NodeTypes.DOCUMENT_NODE || n.nodeType == NodeTypes.ELEMENT_NODE || n.nodeType === NodeTypes.DOCUMENT_FRAGMENT_NODE) { + return this.stringForContainerNode(n); + } + if (n.nodeType === NodeTypes.ATTRIBUTE_NODE) { + return n.value || n.nodeValue; + } + if (n.isNamespaceNode) { + return n.namespace; + } + return n.nodeValue; + }; + XNodeSet.prototype.stringForContainerNode = function(n) { + var s = ""; + for (var n2 = n.firstChild; n2 != null; n2 = n2.nextSibling) { + var nt = n2.nodeType; + if (nt === 1 || nt === 3 || nt === 4 || nt === 9 || nt === 11) { + s += this.stringForNode(n2); + } + } + return s; + }; + XNodeSet.prototype.buildTree = function() { + if (!this.tree && this.nodes.length) { + this.tree = new AVLTree(this.nodes[0]); + for (var i = 1; i < this.nodes.length; i += 1) { + this.tree.add(this.nodes[i]); + } + } + return this.tree; + }; + XNodeSet.prototype.first = function() { + var p = this.buildTree(); + if (p == null) { + return null; + } + while (p.left != null) { + p = p.left; + } + return p.node; + }; + XNodeSet.prototype.add = function(n) { + for (var i = 0; i < this.nodes.length; i += 1) { + if (n === this.nodes[i]) { + return; + } + } + this.tree = null; + this.nodes.push(n); + this.size += 1; + }; + XNodeSet.prototype.addArray = function(ns) { + var self = this; + forEach(function(x) { + self.add(x); + }, ns); + }; + XNodeSet.prototype.toArray = function() { + var a = []; + this.toArrayRec(this.buildTree(), a); + return a; + }; + XNodeSet.prototype.toArrayRec = function(t, a) { + if (t != null) { + this.toArrayRec(t.left, a); + a.push(t.node); + this.toArrayRec(t.right, a); + } + }; + XNodeSet.prototype.toUnsortedArray = function() { + return this.nodes.slice(); + }; + XNodeSet.prototype.compareWithString = function(r, o) { + var a = this.toUnsortedArray(); + for (var i = 0; i < a.length; i++) { + var n = a[i]; + var l = new XString(this.stringForNode(n)); + var res = o(l, r); + if (res.booleanValue()) { + return res; + } + } + return new XBoolean(false); + }; + XNodeSet.prototype.compareWithNumber = function(r, o) { + var a = this.toUnsortedArray(); + for (var i = 0; i < a.length; i++) { + var n = a[i]; + var l = new XNumber(this.stringForNode(n)); + var res = o(l, r); + if (res.booleanValue()) { + return res; + } + } + return new XBoolean(false); + }; + XNodeSet.prototype.compareWithBoolean = function(r, o) { + return o(this.bool(), r); + }; + XNodeSet.prototype.compareWithNodeSet = function(r, o) { + var arr = this.toUnsortedArray(); + var oInvert = function(lop, rop) { + return o(rop, lop); + }; + for (var i = 0; i < arr.length; i++) { + var l = new XString(this.stringForNode(arr[i])); + var res = r.compareWithString(l, oInvert); + if (res.booleanValue()) { + return res; + } + } + return new XBoolean(false); + }; + XNodeSet.compareWith = curry(function(o, r) { + if (Utilities.instance_of(r, XString)) { + return this.compareWithString(r, o); + } + if (Utilities.instance_of(r, XNumber)) { + return this.compareWithNumber(r, o); + } + if (Utilities.instance_of(r, XBoolean)) { + return this.compareWithBoolean(r, o); + } + return this.compareWithNodeSet(r, o); + }); + XNodeSet.prototype.equals = XNodeSet.compareWith(Operators.equals); + XNodeSet.prototype.notequal = XNodeSet.compareWith(Operators.notequal); + XNodeSet.prototype.lessthan = XNodeSet.compareWith(Operators.lessthan); + XNodeSet.prototype.greaterthan = XNodeSet.compareWith(Operators.greaterthan); + XNodeSet.prototype.lessthanorequal = XNodeSet.compareWith(Operators.lessthanorequal); + XNodeSet.prototype.greaterthanorequal = XNodeSet.compareWith(Operators.greaterthanorequal); + XNodeSet.prototype.union = function(r) { + var ns = new XNodeSet(); + ns.addArray(this.toUnsortedArray()); + ns.addArray(r.toUnsortedArray()); + return ns; + }; + XPathNamespace.prototype = new Object(); + XPathNamespace.prototype.constructor = XPathNamespace; + XPathNamespace.superclass = Object.prototype; + function XPathNamespace(pre, node, uri, p) { + this.isXPathNamespace = true; + this.baseNode = node; + this.ownerDocument = p.ownerDocument; + this.nodeName = pre; + this.prefix = pre; + this.localName = pre; + this.namespaceURI = null; + this.nodeValue = uri; + this.ownerElement = p; + this.nodeType = NodeTypes.NAMESPACE_NODE; + } + XPathNamespace.prototype.toString = function() { + return '{ "' + this.prefix + '", "' + this.namespaceURI + '" }'; + }; + XPathContext.prototype = new Object(); + XPathContext.prototype.constructor = XPathContext; + XPathContext.superclass = Object.prototype; + function XPathContext(vr, nr, fr) { + this.variableResolver = vr != null ? vr : new VariableResolver(); + this.namespaceResolver = nr != null ? nr : new NamespaceResolver(); + this.functionResolver = fr != null ? fr : new FunctionResolver(); + } + XPathContext.prototype.extend = function(newProps) { + return assign(new XPathContext(), this, newProps); + }; + VariableResolver.prototype = new Object(); + VariableResolver.prototype.constructor = VariableResolver; + VariableResolver.superclass = Object.prototype; + function VariableResolver() { + } + VariableResolver.prototype.getVariable = function(ln, ns) { + return null; + }; + FunctionResolver.prototype = new Object(); + FunctionResolver.prototype.constructor = FunctionResolver; + FunctionResolver.superclass = Object.prototype; + function FunctionResolver(thisArg) { + this.thisArg = thisArg != null ? thisArg : Functions; + this.functions = new Object(); + this.addStandardFunctions(); + } + FunctionResolver.prototype.addStandardFunctions = function() { + this.functions["{}last"] = Functions.last; + this.functions["{}position"] = Functions.position; + this.functions["{}count"] = Functions.count; + this.functions["{}id"] = Functions.id; + this.functions["{}local-name"] = Functions.localName; + this.functions["{}namespace-uri"] = Functions.namespaceURI; + this.functions["{}name"] = Functions.name; + this.functions["{}string"] = Functions.string; + this.functions["{}concat"] = Functions.concat; + this.functions["{}starts-with"] = Functions.startsWith; + this.functions["{}contains"] = Functions.contains; + this.functions["{}substring-before"] = Functions.substringBefore; + this.functions["{}substring-after"] = Functions.substringAfter; + this.functions["{}substring"] = Functions.substring; + this.functions["{}string-length"] = Functions.stringLength; + this.functions["{}normalize-space"] = Functions.normalizeSpace; + this.functions["{}translate"] = Functions.translate; + this.functions["{}boolean"] = Functions.boolean_; + this.functions["{}not"] = Functions.not; + this.functions["{}true"] = Functions.true_; + this.functions["{}false"] = Functions.false_; + this.functions["{}lang"] = Functions.lang; + this.functions["{}number"] = Functions.number; + this.functions["{}sum"] = Functions.sum; + this.functions["{}floor"] = Functions.floor; + this.functions["{}ceiling"] = Functions.ceiling; + this.functions["{}round"] = Functions.round; + }; + FunctionResolver.prototype.addFunction = function(ns, ln, f) { + this.functions["{" + ns + "}" + ln] = f; + }; + FunctionResolver.getFunctionFromContext = function(qName, context) { + var parts = Utilities.resolveQName(qName, context.namespaceResolver, context.contextNode, false); + if (parts[0] === null) { + throw new Error("Cannot resolve QName " + name); + } + return context.functionResolver.getFunction(parts[1], parts[0]); + }; + FunctionResolver.prototype.getFunction = function(localName, namespace) { + return this.functions["{" + namespace + "}" + localName]; + }; + NamespaceResolver.prototype = new Object(); + NamespaceResolver.prototype.constructor = NamespaceResolver; + NamespaceResolver.superclass = Object.prototype; + function NamespaceResolver() { + } + NamespaceResolver.prototype.getNamespace = function(prefix, n) { + if (prefix == "xml") { + return XPath.XML_NAMESPACE_URI; + } else if (prefix == "xmlns") { + return XPath.XMLNS_NAMESPACE_URI; + } + if (n.nodeType == NodeTypes.DOCUMENT_NODE) { + n = n.documentElement; + } else if (n.nodeType == NodeTypes.ATTRIBUTE_NODE) { + n = PathExpr.getOwnerElement(n); + } else if (n.nodeType != NodeTypes.ELEMENT_NODE) { + n = n.parentNode; + } + while (n != null && n.nodeType == NodeTypes.ELEMENT_NODE) { + var nnm = n.attributes; + for (var i = 0; i < nnm.length; i++) { + var a = nnm.item(i); + var aname = a.name || a.nodeName; + if (aname === "xmlns" && prefix === "" || aname === "xmlns:" + prefix) { + return String(a.value || a.nodeValue); + } + } + n = n.parentNode; + } + return null; + }; + var Functions = new Object(); + Functions.last = function(c) { + if (arguments.length != 1) { + throw new Error("Function last expects ()"); + } + return new XNumber(c.contextSize); + }; + Functions.position = function(c) { + if (arguments.length != 1) { + throw new Error("Function position expects ()"); + } + return new XNumber(c.contextPosition); + }; + Functions.count = function() { + var c = arguments[0]; + var ns; + if (arguments.length != 2 || !Utilities.instance_of(ns = arguments[1].evaluate(c), XNodeSet)) { + throw new Error("Function count expects (node-set)"); + } + return new XNumber(ns.size); + }; + Functions.id = function() { + var c = arguments[0]; + var id; + if (arguments.length != 2) { + throw new Error("Function id expects (object)"); + } + id = arguments[1].evaluate(c); + if (Utilities.instance_of(id, XNodeSet)) { + id = id.toArray().join(" "); + } else { + id = id.stringValue(); + } + var ids = id.split(/[\x0d\x0a\x09\x20]+/); + var count = 0; + var ns = new XNodeSet(); + var doc = c.contextNode.nodeType == NodeTypes.DOCUMENT_NODE ? c.contextNode : c.contextNode.ownerDocument; + for (var i = 0; i < ids.length; i++) { + var n; + if (doc.getElementById) { + n = doc.getElementById(ids[i]); + } else { + n = Utilities.getElementById(doc, ids[i]); + } + if (n != null) { + ns.add(n); + count++; + } + } + return ns; + }; + Functions.localName = function(c, eNode) { + var n; + if (arguments.length == 1) { + n = c.contextNode; + } else if (arguments.length == 2) { + n = eNode.evaluate(c).first(); + } else { + throw new Error("Function local-name expects (node-set?)"); + } + if (n == null) { + return new XString(""); + } + return new XString( + n.localName || // standard elements and attributes + n.baseName || // IE + n.target || // processing instructions + n.nodeName || // DOM1 elements + "" + // fallback + ); + }; + Functions.namespaceURI = function() { + var c = arguments[0]; + var n; + if (arguments.length == 1) { + n = c.contextNode; + } else if (arguments.length == 2) { + n = arguments[1].evaluate(c).first(); + } else { + throw new Error("Function namespace-uri expects (node-set?)"); + } + if (n == null) { + return new XString(""); + } + return new XString(n.namespaceURI || ""); + }; + Functions.name = function() { + var c = arguments[0]; + var n; + if (arguments.length == 1) { + n = c.contextNode; + } else if (arguments.length == 2) { + n = arguments[1].evaluate(c).first(); + } else { + throw new Error("Function name expects (node-set?)"); + } + if (n == null) { + return new XString(""); + } + if (n.nodeType == NodeTypes.ELEMENT_NODE) { + return new XString(n.nodeName); + } else if (n.nodeType == NodeTypes.ATTRIBUTE_NODE) { + return new XString(n.name || n.nodeName); + } else if (n.nodeType === NodeTypes.PROCESSING_INSTRUCTION_NODE) { + return new XString(n.target || n.nodeName); + } else if (n.localName == null) { + return new XString(""); + } else { + return new XString(n.localName); + } + }; + Functions.string = function() { + var c = arguments[0]; + if (arguments.length == 1) { + return new XString(XNodeSet.prototype.stringForNode(c.contextNode)); + } else if (arguments.length == 2) { + return arguments[1].evaluate(c).string(); + } + throw new Error("Function string expects (object?)"); + }; + Functions.concat = function(c) { + if (arguments.length < 3) { + throw new Error("Function concat expects (string, string[, string]*)"); + } + var s = ""; + for (var i = 1; i < arguments.length; i++) { + s += arguments[i].evaluate(c).stringValue(); + } + return new XString(s); + }; + Functions.startsWith = function() { + var c = arguments[0]; + if (arguments.length != 3) { + throw new Error("Function startsWith expects (string, string)"); + } + var s1 = arguments[1].evaluate(c).stringValue(); + var s2 = arguments[2].evaluate(c).stringValue(); + return new XBoolean(s1.substring(0, s2.length) == s2); + }; + Functions.contains = function() { + var c = arguments[0]; + if (arguments.length != 3) { + throw new Error("Function contains expects (string, string)"); + } + var s1 = arguments[1].evaluate(c).stringValue(); + var s2 = arguments[2].evaluate(c).stringValue(); + return new XBoolean(s1.indexOf(s2) !== -1); + }; + Functions.substringBefore = function() { + var c = arguments[0]; + if (arguments.length != 3) { + throw new Error("Function substring-before expects (string, string)"); + } + var s1 = arguments[1].evaluate(c).stringValue(); + var s2 = arguments[2].evaluate(c).stringValue(); + return new XString(s1.substring(0, s1.indexOf(s2))); + }; + Functions.substringAfter = function() { + var c = arguments[0]; + if (arguments.length != 3) { + throw new Error("Function substring-after expects (string, string)"); + } + var s1 = arguments[1].evaluate(c).stringValue(); + var s2 = arguments[2].evaluate(c).stringValue(); + if (s2.length == 0) { + return new XString(s1); + } + var i = s1.indexOf(s2); + if (i == -1) { + return new XString(""); + } + return new XString(s1.substring(i + s2.length)); + }; + Functions.substring = function() { + var c = arguments[0]; + if (!(arguments.length == 3 || arguments.length == 4)) { + throw new Error("Function substring expects (string, number, number?)"); + } + var s = arguments[1].evaluate(c).stringValue(); + var n1 = Math.round(arguments[2].evaluate(c).numberValue()) - 1; + var n2 = arguments.length == 4 ? n1 + Math.round(arguments[3].evaluate(c).numberValue()) : void 0; + return new XString(s.substring(n1, n2)); + }; + Functions.stringLength = function() { + var c = arguments[0]; + var s; + if (arguments.length == 1) { + s = XNodeSet.prototype.stringForNode(c.contextNode); + } else if (arguments.length == 2) { + s = arguments[1].evaluate(c).stringValue(); + } else { + throw new Error("Function string-length expects (string?)"); + } + return new XNumber(s.length); + }; + Functions.normalizeSpace = function() { + var c = arguments[0]; + var s; + if (arguments.length == 1) { + s = XNodeSet.prototype.stringForNode(c.contextNode); + } else if (arguments.length == 2) { + s = arguments[1].evaluate(c).stringValue(); + } else { + throw new Error("Function normalize-space expects (string?)"); + } + var i = 0; + var j = s.length - 1; + while (Utilities.isSpace(s.charCodeAt(j))) { + j--; + } + var t = ""; + while (i <= j && Utilities.isSpace(s.charCodeAt(i))) { + i++; + } + while (i <= j) { + if (Utilities.isSpace(s.charCodeAt(i))) { + t += " "; + while (i <= j && Utilities.isSpace(s.charCodeAt(i))) { + i++; + } + } else { + t += s.charAt(i); + i++; + } + } + return new XString(t); + }; + Functions.translate = function(c, eValue, eFrom, eTo) { + if (arguments.length != 4) { + throw new Error("Function translate expects (string, string, string)"); + } + var value = eValue.evaluate(c).stringValue(); + var from = eFrom.evaluate(c).stringValue(); + var to = eTo.evaluate(c).stringValue(); + var cMap = reduce(function(acc, ch, i) { + if (!(ch in acc)) { + acc[ch] = i > to.length ? "" : to[i]; + } + return acc; + }, {}, from); + var t = join( + "", + map(function(ch) { + return ch in cMap ? cMap[ch] : ch; + }, value) + ); + return new XString(t); + }; + Functions.boolean_ = function() { + var c = arguments[0]; + if (arguments.length != 2) { + throw new Error("Function boolean expects (object)"); + } + return arguments[1].evaluate(c).bool(); + }; + Functions.not = function(c, eValue) { + if (arguments.length != 2) { + throw new Error("Function not expects (object)"); + } + return eValue.evaluate(c).bool().not(); + }; + Functions.true_ = function() { + if (arguments.length != 1) { + throw new Error("Function true expects ()"); + } + return XBoolean.true_; + }; + Functions.false_ = function() { + if (arguments.length != 1) { + throw new Error("Function false expects ()"); + } + return XBoolean.false_; + }; + Functions.lang = function() { + var c = arguments[0]; + if (arguments.length != 2) { + throw new Error("Function lang expects (string)"); + } + var lang; + for (var n = c.contextNode; n != null && n.nodeType != NodeTypes.DOCUMENT_NODE; n = n.parentNode) { + var a = n.getAttributeNS(XPath.XML_NAMESPACE_URI, "lang"); + if (a != null) { + lang = String(a); + break; + } + } + if (lang == null) { + return XBoolean.false_; + } + var s = arguments[1].evaluate(c).stringValue(); + return new XBoolean(lang.substring(0, s.length) == s && (lang.length == s.length || lang.charAt(s.length) == "-")); + }; + Functions.number = function() { + var c = arguments[0]; + if (!(arguments.length == 1 || arguments.length == 2)) { + throw new Error("Function number expects (object?)"); + } + if (arguments.length == 1) { + return new XNumber(XNodeSet.prototype.stringForNode(c.contextNode)); + } + return arguments[1].evaluate(c).number(); + }; + Functions.sum = function() { + var c = arguments[0]; + var ns; + if (arguments.length != 2 || !Utilities.instance_of(ns = arguments[1].evaluate(c), XNodeSet)) { + throw new Error("Function sum expects (node-set)"); + } + ns = ns.toUnsortedArray(); + var n = 0; + for (var i = 0; i < ns.length; i++) { + n += new XNumber(XNodeSet.prototype.stringForNode(ns[i])).numberValue(); + } + return new XNumber(n); + }; + Functions.floor = function() { + var c = arguments[0]; + if (arguments.length != 2) { + throw new Error("Function floor expects (number)"); + } + return new XNumber(Math.floor(arguments[1].evaluate(c).numberValue())); + }; + Functions.ceiling = function() { + var c = arguments[0]; + if (arguments.length != 2) { + throw new Error("Function ceiling expects (number)"); + } + return new XNumber(Math.ceil(arguments[1].evaluate(c).numberValue())); + }; + Functions.round = function() { + var c = arguments[0]; + if (arguments.length != 2) { + throw new Error("Function round expects (number)"); + } + return new XNumber(Math.round(arguments[1].evaluate(c).numberValue())); + }; + var Utilities = new Object(); + var isAttributeLike = function(val) { + return val && (val.nodeType === NodeTypes.ATTRIBUTE_NODE || val.ownerElement || val.isXPathNamespace); + }; + Utilities.splitQName = function(qn) { + var i = qn.indexOf(":"); + if (i == -1) { + return [null, qn]; + } + return [qn.substring(0, i), qn.substring(i + 1)]; + }; + Utilities.resolveQName = function(qn, nr, n, useDefault) { + var parts = Utilities.splitQName(qn); + if (parts[0] != null) { + parts[0] = nr.getNamespace(parts[0], n); + } else { + if (useDefault) { + parts[0] = nr.getNamespace("", n); + if (parts[0] == null) { + parts[0] = ""; + } + } else { + parts[0] = ""; + } + } + return parts; + }; + Utilities.isSpace = function(c) { + return c == 9 || c == 13 || c == 10 || c == 32; + }; + Utilities.isLetter = function(c) { + return c >= 65 && c <= 90 || c >= 97 && c <= 122 || c >= 192 && c <= 214 || c >= 216 && c <= 246 || c >= 248 && c <= 255 || c >= 256 && c <= 305 || c >= 308 && c <= 318 || c >= 321 && c <= 328 || c >= 330 && c <= 382 || c >= 384 && c <= 451 || c >= 461 && c <= 496 || c >= 500 && c <= 501 || c >= 506 && c <= 535 || c >= 592 && c <= 680 || c >= 699 && c <= 705 || c == 902 || c >= 904 && c <= 906 || c == 908 || c >= 910 && c <= 929 || c >= 931 && c <= 974 || c >= 976 && c <= 982 || c == 986 || c == 988 || c == 990 || c == 992 || c >= 994 && c <= 1011 || c >= 1025 && c <= 1036 || c >= 1038 && c <= 1103 || c >= 1105 && c <= 1116 || c >= 1118 && c <= 1153 || c >= 1168 && c <= 1220 || c >= 1223 && c <= 1224 || c >= 1227 && c <= 1228 || c >= 1232 && c <= 1259 || c >= 1262 && c <= 1269 || c >= 1272 && c <= 1273 || c >= 1329 && c <= 1366 || c == 1369 || c >= 1377 && c <= 1414 || c >= 1488 && c <= 1514 || c >= 1520 && c <= 1522 || c >= 1569 && c <= 1594 || c >= 1601 && c <= 1610 || c >= 1649 && c <= 1719 || c >= 1722 && c <= 1726 || c >= 1728 && c <= 1742 || c >= 1744 && c <= 1747 || c == 1749 || c >= 1765 && c <= 1766 || c >= 2309 && c <= 2361 || c == 2365 || c >= 2392 && c <= 2401 || c >= 2437 && c <= 2444 || c >= 2447 && c <= 2448 || c >= 2451 && c <= 2472 || c >= 2474 && c <= 2480 || c == 2482 || c >= 2486 && c <= 2489 || c >= 2524 && c <= 2525 || c >= 2527 && c <= 2529 || c >= 2544 && c <= 2545 || c >= 2565 && c <= 2570 || c >= 2575 && c <= 2576 || c >= 2579 && c <= 2600 || c >= 2602 && c <= 2608 || c >= 2610 && c <= 2611 || c >= 2613 && c <= 2614 || c >= 2616 && c <= 2617 || c >= 2649 && c <= 2652 || c == 2654 || c >= 2674 && c <= 2676 || c >= 2693 && c <= 2699 || c == 2701 || c >= 2703 && c <= 2705 || c >= 2707 && c <= 2728 || c >= 2730 && c <= 2736 || c >= 2738 && c <= 2739 || c >= 2741 && c <= 2745 || c == 2749 || c == 2784 || c >= 2821 && c <= 2828 || c >= 2831 && c <= 2832 || c >= 2835 && c <= 2856 || c >= 2858 && c <= 2864 || c >= 2866 && c <= 2867 || c >= 2870 && c <= 2873 || c == 2877 || c >= 2908 && c <= 2909 || c >= 2911 && c <= 2913 || c >= 2949 && c <= 2954 || c >= 2958 && c <= 2960 || c >= 2962 && c <= 2965 || c >= 2969 && c <= 2970 || c == 2972 || c >= 2974 && c <= 2975 || c >= 2979 && c <= 2980 || c >= 2984 && c <= 2986 || c >= 2990 && c <= 2997 || c >= 2999 && c <= 3001 || c >= 3077 && c <= 3084 || c >= 3086 && c <= 3088 || c >= 3090 && c <= 3112 || c >= 3114 && c <= 3123 || c >= 3125 && c <= 3129 || c >= 3168 && c <= 3169 || c >= 3205 && c <= 3212 || c >= 3214 && c <= 3216 || c >= 3218 && c <= 3240 || c >= 3242 && c <= 3251 || c >= 3253 && c <= 3257 || c == 3294 || c >= 3296 && c <= 3297 || c >= 3333 && c <= 3340 || c >= 3342 && c <= 3344 || c >= 3346 && c <= 3368 || c >= 3370 && c <= 3385 || c >= 3424 && c <= 3425 || c >= 3585 && c <= 3630 || c == 3632 || c >= 3634 && c <= 3635 || c >= 3648 && c <= 3653 || c >= 3713 && c <= 3714 || c == 3716 || c >= 3719 && c <= 3720 || c == 3722 || c == 3725 || c >= 3732 && c <= 3735 || c >= 3737 && c <= 3743 || c >= 3745 && c <= 3747 || c == 3749 || c == 3751 || c >= 3754 && c <= 3755 || c >= 3757 && c <= 3758 || c == 3760 || c >= 3762 && c <= 3763 || c == 3773 || c >= 3776 && c <= 3780 || c >= 3904 && c <= 3911 || c >= 3913 && c <= 3945 || c >= 4256 && c <= 4293 || c >= 4304 && c <= 4342 || c == 4352 || c >= 4354 && c <= 4355 || c >= 4357 && c <= 4359 || c == 4361 || c >= 4363 && c <= 4364 || c >= 4366 && c <= 4370 || c == 4412 || c == 4414 || c == 4416 || c == 4428 || c == 4430 || c == 4432 || c >= 4436 && c <= 4437 || c == 4441 || c >= 4447 && c <= 4449 || c == 4451 || c == 4453 || c == 4455 || c == 4457 || c >= 4461 && c <= 4462 || c >= 4466 && c <= 4467 || c == 4469 || c == 4510 || c == 4520 || c == 4523 || c >= 4526 && c <= 4527 || c >= 4535 && c <= 4536 || c == 4538 || c >= 4540 && c <= 4546 || c == 4587 || c == 4592 || c == 4601 || c >= 7680 && c <= 7835 || c >= 7840 && c <= 7929 || c >= 7936 && c <= 7957 || c >= 7960 && c <= 7965 || c >= 7968 && c <= 8005 || c >= 8008 && c <= 8013 || c >= 8016 && c <= 8023 || c == 8025 || c == 8027 || c == 8029 || c >= 8031 && c <= 8061 || c >= 8064 && c <= 8116 || c >= 8118 && c <= 8124 || c == 8126 || c >= 8130 && c <= 8132 || c >= 8134 && c <= 8140 || c >= 8144 && c <= 8147 || c >= 8150 && c <= 8155 || c >= 8160 && c <= 8172 || c >= 8178 && c <= 8180 || c >= 8182 && c <= 8188 || c == 8486 || c >= 8490 && c <= 8491 || c == 8494 || c >= 8576 && c <= 8578 || c >= 12353 && c <= 12436 || c >= 12449 && c <= 12538 || c >= 12549 && c <= 12588 || c >= 44032 && c <= 55203 || c >= 19968 && c <= 40869 || c == 12295 || c >= 12321 && c <= 12329; + }; + Utilities.isNCNameChar = function(c) { + return c >= 48 && c <= 57 || c >= 1632 && c <= 1641 || c >= 1776 && c <= 1785 || c >= 2406 && c <= 2415 || c >= 2534 && c <= 2543 || c >= 2662 && c <= 2671 || c >= 2790 && c <= 2799 || c >= 2918 && c <= 2927 || c >= 3047 && c <= 3055 || c >= 3174 && c <= 3183 || c >= 3302 && c <= 3311 || c >= 3430 && c <= 3439 || c >= 3664 && c <= 3673 || c >= 3792 && c <= 3801 || c >= 3872 && c <= 3881 || c == 46 || c == 45 || c == 95 || Utilities.isLetter(c) || c >= 768 && c <= 837 || c >= 864 && c <= 865 || c >= 1155 && c <= 1158 || c >= 1425 && c <= 1441 || c >= 1443 && c <= 1465 || c >= 1467 && c <= 1469 || c == 1471 || c >= 1473 && c <= 1474 || c == 1476 || c >= 1611 && c <= 1618 || c == 1648 || c >= 1750 && c <= 1756 || c >= 1757 && c <= 1759 || c >= 1760 && c <= 1764 || c >= 1767 && c <= 1768 || c >= 1770 && c <= 1773 || c >= 2305 && c <= 2307 || c == 2364 || c >= 2366 && c <= 2380 || c == 2381 || c >= 2385 && c <= 2388 || c >= 2402 && c <= 2403 || c >= 2433 && c <= 2435 || c == 2492 || c == 2494 || c == 2495 || c >= 2496 && c <= 2500 || c >= 2503 && c <= 2504 || c >= 2507 && c <= 2509 || c == 2519 || c >= 2530 && c <= 2531 || c == 2562 || c == 2620 || c == 2622 || c == 2623 || c >= 2624 && c <= 2626 || c >= 2631 && c <= 2632 || c >= 2635 && c <= 2637 || c >= 2672 && c <= 2673 || c >= 2689 && c <= 2691 || c == 2748 || c >= 2750 && c <= 2757 || c >= 2759 && c <= 2761 || c >= 2763 && c <= 2765 || c >= 2817 && c <= 2819 || c == 2876 || c >= 2878 && c <= 2883 || c >= 2887 && c <= 2888 || c >= 2891 && c <= 2893 || c >= 2902 && c <= 2903 || c >= 2946 && c <= 2947 || c >= 3006 && c <= 3010 || c >= 3014 && c <= 3016 || c >= 3018 && c <= 3021 || c == 3031 || c >= 3073 && c <= 3075 || c >= 3134 && c <= 3140 || c >= 3142 && c <= 3144 || c >= 3146 && c <= 3149 || c >= 3157 && c <= 3158 || c >= 3202 && c <= 3203 || c >= 3262 && c <= 3268 || c >= 3270 && c <= 3272 || c >= 3274 && c <= 3277 || c >= 3285 && c <= 3286 || c >= 3330 && c <= 3331 || c >= 3390 && c <= 3395 || c >= 3398 && c <= 3400 || c >= 3402 && c <= 3405 || c == 3415 || c == 3633 || c >= 3636 && c <= 3642 || c >= 3655 && c <= 3662 || c == 3761 || c >= 3764 && c <= 3769 || c >= 3771 && c <= 3772 || c >= 3784 && c <= 3789 || c >= 3864 && c <= 3865 || c == 3893 || c == 3895 || c == 3897 || c == 3902 || c == 3903 || c >= 3953 && c <= 3972 || c >= 3974 && c <= 3979 || c >= 3984 && c <= 3989 || c == 3991 || c >= 3993 && c <= 4013 || c >= 4017 && c <= 4023 || c == 4025 || c >= 8400 && c <= 8412 || c == 8417 || c >= 12330 && c <= 12335 || c == 12441 || c == 12442 || c == 183 || c == 720 || c == 721 || c == 903 || c == 1600 || c == 3654 || c == 3782 || c == 12293 || c >= 12337 && c <= 12341 || c >= 12445 && c <= 12446 || c >= 12540 && c <= 12542; + }; + Utilities.coalesceText = function(n) { + for (var m = n.firstChild; m != null; m = m.nextSibling) { + if (m.nodeType == NodeTypes.TEXT_NODE || m.nodeType == NodeTypes.CDATA_SECTION_NODE) { + var s = m.nodeValue; + var first = m; + m = m.nextSibling; + while (m != null && (m.nodeType == NodeTypes.TEXT_NODE || m.nodeType == NodeTypes.CDATA_SECTION_NODE)) { + s += m.nodeValue; + var del = m; + m = m.nextSibling; + del.parentNode.removeChild(del); + } + if (first.nodeType == NodeTypes.CDATA_SECTION_NODE) { + var p = first.parentNode; + if (first.nextSibling == null) { + p.removeChild(first); + p.appendChild(p.ownerDocument.createTextNode(s)); + } else { + var next = first.nextSibling; + p.removeChild(first); + p.insertBefore(p.ownerDocument.createTextNode(s), next); + } + } else { + first.nodeValue = s; + } + if (m == null) { + break; + } + } else if (m.nodeType == NodeTypes.ELEMENT_NODE) { + Utilities.coalesceText(m); + } + } + }; + Utilities.instance_of = function(o, c) { + while (o != null) { + if (o.constructor === c) { + return true; + } + if (o === Object) { + return false; + } + o = o.constructor.superclass; + } + return false; + }; + Utilities.getElementById = function(n, id) { + if (n.nodeType == NodeTypes.ELEMENT_NODE) { + if (n.getAttribute("id") == id || n.getAttributeNS(null, "id") == id) { + return n; + } + } + for (var m = n.firstChild; m != null; m = m.nextSibling) { + var res = Utilities.getElementById(m, id); + if (res != null) { + return res; + } + } + return null; + }; + var XPathException = function() { + function getMessage(code, exception) { + var msg = exception ? ": " + exception.toString() : ""; + switch (code) { + case XPathException2.INVALID_EXPRESSION_ERR: + return "Invalid expression" + msg; + case XPathException2.TYPE_ERR: + return "Type error" + msg; + } + return null; + } + function XPathException2(code, error, message) { + var err = Error.call(this, getMessage(code, error) || message); + err.code = code; + err.exception = error; + return err; + } + XPathException2.prototype = Object.create(Error.prototype); + XPathException2.prototype.constructor = XPathException2; + XPathException2.superclass = Error; + XPathException2.prototype.toString = function() { + return this.message; + }; + XPathException2.fromMessage = function(message, error) { + return new XPathException2(null, error, message); + }; + XPathException2.INVALID_EXPRESSION_ERR = 51; + XPathException2.TYPE_ERR = 52; + return XPathException2; + }(); + XPathExpression.prototype = {}; + XPathExpression.prototype.constructor = XPathExpression; + XPathExpression.superclass = Object.prototype; + function XPathExpression(e, r, p) { + this.xpath = p.parse(e); + this.context = new XPathContext(); + this.context.namespaceResolver = new XPathNSResolverWrapper(r); + } + XPathExpression.getOwnerDocument = function(n) { + return n.nodeType === NodeTypes.DOCUMENT_NODE ? n : n.ownerDocument; + }; + XPathExpression.detectHtmlDom = function(n) { + if (!n) { + return false; + } + var doc = XPathExpression.getOwnerDocument(n); + try { + return doc.implementation.hasFeature("HTML", "2.0"); + } catch (e) { + return true; + } + }; + XPathExpression.prototype.evaluate = function(n, t, res) { + this.context.expressionContextNode = n; + this.context.caseInsensitive = XPathExpression.detectHtmlDom(n); + var result = this.xpath.evaluate(this.context); + return new XPathResult(result, t); + }; + XPathNSResolverWrapper.prototype = {}; + XPathNSResolverWrapper.prototype.constructor = XPathNSResolverWrapper; + XPathNSResolverWrapper.superclass = Object.prototype; + function XPathNSResolverWrapper(r) { + this.xpathNSResolver = r; + } + XPathNSResolverWrapper.prototype.getNamespace = function(prefix, n) { + if (this.xpathNSResolver == null) { + return null; + } + return this.xpathNSResolver.lookupNamespaceURI(prefix); + }; + NodeXPathNSResolver.prototype = {}; + NodeXPathNSResolver.prototype.constructor = NodeXPathNSResolver; + NodeXPathNSResolver.superclass = Object.prototype; + function NodeXPathNSResolver(n) { + this.node = n; + this.namespaceResolver = new NamespaceResolver(); + } + NodeXPathNSResolver.prototype.lookupNamespaceURI = function(prefix) { + return this.namespaceResolver.getNamespace(prefix, this.node); + }; + XPathResult.prototype = {}; + XPathResult.prototype.constructor = XPathResult; + XPathResult.superclass = Object.prototype; + function XPathResult(v, t) { + if (t == XPathResult.ANY_TYPE) { + if (v.constructor === XString) { + t = XPathResult.STRING_TYPE; + } else if (v.constructor === XNumber) { + t = XPathResult.NUMBER_TYPE; + } else if (v.constructor === XBoolean) { + t = XPathResult.BOOLEAN_TYPE; + } else if (v.constructor === XNodeSet) { + t = XPathResult.UNORDERED_NODE_ITERATOR_TYPE; + } + } + this.resultType = t; + switch (t) { + case XPathResult.NUMBER_TYPE: + this.numberValue = v.numberValue(); + return; + case XPathResult.STRING_TYPE: + this.stringValue = v.stringValue(); + return; + case XPathResult.BOOLEAN_TYPE: + this.booleanValue = v.booleanValue(); + return; + case XPathResult.ANY_UNORDERED_NODE_TYPE: + case XPathResult.FIRST_ORDERED_NODE_TYPE: + if (v.constructor === XNodeSet) { + this.singleNodeValue = v.first(); + return; + } + break; + case XPathResult.UNORDERED_NODE_ITERATOR_TYPE: + case XPathResult.ORDERED_NODE_ITERATOR_TYPE: + if (v.constructor === XNodeSet) { + this.invalidIteratorState = false; + this.nodes = v.toArray(); + this.iteratorIndex = 0; + return; + } + break; + case XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE: + case XPathResult.ORDERED_NODE_SNAPSHOT_TYPE: + if (v.constructor === XNodeSet) { + this.nodes = v.toArray(); + this.snapshotLength = this.nodes.length; + return; + } + break; + } + throw new XPathException(XPathException.TYPE_ERR); + } + ; + XPathResult.prototype.iterateNext = function() { + if (this.resultType != XPathResult.UNORDERED_NODE_ITERATOR_TYPE && this.resultType != XPathResult.ORDERED_NODE_ITERATOR_TYPE) { + throw new XPathException(XPathException.TYPE_ERR); + } + return this.nodes[this.iteratorIndex++]; + }; + XPathResult.prototype.snapshotItem = function(i) { + if (this.resultType != XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE && this.resultType != XPathResult.ORDERED_NODE_SNAPSHOT_TYPE) { + throw new XPathException(XPathException.TYPE_ERR); + } + return this.nodes[i]; + }; + XPathResult.ANY_TYPE = 0; + XPathResult.NUMBER_TYPE = 1; + XPathResult.STRING_TYPE = 2; + XPathResult.BOOLEAN_TYPE = 3; + XPathResult.UNORDERED_NODE_ITERATOR_TYPE = 4; + XPathResult.ORDERED_NODE_ITERATOR_TYPE = 5; + XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE = 6; + XPathResult.ORDERED_NODE_SNAPSHOT_TYPE = 7; + XPathResult.ANY_UNORDERED_NODE_TYPE = 8; + XPathResult.FIRST_ORDERED_NODE_TYPE = 9; + function installDOM3XPathSupport(doc, p) { + doc.createExpression = function(e, r) { + try { + return new XPathExpression(e, r, p); + } catch (e2) { + throw new XPathException(XPathException.INVALID_EXPRESSION_ERR, e2); + } + }; + doc.createNSResolver = function(n) { + return new NodeXPathNSResolver(n); + }; + doc.evaluate = function(e, cn, r, t, res) { + if (t < 0 || t > 9) { + throw { code: 0, toString: function() { + return "Request type not supported"; + } }; + } + return doc.createExpression(e, r, p).evaluate(cn, t, res); + }; + } + ; + try { + var shouldInstall = true; + try { + if (document.implementation && document.implementation.hasFeature && document.implementation.hasFeature("XPath", null)) { + shouldInstall = false; + } + } catch (e) { + } + if (shouldInstall) { + installDOM3XPathSupport(document, new XPathParser()); + } + } catch (e) { + } + installDOM3XPathSupport(exports3, new XPathParser()); + (function() { + var parser = new XPathParser(); + var defaultNSResolver = new NamespaceResolver(); + var defaultFunctionResolver = new FunctionResolver(); + var defaultVariableResolver = new VariableResolver(); + function makeNSResolverFromFunction(func) { + return { + getNamespace: function(prefix, node) { + var ns = func(prefix, node); + return ns || defaultNSResolver.getNamespace(prefix, node); + } + }; + } + function makeNSResolverFromObject(obj) { + return makeNSResolverFromFunction(obj.getNamespace.bind(obj)); + } + function makeNSResolverFromMap(map2) { + return makeNSResolverFromFunction(function(prefix) { + return map2[prefix]; + }); + } + function makeNSResolver(resolver) { + if (resolver && typeof resolver.getNamespace === "function") { + return makeNSResolverFromObject(resolver); + } + if (typeof resolver === "function") { + return makeNSResolverFromFunction(resolver); + } + if (typeof resolver === "object") { + return makeNSResolverFromMap(resolver); + } + return defaultNSResolver; + } + function convertValue(value) { + if (value === null || typeof value === "undefined" || value instanceof XString || value instanceof XBoolean || value instanceof XNumber || value instanceof XNodeSet) { + return value; + } + switch (typeof value) { + case "string": + return new XString(value); + case "boolean": + return new XBoolean(value); + case "number": + return new XNumber(value); + } + var ns = new XNodeSet(); + ns.addArray([].concat(value)); + return ns; + } + function makeEvaluator(func) { + return function(context) { + var args = Array.prototype.slice.call(arguments, 1).map(function(arg) { + return arg.evaluate(context); + }); + var result = func.apply(this, [].concat(context, args)); + return convertValue(result); + }; + } + function makeFunctionResolverFromFunction(func) { + return { + getFunction: function(name2, namespace) { + var found = func(name2, namespace); + if (found) { + return makeEvaluator(found); + } + return defaultFunctionResolver.getFunction(name2, namespace); + } + }; + } + function makeFunctionResolverFromObject(obj) { + return makeFunctionResolverFromFunction(obj.getFunction.bind(obj)); + } + function makeFunctionResolverFromMap(map2) { + return makeFunctionResolverFromFunction(function(name2) { + return map2[name2]; + }); + } + function makeFunctionResolver(resolver) { + if (resolver && typeof resolver.getFunction === "function") { + return makeFunctionResolverFromObject(resolver); + } + if (typeof resolver === "function") { + return makeFunctionResolverFromFunction(resolver); + } + if (typeof resolver === "object") { + return makeFunctionResolverFromMap(resolver); + } + return defaultFunctionResolver; + } + function makeVariableResolverFromFunction(func) { + return { + getVariable: function(name2, namespace) { + var value = func(name2, namespace); + return convertValue(value); + } + }; + } + function makeVariableResolver(resolver) { + if (resolver) { + if (typeof resolver.getVariable === "function") { + return makeVariableResolverFromFunction(resolver.getVariable.bind(resolver)); + } + if (typeof resolver === "function") { + return makeVariableResolverFromFunction(resolver); + } + if (typeof resolver === "object") { + return makeVariableResolverFromFunction(function(name2) { + return resolver[name2]; + }); + } + } + return defaultVariableResolver; + } + function copyIfPresent(prop, dest, source) { + if (prop in source) { + dest[prop] = source[prop]; + } + } + function makeContext(options) { + var context = new XPathContext(); + if (options) { + context.namespaceResolver = makeNSResolver(options.namespaces); + context.functionResolver = makeFunctionResolver(options.functions); + context.variableResolver = makeVariableResolver(options.variables); + context.expressionContextNode = options.node; + copyIfPresent("allowAnyNamespaceForNoPrefix", context, options); + copyIfPresent("isHtml", context, options); + } else { + context.namespaceResolver = defaultNSResolver; + } + return context; + } + function evaluate(parsedExpression, options) { + var context = makeContext(options); + return parsedExpression.evaluate(context); + } + var evaluatorPrototype = { + evaluate: function(options) { + return evaluate(this.expression, options); + }, + evaluateNumber: function(options) { + return this.evaluate(options).numberValue(); + }, + evaluateString: function(options) { + return this.evaluate(options).stringValue(); + }, + evaluateBoolean: function(options) { + return this.evaluate(options).booleanValue(); + }, + evaluateNodeSet: function(options) { + return this.evaluate(options).nodeset(); + }, + select: function(options) { + return this.evaluateNodeSet(options).toArray(); + }, + select1: function(options) { + return this.select(options)[0]; + } + }; + function parse(xpath3) { + var parsed = parser.parse(xpath3); + return Object.create(evaluatorPrototype, { + expression: { + value: parsed + } + }); + } + exports3.parse = parse; + })(); + assign( + exports3, + { + XPath, + XPathParser, + XPathResult, + Step, + PathExpr, + NodeTest, + LocationPath, + OrOperation, + AndOperation, + BarOperation, + EqualsOperation, + NotEqualOperation, + LessThanOperation, + GreaterThanOperation, + LessThanOrEqualOperation, + GreaterThanOrEqualOperation, + PlusOperation, + MinusOperation, + MultiplyOperation, + DivOperation, + ModOperation, + UnaryMinusOperation, + FunctionCall, + VariableReference, + XPathContext, + XNodeSet, + XBoolean, + XString, + XNumber, + NamespaceResolver, + FunctionResolver, + VariableResolver, + Utilities + } + ); + exports3.select = function(e, doc, single) { + return exports3.selectWithResolver(e, doc, null, single); + }; + exports3.useNamespaces = function(mappings) { + var resolver = { + mappings: mappings || {}, + lookupNamespaceURI: function(prefix) { + return this.mappings[prefix]; + } + }; + return function(e, doc, single) { + return exports3.selectWithResolver(e, doc, resolver, single); + }; + }; + exports3.selectWithResolver = function(e, doc, resolver, single) { + var expression = new XPathExpression(e, resolver, new XPathParser()); + var type = XPathResult.ANY_TYPE; + var result = expression.evaluate(doc, type, null); + if (result.resultType == XPathResult.STRING_TYPE) { + result = result.stringValue; + } else if (result.resultType == XPathResult.NUMBER_TYPE) { + result = result.numberValue; + } else if (result.resultType == XPathResult.BOOLEAN_TYPE) { + result = result.booleanValue; + } else { + result = result.nodes; + if (single) { + result = result[0]; + } + } + return result; + }; + exports3.select1 = function(e, doc) { + return exports3.select(e, doc, true); + }; + var isArrayOfNodes = function(value) { + return Array.isArray(value) && value.every(isNodeLike); + }; + var isNodeOfType = function(type) { + return function(value) { + return isNodeLike(value) && value.nodeType === type; + }; + }; + assign( + exports3, + { + isNodeLike, + isArrayOfNodes, + isElement: isNodeOfType(NodeTypes.ELEMENT_NODE), + isAttribute: isNodeOfType(NodeTypes.ATTRIBUTE_NODE), + isTextNode: isNodeOfType(NodeTypes.TEXT_NODE), + isCDATASection: isNodeOfType(NodeTypes.CDATA_SECTION_NODE), + isProcessingInstruction: isNodeOfType(NodeTypes.PROCESSING_INSTRUCTION_NODE), + isComment: isNodeOfType(NodeTypes.COMMENT_NODE), + isDocumentNode: isNodeOfType(NodeTypes.DOCUMENT_NODE), + isDocumentTypeNode: isNodeOfType(NodeTypes.DOCUMENT_TYPE_NODE), + isDocumentFragment: isNodeOfType(NodeTypes.DOCUMENT_FRAGMENT_NODE) + } + ); + })(xpath2); + } +}); + +// src/index.ts +var src_exports = {}; +__export(src_exports, { + pluginHookResponseFilter: () => pluginHookResponseFilter +}); +module.exports = __toCommonJS(src_exports); +var import_xmldom = __toESM(require_lib()); +var import_xpath = __toESM(require_xpath()); +function pluginHookResponseFilter(_ctx, { filter, body }) { + const doc = new import_xmldom.DOMParser().parseFromString(body, "text/xml"); + const result = import_xpath.default.select(filter, doc, false); + if (Array.isArray(result)) { + return result.map((r) => String(r)).join("\n"); + } else { + return String(result); + } +} +// Annotate the CommonJS export names for ESM import in node: +0 && (module.exports = { + pluginHookResponseFilter +}); diff --git a/src-tauri/vendored/plugins/filter-xpath/package.json b/src-tauri/vendored/plugins/filter-xpath/package.json new file mode 100644 index 00000000..ef4325d8 --- /dev/null +++ b/src-tauri/vendored/plugins/filter-xpath/package.json @@ -0,0 +1,18 @@ +{ + "name": "filter-xpath", + "private": true, + "version": "0.0.1", + "scripts": { + "build": "yaakcli build ./src/index.js" + }, + "dependencies": { + "@yaakapp/api": "^0.2.9", + "@xmldom/xmldom": "^0.8.10", + "xpath": "^0.0.34" + }, + "devDependencies": { + "@yaakapp/cli": "^0.0.42", + "@types/node": "^20.14.9", + "typescript": "^5.5.2" + } +} diff --git a/src-tauri/vendored/plugins/importer-curl/build/index.js b/src-tauri/vendored/plugins/importer-curl/build/index.js new file mode 100644 index 00000000..2586b29c --- /dev/null +++ b/src-tauri/vendored/plugins/importer-curl/build/index.js @@ -0,0 +1,560 @@ +"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 __commonJS = (cb, mod) => function __require() { + return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; +}; +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); + +// ../../node_modules/shell-quote/quote.js +var require_quote = __commonJS({ + "../../node_modules/shell-quote/quote.js"(exports2, module2) { + "use strict"; + module2.exports = function quote(xs) { + return xs.map(function(s) { + if (s && typeof s === "object") { + return s.op.replace(/(.)/g, "\\$1"); + } + if (/["\s]/.test(s) && !/'/.test(s)) { + return "'" + s.replace(/(['\\])/g, "\\$1") + "'"; + } + if (/["'\s]/.test(s)) { + return '"' + s.replace(/(["\\$`!])/g, "\\$1") + '"'; + } + return String(s).replace(/([A-Za-z]:)?([#!"$&'()*,:;<=>?@[\\\]^`{|}])/g, "$1\\$2"); + }).join(" "); + }; + } +}); + +// ../../node_modules/shell-quote/parse.js +var require_parse = __commonJS({ + "../../node_modules/shell-quote/parse.js"(exports2, module2) { + "use strict"; + var CONTROL = "(?:" + [ + "\\|\\|", + "\\&\\&", + ";;", + "\\|\\&", + "\\<\\(", + "\\<\\<\\<", + ">>", + ">\\&", + "<\\&", + "[&;()|<>]" + ].join("|") + ")"; + var controlRE = new RegExp("^" + CONTROL + "$"); + var META = "|&;()<> \\t"; + var SINGLE_QUOTE = '"((\\\\"|[^"])*?)"'; + var DOUBLE_QUOTE = "'((\\\\'|[^'])*?)'"; + var hash = /^#$/; + var SQ = "'"; + var DQ = '"'; + var DS = "$"; + var TOKEN = ""; + var mult = 4294967296; + for (i = 0; i < 4; i++) { + TOKEN += (mult * Math.random()).toString(16); + } + var i; + var startsWithToken = new RegExp("^" + TOKEN); + function matchAll(s, r) { + var origIndex = r.lastIndex; + var matches = []; + var matchObj; + while (matchObj = r.exec(s)) { + matches.push(matchObj); + if (r.lastIndex === matchObj.index) { + r.lastIndex += 1; + } + } + r.lastIndex = origIndex; + return matches; + } + function getVar(env, pre, key) { + var r = typeof env === "function" ? env(key) : env[key]; + if (typeof r === "undefined" && key != "") { + r = ""; + } else if (typeof r === "undefined") { + r = "$"; + } + if (typeof r === "object") { + return pre + TOKEN + JSON.stringify(r) + TOKEN; + } + return pre + r; + } + function parseInternal(string, env, opts) { + if (!opts) { + opts = {}; + } + var BS = opts.escape || "\\"; + var BAREWORD = "(\\" + BS + `['"` + META + `]|[^\\s'"` + META + "])+"; + var chunker = new RegExp([ + "(" + CONTROL + ")", + // control chars + "(" + BAREWORD + "|" + SINGLE_QUOTE + "|" + DOUBLE_QUOTE + ")+" + ].join("|"), "g"); + var matches = matchAll(string, chunker); + if (matches.length === 0) { + return []; + } + if (!env) { + env = {}; + } + var commented = false; + return matches.map(function(match) { + var s = match[0]; + if (!s || commented) { + return void 0; + } + if (controlRE.test(s)) { + return { op: s }; + } + var quote = false; + var esc = false; + var out = ""; + var isGlob = false; + var i2; + function parseEnvVar() { + i2 += 1; + var varend; + var varname; + var char = s.charAt(i2); + if (char === "{") { + i2 += 1; + if (s.charAt(i2) === "}") { + throw new Error("Bad substitution: " + s.slice(i2 - 2, i2 + 1)); + } + varend = s.indexOf("}", i2); + if (varend < 0) { + throw new Error("Bad substitution: " + s.slice(i2)); + } + varname = s.slice(i2, varend); + i2 = varend; + } else if (/[*@#?$!_-]/.test(char)) { + varname = char; + i2 += 1; + } else { + var slicedFromI = s.slice(i2); + varend = slicedFromI.match(/[^\w\d_]/); + if (!varend) { + varname = slicedFromI; + i2 = s.length; + } else { + varname = slicedFromI.slice(0, varend.index); + i2 += varend.index - 1; + } + } + return getVar(env, "", varname); + } + for (i2 = 0; i2 < s.length; i2++) { + var c = s.charAt(i2); + isGlob = isGlob || !quote && (c === "*" || c === "?"); + if (esc) { + out += c; + esc = false; + } else if (quote) { + if (c === quote) { + quote = false; + } else if (quote == SQ) { + out += c; + } else { + if (c === BS) { + i2 += 1; + c = s.charAt(i2); + if (c === DQ || c === BS || c === DS) { + out += c; + } else { + out += BS + c; + } + } else if (c === DS) { + out += parseEnvVar(); + } else { + out += c; + } + } + } else if (c === DQ || c === SQ) { + quote = c; + } else if (controlRE.test(c)) { + return { op: s }; + } else if (hash.test(c)) { + commented = true; + var commentObj = { comment: string.slice(match.index + i2 + 1) }; + if (out.length) { + return [out, commentObj]; + } + return [commentObj]; + } else if (c === BS) { + esc = true; + } else if (c === DS) { + out += parseEnvVar(); + } else { + out += c; + } + } + if (isGlob) { + return { op: "glob", pattern: out }; + } + return out; + }).reduce(function(prev, arg) { + return typeof arg === "undefined" ? prev : prev.concat(arg); + }, []); + } + module2.exports = function parse2(s, env, opts) { + var mapped = parseInternal(s, env, opts); + if (typeof env !== "function") { + return mapped; + } + return mapped.reduce(function(acc, s2) { + if (typeof s2 === "object") { + return acc.concat(s2); + } + var xs = s2.split(RegExp("(" + TOKEN + ".*?" + TOKEN + ")", "g")); + if (xs.length === 1) { + return acc.concat(xs[0]); + } + return acc.concat(xs.filter(Boolean).map(function(x) { + if (startsWithToken.test(x)) { + return JSON.parse(x.split(TOKEN)[1]); + } + return x; + })); + }, []); + }; + } +}); + +// ../../node_modules/shell-quote/index.js +var require_shell_quote = __commonJS({ + "../../node_modules/shell-quote/index.js"(exports2) { + "use strict"; + exports2.quote = require_quote(); + exports2.parse = require_parse(); + } +}); + +// src/index.ts +var src_exports = {}; +__export(src_exports, { + pluginHookImport: () => pluginHookImport +}); +module.exports = __toCommonJS(src_exports); +var import_shell_quote = __toESM(require_shell_quote()); +var DATA_FLAGS = ["d", "data", "data-raw", "data-urlencode", "data-binary", "data-ascii"]; +var SUPPORTED_ARGS = [ + ["url"], + // Specify the URL explicitly + ["user", "u"], + // Authentication + ["digest"], + // Apply auth as digest + ["header", "H"], + ["cookie", "b"], + ["get", "G"], + // Put the post data in the URL + ["d", "data"], + // Add url encoded data + ["data-raw"], + ["data-urlencode"], + ["data-binary"], + ["data-ascii"], + ["form", "F"], + // Add multipart data + ["request", "X"], + // Request method + DATA_FLAGS +].flatMap((v) => v); +function pluginHookImport(ctx, rawData) { + if (!rawData.match(/^\s*curl /)) { + return null; + } + const commands = []; + const normalizedData = rawData.replace(/\ncurl/g, "; curl"); + let currentCommand = []; + const parsed = (0, import_shell_quote.parse)(normalizedData); + const normalizedParseEntries = parsed.flatMap((entry) => { + if (typeof entry === "string" && entry.startsWith("-") && !entry.startsWith("--") && entry.length > 2) { + return [entry.slice(0, 2), entry.slice(2)]; + } + return entry; + }); + for (const parseEntry of normalizedParseEntries) { + if (typeof parseEntry === "string") { + if (parseEntry.startsWith("$")) { + currentCommand.push(parseEntry.slice(1)); + } else { + currentCommand.push(parseEntry); + } + continue; + } + if ("comment" in parseEntry) { + continue; + } + const { op } = parseEntry; + if (op === ";") { + commands.push(currentCommand); + currentCommand = []; + continue; + } + if (op?.startsWith("$")) { + const str = op.slice(2, op.length - 1).replace(/\\'/g, "'"); + currentCommand.push(str); + continue; + } + if (op === "glob") { + currentCommand.push(parseEntry.pattern); + } + } + commands.push(currentCommand); + const workspace = { + model: "workspace", + id: generateId("workspace"), + name: "Curl Import" + }; + const requests = commands.filter((command) => command[0] === "curl").map((v) => importCommand(v, workspace.id)); + return { + resources: { + httpRequests: requests, + workspaces: [workspace] + } + }; +} +function importCommand(parseEntries, workspaceId) { + const pairsByName = {}; + const singletons = []; + for (let i = 1; i < parseEntries.length; i++) { + let parseEntry = parseEntries[i]; + if (typeof parseEntry === "string") { + parseEntry = parseEntry.trim(); + } + if (typeof parseEntry === "string" && parseEntry.match(/^-{1,2}[\w-]+/)) { + const isSingleDash = parseEntry[0] === "-" && parseEntry[1] !== "-"; + let name = parseEntry.replace(/^-{1,2}/, ""); + if (!SUPPORTED_ARGS.includes(name)) { + continue; + } + let value; + const nextEntry = parseEntries[i + 1]; + if (isSingleDash && name.length > 1) { + value = name.slice(1); + name = name.slice(0, 1); + } else if (typeof nextEntry === "string" && !nextEntry.startsWith("-")) { + value = nextEntry; + i++; + } else { + value = true; + } + pairsByName[name] = pairsByName[name] || []; + pairsByName[name].push(value); + } else if (parseEntry) { + singletons.push(parseEntry); + } + } + let urlParameters; + let url; + const urlArg = getPairValue(pairsByName, singletons[0] || "", ["url"]); + const [baseUrl, search] = splitOnce(urlArg, "?"); + urlParameters = search?.split("&").map((p) => { + const v = splitOnce(p, "="); + return { name: decodeURIComponent(v[0] ?? ""), value: decodeURIComponent(v[1] ?? ""), enabled: true }; + }) ?? []; + url = baseUrl ?? urlArg; + const [username, password] = getPairValue(pairsByName, "", ["u", "user"]).split(/:(.*)$/); + const isDigest = getPairValue(pairsByName, false, ["digest"]); + const authenticationType = username ? isDigest ? "digest" : "basic" : null; + const authentication = username ? { + username: username.trim(), + password: (password ?? "").trim() + } : {}; + const headers = [ + ...pairsByName["header"] || [], + ...pairsByName["H"] || [] + ].map((header) => { + const [name, value] = header.split(/:(.*)$/); + if (!value) { + return { + name: (name ?? "").trim().replace(/;$/, ""), + value: "", + enabled: true + }; + } + return { + name: (name ?? "").trim(), + value: value.trim(), + enabled: true + }; + }); + const cookieHeaderValue = [ + ...pairsByName["cookie"] || [], + ...pairsByName["b"] || [] + ].map((str) => { + const name = str.split("=", 1)[0]; + const value = str.replace(`${name}=`, ""); + return `${name}=${value}`; + }).join("; "); + const existingCookieHeader = headers.find((header) => header.name.toLowerCase() === "cookie"); + if (cookieHeaderValue && existingCookieHeader) { + existingCookieHeader.value += `; ${cookieHeaderValue}`; + } else if (cookieHeaderValue) { + headers.push({ + name: "Cookie", + value: cookieHeaderValue, + enabled: true + }); + } + const dataParameters = pairsToDataParameters(pairsByName); + const contentTypeHeader = headers.find((header) => header.name.toLowerCase() === "content-type"); + const mimeType = contentTypeHeader ? contentTypeHeader.value.split(";")[0] : null; + const formDataParams = [ + ...pairsByName["form"] || [], + ...pairsByName["F"] || [] + ].map((str) => { + const parts = str.split("="); + const name = parts[0] ?? ""; + const value = parts[1] ?? ""; + const item = { + name, + enabled: true + }; + if (value.indexOf("@") === 0) { + item["file"] = value.slice(1); + } else { + item["value"] = value; + } + return item; + }); + let body = {}; + let bodyType = null; + const bodyAsGET = getPairValue(pairsByName, false, ["G", "get"]); + if (dataParameters.length > 0 && bodyAsGET) { + urlParameters.push(...dataParameters); + } else if (dataParameters.length > 0 && (mimeType == null || mimeType === "application/x-www-form-urlencoded")) { + bodyType = mimeType ?? "application/x-www-form-urlencoded"; + body = { + form: dataParameters.map((parameter) => ({ + ...parameter, + name: decodeURIComponent(parameter.name || ""), + value: decodeURIComponent(parameter.value || "") + })) + }; + headers.push({ + name: "Content-Type", + value: "application/x-www-form-urlencoded", + enabled: true + }); + } else if (dataParameters.length > 0) { + bodyType = mimeType === "application/json" || mimeType === "text/xml" || mimeType === "text/plain" ? mimeType : "other"; + body = { + text: dataParameters.map(({ name, value }) => name && value ? `${name}=${value}` : name || value).join("&") + }; + } else if (formDataParams.length) { + bodyType = mimeType ?? "multipart/form-data"; + body = { + form: formDataParams + }; + if (mimeType == null) { + headers.push({ + name: "Content-Type", + value: "multipart/form-data", + enabled: true + }); + } + } + let method = getPairValue(pairsByName, "", ["X", "request"]).toUpperCase(); + if (method === "" && body) { + method = "text" in body || "form" in body ? "POST" : "GET"; + } + const request = { + id: generateId("http_request"), + model: "http_request", + workspaceId, + name: "", + urlParameters, + url, + method, + headers, + authentication, + authenticationType, + body, + bodyType, + folderId: null, + sortPriority: 0 + }; + return request; +} +function pairsToDataParameters(keyedPairs) { + let dataParameters = []; + for (const flagName of DATA_FLAGS) { + const pairs = keyedPairs[flagName]; + if (!pairs || pairs.length === 0) { + continue; + } + for (const p of pairs) { + if (typeof p !== "string") continue; + const [name, value] = p.split("="); + if (p.startsWith("@")) { + dataParameters.push({ + name: name ?? "", + value: "", + filePath: p.slice(1), + enabled: true + }); + } else { + dataParameters.push({ + name: name ?? "", + value: flagName === "data-urlencode" ? encodeURIComponent(value ?? "") : value ?? "", + enabled: true + }); + } + } + } + return dataParameters; +} +var getPairValue = (pairsByName, defaultValue, names) => { + for (const name of names) { + if (pairsByName[name] && pairsByName[name].length) { + return pairsByName[name][0]; + } + } + return defaultValue; +}; +function splitOnce(str, sep) { + const index = str.indexOf(sep); + if (index > -1) { + return [str.slice(0, index), str.slice(index + 1)]; + } + return [str]; +} +var idCount = {}; +function generateId(model) { + idCount[model] = (idCount[model] ?? -1) + 1; + return `GENERATE_ID::${model.toUpperCase()}_${idCount[model]}`; +} +// Annotate the CommonJS export names for ESM import in node: +0 && (module.exports = { + pluginHookImport +}); diff --git a/src-tauri/vendored/plugins/importer-curl/package.json b/src-tauri/vendored/plugins/importer-curl/package.json new file mode 100644 index 00000000..188ade07 --- /dev/null +++ b/src-tauri/vendored/plugins/importer-curl/package.json @@ -0,0 +1,19 @@ +{ + "name": "importer-curl", + "private": true, + "version": "0.0.1", + "scripts": { + "build": "yaakcli build ./src/index.js" + }, + "dependencies": { + "@yaakapp/api": "^0.2.9", + "shell-quote": "^1.8.1" + }, + "devDependencies": { + "@yaakapp/cli": "^0.0.42", + "@types/node": "^20.14.9", + "@types/shell-quote": "^1.7.5", + "typescript": "^5.5.2", + "vitest": "^1.4.0" + } +} diff --git a/src-tauri/vendored/plugins/importer-insomnia/build/index.js b/src-tauri/vendored/plugins/importer-insomnia/build/index.js new file mode 100644 index 00000000..7608a3f7 --- /dev/null +++ b/src-tauri/vendored/plugins/importer-insomnia/build/index.js @@ -0,0 +1,7438 @@ +"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 __commonJS = (cb, mod) => function __require() { + return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; +}; +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); + +// ../../node_modules/yaml/dist/nodes/identity.js +var require_identity = __commonJS({ + "../../node_modules/yaml/dist/nodes/identity.js"(exports2) { + "use strict"; + var ALIAS = Symbol.for("yaml.alias"); + var DOC = Symbol.for("yaml.document"); + var MAP = Symbol.for("yaml.map"); + var PAIR = Symbol.for("yaml.pair"); + var SCALAR = Symbol.for("yaml.scalar"); + var SEQ = Symbol.for("yaml.seq"); + var NODE_TYPE = Symbol.for("yaml.node.type"); + var isAlias = (node) => !!node && typeof node === "object" && node[NODE_TYPE] === ALIAS; + var isDocument = (node) => !!node && typeof node === "object" && node[NODE_TYPE] === DOC; + var isMap = (node) => !!node && typeof node === "object" && node[NODE_TYPE] === MAP; + var isPair = (node) => !!node && typeof node === "object" && node[NODE_TYPE] === PAIR; + var isScalar = (node) => !!node && typeof node === "object" && node[NODE_TYPE] === SCALAR; + var isSeq = (node) => !!node && typeof node === "object" && node[NODE_TYPE] === SEQ; + function isCollection(node) { + if (node && typeof node === "object") + switch (node[NODE_TYPE]) { + case MAP: + case SEQ: + return true; + } + return false; + } + function isNode(node) { + if (node && typeof node === "object") + switch (node[NODE_TYPE]) { + case ALIAS: + case MAP: + case SCALAR: + case SEQ: + return true; + } + return false; + } + var hasAnchor = (node) => (isScalar(node) || isCollection(node)) && !!node.anchor; + exports2.ALIAS = ALIAS; + exports2.DOC = DOC; + exports2.MAP = MAP; + exports2.NODE_TYPE = NODE_TYPE; + exports2.PAIR = PAIR; + exports2.SCALAR = SCALAR; + exports2.SEQ = SEQ; + exports2.hasAnchor = hasAnchor; + exports2.isAlias = isAlias; + exports2.isCollection = isCollection; + exports2.isDocument = isDocument; + exports2.isMap = isMap; + exports2.isNode = isNode; + exports2.isPair = isPair; + exports2.isScalar = isScalar; + exports2.isSeq = isSeq; + } +}); + +// ../../node_modules/yaml/dist/visit.js +var require_visit = __commonJS({ + "../../node_modules/yaml/dist/visit.js"(exports2) { + "use strict"; + var identity = require_identity(); + var BREAK = Symbol("break visit"); + var SKIP = Symbol("skip children"); + var REMOVE = Symbol("remove node"); + function visit(node, visitor) { + const visitor_ = initVisitor(visitor); + if (identity.isDocument(node)) { + const cd = visit_(null, node.contents, visitor_, Object.freeze([node])); + if (cd === REMOVE) + node.contents = null; + } else + visit_(null, node, visitor_, Object.freeze([])); + } + visit.BREAK = BREAK; + visit.SKIP = SKIP; + visit.REMOVE = REMOVE; + function visit_(key, node, visitor, path) { + const ctrl = callVisitor(key, node, visitor, path); + if (identity.isNode(ctrl) || identity.isPair(ctrl)) { + replaceNode(key, path, ctrl); + return visit_(key, ctrl, visitor, path); + } + if (typeof ctrl !== "symbol") { + if (identity.isCollection(node)) { + path = Object.freeze(path.concat(node)); + for (let i = 0; i < node.items.length; ++i) { + const ci = visit_(i, node.items[i], visitor, path); + if (typeof ci === "number") + i = ci - 1; + else if (ci === BREAK) + return BREAK; + else if (ci === REMOVE) { + node.items.splice(i, 1); + i -= 1; + } + } + } else if (identity.isPair(node)) { + path = Object.freeze(path.concat(node)); + const ck = visit_("key", node.key, visitor, path); + if (ck === BREAK) + return BREAK; + else if (ck === REMOVE) + node.key = null; + const cv = visit_("value", node.value, visitor, path); + if (cv === BREAK) + return BREAK; + else if (cv === REMOVE) + node.value = null; + } + } + return ctrl; + } + async function visitAsync(node, visitor) { + const visitor_ = initVisitor(visitor); + if (identity.isDocument(node)) { + const cd = await visitAsync_(null, node.contents, visitor_, Object.freeze([node])); + if (cd === REMOVE) + node.contents = null; + } else + await visitAsync_(null, node, visitor_, Object.freeze([])); + } + visitAsync.BREAK = BREAK; + visitAsync.SKIP = SKIP; + visitAsync.REMOVE = REMOVE; + async function visitAsync_(key, node, visitor, path) { + const ctrl = await callVisitor(key, node, visitor, path); + if (identity.isNode(ctrl) || identity.isPair(ctrl)) { + replaceNode(key, path, ctrl); + return visitAsync_(key, ctrl, visitor, path); + } + if (typeof ctrl !== "symbol") { + if (identity.isCollection(node)) { + path = Object.freeze(path.concat(node)); + for (let i = 0; i < node.items.length; ++i) { + const ci = await visitAsync_(i, node.items[i], visitor, path); + if (typeof ci === "number") + i = ci - 1; + else if (ci === BREAK) + return BREAK; + else if (ci === REMOVE) { + node.items.splice(i, 1); + i -= 1; + } + } + } else if (identity.isPair(node)) { + path = Object.freeze(path.concat(node)); + const ck = await visitAsync_("key", node.key, visitor, path); + if (ck === BREAK) + return BREAK; + else if (ck === REMOVE) + node.key = null; + const cv = await visitAsync_("value", node.value, visitor, path); + if (cv === BREAK) + return BREAK; + else if (cv === REMOVE) + node.value = null; + } + } + return ctrl; + } + function initVisitor(visitor) { + if (typeof visitor === "object" && (visitor.Collection || visitor.Node || visitor.Value)) { + return Object.assign({ + Alias: visitor.Node, + Map: visitor.Node, + Scalar: visitor.Node, + Seq: visitor.Node + }, visitor.Value && { + Map: visitor.Value, + Scalar: visitor.Value, + Seq: visitor.Value + }, visitor.Collection && { + Map: visitor.Collection, + Seq: visitor.Collection + }, visitor); + } + return visitor; + } + function callVisitor(key, node, visitor, path) { + if (typeof visitor === "function") + return visitor(key, node, path); + if (identity.isMap(node)) + return visitor.Map?.(key, node, path); + if (identity.isSeq(node)) + return visitor.Seq?.(key, node, path); + if (identity.isPair(node)) + return visitor.Pair?.(key, node, path); + if (identity.isScalar(node)) + return visitor.Scalar?.(key, node, path); + if (identity.isAlias(node)) + return visitor.Alias?.(key, node, path); + return void 0; + } + function replaceNode(key, path, node) { + const parent = path[path.length - 1]; + if (identity.isCollection(parent)) { + parent.items[key] = node; + } else if (identity.isPair(parent)) { + if (key === "key") + parent.key = node; + else + parent.value = node; + } else if (identity.isDocument(parent)) { + parent.contents = node; + } else { + const pt = identity.isAlias(parent) ? "alias" : "scalar"; + throw new Error(`Cannot replace node with ${pt} parent`); + } + } + exports2.visit = visit; + exports2.visitAsync = visitAsync; + } +}); + +// ../../node_modules/yaml/dist/doc/directives.js +var require_directives = __commonJS({ + "../../node_modules/yaml/dist/doc/directives.js"(exports2) { + "use strict"; + var identity = require_identity(); + var visit = require_visit(); + var escapeChars = { + "!": "%21", + ",": "%2C", + "[": "%5B", + "]": "%5D", + "{": "%7B", + "}": "%7D" + }; + var escapeTagName = (tn) => tn.replace(/[!,[\]{}]/g, (ch) => escapeChars[ch]); + var Directives = class _Directives { + constructor(yaml, tags) { + this.docStart = null; + this.docEnd = false; + this.yaml = Object.assign({}, _Directives.defaultYaml, yaml); + this.tags = Object.assign({}, _Directives.defaultTags, tags); + } + clone() { + const copy = new _Directives(this.yaml, this.tags); + copy.docStart = this.docStart; + return copy; + } + /** + * During parsing, get a Directives instance for the current document and + * update the stream state according to the current version's spec. + */ + atDocument() { + const res = new _Directives(this.yaml, this.tags); + switch (this.yaml.version) { + case "1.1": + this.atNextDocument = true; + break; + case "1.2": + this.atNextDocument = false; + this.yaml = { + explicit: _Directives.defaultYaml.explicit, + version: "1.2" + }; + this.tags = Object.assign({}, _Directives.defaultTags); + break; + } + return res; + } + /** + * @param onError - May be called even if the action was successful + * @returns `true` on success + */ + add(line, onError) { + if (this.atNextDocument) { + this.yaml = { explicit: _Directives.defaultYaml.explicit, version: "1.1" }; + this.tags = Object.assign({}, _Directives.defaultTags); + this.atNextDocument = false; + } + const parts = line.trim().split(/[ \t]+/); + const name = parts.shift(); + switch (name) { + case "%TAG": { + if (parts.length !== 2) { + onError(0, "%TAG directive should contain exactly two parts"); + if (parts.length < 2) + return false; + } + const [handle, prefix] = parts; + this.tags[handle] = prefix; + return true; + } + case "%YAML": { + this.yaml.explicit = true; + if (parts.length !== 1) { + onError(0, "%YAML directive should contain exactly one part"); + return false; + } + const [version] = parts; + if (version === "1.1" || version === "1.2") { + this.yaml.version = version; + return true; + } else { + const isValid = /^\d+\.\d+$/.test(version); + onError(6, `Unsupported YAML version ${version}`, isValid); + return false; + } + } + default: + onError(0, `Unknown directive ${name}`, true); + return false; + } + } + /** + * Resolves a tag, matching handles to those defined in %TAG directives. + * + * @returns Resolved tag, which may also be the non-specific tag `'!'` or a + * `'!local'` tag, or `null` if unresolvable. + */ + tagName(source, onError) { + if (source === "!") + return "!"; + if (source[0] !== "!") { + onError(`Not a valid tag: ${source}`); + return null; + } + if (source[1] === "<") { + const verbatim = source.slice(2, -1); + if (verbatim === "!" || verbatim === "!!") { + onError(`Verbatim tags aren't resolved, so ${source} is invalid.`); + return null; + } + if (source[source.length - 1] !== ">") + onError("Verbatim tags must end with a >"); + return verbatim; + } + const [, handle, suffix] = source.match(/^(.*!)([^!]*)$/s); + if (!suffix) + onError(`The ${source} tag has no suffix`); + const prefix = this.tags[handle]; + if (prefix) { + try { + return prefix + decodeURIComponent(suffix); + } catch (error) { + onError(String(error)); + return null; + } + } + if (handle === "!") + return source; + onError(`Could not resolve tag: ${source}`); + return null; + } + /** + * Given a fully resolved tag, returns its printable string form, + * taking into account current tag prefixes and defaults. + */ + tagString(tag) { + for (const [handle, prefix] of Object.entries(this.tags)) { + if (tag.startsWith(prefix)) + return handle + escapeTagName(tag.substring(prefix.length)); + } + return tag[0] === "!" ? tag : `!<${tag}>`; + } + toString(doc) { + const lines = this.yaml.explicit ? [`%YAML ${this.yaml.version || "1.2"}`] : []; + const tagEntries = Object.entries(this.tags); + let tagNames; + if (doc && tagEntries.length > 0 && identity.isNode(doc.contents)) { + const tags = {}; + visit.visit(doc.contents, (_key, node) => { + if (identity.isNode(node) && node.tag) + tags[node.tag] = true; + }); + tagNames = Object.keys(tags); + } else + tagNames = []; + for (const [handle, prefix] of tagEntries) { + if (handle === "!!" && prefix === "tag:yaml.org,2002:") + continue; + if (!doc || tagNames.some((tn) => tn.startsWith(prefix))) + lines.push(`%TAG ${handle} ${prefix}`); + } + return lines.join("\n"); + } + }; + Directives.defaultYaml = { explicit: false, version: "1.2" }; + Directives.defaultTags = { "!!": "tag:yaml.org,2002:" }; + exports2.Directives = Directives; + } +}); + +// ../../node_modules/yaml/dist/doc/anchors.js +var require_anchors = __commonJS({ + "../../node_modules/yaml/dist/doc/anchors.js"(exports2) { + "use strict"; + var identity = require_identity(); + var visit = require_visit(); + function anchorIsValid(anchor) { + if (/[\x00-\x19\s,[\]{}]/.test(anchor)) { + const sa = JSON.stringify(anchor); + const msg = `Anchor must not contain whitespace or control characters: ${sa}`; + throw new Error(msg); + } + return true; + } + function anchorNames(root) { + const anchors = /* @__PURE__ */ new Set(); + visit.visit(root, { + Value(_key, node) { + if (node.anchor) + anchors.add(node.anchor); + } + }); + return anchors; + } + function findNewAnchor(prefix, exclude) { + for (let i = 1; true; ++i) { + const name = `${prefix}${i}`; + if (!exclude.has(name)) + return name; + } + } + function createNodeAnchors(doc, prefix) { + const aliasObjects = []; + const sourceObjects = /* @__PURE__ */ new Map(); + let prevAnchors = null; + return { + onAnchor: (source) => { + aliasObjects.push(source); + if (!prevAnchors) + prevAnchors = anchorNames(doc); + const anchor = findNewAnchor(prefix, prevAnchors); + prevAnchors.add(anchor); + return anchor; + }, + /** + * With circular references, the source node is only resolved after all + * of its child nodes are. This is why anchors are set only after all of + * the nodes have been created. + */ + setAnchors: () => { + for (const source of aliasObjects) { + const ref = sourceObjects.get(source); + if (typeof ref === "object" && ref.anchor && (identity.isScalar(ref.node) || identity.isCollection(ref.node))) { + ref.node.anchor = ref.anchor; + } else { + const error = new Error("Failed to resolve repeated object (this should not happen)"); + error.source = source; + throw error; + } + } + }, + sourceObjects + }; + } + exports2.anchorIsValid = anchorIsValid; + exports2.anchorNames = anchorNames; + exports2.createNodeAnchors = createNodeAnchors; + exports2.findNewAnchor = findNewAnchor; + } +}); + +// ../../node_modules/yaml/dist/doc/applyReviver.js +var require_applyReviver = __commonJS({ + "../../node_modules/yaml/dist/doc/applyReviver.js"(exports2) { + "use strict"; + function applyReviver(reviver, obj, key, val) { + if (val && typeof val === "object") { + if (Array.isArray(val)) { + for (let i = 0, len = val.length; i < len; ++i) { + const v0 = val[i]; + const v1 = applyReviver(reviver, val, String(i), v0); + if (v1 === void 0) + delete val[i]; + else if (v1 !== v0) + val[i] = v1; + } + } else if (val instanceof Map) { + for (const k of Array.from(val.keys())) { + const v0 = val.get(k); + const v1 = applyReviver(reviver, val, k, v0); + if (v1 === void 0) + val.delete(k); + else if (v1 !== v0) + val.set(k, v1); + } + } else if (val instanceof Set) { + for (const v0 of Array.from(val)) { + const v1 = applyReviver(reviver, val, v0, v0); + if (v1 === void 0) + val.delete(v0); + else if (v1 !== v0) { + val.delete(v0); + val.add(v1); + } + } + } else { + for (const [k, v0] of Object.entries(val)) { + const v1 = applyReviver(reviver, val, k, v0); + if (v1 === void 0) + delete val[k]; + else if (v1 !== v0) + val[k] = v1; + } + } + } + return reviver.call(obj, key, val); + } + exports2.applyReviver = applyReviver; + } +}); + +// ../../node_modules/yaml/dist/nodes/toJS.js +var require_toJS = __commonJS({ + "../../node_modules/yaml/dist/nodes/toJS.js"(exports2) { + "use strict"; + var identity = require_identity(); + function toJS(value, arg, ctx) { + if (Array.isArray(value)) + return value.map((v, i) => toJS(v, String(i), ctx)); + if (value && typeof value.toJSON === "function") { + if (!ctx || !identity.hasAnchor(value)) + return value.toJSON(arg, ctx); + const data = { aliasCount: 0, count: 1, res: void 0 }; + ctx.anchors.set(value, data); + ctx.onCreate = (res2) => { + data.res = res2; + delete ctx.onCreate; + }; + const res = value.toJSON(arg, ctx); + if (ctx.onCreate) + ctx.onCreate(res); + return res; + } + if (typeof value === "bigint" && !ctx?.keep) + return Number(value); + return value; + } + exports2.toJS = toJS; + } +}); + +// ../../node_modules/yaml/dist/nodes/Node.js +var require_Node = __commonJS({ + "../../node_modules/yaml/dist/nodes/Node.js"(exports2) { + "use strict"; + var applyReviver = require_applyReviver(); + var identity = require_identity(); + var toJS = require_toJS(); + var NodeBase = class { + constructor(type) { + Object.defineProperty(this, identity.NODE_TYPE, { value: type }); + } + /** Create a copy of this node. */ + clone() { + const copy = Object.create(Object.getPrototypeOf(this), Object.getOwnPropertyDescriptors(this)); + if (this.range) + copy.range = this.range.slice(); + return copy; + } + /** A plain JavaScript representation of this node. */ + toJS(doc, { mapAsMap, maxAliasCount, onAnchor, reviver } = {}) { + if (!identity.isDocument(doc)) + throw new TypeError("A document argument is required"); + const ctx = { + anchors: /* @__PURE__ */ new Map(), + doc, + keep: true, + mapAsMap: mapAsMap === true, + mapKeyWarned: false, + maxAliasCount: typeof maxAliasCount === "number" ? maxAliasCount : 100 + }; + const res = toJS.toJS(this, "", ctx); + if (typeof onAnchor === "function") + for (const { count, res: res2 } of ctx.anchors.values()) + onAnchor(res2, count); + return typeof reviver === "function" ? applyReviver.applyReviver(reviver, { "": res }, "", res) : res; + } + }; + exports2.NodeBase = NodeBase; + } +}); + +// ../../node_modules/yaml/dist/nodes/Alias.js +var require_Alias = __commonJS({ + "../../node_modules/yaml/dist/nodes/Alias.js"(exports2) { + "use strict"; + var anchors = require_anchors(); + var visit = require_visit(); + var identity = require_identity(); + var Node = require_Node(); + var toJS = require_toJS(); + var Alias = class extends Node.NodeBase { + constructor(source) { + super(identity.ALIAS); + this.source = source; + Object.defineProperty(this, "tag", { + set() { + throw new Error("Alias nodes cannot have tags"); + } + }); + } + /** + * Resolve the value of this alias within `doc`, finding the last + * instance of the `source` anchor before this node. + */ + resolve(doc) { + let found = void 0; + visit.visit(doc, { + Node: (_key, node) => { + if (node === this) + return visit.visit.BREAK; + if (node.anchor === this.source) + found = node; + } + }); + return found; + } + toJSON(_arg, ctx) { + if (!ctx) + return { source: this.source }; + const { anchors: anchors2, doc, maxAliasCount } = ctx; + const source = this.resolve(doc); + if (!source) { + const msg = `Unresolved alias (the anchor must be set before the alias): ${this.source}`; + throw new ReferenceError(msg); + } + let data = anchors2.get(source); + if (!data) { + toJS.toJS(source, null, ctx); + data = anchors2.get(source); + } + if (!data || data.res === void 0) { + const msg = "This should not happen: Alias anchor was not resolved?"; + throw new ReferenceError(msg); + } + if (maxAliasCount >= 0) { + data.count += 1; + if (data.aliasCount === 0) + data.aliasCount = getAliasCount(doc, source, anchors2); + if (data.count * data.aliasCount > maxAliasCount) { + const msg = "Excessive alias count indicates a resource exhaustion attack"; + throw new ReferenceError(msg); + } + } + return data.res; + } + toString(ctx, _onComment, _onChompKeep) { + const src = `*${this.source}`; + if (ctx) { + anchors.anchorIsValid(this.source); + if (ctx.options.verifyAliasOrder && !ctx.anchors.has(this.source)) { + const msg = `Unresolved alias (the anchor must be set before the alias): ${this.source}`; + throw new Error(msg); + } + if (ctx.implicitKey) + return `${src} `; + } + return src; + } + }; + function getAliasCount(doc, node, anchors2) { + if (identity.isAlias(node)) { + const source = node.resolve(doc); + const anchor = anchors2 && source && anchors2.get(source); + return anchor ? anchor.count * anchor.aliasCount : 0; + } else if (identity.isCollection(node)) { + let count = 0; + for (const item of node.items) { + const c = getAliasCount(doc, item, anchors2); + if (c > count) + count = c; + } + return count; + } else if (identity.isPair(node)) { + const kc = getAliasCount(doc, node.key, anchors2); + const vc = getAliasCount(doc, node.value, anchors2); + return Math.max(kc, vc); + } + return 1; + } + exports2.Alias = Alias; + } +}); + +// ../../node_modules/yaml/dist/nodes/Scalar.js +var require_Scalar = __commonJS({ + "../../node_modules/yaml/dist/nodes/Scalar.js"(exports2) { + "use strict"; + var identity = require_identity(); + var Node = require_Node(); + var toJS = require_toJS(); + var isScalarValue = (value) => !value || typeof value !== "function" && typeof value !== "object"; + var Scalar = class extends Node.NodeBase { + constructor(value) { + super(identity.SCALAR); + this.value = value; + } + toJSON(arg, ctx) { + return ctx?.keep ? this.value : toJS.toJS(this.value, arg, ctx); + } + toString() { + return String(this.value); + } + }; + Scalar.BLOCK_FOLDED = "BLOCK_FOLDED"; + Scalar.BLOCK_LITERAL = "BLOCK_LITERAL"; + Scalar.PLAIN = "PLAIN"; + Scalar.QUOTE_DOUBLE = "QUOTE_DOUBLE"; + Scalar.QUOTE_SINGLE = "QUOTE_SINGLE"; + exports2.Scalar = Scalar; + exports2.isScalarValue = isScalarValue; + } +}); + +// ../../node_modules/yaml/dist/doc/createNode.js +var require_createNode = __commonJS({ + "../../node_modules/yaml/dist/doc/createNode.js"(exports2) { + "use strict"; + var Alias = require_Alias(); + var identity = require_identity(); + var Scalar = require_Scalar(); + var defaultTagPrefix = "tag:yaml.org,2002:"; + function findTagObject(value, tagName, tags) { + if (tagName) { + const match = tags.filter((t) => t.tag === tagName); + const tagObj = match.find((t) => !t.format) ?? match[0]; + if (!tagObj) + throw new Error(`Tag ${tagName} not found`); + return tagObj; + } + return tags.find((t) => t.identify?.(value) && !t.format); + } + function createNode(value, tagName, ctx) { + if (identity.isDocument(value)) + value = value.contents; + if (identity.isNode(value)) + return value; + if (identity.isPair(value)) { + const map = ctx.schema[identity.MAP].createNode?.(ctx.schema, null, ctx); + map.items.push(value); + return map; + } + if (value instanceof String || value instanceof Number || value instanceof Boolean || typeof BigInt !== "undefined" && value instanceof BigInt) { + value = value.valueOf(); + } + const { aliasDuplicateObjects, onAnchor, onTagObj, schema, sourceObjects } = ctx; + let ref = void 0; + if (aliasDuplicateObjects && value && typeof value === "object") { + ref = sourceObjects.get(value); + if (ref) { + if (!ref.anchor) + ref.anchor = onAnchor(value); + return new Alias.Alias(ref.anchor); + } else { + ref = { anchor: null, node: null }; + sourceObjects.set(value, ref); + } + } + if (tagName?.startsWith("!!")) + tagName = defaultTagPrefix + tagName.slice(2); + let tagObj = findTagObject(value, tagName, schema.tags); + if (!tagObj) { + if (value && typeof value.toJSON === "function") { + value = value.toJSON(); + } + if (!value || typeof value !== "object") { + const node2 = new Scalar.Scalar(value); + if (ref) + ref.node = node2; + return node2; + } + tagObj = value instanceof Map ? schema[identity.MAP] : Symbol.iterator in Object(value) ? schema[identity.SEQ] : schema[identity.MAP]; + } + if (onTagObj) { + onTagObj(tagObj); + delete ctx.onTagObj; + } + const node = tagObj?.createNode ? tagObj.createNode(ctx.schema, value, ctx) : typeof tagObj?.nodeClass?.from === "function" ? tagObj.nodeClass.from(ctx.schema, value, ctx) : new Scalar.Scalar(value); + if (tagName) + node.tag = tagName; + else if (!tagObj.default) + node.tag = tagObj.tag; + if (ref) + ref.node = node; + return node; + } + exports2.createNode = createNode; + } +}); + +// ../../node_modules/yaml/dist/nodes/Collection.js +var require_Collection = __commonJS({ + "../../node_modules/yaml/dist/nodes/Collection.js"(exports2) { + "use strict"; + var createNode = require_createNode(); + var identity = require_identity(); + var Node = require_Node(); + function collectionFromPath(schema, path, value) { + let v = value; + for (let i = path.length - 1; i >= 0; --i) { + const k = path[i]; + if (typeof k === "number" && Number.isInteger(k) && k >= 0) { + const a = []; + a[k] = v; + v = a; + } else { + v = /* @__PURE__ */ new Map([[k, v]]); + } + } + return createNode.createNode(v, void 0, { + aliasDuplicateObjects: false, + keepUndefined: false, + onAnchor: () => { + throw new Error("This should not happen, please report a bug."); + }, + schema, + sourceObjects: /* @__PURE__ */ new Map() + }); + } + var isEmptyPath = (path) => path == null || typeof path === "object" && !!path[Symbol.iterator]().next().done; + var Collection = class extends Node.NodeBase { + constructor(type, schema) { + super(type); + Object.defineProperty(this, "schema", { + value: schema, + configurable: true, + enumerable: false, + writable: true + }); + } + /** + * Create a copy of this collection. + * + * @param schema - If defined, overwrites the original's schema + */ + clone(schema) { + const copy = Object.create(Object.getPrototypeOf(this), Object.getOwnPropertyDescriptors(this)); + if (schema) + copy.schema = schema; + copy.items = copy.items.map((it) => identity.isNode(it) || identity.isPair(it) ? it.clone(schema) : it); + if (this.range) + copy.range = this.range.slice(); + return copy; + } + /** + * Adds a value to the collection. For `!!map` and `!!omap` the value must + * be a Pair instance or a `{ key, value }` object, which may not have a key + * that already exists in the map. + */ + addIn(path, value) { + if (isEmptyPath(path)) + this.add(value); + else { + const [key, ...rest] = path; + const node = this.get(key, true); + if (identity.isCollection(node)) + node.addIn(rest, value); + else if (node === void 0 && this.schema) + this.set(key, collectionFromPath(this.schema, rest, value)); + else + throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`); + } + } + /** + * Removes a value from the collection. + * @returns `true` if the item was found and removed. + */ + deleteIn(path) { + const [key, ...rest] = path; + if (rest.length === 0) + return this.delete(key); + const node = this.get(key, true); + if (identity.isCollection(node)) + return node.deleteIn(rest); + else + throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`); + } + /** + * Returns item at `key`, or `undefined` if not found. By default unwraps + * scalar values from their surrounding node; to disable set `keepScalar` to + * `true` (collections are always returned intact). + */ + getIn(path, keepScalar) { + const [key, ...rest] = path; + const node = this.get(key, true); + if (rest.length === 0) + return !keepScalar && identity.isScalar(node) ? node.value : node; + else + return identity.isCollection(node) ? node.getIn(rest, keepScalar) : void 0; + } + hasAllNullValues(allowScalar) { + return this.items.every((node) => { + if (!identity.isPair(node)) + return false; + const n = node.value; + return n == null || allowScalar && identity.isScalar(n) && n.value == null && !n.commentBefore && !n.comment && !n.tag; + }); + } + /** + * Checks if the collection includes a value with the key `key`. + */ + hasIn(path) { + const [key, ...rest] = path; + if (rest.length === 0) + return this.has(key); + const node = this.get(key, true); + return identity.isCollection(node) ? node.hasIn(rest) : false; + } + /** + * Sets a value in this collection. For `!!set`, `value` needs to be a + * boolean to add/remove the item from the set. + */ + setIn(path, value) { + const [key, ...rest] = path; + if (rest.length === 0) { + this.set(key, value); + } else { + const node = this.get(key, true); + if (identity.isCollection(node)) + node.setIn(rest, value); + else if (node === void 0 && this.schema) + this.set(key, collectionFromPath(this.schema, rest, value)); + else + throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`); + } + } + }; + exports2.Collection = Collection; + exports2.collectionFromPath = collectionFromPath; + exports2.isEmptyPath = isEmptyPath; + } +}); + +// ../../node_modules/yaml/dist/stringify/stringifyComment.js +var require_stringifyComment = __commonJS({ + "../../node_modules/yaml/dist/stringify/stringifyComment.js"(exports2) { + "use strict"; + var stringifyComment = (str) => str.replace(/^(?!$)(?: $)?/gm, "#"); + function indentComment(comment, indent) { + if (/^\n+$/.test(comment)) + return comment.substring(1); + return indent ? comment.replace(/^(?! *$)/gm, indent) : comment; + } + var lineComment = (str, indent, comment) => str.endsWith("\n") ? indentComment(comment, indent) : comment.includes("\n") ? "\n" + indentComment(comment, indent) : (str.endsWith(" ") ? "" : " ") + comment; + exports2.indentComment = indentComment; + exports2.lineComment = lineComment; + exports2.stringifyComment = stringifyComment; + } +}); + +// ../../node_modules/yaml/dist/stringify/foldFlowLines.js +var require_foldFlowLines = __commonJS({ + "../../node_modules/yaml/dist/stringify/foldFlowLines.js"(exports2) { + "use strict"; + var FOLD_FLOW = "flow"; + var FOLD_BLOCK = "block"; + var FOLD_QUOTED = "quoted"; + function foldFlowLines(text, indent, mode = "flow", { indentAtStart, lineWidth = 80, minContentWidth = 20, onFold, onOverflow } = {}) { + if (!lineWidth || lineWidth < 0) + return text; + if (lineWidth < minContentWidth) + minContentWidth = 0; + const endStep = Math.max(1 + minContentWidth, 1 + lineWidth - indent.length); + if (text.length <= endStep) + return text; + const folds = []; + const escapedFolds = {}; + let end = lineWidth - indent.length; + if (typeof indentAtStart === "number") { + if (indentAtStart > lineWidth - Math.max(2, minContentWidth)) + folds.push(0); + else + end = lineWidth - indentAtStart; + } + let split = void 0; + let prev = void 0; + let overflow = false; + let i = -1; + let escStart = -1; + let escEnd = -1; + if (mode === FOLD_BLOCK) { + i = consumeMoreIndentedLines(text, i, indent.length); + if (i !== -1) + end = i + endStep; + } + for (let ch; ch = text[i += 1]; ) { + if (mode === FOLD_QUOTED && ch === "\\") { + escStart = i; + switch (text[i + 1]) { + case "x": + i += 3; + break; + case "u": + i += 5; + break; + case "U": + i += 9; + break; + default: + i += 1; + } + escEnd = i; + } + if (ch === "\n") { + if (mode === FOLD_BLOCK) + i = consumeMoreIndentedLines(text, i, indent.length); + end = i + indent.length + endStep; + split = void 0; + } else { + if (ch === " " && prev && prev !== " " && prev !== "\n" && prev !== " ") { + const next = text[i + 1]; + if (next && next !== " " && next !== "\n" && next !== " ") + split = i; + } + if (i >= end) { + if (split) { + folds.push(split); + end = split + endStep; + split = void 0; + } else if (mode === FOLD_QUOTED) { + while (prev === " " || prev === " ") { + prev = ch; + ch = text[i += 1]; + overflow = true; + } + const j = i > escEnd + 1 ? i - 2 : escStart - 1; + if (escapedFolds[j]) + return text; + folds.push(j); + escapedFolds[j] = true; + end = j + endStep; + split = void 0; + } else { + overflow = true; + } + } + } + prev = ch; + } + if (overflow && onOverflow) + onOverflow(); + if (folds.length === 0) + return text; + if (onFold) + onFold(); + let res = text.slice(0, folds[0]); + for (let i2 = 0; i2 < folds.length; ++i2) { + const fold = folds[i2]; + const end2 = folds[i2 + 1] || text.length; + if (fold === 0) + res = ` +${indent}${text.slice(0, end2)}`; + else { + if (mode === FOLD_QUOTED && escapedFolds[fold]) + res += `${text[fold]}\\`; + res += ` +${indent}${text.slice(fold + 1, end2)}`; + } + } + return res; + } + function consumeMoreIndentedLines(text, i, indent) { + let end = i; + let start = i + 1; + let ch = text[start]; + while (ch === " " || ch === " ") { + if (i < start + indent) { + ch = text[++i]; + } else { + do { + ch = text[++i]; + } while (ch && ch !== "\n"); + end = i; + start = i + 1; + ch = text[start]; + } + } + return end; + } + exports2.FOLD_BLOCK = FOLD_BLOCK; + exports2.FOLD_FLOW = FOLD_FLOW; + exports2.FOLD_QUOTED = FOLD_QUOTED; + exports2.foldFlowLines = foldFlowLines; + } +}); + +// ../../node_modules/yaml/dist/stringify/stringifyString.js +var require_stringifyString = __commonJS({ + "../../node_modules/yaml/dist/stringify/stringifyString.js"(exports2) { + "use strict"; + var Scalar = require_Scalar(); + var foldFlowLines = require_foldFlowLines(); + var getFoldOptions = (ctx, isBlock) => ({ + indentAtStart: isBlock ? ctx.indent.length : ctx.indentAtStart, + lineWidth: ctx.options.lineWidth, + minContentWidth: ctx.options.minContentWidth + }); + var containsDocumentMarker = (str) => /^(%|---|\.\.\.)/m.test(str); + function lineLengthOverLimit(str, lineWidth, indentLength) { + if (!lineWidth || lineWidth < 0) + return false; + const limit = lineWidth - indentLength; + const strLen = str.length; + if (strLen <= limit) + return false; + for (let i = 0, start = 0; i < strLen; ++i) { + if (str[i] === "\n") { + if (i - start > limit) + return true; + start = i + 1; + if (strLen - start <= limit) + return false; + } + } + return true; + } + function doubleQuotedString(value, ctx) { + const json = JSON.stringify(value); + if (ctx.options.doubleQuotedAsJSON) + return json; + const { implicitKey } = ctx; + const minMultiLineLength = ctx.options.doubleQuotedMinMultiLineLength; + const indent = ctx.indent || (containsDocumentMarker(value) ? " " : ""); + let str = ""; + let start = 0; + for (let i = 0, ch = json[i]; ch; ch = json[++i]) { + if (ch === " " && json[i + 1] === "\\" && json[i + 2] === "n") { + str += json.slice(start, i) + "\\ "; + i += 1; + start = i; + ch = "\\"; + } + if (ch === "\\") + switch (json[i + 1]) { + case "u": + { + str += json.slice(start, i); + const code = json.substr(i + 2, 4); + switch (code) { + case "0000": + str += "\\0"; + break; + case "0007": + str += "\\a"; + break; + case "000b": + str += "\\v"; + break; + case "001b": + str += "\\e"; + break; + case "0085": + str += "\\N"; + break; + case "00a0": + str += "\\_"; + break; + case "2028": + str += "\\L"; + break; + case "2029": + str += "\\P"; + break; + default: + if (code.substr(0, 2) === "00") + str += "\\x" + code.substr(2); + else + str += json.substr(i, 6); + } + i += 5; + start = i + 1; + } + break; + case "n": + if (implicitKey || json[i + 2] === '"' || json.length < minMultiLineLength) { + i += 1; + } else { + str += json.slice(start, i) + "\n\n"; + while (json[i + 2] === "\\" && json[i + 3] === "n" && json[i + 4] !== '"') { + str += "\n"; + i += 2; + } + str += indent; + if (json[i + 2] === " ") + str += "\\"; + i += 1; + start = i + 1; + } + break; + default: + i += 1; + } + } + str = start ? str + json.slice(start) : json; + return implicitKey ? str : foldFlowLines.foldFlowLines(str, indent, foldFlowLines.FOLD_QUOTED, getFoldOptions(ctx, false)); + } + function singleQuotedString(value, ctx) { + if (ctx.options.singleQuote === false || ctx.implicitKey && value.includes("\n") || /[ \t]\n|\n[ \t]/.test(value)) + return doubleQuotedString(value, ctx); + const indent = ctx.indent || (containsDocumentMarker(value) ? " " : ""); + const res = "'" + value.replace(/'/g, "''").replace(/\n+/g, `$& +${indent}`) + "'"; + return ctx.implicitKey ? res : foldFlowLines.foldFlowLines(res, indent, foldFlowLines.FOLD_FLOW, getFoldOptions(ctx, false)); + } + function quotedString(value, ctx) { + const { singleQuote } = ctx.options; + let qs; + if (singleQuote === false) + qs = doubleQuotedString; + else { + const hasDouble = value.includes('"'); + const hasSingle = value.includes("'"); + if (hasDouble && !hasSingle) + qs = singleQuotedString; + else if (hasSingle && !hasDouble) + qs = doubleQuotedString; + else + qs = singleQuote ? singleQuotedString : doubleQuotedString; + } + return qs(value, ctx); + } + var blockEndNewlines; + try { + blockEndNewlines = new RegExp("(^|(?\n"; + let chomp; + let endStart; + for (endStart = value.length; endStart > 0; --endStart) { + const ch = value[endStart - 1]; + if (ch !== "\n" && ch !== " " && ch !== " ") + break; + } + let end = value.substring(endStart); + const endNlPos = end.indexOf("\n"); + if (endNlPos === -1) { + chomp = "-"; + } else if (value === end || endNlPos !== end.length - 1) { + chomp = "+"; + if (onChompKeep) + onChompKeep(); + } else { + chomp = ""; + } + if (end) { + value = value.slice(0, -end.length); + if (end[end.length - 1] === "\n") + end = end.slice(0, -1); + end = end.replace(blockEndNewlines, `$&${indent}`); + } + let startWithSpace = false; + let startEnd; + let startNlPos = -1; + for (startEnd = 0; startEnd < value.length; ++startEnd) { + const ch = value[startEnd]; + if (ch === " ") + startWithSpace = true; + else if (ch === "\n") + startNlPos = startEnd; + else + break; + } + let start = value.substring(0, startNlPos < startEnd ? startNlPos + 1 : startEnd); + if (start) { + value = value.substring(start.length); + start = start.replace(/\n+/g, `$&${indent}`); + } + const indentSize = indent ? "2" : "1"; + let header = (literal ? "|" : ">") + (startWithSpace ? indentSize : "") + chomp; + if (comment) { + header += " " + commentString(comment.replace(/ ?[\r\n]+/g, " ")); + if (onComment) + onComment(); + } + if (literal) { + value = value.replace(/\n+/g, `$&${indent}`); + return `${header} +${indent}${start}${value}${end}`; + } + value = value.replace(/\n+/g, "\n$&").replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g, "$1$2").replace(/\n+/g, `$&${indent}`); + const body = foldFlowLines.foldFlowLines(`${start}${value}${end}`, indent, foldFlowLines.FOLD_BLOCK, getFoldOptions(ctx, true)); + return `${header} +${indent}${body}`; + } + function plainString(item, ctx, onComment, onChompKeep) { + const { type, value } = item; + const { actualString, implicitKey, indent, indentStep, inFlow } = ctx; + if (implicitKey && value.includes("\n") || inFlow && /[[\]{},]/.test(value)) { + return quotedString(value, ctx); + } + if (!value || /^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(value)) { + return implicitKey || inFlow || !value.includes("\n") ? quotedString(value, ctx) : blockString(item, ctx, onComment, onChompKeep); + } + if (!implicitKey && !inFlow && type !== Scalar.Scalar.PLAIN && value.includes("\n")) { + return blockString(item, ctx, onComment, onChompKeep); + } + if (containsDocumentMarker(value)) { + if (indent === "") { + ctx.forceBlockIndent = true; + return blockString(item, ctx, onComment, onChompKeep); + } else if (implicitKey && indent === indentStep) { + return quotedString(value, ctx); + } + } + const str = value.replace(/\n+/g, `$& +${indent}`); + if (actualString) { + const test = (tag) => tag.default && tag.tag !== "tag:yaml.org,2002:str" && tag.test?.test(str); + const { compat, tags } = ctx.doc.schema; + if (tags.some(test) || compat?.some(test)) + return quotedString(value, ctx); + } + return implicitKey ? str : foldFlowLines.foldFlowLines(str, indent, foldFlowLines.FOLD_FLOW, getFoldOptions(ctx, false)); + } + function stringifyString(item, ctx, onComment, onChompKeep) { + const { implicitKey, inFlow } = ctx; + const ss = typeof item.value === "string" ? item : Object.assign({}, item, { value: String(item.value) }); + let { type } = item; + if (type !== Scalar.Scalar.QUOTE_DOUBLE) { + if (/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(ss.value)) + type = Scalar.Scalar.QUOTE_DOUBLE; + } + const _stringify = (_type) => { + switch (_type) { + case Scalar.Scalar.BLOCK_FOLDED: + case Scalar.Scalar.BLOCK_LITERAL: + return implicitKey || inFlow ? quotedString(ss.value, ctx) : blockString(ss, ctx, onComment, onChompKeep); + case Scalar.Scalar.QUOTE_DOUBLE: + return doubleQuotedString(ss.value, ctx); + case Scalar.Scalar.QUOTE_SINGLE: + return singleQuotedString(ss.value, ctx); + case Scalar.Scalar.PLAIN: + return plainString(ss, ctx, onComment, onChompKeep); + default: + return null; + } + }; + let res = _stringify(type); + if (res === null) { + const { defaultKeyType, defaultStringType } = ctx.options; + const t = implicitKey && defaultKeyType || defaultStringType; + res = _stringify(t); + if (res === null) + throw new Error(`Unsupported default string type ${t}`); + } + return res; + } + exports2.stringifyString = stringifyString; + } +}); + +// ../../node_modules/yaml/dist/stringify/stringify.js +var require_stringify = __commonJS({ + "../../node_modules/yaml/dist/stringify/stringify.js"(exports2) { + "use strict"; + var anchors = require_anchors(); + var identity = require_identity(); + var stringifyComment = require_stringifyComment(); + var stringifyString = require_stringifyString(); + function createStringifyContext(doc, options) { + const opt = Object.assign({ + blockQuote: true, + commentString: stringifyComment.stringifyComment, + defaultKeyType: null, + defaultStringType: "PLAIN", + directives: null, + doubleQuotedAsJSON: false, + doubleQuotedMinMultiLineLength: 40, + falseStr: "false", + flowCollectionPadding: true, + indentSeq: true, + lineWidth: 80, + minContentWidth: 20, + nullStr: "null", + simpleKeys: false, + singleQuote: null, + trueStr: "true", + verifyAliasOrder: true + }, doc.schema.toStringOptions, options); + let inFlow; + switch (opt.collectionStyle) { + case "block": + inFlow = false; + break; + case "flow": + inFlow = true; + break; + default: + inFlow = null; + } + return { + anchors: /* @__PURE__ */ new Set(), + doc, + flowCollectionPadding: opt.flowCollectionPadding ? " " : "", + indent: "", + indentStep: typeof opt.indent === "number" ? " ".repeat(opt.indent) : " ", + inFlow, + options: opt + }; + } + function getTagObject(tags, item) { + if (item.tag) { + const match = tags.filter((t) => t.tag === item.tag); + if (match.length > 0) + return match.find((t) => t.format === item.format) ?? match[0]; + } + let tagObj = void 0; + let obj; + if (identity.isScalar(item)) { + obj = item.value; + const match = tags.filter((t) => t.identify?.(obj)); + tagObj = match.find((t) => t.format === item.format) ?? match.find((t) => !t.format); + } else { + obj = item; + tagObj = tags.find((t) => t.nodeClass && obj instanceof t.nodeClass); + } + if (!tagObj) { + const name = obj?.constructor?.name ?? typeof obj; + throw new Error(`Tag not resolved for ${name} value`); + } + return tagObj; + } + function stringifyProps(node, tagObj, { anchors: anchors$1, doc }) { + if (!doc.directives) + return ""; + const props = []; + const anchor = (identity.isScalar(node) || identity.isCollection(node)) && node.anchor; + if (anchor && anchors.anchorIsValid(anchor)) { + anchors$1.add(anchor); + props.push(`&${anchor}`); + } + const tag = node.tag ? node.tag : tagObj.default ? null : tagObj.tag; + if (tag) + props.push(doc.directives.tagString(tag)); + return props.join(" "); + } + function stringify(item, ctx, onComment, onChompKeep) { + if (identity.isPair(item)) + return item.toString(ctx, onComment, onChompKeep); + if (identity.isAlias(item)) { + if (ctx.doc.directives) + return item.toString(ctx); + if (ctx.resolvedAliases?.has(item)) { + throw new TypeError(`Cannot stringify circular structure without alias nodes`); + } else { + if (ctx.resolvedAliases) + ctx.resolvedAliases.add(item); + else + ctx.resolvedAliases = /* @__PURE__ */ new Set([item]); + item = item.resolve(ctx.doc); + } + } + let tagObj = void 0; + const node = identity.isNode(item) ? item : ctx.doc.createNode(item, { onTagObj: (o) => tagObj = o }); + if (!tagObj) + tagObj = getTagObject(ctx.doc.schema.tags, node); + const props = stringifyProps(node, tagObj, ctx); + if (props.length > 0) + ctx.indentAtStart = (ctx.indentAtStart ?? 0) + props.length + 1; + const str = typeof tagObj.stringify === "function" ? tagObj.stringify(node, ctx, onComment, onChompKeep) : identity.isScalar(node) ? stringifyString.stringifyString(node, ctx, onComment, onChompKeep) : node.toString(ctx, onComment, onChompKeep); + if (!props) + return str; + return identity.isScalar(node) || str[0] === "{" || str[0] === "[" ? `${props} ${str}` : `${props} +${ctx.indent}${str}`; + } + exports2.createStringifyContext = createStringifyContext; + exports2.stringify = stringify; + } +}); + +// ../../node_modules/yaml/dist/stringify/stringifyPair.js +var require_stringifyPair = __commonJS({ + "../../node_modules/yaml/dist/stringify/stringifyPair.js"(exports2) { + "use strict"; + var identity = require_identity(); + var Scalar = require_Scalar(); + var stringify = require_stringify(); + var stringifyComment = require_stringifyComment(); + function stringifyPair({ key, value }, ctx, onComment, onChompKeep) { + const { allNullValues, doc, indent, indentStep, options: { commentString, indentSeq, simpleKeys } } = ctx; + let keyComment = identity.isNode(key) && key.comment || null; + if (simpleKeys) { + if (keyComment) { + throw new Error("With simple keys, key nodes cannot have comments"); + } + if (identity.isCollection(key) || !identity.isNode(key) && typeof key === "object") { + const msg = "With simple keys, collection cannot be used as a key value"; + throw new Error(msg); + } + } + let explicitKey = !simpleKeys && (!key || keyComment && value == null && !ctx.inFlow || identity.isCollection(key) || (identity.isScalar(key) ? key.type === Scalar.Scalar.BLOCK_FOLDED || key.type === Scalar.Scalar.BLOCK_LITERAL : typeof key === "object")); + ctx = Object.assign({}, ctx, { + allNullValues: false, + implicitKey: !explicitKey && (simpleKeys || !allNullValues), + indent: indent + indentStep + }); + let keyCommentDone = false; + let chompKeep = false; + let str = stringify.stringify(key, ctx, () => keyCommentDone = true, () => chompKeep = true); + if (!explicitKey && !ctx.inFlow && str.length > 1024) { + if (simpleKeys) + throw new Error("With simple keys, single line scalar must not span more than 1024 characters"); + explicitKey = true; + } + if (ctx.inFlow) { + if (allNullValues || value == null) { + if (keyCommentDone && onComment) + onComment(); + return str === "" ? "?" : explicitKey ? `? ${str}` : str; + } + } else if (allNullValues && !simpleKeys || value == null && explicitKey) { + str = `? ${str}`; + if (keyComment && !keyCommentDone) { + str += stringifyComment.lineComment(str, ctx.indent, commentString(keyComment)); + } else if (chompKeep && onChompKeep) + onChompKeep(); + return str; + } + if (keyCommentDone) + keyComment = null; + if (explicitKey) { + if (keyComment) + str += stringifyComment.lineComment(str, ctx.indent, commentString(keyComment)); + str = `? ${str} +${indent}:`; + } else { + str = `${str}:`; + if (keyComment) + str += stringifyComment.lineComment(str, ctx.indent, commentString(keyComment)); + } + let vsb, vcb, valueComment; + if (identity.isNode(value)) { + vsb = !!value.spaceBefore; + vcb = value.commentBefore; + valueComment = value.comment; + } else { + vsb = false; + vcb = null; + valueComment = null; + if (value && typeof value === "object") + value = doc.createNode(value); + } + ctx.implicitKey = false; + if (!explicitKey && !keyComment && identity.isScalar(value)) + ctx.indentAtStart = str.length + 1; + chompKeep = false; + if (!indentSeq && indentStep.length >= 2 && !ctx.inFlow && !explicitKey && identity.isSeq(value) && !value.flow && !value.tag && !value.anchor) { + ctx.indent = ctx.indent.substring(2); + } + let valueCommentDone = false; + const valueStr = stringify.stringify(value, ctx, () => valueCommentDone = true, () => chompKeep = true); + let ws = " "; + if (keyComment || vsb || vcb) { + ws = vsb ? "\n" : ""; + if (vcb) { + const cs = commentString(vcb); + ws += ` +${stringifyComment.indentComment(cs, ctx.indent)}`; + } + if (valueStr === "" && !ctx.inFlow) { + if (ws === "\n") + ws = "\n\n"; + } else { + ws += ` +${ctx.indent}`; + } + } else if (!explicitKey && identity.isCollection(value)) { + const vs0 = valueStr[0]; + const nl0 = valueStr.indexOf("\n"); + const hasNewline = nl0 !== -1; + const flow = ctx.inFlow ?? value.flow ?? value.items.length === 0; + if (hasNewline || !flow) { + let hasPropsLine = false; + if (hasNewline && (vs0 === "&" || vs0 === "!")) { + let sp0 = valueStr.indexOf(" "); + if (vs0 === "&" && sp0 !== -1 && sp0 < nl0 && valueStr[sp0 + 1] === "!") { + sp0 = valueStr.indexOf(" ", sp0 + 1); + } + if (sp0 === -1 || nl0 < sp0) + hasPropsLine = true; + } + if (!hasPropsLine) + ws = ` +${ctx.indent}`; + } + } else if (valueStr === "" || valueStr[0] === "\n") { + ws = ""; + } + str += ws + valueStr; + if (ctx.inFlow) { + if (valueCommentDone && onComment) + onComment(); + } else if (valueComment && !valueCommentDone) { + str += stringifyComment.lineComment(str, ctx.indent, commentString(valueComment)); + } else if (chompKeep && onChompKeep) { + onChompKeep(); + } + return str; + } + exports2.stringifyPair = stringifyPair; + } +}); + +// ../../node_modules/yaml/dist/log.js +var require_log = __commonJS({ + "../../node_modules/yaml/dist/log.js"(exports2) { + "use strict"; + function debug(logLevel, ...messages) { + if (logLevel === "debug") + console.log(...messages); + } + function warn(logLevel, warning) { + if (logLevel === "debug" || logLevel === "warn") { + if (typeof process !== "undefined" && process.emitWarning) + process.emitWarning(warning); + else + console.warn(warning); + } + } + exports2.debug = debug; + exports2.warn = warn; + } +}); + +// ../../node_modules/yaml/dist/nodes/addPairToJSMap.js +var require_addPairToJSMap = __commonJS({ + "../../node_modules/yaml/dist/nodes/addPairToJSMap.js"(exports2) { + "use strict"; + var log = require_log(); + var stringify = require_stringify(); + var identity = require_identity(); + var Scalar = require_Scalar(); + var toJS = require_toJS(); + var MERGE_KEY = "<<"; + function addPairToJSMap(ctx, map, { key, value }) { + if (ctx?.doc.schema.merge && isMergeKey(key)) { + value = identity.isAlias(value) ? value.resolve(ctx.doc) : value; + if (identity.isSeq(value)) + for (const it of value.items) + mergeToJSMap(ctx, map, it); + else if (Array.isArray(value)) + for (const it of value) + mergeToJSMap(ctx, map, it); + else + mergeToJSMap(ctx, map, value); + } else { + const jsKey = toJS.toJS(key, "", ctx); + if (map instanceof Map) { + map.set(jsKey, toJS.toJS(value, jsKey, ctx)); + } else if (map instanceof Set) { + map.add(jsKey); + } else { + const stringKey = stringifyKey(key, jsKey, ctx); + const jsValue = toJS.toJS(value, stringKey, ctx); + if (stringKey in map) + Object.defineProperty(map, stringKey, { + value: jsValue, + writable: true, + enumerable: true, + configurable: true + }); + else + map[stringKey] = jsValue; + } + } + return map; + } + var isMergeKey = (key) => key === MERGE_KEY || identity.isScalar(key) && key.value === MERGE_KEY && (!key.type || key.type === Scalar.Scalar.PLAIN); + function mergeToJSMap(ctx, map, value) { + const source = ctx && identity.isAlias(value) ? value.resolve(ctx.doc) : value; + if (!identity.isMap(source)) + throw new Error("Merge sources must be maps or map aliases"); + const srcMap = source.toJSON(null, ctx, Map); + for (const [key, value2] of srcMap) { + if (map instanceof Map) { + if (!map.has(key)) + map.set(key, value2); + } else if (map instanceof Set) { + map.add(key); + } else if (!Object.prototype.hasOwnProperty.call(map, key)) { + Object.defineProperty(map, key, { + value: value2, + writable: true, + enumerable: true, + configurable: true + }); + } + } + return map; + } + function stringifyKey(key, jsKey, ctx) { + if (jsKey === null) + return ""; + if (typeof jsKey !== "object") + return String(jsKey); + if (identity.isNode(key) && ctx?.doc) { + const strCtx = stringify.createStringifyContext(ctx.doc, {}); + strCtx.anchors = /* @__PURE__ */ new Set(); + for (const node of ctx.anchors.keys()) + strCtx.anchors.add(node.anchor); + strCtx.inFlow = true; + strCtx.inStringifyKey = true; + const strKey = key.toString(strCtx); + if (!ctx.mapKeyWarned) { + let jsonStr = JSON.stringify(strKey); + if (jsonStr.length > 40) + jsonStr = jsonStr.substring(0, 36) + '..."'; + log.warn(ctx.doc.options.logLevel, `Keys with collection values will be stringified due to JS Object restrictions: ${jsonStr}. Set mapAsMap: true to use object keys.`); + ctx.mapKeyWarned = true; + } + return strKey; + } + return JSON.stringify(jsKey); + } + exports2.addPairToJSMap = addPairToJSMap; + } +}); + +// ../../node_modules/yaml/dist/nodes/Pair.js +var require_Pair = __commonJS({ + "../../node_modules/yaml/dist/nodes/Pair.js"(exports2) { + "use strict"; + var createNode = require_createNode(); + var stringifyPair = require_stringifyPair(); + var addPairToJSMap = require_addPairToJSMap(); + var identity = require_identity(); + function createPair(key, value, ctx) { + const k = createNode.createNode(key, void 0, ctx); + const v = createNode.createNode(value, void 0, ctx); + return new Pair(k, v); + } + var Pair = class _Pair { + constructor(key, value = null) { + Object.defineProperty(this, identity.NODE_TYPE, { value: identity.PAIR }); + this.key = key; + this.value = value; + } + clone(schema) { + let { key, value } = this; + if (identity.isNode(key)) + key = key.clone(schema); + if (identity.isNode(value)) + value = value.clone(schema); + return new _Pair(key, value); + } + toJSON(_, ctx) { + const pair = ctx?.mapAsMap ? /* @__PURE__ */ new Map() : {}; + return addPairToJSMap.addPairToJSMap(ctx, pair, this); + } + toString(ctx, onComment, onChompKeep) { + return ctx?.doc ? stringifyPair.stringifyPair(this, ctx, onComment, onChompKeep) : JSON.stringify(this); + } + }; + exports2.Pair = Pair; + exports2.createPair = createPair; + } +}); + +// ../../node_modules/yaml/dist/stringify/stringifyCollection.js +var require_stringifyCollection = __commonJS({ + "../../node_modules/yaml/dist/stringify/stringifyCollection.js"(exports2) { + "use strict"; + var identity = require_identity(); + var stringify = require_stringify(); + var stringifyComment = require_stringifyComment(); + function stringifyCollection(collection, ctx, options) { + const flow = ctx.inFlow ?? collection.flow; + const stringify2 = flow ? stringifyFlowCollection : stringifyBlockCollection; + return stringify2(collection, ctx, options); + } + function stringifyBlockCollection({ comment, items }, ctx, { blockItemPrefix, flowChars, itemIndent, onChompKeep, onComment }) { + const { indent, options: { commentString } } = ctx; + const itemCtx = Object.assign({}, ctx, { indent: itemIndent, type: null }); + let chompKeep = false; + const lines = []; + for (let i = 0; i < items.length; ++i) { + const item = items[i]; + let comment2 = null; + if (identity.isNode(item)) { + if (!chompKeep && item.spaceBefore) + lines.push(""); + addCommentBefore(ctx, lines, item.commentBefore, chompKeep); + if (item.comment) + comment2 = item.comment; + } else if (identity.isPair(item)) { + const ik = identity.isNode(item.key) ? item.key : null; + if (ik) { + if (!chompKeep && ik.spaceBefore) + lines.push(""); + addCommentBefore(ctx, lines, ik.commentBefore, chompKeep); + } + } + chompKeep = false; + let str2 = stringify.stringify(item, itemCtx, () => comment2 = null, () => chompKeep = true); + if (comment2) + str2 += stringifyComment.lineComment(str2, itemIndent, commentString(comment2)); + if (chompKeep && comment2) + chompKeep = false; + lines.push(blockItemPrefix + str2); + } + let str; + if (lines.length === 0) { + str = flowChars.start + flowChars.end; + } else { + str = lines[0]; + for (let i = 1; i < lines.length; ++i) { + const line = lines[i]; + str += line ? ` +${indent}${line}` : "\n"; + } + } + if (comment) { + str += "\n" + stringifyComment.indentComment(commentString(comment), indent); + if (onComment) + onComment(); + } else if (chompKeep && onChompKeep) + onChompKeep(); + return str; + } + function stringifyFlowCollection({ items }, ctx, { flowChars, itemIndent }) { + const { indent, indentStep, flowCollectionPadding: fcPadding, options: { commentString } } = ctx; + itemIndent += indentStep; + const itemCtx = Object.assign({}, ctx, { + indent: itemIndent, + inFlow: true, + type: null + }); + let reqNewline = false; + let linesAtValue = 0; + const lines = []; + for (let i = 0; i < items.length; ++i) { + const item = items[i]; + let comment = null; + if (identity.isNode(item)) { + if (item.spaceBefore) + lines.push(""); + addCommentBefore(ctx, lines, item.commentBefore, false); + if (item.comment) + comment = item.comment; + } else if (identity.isPair(item)) { + const ik = identity.isNode(item.key) ? item.key : null; + if (ik) { + if (ik.spaceBefore) + lines.push(""); + addCommentBefore(ctx, lines, ik.commentBefore, false); + if (ik.comment) + reqNewline = true; + } + const iv = identity.isNode(item.value) ? item.value : null; + if (iv) { + if (iv.comment) + comment = iv.comment; + if (iv.commentBefore) + reqNewline = true; + } else if (item.value == null && ik?.comment) { + comment = ik.comment; + } + } + if (comment) + reqNewline = true; + let str = stringify.stringify(item, itemCtx, () => comment = null); + if (i < items.length - 1) + str += ","; + if (comment) + str += stringifyComment.lineComment(str, itemIndent, commentString(comment)); + if (!reqNewline && (lines.length > linesAtValue || str.includes("\n"))) + reqNewline = true; + lines.push(str); + linesAtValue = lines.length; + } + const { start, end } = flowChars; + if (lines.length === 0) { + return start + end; + } else { + if (!reqNewline) { + const len = lines.reduce((sum, line) => sum + line.length + 2, 2); + reqNewline = ctx.options.lineWidth > 0 && len > ctx.options.lineWidth; + } + if (reqNewline) { + let str = start; + for (const line of lines) + str += line ? ` +${indentStep}${indent}${line}` : "\n"; + return `${str} +${indent}${end}`; + } else { + return `${start}${fcPadding}${lines.join(" ")}${fcPadding}${end}`; + } + } + } + function addCommentBefore({ indent, options: { commentString } }, lines, comment, chompKeep) { + if (comment && chompKeep) + comment = comment.replace(/^\n+/, ""); + if (comment) { + const ic = stringifyComment.indentComment(commentString(comment), indent); + lines.push(ic.trimStart()); + } + } + exports2.stringifyCollection = stringifyCollection; + } +}); + +// ../../node_modules/yaml/dist/nodes/YAMLMap.js +var require_YAMLMap = __commonJS({ + "../../node_modules/yaml/dist/nodes/YAMLMap.js"(exports2) { + "use strict"; + var stringifyCollection = require_stringifyCollection(); + var addPairToJSMap = require_addPairToJSMap(); + var Collection = require_Collection(); + var identity = require_identity(); + var Pair = require_Pair(); + var Scalar = require_Scalar(); + function findPair(items, key) { + const k = identity.isScalar(key) ? key.value : key; + for (const it of items) { + if (identity.isPair(it)) { + if (it.key === key || it.key === k) + return it; + if (identity.isScalar(it.key) && it.key.value === k) + return it; + } + } + return void 0; + } + var YAMLMap = class extends Collection.Collection { + static get tagName() { + return "tag:yaml.org,2002:map"; + } + constructor(schema) { + super(identity.MAP, schema); + this.items = []; + } + /** + * A generic collection parsing method that can be extended + * to other node classes that inherit from YAMLMap + */ + static from(schema, obj, ctx) { + const { keepUndefined, replacer } = ctx; + const map = new this(schema); + const add = (key, value) => { + if (typeof replacer === "function") + value = replacer.call(obj, key, value); + else if (Array.isArray(replacer) && !replacer.includes(key)) + return; + if (value !== void 0 || keepUndefined) + map.items.push(Pair.createPair(key, value, ctx)); + }; + if (obj instanceof Map) { + for (const [key, value] of obj) + add(key, value); + } else if (obj && typeof obj === "object") { + for (const key of Object.keys(obj)) + add(key, obj[key]); + } + if (typeof schema.sortMapEntries === "function") { + map.items.sort(schema.sortMapEntries); + } + return map; + } + /** + * Adds a value to the collection. + * + * @param overwrite - If not set `true`, using a key that is already in the + * collection will throw. Otherwise, overwrites the previous value. + */ + add(pair, overwrite) { + let _pair; + if (identity.isPair(pair)) + _pair = pair; + else if (!pair || typeof pair !== "object" || !("key" in pair)) { + _pair = new Pair.Pair(pair, pair?.value); + } else + _pair = new Pair.Pair(pair.key, pair.value); + const prev = findPair(this.items, _pair.key); + const sortEntries = this.schema?.sortMapEntries; + if (prev) { + if (!overwrite) + throw new Error(`Key ${_pair.key} already set`); + if (identity.isScalar(prev.value) && Scalar.isScalarValue(_pair.value)) + prev.value.value = _pair.value; + else + prev.value = _pair.value; + } else if (sortEntries) { + const i = this.items.findIndex((item) => sortEntries(_pair, item) < 0); + if (i === -1) + this.items.push(_pair); + else + this.items.splice(i, 0, _pair); + } else { + this.items.push(_pair); + } + } + delete(key) { + const it = findPair(this.items, key); + if (!it) + return false; + const del = this.items.splice(this.items.indexOf(it), 1); + return del.length > 0; + } + get(key, keepScalar) { + const it = findPair(this.items, key); + const node = it?.value; + return (!keepScalar && identity.isScalar(node) ? node.value : node) ?? void 0; + } + has(key) { + return !!findPair(this.items, key); + } + set(key, value) { + this.add(new Pair.Pair(key, value), true); + } + /** + * @param ctx - Conversion context, originally set in Document#toJS() + * @param {Class} Type - If set, forces the returned collection type + * @returns Instance of Type, Map, or Object + */ + toJSON(_, ctx, Type) { + const map = Type ? new Type() : ctx?.mapAsMap ? /* @__PURE__ */ new Map() : {}; + if (ctx?.onCreate) + ctx.onCreate(map); + for (const item of this.items) + addPairToJSMap.addPairToJSMap(ctx, map, item); + return map; + } + toString(ctx, onComment, onChompKeep) { + if (!ctx) + return JSON.stringify(this); + for (const item of this.items) { + if (!identity.isPair(item)) + throw new Error(`Map items must all be pairs; found ${JSON.stringify(item)} instead`); + } + if (!ctx.allNullValues && this.hasAllNullValues(false)) + ctx = Object.assign({}, ctx, { allNullValues: true }); + return stringifyCollection.stringifyCollection(this, ctx, { + blockItemPrefix: "", + flowChars: { start: "{", end: "}" }, + itemIndent: ctx.indent || "", + onChompKeep, + onComment + }); + } + }; + exports2.YAMLMap = YAMLMap; + exports2.findPair = findPair; + } +}); + +// ../../node_modules/yaml/dist/schema/common/map.js +var require_map = __commonJS({ + "../../node_modules/yaml/dist/schema/common/map.js"(exports2) { + "use strict"; + var identity = require_identity(); + var YAMLMap = require_YAMLMap(); + var map = { + collection: "map", + default: true, + nodeClass: YAMLMap.YAMLMap, + tag: "tag:yaml.org,2002:map", + resolve(map2, onError) { + if (!identity.isMap(map2)) + onError("Expected a mapping for this tag"); + return map2; + }, + createNode: (schema, obj, ctx) => YAMLMap.YAMLMap.from(schema, obj, ctx) + }; + exports2.map = map; + } +}); + +// ../../node_modules/yaml/dist/nodes/YAMLSeq.js +var require_YAMLSeq = __commonJS({ + "../../node_modules/yaml/dist/nodes/YAMLSeq.js"(exports2) { + "use strict"; + var createNode = require_createNode(); + var stringifyCollection = require_stringifyCollection(); + var Collection = require_Collection(); + var identity = require_identity(); + var Scalar = require_Scalar(); + var toJS = require_toJS(); + var YAMLSeq = class extends Collection.Collection { + static get tagName() { + return "tag:yaml.org,2002:seq"; + } + constructor(schema) { + super(identity.SEQ, schema); + this.items = []; + } + add(value) { + this.items.push(value); + } + /** + * Removes a value from the collection. + * + * `key` must contain a representation of an integer for this to succeed. + * It may be wrapped in a `Scalar`. + * + * @returns `true` if the item was found and removed. + */ + delete(key) { + const idx = asItemIndex(key); + if (typeof idx !== "number") + return false; + const del = this.items.splice(idx, 1); + return del.length > 0; + } + get(key, keepScalar) { + const idx = asItemIndex(key); + if (typeof idx !== "number") + return void 0; + const it = this.items[idx]; + return !keepScalar && identity.isScalar(it) ? it.value : it; + } + /** + * Checks if the collection includes a value with the key `key`. + * + * `key` must contain a representation of an integer for this to succeed. + * It may be wrapped in a `Scalar`. + */ + has(key) { + const idx = asItemIndex(key); + return typeof idx === "number" && idx < this.items.length; + } + /** + * Sets a value in this collection. For `!!set`, `value` needs to be a + * boolean to add/remove the item from the set. + * + * If `key` does not contain a representation of an integer, this will throw. + * It may be wrapped in a `Scalar`. + */ + set(key, value) { + const idx = asItemIndex(key); + if (typeof idx !== "number") + throw new Error(`Expected a valid index, not ${key}.`); + const prev = this.items[idx]; + if (identity.isScalar(prev) && Scalar.isScalarValue(value)) + prev.value = value; + else + this.items[idx] = value; + } + toJSON(_, ctx) { + const seq = []; + if (ctx?.onCreate) + ctx.onCreate(seq); + let i = 0; + for (const item of this.items) + seq.push(toJS.toJS(item, String(i++), ctx)); + return seq; + } + toString(ctx, onComment, onChompKeep) { + if (!ctx) + return JSON.stringify(this); + return stringifyCollection.stringifyCollection(this, ctx, { + blockItemPrefix: "- ", + flowChars: { start: "[", end: "]" }, + itemIndent: (ctx.indent || "") + " ", + onChompKeep, + onComment + }); + } + static from(schema, obj, ctx) { + const { replacer } = ctx; + const seq = new this(schema); + if (obj && Symbol.iterator in Object(obj)) { + let i = 0; + for (let it of obj) { + if (typeof replacer === "function") { + const key = obj instanceof Set ? it : String(i++); + it = replacer.call(obj, key, it); + } + seq.items.push(createNode.createNode(it, void 0, ctx)); + } + } + return seq; + } + }; + function asItemIndex(key) { + let idx = identity.isScalar(key) ? key.value : key; + if (idx && typeof idx === "string") + idx = Number(idx); + return typeof idx === "number" && Number.isInteger(idx) && idx >= 0 ? idx : null; + } + exports2.YAMLSeq = YAMLSeq; + } +}); + +// ../../node_modules/yaml/dist/schema/common/seq.js +var require_seq = __commonJS({ + "../../node_modules/yaml/dist/schema/common/seq.js"(exports2) { + "use strict"; + var identity = require_identity(); + var YAMLSeq = require_YAMLSeq(); + var seq = { + collection: "seq", + default: true, + nodeClass: YAMLSeq.YAMLSeq, + tag: "tag:yaml.org,2002:seq", + resolve(seq2, onError) { + if (!identity.isSeq(seq2)) + onError("Expected a sequence for this tag"); + return seq2; + }, + createNode: (schema, obj, ctx) => YAMLSeq.YAMLSeq.from(schema, obj, ctx) + }; + exports2.seq = seq; + } +}); + +// ../../node_modules/yaml/dist/schema/common/string.js +var require_string = __commonJS({ + "../../node_modules/yaml/dist/schema/common/string.js"(exports2) { + "use strict"; + var stringifyString = require_stringifyString(); + var string = { + identify: (value) => typeof value === "string", + default: true, + tag: "tag:yaml.org,2002:str", + resolve: (str) => str, + stringify(item, ctx, onComment, onChompKeep) { + ctx = Object.assign({ actualString: true }, ctx); + return stringifyString.stringifyString(item, ctx, onComment, onChompKeep); + } + }; + exports2.string = string; + } +}); + +// ../../node_modules/yaml/dist/schema/common/null.js +var require_null = __commonJS({ + "../../node_modules/yaml/dist/schema/common/null.js"(exports2) { + "use strict"; + var Scalar = require_Scalar(); + var nullTag = { + identify: (value) => value == null, + createNode: () => new Scalar.Scalar(null), + default: true, + tag: "tag:yaml.org,2002:null", + test: /^(?:~|[Nn]ull|NULL)?$/, + resolve: () => new Scalar.Scalar(null), + stringify: ({ source }, ctx) => typeof source === "string" && nullTag.test.test(source) ? source : ctx.options.nullStr + }; + exports2.nullTag = nullTag; + } +}); + +// ../../node_modules/yaml/dist/schema/core/bool.js +var require_bool = __commonJS({ + "../../node_modules/yaml/dist/schema/core/bool.js"(exports2) { + "use strict"; + var Scalar = require_Scalar(); + var boolTag = { + identify: (value) => typeof value === "boolean", + default: true, + tag: "tag:yaml.org,2002:bool", + test: /^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/, + resolve: (str) => new Scalar.Scalar(str[0] === "t" || str[0] === "T"), + stringify({ source, value }, ctx) { + if (source && boolTag.test.test(source)) { + const sv = source[0] === "t" || source[0] === "T"; + if (value === sv) + return source; + } + return value ? ctx.options.trueStr : ctx.options.falseStr; + } + }; + exports2.boolTag = boolTag; + } +}); + +// ../../node_modules/yaml/dist/stringify/stringifyNumber.js +var require_stringifyNumber = __commonJS({ + "../../node_modules/yaml/dist/stringify/stringifyNumber.js"(exports2) { + "use strict"; + function stringifyNumber({ format, minFractionDigits, tag, value }) { + if (typeof value === "bigint") + return String(value); + const num = typeof value === "number" ? value : Number(value); + if (!isFinite(num)) + return isNaN(num) ? ".nan" : num < 0 ? "-.inf" : ".inf"; + let n = JSON.stringify(value); + if (!format && minFractionDigits && (!tag || tag === "tag:yaml.org,2002:float") && /^\d/.test(n)) { + let i = n.indexOf("."); + if (i < 0) { + i = n.length; + n += "."; + } + let d = minFractionDigits - (n.length - i - 1); + while (d-- > 0) + n += "0"; + } + return n; + } + exports2.stringifyNumber = stringifyNumber; + } +}); + +// ../../node_modules/yaml/dist/schema/core/float.js +var require_float = __commonJS({ + "../../node_modules/yaml/dist/schema/core/float.js"(exports2) { + "use strict"; + var Scalar = require_Scalar(); + var stringifyNumber = require_stringifyNumber(); + var floatNaN = { + identify: (value) => typeof value === "number", + default: true, + tag: "tag:yaml.org,2002:float", + test: /^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/, + resolve: (str) => str.slice(-3).toLowerCase() === "nan" ? NaN : str[0] === "-" ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY, + stringify: stringifyNumber.stringifyNumber + }; + var floatExp = { + identify: (value) => typeof value === "number", + default: true, + tag: "tag:yaml.org,2002:float", + format: "EXP", + test: /^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/, + resolve: (str) => parseFloat(str), + stringify(node) { + const num = Number(node.value); + return isFinite(num) ? num.toExponential() : stringifyNumber.stringifyNumber(node); + } + }; + var float = { + identify: (value) => typeof value === "number", + default: true, + tag: "tag:yaml.org,2002:float", + test: /^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/, + resolve(str) { + const node = new Scalar.Scalar(parseFloat(str)); + const dot = str.indexOf("."); + if (dot !== -1 && str[str.length - 1] === "0") + node.minFractionDigits = str.length - dot - 1; + return node; + }, + stringify: stringifyNumber.stringifyNumber + }; + exports2.float = float; + exports2.floatExp = floatExp; + exports2.floatNaN = floatNaN; + } +}); + +// ../../node_modules/yaml/dist/schema/core/int.js +var require_int = __commonJS({ + "../../node_modules/yaml/dist/schema/core/int.js"(exports2) { + "use strict"; + var stringifyNumber = require_stringifyNumber(); + var intIdentify = (value) => typeof value === "bigint" || Number.isInteger(value); + var intResolve = (str, offset, radix, { intAsBigInt }) => intAsBigInt ? BigInt(str) : parseInt(str.substring(offset), radix); + function intStringify(node, radix, prefix) { + const { value } = node; + if (intIdentify(value) && value >= 0) + return prefix + value.toString(radix); + return stringifyNumber.stringifyNumber(node); + } + var intOct = { + identify: (value) => intIdentify(value) && value >= 0, + default: true, + tag: "tag:yaml.org,2002:int", + format: "OCT", + test: /^0o[0-7]+$/, + resolve: (str, _onError, opt) => intResolve(str, 2, 8, opt), + stringify: (node) => intStringify(node, 8, "0o") + }; + var int = { + identify: intIdentify, + default: true, + tag: "tag:yaml.org,2002:int", + test: /^[-+]?[0-9]+$/, + resolve: (str, _onError, opt) => intResolve(str, 0, 10, opt), + stringify: stringifyNumber.stringifyNumber + }; + var intHex = { + identify: (value) => intIdentify(value) && value >= 0, + default: true, + tag: "tag:yaml.org,2002:int", + format: "HEX", + test: /^0x[0-9a-fA-F]+$/, + resolve: (str, _onError, opt) => intResolve(str, 2, 16, opt), + stringify: (node) => intStringify(node, 16, "0x") + }; + exports2.int = int; + exports2.intHex = intHex; + exports2.intOct = intOct; + } +}); + +// ../../node_modules/yaml/dist/schema/core/schema.js +var require_schema = __commonJS({ + "../../node_modules/yaml/dist/schema/core/schema.js"(exports2) { + "use strict"; + var map = require_map(); + var _null = require_null(); + var seq = require_seq(); + var string = require_string(); + var bool = require_bool(); + var float = require_float(); + var int = require_int(); + var schema = [ + map.map, + seq.seq, + string.string, + _null.nullTag, + bool.boolTag, + int.intOct, + int.int, + int.intHex, + float.floatNaN, + float.floatExp, + float.float + ]; + exports2.schema = schema; + } +}); + +// ../../node_modules/yaml/dist/schema/json/schema.js +var require_schema2 = __commonJS({ + "../../node_modules/yaml/dist/schema/json/schema.js"(exports2) { + "use strict"; + var Scalar = require_Scalar(); + var map = require_map(); + var seq = require_seq(); + function intIdentify(value) { + return typeof value === "bigint" || Number.isInteger(value); + } + var stringifyJSON = ({ value }) => JSON.stringify(value); + var jsonScalars = [ + { + identify: (value) => typeof value === "string", + default: true, + tag: "tag:yaml.org,2002:str", + resolve: (str) => str, + stringify: stringifyJSON + }, + { + identify: (value) => value == null, + createNode: () => new Scalar.Scalar(null), + default: true, + tag: "tag:yaml.org,2002:null", + test: /^null$/, + resolve: () => null, + stringify: stringifyJSON + }, + { + identify: (value) => typeof value === "boolean", + default: true, + tag: "tag:yaml.org,2002:bool", + test: /^true|false$/, + resolve: (str) => str === "true", + stringify: stringifyJSON + }, + { + identify: intIdentify, + default: true, + tag: "tag:yaml.org,2002:int", + test: /^-?(?:0|[1-9][0-9]*)$/, + resolve: (str, _onError, { intAsBigInt }) => intAsBigInt ? BigInt(str) : parseInt(str, 10), + stringify: ({ value }) => intIdentify(value) ? value.toString() : JSON.stringify(value) + }, + { + identify: (value) => typeof value === "number", + default: true, + tag: "tag:yaml.org,2002:float", + test: /^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/, + resolve: (str) => parseFloat(str), + stringify: stringifyJSON + } + ]; + var jsonError = { + default: true, + tag: "", + test: /^/, + resolve(str, onError) { + onError(`Unresolved plain scalar ${JSON.stringify(str)}`); + return str; + } + }; + var schema = [map.map, seq.seq].concat(jsonScalars, jsonError); + exports2.schema = schema; + } +}); + +// ../../node_modules/yaml/dist/schema/yaml-1.1/binary.js +var require_binary = __commonJS({ + "../../node_modules/yaml/dist/schema/yaml-1.1/binary.js"(exports2) { + "use strict"; + var Scalar = require_Scalar(); + var stringifyString = require_stringifyString(); + var binary = { + identify: (value) => value instanceof Uint8Array, + // Buffer inherits from Uint8Array + default: false, + tag: "tag:yaml.org,2002:binary", + /** + * Returns a Buffer in node and an Uint8Array in browsers + * + * To use the resulting buffer as an image, you'll want to do something like: + * + * const blob = new Blob([buffer], { type: 'image/jpeg' }) + * document.querySelector('#photo').src = URL.createObjectURL(blob) + */ + resolve(src, onError) { + if (typeof Buffer === "function") { + return Buffer.from(src, "base64"); + } else if (typeof atob === "function") { + const str = atob(src.replace(/[\n\r]/g, "")); + const buffer = new Uint8Array(str.length); + for (let i = 0; i < str.length; ++i) + buffer[i] = str.charCodeAt(i); + return buffer; + } else { + onError("This environment does not support reading binary tags; either Buffer or atob is required"); + return src; + } + }, + stringify({ comment, type, value }, ctx, onComment, onChompKeep) { + const buf = value; + let str; + if (typeof Buffer === "function") { + str = buf instanceof Buffer ? buf.toString("base64") : Buffer.from(buf.buffer).toString("base64"); + } else if (typeof btoa === "function") { + let s = ""; + for (let i = 0; i < buf.length; ++i) + s += String.fromCharCode(buf[i]); + str = btoa(s); + } else { + throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required"); + } + if (!type) + type = Scalar.Scalar.BLOCK_LITERAL; + if (type !== Scalar.Scalar.QUOTE_DOUBLE) { + const lineWidth = Math.max(ctx.options.lineWidth - ctx.indent.length, ctx.options.minContentWidth); + const n = Math.ceil(str.length / lineWidth); + const lines = new Array(n); + for (let i = 0, o = 0; i < n; ++i, o += lineWidth) { + lines[i] = str.substr(o, lineWidth); + } + str = lines.join(type === Scalar.Scalar.BLOCK_LITERAL ? "\n" : " "); + } + return stringifyString.stringifyString({ comment, type, value: str }, ctx, onComment, onChompKeep); + } + }; + exports2.binary = binary; + } +}); + +// ../../node_modules/yaml/dist/schema/yaml-1.1/pairs.js +var require_pairs = __commonJS({ + "../../node_modules/yaml/dist/schema/yaml-1.1/pairs.js"(exports2) { + "use strict"; + var identity = require_identity(); + var Pair = require_Pair(); + var Scalar = require_Scalar(); + var YAMLSeq = require_YAMLSeq(); + function resolvePairs(seq, onError) { + if (identity.isSeq(seq)) { + for (let i = 0; i < seq.items.length; ++i) { + let item = seq.items[i]; + if (identity.isPair(item)) + continue; + else if (identity.isMap(item)) { + if (item.items.length > 1) + onError("Each pair must have its own sequence indicator"); + const pair = item.items[0] || new Pair.Pair(new Scalar.Scalar(null)); + if (item.commentBefore) + pair.key.commentBefore = pair.key.commentBefore ? `${item.commentBefore} +${pair.key.commentBefore}` : item.commentBefore; + if (item.comment) { + const cn = pair.value ?? pair.key; + cn.comment = cn.comment ? `${item.comment} +${cn.comment}` : item.comment; + } + item = pair; + } + seq.items[i] = identity.isPair(item) ? item : new Pair.Pair(item); + } + } else + onError("Expected a sequence for this tag"); + return seq; + } + function createPairs(schema, iterable, ctx) { + const { replacer } = ctx; + const pairs2 = new YAMLSeq.YAMLSeq(schema); + pairs2.tag = "tag:yaml.org,2002:pairs"; + let i = 0; + if (iterable && Symbol.iterator in Object(iterable)) + for (let it of iterable) { + if (typeof replacer === "function") + it = replacer.call(iterable, String(i++), it); + let key, value; + if (Array.isArray(it)) { + if (it.length === 2) { + key = it[0]; + value = it[1]; + } else + throw new TypeError(`Expected [key, value] tuple: ${it}`); + } else if (it && it instanceof Object) { + const keys = Object.keys(it); + if (keys.length === 1) { + key = keys[0]; + value = it[key]; + } else { + throw new TypeError(`Expected tuple with one key, not ${keys.length} keys`); + } + } else { + key = it; + } + pairs2.items.push(Pair.createPair(key, value, ctx)); + } + return pairs2; + } + var pairs = { + collection: "seq", + default: false, + tag: "tag:yaml.org,2002:pairs", + resolve: resolvePairs, + createNode: createPairs + }; + exports2.createPairs = createPairs; + exports2.pairs = pairs; + exports2.resolvePairs = resolvePairs; + } +}); + +// ../../node_modules/yaml/dist/schema/yaml-1.1/omap.js +var require_omap = __commonJS({ + "../../node_modules/yaml/dist/schema/yaml-1.1/omap.js"(exports2) { + "use strict"; + var identity = require_identity(); + var toJS = require_toJS(); + var YAMLMap = require_YAMLMap(); + var YAMLSeq = require_YAMLSeq(); + var pairs = require_pairs(); + var YAMLOMap = class _YAMLOMap extends YAMLSeq.YAMLSeq { + constructor() { + super(); + this.add = YAMLMap.YAMLMap.prototype.add.bind(this); + this.delete = YAMLMap.YAMLMap.prototype.delete.bind(this); + this.get = YAMLMap.YAMLMap.prototype.get.bind(this); + this.has = YAMLMap.YAMLMap.prototype.has.bind(this); + this.set = YAMLMap.YAMLMap.prototype.set.bind(this); + this.tag = _YAMLOMap.tag; + } + /** + * If `ctx` is given, the return type is actually `Map`, + * but TypeScript won't allow widening the signature of a child method. + */ + toJSON(_, ctx) { + if (!ctx) + return super.toJSON(_); + const map = /* @__PURE__ */ new Map(); + if (ctx?.onCreate) + ctx.onCreate(map); + for (const pair of this.items) { + let key, value; + if (identity.isPair(pair)) { + key = toJS.toJS(pair.key, "", ctx); + value = toJS.toJS(pair.value, key, ctx); + } else { + key = toJS.toJS(pair, "", ctx); + } + if (map.has(key)) + throw new Error("Ordered maps must not include duplicate keys"); + map.set(key, value); + } + return map; + } + static from(schema, iterable, ctx) { + const pairs$1 = pairs.createPairs(schema, iterable, ctx); + const omap2 = new this(); + omap2.items = pairs$1.items; + return omap2; + } + }; + YAMLOMap.tag = "tag:yaml.org,2002:omap"; + var omap = { + collection: "seq", + identify: (value) => value instanceof Map, + nodeClass: YAMLOMap, + default: false, + tag: "tag:yaml.org,2002:omap", + resolve(seq, onError) { + const pairs$1 = pairs.resolvePairs(seq, onError); + const seenKeys = []; + for (const { key } of pairs$1.items) { + if (identity.isScalar(key)) { + if (seenKeys.includes(key.value)) { + onError(`Ordered maps must not include duplicate keys: ${key.value}`); + } else { + seenKeys.push(key.value); + } + } + } + return Object.assign(new YAMLOMap(), pairs$1); + }, + createNode: (schema, iterable, ctx) => YAMLOMap.from(schema, iterable, ctx) + }; + exports2.YAMLOMap = YAMLOMap; + exports2.omap = omap; + } +}); + +// ../../node_modules/yaml/dist/schema/yaml-1.1/bool.js +var require_bool2 = __commonJS({ + "../../node_modules/yaml/dist/schema/yaml-1.1/bool.js"(exports2) { + "use strict"; + var Scalar = require_Scalar(); + function boolStringify({ value, source }, ctx) { + const boolObj = value ? trueTag : falseTag; + if (source && boolObj.test.test(source)) + return source; + return value ? ctx.options.trueStr : ctx.options.falseStr; + } + var trueTag = { + identify: (value) => value === true, + default: true, + tag: "tag:yaml.org,2002:bool", + test: /^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/, + resolve: () => new Scalar.Scalar(true), + stringify: boolStringify + }; + var falseTag = { + identify: (value) => value === false, + default: true, + tag: "tag:yaml.org,2002:bool", + test: /^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/, + resolve: () => new Scalar.Scalar(false), + stringify: boolStringify + }; + exports2.falseTag = falseTag; + exports2.trueTag = trueTag; + } +}); + +// ../../node_modules/yaml/dist/schema/yaml-1.1/float.js +var require_float2 = __commonJS({ + "../../node_modules/yaml/dist/schema/yaml-1.1/float.js"(exports2) { + "use strict"; + var Scalar = require_Scalar(); + var stringifyNumber = require_stringifyNumber(); + var floatNaN = { + identify: (value) => typeof value === "number", + default: true, + tag: "tag:yaml.org,2002:float", + test: /^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/, + resolve: (str) => str.slice(-3).toLowerCase() === "nan" ? NaN : str[0] === "-" ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY, + stringify: stringifyNumber.stringifyNumber + }; + var floatExp = { + identify: (value) => typeof value === "number", + default: true, + tag: "tag:yaml.org,2002:float", + format: "EXP", + test: /^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/, + resolve: (str) => parseFloat(str.replace(/_/g, "")), + stringify(node) { + const num = Number(node.value); + return isFinite(num) ? num.toExponential() : stringifyNumber.stringifyNumber(node); + } + }; + var float = { + identify: (value) => typeof value === "number", + default: true, + tag: "tag:yaml.org,2002:float", + test: /^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/, + resolve(str) { + const node = new Scalar.Scalar(parseFloat(str.replace(/_/g, ""))); + const dot = str.indexOf("."); + if (dot !== -1) { + const f = str.substring(dot + 1).replace(/_/g, ""); + if (f[f.length - 1] === "0") + node.minFractionDigits = f.length; + } + return node; + }, + stringify: stringifyNumber.stringifyNumber + }; + exports2.float = float; + exports2.floatExp = floatExp; + exports2.floatNaN = floatNaN; + } +}); + +// ../../node_modules/yaml/dist/schema/yaml-1.1/int.js +var require_int2 = __commonJS({ + "../../node_modules/yaml/dist/schema/yaml-1.1/int.js"(exports2) { + "use strict"; + var stringifyNumber = require_stringifyNumber(); + var intIdentify = (value) => typeof value === "bigint" || Number.isInteger(value); + function intResolve(str, offset, radix, { intAsBigInt }) { + const sign = str[0]; + if (sign === "-" || sign === "+") + offset += 1; + str = str.substring(offset).replace(/_/g, ""); + if (intAsBigInt) { + switch (radix) { + case 2: + str = `0b${str}`; + break; + case 8: + str = `0o${str}`; + break; + case 16: + str = `0x${str}`; + break; + } + const n2 = BigInt(str); + return sign === "-" ? BigInt(-1) * n2 : n2; + } + const n = parseInt(str, radix); + return sign === "-" ? -1 * n : n; + } + function intStringify(node, radix, prefix) { + const { value } = node; + if (intIdentify(value)) { + const str = value.toString(radix); + return value < 0 ? "-" + prefix + str.substr(1) : prefix + str; + } + return stringifyNumber.stringifyNumber(node); + } + var intBin = { + identify: intIdentify, + default: true, + tag: "tag:yaml.org,2002:int", + format: "BIN", + test: /^[-+]?0b[0-1_]+$/, + resolve: (str, _onError, opt) => intResolve(str, 2, 2, opt), + stringify: (node) => intStringify(node, 2, "0b") + }; + var intOct = { + identify: intIdentify, + default: true, + tag: "tag:yaml.org,2002:int", + format: "OCT", + test: /^[-+]?0[0-7_]+$/, + resolve: (str, _onError, opt) => intResolve(str, 1, 8, opt), + stringify: (node) => intStringify(node, 8, "0") + }; + var int = { + identify: intIdentify, + default: true, + tag: "tag:yaml.org,2002:int", + test: /^[-+]?[0-9][0-9_]*$/, + resolve: (str, _onError, opt) => intResolve(str, 0, 10, opt), + stringify: stringifyNumber.stringifyNumber + }; + var intHex = { + identify: intIdentify, + default: true, + tag: "tag:yaml.org,2002:int", + format: "HEX", + test: /^[-+]?0x[0-9a-fA-F_]+$/, + resolve: (str, _onError, opt) => intResolve(str, 2, 16, opt), + stringify: (node) => intStringify(node, 16, "0x") + }; + exports2.int = int; + exports2.intBin = intBin; + exports2.intHex = intHex; + exports2.intOct = intOct; + } +}); + +// ../../node_modules/yaml/dist/schema/yaml-1.1/set.js +var require_set = __commonJS({ + "../../node_modules/yaml/dist/schema/yaml-1.1/set.js"(exports2) { + "use strict"; + var identity = require_identity(); + var Pair = require_Pair(); + var YAMLMap = require_YAMLMap(); + var YAMLSet = class _YAMLSet extends YAMLMap.YAMLMap { + constructor(schema) { + super(schema); + this.tag = _YAMLSet.tag; + } + add(key) { + let pair; + if (identity.isPair(key)) + pair = key; + else if (key && typeof key === "object" && "key" in key && "value" in key && key.value === null) + pair = new Pair.Pair(key.key, null); + else + pair = new Pair.Pair(key, null); + const prev = YAMLMap.findPair(this.items, pair.key); + if (!prev) + this.items.push(pair); + } + /** + * If `keepPair` is `true`, returns the Pair matching `key`. + * Otherwise, returns the value of that Pair's key. + */ + get(key, keepPair) { + const pair = YAMLMap.findPair(this.items, key); + return !keepPair && identity.isPair(pair) ? identity.isScalar(pair.key) ? pair.key.value : pair.key : pair; + } + set(key, value) { + if (typeof value !== "boolean") + throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof value}`); + const prev = YAMLMap.findPair(this.items, key); + if (prev && !value) { + this.items.splice(this.items.indexOf(prev), 1); + } else if (!prev && value) { + this.items.push(new Pair.Pair(key)); + } + } + toJSON(_, ctx) { + return super.toJSON(_, ctx, Set); + } + toString(ctx, onComment, onChompKeep) { + if (!ctx) + return JSON.stringify(this); + if (this.hasAllNullValues(true)) + return super.toString(Object.assign({}, ctx, { allNullValues: true }), onComment, onChompKeep); + else + throw new Error("Set items must all have null values"); + } + static from(schema, iterable, ctx) { + const { replacer } = ctx; + const set2 = new this(schema); + if (iterable && Symbol.iterator in Object(iterable)) + for (let value of iterable) { + if (typeof replacer === "function") + value = replacer.call(iterable, value, value); + set2.items.push(Pair.createPair(value, null, ctx)); + } + return set2; + } + }; + YAMLSet.tag = "tag:yaml.org,2002:set"; + var set = { + collection: "map", + identify: (value) => value instanceof Set, + nodeClass: YAMLSet, + default: false, + tag: "tag:yaml.org,2002:set", + createNode: (schema, iterable, ctx) => YAMLSet.from(schema, iterable, ctx), + resolve(map, onError) { + if (identity.isMap(map)) { + if (map.hasAllNullValues(true)) + return Object.assign(new YAMLSet(), map); + else + onError("Set items must all have null values"); + } else + onError("Expected a mapping for this tag"); + return map; + } + }; + exports2.YAMLSet = YAMLSet; + exports2.set = set; + } +}); + +// ../../node_modules/yaml/dist/schema/yaml-1.1/timestamp.js +var require_timestamp = __commonJS({ + "../../node_modules/yaml/dist/schema/yaml-1.1/timestamp.js"(exports2) { + "use strict"; + var stringifyNumber = require_stringifyNumber(); + function parseSexagesimal(str, asBigInt) { + const sign = str[0]; + const parts = sign === "-" || sign === "+" ? str.substring(1) : str; + const num = (n) => asBigInt ? BigInt(n) : Number(n); + const res = parts.replace(/_/g, "").split(":").reduce((res2, p) => res2 * num(60) + num(p), num(0)); + return sign === "-" ? num(-1) * res : res; + } + function stringifySexagesimal(node) { + let { value } = node; + let num = (n) => n; + if (typeof value === "bigint") + num = (n) => BigInt(n); + else if (isNaN(value) || !isFinite(value)) + return stringifyNumber.stringifyNumber(node); + let sign = ""; + if (value < 0) { + sign = "-"; + value *= num(-1); + } + const _60 = num(60); + const parts = [value % _60]; + if (value < 60) { + parts.unshift(0); + } else { + value = (value - parts[0]) / _60; + parts.unshift(value % _60); + if (value >= 60) { + value = (value - parts[0]) / _60; + parts.unshift(value); + } + } + return sign + parts.map((n) => String(n).padStart(2, "0")).join(":").replace(/000000\d*$/, ""); + } + var intTime = { + identify: (value) => typeof value === "bigint" || Number.isInteger(value), + default: true, + tag: "tag:yaml.org,2002:int", + format: "TIME", + test: /^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/, + resolve: (str, _onError, { intAsBigInt }) => parseSexagesimal(str, intAsBigInt), + stringify: stringifySexagesimal + }; + var floatTime = { + identify: (value) => typeof value === "number", + default: true, + tag: "tag:yaml.org,2002:float", + format: "TIME", + test: /^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/, + resolve: (str) => parseSexagesimal(str, false), + stringify: stringifySexagesimal + }; + var timestamp = { + identify: (value) => value instanceof Date, + default: true, + tag: "tag:yaml.org,2002:timestamp", + // If the time zone is omitted, the timestamp is assumed to be specified in UTC. The time part + // may be omitted altogether, resulting in a date format. In such a case, the time part is + // assumed to be 00:00:00Z (start of day, UTC). + test: RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"), + resolve(str) { + const match = str.match(timestamp.test); + if (!match) + throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd"); + const [, year, month, day, hour, minute, second] = match.map(Number); + const millisec = match[7] ? Number((match[7] + "00").substr(1, 3)) : 0; + let date = Date.UTC(year, month - 1, day, hour || 0, minute || 0, second || 0, millisec); + const tz = match[8]; + if (tz && tz !== "Z") { + let d = parseSexagesimal(tz, false); + if (Math.abs(d) < 30) + d *= 60; + date -= 6e4 * d; + } + return new Date(date); + }, + stringify: ({ value }) => value.toISOString().replace(/((T00:00)?:00)?\.000Z$/, "") + }; + exports2.floatTime = floatTime; + exports2.intTime = intTime; + exports2.timestamp = timestamp; + } +}); + +// ../../node_modules/yaml/dist/schema/yaml-1.1/schema.js +var require_schema3 = __commonJS({ + "../../node_modules/yaml/dist/schema/yaml-1.1/schema.js"(exports2) { + "use strict"; + var map = require_map(); + var _null = require_null(); + var seq = require_seq(); + var string = require_string(); + var binary = require_binary(); + var bool = require_bool2(); + var float = require_float2(); + var int = require_int2(); + var omap = require_omap(); + var pairs = require_pairs(); + var set = require_set(); + var timestamp = require_timestamp(); + var schema = [ + map.map, + seq.seq, + string.string, + _null.nullTag, + bool.trueTag, + bool.falseTag, + int.intBin, + int.intOct, + int.int, + int.intHex, + float.floatNaN, + float.floatExp, + float.float, + binary.binary, + omap.omap, + pairs.pairs, + set.set, + timestamp.intTime, + timestamp.floatTime, + timestamp.timestamp + ]; + exports2.schema = schema; + } +}); + +// ../../node_modules/yaml/dist/schema/tags.js +var require_tags = __commonJS({ + "../../node_modules/yaml/dist/schema/tags.js"(exports2) { + "use strict"; + var map = require_map(); + var _null = require_null(); + var seq = require_seq(); + var string = require_string(); + var bool = require_bool(); + var float = require_float(); + var int = require_int(); + var schema = require_schema(); + var schema$1 = require_schema2(); + var binary = require_binary(); + var omap = require_omap(); + var pairs = require_pairs(); + var schema$2 = require_schema3(); + var set = require_set(); + var timestamp = require_timestamp(); + var schemas = /* @__PURE__ */ new Map([ + ["core", schema.schema], + ["failsafe", [map.map, seq.seq, string.string]], + ["json", schema$1.schema], + ["yaml11", schema$2.schema], + ["yaml-1.1", schema$2.schema] + ]); + var tagsByName = { + binary: binary.binary, + bool: bool.boolTag, + float: float.float, + floatExp: float.floatExp, + floatNaN: float.floatNaN, + floatTime: timestamp.floatTime, + int: int.int, + intHex: int.intHex, + intOct: int.intOct, + intTime: timestamp.intTime, + map: map.map, + null: _null.nullTag, + omap: omap.omap, + pairs: pairs.pairs, + seq: seq.seq, + set: set.set, + timestamp: timestamp.timestamp + }; + var coreKnownTags = { + "tag:yaml.org,2002:binary": binary.binary, + "tag:yaml.org,2002:omap": omap.omap, + "tag:yaml.org,2002:pairs": pairs.pairs, + "tag:yaml.org,2002:set": set.set, + "tag:yaml.org,2002:timestamp": timestamp.timestamp + }; + function getTags(customTags, schemaName) { + let tags = schemas.get(schemaName); + if (!tags) { + if (Array.isArray(customTags)) + tags = []; + else { + const keys = Array.from(schemas.keys()).filter((key) => key !== "yaml11").map((key) => JSON.stringify(key)).join(", "); + throw new Error(`Unknown schema "${schemaName}"; use one of ${keys} or define customTags array`); + } + } + if (Array.isArray(customTags)) { + for (const tag of customTags) + tags = tags.concat(tag); + } else if (typeof customTags === "function") { + tags = customTags(tags.slice()); + } + return tags.map((tag) => { + if (typeof tag !== "string") + return tag; + const tagObj = tagsByName[tag]; + if (tagObj) + return tagObj; + const keys = Object.keys(tagsByName).map((key) => JSON.stringify(key)).join(", "); + throw new Error(`Unknown custom tag "${tag}"; use one of ${keys}`); + }); + } + exports2.coreKnownTags = coreKnownTags; + exports2.getTags = getTags; + } +}); + +// ../../node_modules/yaml/dist/schema/Schema.js +var require_Schema = __commonJS({ + "../../node_modules/yaml/dist/schema/Schema.js"(exports2) { + "use strict"; + var identity = require_identity(); + var map = require_map(); + var seq = require_seq(); + var string = require_string(); + var tags = require_tags(); + var sortMapEntriesByKey = (a, b) => a.key < b.key ? -1 : a.key > b.key ? 1 : 0; + var Schema = class _Schema { + constructor({ compat, customTags, merge, resolveKnownTags, schema, sortMapEntries, toStringDefaults }) { + this.compat = Array.isArray(compat) ? tags.getTags(compat, "compat") : compat ? tags.getTags(null, compat) : null; + this.merge = !!merge; + this.name = typeof schema === "string" && schema || "core"; + this.knownTags = resolveKnownTags ? tags.coreKnownTags : {}; + this.tags = tags.getTags(customTags, this.name); + this.toStringOptions = toStringDefaults ?? null; + Object.defineProperty(this, identity.MAP, { value: map.map }); + Object.defineProperty(this, identity.SCALAR, { value: string.string }); + Object.defineProperty(this, identity.SEQ, { value: seq.seq }); + this.sortMapEntries = typeof sortMapEntries === "function" ? sortMapEntries : sortMapEntries === true ? sortMapEntriesByKey : null; + } + clone() { + const copy = Object.create(_Schema.prototype, Object.getOwnPropertyDescriptors(this)); + copy.tags = this.tags.slice(); + return copy; + } + }; + exports2.Schema = Schema; + } +}); + +// ../../node_modules/yaml/dist/stringify/stringifyDocument.js +var require_stringifyDocument = __commonJS({ + "../../node_modules/yaml/dist/stringify/stringifyDocument.js"(exports2) { + "use strict"; + var identity = require_identity(); + var stringify = require_stringify(); + var stringifyComment = require_stringifyComment(); + function stringifyDocument(doc, options) { + const lines = []; + let hasDirectives = options.directives === true; + if (options.directives !== false && doc.directives) { + const dir = doc.directives.toString(doc); + if (dir) { + lines.push(dir); + hasDirectives = true; + } else if (doc.directives.docStart) + hasDirectives = true; + } + if (hasDirectives) + lines.push("---"); + const ctx = stringify.createStringifyContext(doc, options); + const { commentString } = ctx.options; + if (doc.commentBefore) { + if (lines.length !== 1) + lines.unshift(""); + const cs = commentString(doc.commentBefore); + lines.unshift(stringifyComment.indentComment(cs, "")); + } + let chompKeep = false; + let contentComment = null; + if (doc.contents) { + if (identity.isNode(doc.contents)) { + if (doc.contents.spaceBefore && hasDirectives) + lines.push(""); + if (doc.contents.commentBefore) { + const cs = commentString(doc.contents.commentBefore); + lines.push(stringifyComment.indentComment(cs, "")); + } + ctx.forceBlockIndent = !!doc.comment; + contentComment = doc.contents.comment; + } + const onChompKeep = contentComment ? void 0 : () => chompKeep = true; + let body = stringify.stringify(doc.contents, ctx, () => contentComment = null, onChompKeep); + if (contentComment) + body += stringifyComment.lineComment(body, "", commentString(contentComment)); + if ((body[0] === "|" || body[0] === ">") && lines[lines.length - 1] === "---") { + lines[lines.length - 1] = `--- ${body}`; + } else + lines.push(body); + } else { + lines.push(stringify.stringify(doc.contents, ctx)); + } + if (doc.directives?.docEnd) { + if (doc.comment) { + const cs = commentString(doc.comment); + if (cs.includes("\n")) { + lines.push("..."); + lines.push(stringifyComment.indentComment(cs, "")); + } else { + lines.push(`... ${cs}`); + } + } else { + lines.push("..."); + } + } else { + let dc = doc.comment; + if (dc && chompKeep) + dc = dc.replace(/^\n+/, ""); + if (dc) { + if ((!chompKeep || contentComment) && lines[lines.length - 1] !== "") + lines.push(""); + lines.push(stringifyComment.indentComment(commentString(dc), "")); + } + } + return lines.join("\n") + "\n"; + } + exports2.stringifyDocument = stringifyDocument; + } +}); + +// ../../node_modules/yaml/dist/doc/Document.js +var require_Document = __commonJS({ + "../../node_modules/yaml/dist/doc/Document.js"(exports2) { + "use strict"; + var Alias = require_Alias(); + var Collection = require_Collection(); + var identity = require_identity(); + var Pair = require_Pair(); + var toJS = require_toJS(); + var Schema = require_Schema(); + var stringifyDocument = require_stringifyDocument(); + var anchors = require_anchors(); + var applyReviver = require_applyReviver(); + var createNode = require_createNode(); + var directives = require_directives(); + var Document = class _Document { + constructor(value, replacer, options) { + this.commentBefore = null; + this.comment = null; + this.errors = []; + this.warnings = []; + Object.defineProperty(this, identity.NODE_TYPE, { value: identity.DOC }); + let _replacer = null; + if (typeof replacer === "function" || Array.isArray(replacer)) { + _replacer = replacer; + } else if (options === void 0 && replacer) { + options = replacer; + replacer = void 0; + } + const opt = Object.assign({ + intAsBigInt: false, + keepSourceTokens: false, + logLevel: "warn", + prettyErrors: true, + strict: true, + uniqueKeys: true, + version: "1.2" + }, options); + this.options = opt; + let { version } = opt; + if (options?._directives) { + this.directives = options._directives.atDocument(); + if (this.directives.yaml.explicit) + version = this.directives.yaml.version; + } else + this.directives = new directives.Directives({ version }); + this.setSchema(version, options); + this.contents = value === void 0 ? null : this.createNode(value, _replacer, options); + } + /** + * Create a deep copy of this Document and its contents. + * + * Custom Node values that inherit from `Object` still refer to their original instances. + */ + clone() { + const copy = Object.create(_Document.prototype, { + [identity.NODE_TYPE]: { value: identity.DOC } + }); + copy.commentBefore = this.commentBefore; + copy.comment = this.comment; + copy.errors = this.errors.slice(); + copy.warnings = this.warnings.slice(); + copy.options = Object.assign({}, this.options); + if (this.directives) + copy.directives = this.directives.clone(); + copy.schema = this.schema.clone(); + copy.contents = identity.isNode(this.contents) ? this.contents.clone(copy.schema) : this.contents; + if (this.range) + copy.range = this.range.slice(); + return copy; + } + /** Adds a value to the document. */ + add(value) { + if (assertCollection(this.contents)) + this.contents.add(value); + } + /** Adds a value to the document. */ + addIn(path, value) { + if (assertCollection(this.contents)) + this.contents.addIn(path, value); + } + /** + * Create a new `Alias` node, ensuring that the target `node` has the required anchor. + * + * If `node` already has an anchor, `name` is ignored. + * Otherwise, the `node.anchor` value will be set to `name`, + * or if an anchor with that name is already present in the document, + * `name` will be used as a prefix for a new unique anchor. + * If `name` is undefined, the generated anchor will use 'a' as a prefix. + */ + createAlias(node, name) { + if (!node.anchor) { + const prev = anchors.anchorNames(this); + node.anchor = // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing + !name || prev.has(name) ? anchors.findNewAnchor(name || "a", prev) : name; + } + return new Alias.Alias(node.anchor); + } + createNode(value, replacer, options) { + let _replacer = void 0; + if (typeof replacer === "function") { + value = replacer.call({ "": value }, "", value); + _replacer = replacer; + } else if (Array.isArray(replacer)) { + const keyToStr = (v) => typeof v === "number" || v instanceof String || v instanceof Number; + const asStr = replacer.filter(keyToStr).map(String); + if (asStr.length > 0) + replacer = replacer.concat(asStr); + _replacer = replacer; + } else if (options === void 0 && replacer) { + options = replacer; + replacer = void 0; + } + const { aliasDuplicateObjects, anchorPrefix, flow, keepUndefined, onTagObj, tag } = options ?? {}; + const { onAnchor, setAnchors, sourceObjects } = anchors.createNodeAnchors( + this, + // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing + anchorPrefix || "a" + ); + const ctx = { + aliasDuplicateObjects: aliasDuplicateObjects ?? true, + keepUndefined: keepUndefined ?? false, + onAnchor, + onTagObj, + replacer: _replacer, + schema: this.schema, + sourceObjects + }; + const node = createNode.createNode(value, tag, ctx); + if (flow && identity.isCollection(node)) + node.flow = true; + setAnchors(); + return node; + } + /** + * Convert a key and a value into a `Pair` using the current schema, + * recursively wrapping all values as `Scalar` or `Collection` nodes. + */ + createPair(key, value, options = {}) { + const k = this.createNode(key, null, options); + const v = this.createNode(value, null, options); + return new Pair.Pair(k, v); + } + /** + * Removes a value from the document. + * @returns `true` if the item was found and removed. + */ + delete(key) { + return assertCollection(this.contents) ? this.contents.delete(key) : false; + } + /** + * Removes a value from the document. + * @returns `true` if the item was found and removed. + */ + deleteIn(path) { + if (Collection.isEmptyPath(path)) { + if (this.contents == null) + return false; + this.contents = null; + return true; + } + return assertCollection(this.contents) ? this.contents.deleteIn(path) : false; + } + /** + * Returns item at `key`, or `undefined` if not found. By default unwraps + * scalar values from their surrounding node; to disable set `keepScalar` to + * `true` (collections are always returned intact). + */ + get(key, keepScalar) { + return identity.isCollection(this.contents) ? this.contents.get(key, keepScalar) : void 0; + } + /** + * Returns item at `path`, or `undefined` if not found. By default unwraps + * scalar values from their surrounding node; to disable set `keepScalar` to + * `true` (collections are always returned intact). + */ + getIn(path, keepScalar) { + if (Collection.isEmptyPath(path)) + return !keepScalar && identity.isScalar(this.contents) ? this.contents.value : this.contents; + return identity.isCollection(this.contents) ? this.contents.getIn(path, keepScalar) : void 0; + } + /** + * Checks if the document includes a value with the key `key`. + */ + has(key) { + return identity.isCollection(this.contents) ? this.contents.has(key) : false; + } + /** + * Checks if the document includes a value at `path`. + */ + hasIn(path) { + if (Collection.isEmptyPath(path)) + return this.contents !== void 0; + return identity.isCollection(this.contents) ? this.contents.hasIn(path) : false; + } + /** + * Sets a value in this document. For `!!set`, `value` needs to be a + * boolean to add/remove the item from the set. + */ + set(key, value) { + if (this.contents == null) { + this.contents = Collection.collectionFromPath(this.schema, [key], value); + } else if (assertCollection(this.contents)) { + this.contents.set(key, value); + } + } + /** + * Sets a value in this document. For `!!set`, `value` needs to be a + * boolean to add/remove the item from the set. + */ + setIn(path, value) { + if (Collection.isEmptyPath(path)) { + this.contents = value; + } else if (this.contents == null) { + this.contents = Collection.collectionFromPath(this.schema, Array.from(path), value); + } else if (assertCollection(this.contents)) { + this.contents.setIn(path, value); + } + } + /** + * Change the YAML version and schema used by the document. + * A `null` version disables support for directives, explicit tags, anchors, and aliases. + * It also requires the `schema` option to be given as a `Schema` instance value. + * + * Overrides all previously set schema options. + */ + setSchema(version, options = {}) { + if (typeof version === "number") + version = String(version); + let opt; + switch (version) { + case "1.1": + if (this.directives) + this.directives.yaml.version = "1.1"; + else + this.directives = new directives.Directives({ version: "1.1" }); + opt = { merge: true, resolveKnownTags: false, schema: "yaml-1.1" }; + break; + case "1.2": + case "next": + if (this.directives) + this.directives.yaml.version = version; + else + this.directives = new directives.Directives({ version }); + opt = { merge: false, resolveKnownTags: true, schema: "core" }; + break; + case null: + if (this.directives) + delete this.directives; + opt = null; + break; + default: { + const sv = JSON.stringify(version); + throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${sv}`); + } + } + if (options.schema instanceof Object) + this.schema = options.schema; + else if (opt) + this.schema = new Schema.Schema(Object.assign(opt, options)); + else + throw new Error(`With a null YAML version, the { schema: Schema } option is required`); + } + // json & jsonArg are only used from toJSON() + toJS({ json, jsonArg, mapAsMap, maxAliasCount, onAnchor, reviver } = {}) { + const ctx = { + anchors: /* @__PURE__ */ new Map(), + doc: this, + keep: !json, + mapAsMap: mapAsMap === true, + mapKeyWarned: false, + maxAliasCount: typeof maxAliasCount === "number" ? maxAliasCount : 100 + }; + const res = toJS.toJS(this.contents, jsonArg ?? "", ctx); + if (typeof onAnchor === "function") + for (const { count, res: res2 } of ctx.anchors.values()) + onAnchor(res2, count); + return typeof reviver === "function" ? applyReviver.applyReviver(reviver, { "": res }, "", res) : res; + } + /** + * A JSON representation of the document `contents`. + * + * @param jsonArg Used by `JSON.stringify` to indicate the array index or + * property name. + */ + toJSON(jsonArg, onAnchor) { + return this.toJS({ json: true, jsonArg, mapAsMap: false, onAnchor }); + } + /** A YAML representation of the document. */ + toString(options = {}) { + if (this.errors.length > 0) + throw new Error("Document with errors cannot be stringified"); + if ("indent" in options && (!Number.isInteger(options.indent) || Number(options.indent) <= 0)) { + const s = JSON.stringify(options.indent); + throw new Error(`"indent" option must be a positive integer, not ${s}`); + } + return stringifyDocument.stringifyDocument(this, options); + } + }; + function assertCollection(contents) { + if (identity.isCollection(contents)) + return true; + throw new Error("Expected a YAML collection as document contents"); + } + exports2.Document = Document; + } +}); + +// ../../node_modules/yaml/dist/errors.js +var require_errors = __commonJS({ + "../../node_modules/yaml/dist/errors.js"(exports2) { + "use strict"; + var YAMLError = class extends Error { + constructor(name, pos, code, message) { + super(); + this.name = name; + this.code = code; + this.message = message; + this.pos = pos; + } + }; + var YAMLParseError = class extends YAMLError { + constructor(pos, code, message) { + super("YAMLParseError", pos, code, message); + } + }; + var YAMLWarning = class extends YAMLError { + constructor(pos, code, message) { + super("YAMLWarning", pos, code, message); + } + }; + var prettifyError = (src, lc) => (error) => { + if (error.pos[0] === -1) + return; + error.linePos = error.pos.map((pos) => lc.linePos(pos)); + const { line, col } = error.linePos[0]; + error.message += ` at line ${line}, column ${col}`; + let ci = col - 1; + let lineStr = src.substring(lc.lineStarts[line - 1], lc.lineStarts[line]).replace(/[\n\r]+$/, ""); + if (ci >= 60 && lineStr.length > 80) { + const trimStart = Math.min(ci - 39, lineStr.length - 79); + lineStr = "\u2026" + lineStr.substring(trimStart); + ci -= trimStart - 1; + } + if (lineStr.length > 80) + lineStr = lineStr.substring(0, 79) + "\u2026"; + if (line > 1 && /^ *$/.test(lineStr.substring(0, ci))) { + let prev = src.substring(lc.lineStarts[line - 2], lc.lineStarts[line - 1]); + if (prev.length > 80) + prev = prev.substring(0, 79) + "\u2026\n"; + lineStr = prev + lineStr; + } + if (/[^ ]/.test(lineStr)) { + let count = 1; + const end = error.linePos[1]; + if (end && end.line === line && end.col > col) { + count = Math.max(1, Math.min(end.col - col, 80 - ci)); + } + const pointer = " ".repeat(ci) + "^".repeat(count); + error.message += `: + +${lineStr} +${pointer} +`; + } + }; + exports2.YAMLError = YAMLError; + exports2.YAMLParseError = YAMLParseError; + exports2.YAMLWarning = YAMLWarning; + exports2.prettifyError = prettifyError; + } +}); + +// ../../node_modules/yaml/dist/compose/resolve-props.js +var require_resolve_props = __commonJS({ + "../../node_modules/yaml/dist/compose/resolve-props.js"(exports2) { + "use strict"; + function resolveProps(tokens, { flow, indicator, next, offset, onError, parentIndent, startOnNewline }) { + let spaceBefore = false; + let atNewline = startOnNewline; + let hasSpace = startOnNewline; + let comment = ""; + let commentSep = ""; + let hasNewline = false; + let reqSpace = false; + let tab = null; + let anchor = null; + let tag = null; + let newlineAfterProp = null; + let comma = null; + let found = null; + let start = null; + for (const token of tokens) { + if (reqSpace) { + if (token.type !== "space" && token.type !== "newline" && token.type !== "comma") + onError(token.offset, "MISSING_CHAR", "Tags and anchors must be separated from the next token by white space"); + reqSpace = false; + } + if (tab) { + if (atNewline && token.type !== "comment" && token.type !== "newline") { + onError(tab, "TAB_AS_INDENT", "Tabs are not allowed as indentation"); + } + tab = null; + } + switch (token.type) { + case "space": + if (!flow && (indicator !== "doc-start" || next?.type !== "flow-collection") && token.source.includes(" ")) { + tab = token; + } + hasSpace = true; + break; + case "comment": { + if (!hasSpace) + onError(token, "MISSING_CHAR", "Comments must be separated from other tokens by white space characters"); + const cb = token.source.substring(1) || " "; + if (!comment) + comment = cb; + else + comment += commentSep + cb; + commentSep = ""; + atNewline = false; + break; + } + case "newline": + if (atNewline) { + if (comment) + comment += token.source; + else + spaceBefore = true; + } else + commentSep += token.source; + atNewline = true; + hasNewline = true; + if (anchor || tag) + newlineAfterProp = token; + hasSpace = true; + break; + case "anchor": + if (anchor) + onError(token, "MULTIPLE_ANCHORS", "A node can have at most one anchor"); + if (token.source.endsWith(":")) + onError(token.offset + token.source.length - 1, "BAD_ALIAS", "Anchor ending in : is ambiguous", true); + anchor = token; + if (start === null) + start = token.offset; + atNewline = false; + hasSpace = false; + reqSpace = true; + break; + case "tag": { + if (tag) + onError(token, "MULTIPLE_TAGS", "A node can have at most one tag"); + tag = token; + if (start === null) + start = token.offset; + atNewline = false; + hasSpace = false; + reqSpace = true; + break; + } + case indicator: + if (anchor || tag) + onError(token, "BAD_PROP_ORDER", `Anchors and tags must be after the ${token.source} indicator`); + if (found) + onError(token, "UNEXPECTED_TOKEN", `Unexpected ${token.source} in ${flow ?? "collection"}`); + found = token; + atNewline = indicator === "seq-item-ind" || indicator === "explicit-key-ind"; + hasSpace = false; + break; + case "comma": + if (flow) { + if (comma) + onError(token, "UNEXPECTED_TOKEN", `Unexpected , in ${flow}`); + comma = token; + atNewline = false; + hasSpace = false; + break; + } + default: + onError(token, "UNEXPECTED_TOKEN", `Unexpected ${token.type} token`); + atNewline = false; + hasSpace = false; + } + } + const last = tokens[tokens.length - 1]; + const end = last ? last.offset + last.source.length : offset; + if (reqSpace && next && next.type !== "space" && next.type !== "newline" && next.type !== "comma" && (next.type !== "scalar" || next.source !== "")) { + onError(next.offset, "MISSING_CHAR", "Tags and anchors must be separated from the next token by white space"); + } + if (tab && (atNewline && tab.indent <= parentIndent || next?.type === "block-map" || next?.type === "block-seq")) + onError(tab, "TAB_AS_INDENT", "Tabs are not allowed as indentation"); + return { + comma, + found, + spaceBefore, + comment, + hasNewline, + anchor, + tag, + newlineAfterProp, + end, + start: start ?? end + }; + } + exports2.resolveProps = resolveProps; + } +}); + +// ../../node_modules/yaml/dist/compose/util-contains-newline.js +var require_util_contains_newline = __commonJS({ + "../../node_modules/yaml/dist/compose/util-contains-newline.js"(exports2) { + "use strict"; + function containsNewline(key) { + if (!key) + return null; + switch (key.type) { + case "alias": + case "scalar": + case "double-quoted-scalar": + case "single-quoted-scalar": + if (key.source.includes("\n")) + return true; + if (key.end) { + for (const st of key.end) + if (st.type === "newline") + return true; + } + return false; + case "flow-collection": + for (const it of key.items) { + for (const st of it.start) + if (st.type === "newline") + return true; + if (it.sep) { + for (const st of it.sep) + if (st.type === "newline") + return true; + } + if (containsNewline(it.key) || containsNewline(it.value)) + return true; + } + return false; + default: + return true; + } + } + exports2.containsNewline = containsNewline; + } +}); + +// ../../node_modules/yaml/dist/compose/util-flow-indent-check.js +var require_util_flow_indent_check = __commonJS({ + "../../node_modules/yaml/dist/compose/util-flow-indent-check.js"(exports2) { + "use strict"; + var utilContainsNewline = require_util_contains_newline(); + function flowIndentCheck(indent, fc, onError) { + if (fc?.type === "flow-collection") { + const end = fc.end[0]; + if (end.indent === indent && (end.source === "]" || end.source === "}") && utilContainsNewline.containsNewline(fc)) { + const msg = "Flow end indicator should be more indented than parent"; + onError(end, "BAD_INDENT", msg, true); + } + } + } + exports2.flowIndentCheck = flowIndentCheck; + } +}); + +// ../../node_modules/yaml/dist/compose/util-map-includes.js +var require_util_map_includes = __commonJS({ + "../../node_modules/yaml/dist/compose/util-map-includes.js"(exports2) { + "use strict"; + var identity = require_identity(); + function mapIncludes(ctx, items, search) { + const { uniqueKeys } = ctx.options; + if (uniqueKeys === false) + return false; + const isEqual = typeof uniqueKeys === "function" ? uniqueKeys : (a, b) => a === b || identity.isScalar(a) && identity.isScalar(b) && a.value === b.value && !(a.value === "<<" && ctx.schema.merge); + return items.some((pair) => isEqual(pair.key, search)); + } + exports2.mapIncludes = mapIncludes; + } +}); + +// ../../node_modules/yaml/dist/compose/resolve-block-map.js +var require_resolve_block_map = __commonJS({ + "../../node_modules/yaml/dist/compose/resolve-block-map.js"(exports2) { + "use strict"; + var Pair = require_Pair(); + var YAMLMap = require_YAMLMap(); + var resolveProps = require_resolve_props(); + var utilContainsNewline = require_util_contains_newline(); + var utilFlowIndentCheck = require_util_flow_indent_check(); + var utilMapIncludes = require_util_map_includes(); + var startColMsg = "All mapping items must start at the same column"; + function resolveBlockMap({ composeNode, composeEmptyNode }, ctx, bm, onError, tag) { + const NodeClass = tag?.nodeClass ?? YAMLMap.YAMLMap; + const map = new NodeClass(ctx.schema); + if (ctx.atRoot) + ctx.atRoot = false; + let offset = bm.offset; + let commentEnd = null; + for (const collItem of bm.items) { + const { start, key, sep, value } = collItem; + const keyProps = resolveProps.resolveProps(start, { + indicator: "explicit-key-ind", + next: key ?? sep?.[0], + offset, + onError, + parentIndent: bm.indent, + startOnNewline: true + }); + const implicitKey = !keyProps.found; + if (implicitKey) { + if (key) { + if (key.type === "block-seq") + onError(offset, "BLOCK_AS_IMPLICIT_KEY", "A block sequence may not be used as an implicit map key"); + else if ("indent" in key && key.indent !== bm.indent) + onError(offset, "BAD_INDENT", startColMsg); + } + if (!keyProps.anchor && !keyProps.tag && !sep) { + commentEnd = keyProps.end; + if (keyProps.comment) { + if (map.comment) + map.comment += "\n" + keyProps.comment; + else + map.comment = keyProps.comment; + } + continue; + } + if (keyProps.newlineAfterProp || utilContainsNewline.containsNewline(key)) { + onError(key ?? start[start.length - 1], "MULTILINE_IMPLICIT_KEY", "Implicit keys need to be on a single line"); + } + } else if (keyProps.found?.indent !== bm.indent) { + onError(offset, "BAD_INDENT", startColMsg); + } + const keyStart = keyProps.end; + const keyNode = key ? composeNode(ctx, key, keyProps, onError) : composeEmptyNode(ctx, keyStart, start, null, keyProps, onError); + if (ctx.schema.compat) + utilFlowIndentCheck.flowIndentCheck(bm.indent, key, onError); + if (utilMapIncludes.mapIncludes(ctx, map.items, keyNode)) + onError(keyStart, "DUPLICATE_KEY", "Map keys must be unique"); + const valueProps = resolveProps.resolveProps(sep ?? [], { + indicator: "map-value-ind", + next: value, + offset: keyNode.range[2], + onError, + parentIndent: bm.indent, + startOnNewline: !key || key.type === "block-scalar" + }); + offset = valueProps.end; + if (valueProps.found) { + if (implicitKey) { + if (value?.type === "block-map" && !valueProps.hasNewline) + onError(offset, "BLOCK_AS_IMPLICIT_KEY", "Nested mappings are not allowed in compact mappings"); + if (ctx.options.strict && keyProps.start < valueProps.found.offset - 1024) + onError(keyNode.range, "KEY_OVER_1024_CHARS", "The : indicator must be at most 1024 chars after the start of an implicit block mapping key"); + } + const valueNode = value ? composeNode(ctx, value, valueProps, onError) : composeEmptyNode(ctx, offset, sep, null, valueProps, onError); + if (ctx.schema.compat) + utilFlowIndentCheck.flowIndentCheck(bm.indent, value, onError); + offset = valueNode.range[2]; + const pair = new Pair.Pair(keyNode, valueNode); + if (ctx.options.keepSourceTokens) + pair.srcToken = collItem; + map.items.push(pair); + } else { + if (implicitKey) + onError(keyNode.range, "MISSING_CHAR", "Implicit map keys need to be followed by map values"); + if (valueProps.comment) { + if (keyNode.comment) + keyNode.comment += "\n" + valueProps.comment; + else + keyNode.comment = valueProps.comment; + } + const pair = new Pair.Pair(keyNode); + if (ctx.options.keepSourceTokens) + pair.srcToken = collItem; + map.items.push(pair); + } + } + if (commentEnd && commentEnd < offset) + onError(commentEnd, "IMPOSSIBLE", "Map comment with trailing content"); + map.range = [bm.offset, offset, commentEnd ?? offset]; + return map; + } + exports2.resolveBlockMap = resolveBlockMap; + } +}); + +// ../../node_modules/yaml/dist/compose/resolve-block-seq.js +var require_resolve_block_seq = __commonJS({ + "../../node_modules/yaml/dist/compose/resolve-block-seq.js"(exports2) { + "use strict"; + var YAMLSeq = require_YAMLSeq(); + var resolveProps = require_resolve_props(); + var utilFlowIndentCheck = require_util_flow_indent_check(); + function resolveBlockSeq({ composeNode, composeEmptyNode }, ctx, bs, onError, tag) { + const NodeClass = tag?.nodeClass ?? YAMLSeq.YAMLSeq; + const seq = new NodeClass(ctx.schema); + if (ctx.atRoot) + ctx.atRoot = false; + let offset = bs.offset; + let commentEnd = null; + for (const { start, value } of bs.items) { + const props = resolveProps.resolveProps(start, { + indicator: "seq-item-ind", + next: value, + offset, + onError, + parentIndent: bs.indent, + startOnNewline: true + }); + if (!props.found) { + if (props.anchor || props.tag || value) { + if (value && value.type === "block-seq") + onError(props.end, "BAD_INDENT", "All sequence items must start at the same column"); + else + onError(offset, "MISSING_CHAR", "Sequence item without - indicator"); + } else { + commentEnd = props.end; + if (props.comment) + seq.comment = props.comment; + continue; + } + } + const node = value ? composeNode(ctx, value, props, onError) : composeEmptyNode(ctx, props.end, start, null, props, onError); + if (ctx.schema.compat) + utilFlowIndentCheck.flowIndentCheck(bs.indent, value, onError); + offset = node.range[2]; + seq.items.push(node); + } + seq.range = [bs.offset, offset, commentEnd ?? offset]; + return seq; + } + exports2.resolveBlockSeq = resolveBlockSeq; + } +}); + +// ../../node_modules/yaml/dist/compose/resolve-end.js +var require_resolve_end = __commonJS({ + "../../node_modules/yaml/dist/compose/resolve-end.js"(exports2) { + "use strict"; + function resolveEnd(end, offset, reqSpace, onError) { + let comment = ""; + if (end) { + let hasSpace = false; + let sep = ""; + for (const token of end) { + const { source, type } = token; + switch (type) { + case "space": + hasSpace = true; + break; + case "comment": { + if (reqSpace && !hasSpace) + onError(token, "MISSING_CHAR", "Comments must be separated from other tokens by white space characters"); + const cb = source.substring(1) || " "; + if (!comment) + comment = cb; + else + comment += sep + cb; + sep = ""; + break; + } + case "newline": + if (comment) + sep += source; + hasSpace = true; + break; + default: + onError(token, "UNEXPECTED_TOKEN", `Unexpected ${type} at node end`); + } + offset += source.length; + } + } + return { comment, offset }; + } + exports2.resolveEnd = resolveEnd; + } +}); + +// ../../node_modules/yaml/dist/compose/resolve-flow-collection.js +var require_resolve_flow_collection = __commonJS({ + "../../node_modules/yaml/dist/compose/resolve-flow-collection.js"(exports2) { + "use strict"; + var identity = require_identity(); + var Pair = require_Pair(); + var YAMLMap = require_YAMLMap(); + var YAMLSeq = require_YAMLSeq(); + var resolveEnd = require_resolve_end(); + var resolveProps = require_resolve_props(); + var utilContainsNewline = require_util_contains_newline(); + var utilMapIncludes = require_util_map_includes(); + var blockMsg = "Block collections are not allowed within flow collections"; + var isBlock = (token) => token && (token.type === "block-map" || token.type === "block-seq"); + function resolveFlowCollection({ composeNode, composeEmptyNode }, ctx, fc, onError, tag) { + const isMap = fc.start.source === "{"; + const fcName = isMap ? "flow map" : "flow sequence"; + const NodeClass = tag?.nodeClass ?? (isMap ? YAMLMap.YAMLMap : YAMLSeq.YAMLSeq); + const coll = new NodeClass(ctx.schema); + coll.flow = true; + const atRoot = ctx.atRoot; + if (atRoot) + ctx.atRoot = false; + let offset = fc.offset + fc.start.source.length; + for (let i = 0; i < fc.items.length; ++i) { + const collItem = fc.items[i]; + const { start, key, sep, value } = collItem; + const props = resolveProps.resolveProps(start, { + flow: fcName, + indicator: "explicit-key-ind", + next: key ?? sep?.[0], + offset, + onError, + parentIndent: fc.indent, + startOnNewline: false + }); + if (!props.found) { + if (!props.anchor && !props.tag && !sep && !value) { + if (i === 0 && props.comma) + onError(props.comma, "UNEXPECTED_TOKEN", `Unexpected , in ${fcName}`); + else if (i < fc.items.length - 1) + onError(props.start, "UNEXPECTED_TOKEN", `Unexpected empty item in ${fcName}`); + if (props.comment) { + if (coll.comment) + coll.comment += "\n" + props.comment; + else + coll.comment = props.comment; + } + offset = props.end; + continue; + } + if (!isMap && ctx.options.strict && utilContainsNewline.containsNewline(key)) + onError( + key, + // checked by containsNewline() + "MULTILINE_IMPLICIT_KEY", + "Implicit keys of flow sequence pairs need to be on a single line" + ); + } + if (i === 0) { + if (props.comma) + onError(props.comma, "UNEXPECTED_TOKEN", `Unexpected , in ${fcName}`); + } else { + if (!props.comma) + onError(props.start, "MISSING_CHAR", `Missing , between ${fcName} items`); + if (props.comment) { + let prevItemComment = ""; + loop: for (const st of start) { + switch (st.type) { + case "comma": + case "space": + break; + case "comment": + prevItemComment = st.source.substring(1); + break loop; + default: + break loop; + } + } + if (prevItemComment) { + let prev = coll.items[coll.items.length - 1]; + if (identity.isPair(prev)) + prev = prev.value ?? prev.key; + if (prev.comment) + prev.comment += "\n" + prevItemComment; + else + prev.comment = prevItemComment; + props.comment = props.comment.substring(prevItemComment.length + 1); + } + } + } + if (!isMap && !sep && !props.found) { + const valueNode = value ? composeNode(ctx, value, props, onError) : composeEmptyNode(ctx, props.end, sep, null, props, onError); + coll.items.push(valueNode); + offset = valueNode.range[2]; + if (isBlock(value)) + onError(valueNode.range, "BLOCK_IN_FLOW", blockMsg); + } else { + const keyStart = props.end; + const keyNode = key ? composeNode(ctx, key, props, onError) : composeEmptyNode(ctx, keyStart, start, null, props, onError); + if (isBlock(key)) + onError(keyNode.range, "BLOCK_IN_FLOW", blockMsg); + const valueProps = resolveProps.resolveProps(sep ?? [], { + flow: fcName, + indicator: "map-value-ind", + next: value, + offset: keyNode.range[2], + onError, + parentIndent: fc.indent, + startOnNewline: false + }); + if (valueProps.found) { + if (!isMap && !props.found && ctx.options.strict) { + if (sep) + for (const st of sep) { + if (st === valueProps.found) + break; + if (st.type === "newline") { + onError(st, "MULTILINE_IMPLICIT_KEY", "Implicit keys of flow sequence pairs need to be on a single line"); + break; + } + } + if (props.start < valueProps.found.offset - 1024) + onError(valueProps.found, "KEY_OVER_1024_CHARS", "The : indicator must be at most 1024 chars after the start of an implicit flow sequence key"); + } + } else if (value) { + if ("source" in value && value.source && value.source[0] === ":") + onError(value, "MISSING_CHAR", `Missing space after : in ${fcName}`); + else + onError(valueProps.start, "MISSING_CHAR", `Missing , or : between ${fcName} items`); + } + const valueNode = value ? composeNode(ctx, value, valueProps, onError) : valueProps.found ? composeEmptyNode(ctx, valueProps.end, sep, null, valueProps, onError) : null; + if (valueNode) { + if (isBlock(value)) + onError(valueNode.range, "BLOCK_IN_FLOW", blockMsg); + } else if (valueProps.comment) { + if (keyNode.comment) + keyNode.comment += "\n" + valueProps.comment; + else + keyNode.comment = valueProps.comment; + } + const pair = new Pair.Pair(keyNode, valueNode); + if (ctx.options.keepSourceTokens) + pair.srcToken = collItem; + if (isMap) { + const map = coll; + if (utilMapIncludes.mapIncludes(ctx, map.items, keyNode)) + onError(keyStart, "DUPLICATE_KEY", "Map keys must be unique"); + map.items.push(pair); + } else { + const map = new YAMLMap.YAMLMap(ctx.schema); + map.flow = true; + map.items.push(pair); + const endRange = (valueNode ?? keyNode).range; + map.range = [keyNode.range[0], endRange[1], endRange[2]]; + coll.items.push(map); + } + offset = valueNode ? valueNode.range[2] : valueProps.end; + } + } + const expectedEnd = isMap ? "}" : "]"; + const [ce, ...ee] = fc.end; + let cePos = offset; + if (ce && ce.source === expectedEnd) + cePos = ce.offset + ce.source.length; + else { + const name = fcName[0].toUpperCase() + fcName.substring(1); + const msg = atRoot ? `${name} must end with a ${expectedEnd}` : `${name} in block collection must be sufficiently indented and end with a ${expectedEnd}`; + onError(offset, atRoot ? "MISSING_CHAR" : "BAD_INDENT", msg); + if (ce && ce.source.length !== 1) + ee.unshift(ce); + } + if (ee.length > 0) { + const end = resolveEnd.resolveEnd(ee, cePos, ctx.options.strict, onError); + if (end.comment) { + if (coll.comment) + coll.comment += "\n" + end.comment; + else + coll.comment = end.comment; + } + coll.range = [fc.offset, cePos, end.offset]; + } else { + coll.range = [fc.offset, cePos, cePos]; + } + return coll; + } + exports2.resolveFlowCollection = resolveFlowCollection; + } +}); + +// ../../node_modules/yaml/dist/compose/compose-collection.js +var require_compose_collection = __commonJS({ + "../../node_modules/yaml/dist/compose/compose-collection.js"(exports2) { + "use strict"; + var identity = require_identity(); + var Scalar = require_Scalar(); + var YAMLMap = require_YAMLMap(); + var YAMLSeq = require_YAMLSeq(); + var resolveBlockMap = require_resolve_block_map(); + var resolveBlockSeq = require_resolve_block_seq(); + var resolveFlowCollection = require_resolve_flow_collection(); + function resolveCollection(CN, ctx, token, onError, tagName, tag) { + const coll = token.type === "block-map" ? resolveBlockMap.resolveBlockMap(CN, ctx, token, onError, tag) : token.type === "block-seq" ? resolveBlockSeq.resolveBlockSeq(CN, ctx, token, onError, tag) : resolveFlowCollection.resolveFlowCollection(CN, ctx, token, onError, tag); + const Coll = coll.constructor; + if (tagName === "!" || tagName === Coll.tagName) { + coll.tag = Coll.tagName; + return coll; + } + if (tagName) + coll.tag = tagName; + return coll; + } + function composeCollection(CN, ctx, token, props, onError) { + const tagToken = props.tag; + const tagName = !tagToken ? null : ctx.directives.tagName(tagToken.source, (msg) => onError(tagToken, "TAG_RESOLVE_FAILED", msg)); + if (token.type === "block-seq") { + const { anchor, newlineAfterProp: nl } = props; + const lastProp = anchor && tagToken ? anchor.offset > tagToken.offset ? anchor : tagToken : anchor ?? tagToken; + if (lastProp && (!nl || nl.offset < lastProp.offset)) { + const message = "Missing newline after block sequence props"; + onError(lastProp, "MISSING_CHAR", message); + } + } + const expType = token.type === "block-map" ? "map" : token.type === "block-seq" ? "seq" : token.start.source === "{" ? "map" : "seq"; + if (!tagToken || !tagName || tagName === "!" || tagName === YAMLMap.YAMLMap.tagName && expType === "map" || tagName === YAMLSeq.YAMLSeq.tagName && expType === "seq") { + return resolveCollection(CN, ctx, token, onError, tagName); + } + let tag = ctx.schema.tags.find((t) => t.tag === tagName && t.collection === expType); + if (!tag) { + const kt = ctx.schema.knownTags[tagName]; + if (kt && kt.collection === expType) { + ctx.schema.tags.push(Object.assign({}, kt, { default: false })); + tag = kt; + } else { + if (kt?.collection) { + onError(tagToken, "BAD_COLLECTION_TYPE", `${kt.tag} used for ${expType} collection, but expects ${kt.collection}`, true); + } else { + onError(tagToken, "TAG_RESOLVE_FAILED", `Unresolved tag: ${tagName}`, true); + } + return resolveCollection(CN, ctx, token, onError, tagName); + } + } + const coll = resolveCollection(CN, ctx, token, onError, tagName, tag); + const res = tag.resolve?.(coll, (msg) => onError(tagToken, "TAG_RESOLVE_FAILED", msg), ctx.options) ?? coll; + const node = identity.isNode(res) ? res : new Scalar.Scalar(res); + node.range = coll.range; + node.tag = tagName; + if (tag?.format) + node.format = tag.format; + return node; + } + exports2.composeCollection = composeCollection; + } +}); + +// ../../node_modules/yaml/dist/compose/resolve-block-scalar.js +var require_resolve_block_scalar = __commonJS({ + "../../node_modules/yaml/dist/compose/resolve-block-scalar.js"(exports2) { + "use strict"; + var Scalar = require_Scalar(); + function resolveBlockScalar(ctx, scalar, onError) { + const start = scalar.offset; + const header = parseBlockScalarHeader(scalar, ctx.options.strict, onError); + if (!header) + return { value: "", type: null, comment: "", range: [start, start, start] }; + const type = header.mode === ">" ? Scalar.Scalar.BLOCK_FOLDED : Scalar.Scalar.BLOCK_LITERAL; + const lines = scalar.source ? splitLines(scalar.source) : []; + let chompStart = lines.length; + for (let i = lines.length - 1; i >= 0; --i) { + const content = lines[i][1]; + if (content === "" || content === "\r") + chompStart = i; + else + break; + } + if (chompStart === 0) { + const value2 = header.chomp === "+" && lines.length > 0 ? "\n".repeat(Math.max(1, lines.length - 1)) : ""; + let end2 = start + header.length; + if (scalar.source) + end2 += scalar.source.length; + return { value: value2, type, comment: header.comment, range: [start, end2, end2] }; + } + let trimIndent = scalar.indent + header.indent; + let offset = scalar.offset + header.length; + let contentStart = 0; + for (let i = 0; i < chompStart; ++i) { + const [indent, content] = lines[i]; + if (content === "" || content === "\r") { + if (header.indent === 0 && indent.length > trimIndent) + trimIndent = indent.length; + } else { + if (indent.length < trimIndent) { + const message = "Block scalars with more-indented leading empty lines must use an explicit indentation indicator"; + onError(offset + indent.length, "MISSING_CHAR", message); + } + if (header.indent === 0) + trimIndent = indent.length; + contentStart = i; + if (trimIndent === 0 && !ctx.atRoot) { + const message = "Block scalar values in collections must be indented"; + onError(offset, "BAD_INDENT", message); + } + break; + } + offset += indent.length + content.length + 1; + } + for (let i = lines.length - 1; i >= chompStart; --i) { + if (lines[i][0].length > trimIndent) + chompStart = i + 1; + } + let value = ""; + let sep = ""; + let prevMoreIndented = false; + for (let i = 0; i < contentStart; ++i) + value += lines[i][0].slice(trimIndent) + "\n"; + for (let i = contentStart; i < chompStart; ++i) { + let [indent, content] = lines[i]; + offset += indent.length + content.length + 1; + const crlf = content[content.length - 1] === "\r"; + if (crlf) + content = content.slice(0, -1); + if (content && indent.length < trimIndent) { + const src = header.indent ? "explicit indentation indicator" : "first line"; + const message = `Block scalar lines must not be less indented than their ${src}`; + onError(offset - content.length - (crlf ? 2 : 1), "BAD_INDENT", message); + indent = ""; + } + if (type === Scalar.Scalar.BLOCK_LITERAL) { + value += sep + indent.slice(trimIndent) + content; + sep = "\n"; + } else if (indent.length > trimIndent || content[0] === " ") { + if (sep === " ") + sep = "\n"; + else if (!prevMoreIndented && sep === "\n") + sep = "\n\n"; + value += sep + indent.slice(trimIndent) + content; + sep = "\n"; + prevMoreIndented = true; + } else if (content === "") { + if (sep === "\n") + value += "\n"; + else + sep = "\n"; + } else { + value += sep + content; + sep = " "; + prevMoreIndented = false; + } + } + switch (header.chomp) { + case "-": + break; + case "+": + for (let i = chompStart; i < lines.length; ++i) + value += "\n" + lines[i][0].slice(trimIndent); + if (value[value.length - 1] !== "\n") + value += "\n"; + break; + default: + value += "\n"; + } + const end = start + header.length + scalar.source.length; + return { value, type, comment: header.comment, range: [start, end, end] }; + } + function parseBlockScalarHeader({ offset, props }, strict, onError) { + if (props[0].type !== "block-scalar-header") { + onError(props[0], "IMPOSSIBLE", "Block scalar header not found"); + return null; + } + const { source } = props[0]; + const mode = source[0]; + let indent = 0; + let chomp = ""; + let error = -1; + for (let i = 1; i < source.length; ++i) { + const ch = source[i]; + if (!chomp && (ch === "-" || ch === "+")) + chomp = ch; + else { + const n = Number(ch); + if (!indent && n) + indent = n; + else if (error === -1) + error = offset + i; + } + } + if (error !== -1) + onError(error, "UNEXPECTED_TOKEN", `Block scalar header includes extra characters: ${source}`); + let hasSpace = false; + let comment = ""; + let length = source.length; + for (let i = 1; i < props.length; ++i) { + const token = props[i]; + switch (token.type) { + case "space": + hasSpace = true; + case "newline": + length += token.source.length; + break; + case "comment": + if (strict && !hasSpace) { + const message = "Comments must be separated from other tokens by white space characters"; + onError(token, "MISSING_CHAR", message); + } + length += token.source.length; + comment = token.source.substring(1); + break; + case "error": + onError(token, "UNEXPECTED_TOKEN", token.message); + length += token.source.length; + break; + default: { + const message = `Unexpected token in block scalar header: ${token.type}`; + onError(token, "UNEXPECTED_TOKEN", message); + const ts = token.source; + if (ts && typeof ts === "string") + length += ts.length; + } + } + } + return { mode, indent, chomp, comment, length }; + } + function splitLines(source) { + const split = source.split(/\n( *)/); + const first = split[0]; + const m = first.match(/^( *)/); + const line0 = m?.[1] ? [m[1], first.slice(m[1].length)] : ["", first]; + const lines = [line0]; + for (let i = 1; i < split.length; i += 2) + lines.push([split[i], split[i + 1]]); + return lines; + } + exports2.resolveBlockScalar = resolveBlockScalar; + } +}); + +// ../../node_modules/yaml/dist/compose/resolve-flow-scalar.js +var require_resolve_flow_scalar = __commonJS({ + "../../node_modules/yaml/dist/compose/resolve-flow-scalar.js"(exports2) { + "use strict"; + var Scalar = require_Scalar(); + var resolveEnd = require_resolve_end(); + function resolveFlowScalar(scalar, strict, onError) { + const { offset, type, source, end } = scalar; + let _type; + let value; + const _onError = (rel, code, msg) => onError(offset + rel, code, msg); + switch (type) { + case "scalar": + _type = Scalar.Scalar.PLAIN; + value = plainValue(source, _onError); + break; + case "single-quoted-scalar": + _type = Scalar.Scalar.QUOTE_SINGLE; + value = singleQuotedValue(source, _onError); + break; + case "double-quoted-scalar": + _type = Scalar.Scalar.QUOTE_DOUBLE; + value = doubleQuotedValue(source, _onError); + break; + default: + onError(scalar, "UNEXPECTED_TOKEN", `Expected a flow scalar value, but found: ${type}`); + return { + value: "", + type: null, + comment: "", + range: [offset, offset + source.length, offset + source.length] + }; + } + const valueEnd = offset + source.length; + const re = resolveEnd.resolveEnd(end, valueEnd, strict, onError); + return { + value, + type: _type, + comment: re.comment, + range: [offset, valueEnd, re.offset] + }; + } + function plainValue(source, onError) { + let badChar = ""; + switch (source[0]) { + case " ": + badChar = "a tab character"; + break; + case ",": + badChar = "flow indicator character ,"; + break; + case "%": + badChar = "directive indicator character %"; + break; + case "|": + case ">": { + badChar = `block scalar indicator ${source[0]}`; + break; + } + case "@": + case "`": { + badChar = `reserved character ${source[0]}`; + break; + } + } + if (badChar) + onError(0, "BAD_SCALAR_START", `Plain value cannot start with ${badChar}`); + return foldLines(source); + } + function singleQuotedValue(source, onError) { + if (source[source.length - 1] !== "'" || source.length === 1) + onError(source.length, "MISSING_CHAR", "Missing closing 'quote"); + return foldLines(source.slice(1, -1)).replace(/''/g, "'"); + } + function foldLines(source) { + let first, line; + try { + first = new RegExp("(.*?)(? wsStart ? source.slice(wsStart, i + 1) : ch; + } else { + res += ch; + } + } + if (source[source.length - 1] !== '"' || source.length === 1) + onError(source.length, "MISSING_CHAR", 'Missing closing "quote'); + return res; + } + function foldNewline(source, offset) { + let fold = ""; + let ch = source[offset + 1]; + while (ch === " " || ch === " " || ch === "\n" || ch === "\r") { + if (ch === "\r" && source[offset + 2] !== "\n") + break; + if (ch === "\n") + fold += "\n"; + offset += 1; + ch = source[offset + 1]; + } + if (!fold) + fold = " "; + return { fold, offset }; + } + var escapeCodes = { + "0": "\0", + // null character + a: "\x07", + // bell character + b: "\b", + // backspace + e: "\x1B", + // escape character + f: "\f", + // form feed + n: "\n", + // line feed + r: "\r", + // carriage return + t: " ", + // horizontal tab + v: "\v", + // vertical tab + N: "\x85", + // Unicode next line + _: "\xA0", + // Unicode non-breaking space + L: "\u2028", + // Unicode line separator + P: "\u2029", + // Unicode paragraph separator + " ": " ", + '"': '"', + "/": "/", + "\\": "\\", + " ": " " + }; + function parseCharCode(source, offset, length, onError) { + const cc = source.substr(offset, length); + const ok = cc.length === length && /^[0-9a-fA-F]+$/.test(cc); + const code = ok ? parseInt(cc, 16) : NaN; + if (isNaN(code)) { + const raw = source.substr(offset - 2, length + 2); + onError(offset - 2, "BAD_DQ_ESCAPE", `Invalid escape sequence ${raw}`); + return raw; + } + return String.fromCodePoint(code); + } + exports2.resolveFlowScalar = resolveFlowScalar; + } +}); + +// ../../node_modules/yaml/dist/compose/compose-scalar.js +var require_compose_scalar = __commonJS({ + "../../node_modules/yaml/dist/compose/compose-scalar.js"(exports2) { + "use strict"; + var identity = require_identity(); + var Scalar = require_Scalar(); + var resolveBlockScalar = require_resolve_block_scalar(); + var resolveFlowScalar = require_resolve_flow_scalar(); + function composeScalar(ctx, token, tagToken, onError) { + const { value, type, comment, range } = token.type === "block-scalar" ? resolveBlockScalar.resolveBlockScalar(ctx, token, onError) : resolveFlowScalar.resolveFlowScalar(token, ctx.options.strict, onError); + const tagName = tagToken ? ctx.directives.tagName(tagToken.source, (msg) => onError(tagToken, "TAG_RESOLVE_FAILED", msg)) : null; + const tag = tagToken && tagName ? findScalarTagByName(ctx.schema, value, tagName, tagToken, onError) : token.type === "scalar" ? findScalarTagByTest(ctx, value, token, onError) : ctx.schema[identity.SCALAR]; + let scalar; + try { + const res = tag.resolve(value, (msg) => onError(tagToken ?? token, "TAG_RESOLVE_FAILED", msg), ctx.options); + scalar = identity.isScalar(res) ? res : new Scalar.Scalar(res); + } catch (error) { + const msg = error instanceof Error ? error.message : String(error); + onError(tagToken ?? token, "TAG_RESOLVE_FAILED", msg); + scalar = new Scalar.Scalar(value); + } + scalar.range = range; + scalar.source = value; + if (type) + scalar.type = type; + if (tagName) + scalar.tag = tagName; + if (tag.format) + scalar.format = tag.format; + if (comment) + scalar.comment = comment; + return scalar; + } + function findScalarTagByName(schema, value, tagName, tagToken, onError) { + if (tagName === "!") + return schema[identity.SCALAR]; + const matchWithTest = []; + for (const tag of schema.tags) { + if (!tag.collection && tag.tag === tagName) { + if (tag.default && tag.test) + matchWithTest.push(tag); + else + return tag; + } + } + for (const tag of matchWithTest) + if (tag.test?.test(value)) + return tag; + const kt = schema.knownTags[tagName]; + if (kt && !kt.collection) { + schema.tags.push(Object.assign({}, kt, { default: false, test: void 0 })); + return kt; + } + onError(tagToken, "TAG_RESOLVE_FAILED", `Unresolved tag: ${tagName}`, tagName !== "tag:yaml.org,2002:str"); + return schema[identity.SCALAR]; + } + function findScalarTagByTest({ directives, schema }, value, token, onError) { + const tag = schema.tags.find((tag2) => tag2.default && tag2.test?.test(value)) || schema[identity.SCALAR]; + if (schema.compat) { + const compat = schema.compat.find((tag2) => tag2.default && tag2.test?.test(value)) ?? schema[identity.SCALAR]; + if (tag.tag !== compat.tag) { + const ts = directives.tagString(tag.tag); + const cs = directives.tagString(compat.tag); + const msg = `Value may be parsed as either ${ts} or ${cs}`; + onError(token, "TAG_RESOLVE_FAILED", msg, true); + } + } + return tag; + } + exports2.composeScalar = composeScalar; + } +}); + +// ../../node_modules/yaml/dist/compose/util-empty-scalar-position.js +var require_util_empty_scalar_position = __commonJS({ + "../../node_modules/yaml/dist/compose/util-empty-scalar-position.js"(exports2) { + "use strict"; + function emptyScalarPosition(offset, before, pos) { + if (before) { + if (pos === null) + pos = before.length; + for (let i = pos - 1; i >= 0; --i) { + let st = before[i]; + switch (st.type) { + case "space": + case "comment": + case "newline": + offset -= st.source.length; + continue; + } + st = before[++i]; + while (st?.type === "space") { + offset += st.source.length; + st = before[++i]; + } + break; + } + } + return offset; + } + exports2.emptyScalarPosition = emptyScalarPosition; + } +}); + +// ../../node_modules/yaml/dist/compose/compose-node.js +var require_compose_node = __commonJS({ + "../../node_modules/yaml/dist/compose/compose-node.js"(exports2) { + "use strict"; + var Alias = require_Alias(); + var composeCollection = require_compose_collection(); + var composeScalar = require_compose_scalar(); + var resolveEnd = require_resolve_end(); + var utilEmptyScalarPosition = require_util_empty_scalar_position(); + var CN = { composeNode, composeEmptyNode }; + function composeNode(ctx, token, props, onError) { + const { spaceBefore, comment, anchor, tag } = props; + let node; + let isSrcToken = true; + switch (token.type) { + case "alias": + node = composeAlias(ctx, token, onError); + if (anchor || tag) + onError(token, "ALIAS_PROPS", "An alias node must not specify any properties"); + break; + case "scalar": + case "single-quoted-scalar": + case "double-quoted-scalar": + case "block-scalar": + node = composeScalar.composeScalar(ctx, token, tag, onError); + if (anchor) + node.anchor = anchor.source.substring(1); + break; + case "block-map": + case "block-seq": + case "flow-collection": + node = composeCollection.composeCollection(CN, ctx, token, props, onError); + if (anchor) + node.anchor = anchor.source.substring(1); + break; + default: { + const message = token.type === "error" ? token.message : `Unsupported token (type: ${token.type})`; + onError(token, "UNEXPECTED_TOKEN", message); + node = composeEmptyNode(ctx, token.offset, void 0, null, props, onError); + isSrcToken = false; + } + } + if (anchor && node.anchor === "") + onError(anchor, "BAD_ALIAS", "Anchor cannot be an empty string"); + if (spaceBefore) + node.spaceBefore = true; + if (comment) { + if (token.type === "scalar" && token.source === "") + node.comment = comment; + else + node.commentBefore = comment; + } + if (ctx.options.keepSourceTokens && isSrcToken) + node.srcToken = token; + return node; + } + function composeEmptyNode(ctx, offset, before, pos, { spaceBefore, comment, anchor, tag, end }, onError) { + const token = { + type: "scalar", + offset: utilEmptyScalarPosition.emptyScalarPosition(offset, before, pos), + indent: -1, + source: "" + }; + const node = composeScalar.composeScalar(ctx, token, tag, onError); + if (anchor) { + node.anchor = anchor.source.substring(1); + if (node.anchor === "") + onError(anchor, "BAD_ALIAS", "Anchor cannot be an empty string"); + } + if (spaceBefore) + node.spaceBefore = true; + if (comment) { + node.comment = comment; + node.range[2] = end; + } + return node; + } + function composeAlias({ options }, { offset, source, end }, onError) { + const alias = new Alias.Alias(source.substring(1)); + if (alias.source === "") + onError(offset, "BAD_ALIAS", "Alias cannot be an empty string"); + if (alias.source.endsWith(":")) + onError(offset + source.length - 1, "BAD_ALIAS", "Alias ending in : is ambiguous", true); + const valueEnd = offset + source.length; + const re = resolveEnd.resolveEnd(end, valueEnd, options.strict, onError); + alias.range = [offset, valueEnd, re.offset]; + if (re.comment) + alias.comment = re.comment; + return alias; + } + exports2.composeEmptyNode = composeEmptyNode; + exports2.composeNode = composeNode; + } +}); + +// ../../node_modules/yaml/dist/compose/compose-doc.js +var require_compose_doc = __commonJS({ + "../../node_modules/yaml/dist/compose/compose-doc.js"(exports2) { + "use strict"; + var Document = require_Document(); + var composeNode = require_compose_node(); + var resolveEnd = require_resolve_end(); + var resolveProps = require_resolve_props(); + function composeDoc(options, directives, { offset, start, value, end }, onError) { + const opts = Object.assign({ _directives: directives }, options); + const doc = new Document.Document(void 0, opts); + const ctx = { + atRoot: true, + directives: doc.directives, + options: doc.options, + schema: doc.schema + }; + const props = resolveProps.resolveProps(start, { + indicator: "doc-start", + next: value ?? end?.[0], + offset, + onError, + parentIndent: 0, + startOnNewline: true + }); + if (props.found) { + doc.directives.docStart = true; + if (value && (value.type === "block-map" || value.type === "block-seq") && !props.hasNewline) + onError(props.end, "MISSING_CHAR", "Block collection cannot start on same line with directives-end marker"); + } + doc.contents = value ? composeNode.composeNode(ctx, value, props, onError) : composeNode.composeEmptyNode(ctx, props.end, start, null, props, onError); + const contentEnd = doc.contents.range[2]; + const re = resolveEnd.resolveEnd(end, contentEnd, false, onError); + if (re.comment) + doc.comment = re.comment; + doc.range = [offset, contentEnd, re.offset]; + return doc; + } + exports2.composeDoc = composeDoc; + } +}); + +// ../../node_modules/yaml/dist/compose/composer.js +var require_composer = __commonJS({ + "../../node_modules/yaml/dist/compose/composer.js"(exports2) { + "use strict"; + var directives = require_directives(); + var Document = require_Document(); + var errors = require_errors(); + var identity = require_identity(); + var composeDoc = require_compose_doc(); + var resolveEnd = require_resolve_end(); + function getErrorPos(src) { + if (typeof src === "number") + return [src, src + 1]; + if (Array.isArray(src)) + return src.length === 2 ? src : [src[0], src[1]]; + const { offset, source } = src; + return [offset, offset + (typeof source === "string" ? source.length : 1)]; + } + function parsePrelude(prelude) { + let comment = ""; + let atComment = false; + let afterEmptyLine = false; + for (let i = 0; i < prelude.length; ++i) { + const source = prelude[i]; + switch (source[0]) { + case "#": + comment += (comment === "" ? "" : afterEmptyLine ? "\n\n" : "\n") + (source.substring(1) || " "); + atComment = true; + afterEmptyLine = false; + break; + case "%": + if (prelude[i + 1]?.[0] !== "#") + i += 1; + atComment = false; + break; + default: + if (!atComment) + afterEmptyLine = true; + atComment = false; + } + } + return { comment, afterEmptyLine }; + } + var Composer = class { + constructor(options = {}) { + this.doc = null; + this.atDirectives = false; + this.prelude = []; + this.errors = []; + this.warnings = []; + this.onError = (source, code, message, warning) => { + const pos = getErrorPos(source); + if (warning) + this.warnings.push(new errors.YAMLWarning(pos, code, message)); + else + this.errors.push(new errors.YAMLParseError(pos, code, message)); + }; + this.directives = new directives.Directives({ version: options.version || "1.2" }); + this.options = options; + } + decorate(doc, afterDoc) { + const { comment, afterEmptyLine } = parsePrelude(this.prelude); + if (comment) { + const dc = doc.contents; + if (afterDoc) { + doc.comment = doc.comment ? `${doc.comment} +${comment}` : comment; + } else if (afterEmptyLine || doc.directives.docStart || !dc) { + doc.commentBefore = comment; + } else if (identity.isCollection(dc) && !dc.flow && dc.items.length > 0) { + let it = dc.items[0]; + if (identity.isPair(it)) + it = it.key; + const cb = it.commentBefore; + it.commentBefore = cb ? `${comment} +${cb}` : comment; + } else { + const cb = dc.commentBefore; + dc.commentBefore = cb ? `${comment} +${cb}` : comment; + } + } + if (afterDoc) { + Array.prototype.push.apply(doc.errors, this.errors); + Array.prototype.push.apply(doc.warnings, this.warnings); + } else { + doc.errors = this.errors; + doc.warnings = this.warnings; + } + this.prelude = []; + this.errors = []; + this.warnings = []; + } + /** + * Current stream status information. + * + * Mostly useful at the end of input for an empty stream. + */ + streamInfo() { + return { + comment: parsePrelude(this.prelude).comment, + directives: this.directives, + errors: this.errors, + warnings: this.warnings + }; + } + /** + * Compose tokens into documents. + * + * @param forceDoc - If the stream contains no document, still emit a final document including any comments and directives that would be applied to a subsequent document. + * @param endOffset - Should be set if `forceDoc` is also set, to set the document range end and to indicate errors correctly. + */ + *compose(tokens, forceDoc = false, endOffset = -1) { + for (const token of tokens) + yield* this.next(token); + yield* this.end(forceDoc, endOffset); + } + /** Advance the composer by one CST token. */ + *next(token) { + if (process.env.LOG_STREAM) + console.dir(token, { depth: null }); + switch (token.type) { + case "directive": + this.directives.add(token.source, (offset, message, warning) => { + const pos = getErrorPos(token); + pos[0] += offset; + this.onError(pos, "BAD_DIRECTIVE", message, warning); + }); + this.prelude.push(token.source); + this.atDirectives = true; + break; + case "document": { + const doc = composeDoc.composeDoc(this.options, this.directives, token, this.onError); + if (this.atDirectives && !doc.directives.docStart) + this.onError(token, "MISSING_CHAR", "Missing directives-end/doc-start indicator line"); + this.decorate(doc, false); + if (this.doc) + yield this.doc; + this.doc = doc; + this.atDirectives = false; + break; + } + case "byte-order-mark": + case "space": + break; + case "comment": + case "newline": + this.prelude.push(token.source); + break; + case "error": { + const msg = token.source ? `${token.message}: ${JSON.stringify(token.source)}` : token.message; + const error = new errors.YAMLParseError(getErrorPos(token), "UNEXPECTED_TOKEN", msg); + if (this.atDirectives || !this.doc) + this.errors.push(error); + else + this.doc.errors.push(error); + break; + } + case "doc-end": { + if (!this.doc) { + const msg = "Unexpected doc-end without preceding document"; + this.errors.push(new errors.YAMLParseError(getErrorPos(token), "UNEXPECTED_TOKEN", msg)); + break; + } + this.doc.directives.docEnd = true; + const end = resolveEnd.resolveEnd(token.end, token.offset + token.source.length, this.doc.options.strict, this.onError); + this.decorate(this.doc, true); + if (end.comment) { + const dc = this.doc.comment; + this.doc.comment = dc ? `${dc} +${end.comment}` : end.comment; + } + this.doc.range[2] = end.offset; + break; + } + default: + this.errors.push(new errors.YAMLParseError(getErrorPos(token), "UNEXPECTED_TOKEN", `Unsupported token ${token.type}`)); + } + } + /** + * Call at end of input to yield any remaining document. + * + * @param forceDoc - If the stream contains no document, still emit a final document including any comments and directives that would be applied to a subsequent document. + * @param endOffset - Should be set if `forceDoc` is also set, to set the document range end and to indicate errors correctly. + */ + *end(forceDoc = false, endOffset = -1) { + if (this.doc) { + this.decorate(this.doc, true); + yield this.doc; + this.doc = null; + } else if (forceDoc) { + const opts = Object.assign({ _directives: this.directives }, this.options); + const doc = new Document.Document(void 0, opts); + if (this.atDirectives) + this.onError(endOffset, "MISSING_CHAR", "Missing directives-end indicator line"); + doc.range = [0, endOffset, endOffset]; + this.decorate(doc, false); + yield doc; + } + } + }; + exports2.Composer = Composer; + } +}); + +// ../../node_modules/yaml/dist/parse/cst-scalar.js +var require_cst_scalar = __commonJS({ + "../../node_modules/yaml/dist/parse/cst-scalar.js"(exports2) { + "use strict"; + var resolveBlockScalar = require_resolve_block_scalar(); + var resolveFlowScalar = require_resolve_flow_scalar(); + var errors = require_errors(); + var stringifyString = require_stringifyString(); + function resolveAsScalar(token, strict = true, onError) { + if (token) { + const _onError = (pos, code, message) => { + const offset = typeof pos === "number" ? pos : Array.isArray(pos) ? pos[0] : pos.offset; + if (onError) + onError(offset, code, message); + else + throw new errors.YAMLParseError([offset, offset + 1], code, message); + }; + switch (token.type) { + case "scalar": + case "single-quoted-scalar": + case "double-quoted-scalar": + return resolveFlowScalar.resolveFlowScalar(token, strict, _onError); + case "block-scalar": + return resolveBlockScalar.resolveBlockScalar({ options: { strict } }, token, _onError); + } + } + return null; + } + function createScalarToken(value, context) { + const { implicitKey = false, indent, inFlow = false, offset = -1, type = "PLAIN" } = context; + const source = stringifyString.stringifyString({ type, value }, { + implicitKey, + indent: indent > 0 ? " ".repeat(indent) : "", + inFlow, + options: { blockQuote: true, lineWidth: -1 } + }); + const end = context.end ?? [ + { type: "newline", offset: -1, indent, source: "\n" } + ]; + switch (source[0]) { + case "|": + case ">": { + const he = source.indexOf("\n"); + const head = source.substring(0, he); + const body = source.substring(he + 1) + "\n"; + const props = [ + { type: "block-scalar-header", offset, indent, source: head } + ]; + if (!addEndtoBlockProps(props, end)) + props.push({ type: "newline", offset: -1, indent, source: "\n" }); + return { type: "block-scalar", offset, indent, props, source: body }; + } + case '"': + return { type: "double-quoted-scalar", offset, indent, source, end }; + case "'": + return { type: "single-quoted-scalar", offset, indent, source, end }; + default: + return { type: "scalar", offset, indent, source, end }; + } + } + function setScalarValue(token, value, context = {}) { + let { afterKey = false, implicitKey = false, inFlow = false, type } = context; + let indent = "indent" in token ? token.indent : null; + if (afterKey && typeof indent === "number") + indent += 2; + if (!type) + switch (token.type) { + case "single-quoted-scalar": + type = "QUOTE_SINGLE"; + break; + case "double-quoted-scalar": + type = "QUOTE_DOUBLE"; + break; + case "block-scalar": { + const header = token.props[0]; + if (header.type !== "block-scalar-header") + throw new Error("Invalid block scalar header"); + type = header.source[0] === ">" ? "BLOCK_FOLDED" : "BLOCK_LITERAL"; + break; + } + default: + type = "PLAIN"; + } + const source = stringifyString.stringifyString({ type, value }, { + implicitKey: implicitKey || indent === null, + indent: indent !== null && indent > 0 ? " ".repeat(indent) : "", + inFlow, + options: { blockQuote: true, lineWidth: -1 } + }); + switch (source[0]) { + case "|": + case ">": + setBlockScalarValue(token, source); + break; + case '"': + setFlowScalarValue(token, source, "double-quoted-scalar"); + break; + case "'": + setFlowScalarValue(token, source, "single-quoted-scalar"); + break; + default: + setFlowScalarValue(token, source, "scalar"); + } + } + function setBlockScalarValue(token, source) { + const he = source.indexOf("\n"); + const head = source.substring(0, he); + const body = source.substring(he + 1) + "\n"; + if (token.type === "block-scalar") { + const header = token.props[0]; + if (header.type !== "block-scalar-header") + throw new Error("Invalid block scalar header"); + header.source = head; + token.source = body; + } else { + const { offset } = token; + const indent = "indent" in token ? token.indent : -1; + const props = [ + { type: "block-scalar-header", offset, indent, source: head } + ]; + if (!addEndtoBlockProps(props, "end" in token ? token.end : void 0)) + props.push({ type: "newline", offset: -1, indent, source: "\n" }); + for (const key of Object.keys(token)) + if (key !== "type" && key !== "offset") + delete token[key]; + Object.assign(token, { type: "block-scalar", indent, props, source: body }); + } + } + function addEndtoBlockProps(props, end) { + if (end) + for (const st of end) + switch (st.type) { + case "space": + case "comment": + props.push(st); + break; + case "newline": + props.push(st); + return true; + } + return false; + } + function setFlowScalarValue(token, source, type) { + switch (token.type) { + case "scalar": + case "double-quoted-scalar": + case "single-quoted-scalar": + token.type = type; + token.source = source; + break; + case "block-scalar": { + const end = token.props.slice(1); + let oa = source.length; + if (token.props[0].type === "block-scalar-header") + oa -= token.props[0].source.length; + for (const tok of end) + tok.offset += oa; + delete token.props; + Object.assign(token, { type, source, end }); + break; + } + case "block-map": + case "block-seq": { + const offset = token.offset + source.length; + const nl = { type: "newline", offset, indent: token.indent, source: "\n" }; + delete token.items; + Object.assign(token, { type, source, end: [nl] }); + break; + } + default: { + const indent = "indent" in token ? token.indent : -1; + const end = "end" in token && Array.isArray(token.end) ? token.end.filter((st) => st.type === "space" || st.type === "comment" || st.type === "newline") : []; + for (const key of Object.keys(token)) + if (key !== "type" && key !== "offset") + delete token[key]; + Object.assign(token, { type, indent, source, end }); + } + } + } + exports2.createScalarToken = createScalarToken; + exports2.resolveAsScalar = resolveAsScalar; + exports2.setScalarValue = setScalarValue; + } +}); + +// ../../node_modules/yaml/dist/parse/cst-stringify.js +var require_cst_stringify = __commonJS({ + "../../node_modules/yaml/dist/parse/cst-stringify.js"(exports2) { + "use strict"; + var stringify = (cst) => "type" in cst ? stringifyToken(cst) : stringifyItem(cst); + function stringifyToken(token) { + switch (token.type) { + case "block-scalar": { + let res = ""; + for (const tok of token.props) + res += stringifyToken(tok); + return res + token.source; + } + case "block-map": + case "block-seq": { + let res = ""; + for (const item of token.items) + res += stringifyItem(item); + return res; + } + case "flow-collection": { + let res = token.start.source; + for (const item of token.items) + res += stringifyItem(item); + for (const st of token.end) + res += st.source; + return res; + } + case "document": { + let res = stringifyItem(token); + if (token.end) + for (const st of token.end) + res += st.source; + return res; + } + default: { + let res = token.source; + if ("end" in token && token.end) + for (const st of token.end) + res += st.source; + return res; + } + } + } + function stringifyItem({ start, key, sep, value }) { + let res = ""; + for (const st of start) + res += st.source; + if (key) + res += stringifyToken(key); + if (sep) + for (const st of sep) + res += st.source; + if (value) + res += stringifyToken(value); + return res; + } + exports2.stringify = stringify; + } +}); + +// ../../node_modules/yaml/dist/parse/cst-visit.js +var require_cst_visit = __commonJS({ + "../../node_modules/yaml/dist/parse/cst-visit.js"(exports2) { + "use strict"; + var BREAK = Symbol("break visit"); + var SKIP = Symbol("skip children"); + var REMOVE = Symbol("remove item"); + function visit(cst, visitor) { + if ("type" in cst && cst.type === "document") + cst = { start: cst.start, value: cst.value }; + _visit(Object.freeze([]), cst, visitor); + } + visit.BREAK = BREAK; + visit.SKIP = SKIP; + visit.REMOVE = REMOVE; + visit.itemAtPath = (cst, path) => { + let item = cst; + for (const [field, index] of path) { + const tok = item?.[field]; + if (tok && "items" in tok) { + item = tok.items[index]; + } else + return void 0; + } + return item; + }; + visit.parentCollection = (cst, path) => { + const parent = visit.itemAtPath(cst, path.slice(0, -1)); + const field = path[path.length - 1][0]; + const coll = parent?.[field]; + if (coll && "items" in coll) + return coll; + throw new Error("Parent collection not found"); + }; + function _visit(path, item, visitor) { + let ctrl = visitor(item, path); + if (typeof ctrl === "symbol") + return ctrl; + for (const field of ["key", "value"]) { + const token = item[field]; + if (token && "items" in token) { + for (let i = 0; i < token.items.length; ++i) { + const ci = _visit(Object.freeze(path.concat([[field, i]])), token.items[i], visitor); + if (typeof ci === "number") + i = ci - 1; + else if (ci === BREAK) + return BREAK; + else if (ci === REMOVE) { + token.items.splice(i, 1); + i -= 1; + } + } + if (typeof ctrl === "function" && field === "key") + ctrl = ctrl(item, path); + } + } + return typeof ctrl === "function" ? ctrl(item, path) : ctrl; + } + exports2.visit = visit; + } +}); + +// ../../node_modules/yaml/dist/parse/cst.js +var require_cst = __commonJS({ + "../../node_modules/yaml/dist/parse/cst.js"(exports2) { + "use strict"; + var cstScalar = require_cst_scalar(); + var cstStringify = require_cst_stringify(); + var cstVisit = require_cst_visit(); + var BOM = "\uFEFF"; + var DOCUMENT = ""; + var FLOW_END = ""; + var SCALAR = ""; + var isCollection = (token) => !!token && "items" in token; + var isScalar = (token) => !!token && (token.type === "scalar" || token.type === "single-quoted-scalar" || token.type === "double-quoted-scalar" || token.type === "block-scalar"); + function prettyToken(token) { + switch (token) { + case BOM: + return ""; + case DOCUMENT: + return ""; + case FLOW_END: + return ""; + case SCALAR: + return ""; + default: + return JSON.stringify(token); + } + } + function tokenType(source) { + switch (source) { + case BOM: + return "byte-order-mark"; + case DOCUMENT: + return "doc-mode"; + case FLOW_END: + return "flow-error-end"; + case SCALAR: + return "scalar"; + case "---": + return "doc-start"; + case "...": + return "doc-end"; + case "": + case "\n": + case "\r\n": + return "newline"; + case "-": + return "seq-item-ind"; + case "?": + return "explicit-key-ind"; + case ":": + return "map-value-ind"; + case "{": + return "flow-map-start"; + case "}": + return "flow-map-end"; + case "[": + return "flow-seq-start"; + case "]": + return "flow-seq-end"; + case ",": + return "comma"; + } + switch (source[0]) { + case " ": + case " ": + return "space"; + case "#": + return "comment"; + case "%": + return "directive-line"; + case "*": + return "alias"; + case "&": + return "anchor"; + case "!": + return "tag"; + case "'": + return "single-quoted-scalar"; + case '"': + return "double-quoted-scalar"; + case "|": + case ">": + return "block-scalar-header"; + } + return null; + } + exports2.createScalarToken = cstScalar.createScalarToken; + exports2.resolveAsScalar = cstScalar.resolveAsScalar; + exports2.setScalarValue = cstScalar.setScalarValue; + exports2.stringify = cstStringify.stringify; + exports2.visit = cstVisit.visit; + exports2.BOM = BOM; + exports2.DOCUMENT = DOCUMENT; + exports2.FLOW_END = FLOW_END; + exports2.SCALAR = SCALAR; + exports2.isCollection = isCollection; + exports2.isScalar = isScalar; + exports2.prettyToken = prettyToken; + exports2.tokenType = tokenType; + } +}); + +// ../../node_modules/yaml/dist/parse/lexer.js +var require_lexer = __commonJS({ + "../../node_modules/yaml/dist/parse/lexer.js"(exports2) { + "use strict"; + var cst = require_cst(); + function isEmpty(ch) { + switch (ch) { + case void 0: + case " ": + case "\n": + case "\r": + case " ": + return true; + default: + return false; + } + } + var hexDigits = new Set("0123456789ABCDEFabcdef"); + var tagChars = new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"); + var flowIndicatorChars = new Set(",[]{}"); + var invalidAnchorChars = new Set(" ,[]{}\n\r "); + var isNotAnchorChar = (ch) => !ch || invalidAnchorChars.has(ch); + var Lexer = class { + constructor() { + this.atEnd = false; + this.blockScalarIndent = -1; + this.blockScalarKeep = false; + this.buffer = ""; + this.flowKey = false; + this.flowLevel = 0; + this.indentNext = 0; + this.indentValue = 0; + this.lineEndPos = null; + this.next = null; + this.pos = 0; + } + /** + * Generate YAML tokens from the `source` string. If `incomplete`, + * a part of the last line may be left as a buffer for the next call. + * + * @returns A generator of lexical tokens + */ + *lex(source, incomplete = false) { + if (source) { + if (typeof source !== "string") + throw TypeError("source is not a string"); + this.buffer = this.buffer ? this.buffer + source : source; + this.lineEndPos = null; + } + this.atEnd = !incomplete; + let next = this.next ?? "stream"; + while (next && (incomplete || this.hasChars(1))) + next = yield* this.parseNext(next); + } + atLineEnd() { + let i = this.pos; + let ch = this.buffer[i]; + while (ch === " " || ch === " ") + ch = this.buffer[++i]; + if (!ch || ch === "#" || ch === "\n") + return true; + if (ch === "\r") + return this.buffer[i + 1] === "\n"; + return false; + } + charAt(n) { + return this.buffer[this.pos + n]; + } + continueScalar(offset) { + let ch = this.buffer[offset]; + if (this.indentNext > 0) { + let indent = 0; + while (ch === " ") + ch = this.buffer[++indent + offset]; + if (ch === "\r") { + const next = this.buffer[indent + offset + 1]; + if (next === "\n" || !next && !this.atEnd) + return offset + indent + 1; + } + return ch === "\n" || indent >= this.indentNext || !ch && !this.atEnd ? offset + indent : -1; + } + if (ch === "-" || ch === ".") { + const dt = this.buffer.substr(offset, 3); + if ((dt === "---" || dt === "...") && isEmpty(this.buffer[offset + 3])) + return -1; + } + return offset; + } + getLine() { + let end = this.lineEndPos; + if (typeof end !== "number" || end !== -1 && end < this.pos) { + end = this.buffer.indexOf("\n", this.pos); + this.lineEndPos = end; + } + if (end === -1) + return this.atEnd ? this.buffer.substring(this.pos) : null; + if (this.buffer[end - 1] === "\r") + end -= 1; + return this.buffer.substring(this.pos, end); + } + hasChars(n) { + return this.pos + n <= this.buffer.length; + } + setNext(state) { + this.buffer = this.buffer.substring(this.pos); + this.pos = 0; + this.lineEndPos = null; + this.next = state; + return null; + } + peek(n) { + return this.buffer.substr(this.pos, n); + } + *parseNext(next) { + switch (next) { + case "stream": + return yield* this.parseStream(); + case "line-start": + return yield* this.parseLineStart(); + case "block-start": + return yield* this.parseBlockStart(); + case "doc": + return yield* this.parseDocument(); + case "flow": + return yield* this.parseFlowCollection(); + case "quoted-scalar": + return yield* this.parseQuotedScalar(); + case "block-scalar": + return yield* this.parseBlockScalar(); + case "plain-scalar": + return yield* this.parsePlainScalar(); + } + } + *parseStream() { + let line = this.getLine(); + if (line === null) + return this.setNext("stream"); + if (line[0] === cst.BOM) { + yield* this.pushCount(1); + line = line.substring(1); + } + if (line[0] === "%") { + let dirEnd = line.length; + let cs = line.indexOf("#"); + while (cs !== -1) { + const ch = line[cs - 1]; + if (ch === " " || ch === " ") { + dirEnd = cs - 1; + break; + } else { + cs = line.indexOf("#", cs + 1); + } + } + while (true) { + const ch = line[dirEnd - 1]; + if (ch === " " || ch === " ") + dirEnd -= 1; + else + break; + } + const n = (yield* this.pushCount(dirEnd)) + (yield* this.pushSpaces(true)); + yield* this.pushCount(line.length - n); + this.pushNewline(); + return "stream"; + } + if (this.atLineEnd()) { + const sp = yield* this.pushSpaces(true); + yield* this.pushCount(line.length - sp); + yield* this.pushNewline(); + return "stream"; + } + yield cst.DOCUMENT; + return yield* this.parseLineStart(); + } + *parseLineStart() { + const ch = this.charAt(0); + if (!ch && !this.atEnd) + return this.setNext("line-start"); + if (ch === "-" || ch === ".") { + if (!this.atEnd && !this.hasChars(4)) + return this.setNext("line-start"); + const s = this.peek(3); + if ((s === "---" || s === "...") && isEmpty(this.charAt(3))) { + yield* this.pushCount(3); + this.indentValue = 0; + this.indentNext = 0; + return s === "---" ? "doc" : "stream"; + } + } + this.indentValue = yield* this.pushSpaces(false); + if (this.indentNext > this.indentValue && !isEmpty(this.charAt(1))) + this.indentNext = this.indentValue; + return yield* this.parseBlockStart(); + } + *parseBlockStart() { + const [ch0, ch1] = this.peek(2); + if (!ch1 && !this.atEnd) + return this.setNext("block-start"); + if ((ch0 === "-" || ch0 === "?" || ch0 === ":") && isEmpty(ch1)) { + const n = (yield* this.pushCount(1)) + (yield* this.pushSpaces(true)); + this.indentNext = this.indentValue + 1; + this.indentValue += n; + return yield* this.parseBlockStart(); + } + return "doc"; + } + *parseDocument() { + yield* this.pushSpaces(true); + const line = this.getLine(); + if (line === null) + return this.setNext("doc"); + let n = yield* this.pushIndicators(); + switch (line[n]) { + case "#": + yield* this.pushCount(line.length - n); + case void 0: + yield* this.pushNewline(); + return yield* this.parseLineStart(); + case "{": + case "[": + yield* this.pushCount(1); + this.flowKey = false; + this.flowLevel = 1; + return "flow"; + case "}": + case "]": + yield* this.pushCount(1); + return "doc"; + case "*": + yield* this.pushUntil(isNotAnchorChar); + return "doc"; + case '"': + case "'": + return yield* this.parseQuotedScalar(); + case "|": + case ">": + n += yield* this.parseBlockScalarHeader(); + n += yield* this.pushSpaces(true); + yield* this.pushCount(line.length - n); + yield* this.pushNewline(); + return yield* this.parseBlockScalar(); + default: + return yield* this.parsePlainScalar(); + } + } + *parseFlowCollection() { + let nl, sp; + let indent = -1; + do { + nl = yield* this.pushNewline(); + if (nl > 0) { + sp = yield* this.pushSpaces(false); + this.indentValue = indent = sp; + } else { + sp = 0; + } + sp += yield* this.pushSpaces(true); + } while (nl + sp > 0); + const line = this.getLine(); + if (line === null) + return this.setNext("flow"); + if (indent !== -1 && indent < this.indentNext && line[0] !== "#" || indent === 0 && (line.startsWith("---") || line.startsWith("...")) && isEmpty(line[3])) { + const atFlowEndMarker = indent === this.indentNext - 1 && this.flowLevel === 1 && (line[0] === "]" || line[0] === "}"); + if (!atFlowEndMarker) { + this.flowLevel = 0; + yield cst.FLOW_END; + return yield* this.parseLineStart(); + } + } + let n = 0; + while (line[n] === ",") { + n += yield* this.pushCount(1); + n += yield* this.pushSpaces(true); + this.flowKey = false; + } + n += yield* this.pushIndicators(); + switch (line[n]) { + case void 0: + return "flow"; + case "#": + yield* this.pushCount(line.length - n); + return "flow"; + case "{": + case "[": + yield* this.pushCount(1); + this.flowKey = false; + this.flowLevel += 1; + return "flow"; + case "}": + case "]": + yield* this.pushCount(1); + this.flowKey = true; + this.flowLevel -= 1; + return this.flowLevel ? "flow" : "doc"; + case "*": + yield* this.pushUntil(isNotAnchorChar); + return "flow"; + case '"': + case "'": + this.flowKey = true; + return yield* this.parseQuotedScalar(); + case ":": { + const next = this.charAt(1); + if (this.flowKey || isEmpty(next) || next === ",") { + this.flowKey = false; + yield* this.pushCount(1); + yield* this.pushSpaces(true); + return "flow"; + } + } + default: + this.flowKey = false; + return yield* this.parsePlainScalar(); + } + } + *parseQuotedScalar() { + const quote = this.charAt(0); + let end = this.buffer.indexOf(quote, this.pos + 1); + if (quote === "'") { + while (end !== -1 && this.buffer[end + 1] === "'") + end = this.buffer.indexOf("'", end + 2); + } else { + while (end !== -1) { + let n = 0; + while (this.buffer[end - 1 - n] === "\\") + n += 1; + if (n % 2 === 0) + break; + end = this.buffer.indexOf('"', end + 1); + } + } + const qb = this.buffer.substring(0, end); + let nl = qb.indexOf("\n", this.pos); + if (nl !== -1) { + while (nl !== -1) { + const cs = this.continueScalar(nl + 1); + if (cs === -1) + break; + nl = qb.indexOf("\n", cs); + } + if (nl !== -1) { + end = nl - (qb[nl - 1] === "\r" ? 2 : 1); + } + } + if (end === -1) { + if (!this.atEnd) + return this.setNext("quoted-scalar"); + end = this.buffer.length; + } + yield* this.pushToIndex(end + 1, false); + return this.flowLevel ? "flow" : "doc"; + } + *parseBlockScalarHeader() { + this.blockScalarIndent = -1; + this.blockScalarKeep = false; + let i = this.pos; + while (true) { + const ch = this.buffer[++i]; + if (ch === "+") + this.blockScalarKeep = true; + else if (ch > "0" && ch <= "9") + this.blockScalarIndent = Number(ch) - 1; + else if (ch !== "-") + break; + } + return yield* this.pushUntil((ch) => isEmpty(ch) || ch === "#"); + } + *parseBlockScalar() { + let nl = this.pos - 1; + let indent = 0; + let ch; + loop: for (let i2 = this.pos; ch = this.buffer[i2]; ++i2) { + switch (ch) { + case " ": + indent += 1; + break; + case "\n": + nl = i2; + indent = 0; + break; + case "\r": { + const next = this.buffer[i2 + 1]; + if (!next && !this.atEnd) + return this.setNext("block-scalar"); + if (next === "\n") + break; + } + default: + break loop; + } + } + if (!ch && !this.atEnd) + return this.setNext("block-scalar"); + if (indent >= this.indentNext) { + if (this.blockScalarIndent === -1) + this.indentNext = indent; + else { + this.indentNext = this.blockScalarIndent + (this.indentNext === 0 ? 1 : this.indentNext); + } + do { + const cs = this.continueScalar(nl + 1); + if (cs === -1) + break; + nl = this.buffer.indexOf("\n", cs); + } while (nl !== -1); + if (nl === -1) { + if (!this.atEnd) + return this.setNext("block-scalar"); + nl = this.buffer.length; + } + } + let i = nl + 1; + ch = this.buffer[i]; + while (ch === " ") + ch = this.buffer[++i]; + if (ch === " ") { + while (ch === " " || ch === " " || ch === "\r" || ch === "\n") + ch = this.buffer[++i]; + nl = i - 1; + } else if (!this.blockScalarKeep) { + do { + let i2 = nl - 1; + let ch2 = this.buffer[i2]; + if (ch2 === "\r") + ch2 = this.buffer[--i2]; + const lastChar = i2; + while (ch2 === " ") + ch2 = this.buffer[--i2]; + if (ch2 === "\n" && i2 >= this.pos && i2 + 1 + indent > lastChar) + nl = i2; + else + break; + } while (true); + } + yield cst.SCALAR; + yield* this.pushToIndex(nl + 1, true); + return yield* this.parseLineStart(); + } + *parsePlainScalar() { + const inFlow = this.flowLevel > 0; + let end = this.pos - 1; + let i = this.pos - 1; + let ch; + while (ch = this.buffer[++i]) { + if (ch === ":") { + const next = this.buffer[i + 1]; + if (isEmpty(next) || inFlow && flowIndicatorChars.has(next)) + break; + end = i; + } else if (isEmpty(ch)) { + let next = this.buffer[i + 1]; + if (ch === "\r") { + if (next === "\n") { + i += 1; + ch = "\n"; + next = this.buffer[i + 1]; + } else + end = i; + } + if (next === "#" || inFlow && flowIndicatorChars.has(next)) + break; + if (ch === "\n") { + const cs = this.continueScalar(i + 1); + if (cs === -1) + break; + i = Math.max(i, cs - 2); + } + } else { + if (inFlow && flowIndicatorChars.has(ch)) + break; + end = i; + } + } + if (!ch && !this.atEnd) + return this.setNext("plain-scalar"); + yield cst.SCALAR; + yield* this.pushToIndex(end + 1, true); + return inFlow ? "flow" : "doc"; + } + *pushCount(n) { + if (n > 0) { + yield this.buffer.substr(this.pos, n); + this.pos += n; + return n; + } + return 0; + } + *pushToIndex(i, allowEmpty) { + const s = this.buffer.slice(this.pos, i); + if (s) { + yield s; + this.pos += s.length; + return s.length; + } else if (allowEmpty) + yield ""; + return 0; + } + *pushIndicators() { + switch (this.charAt(0)) { + case "!": + return (yield* this.pushTag()) + (yield* this.pushSpaces(true)) + (yield* this.pushIndicators()); + case "&": + return (yield* this.pushUntil(isNotAnchorChar)) + (yield* this.pushSpaces(true)) + (yield* this.pushIndicators()); + case "-": + case "?": + case ":": { + const inFlow = this.flowLevel > 0; + const ch1 = this.charAt(1); + if (isEmpty(ch1) || inFlow && flowIndicatorChars.has(ch1)) { + if (!inFlow) + this.indentNext = this.indentValue + 1; + else if (this.flowKey) + this.flowKey = false; + return (yield* this.pushCount(1)) + (yield* this.pushSpaces(true)) + (yield* this.pushIndicators()); + } + } + } + return 0; + } + *pushTag() { + if (this.charAt(1) === "<") { + let i = this.pos + 2; + let ch = this.buffer[i]; + while (!isEmpty(ch) && ch !== ">") + ch = this.buffer[++i]; + return yield* this.pushToIndex(ch === ">" ? i + 1 : i, false); + } else { + let i = this.pos + 1; + let ch = this.buffer[i]; + while (ch) { + if (tagChars.has(ch)) + ch = this.buffer[++i]; + else if (ch === "%" && hexDigits.has(this.buffer[i + 1]) && hexDigits.has(this.buffer[i + 2])) { + ch = this.buffer[i += 3]; + } else + break; + } + return yield* this.pushToIndex(i, false); + } + } + *pushNewline() { + const ch = this.buffer[this.pos]; + if (ch === "\n") + return yield* this.pushCount(1); + else if (ch === "\r" && this.charAt(1) === "\n") + return yield* this.pushCount(2); + else + return 0; + } + *pushSpaces(allowTabs) { + let i = this.pos - 1; + let ch; + do { + ch = this.buffer[++i]; + } while (ch === " " || allowTabs && ch === " "); + const n = i - this.pos; + if (n > 0) { + yield this.buffer.substr(this.pos, n); + this.pos = i; + } + return n; + } + *pushUntil(test) { + let i = this.pos; + let ch = this.buffer[i]; + while (!test(ch)) + ch = this.buffer[++i]; + return yield* this.pushToIndex(i, false); + } + }; + exports2.Lexer = Lexer; + } +}); + +// ../../node_modules/yaml/dist/parse/line-counter.js +var require_line_counter = __commonJS({ + "../../node_modules/yaml/dist/parse/line-counter.js"(exports2) { + "use strict"; + var LineCounter = class { + constructor() { + this.lineStarts = []; + this.addNewLine = (offset) => this.lineStarts.push(offset); + this.linePos = (offset) => { + let low = 0; + let high = this.lineStarts.length; + while (low < high) { + const mid = low + high >> 1; + if (this.lineStarts[mid] < offset) + low = mid + 1; + else + high = mid; + } + if (this.lineStarts[low] === offset) + return { line: low + 1, col: 1 }; + if (low === 0) + return { line: 0, col: offset }; + const start = this.lineStarts[low - 1]; + return { line: low, col: offset - start + 1 }; + }; + } + }; + exports2.LineCounter = LineCounter; + } +}); + +// ../../node_modules/yaml/dist/parse/parser.js +var require_parser = __commonJS({ + "../../node_modules/yaml/dist/parse/parser.js"(exports2) { + "use strict"; + var cst = require_cst(); + var lexer = require_lexer(); + function includesToken(list, type) { + for (let i = 0; i < list.length; ++i) + if (list[i].type === type) + return true; + return false; + } + function findNonEmptyIndex(list) { + for (let i = 0; i < list.length; ++i) { + switch (list[i].type) { + case "space": + case "comment": + case "newline": + break; + default: + return i; + } + } + return -1; + } + function isFlowToken(token) { + switch (token?.type) { + case "alias": + case "scalar": + case "single-quoted-scalar": + case "double-quoted-scalar": + case "flow-collection": + return true; + default: + return false; + } + } + function getPrevProps(parent) { + switch (parent.type) { + case "document": + return parent.start; + case "block-map": { + const it = parent.items[parent.items.length - 1]; + return it.sep ?? it.start; + } + case "block-seq": + return parent.items[parent.items.length - 1].start; + default: + return []; + } + } + function getFirstKeyStartProps(prev) { + if (prev.length === 0) + return []; + let i = prev.length; + loop: while (--i >= 0) { + switch (prev[i].type) { + case "doc-start": + case "explicit-key-ind": + case "map-value-ind": + case "seq-item-ind": + case "newline": + break loop; + } + } + while (prev[++i]?.type === "space") { + } + return prev.splice(i, prev.length); + } + function fixFlowSeqItems(fc) { + if (fc.start.type === "flow-seq-start") { + for (const it of fc.items) { + if (it.sep && !it.value && !includesToken(it.start, "explicit-key-ind") && !includesToken(it.sep, "map-value-ind")) { + if (it.key) + it.value = it.key; + delete it.key; + if (isFlowToken(it.value)) { + if (it.value.end) + Array.prototype.push.apply(it.value.end, it.sep); + else + it.value.end = it.sep; + } else + Array.prototype.push.apply(it.start, it.sep); + delete it.sep; + } + } + } + } + var Parser = class { + /** + * @param onNewLine - If defined, called separately with the start position of + * each new line (in `parse()`, including the start of input). + */ + constructor(onNewLine) { + this.atNewLine = true; + this.atScalar = false; + this.indent = 0; + this.offset = 0; + this.onKeyLine = false; + this.stack = []; + this.source = ""; + this.type = ""; + this.lexer = new lexer.Lexer(); + this.onNewLine = onNewLine; + } + /** + * Parse `source` as a YAML stream. + * If `incomplete`, a part of the last line may be left as a buffer for the next call. + * + * Errors are not thrown, but yielded as `{ type: 'error', message }` tokens. + * + * @returns A generator of tokens representing each directive, document, and other structure. + */ + *parse(source, incomplete = false) { + if (this.onNewLine && this.offset === 0) + this.onNewLine(0); + for (const lexeme of this.lexer.lex(source, incomplete)) + yield* this.next(lexeme); + if (!incomplete) + yield* this.end(); + } + /** + * Advance the parser by the `source` of one lexical token. + */ + *next(source) { + this.source = source; + if (process.env.LOG_TOKENS) + console.log("|", cst.prettyToken(source)); + if (this.atScalar) { + this.atScalar = false; + yield* this.step(); + this.offset += source.length; + return; + } + const type = cst.tokenType(source); + if (!type) { + const message = `Not a YAML token: ${source}`; + yield* this.pop({ type: "error", offset: this.offset, message, source }); + this.offset += source.length; + } else if (type === "scalar") { + this.atNewLine = false; + this.atScalar = true; + this.type = "scalar"; + } else { + this.type = type; + yield* this.step(); + switch (type) { + case "newline": + this.atNewLine = true; + this.indent = 0; + if (this.onNewLine) + this.onNewLine(this.offset + source.length); + break; + case "space": + if (this.atNewLine && source[0] === " ") + this.indent += source.length; + break; + case "explicit-key-ind": + case "map-value-ind": + case "seq-item-ind": + if (this.atNewLine) + this.indent += source.length; + break; + case "doc-mode": + case "flow-error-end": + return; + default: + this.atNewLine = false; + } + this.offset += source.length; + } + } + /** Call at end of input to push out any remaining constructions */ + *end() { + while (this.stack.length > 0) + yield* this.pop(); + } + get sourceToken() { + const st = { + type: this.type, + offset: this.offset, + indent: this.indent, + source: this.source + }; + return st; + } + *step() { + const top = this.peek(1); + if (this.type === "doc-end" && (!top || top.type !== "doc-end")) { + while (this.stack.length > 0) + yield* this.pop(); + this.stack.push({ + type: "doc-end", + offset: this.offset, + source: this.source + }); + return; + } + if (!top) + return yield* this.stream(); + switch (top.type) { + case "document": + return yield* this.document(top); + case "alias": + case "scalar": + case "single-quoted-scalar": + case "double-quoted-scalar": + return yield* this.scalar(top); + case "block-scalar": + return yield* this.blockScalar(top); + case "block-map": + return yield* this.blockMap(top); + case "block-seq": + return yield* this.blockSequence(top); + case "flow-collection": + return yield* this.flowCollection(top); + case "doc-end": + return yield* this.documentEnd(top); + } + yield* this.pop(); + } + peek(n) { + return this.stack[this.stack.length - n]; + } + *pop(error) { + const token = error ?? this.stack.pop(); + if (!token) { + const message = "Tried to pop an empty stack"; + yield { type: "error", offset: this.offset, source: "", message }; + } else if (this.stack.length === 0) { + yield token; + } else { + const top = this.peek(1); + if (token.type === "block-scalar") { + token.indent = "indent" in top ? top.indent : 0; + } else if (token.type === "flow-collection" && top.type === "document") { + token.indent = 0; + } + if (token.type === "flow-collection") + fixFlowSeqItems(token); + switch (top.type) { + case "document": + top.value = token; + break; + case "block-scalar": + top.props.push(token); + break; + case "block-map": { + const it = top.items[top.items.length - 1]; + if (it.value) { + top.items.push({ start: [], key: token, sep: [] }); + this.onKeyLine = true; + return; + } else if (it.sep) { + it.value = token; + } else { + Object.assign(it, { key: token, sep: [] }); + this.onKeyLine = !it.explicitKey; + return; + } + break; + } + case "block-seq": { + const it = top.items[top.items.length - 1]; + if (it.value) + top.items.push({ start: [], value: token }); + else + it.value = token; + break; + } + case "flow-collection": { + const it = top.items[top.items.length - 1]; + if (!it || it.value) + top.items.push({ start: [], key: token, sep: [] }); + else if (it.sep) + it.value = token; + else + Object.assign(it, { key: token, sep: [] }); + return; + } + default: + yield* this.pop(); + yield* this.pop(token); + } + if ((top.type === "document" || top.type === "block-map" || top.type === "block-seq") && (token.type === "block-map" || token.type === "block-seq")) { + const last = token.items[token.items.length - 1]; + if (last && !last.sep && !last.value && last.start.length > 0 && findNonEmptyIndex(last.start) === -1 && (token.indent === 0 || last.start.every((st) => st.type !== "comment" || st.indent < token.indent))) { + if (top.type === "document") + top.end = last.start; + else + top.items.push({ start: last.start }); + token.items.splice(-1, 1); + } + } + } + } + *stream() { + switch (this.type) { + case "directive-line": + yield { type: "directive", offset: this.offset, source: this.source }; + return; + case "byte-order-mark": + case "space": + case "comment": + case "newline": + yield this.sourceToken; + return; + case "doc-mode": + case "doc-start": { + const doc = { + type: "document", + offset: this.offset, + start: [] + }; + if (this.type === "doc-start") + doc.start.push(this.sourceToken); + this.stack.push(doc); + return; + } + } + yield { + type: "error", + offset: this.offset, + message: `Unexpected ${this.type} token in YAML stream`, + source: this.source + }; + } + *document(doc) { + if (doc.value) + return yield* this.lineEnd(doc); + switch (this.type) { + case "doc-start": { + if (findNonEmptyIndex(doc.start) !== -1) { + yield* this.pop(); + yield* this.step(); + } else + doc.start.push(this.sourceToken); + return; + } + case "anchor": + case "tag": + case "space": + case "comment": + case "newline": + doc.start.push(this.sourceToken); + return; + } + const bv = this.startBlockValue(doc); + if (bv) + this.stack.push(bv); + else { + yield { + type: "error", + offset: this.offset, + message: `Unexpected ${this.type} token in YAML document`, + source: this.source + }; + } + } + *scalar(scalar) { + if (this.type === "map-value-ind") { + const prev = getPrevProps(this.peek(2)); + const start = getFirstKeyStartProps(prev); + let sep; + if (scalar.end) { + sep = scalar.end; + sep.push(this.sourceToken); + delete scalar.end; + } else + sep = [this.sourceToken]; + const map = { + type: "block-map", + offset: scalar.offset, + indent: scalar.indent, + items: [{ start, key: scalar, sep }] + }; + this.onKeyLine = true; + this.stack[this.stack.length - 1] = map; + } else + yield* this.lineEnd(scalar); + } + *blockScalar(scalar) { + switch (this.type) { + case "space": + case "comment": + case "newline": + scalar.props.push(this.sourceToken); + return; + case "scalar": + scalar.source = this.source; + this.atNewLine = true; + this.indent = 0; + if (this.onNewLine) { + let nl = this.source.indexOf("\n") + 1; + while (nl !== 0) { + this.onNewLine(this.offset + nl); + nl = this.source.indexOf("\n", nl) + 1; + } + } + yield* this.pop(); + break; + default: + yield* this.pop(); + yield* this.step(); + } + } + *blockMap(map) { + const it = map.items[map.items.length - 1]; + switch (this.type) { + case "newline": + this.onKeyLine = false; + if (it.value) { + const end = "end" in it.value ? it.value.end : void 0; + const last = Array.isArray(end) ? end[end.length - 1] : void 0; + if (last?.type === "comment") + end?.push(this.sourceToken); + else + map.items.push({ start: [this.sourceToken] }); + } else if (it.sep) { + it.sep.push(this.sourceToken); + } else { + it.start.push(this.sourceToken); + } + return; + case "space": + case "comment": + if (it.value) { + map.items.push({ start: [this.sourceToken] }); + } else if (it.sep) { + it.sep.push(this.sourceToken); + } else { + if (this.atIndentedComment(it.start, map.indent)) { + const prev = map.items[map.items.length - 2]; + const end = prev?.value?.end; + if (Array.isArray(end)) { + Array.prototype.push.apply(end, it.start); + end.push(this.sourceToken); + map.items.pop(); + return; + } + } + it.start.push(this.sourceToken); + } + return; + } + if (this.indent >= map.indent) { + const atMapIndent = !this.onKeyLine && this.indent === map.indent; + const atNextItem = atMapIndent && (it.sep || it.explicitKey) && this.type !== "seq-item-ind"; + let start = []; + if (atNextItem && it.sep && !it.value) { + const nl = []; + for (let i = 0; i < it.sep.length; ++i) { + const st = it.sep[i]; + switch (st.type) { + case "newline": + nl.push(i); + break; + case "space": + break; + case "comment": + if (st.indent > map.indent) + nl.length = 0; + break; + default: + nl.length = 0; + } + } + if (nl.length >= 2) + start = it.sep.splice(nl[1]); + } + switch (this.type) { + case "anchor": + case "tag": + if (atNextItem || it.value) { + start.push(this.sourceToken); + map.items.push({ start }); + this.onKeyLine = true; + } else if (it.sep) { + it.sep.push(this.sourceToken); + } else { + it.start.push(this.sourceToken); + } + return; + case "explicit-key-ind": + if (!it.sep && !it.explicitKey) { + it.start.push(this.sourceToken); + it.explicitKey = true; + } else if (atNextItem || it.value) { + start.push(this.sourceToken); + map.items.push({ start, explicitKey: true }); + } else { + this.stack.push({ + type: "block-map", + offset: this.offset, + indent: this.indent, + items: [{ start: [this.sourceToken], explicitKey: true }] + }); + } + this.onKeyLine = true; + return; + case "map-value-ind": + if (it.explicitKey) { + if (!it.sep) { + if (includesToken(it.start, "newline")) { + Object.assign(it, { key: null, sep: [this.sourceToken] }); + } else { + const start2 = getFirstKeyStartProps(it.start); + this.stack.push({ + type: "block-map", + offset: this.offset, + indent: this.indent, + items: [{ start: start2, key: null, sep: [this.sourceToken] }] + }); + } + } else if (it.value) { + map.items.push({ start: [], key: null, sep: [this.sourceToken] }); + } else if (includesToken(it.sep, "map-value-ind")) { + this.stack.push({ + type: "block-map", + offset: this.offset, + indent: this.indent, + items: [{ start, key: null, sep: [this.sourceToken] }] + }); + } else if (isFlowToken(it.key) && !includesToken(it.sep, "newline")) { + const start2 = getFirstKeyStartProps(it.start); + const key = it.key; + const sep = it.sep; + sep.push(this.sourceToken); + delete it.key; + delete it.sep; + this.stack.push({ + type: "block-map", + offset: this.offset, + indent: this.indent, + items: [{ start: start2, key, sep }] + }); + } else if (start.length > 0) { + it.sep = it.sep.concat(start, this.sourceToken); + } else { + it.sep.push(this.sourceToken); + } + } else { + if (!it.sep) { + Object.assign(it, { key: null, sep: [this.sourceToken] }); + } else if (it.value || atNextItem) { + map.items.push({ start, key: null, sep: [this.sourceToken] }); + } else if (includesToken(it.sep, "map-value-ind")) { + this.stack.push({ + type: "block-map", + offset: this.offset, + indent: this.indent, + items: [{ start: [], key: null, sep: [this.sourceToken] }] + }); + } else { + it.sep.push(this.sourceToken); + } + } + this.onKeyLine = true; + return; + case "alias": + case "scalar": + case "single-quoted-scalar": + case "double-quoted-scalar": { + const fs = this.flowScalar(this.type); + if (atNextItem || it.value) { + map.items.push({ start, key: fs, sep: [] }); + this.onKeyLine = true; + } else if (it.sep) { + this.stack.push(fs); + } else { + Object.assign(it, { key: fs, sep: [] }); + this.onKeyLine = true; + } + return; + } + default: { + const bv = this.startBlockValue(map); + if (bv) { + if (atMapIndent && bv.type !== "block-seq") { + map.items.push({ start }); + } + this.stack.push(bv); + return; + } + } + } + } + yield* this.pop(); + yield* this.step(); + } + *blockSequence(seq) { + const it = seq.items[seq.items.length - 1]; + switch (this.type) { + case "newline": + if (it.value) { + const end = "end" in it.value ? it.value.end : void 0; + const last = Array.isArray(end) ? end[end.length - 1] : void 0; + if (last?.type === "comment") + end?.push(this.sourceToken); + else + seq.items.push({ start: [this.sourceToken] }); + } else + it.start.push(this.sourceToken); + return; + case "space": + case "comment": + if (it.value) + seq.items.push({ start: [this.sourceToken] }); + else { + if (this.atIndentedComment(it.start, seq.indent)) { + const prev = seq.items[seq.items.length - 2]; + const end = prev?.value?.end; + if (Array.isArray(end)) { + Array.prototype.push.apply(end, it.start); + end.push(this.sourceToken); + seq.items.pop(); + return; + } + } + it.start.push(this.sourceToken); + } + return; + case "anchor": + case "tag": + if (it.value || this.indent <= seq.indent) + break; + it.start.push(this.sourceToken); + return; + case "seq-item-ind": + if (this.indent !== seq.indent) + break; + if (it.value || includesToken(it.start, "seq-item-ind")) + seq.items.push({ start: [this.sourceToken] }); + else + it.start.push(this.sourceToken); + return; + } + if (this.indent > seq.indent) { + const bv = this.startBlockValue(seq); + if (bv) { + this.stack.push(bv); + return; + } + } + yield* this.pop(); + yield* this.step(); + } + *flowCollection(fc) { + const it = fc.items[fc.items.length - 1]; + if (this.type === "flow-error-end") { + let top; + do { + yield* this.pop(); + top = this.peek(1); + } while (top && top.type === "flow-collection"); + } else if (fc.end.length === 0) { + switch (this.type) { + case "comma": + case "explicit-key-ind": + if (!it || it.sep) + fc.items.push({ start: [this.sourceToken] }); + else + it.start.push(this.sourceToken); + return; + case "map-value-ind": + if (!it || it.value) + fc.items.push({ start: [], key: null, sep: [this.sourceToken] }); + else if (it.sep) + it.sep.push(this.sourceToken); + else + Object.assign(it, { key: null, sep: [this.sourceToken] }); + return; + case "space": + case "comment": + case "newline": + case "anchor": + case "tag": + if (!it || it.value) + fc.items.push({ start: [this.sourceToken] }); + else if (it.sep) + it.sep.push(this.sourceToken); + else + it.start.push(this.sourceToken); + return; + case "alias": + case "scalar": + case "single-quoted-scalar": + case "double-quoted-scalar": { + const fs = this.flowScalar(this.type); + if (!it || it.value) + fc.items.push({ start: [], key: fs, sep: [] }); + else if (it.sep) + this.stack.push(fs); + else + Object.assign(it, { key: fs, sep: [] }); + return; + } + case "flow-map-end": + case "flow-seq-end": + fc.end.push(this.sourceToken); + return; + } + const bv = this.startBlockValue(fc); + if (bv) + this.stack.push(bv); + else { + yield* this.pop(); + yield* this.step(); + } + } else { + const parent = this.peek(2); + if (parent.type === "block-map" && (this.type === "map-value-ind" && parent.indent === fc.indent || this.type === "newline" && !parent.items[parent.items.length - 1].sep)) { + yield* this.pop(); + yield* this.step(); + } else if (this.type === "map-value-ind" && parent.type !== "flow-collection") { + const prev = getPrevProps(parent); + const start = getFirstKeyStartProps(prev); + fixFlowSeqItems(fc); + const sep = fc.end.splice(1, fc.end.length); + sep.push(this.sourceToken); + const map = { + type: "block-map", + offset: fc.offset, + indent: fc.indent, + items: [{ start, key: fc, sep }] + }; + this.onKeyLine = true; + this.stack[this.stack.length - 1] = map; + } else { + yield* this.lineEnd(fc); + } + } + } + flowScalar(type) { + if (this.onNewLine) { + let nl = this.source.indexOf("\n") + 1; + while (nl !== 0) { + this.onNewLine(this.offset + nl); + nl = this.source.indexOf("\n", nl) + 1; + } + } + return { + type, + offset: this.offset, + indent: this.indent, + source: this.source + }; + } + startBlockValue(parent) { + switch (this.type) { + case "alias": + case "scalar": + case "single-quoted-scalar": + case "double-quoted-scalar": + return this.flowScalar(this.type); + case "block-scalar-header": + return { + type: "block-scalar", + offset: this.offset, + indent: this.indent, + props: [this.sourceToken], + source: "" + }; + case "flow-map-start": + case "flow-seq-start": + return { + type: "flow-collection", + offset: this.offset, + indent: this.indent, + start: this.sourceToken, + items: [], + end: [] + }; + case "seq-item-ind": + return { + type: "block-seq", + offset: this.offset, + indent: this.indent, + items: [{ start: [this.sourceToken] }] + }; + case "explicit-key-ind": { + this.onKeyLine = true; + const prev = getPrevProps(parent); + const start = getFirstKeyStartProps(prev); + start.push(this.sourceToken); + return { + type: "block-map", + offset: this.offset, + indent: this.indent, + items: [{ start, explicitKey: true }] + }; + } + case "map-value-ind": { + this.onKeyLine = true; + const prev = getPrevProps(parent); + const start = getFirstKeyStartProps(prev); + return { + type: "block-map", + offset: this.offset, + indent: this.indent, + items: [{ start, key: null, sep: [this.sourceToken] }] + }; + } + } + return null; + } + atIndentedComment(start, indent) { + if (this.type !== "comment") + return false; + if (this.indent <= indent) + return false; + return start.every((st) => st.type === "newline" || st.type === "space"); + } + *documentEnd(docEnd) { + if (this.type !== "doc-mode") { + if (docEnd.end) + docEnd.end.push(this.sourceToken); + else + docEnd.end = [this.sourceToken]; + if (this.type === "newline") + yield* this.pop(); + } + } + *lineEnd(token) { + switch (this.type) { + case "comma": + case "doc-start": + case "doc-end": + case "flow-seq-end": + case "flow-map-end": + case "map-value-ind": + yield* this.pop(); + yield* this.step(); + break; + case "newline": + this.onKeyLine = false; + case "space": + case "comment": + default: + if (token.end) + token.end.push(this.sourceToken); + else + token.end = [this.sourceToken]; + if (this.type === "newline") + yield* this.pop(); + } + } + }; + exports2.Parser = Parser; + } +}); + +// ../../node_modules/yaml/dist/public-api.js +var require_public_api = __commonJS({ + "../../node_modules/yaml/dist/public-api.js"(exports2) { + "use strict"; + var composer = require_composer(); + var Document = require_Document(); + var errors = require_errors(); + var log = require_log(); + var lineCounter = require_line_counter(); + var parser = require_parser(); + function parseOptions(options) { + const prettyErrors = options.prettyErrors !== false; + const lineCounter$1 = options.lineCounter || prettyErrors && new lineCounter.LineCounter() || null; + return { lineCounter: lineCounter$1, prettyErrors }; + } + function parseAllDocuments(source, options = {}) { + const { lineCounter: lineCounter2, prettyErrors } = parseOptions(options); + const parser$1 = new parser.Parser(lineCounter2?.addNewLine); + const composer$1 = new composer.Composer(options); + const docs = Array.from(composer$1.compose(parser$1.parse(source))); + if (prettyErrors && lineCounter2) + for (const doc of docs) { + doc.errors.forEach(errors.prettifyError(source, lineCounter2)); + doc.warnings.forEach(errors.prettifyError(source, lineCounter2)); + } + if (docs.length > 0) + return docs; + return Object.assign([], { empty: true }, composer$1.streamInfo()); + } + function parseDocument(source, options = {}) { + const { lineCounter: lineCounter2, prettyErrors } = parseOptions(options); + const parser$1 = new parser.Parser(lineCounter2?.addNewLine); + const composer$1 = new composer.Composer(options); + let doc = null; + for (const _doc of composer$1.compose(parser$1.parse(source), true, source.length)) { + if (!doc) + doc = _doc; + else if (doc.options.logLevel !== "silent") { + doc.errors.push(new errors.YAMLParseError(_doc.range.slice(0, 2), "MULTIPLE_DOCS", "Source contains multiple documents; please use YAML.parseAllDocuments()")); + break; + } + } + if (prettyErrors && lineCounter2) { + doc.errors.forEach(errors.prettifyError(source, lineCounter2)); + doc.warnings.forEach(errors.prettifyError(source, lineCounter2)); + } + return doc; + } + function parse(src, reviver, options) { + let _reviver = void 0; + if (typeof reviver === "function") { + _reviver = reviver; + } else if (options === void 0 && reviver && typeof reviver === "object") { + options = reviver; + } + const doc = parseDocument(src, options); + if (!doc) + return null; + doc.warnings.forEach((warning) => log.warn(doc.options.logLevel, warning)); + if (doc.errors.length > 0) { + if (doc.options.logLevel !== "silent") + throw doc.errors[0]; + else + doc.errors = []; + } + return doc.toJS(Object.assign({ reviver: _reviver }, options)); + } + function stringify(value, replacer, options) { + let _replacer = null; + if (typeof replacer === "function" || Array.isArray(replacer)) { + _replacer = replacer; + } else if (options === void 0 && replacer) { + options = replacer; + } + if (typeof options === "string") + options = options.length; + if (typeof options === "number") { + const indent = Math.round(options); + options = indent < 1 ? void 0 : indent > 8 ? { indent: 8 } : { indent }; + } + if (value === void 0) { + const { keepUndefined } = options ?? replacer ?? {}; + if (!keepUndefined) + return void 0; + } + return new Document.Document(value, _replacer, options).toString(options); + } + exports2.parse = parse; + exports2.parseAllDocuments = parseAllDocuments; + exports2.parseDocument = parseDocument; + exports2.stringify = stringify; + } +}); + +// ../../node_modules/yaml/dist/index.js +var require_dist = __commonJS({ + "../../node_modules/yaml/dist/index.js"(exports2) { + "use strict"; + var composer = require_composer(); + var Document = require_Document(); + var Schema = require_Schema(); + var errors = require_errors(); + var Alias = require_Alias(); + var identity = require_identity(); + var Pair = require_Pair(); + var Scalar = require_Scalar(); + var YAMLMap = require_YAMLMap(); + var YAMLSeq = require_YAMLSeq(); + var cst = require_cst(); + var lexer = require_lexer(); + var lineCounter = require_line_counter(); + var parser = require_parser(); + var publicApi = require_public_api(); + var visit = require_visit(); + exports2.Composer = composer.Composer; + exports2.Document = Document.Document; + exports2.Schema = Schema.Schema; + exports2.YAMLError = errors.YAMLError; + exports2.YAMLParseError = errors.YAMLParseError; + exports2.YAMLWarning = errors.YAMLWarning; + exports2.Alias = Alias.Alias; + exports2.isAlias = identity.isAlias; + exports2.isCollection = identity.isCollection; + exports2.isDocument = identity.isDocument; + exports2.isMap = identity.isMap; + exports2.isNode = identity.isNode; + exports2.isPair = identity.isPair; + exports2.isScalar = identity.isScalar; + exports2.isSeq = identity.isSeq; + exports2.Pair = Pair.Pair; + exports2.Scalar = Scalar.Scalar; + exports2.YAMLMap = YAMLMap.YAMLMap; + exports2.YAMLSeq = YAMLSeq.YAMLSeq; + exports2.CST = cst; + exports2.Lexer = lexer.Lexer; + exports2.LineCounter = lineCounter.LineCounter; + exports2.Parser = parser.Parser; + exports2.parse = publicApi.parse; + exports2.parseAllDocuments = publicApi.parseAllDocuments; + exports2.parseDocument = publicApi.parseDocument; + exports2.stringify = publicApi.stringify; + exports2.visit = visit.visit; + exports2.visitAsync = visit.visitAsync; + } +}); + +// src/index.ts +var src_exports = {}; +__export(src_exports, { + pluginHookImport: () => pluginHookImport +}); +module.exports = __toCommonJS(src_exports); +var import_yaml = __toESM(require_dist()); +function pluginHookImport(ctx, contents) { + let parsed; + try { + parsed = JSON.parse(contents); + } catch (e) { + } + try { + parsed = parsed ?? import_yaml.default.parse(contents); + } catch (e) { + } + if (!isJSObject(parsed)) return; + if (!Array.isArray(parsed.resources)) return; + const resources = { + workspaces: [], + httpRequests: [], + grpcRequests: [], + environments: [], + folders: [] + }; + const workspacesToImport = parsed.resources.filter(isWorkspace); + for (const workspaceToImport of workspacesToImport) { + const baseEnvironment = parsed.resources.find( + (r) => isEnvironment(r) && r.parentId === workspaceToImport._id + ); + resources.workspaces.push({ + id: convertId(workspaceToImport._id), + createdAt: new Date(workspacesToImport.created ?? Date.now()).toISOString().replace("Z", ""), + updatedAt: new Date(workspacesToImport.updated ?? Date.now()).toISOString().replace("Z", ""), + model: "workspace", + name: workspaceToImport.name, + variables: baseEnvironment ? parseVariables(baseEnvironment.data) : [] + }); + const environmentsToImport = parsed.resources.filter( + (r) => isEnvironment(r) && r.parentId === baseEnvironment?._id + ); + resources.environments.push( + ...environmentsToImport.map((r) => importEnvironment(r, workspaceToImport._id)) + ); + const nextFolder = (parentId) => { + const children = parsed.resources.filter((r) => r.parentId === parentId); + let sortPriority = 0; + for (const child of children) { + if (isRequestGroup(child)) { + resources.folders.push(importFolder(child, workspaceToImport._id)); + nextFolder(child._id); + } else if (isHttpRequest(child)) { + resources.httpRequests.push( + importHttpRequest(child, workspaceToImport._id, sortPriority++) + ); + } else if (isGrpcRequest(child)) { + resources.grpcRequests.push( + importGrpcRequest(child, workspaceToImport._id, sortPriority++) + ); + } + } + }; + nextFolder(workspaceToImport._id); + } + resources.httpRequests = resources.httpRequests.filter(Boolean); + resources.grpcRequests = resources.grpcRequests.filter(Boolean); + resources.environments = resources.environments.filter(Boolean); + resources.workspaces = resources.workspaces.filter(Boolean); + return { resources }; +} +function importEnvironment(e, workspaceId) { + return { + id: convertId(e._id), + createdAt: new Date(e.created ?? Date.now()).toISOString().replace("Z", ""), + updatedAt: new Date(e.updated ?? Date.now()).toISOString().replace("Z", ""), + workspaceId: convertId(workspaceId), + model: "environment", + name: e.name, + variables: Object.entries(e.data).map(([name, value]) => ({ + enabled: true, + name, + value: `${value}` + })) + }; +} +function importFolder(f, workspaceId) { + return { + id: convertId(f._id), + createdAt: new Date(f.created ?? Date.now()).toISOString().replace("Z", ""), + updatedAt: new Date(f.updated ?? Date.now()).toISOString().replace("Z", ""), + folderId: f.parentId === workspaceId ? null : convertId(f.parentId), + workspaceId: convertId(workspaceId), + model: "folder", + name: f.name + }; +} +function importGrpcRequest(r, workspaceId, sortPriority = 0) { + const parts = r.protoMethodName.split("/").filter((p) => p !== ""); + const service = parts[0] ?? null; + const method = parts[1] ?? null; + return { + id: convertId(r._id), + createdAt: new Date(r.created ?? Date.now()).toISOString().replace("Z", ""), + updatedAt: new Date(r.updated ?? Date.now()).toISOString().replace("Z", ""), + workspaceId: convertId(workspaceId), + folderId: r.parentId === workspaceId ? null : convertId(r.parentId), + model: "grpc_request", + sortPriority, + name: r.name, + url: convertSyntax(r.url), + service, + method, + message: r.body?.text ?? "", + metadata: (r.metadata ?? []).map((h) => ({ + enabled: !h.disabled, + name: h.name ?? "", + value: h.value ?? "" + })).filter(({ name, value }) => name !== "" || value !== "") + }; +} +function importHttpRequest(r, workspaceId, sortPriority = 0) { + let bodyType = null; + let body = {}; + if (r.body.mimeType === "application/octet-stream") { + bodyType = "binary"; + body = { filePath: r.body.fileName ?? "" }; + } else if (r.body?.mimeType === "application/x-www-form-urlencoded") { + bodyType = "application/x-www-form-urlencoded"; + body = { + form: (r.body.params ?? []).map((p) => ({ + enabled: !p.disabled, + name: p.name ?? "", + value: p.value ?? "" + })) + }; + } else if (r.body?.mimeType === "multipart/form-data") { + bodyType = "multipart/form-data"; + body = { + form: (r.body.params ?? []).map((p) => ({ + enabled: !p.disabled, + name: p.name ?? "", + value: p.value ?? "", + file: p.fileName ?? null + })) + }; + } else if (r.body?.mimeType === "application/graphql") { + bodyType = "graphql"; + body = { text: convertSyntax(r.body.text ?? "") }; + } else if (r.body?.mimeType === "application/json") { + bodyType = "application/json"; + body = { text: convertSyntax(r.body.text ?? "") }; + } + let authenticationType = null; + let authentication = {}; + if (r.authentication.type === "bearer") { + authenticationType = "bearer"; + authentication = { + token: convertSyntax(r.authentication.token) + }; + } else if (r.authentication.type === "basic") { + authenticationType = "basic"; + authentication = { + username: convertSyntax(r.authentication.username), + password: convertSyntax(r.authentication.password) + }; + } + return { + id: convertId(r._id), + createdAt: new Date(r.created ?? Date.now()).toISOString().replace("Z", ""), + updatedAt: new Date(r.updated ?? Date.now()).toISOString().replace("Z", ""), + workspaceId: convertId(workspaceId), + folderId: r.parentId === workspaceId ? null : convertId(r.parentId), + model: "http_request", + sortPriority, + name: r.name, + url: convertSyntax(r.url), + body, + bodyType, + authentication, + authenticationType, + method: r.method, + headers: (r.headers ?? []).map((h) => ({ + enabled: !h.disabled, + name: h.name ?? "", + value: h.value ?? "" + })).filter(({ name, value }) => name !== "" || value !== "") + }; +} +function parseVariables(data) { + return Object.entries(data).map(([name, value]) => ({ + enabled: true, + name, + value: `${value}` + })); +} +function convertSyntax(variable) { + if (!isJSString(variable)) return variable; + return variable.replaceAll(/{{\s*(_\.)?([^}]+)\s*}}/g, "${[$2]}"); +} +function isWorkspace(obj) { + return isJSObject(obj) && obj._type === "workspace"; +} +function isRequestGroup(obj) { + return isJSObject(obj) && obj._type === "request_group"; +} +function isHttpRequest(obj) { + return isJSObject(obj) && obj._type === "request"; +} +function isGrpcRequest(obj) { + return isJSObject(obj) && obj._type === "grpc_request"; +} +function isEnvironment(obj) { + return isJSObject(obj) && obj._type === "environment"; +} +function isJSObject(obj) { + return Object.prototype.toString.call(obj) === "[object Object]"; +} +function isJSString(obj) { + return Object.prototype.toString.call(obj) === "[object String]"; +} +function convertId(id) { + if (id.startsWith("GENERATE_ID::")) { + return id; + } + return `GENERATE_ID::${id}`; +} +// Annotate the CommonJS export names for ESM import in node: +0 && (module.exports = { + pluginHookImport +}); diff --git a/src-tauri/vendored/plugins/importer-insomnia/package.json b/src-tauri/vendored/plugins/importer-insomnia/package.json new file mode 100644 index 00000000..44e8317e --- /dev/null +++ b/src-tauri/vendored/plugins/importer-insomnia/package.json @@ -0,0 +1,17 @@ +{ + "name": "importer-insomnia", + "private": true, + "version": "0.0.1", + "scripts": { + "build": "yaakcli build ./src/index.js" + }, + "dependencies": { + "@yaakapp/api": "^0.2.9", + "yaml": "^2.4.2" + }, + "devDependencies": { + "@yaakapp/cli": "^0.0.42", + "@types/node": "^20.14.9", + "typescript": "^5.5.2" + } +} diff --git a/src-tauri/vendored/plugins/importer-openapi/build/index.js b/src-tauri/vendored/plugins/importer-openapi/build/index.js new file mode 100644 index 00000000..bad1a7db --- /dev/null +++ b/src-tauri/vendored/plugins/importer-openapi/build/index.js @@ -0,0 +1,146233 @@ +"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 __esm = (fn, res) => function __init() { + return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res; +}; +var __commonJS = (cb, mod) => function __require() { + return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; +}; +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); + +// ../../node_modules/lodash/lodash.js +var require_lodash = __commonJS({ + "../../node_modules/lodash/lodash.js"(exports2, module2) { + (function() { + var undefined2; + var VERSION = "4.17.21"; + var LARGE_ARRAY_SIZE = 200; + var CORE_ERROR_TEXT = "Unsupported core-js use. Try https://npms.io/search?q=ponyfill.", FUNC_ERROR_TEXT = "Expected a function", INVALID_TEMPL_VAR_ERROR_TEXT = "Invalid `variable` option passed into `_.template`"; + var HASH_UNDEFINED = "__lodash_hash_undefined__"; + var MAX_MEMOIZE_SIZE = 500; + var PLACEHOLDER = "__lodash_placeholder__"; + var CLONE_DEEP_FLAG = 1, CLONE_FLAT_FLAG = 2, CLONE_SYMBOLS_FLAG = 4; + var COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2; + var WRAP_BIND_FLAG = 1, WRAP_BIND_KEY_FLAG = 2, WRAP_CURRY_BOUND_FLAG = 4, WRAP_CURRY_FLAG = 8, WRAP_CURRY_RIGHT_FLAG = 16, WRAP_PARTIAL_FLAG = 32, WRAP_PARTIAL_RIGHT_FLAG = 64, WRAP_ARY_FLAG = 128, WRAP_REARG_FLAG = 256, WRAP_FLIP_FLAG = 512; + var DEFAULT_TRUNC_LENGTH = 30, DEFAULT_TRUNC_OMISSION = "..."; + var HOT_COUNT = 800, HOT_SPAN = 16; + var LAZY_FILTER_FLAG = 1, LAZY_MAP_FLAG = 2, LAZY_WHILE_FLAG = 3; + var INFINITY = 1 / 0, MAX_SAFE_INTEGER = 9007199254740991, MAX_INTEGER = 17976931348623157e292, NAN = 0 / 0; + var MAX_ARRAY_LENGTH = 4294967295, MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1, HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1; + var wrapFlags = [ + ["ary", WRAP_ARY_FLAG], + ["bind", WRAP_BIND_FLAG], + ["bindKey", WRAP_BIND_KEY_FLAG], + ["curry", WRAP_CURRY_FLAG], + ["curryRight", WRAP_CURRY_RIGHT_FLAG], + ["flip", WRAP_FLIP_FLAG], + ["partial", WRAP_PARTIAL_FLAG], + ["partialRight", WRAP_PARTIAL_RIGHT_FLAG], + ["rearg", WRAP_REARG_FLAG] + ]; + var argsTag = "[object Arguments]", arrayTag = "[object Array]", asyncTag = "[object AsyncFunction]", boolTag = "[object Boolean]", dateTag = "[object Date]", domExcTag = "[object DOMException]", errorTag = "[object Error]", funcTag = "[object Function]", genTag = "[object GeneratorFunction]", mapTag = "[object Map]", numberTag = "[object Number]", nullTag = "[object Null]", objectTag = "[object Object]", promiseTag = "[object Promise]", proxyTag = "[object Proxy]", regexpTag = "[object RegExp]", setTag = "[object Set]", stringTag = "[object String]", symbolTag = "[object Symbol]", undefinedTag = "[object Undefined]", weakMapTag = "[object WeakMap]", weakSetTag = "[object WeakSet]"; + var arrayBufferTag = "[object ArrayBuffer]", dataViewTag = "[object DataView]", float32Tag = "[object Float32Array]", float64Tag = "[object Float64Array]", int8Tag = "[object Int8Array]", int16Tag = "[object Int16Array]", int32Tag = "[object Int32Array]", uint8Tag = "[object Uint8Array]", uint8ClampedTag = "[object Uint8ClampedArray]", uint16Tag = "[object Uint16Array]", uint32Tag = "[object Uint32Array]"; + var reEmptyStringLeading = /\b__p \+= '';/g, reEmptyStringMiddle = /\b(__p \+=) '' \+/g, reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g; + var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g, reUnescapedHtml = /[&<>"']/g, reHasEscapedHtml = RegExp(reEscapedHtml.source), reHasUnescapedHtml = RegExp(reUnescapedHtml.source); + var reEscape = /<%-([\s\S]+?)%>/g, reEvaluate = /<%([\s\S]+?)%>/g, reInterpolate = /<%=([\s\S]+?)%>/g; + var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, reIsPlainProp = /^\w*$/, rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; + var reRegExpChar = /[\\^$.*+?()[\]{}|]/g, reHasRegExpChar = RegExp(reRegExpChar.source); + var reTrimStart = /^\s+/; + var reWhitespace = /\s/; + var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/, reSplitDetails = /,? & /; + var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g; + var reForbiddenIdentifierChars = /[()=,{}\[\]\/\s]/; + var reEscapeChar = /\\(\\)?/g; + var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g; + var reFlags = /\w*$/; + var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; + var reIsBinary = /^0b[01]+$/i; + var reIsHostCtor = /^\[object .+?Constructor\]$/; + var reIsOctal = /^0o[0-7]+$/i; + var reIsUint = /^(?:0|[1-9]\d*)$/; + var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g; + var reNoMatch = /($^)/; + var reUnescapedString = /['\n\r\u2028\u2029\\]/g; + var rsAstralRange = "\\ud800-\\udfff", rsComboMarksRange = "\\u0300-\\u036f", reComboHalfMarksRange = "\\ufe20-\\ufe2f", rsComboSymbolsRange = "\\u20d0-\\u20ff", rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, rsDingbatRange = "\\u2700-\\u27bf", rsLowerRange = "a-z\\xdf-\\xf6\\xf8-\\xff", rsMathOpRange = "\\xac\\xb1\\xd7\\xf7", rsNonCharRange = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf", rsPunctuationRange = "\\u2000-\\u206f", rsSpaceRange = " \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000", rsUpperRange = "A-Z\\xc0-\\xd6\\xd8-\\xde", rsVarRange = "\\ufe0e\\ufe0f", rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange; + var rsApos = "['\u2019]", rsAstral = "[" + rsAstralRange + "]", rsBreak = "[" + rsBreakRange + "]", rsCombo = "[" + rsComboRange + "]", rsDigits = "\\d+", rsDingbat = "[" + rsDingbatRange + "]", rsLower = "[" + rsLowerRange + "]", rsMisc = "[^" + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + "]", rsFitz = "\\ud83c[\\udffb-\\udfff]", rsModifier = "(?:" + rsCombo + "|" + rsFitz + ")", rsNonAstral = "[^" + rsAstralRange + "]", rsRegional = "(?:\\ud83c[\\udde6-\\uddff]){2}", rsSurrPair = "[\\ud800-\\udbff][\\udc00-\\udfff]", rsUpper = "[" + rsUpperRange + "]", rsZWJ = "\\u200d"; + var rsMiscLower = "(?:" + rsLower + "|" + rsMisc + ")", rsMiscUpper = "(?:" + rsUpper + "|" + rsMisc + ")", rsOptContrLower = "(?:" + rsApos + "(?:d|ll|m|re|s|t|ve))?", rsOptContrUpper = "(?:" + rsApos + "(?:D|LL|M|RE|S|T|VE))?", reOptMod = rsModifier + "?", rsOptVar = "[" + rsVarRange + "]?", rsOptJoin = "(?:" + rsZWJ + "(?:" + [rsNonAstral, rsRegional, rsSurrPair].join("|") + ")" + rsOptVar + reOptMod + ")*", rsOrdLower = "\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])", rsOrdUpper = "\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])", rsSeq = rsOptVar + reOptMod + rsOptJoin, rsEmoji = "(?:" + [rsDingbat, rsRegional, rsSurrPair].join("|") + ")" + rsSeq, rsSymbol = "(?:" + [rsNonAstral + rsCombo + "?", rsCombo, rsRegional, rsSurrPair, rsAstral].join("|") + ")"; + var reApos = RegExp(rsApos, "g"); + var reComboMark = RegExp(rsCombo, "g"); + var reUnicode = RegExp(rsFitz + "(?=" + rsFitz + ")|" + rsSymbol + rsSeq, "g"); + var reUnicodeWord = RegExp([ + rsUpper + "?" + rsLower + "+" + rsOptContrLower + "(?=" + [rsBreak, rsUpper, "$"].join("|") + ")", + rsMiscUpper + "+" + rsOptContrUpper + "(?=" + [rsBreak, rsUpper + rsMiscLower, "$"].join("|") + ")", + rsUpper + "?" + rsMiscLower + "+" + rsOptContrLower, + rsUpper + "+" + rsOptContrUpper, + rsOrdUpper, + rsOrdLower, + rsDigits, + rsEmoji + ].join("|"), "g"); + var reHasUnicode = RegExp("[" + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + "]"); + var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/; + var contextProps = [ + "Array", + "Buffer", + "DataView", + "Date", + "Error", + "Float32Array", + "Float64Array", + "Function", + "Int8Array", + "Int16Array", + "Int32Array", + "Map", + "Math", + "Object", + "Promise", + "RegExp", + "Set", + "String", + "Symbol", + "TypeError", + "Uint8Array", + "Uint8ClampedArray", + "Uint16Array", + "Uint32Array", + "WeakMap", + "_", + "clearTimeout", + "isFinite", + "parseInt", + "setTimeout" + ]; + var templateCounter = -1; + var typedArrayTags = {}; + typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true; + typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false; + var cloneableTags = {}; + cloneableTags[argsTag] = cloneableTags[arrayTag] = cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = cloneableTags[boolTag] = cloneableTags[dateTag] = cloneableTags[float32Tag] = cloneableTags[float64Tag] = cloneableTags[int8Tag] = cloneableTags[int16Tag] = cloneableTags[int32Tag] = cloneableTags[mapTag] = cloneableTags[numberTag] = cloneableTags[objectTag] = cloneableTags[regexpTag] = cloneableTags[setTag] = cloneableTags[stringTag] = cloneableTags[symbolTag] = cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true; + cloneableTags[errorTag] = cloneableTags[funcTag] = cloneableTags[weakMapTag] = false; + var deburredLetters = { + // Latin-1 Supplement block. + "\xC0": "A", + "\xC1": "A", + "\xC2": "A", + "\xC3": "A", + "\xC4": "A", + "\xC5": "A", + "\xE0": "a", + "\xE1": "a", + "\xE2": "a", + "\xE3": "a", + "\xE4": "a", + "\xE5": "a", + "\xC7": "C", + "\xE7": "c", + "\xD0": "D", + "\xF0": "d", + "\xC8": "E", + "\xC9": "E", + "\xCA": "E", + "\xCB": "E", + "\xE8": "e", + "\xE9": "e", + "\xEA": "e", + "\xEB": "e", + "\xCC": "I", + "\xCD": "I", + "\xCE": "I", + "\xCF": "I", + "\xEC": "i", + "\xED": "i", + "\xEE": "i", + "\xEF": "i", + "\xD1": "N", + "\xF1": "n", + "\xD2": "O", + "\xD3": "O", + "\xD4": "O", + "\xD5": "O", + "\xD6": "O", + "\xD8": "O", + "\xF2": "o", + "\xF3": "o", + "\xF4": "o", + "\xF5": "o", + "\xF6": "o", + "\xF8": "o", + "\xD9": "U", + "\xDA": "U", + "\xDB": "U", + "\xDC": "U", + "\xF9": "u", + "\xFA": "u", + "\xFB": "u", + "\xFC": "u", + "\xDD": "Y", + "\xFD": "y", + "\xFF": "y", + "\xC6": "Ae", + "\xE6": "ae", + "\xDE": "Th", + "\xFE": "th", + "\xDF": "ss", + // Latin Extended-A block. + "\u0100": "A", + "\u0102": "A", + "\u0104": "A", + "\u0101": "a", + "\u0103": "a", + "\u0105": "a", + "\u0106": "C", + "\u0108": "C", + "\u010A": "C", + "\u010C": "C", + "\u0107": "c", + "\u0109": "c", + "\u010B": "c", + "\u010D": "c", + "\u010E": "D", + "\u0110": "D", + "\u010F": "d", + "\u0111": "d", + "\u0112": "E", + "\u0114": "E", + "\u0116": "E", + "\u0118": "E", + "\u011A": "E", + "\u0113": "e", + "\u0115": "e", + "\u0117": "e", + "\u0119": "e", + "\u011B": "e", + "\u011C": "G", + "\u011E": "G", + "\u0120": "G", + "\u0122": "G", + "\u011D": "g", + "\u011F": "g", + "\u0121": "g", + "\u0123": "g", + "\u0124": "H", + "\u0126": "H", + "\u0125": "h", + "\u0127": "h", + "\u0128": "I", + "\u012A": "I", + "\u012C": "I", + "\u012E": "I", + "\u0130": "I", + "\u0129": "i", + "\u012B": "i", + "\u012D": "i", + "\u012F": "i", + "\u0131": "i", + "\u0134": "J", + "\u0135": "j", + "\u0136": "K", + "\u0137": "k", + "\u0138": "k", + "\u0139": "L", + "\u013B": "L", + "\u013D": "L", + "\u013F": "L", + "\u0141": "L", + "\u013A": "l", + "\u013C": "l", + "\u013E": "l", + "\u0140": "l", + "\u0142": "l", + "\u0143": "N", + "\u0145": "N", + "\u0147": "N", + "\u014A": "N", + "\u0144": "n", + "\u0146": "n", + "\u0148": "n", + "\u014B": "n", + "\u014C": "O", + "\u014E": "O", + "\u0150": "O", + "\u014D": "o", + "\u014F": "o", + "\u0151": "o", + "\u0154": "R", + "\u0156": "R", + "\u0158": "R", + "\u0155": "r", + "\u0157": "r", + "\u0159": "r", + "\u015A": "S", + "\u015C": "S", + "\u015E": "S", + "\u0160": "S", + "\u015B": "s", + "\u015D": "s", + "\u015F": "s", + "\u0161": "s", + "\u0162": "T", + "\u0164": "T", + "\u0166": "T", + "\u0163": "t", + "\u0165": "t", + "\u0167": "t", + "\u0168": "U", + "\u016A": "U", + "\u016C": "U", + "\u016E": "U", + "\u0170": "U", + "\u0172": "U", + "\u0169": "u", + "\u016B": "u", + "\u016D": "u", + "\u016F": "u", + "\u0171": "u", + "\u0173": "u", + "\u0174": "W", + "\u0175": "w", + "\u0176": "Y", + "\u0177": "y", + "\u0178": "Y", + "\u0179": "Z", + "\u017B": "Z", + "\u017D": "Z", + "\u017A": "z", + "\u017C": "z", + "\u017E": "z", + "\u0132": "IJ", + "\u0133": "ij", + "\u0152": "Oe", + "\u0153": "oe", + "\u0149": "'n", + "\u017F": "s" + }; + var htmlEscapes = { + "&": "&", + "<": "<", + ">": ">", + '"': """, + "'": "'" + }; + var htmlUnescapes = { + "&": "&", + "<": "<", + ">": ">", + """: '"', + "'": "'" + }; + var stringEscapes = { + "\\": "\\", + "'": "'", + "\n": "n", + "\r": "r", + "\u2028": "u2028", + "\u2029": "u2029" + }; + var freeParseFloat = parseFloat, freeParseInt = parseInt; + var freeGlobal = typeof global == "object" && global && global.Object === Object && global; + var freeSelf = typeof self == "object" && self && self.Object === Object && self; + var root = freeGlobal || freeSelf || Function("return this")(); + var freeExports = typeof exports2 == "object" && exports2 && !exports2.nodeType && exports2; + var freeModule = freeExports && typeof module2 == "object" && module2 && !module2.nodeType && module2; + var moduleExports = freeModule && freeModule.exports === freeExports; + var freeProcess = moduleExports && freeGlobal.process; + var nodeUtil = function() { + try { + var types = freeModule && freeModule.require && freeModule.require("util").types; + if (types) { + return types; + } + return freeProcess && freeProcess.binding && freeProcess.binding("util"); + } catch (e) { + } + }(); + var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer, nodeIsDate = nodeUtil && nodeUtil.isDate, nodeIsMap = nodeUtil && nodeUtil.isMap, nodeIsRegExp = nodeUtil && nodeUtil.isRegExp, nodeIsSet = nodeUtil && nodeUtil.isSet, nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; + function apply(func, thisArg, args) { + switch (args.length) { + case 0: + return func.call(thisArg); + case 1: + return func.call(thisArg, args[0]); + case 2: + return func.call(thisArg, args[0], args[1]); + case 3: + return func.call(thisArg, args[0], args[1], args[2]); + } + return func.apply(thisArg, args); + } + function arrayAggregator(array, setter, iteratee, accumulator) { + var index = -1, length = array == null ? 0 : array.length; + while (++index < length) { + var value = array[index]; + setter(accumulator, value, iteratee(value), array); + } + return accumulator; + } + function arrayEach(array, iteratee) { + var index = -1, length = array == null ? 0 : array.length; + while (++index < length) { + if (iteratee(array[index], index, array) === false) { + break; + } + } + return array; + } + function arrayEachRight(array, iteratee) { + var length = array == null ? 0 : array.length; + while (length--) { + if (iteratee(array[length], length, array) === false) { + break; + } + } + return array; + } + function arrayEvery(array, predicate) { + var index = -1, length = array == null ? 0 : array.length; + while (++index < length) { + if (!predicate(array[index], index, array)) { + return false; + } + } + return true; + } + function arrayFilter(array, predicate) { + var index = -1, length = array == null ? 0 : array.length, resIndex = 0, result = []; + while (++index < length) { + var value = array[index]; + if (predicate(value, index, array)) { + result[resIndex++] = value; + } + } + return result; + } + function arrayIncludes(array, value) { + var length = array == null ? 0 : array.length; + return !!length && baseIndexOf(array, value, 0) > -1; + } + function arrayIncludesWith(array, value, comparator) { + var index = -1, length = array == null ? 0 : array.length; + while (++index < length) { + if (comparator(value, array[index])) { + return true; + } + } + return false; + } + function arrayMap(array, iteratee) { + var index = -1, length = array == null ? 0 : array.length, result = Array(length); + while (++index < length) { + result[index] = iteratee(array[index], index, array); + } + return result; + } + function arrayPush(array, values) { + var index = -1, length = values.length, offset = array.length; + while (++index < length) { + array[offset + index] = values[index]; + } + return array; + } + function arrayReduce(array, iteratee, accumulator, initAccum) { + var index = -1, length = array == null ? 0 : array.length; + if (initAccum && length) { + accumulator = array[++index]; + } + while (++index < length) { + accumulator = iteratee(accumulator, array[index], index, array); + } + return accumulator; + } + function arrayReduceRight(array, iteratee, accumulator, initAccum) { + var length = array == null ? 0 : array.length; + if (initAccum && length) { + accumulator = array[--length]; + } + while (length--) { + accumulator = iteratee(accumulator, array[length], length, array); + } + return accumulator; + } + function arraySome(array, predicate) { + var index = -1, length = array == null ? 0 : array.length; + while (++index < length) { + if (predicate(array[index], index, array)) { + return true; + } + } + return false; + } + var asciiSize = baseProperty("length"); + function asciiToArray(string) { + return string.split(""); + } + function asciiWords(string) { + return string.match(reAsciiWord) || []; + } + function baseFindKey(collection, predicate, eachFunc) { + var result; + eachFunc(collection, function(value, key, collection2) { + if (predicate(value, key, collection2)) { + result = key; + return false; + } + }); + return result; + } + function baseFindIndex(array, predicate, fromIndex, fromRight) { + var length = array.length, index = fromIndex + (fromRight ? 1 : -1); + while (fromRight ? index-- : ++index < length) { + if (predicate(array[index], index, array)) { + return index; + } + } + return -1; + } + function baseIndexOf(array, value, fromIndex) { + return value === value ? strictIndexOf(array, value, fromIndex) : baseFindIndex(array, baseIsNaN, fromIndex); + } + function baseIndexOfWith(array, value, fromIndex, comparator) { + var index = fromIndex - 1, length = array.length; + while (++index < length) { + if (comparator(array[index], value)) { + return index; + } + } + return -1; + } + function baseIsNaN(value) { + return value !== value; + } + function baseMean(array, iteratee) { + var length = array == null ? 0 : array.length; + return length ? baseSum(array, iteratee) / length : NAN; + } + function baseProperty(key) { + return function(object) { + return object == null ? undefined2 : object[key]; + }; + } + function basePropertyOf(object) { + return function(key) { + return object == null ? undefined2 : object[key]; + }; + } + function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) { + eachFunc(collection, function(value, index, collection2) { + accumulator = initAccum ? (initAccum = false, value) : iteratee(accumulator, value, index, collection2); + }); + return accumulator; + } + function baseSortBy(array, comparer) { + var length = array.length; + array.sort(comparer); + while (length--) { + array[length] = array[length].value; + } + return array; + } + function baseSum(array, iteratee) { + var result, index = -1, length = array.length; + while (++index < length) { + var current = iteratee(array[index]); + if (current !== undefined2) { + result = result === undefined2 ? current : result + current; + } + } + return result; + } + function baseTimes(n, iteratee) { + var index = -1, result = Array(n); + while (++index < n) { + result[index] = iteratee(index); + } + return result; + } + function baseToPairs(object, props) { + return arrayMap(props, function(key) { + return [key, object[key]]; + }); + } + function baseTrim(string) { + return string ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, "") : string; + } + function baseUnary(func) { + return function(value) { + return func(value); + }; + } + function baseValues(object, props) { + return arrayMap(props, function(key) { + return object[key]; + }); + } + function cacheHas(cache, key) { + return cache.has(key); + } + function charsStartIndex(strSymbols, chrSymbols) { + var index = -1, length = strSymbols.length; + while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) { + } + return index; + } + function charsEndIndex(strSymbols, chrSymbols) { + var index = strSymbols.length; + while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) { + } + return index; + } + function countHolders(array, placeholder) { + var length = array.length, result = 0; + while (length--) { + if (array[length] === placeholder) { + ++result; + } + } + return result; + } + var deburrLetter = basePropertyOf(deburredLetters); + var escapeHtmlChar = basePropertyOf(htmlEscapes); + function escapeStringChar(chr) { + return "\\" + stringEscapes[chr]; + } + function getValue(object, key) { + return object == null ? undefined2 : object[key]; + } + function hasUnicode(string) { + return reHasUnicode.test(string); + } + function hasUnicodeWord(string) { + return reHasUnicodeWord.test(string); + } + function iteratorToArray(iterator) { + var data, result = []; + while (!(data = iterator.next()).done) { + result.push(data.value); + } + return result; + } + function mapToArray(map) { + var index = -1, result = Array(map.size); + map.forEach(function(value, key) { + result[++index] = [key, value]; + }); + return result; + } + function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; + } + function replaceHolders(array, placeholder) { + var index = -1, length = array.length, resIndex = 0, result = []; + while (++index < length) { + var value = array[index]; + if (value === placeholder || value === PLACEHOLDER) { + array[index] = PLACEHOLDER; + result[resIndex++] = index; + } + } + return result; + } + function setToArray(set) { + var index = -1, result = Array(set.size); + set.forEach(function(value) { + result[++index] = value; + }); + return result; + } + function setToPairs(set) { + var index = -1, result = Array(set.size); + set.forEach(function(value) { + result[++index] = [value, value]; + }); + return result; + } + function strictIndexOf(array, value, fromIndex) { + var index = fromIndex - 1, length = array.length; + while (++index < length) { + if (array[index] === value) { + return index; + } + } + return -1; + } + function strictLastIndexOf(array, value, fromIndex) { + var index = fromIndex + 1; + while (index--) { + if (array[index] === value) { + return index; + } + } + return index; + } + function stringSize(string) { + return hasUnicode(string) ? unicodeSize(string) : asciiSize(string); + } + function stringToArray(string) { + return hasUnicode(string) ? unicodeToArray(string) : asciiToArray(string); + } + function trimmedEndIndex(string) { + var index = string.length; + while (index-- && reWhitespace.test(string.charAt(index))) { + } + return index; + } + var unescapeHtmlChar = basePropertyOf(htmlUnescapes); + function unicodeSize(string) { + var result = reUnicode.lastIndex = 0; + while (reUnicode.test(string)) { + ++result; + } + return result; + } + function unicodeToArray(string) { + return string.match(reUnicode) || []; + } + function unicodeWords(string) { + return string.match(reUnicodeWord) || []; + } + var runInContext = function runInContext2(context) { + context = context == null ? root : _2.defaults(root.Object(), context, _2.pick(root, contextProps)); + var Array2 = context.Array, Date2 = context.Date, Error2 = context.Error, Function2 = context.Function, Math2 = context.Math, Object2 = context.Object, RegExp2 = context.RegExp, String2 = context.String, TypeError2 = context.TypeError; + var arrayProto = Array2.prototype, funcProto = Function2.prototype, objectProto = Object2.prototype; + var coreJsData = context["__core-js_shared__"]; + var funcToString = funcProto.toString; + var hasOwnProperty = objectProto.hasOwnProperty; + var idCounter = 0; + var maskSrcKey = function() { + var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ""); + return uid ? "Symbol(src)_1." + uid : ""; + }(); + var nativeObjectToString = objectProto.toString; + var objectCtorString = funcToString.call(Object2); + var oldDash = root._; + var reIsNative = RegExp2( + "^" + funcToString.call(hasOwnProperty).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$" + ); + var Buffer2 = moduleExports ? context.Buffer : undefined2, Symbol2 = context.Symbol, Uint8Array2 = context.Uint8Array, allocUnsafe = Buffer2 ? Buffer2.allocUnsafe : undefined2, getPrototype = overArg(Object2.getPrototypeOf, Object2), objectCreate = Object2.create, propertyIsEnumerable = objectProto.propertyIsEnumerable, splice = arrayProto.splice, spreadableSymbol = Symbol2 ? Symbol2.isConcatSpreadable : undefined2, symIterator = Symbol2 ? Symbol2.iterator : undefined2, symToStringTag = Symbol2 ? Symbol2.toStringTag : undefined2; + var defineProperty = function() { + try { + var func = getNative(Object2, "defineProperty"); + func({}, "", {}); + return func; + } catch (e) { + } + }(); + var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout, ctxNow = Date2 && Date2.now !== root.Date.now && Date2.now, ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout; + var nativeCeil = Math2.ceil, nativeFloor = Math2.floor, nativeGetSymbols = Object2.getOwnPropertySymbols, nativeIsBuffer = Buffer2 ? Buffer2.isBuffer : undefined2, nativeIsFinite = context.isFinite, nativeJoin = arrayProto.join, nativeKeys = overArg(Object2.keys, Object2), nativeMax = Math2.max, nativeMin = Math2.min, nativeNow = Date2.now, nativeParseInt = context.parseInt, nativeRandom = Math2.random, nativeReverse = arrayProto.reverse; + var DataView2 = getNative(context, "DataView"), Map2 = getNative(context, "Map"), Promise2 = getNative(context, "Promise"), Set2 = getNative(context, "Set"), WeakMap2 = getNative(context, "WeakMap"), nativeCreate = getNative(Object2, "create"); + var metaMap = WeakMap2 && new WeakMap2(); + var realNames = {}; + var dataViewCtorString = toSource(DataView2), mapCtorString = toSource(Map2), promiseCtorString = toSource(Promise2), setCtorString = toSource(Set2), weakMapCtorString = toSource(WeakMap2); + var symbolProto = Symbol2 ? Symbol2.prototype : undefined2, symbolValueOf = symbolProto ? symbolProto.valueOf : undefined2, symbolToString = symbolProto ? symbolProto.toString : undefined2; + function lodash(value) { + if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) { + if (value instanceof LodashWrapper) { + return value; + } + if (hasOwnProperty.call(value, "__wrapped__")) { + return wrapperClone(value); + } + } + return new LodashWrapper(value); + } + var baseCreate = /* @__PURE__ */ function() { + function object() { + } + return function(proto) { + if (!isObject(proto)) { + return {}; + } + if (objectCreate) { + return objectCreate(proto); + } + object.prototype = proto; + var result2 = new object(); + object.prototype = undefined2; + return result2; + }; + }(); + function baseLodash() { + } + function LodashWrapper(value, chainAll) { + this.__wrapped__ = value; + this.__actions__ = []; + this.__chain__ = !!chainAll; + this.__index__ = 0; + this.__values__ = undefined2; + } + lodash.templateSettings = { + /** + * Used to detect `data` property values to be HTML-escaped. + * + * @memberOf _.templateSettings + * @type {RegExp} + */ + "escape": reEscape, + /** + * Used to detect code to be evaluated. + * + * @memberOf _.templateSettings + * @type {RegExp} + */ + "evaluate": reEvaluate, + /** + * Used to detect `data` property values to inject. + * + * @memberOf _.templateSettings + * @type {RegExp} + */ + "interpolate": reInterpolate, + /** + * Used to reference the data object in the template text. + * + * @memberOf _.templateSettings + * @type {string} + */ + "variable": "", + /** + * Used to import variables into the compiled template. + * + * @memberOf _.templateSettings + * @type {Object} + */ + "imports": { + /** + * A reference to the `lodash` function. + * + * @memberOf _.templateSettings.imports + * @type {Function} + */ + "_": lodash + } + }; + lodash.prototype = baseLodash.prototype; + lodash.prototype.constructor = lodash; + LodashWrapper.prototype = baseCreate(baseLodash.prototype); + LodashWrapper.prototype.constructor = LodashWrapper; + function LazyWrapper(value) { + this.__wrapped__ = value; + this.__actions__ = []; + this.__dir__ = 1; + this.__filtered__ = false; + this.__iteratees__ = []; + this.__takeCount__ = MAX_ARRAY_LENGTH; + this.__views__ = []; + } + function lazyClone() { + var result2 = new LazyWrapper(this.__wrapped__); + result2.__actions__ = copyArray(this.__actions__); + result2.__dir__ = this.__dir__; + result2.__filtered__ = this.__filtered__; + result2.__iteratees__ = copyArray(this.__iteratees__); + result2.__takeCount__ = this.__takeCount__; + result2.__views__ = copyArray(this.__views__); + return result2; + } + function lazyReverse() { + if (this.__filtered__) { + var result2 = new LazyWrapper(this); + result2.__dir__ = -1; + result2.__filtered__ = true; + } else { + result2 = this.clone(); + result2.__dir__ *= -1; + } + return result2; + } + function lazyValue() { + var array = this.__wrapped__.value(), dir = this.__dir__, isArr = isArray(array), isRight = dir < 0, arrLength = isArr ? array.length : 0, view = getView(0, arrLength, this.__views__), start = view.start, end = view.end, length = end - start, index = isRight ? end : start - 1, iteratees = this.__iteratees__, iterLength = iteratees.length, resIndex = 0, takeCount = nativeMin(length, this.__takeCount__); + if (!isArr || !isRight && arrLength == length && takeCount == length) { + return baseWrapperValue(array, this.__actions__); + } + var result2 = []; + outer: + while (length-- && resIndex < takeCount) { + index += dir; + var iterIndex = -1, value = array[index]; + while (++iterIndex < iterLength) { + var data = iteratees[iterIndex], iteratee2 = data.iteratee, type = data.type, computed = iteratee2(value); + if (type == LAZY_MAP_FLAG) { + value = computed; + } else if (!computed) { + if (type == LAZY_FILTER_FLAG) { + continue outer; + } else { + break outer; + } + } + } + result2[resIndex++] = value; + } + return result2; + } + LazyWrapper.prototype = baseCreate(baseLodash.prototype); + LazyWrapper.prototype.constructor = LazyWrapper; + function Hash(entries) { + var index = -1, length = entries == null ? 0 : entries.length; + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + function hashClear() { + this.__data__ = nativeCreate ? nativeCreate(null) : {}; + this.size = 0; + } + function hashDelete(key) { + var result2 = this.has(key) && delete this.__data__[key]; + this.size -= result2 ? 1 : 0; + return result2; + } + function hashGet(key) { + var data = this.__data__; + if (nativeCreate) { + var result2 = data[key]; + return result2 === HASH_UNDEFINED ? undefined2 : result2; + } + return hasOwnProperty.call(data, key) ? data[key] : undefined2; + } + function hashHas(key) { + var data = this.__data__; + return nativeCreate ? data[key] !== undefined2 : hasOwnProperty.call(data, key); + } + function hashSet(key, value) { + var data = this.__data__; + this.size += this.has(key) ? 0 : 1; + data[key] = nativeCreate && value === undefined2 ? HASH_UNDEFINED : value; + return this; + } + Hash.prototype.clear = hashClear; + Hash.prototype["delete"] = hashDelete; + Hash.prototype.get = hashGet; + Hash.prototype.has = hashHas; + Hash.prototype.set = hashSet; + function ListCache(entries) { + var index = -1, length = entries == null ? 0 : entries.length; + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + function listCacheClear() { + this.__data__ = []; + this.size = 0; + } + function listCacheDelete(key) { + var data = this.__data__, index = assocIndexOf(data, key); + if (index < 0) { + return false; + } + var lastIndex = data.length - 1; + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); + } + --this.size; + return true; + } + function listCacheGet(key) { + var data = this.__data__, index = assocIndexOf(data, key); + return index < 0 ? undefined2 : data[index][1]; + } + function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; + } + function listCacheSet(key, value) { + var data = this.__data__, index = assocIndexOf(data, key); + if (index < 0) { + ++this.size; + data.push([key, value]); + } else { + data[index][1] = value; + } + return this; + } + ListCache.prototype.clear = listCacheClear; + ListCache.prototype["delete"] = listCacheDelete; + ListCache.prototype.get = listCacheGet; + ListCache.prototype.has = listCacheHas; + ListCache.prototype.set = listCacheSet; + function MapCache(entries) { + var index = -1, length = entries == null ? 0 : entries.length; + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + function mapCacheClear() { + this.size = 0; + this.__data__ = { + "hash": new Hash(), + "map": new (Map2 || ListCache)(), + "string": new Hash() + }; + } + function mapCacheDelete(key) { + var result2 = getMapData(this, key)["delete"](key); + this.size -= result2 ? 1 : 0; + return result2; + } + function mapCacheGet(key) { + return getMapData(this, key).get(key); + } + function mapCacheHas(key) { + return getMapData(this, key).has(key); + } + function mapCacheSet(key, value) { + var data = getMapData(this, key), size2 = data.size; + data.set(key, value); + this.size += data.size == size2 ? 0 : 1; + return this; + } + MapCache.prototype.clear = mapCacheClear; + MapCache.prototype["delete"] = mapCacheDelete; + MapCache.prototype.get = mapCacheGet; + MapCache.prototype.has = mapCacheHas; + MapCache.prototype.set = mapCacheSet; + function SetCache(values2) { + var index = -1, length = values2 == null ? 0 : values2.length; + this.__data__ = new MapCache(); + while (++index < length) { + this.add(values2[index]); + } + } + function setCacheAdd(value) { + this.__data__.set(value, HASH_UNDEFINED); + return this; + } + function setCacheHas(value) { + return this.__data__.has(value); + } + SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; + SetCache.prototype.has = setCacheHas; + function Stack(entries) { + var data = this.__data__ = new ListCache(entries); + this.size = data.size; + } + function stackClear() { + this.__data__ = new ListCache(); + this.size = 0; + } + function stackDelete(key) { + var data = this.__data__, result2 = data["delete"](key); + this.size = data.size; + return result2; + } + function stackGet(key) { + return this.__data__.get(key); + } + function stackHas(key) { + return this.__data__.has(key); + } + function stackSet(key, value) { + var data = this.__data__; + if (data instanceof ListCache) { + var pairs = data.__data__; + if (!Map2 || pairs.length < LARGE_ARRAY_SIZE - 1) { + pairs.push([key, value]); + this.size = ++data.size; + return this; + } + data = this.__data__ = new MapCache(pairs); + } + data.set(key, value); + this.size = data.size; + return this; + } + Stack.prototype.clear = stackClear; + Stack.prototype["delete"] = stackDelete; + Stack.prototype.get = stackGet; + Stack.prototype.has = stackHas; + Stack.prototype.set = stackSet; + function arrayLikeKeys(value, inherited) { + var isArr = isArray(value), isArg = !isArr && isArguments(value), isBuff = !isArr && !isArg && isBuffer(value), isType = !isArr && !isArg && !isBuff && isTypedArray(value), skipIndexes = isArr || isArg || isBuff || isType, result2 = skipIndexes ? baseTimes(value.length, String2) : [], length = result2.length; + for (var key in value) { + if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && // Safari 9 has enumerable `arguments.length` in strict mode. + (key == "length" || // Node.js 0.10 has enumerable non-index properties on buffers. + isBuff && (key == "offset" || key == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays. + isType && (key == "buffer" || key == "byteLength" || key == "byteOffset") || // Skip index properties. + isIndex(key, length)))) { + result2.push(key); + } + } + return result2; + } + function arraySample(array) { + var length = array.length; + return length ? array[baseRandom(0, length - 1)] : undefined2; + } + function arraySampleSize(array, n) { + return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length)); + } + function arrayShuffle(array) { + return shuffleSelf(copyArray(array)); + } + function assignMergeValue(object, key, value) { + if (value !== undefined2 && !eq(object[key], value) || value === undefined2 && !(key in object)) { + baseAssignValue(object, key, value); + } + } + function assignValue(object, key, value) { + var objValue = object[key]; + if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || value === undefined2 && !(key in object)) { + baseAssignValue(object, key, value); + } + } + function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (eq(array[length][0], key)) { + return length; + } + } + return -1; + } + function baseAggregator(collection, setter, iteratee2, accumulator) { + baseEach(collection, function(value, key, collection2) { + setter(accumulator, value, iteratee2(value), collection2); + }); + return accumulator; + } + function baseAssign(object, source) { + return object && copyObject(source, keys(source), object); + } + function baseAssignIn(object, source) { + return object && copyObject(source, keysIn(source), object); + } + function baseAssignValue(object, key, value) { + if (key == "__proto__" && defineProperty) { + defineProperty(object, key, { + "configurable": true, + "enumerable": true, + "value": value, + "writable": true + }); + } else { + object[key] = value; + } + } + function baseAt(object, paths) { + var index = -1, length = paths.length, result2 = Array2(length), skip = object == null; + while (++index < length) { + result2[index] = skip ? undefined2 : get(object, paths[index]); + } + return result2; + } + function baseClamp(number, lower, upper) { + if (number === number) { + if (upper !== undefined2) { + number = number <= upper ? number : upper; + } + if (lower !== undefined2) { + number = number >= lower ? number : lower; + } + } + return number; + } + function baseClone(value, bitmask, customizer, key, object, stack) { + var result2, isDeep = bitmask & CLONE_DEEP_FLAG, isFlat = bitmask & CLONE_FLAT_FLAG, isFull = bitmask & CLONE_SYMBOLS_FLAG; + if (customizer) { + result2 = object ? customizer(value, key, object, stack) : customizer(value); + } + if (result2 !== undefined2) { + return result2; + } + if (!isObject(value)) { + return value; + } + var isArr = isArray(value); + if (isArr) { + result2 = initCloneArray(value); + if (!isDeep) { + return copyArray(value, result2); + } + } else { + var tag = getTag(value), isFunc = tag == funcTag || tag == genTag; + if (isBuffer(value)) { + return cloneBuffer(value, isDeep); + } + if (tag == objectTag || tag == argsTag || isFunc && !object) { + result2 = isFlat || isFunc ? {} : initCloneObject(value); + if (!isDeep) { + return isFlat ? copySymbolsIn(value, baseAssignIn(result2, value)) : copySymbols(value, baseAssign(result2, value)); + } + } else { + if (!cloneableTags[tag]) { + return object ? value : {}; + } + result2 = initCloneByTag(value, tag, isDeep); + } + } + stack || (stack = new Stack()); + var stacked = stack.get(value); + if (stacked) { + return stacked; + } + stack.set(value, result2); + if (isSet(value)) { + value.forEach(function(subValue) { + result2.add(baseClone(subValue, bitmask, customizer, subValue, value, stack)); + }); + } else if (isMap(value)) { + value.forEach(function(subValue, key2) { + result2.set(key2, baseClone(subValue, bitmask, customizer, key2, value, stack)); + }); + } + var keysFunc = isFull ? isFlat ? getAllKeysIn : getAllKeys : isFlat ? keysIn : keys; + var props = isArr ? undefined2 : keysFunc(value); + arrayEach(props || value, function(subValue, key2) { + if (props) { + key2 = subValue; + subValue = value[key2]; + } + assignValue(result2, key2, baseClone(subValue, bitmask, customizer, key2, value, stack)); + }); + return result2; + } + function baseConforms(source) { + var props = keys(source); + return function(object) { + return baseConformsTo(object, source, props); + }; + } + function baseConformsTo(object, source, props) { + var length = props.length; + if (object == null) { + return !length; + } + object = Object2(object); + while (length--) { + var key = props[length], predicate = source[key], value = object[key]; + if (value === undefined2 && !(key in object) || !predicate(value)) { + return false; + } + } + return true; + } + function baseDelay(func, wait, args) { + if (typeof func != "function") { + throw new TypeError2(FUNC_ERROR_TEXT); + } + return setTimeout2(function() { + func.apply(undefined2, args); + }, wait); + } + function baseDifference(array, values2, iteratee2, comparator) { + var index = -1, includes2 = arrayIncludes, isCommon = true, length = array.length, result2 = [], valuesLength = values2.length; + if (!length) { + return result2; + } + if (iteratee2) { + values2 = arrayMap(values2, baseUnary(iteratee2)); + } + if (comparator) { + includes2 = arrayIncludesWith; + isCommon = false; + } else if (values2.length >= LARGE_ARRAY_SIZE) { + includes2 = cacheHas; + isCommon = false; + values2 = new SetCache(values2); + } + outer: + while (++index < length) { + var value = array[index], computed = iteratee2 == null ? value : iteratee2(value); + value = comparator || value !== 0 ? value : 0; + if (isCommon && computed === computed) { + var valuesIndex = valuesLength; + while (valuesIndex--) { + if (values2[valuesIndex] === computed) { + continue outer; + } + } + result2.push(value); + } else if (!includes2(values2, computed, comparator)) { + result2.push(value); + } + } + return result2; + } + var baseEach = createBaseEach(baseForOwn); + var baseEachRight = createBaseEach(baseForOwnRight, true); + function baseEvery(collection, predicate) { + var result2 = true; + baseEach(collection, function(value, index, collection2) { + result2 = !!predicate(value, index, collection2); + return result2; + }); + return result2; + } + function baseExtremum(array, iteratee2, comparator) { + var index = -1, length = array.length; + while (++index < length) { + var value = array[index], current = iteratee2(value); + if (current != null && (computed === undefined2 ? current === current && !isSymbol(current) : comparator(current, computed))) { + var computed = current, result2 = value; + } + } + return result2; + } + function baseFill(array, value, start, end) { + var length = array.length; + start = toInteger(start); + if (start < 0) { + start = -start > length ? 0 : length + start; + } + end = end === undefined2 || end > length ? length : toInteger(end); + if (end < 0) { + end += length; + } + end = start > end ? 0 : toLength(end); + while (start < end) { + array[start++] = value; + } + return array; + } + function baseFilter(collection, predicate) { + var result2 = []; + baseEach(collection, function(value, index, collection2) { + if (predicate(value, index, collection2)) { + result2.push(value); + } + }); + return result2; + } + function baseFlatten(array, depth, predicate, isStrict, result2) { + var index = -1, length = array.length; + predicate || (predicate = isFlattenable); + result2 || (result2 = []); + while (++index < length) { + var value = array[index]; + if (depth > 0 && predicate(value)) { + if (depth > 1) { + baseFlatten(value, depth - 1, predicate, isStrict, result2); + } else { + arrayPush(result2, value); + } + } else if (!isStrict) { + result2[result2.length] = value; + } + } + return result2; + } + var baseFor = createBaseFor(); + var baseForRight = createBaseFor(true); + function baseForOwn(object, iteratee2) { + return object && baseFor(object, iteratee2, keys); + } + function baseForOwnRight(object, iteratee2) { + return object && baseForRight(object, iteratee2, keys); + } + function baseFunctions(object, props) { + return arrayFilter(props, function(key) { + return isFunction(object[key]); + }); + } + function baseGet(object, path) { + path = castPath(path, object); + var index = 0, length = path.length; + while (object != null && index < length) { + object = object[toKey(path[index++])]; + } + return index && index == length ? object : undefined2; + } + function baseGetAllKeys(object, keysFunc, symbolsFunc) { + var result2 = keysFunc(object); + return isArray(object) ? result2 : arrayPush(result2, symbolsFunc(object)); + } + function baseGetTag(value) { + if (value == null) { + return value === undefined2 ? undefinedTag : nullTag; + } + return symToStringTag && symToStringTag in Object2(value) ? getRawTag(value) : objectToString(value); + } + function baseGt(value, other) { + return value > other; + } + function baseHas(object, key) { + return object != null && hasOwnProperty.call(object, key); + } + function baseHasIn(object, key) { + return object != null && key in Object2(object); + } + function baseInRange(number, start, end) { + return number >= nativeMin(start, end) && number < nativeMax(start, end); + } + function baseIntersection(arrays, iteratee2, comparator) { + var includes2 = comparator ? arrayIncludesWith : arrayIncludes, length = arrays[0].length, othLength = arrays.length, othIndex = othLength, caches = Array2(othLength), maxLength = Infinity, result2 = []; + while (othIndex--) { + var array = arrays[othIndex]; + if (othIndex && iteratee2) { + array = arrayMap(array, baseUnary(iteratee2)); + } + maxLength = nativeMin(array.length, maxLength); + caches[othIndex] = !comparator && (iteratee2 || length >= 120 && array.length >= 120) ? new SetCache(othIndex && array) : undefined2; + } + array = arrays[0]; + var index = -1, seen = caches[0]; + outer: + while (++index < length && result2.length < maxLength) { + var value = array[index], computed = iteratee2 ? iteratee2(value) : value; + value = comparator || value !== 0 ? value : 0; + if (!(seen ? cacheHas(seen, computed) : includes2(result2, computed, comparator))) { + othIndex = othLength; + while (--othIndex) { + var cache = caches[othIndex]; + if (!(cache ? cacheHas(cache, computed) : includes2(arrays[othIndex], computed, comparator))) { + continue outer; + } + } + if (seen) { + seen.push(computed); + } + result2.push(value); + } + } + return result2; + } + function baseInverter(object, setter, iteratee2, accumulator) { + baseForOwn(object, function(value, key, object2) { + setter(accumulator, iteratee2(value), key, object2); + }); + return accumulator; + } + function baseInvoke(object, path, args) { + path = castPath(path, object); + object = parent(object, path); + var func = object == null ? object : object[toKey(last(path))]; + return func == null ? undefined2 : apply(func, object, args); + } + function baseIsArguments(value) { + return isObjectLike(value) && baseGetTag(value) == argsTag; + } + function baseIsArrayBuffer(value) { + return isObjectLike(value) && baseGetTag(value) == arrayBufferTag; + } + function baseIsDate(value) { + return isObjectLike(value) && baseGetTag(value) == dateTag; + } + function baseIsEqual(value, other, bitmask, customizer, stack) { + if (value === other) { + return true; + } + if (value == null || other == null || !isObjectLike(value) && !isObjectLike(other)) { + return value !== value && other !== other; + } + return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); + } + function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { + var objIsArr = isArray(object), othIsArr = isArray(other), objTag = objIsArr ? arrayTag : getTag(object), othTag = othIsArr ? arrayTag : getTag(other); + objTag = objTag == argsTag ? objectTag : objTag; + othTag = othTag == argsTag ? objectTag : othTag; + var objIsObj = objTag == objectTag, othIsObj = othTag == objectTag, isSameTag = objTag == othTag; + if (isSameTag && isBuffer(object)) { + if (!isBuffer(other)) { + return false; + } + objIsArr = true; + objIsObj = false; + } + if (isSameTag && !objIsObj) { + stack || (stack = new Stack()); + return objIsArr || isTypedArray(object) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); + } + if (!(bitmask & COMPARE_PARTIAL_FLAG)) { + var objIsWrapped = objIsObj && hasOwnProperty.call(object, "__wrapped__"), othIsWrapped = othIsObj && hasOwnProperty.call(other, "__wrapped__"); + if (objIsWrapped || othIsWrapped) { + var objUnwrapped = objIsWrapped ? object.value() : object, othUnwrapped = othIsWrapped ? other.value() : other; + stack || (stack = new Stack()); + return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); + } + } + if (!isSameTag) { + return false; + } + stack || (stack = new Stack()); + return equalObjects(object, other, bitmask, customizer, equalFunc, stack); + } + function baseIsMap(value) { + return isObjectLike(value) && getTag(value) == mapTag; + } + function baseIsMatch(object, source, matchData, customizer) { + var index = matchData.length, length = index, noCustomizer = !customizer; + if (object == null) { + return !length; + } + object = Object2(object); + while (index--) { + var data = matchData[index]; + if (noCustomizer && data[2] ? data[1] !== object[data[0]] : !(data[0] in object)) { + return false; + } + } + while (++index < length) { + data = matchData[index]; + var key = data[0], objValue = object[key], srcValue = data[1]; + if (noCustomizer && data[2]) { + if (objValue === undefined2 && !(key in object)) { + return false; + } + } else { + var stack = new Stack(); + if (customizer) { + var result2 = customizer(objValue, srcValue, key, object, source, stack); + } + if (!(result2 === undefined2 ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack) : result2)) { + return false; + } + } + } + return true; + } + function baseIsNative(value) { + if (!isObject(value) || isMasked(value)) { + return false; + } + var pattern = isFunction(value) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); + } + function baseIsRegExp(value) { + return isObjectLike(value) && baseGetTag(value) == regexpTag; + } + function baseIsSet(value) { + return isObjectLike(value) && getTag(value) == setTag; + } + function baseIsTypedArray(value) { + return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; + } + function baseIteratee(value) { + if (typeof value == "function") { + return value; + } + if (value == null) { + return identity; + } + if (typeof value == "object") { + return isArray(value) ? baseMatchesProperty(value[0], value[1]) : baseMatches(value); + } + return property(value); + } + function baseKeys(object) { + if (!isPrototype(object)) { + return nativeKeys(object); + } + var result2 = []; + for (var key in Object2(object)) { + if (hasOwnProperty.call(object, key) && key != "constructor") { + result2.push(key); + } + } + return result2; + } + function baseKeysIn(object) { + if (!isObject(object)) { + return nativeKeysIn(object); + } + var isProto = isPrototype(object), result2 = []; + for (var key in object) { + if (!(key == "constructor" && (isProto || !hasOwnProperty.call(object, key)))) { + result2.push(key); + } + } + return result2; + } + function baseLt(value, other) { + return value < other; + } + function baseMap(collection, iteratee2) { + var index = -1, result2 = isArrayLike(collection) ? Array2(collection.length) : []; + baseEach(collection, function(value, key, collection2) { + result2[++index] = iteratee2(value, key, collection2); + }); + return result2; + } + function baseMatches(source) { + var matchData = getMatchData(source); + if (matchData.length == 1 && matchData[0][2]) { + return matchesStrictComparable(matchData[0][0], matchData[0][1]); + } + return function(object) { + return object === source || baseIsMatch(object, source, matchData); + }; + } + function baseMatchesProperty(path, srcValue) { + if (isKey(path) && isStrictComparable(srcValue)) { + return matchesStrictComparable(toKey(path), srcValue); + } + return function(object) { + var objValue = get(object, path); + return objValue === undefined2 && objValue === srcValue ? hasIn(object, path) : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG); + }; + } + function baseMerge(object, source, srcIndex, customizer, stack) { + if (object === source) { + return; + } + baseFor(source, function(srcValue, key) { + stack || (stack = new Stack()); + if (isObject(srcValue)) { + baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack); + } else { + var newValue = customizer ? customizer(safeGet(object, key), srcValue, key + "", object, source, stack) : undefined2; + if (newValue === undefined2) { + newValue = srcValue; + } + assignMergeValue(object, key, newValue); + } + }, keysIn); + } + function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) { + var objValue = safeGet(object, key), srcValue = safeGet(source, key), stacked = stack.get(srcValue); + if (stacked) { + assignMergeValue(object, key, stacked); + return; + } + var newValue = customizer ? customizer(objValue, srcValue, key + "", object, source, stack) : undefined2; + var isCommon = newValue === undefined2; + if (isCommon) { + var isArr = isArray(srcValue), isBuff = !isArr && isBuffer(srcValue), isTyped = !isArr && !isBuff && isTypedArray(srcValue); + newValue = srcValue; + if (isArr || isBuff || isTyped) { + if (isArray(objValue)) { + newValue = objValue; + } else if (isArrayLikeObject(objValue)) { + newValue = copyArray(objValue); + } else if (isBuff) { + isCommon = false; + newValue = cloneBuffer(srcValue, true); + } else if (isTyped) { + isCommon = false; + newValue = cloneTypedArray(srcValue, true); + } else { + newValue = []; + } + } else if (isPlainObject(srcValue) || isArguments(srcValue)) { + newValue = objValue; + if (isArguments(objValue)) { + newValue = toPlainObject(objValue); + } else if (!isObject(objValue) || isFunction(objValue)) { + newValue = initCloneObject(srcValue); + } + } else { + isCommon = false; + } + } + if (isCommon) { + stack.set(srcValue, newValue); + mergeFunc(newValue, srcValue, srcIndex, customizer, stack); + stack["delete"](srcValue); + } + assignMergeValue(object, key, newValue); + } + function baseNth(array, n) { + var length = array.length; + if (!length) { + return; + } + n += n < 0 ? length : 0; + return isIndex(n, length) ? array[n] : undefined2; + } + function baseOrderBy(collection, iteratees, orders) { + if (iteratees.length) { + iteratees = arrayMap(iteratees, function(iteratee2) { + if (isArray(iteratee2)) { + return function(value) { + return baseGet(value, iteratee2.length === 1 ? iteratee2[0] : iteratee2); + }; + } + return iteratee2; + }); + } else { + iteratees = [identity]; + } + var index = -1; + iteratees = arrayMap(iteratees, baseUnary(getIteratee())); + var result2 = baseMap(collection, function(value, key, collection2) { + var criteria = arrayMap(iteratees, function(iteratee2) { + return iteratee2(value); + }); + return { "criteria": criteria, "index": ++index, "value": value }; + }); + return baseSortBy(result2, function(object, other) { + return compareMultiple(object, other, orders); + }); + } + function basePick(object, paths) { + return basePickBy(object, paths, function(value, path) { + return hasIn(object, path); + }); + } + function basePickBy(object, paths, predicate) { + var index = -1, length = paths.length, result2 = {}; + while (++index < length) { + var path = paths[index], value = baseGet(object, path); + if (predicate(value, path)) { + baseSet(result2, castPath(path, object), value); + } + } + return result2; + } + function basePropertyDeep(path) { + return function(object) { + return baseGet(object, path); + }; + } + function basePullAll(array, values2, iteratee2, comparator) { + var indexOf2 = comparator ? baseIndexOfWith : baseIndexOf, index = -1, length = values2.length, seen = array; + if (array === values2) { + values2 = copyArray(values2); + } + if (iteratee2) { + seen = arrayMap(array, baseUnary(iteratee2)); + } + while (++index < length) { + var fromIndex = 0, value = values2[index], computed = iteratee2 ? iteratee2(value) : value; + while ((fromIndex = indexOf2(seen, computed, fromIndex, comparator)) > -1) { + if (seen !== array) { + splice.call(seen, fromIndex, 1); + } + splice.call(array, fromIndex, 1); + } + } + return array; + } + function basePullAt(array, indexes) { + var length = array ? indexes.length : 0, lastIndex = length - 1; + while (length--) { + var index = indexes[length]; + if (length == lastIndex || index !== previous) { + var previous = index; + if (isIndex(index)) { + splice.call(array, index, 1); + } else { + baseUnset(array, index); + } + } + } + return array; + } + function baseRandom(lower, upper) { + return lower + nativeFloor(nativeRandom() * (upper - lower + 1)); + } + function baseRange(start, end, step, fromRight) { + var index = -1, length = nativeMax(nativeCeil((end - start) / (step || 1)), 0), result2 = Array2(length); + while (length--) { + result2[fromRight ? length : ++index] = start; + start += step; + } + return result2; + } + function baseRepeat(string, n) { + var result2 = ""; + if (!string || n < 1 || n > MAX_SAFE_INTEGER) { + return result2; + } + do { + if (n % 2) { + result2 += string; + } + n = nativeFloor(n / 2); + if (n) { + string += string; + } + } while (n); + return result2; + } + function baseRest(func, start) { + return setToString(overRest(func, start, identity), func + ""); + } + function baseSample(collection) { + return arraySample(values(collection)); + } + function baseSampleSize(collection, n) { + var array = values(collection); + return shuffleSelf(array, baseClamp(n, 0, array.length)); + } + function baseSet(object, path, value, customizer) { + if (!isObject(object)) { + return object; + } + path = castPath(path, object); + var index = -1, length = path.length, lastIndex = length - 1, nested = object; + while (nested != null && ++index < length) { + var key = toKey(path[index]), newValue = value; + if (key === "__proto__" || key === "constructor" || key === "prototype") { + return object; + } + if (index != lastIndex) { + var objValue = nested[key]; + newValue = customizer ? customizer(objValue, key, nested) : undefined2; + if (newValue === undefined2) { + newValue = isObject(objValue) ? objValue : isIndex(path[index + 1]) ? [] : {}; + } + } + assignValue(nested, key, newValue); + nested = nested[key]; + } + return object; + } + var baseSetData = !metaMap ? identity : function(func, data) { + metaMap.set(func, data); + return func; + }; + var baseSetToString = !defineProperty ? identity : function(func, string) { + return defineProperty(func, "toString", { + "configurable": true, + "enumerable": false, + "value": constant(string), + "writable": true + }); + }; + function baseShuffle(collection) { + return shuffleSelf(values(collection)); + } + function baseSlice(array, start, end) { + var index = -1, length = array.length; + if (start < 0) { + start = -start > length ? 0 : length + start; + } + end = end > length ? length : end; + if (end < 0) { + end += length; + } + length = start > end ? 0 : end - start >>> 0; + start >>>= 0; + var result2 = Array2(length); + while (++index < length) { + result2[index] = array[index + start]; + } + return result2; + } + function baseSome(collection, predicate) { + var result2; + baseEach(collection, function(value, index, collection2) { + result2 = predicate(value, index, collection2); + return !result2; + }); + return !!result2; + } + function baseSortedIndex(array, value, retHighest) { + var low = 0, high = array == null ? low : array.length; + if (typeof value == "number" && value === value && high <= HALF_MAX_ARRAY_LENGTH) { + while (low < high) { + var mid = low + high >>> 1, computed = array[mid]; + if (computed !== null && !isSymbol(computed) && (retHighest ? computed <= value : computed < value)) { + low = mid + 1; + } else { + high = mid; + } + } + return high; + } + return baseSortedIndexBy(array, value, identity, retHighest); + } + function baseSortedIndexBy(array, value, iteratee2, retHighest) { + var low = 0, high = array == null ? 0 : array.length; + if (high === 0) { + return 0; + } + value = iteratee2(value); + var valIsNaN = value !== value, valIsNull = value === null, valIsSymbol = isSymbol(value), valIsUndefined = value === undefined2; + while (low < high) { + var mid = nativeFloor((low + high) / 2), computed = iteratee2(array[mid]), othIsDefined = computed !== undefined2, othIsNull = computed === null, othIsReflexive = computed === computed, othIsSymbol = isSymbol(computed); + if (valIsNaN) { + var setLow = retHighest || othIsReflexive; + } else if (valIsUndefined) { + setLow = othIsReflexive && (retHighest || othIsDefined); + } else if (valIsNull) { + setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull); + } else if (valIsSymbol) { + setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol); + } else if (othIsNull || othIsSymbol) { + setLow = false; + } else { + setLow = retHighest ? computed <= value : computed < value; + } + if (setLow) { + low = mid + 1; + } else { + high = mid; + } + } + return nativeMin(high, MAX_ARRAY_INDEX); + } + function baseSortedUniq(array, iteratee2) { + var index = -1, length = array.length, resIndex = 0, result2 = []; + while (++index < length) { + var value = array[index], computed = iteratee2 ? iteratee2(value) : value; + if (!index || !eq(computed, seen)) { + var seen = computed; + result2[resIndex++] = value === 0 ? 0 : value; + } + } + return result2; + } + function baseToNumber(value) { + if (typeof value == "number") { + return value; + } + if (isSymbol(value)) { + return NAN; + } + return +value; + } + function baseToString(value) { + if (typeof value == "string") { + return value; + } + if (isArray(value)) { + return arrayMap(value, baseToString) + ""; + } + if (isSymbol(value)) { + return symbolToString ? symbolToString.call(value) : ""; + } + var result2 = value + ""; + return result2 == "0" && 1 / value == -INFINITY ? "-0" : result2; + } + function baseUniq(array, iteratee2, comparator) { + var index = -1, includes2 = arrayIncludes, length = array.length, isCommon = true, result2 = [], seen = result2; + if (comparator) { + isCommon = false; + includes2 = arrayIncludesWith; + } else if (length >= LARGE_ARRAY_SIZE) { + var set2 = iteratee2 ? null : createSet(array); + if (set2) { + return setToArray(set2); + } + isCommon = false; + includes2 = cacheHas; + seen = new SetCache(); + } else { + seen = iteratee2 ? [] : result2; + } + outer: + while (++index < length) { + var value = array[index], computed = iteratee2 ? iteratee2(value) : value; + value = comparator || value !== 0 ? value : 0; + if (isCommon && computed === computed) { + var seenIndex = seen.length; + while (seenIndex--) { + if (seen[seenIndex] === computed) { + continue outer; + } + } + if (iteratee2) { + seen.push(computed); + } + result2.push(value); + } else if (!includes2(seen, computed, comparator)) { + if (seen !== result2) { + seen.push(computed); + } + result2.push(value); + } + } + return result2; + } + function baseUnset(object, path) { + path = castPath(path, object); + object = parent(object, path); + return object == null || delete object[toKey(last(path))]; + } + function baseUpdate(object, path, updater, customizer) { + return baseSet(object, path, updater(baseGet(object, path)), customizer); + } + function baseWhile(array, predicate, isDrop, fromRight) { + var length = array.length, index = fromRight ? length : -1; + while ((fromRight ? index-- : ++index < length) && predicate(array[index], index, array)) { + } + return isDrop ? baseSlice(array, fromRight ? 0 : index, fromRight ? index + 1 : length) : baseSlice(array, fromRight ? index + 1 : 0, fromRight ? length : index); + } + function baseWrapperValue(value, actions) { + var result2 = value; + if (result2 instanceof LazyWrapper) { + result2 = result2.value(); + } + return arrayReduce(actions, function(result3, action) { + return action.func.apply(action.thisArg, arrayPush([result3], action.args)); + }, result2); + } + function baseXor(arrays, iteratee2, comparator) { + var length = arrays.length; + if (length < 2) { + return length ? baseUniq(arrays[0]) : []; + } + var index = -1, result2 = Array2(length); + while (++index < length) { + var array = arrays[index], othIndex = -1; + while (++othIndex < length) { + if (othIndex != index) { + result2[index] = baseDifference(result2[index] || array, arrays[othIndex], iteratee2, comparator); + } + } + } + return baseUniq(baseFlatten(result2, 1), iteratee2, comparator); + } + function baseZipObject(props, values2, assignFunc) { + var index = -1, length = props.length, valsLength = values2.length, result2 = {}; + while (++index < length) { + var value = index < valsLength ? values2[index] : undefined2; + assignFunc(result2, props[index], value); + } + return result2; + } + function castArrayLikeObject(value) { + return isArrayLikeObject(value) ? value : []; + } + function castFunction(value) { + return typeof value == "function" ? value : identity; + } + function castPath(value, object) { + if (isArray(value)) { + return value; + } + return isKey(value, object) ? [value] : stringToPath(toString(value)); + } + var castRest = baseRest; + function castSlice(array, start, end) { + var length = array.length; + end = end === undefined2 ? length : end; + return !start && end >= length ? array : baseSlice(array, start, end); + } + var clearTimeout2 = ctxClearTimeout || function(id) { + return root.clearTimeout(id); + }; + function cloneBuffer(buffer, isDeep) { + if (isDeep) { + return buffer.slice(); + } + var length = buffer.length, result2 = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length); + buffer.copy(result2); + return result2; + } + function cloneArrayBuffer(arrayBuffer) { + var result2 = new arrayBuffer.constructor(arrayBuffer.byteLength); + new Uint8Array2(result2).set(new Uint8Array2(arrayBuffer)); + return result2; + } + function cloneDataView(dataView, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer; + return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); + } + function cloneRegExp(regexp) { + var result2 = new regexp.constructor(regexp.source, reFlags.exec(regexp)); + result2.lastIndex = regexp.lastIndex; + return result2; + } + function cloneSymbol(symbol) { + return symbolValueOf ? Object2(symbolValueOf.call(symbol)) : {}; + } + function cloneTypedArray(typedArray, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer; + return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); + } + function compareAscending(value, other) { + if (value !== other) { + var valIsDefined = value !== undefined2, valIsNull = value === null, valIsReflexive = value === value, valIsSymbol = isSymbol(value); + var othIsDefined = other !== undefined2, othIsNull = other === null, othIsReflexive = other === other, othIsSymbol = isSymbol(other); + if (!othIsNull && !othIsSymbol && !valIsSymbol && value > other || valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol || valIsNull && othIsDefined && othIsReflexive || !valIsDefined && othIsReflexive || !valIsReflexive) { + return 1; + } + if (!valIsNull && !valIsSymbol && !othIsSymbol && value < other || othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol || othIsNull && valIsDefined && valIsReflexive || !othIsDefined && valIsReflexive || !othIsReflexive) { + return -1; + } + } + return 0; + } + function compareMultiple(object, other, orders) { + var index = -1, objCriteria = object.criteria, othCriteria = other.criteria, length = objCriteria.length, ordersLength = orders.length; + while (++index < length) { + var result2 = compareAscending(objCriteria[index], othCriteria[index]); + if (result2) { + if (index >= ordersLength) { + return result2; + } + var order = orders[index]; + return result2 * (order == "desc" ? -1 : 1); + } + } + return object.index - other.index; + } + function composeArgs(args, partials, holders, isCurried) { + var argsIndex = -1, argsLength = args.length, holdersLength = holders.length, leftIndex = -1, leftLength = partials.length, rangeLength = nativeMax(argsLength - holdersLength, 0), result2 = Array2(leftLength + rangeLength), isUncurried = !isCurried; + while (++leftIndex < leftLength) { + result2[leftIndex] = partials[leftIndex]; + } + while (++argsIndex < holdersLength) { + if (isUncurried || argsIndex < argsLength) { + result2[holders[argsIndex]] = args[argsIndex]; + } + } + while (rangeLength--) { + result2[leftIndex++] = args[argsIndex++]; + } + return result2; + } + function composeArgsRight(args, partials, holders, isCurried) { + var argsIndex = -1, argsLength = args.length, holdersIndex = -1, holdersLength = holders.length, rightIndex = -1, rightLength = partials.length, rangeLength = nativeMax(argsLength - holdersLength, 0), result2 = Array2(rangeLength + rightLength), isUncurried = !isCurried; + while (++argsIndex < rangeLength) { + result2[argsIndex] = args[argsIndex]; + } + var offset = argsIndex; + while (++rightIndex < rightLength) { + result2[offset + rightIndex] = partials[rightIndex]; + } + while (++holdersIndex < holdersLength) { + if (isUncurried || argsIndex < argsLength) { + result2[offset + holders[holdersIndex]] = args[argsIndex++]; + } + } + return result2; + } + function copyArray(source, array) { + var index = -1, length = source.length; + array || (array = Array2(length)); + while (++index < length) { + array[index] = source[index]; + } + return array; + } + function copyObject(source, props, object, customizer) { + var isNew = !object; + object || (object = {}); + var index = -1, length = props.length; + while (++index < length) { + var key = props[index]; + var newValue = customizer ? customizer(object[key], source[key], key, object, source) : undefined2; + if (newValue === undefined2) { + newValue = source[key]; + } + if (isNew) { + baseAssignValue(object, key, newValue); + } else { + assignValue(object, key, newValue); + } + } + return object; + } + function copySymbols(source, object) { + return copyObject(source, getSymbols(source), object); + } + function copySymbolsIn(source, object) { + return copyObject(source, getSymbolsIn(source), object); + } + function createAggregator(setter, initializer) { + return function(collection, iteratee2) { + var func = isArray(collection) ? arrayAggregator : baseAggregator, accumulator = initializer ? initializer() : {}; + return func(collection, setter, getIteratee(iteratee2, 2), accumulator); + }; + } + function createAssigner(assigner) { + return baseRest(function(object, sources) { + var index = -1, length = sources.length, customizer = length > 1 ? sources[length - 1] : undefined2, guard = length > 2 ? sources[2] : undefined2; + customizer = assigner.length > 3 && typeof customizer == "function" ? (length--, customizer) : undefined2; + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + customizer = length < 3 ? undefined2 : customizer; + length = 1; + } + object = Object2(object); + while (++index < length) { + var source = sources[index]; + if (source) { + assigner(object, source, index, customizer); + } + } + return object; + }); + } + function createBaseEach(eachFunc, fromRight) { + return function(collection, iteratee2) { + if (collection == null) { + return collection; + } + if (!isArrayLike(collection)) { + return eachFunc(collection, iteratee2); + } + var length = collection.length, index = fromRight ? length : -1, iterable = Object2(collection); + while (fromRight ? index-- : ++index < length) { + if (iteratee2(iterable[index], index, iterable) === false) { + break; + } + } + return collection; + }; + } + function createBaseFor(fromRight) { + return function(object, iteratee2, keysFunc) { + var index = -1, iterable = Object2(object), props = keysFunc(object), length = props.length; + while (length--) { + var key = props[fromRight ? length : ++index]; + if (iteratee2(iterable[key], key, iterable) === false) { + break; + } + } + return object; + }; + } + function createBind(func, bitmask, thisArg) { + var isBind = bitmask & WRAP_BIND_FLAG, Ctor = createCtor(func); + function wrapper() { + var fn = this && this !== root && this instanceof wrapper ? Ctor : func; + return fn.apply(isBind ? thisArg : this, arguments); + } + return wrapper; + } + function createCaseFirst(methodName) { + return function(string) { + string = toString(string); + var strSymbols = hasUnicode(string) ? stringToArray(string) : undefined2; + var chr = strSymbols ? strSymbols[0] : string.charAt(0); + var trailing = strSymbols ? castSlice(strSymbols, 1).join("") : string.slice(1); + return chr[methodName]() + trailing; + }; + } + function createCompounder(callback) { + return function(string) { + return arrayReduce(words(deburr(string).replace(reApos, "")), callback, ""); + }; + } + function createCtor(Ctor) { + return function() { + var args = arguments; + switch (args.length) { + case 0: + return new Ctor(); + case 1: + return new Ctor(args[0]); + case 2: + return new Ctor(args[0], args[1]); + case 3: + return new Ctor(args[0], args[1], args[2]); + case 4: + return new Ctor(args[0], args[1], args[2], args[3]); + case 5: + return new Ctor(args[0], args[1], args[2], args[3], args[4]); + case 6: + return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]); + case 7: + return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]); + } + var thisBinding = baseCreate(Ctor.prototype), result2 = Ctor.apply(thisBinding, args); + return isObject(result2) ? result2 : thisBinding; + }; + } + function createCurry(func, bitmask, arity) { + var Ctor = createCtor(func); + function wrapper() { + var length = arguments.length, args = Array2(length), index = length, placeholder = getHolder(wrapper); + while (index--) { + args[index] = arguments[index]; + } + var holders = length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder ? [] : replaceHolders(args, placeholder); + length -= holders.length; + if (length < arity) { + return createRecurry( + func, + bitmask, + createHybrid, + wrapper.placeholder, + undefined2, + args, + holders, + undefined2, + undefined2, + arity - length + ); + } + var fn = this && this !== root && this instanceof wrapper ? Ctor : func; + return apply(fn, this, args); + } + return wrapper; + } + function createFind(findIndexFunc) { + return function(collection, predicate, fromIndex) { + var iterable = Object2(collection); + if (!isArrayLike(collection)) { + var iteratee2 = getIteratee(predicate, 3); + collection = keys(collection); + predicate = function(key) { + return iteratee2(iterable[key], key, iterable); + }; + } + var index = findIndexFunc(collection, predicate, fromIndex); + return index > -1 ? iterable[iteratee2 ? collection[index] : index] : undefined2; + }; + } + function createFlow(fromRight) { + return flatRest(function(funcs) { + var length = funcs.length, index = length, prereq = LodashWrapper.prototype.thru; + if (fromRight) { + funcs.reverse(); + } + while (index--) { + var func = funcs[index]; + if (typeof func != "function") { + throw new TypeError2(FUNC_ERROR_TEXT); + } + if (prereq && !wrapper && getFuncName(func) == "wrapper") { + var wrapper = new LodashWrapper([], true); + } + } + index = wrapper ? index : length; + while (++index < length) { + func = funcs[index]; + var funcName = getFuncName(func), data = funcName == "wrapper" ? getData(func) : undefined2; + if (data && isLaziable(data[0]) && data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) && !data[4].length && data[9] == 1) { + wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]); + } else { + wrapper = func.length == 1 && isLaziable(func) ? wrapper[funcName]() : wrapper.thru(func); + } + } + return function() { + var args = arguments, value = args[0]; + if (wrapper && args.length == 1 && isArray(value)) { + return wrapper.plant(value).value(); + } + var index2 = 0, result2 = length ? funcs[index2].apply(this, args) : value; + while (++index2 < length) { + result2 = funcs[index2].call(this, result2); + } + return result2; + }; + }); + } + function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary2, arity) { + var isAry = bitmask & WRAP_ARY_FLAG, isBind = bitmask & WRAP_BIND_FLAG, isBindKey = bitmask & WRAP_BIND_KEY_FLAG, isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG), isFlip = bitmask & WRAP_FLIP_FLAG, Ctor = isBindKey ? undefined2 : createCtor(func); + function wrapper() { + var length = arguments.length, args = Array2(length), index = length; + while (index--) { + args[index] = arguments[index]; + } + if (isCurried) { + var placeholder = getHolder(wrapper), holdersCount = countHolders(args, placeholder); + } + if (partials) { + args = composeArgs(args, partials, holders, isCurried); + } + if (partialsRight) { + args = composeArgsRight(args, partialsRight, holdersRight, isCurried); + } + length -= holdersCount; + if (isCurried && length < arity) { + var newHolders = replaceHolders(args, placeholder); + return createRecurry( + func, + bitmask, + createHybrid, + wrapper.placeholder, + thisArg, + args, + newHolders, + argPos, + ary2, + arity - length + ); + } + var thisBinding = isBind ? thisArg : this, fn = isBindKey ? thisBinding[func] : func; + length = args.length; + if (argPos) { + args = reorder(args, argPos); + } else if (isFlip && length > 1) { + args.reverse(); + } + if (isAry && ary2 < length) { + args.length = ary2; + } + if (this && this !== root && this instanceof wrapper) { + fn = Ctor || createCtor(fn); + } + return fn.apply(thisBinding, args); + } + return wrapper; + } + function createInverter(setter, toIteratee) { + return function(object, iteratee2) { + return baseInverter(object, setter, toIteratee(iteratee2), {}); + }; + } + function createMathOperation(operator, defaultValue) { + return function(value, other) { + var result2; + if (value === undefined2 && other === undefined2) { + return defaultValue; + } + if (value !== undefined2) { + result2 = value; + } + if (other !== undefined2) { + if (result2 === undefined2) { + return other; + } + if (typeof value == "string" || typeof other == "string") { + value = baseToString(value); + other = baseToString(other); + } else { + value = baseToNumber(value); + other = baseToNumber(other); + } + result2 = operator(value, other); + } + return result2; + }; + } + function createOver(arrayFunc) { + return flatRest(function(iteratees) { + iteratees = arrayMap(iteratees, baseUnary(getIteratee())); + return baseRest(function(args) { + var thisArg = this; + return arrayFunc(iteratees, function(iteratee2) { + return apply(iteratee2, thisArg, args); + }); + }); + }); + } + function createPadding(length, chars) { + chars = chars === undefined2 ? " " : baseToString(chars); + var charsLength = chars.length; + if (charsLength < 2) { + return charsLength ? baseRepeat(chars, length) : chars; + } + var result2 = baseRepeat(chars, nativeCeil(length / stringSize(chars))); + return hasUnicode(chars) ? castSlice(stringToArray(result2), 0, length).join("") : result2.slice(0, length); + } + function createPartial(func, bitmask, thisArg, partials) { + var isBind = bitmask & WRAP_BIND_FLAG, Ctor = createCtor(func); + function wrapper() { + var argsIndex = -1, argsLength = arguments.length, leftIndex = -1, leftLength = partials.length, args = Array2(leftLength + argsLength), fn = this && this !== root && this instanceof wrapper ? Ctor : func; + while (++leftIndex < leftLength) { + args[leftIndex] = partials[leftIndex]; + } + while (argsLength--) { + args[leftIndex++] = arguments[++argsIndex]; + } + return apply(fn, isBind ? thisArg : this, args); + } + return wrapper; + } + function createRange(fromRight) { + return function(start, end, step) { + if (step && typeof step != "number" && isIterateeCall(start, end, step)) { + end = step = undefined2; + } + start = toFinite(start); + if (end === undefined2) { + end = start; + start = 0; + } else { + end = toFinite(end); + } + step = step === undefined2 ? start < end ? 1 : -1 : toFinite(step); + return baseRange(start, end, step, fromRight); + }; + } + function createRelationalOperation(operator) { + return function(value, other) { + if (!(typeof value == "string" && typeof other == "string")) { + value = toNumber(value); + other = toNumber(other); + } + return operator(value, other); + }; + } + function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary2, arity) { + var isCurry = bitmask & WRAP_CURRY_FLAG, newHolders = isCurry ? holders : undefined2, newHoldersRight = isCurry ? undefined2 : holders, newPartials = isCurry ? partials : undefined2, newPartialsRight = isCurry ? undefined2 : partials; + bitmask |= isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG; + bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG); + if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) { + bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG); + } + var newData = [ + func, + bitmask, + thisArg, + newPartials, + newHolders, + newPartialsRight, + newHoldersRight, + argPos, + ary2, + arity + ]; + var result2 = wrapFunc.apply(undefined2, newData); + if (isLaziable(func)) { + setData(result2, newData); + } + result2.placeholder = placeholder; + return setWrapToString(result2, func, bitmask); + } + function createRound(methodName) { + var func = Math2[methodName]; + return function(number, precision) { + number = toNumber(number); + precision = precision == null ? 0 : nativeMin(toInteger(precision), 292); + if (precision && nativeIsFinite(number)) { + var pair = (toString(number) + "e").split("e"), value = func(pair[0] + "e" + (+pair[1] + precision)); + pair = (toString(value) + "e").split("e"); + return +(pair[0] + "e" + (+pair[1] - precision)); + } + return func(number); + }; + } + var createSet = !(Set2 && 1 / setToArray(new Set2([, -0]))[1] == INFINITY) ? noop : function(values2) { + return new Set2(values2); + }; + function createToPairs(keysFunc) { + return function(object) { + var tag = getTag(object); + if (tag == mapTag) { + return mapToArray(object); + } + if (tag == setTag) { + return setToPairs(object); + } + return baseToPairs(object, keysFunc(object)); + }; + } + function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary2, arity) { + var isBindKey = bitmask & WRAP_BIND_KEY_FLAG; + if (!isBindKey && typeof func != "function") { + throw new TypeError2(FUNC_ERROR_TEXT); + } + var length = partials ? partials.length : 0; + if (!length) { + bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG); + partials = holders = undefined2; + } + ary2 = ary2 === undefined2 ? ary2 : nativeMax(toInteger(ary2), 0); + arity = arity === undefined2 ? arity : toInteger(arity); + length -= holders ? holders.length : 0; + if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) { + var partialsRight = partials, holdersRight = holders; + partials = holders = undefined2; + } + var data = isBindKey ? undefined2 : getData(func); + var newData = [ + func, + bitmask, + thisArg, + partials, + holders, + partialsRight, + holdersRight, + argPos, + ary2, + arity + ]; + if (data) { + mergeData(newData, data); + } + func = newData[0]; + bitmask = newData[1]; + thisArg = newData[2]; + partials = newData[3]; + holders = newData[4]; + arity = newData[9] = newData[9] === undefined2 ? isBindKey ? 0 : func.length : nativeMax(newData[9] - length, 0); + if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) { + bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG); + } + if (!bitmask || bitmask == WRAP_BIND_FLAG) { + var result2 = createBind(func, bitmask, thisArg); + } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) { + result2 = createCurry(func, bitmask, arity); + } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) { + result2 = createPartial(func, bitmask, thisArg, partials); + } else { + result2 = createHybrid.apply(undefined2, newData); + } + var setter = data ? baseSetData : setData; + return setWrapToString(setter(result2, newData), func, bitmask); + } + function customDefaultsAssignIn(objValue, srcValue, key, object) { + if (objValue === undefined2 || eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key)) { + return srcValue; + } + return objValue; + } + function customDefaultsMerge(objValue, srcValue, key, object, source, stack) { + if (isObject(objValue) && isObject(srcValue)) { + stack.set(srcValue, objValue); + baseMerge(objValue, srcValue, undefined2, customDefaultsMerge, stack); + stack["delete"](srcValue); + } + return objValue; + } + function customOmitClone(value) { + return isPlainObject(value) ? undefined2 : value; + } + function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, arrLength = array.length, othLength = other.length; + if (arrLength != othLength && !(isPartial && othLength > arrLength)) { + return false; + } + var arrStacked = stack.get(array); + var othStacked = stack.get(other); + if (arrStacked && othStacked) { + return arrStacked == other && othStacked == array; + } + var index = -1, result2 = true, seen = bitmask & COMPARE_UNORDERED_FLAG ? new SetCache() : undefined2; + stack.set(array, other); + stack.set(other, array); + while (++index < arrLength) { + var arrValue = array[index], othValue = other[index]; + if (customizer) { + var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack); + } + if (compared !== undefined2) { + if (compared) { + continue; + } + result2 = false; + break; + } + if (seen) { + if (!arraySome(other, function(othValue2, othIndex) { + if (!cacheHas(seen, othIndex) && (arrValue === othValue2 || equalFunc(arrValue, othValue2, bitmask, customizer, stack))) { + return seen.push(othIndex); + } + })) { + result2 = false; + break; + } + } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { + result2 = false; + break; + } + } + stack["delete"](array); + stack["delete"](other); + return result2; + } + function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { + switch (tag) { + case dataViewTag: + if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) { + return false; + } + object = object.buffer; + other = other.buffer; + case arrayBufferTag: + if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array2(object), new Uint8Array2(other))) { + return false; + } + return true; + case boolTag: + case dateTag: + case numberTag: + return eq(+object, +other); + case errorTag: + return object.name == other.name && object.message == other.message; + case regexpTag: + case stringTag: + return object == other + ""; + case mapTag: + var convert2 = mapToArray; + case setTag: + var isPartial = bitmask & COMPARE_PARTIAL_FLAG; + convert2 || (convert2 = setToArray); + if (object.size != other.size && !isPartial) { + return false; + } + var stacked = stack.get(object); + if (stacked) { + return stacked == other; + } + bitmask |= COMPARE_UNORDERED_FLAG; + stack.set(object, other); + var result2 = equalArrays(convert2(object), convert2(other), bitmask, customizer, equalFunc, stack); + stack["delete"](object); + return result2; + case symbolTag: + if (symbolValueOf) { + return symbolValueOf.call(object) == symbolValueOf.call(other); + } + } + return false; + } + function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, objProps = getAllKeys(object), objLength = objProps.length, othProps = getAllKeys(other), othLength = othProps.length; + if (objLength != othLength && !isPartial) { + return false; + } + var index = objLength; + while (index--) { + var key = objProps[index]; + if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { + return false; + } + } + var objStacked = stack.get(object); + var othStacked = stack.get(other); + if (objStacked && othStacked) { + return objStacked == other && othStacked == object; + } + var result2 = true; + stack.set(object, other); + stack.set(other, object); + var skipCtor = isPartial; + while (++index < objLength) { + key = objProps[index]; + var objValue = object[key], othValue = other[key]; + if (customizer) { + var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack); + } + if (!(compared === undefined2 ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) : compared)) { + result2 = false; + break; + } + skipCtor || (skipCtor = key == "constructor"); + } + if (result2 && !skipCtor) { + var objCtor = object.constructor, othCtor = other.constructor; + if (objCtor != othCtor && ("constructor" in object && "constructor" in other) && !(typeof objCtor == "function" && objCtor instanceof objCtor && typeof othCtor == "function" && othCtor instanceof othCtor)) { + result2 = false; + } + } + stack["delete"](object); + stack["delete"](other); + return result2; + } + function flatRest(func) { + return setToString(overRest(func, undefined2, flatten), func + ""); + } + function getAllKeys(object) { + return baseGetAllKeys(object, keys, getSymbols); + } + function getAllKeysIn(object) { + return baseGetAllKeys(object, keysIn, getSymbolsIn); + } + var getData = !metaMap ? noop : function(func) { + return metaMap.get(func); + }; + function getFuncName(func) { + var result2 = func.name + "", array = realNames[result2], length = hasOwnProperty.call(realNames, result2) ? array.length : 0; + while (length--) { + var data = array[length], otherFunc = data.func; + if (otherFunc == null || otherFunc == func) { + return data.name; + } + } + return result2; + } + function getHolder(func) { + var object = hasOwnProperty.call(lodash, "placeholder") ? lodash : func; + return object.placeholder; + } + function getIteratee() { + var result2 = lodash.iteratee || iteratee; + result2 = result2 === iteratee ? baseIteratee : result2; + return arguments.length ? result2(arguments[0], arguments[1]) : result2; + } + function getMapData(map2, key) { + var data = map2.__data__; + return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map; + } + function getMatchData(object) { + var result2 = keys(object), length = result2.length; + while (length--) { + var key = result2[length], value = object[key]; + result2[length] = [key, value, isStrictComparable(value)]; + } + return result2; + } + function getNative(object, key) { + var value = getValue(object, key); + return baseIsNative(value) ? value : undefined2; + } + function getRawTag(value) { + var isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag]; + try { + value[symToStringTag] = undefined2; + var unmasked = true; + } catch (e) { + } + var result2 = nativeObjectToString.call(value); + if (unmasked) { + if (isOwn) { + value[symToStringTag] = tag; + } else { + delete value[symToStringTag]; + } + } + return result2; + } + var getSymbols = !nativeGetSymbols ? stubArray : function(object) { + if (object == null) { + return []; + } + object = Object2(object); + return arrayFilter(nativeGetSymbols(object), function(symbol) { + return propertyIsEnumerable.call(object, symbol); + }); + }; + var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) { + var result2 = []; + while (object) { + arrayPush(result2, getSymbols(object)); + object = getPrototype(object); + } + return result2; + }; + var getTag = baseGetTag; + if (DataView2 && getTag(new DataView2(new ArrayBuffer(1))) != dataViewTag || Map2 && getTag(new Map2()) != mapTag || Promise2 && getTag(Promise2.resolve()) != promiseTag || Set2 && getTag(new Set2()) != setTag || WeakMap2 && getTag(new WeakMap2()) != weakMapTag) { + getTag = function(value) { + var result2 = baseGetTag(value), Ctor = result2 == objectTag ? value.constructor : undefined2, ctorString = Ctor ? toSource(Ctor) : ""; + if (ctorString) { + switch (ctorString) { + case dataViewCtorString: + return dataViewTag; + case mapCtorString: + return mapTag; + case promiseCtorString: + return promiseTag; + case setCtorString: + return setTag; + case weakMapCtorString: + return weakMapTag; + } + } + return result2; + }; + } + function getView(start, end, transforms) { + var index = -1, length = transforms.length; + while (++index < length) { + var data = transforms[index], size2 = data.size; + switch (data.type) { + case "drop": + start += size2; + break; + case "dropRight": + end -= size2; + break; + case "take": + end = nativeMin(end, start + size2); + break; + case "takeRight": + start = nativeMax(start, end - size2); + break; + } + } + return { "start": start, "end": end }; + } + function getWrapDetails(source) { + var match = source.match(reWrapDetails); + return match ? match[1].split(reSplitDetails) : []; + } + function hasPath(object, path, hasFunc) { + path = castPath(path, object); + var index = -1, length = path.length, result2 = false; + while (++index < length) { + var key = toKey(path[index]); + if (!(result2 = object != null && hasFunc(object, key))) { + break; + } + object = object[key]; + } + if (result2 || ++index != length) { + return result2; + } + length = object == null ? 0 : object.length; + return !!length && isLength(length) && isIndex(key, length) && (isArray(object) || isArguments(object)); + } + function initCloneArray(array) { + var length = array.length, result2 = new array.constructor(length); + if (length && typeof array[0] == "string" && hasOwnProperty.call(array, "index")) { + result2.index = array.index; + result2.input = array.input; + } + return result2; + } + function initCloneObject(object) { + return typeof object.constructor == "function" && !isPrototype(object) ? baseCreate(getPrototype(object)) : {}; + } + function initCloneByTag(object, tag, isDeep) { + var Ctor = object.constructor; + switch (tag) { + case arrayBufferTag: + return cloneArrayBuffer(object); + case boolTag: + case dateTag: + return new Ctor(+object); + case dataViewTag: + return cloneDataView(object, isDeep); + case float32Tag: + case float64Tag: + case int8Tag: + case int16Tag: + case int32Tag: + case uint8Tag: + case uint8ClampedTag: + case uint16Tag: + case uint32Tag: + return cloneTypedArray(object, isDeep); + case mapTag: + return new Ctor(); + case numberTag: + case stringTag: + return new Ctor(object); + case regexpTag: + return cloneRegExp(object); + case setTag: + return new Ctor(); + case symbolTag: + return cloneSymbol(object); + } + } + function insertWrapDetails(source, details) { + var length = details.length; + if (!length) { + return source; + } + var lastIndex = length - 1; + details[lastIndex] = (length > 1 ? "& " : "") + details[lastIndex]; + details = details.join(length > 2 ? ", " : " "); + return source.replace(reWrapComment, "{\n/* [wrapped with " + details + "] */\n"); + } + function isFlattenable(value) { + return isArray(value) || isArguments(value) || !!(spreadableSymbol && value && value[spreadableSymbol]); + } + function isIndex(value, length) { + var type = typeof value; + length = length == null ? MAX_SAFE_INTEGER : length; + return !!length && (type == "number" || type != "symbol" && reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length); + } + function isIterateeCall(value, index, object) { + if (!isObject(object)) { + return false; + } + var type = typeof index; + if (type == "number" ? isArrayLike(object) && isIndex(index, object.length) : type == "string" && index in object) { + return eq(object[index], value); + } + return false; + } + function isKey(value, object) { + if (isArray(value)) { + return false; + } + var type = typeof value; + if (type == "number" || type == "symbol" || type == "boolean" || value == null || isSymbol(value)) { + return true; + } + return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object2(object); + } + function isKeyable(value) { + var type = typeof value; + return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null; + } + function isLaziable(func) { + var funcName = getFuncName(func), other = lodash[funcName]; + if (typeof other != "function" || !(funcName in LazyWrapper.prototype)) { + return false; + } + if (func === other) { + return true; + } + var data = getData(other); + return !!data && func === data[0]; + } + function isMasked(func) { + return !!maskSrcKey && maskSrcKey in func; + } + var isMaskable = coreJsData ? isFunction : stubFalse; + function isPrototype(value) { + var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto; + return value === proto; + } + function isStrictComparable(value) { + return value === value && !isObject(value); + } + function matchesStrictComparable(key, srcValue) { + return function(object) { + if (object == null) { + return false; + } + return object[key] === srcValue && (srcValue !== undefined2 || key in Object2(object)); + }; + } + function memoizeCapped(func) { + var result2 = memoize(func, function(key) { + if (cache.size === MAX_MEMOIZE_SIZE) { + cache.clear(); + } + return key; + }); + var cache = result2.cache; + return result2; + } + function mergeData(data, source) { + var bitmask = data[1], srcBitmask = source[1], newBitmask = bitmask | srcBitmask, isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG); + var isCombo = srcBitmask == WRAP_ARY_FLAG && bitmask == WRAP_CURRY_FLAG || srcBitmask == WRAP_ARY_FLAG && bitmask == WRAP_REARG_FLAG && data[7].length <= source[8] || srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG) && source[7].length <= source[8] && bitmask == WRAP_CURRY_FLAG; + if (!(isCommon || isCombo)) { + return data; + } + if (srcBitmask & WRAP_BIND_FLAG) { + data[2] = source[2]; + newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG; + } + var value = source[3]; + if (value) { + var partials = data[3]; + data[3] = partials ? composeArgs(partials, value, source[4]) : value; + data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4]; + } + value = source[5]; + if (value) { + partials = data[5]; + data[5] = partials ? composeArgsRight(partials, value, source[6]) : value; + data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6]; + } + value = source[7]; + if (value) { + data[7] = value; + } + if (srcBitmask & WRAP_ARY_FLAG) { + data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]); + } + if (data[9] == null) { + data[9] = source[9]; + } + data[0] = source[0]; + data[1] = newBitmask; + return data; + } + function nativeKeysIn(object) { + var result2 = []; + if (object != null) { + for (var key in Object2(object)) { + result2.push(key); + } + } + return result2; + } + function objectToString(value) { + return nativeObjectToString.call(value); + } + function overRest(func, start, transform2) { + start = nativeMax(start === undefined2 ? func.length - 1 : start, 0); + return function() { + var args = arguments, index = -1, length = nativeMax(args.length - start, 0), array = Array2(length); + while (++index < length) { + array[index] = args[start + index]; + } + index = -1; + var otherArgs = Array2(start + 1); + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = transform2(array); + return apply(func, this, otherArgs); + }; + } + function parent(object, path) { + return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1)); + } + function reorder(array, indexes) { + var arrLength = array.length, length = nativeMin(indexes.length, arrLength), oldArray = copyArray(array); + while (length--) { + var index = indexes[length]; + array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined2; + } + return array; + } + function safeGet(object, key) { + if (key === "constructor" && typeof object[key] === "function") { + return; + } + if (key == "__proto__") { + return; + } + return object[key]; + } + var setData = shortOut(baseSetData); + var setTimeout2 = ctxSetTimeout || function(func, wait) { + return root.setTimeout(func, wait); + }; + var setToString = shortOut(baseSetToString); + function setWrapToString(wrapper, reference, bitmask) { + var source = reference + ""; + return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask))); + } + function shortOut(func) { + var count = 0, lastCalled = 0; + return function() { + var stamp = nativeNow(), remaining = HOT_SPAN - (stamp - lastCalled); + lastCalled = stamp; + if (remaining > 0) { + if (++count >= HOT_COUNT) { + return arguments[0]; + } + } else { + count = 0; + } + return func.apply(undefined2, arguments); + }; + } + function shuffleSelf(array, size2) { + var index = -1, length = array.length, lastIndex = length - 1; + size2 = size2 === undefined2 ? length : size2; + while (++index < size2) { + var rand = baseRandom(index, lastIndex), value = array[rand]; + array[rand] = array[index]; + array[index] = value; + } + array.length = size2; + return array; + } + var stringToPath = memoizeCapped(function(string) { + var result2 = []; + if (string.charCodeAt(0) === 46) { + result2.push(""); + } + string.replace(rePropName, function(match, number, quote, subString) { + result2.push(quote ? subString.replace(reEscapeChar, "$1") : number || match); + }); + return result2; + }); + function toKey(value) { + if (typeof value == "string" || isSymbol(value)) { + return value; + } + var result2 = value + ""; + return result2 == "0" && 1 / value == -INFINITY ? "-0" : result2; + } + function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch (e) { + } + try { + return func + ""; + } catch (e) { + } + } + return ""; + } + function updateWrapDetails(details, bitmask) { + arrayEach(wrapFlags, function(pair) { + var value = "_." + pair[0]; + if (bitmask & pair[1] && !arrayIncludes(details, value)) { + details.push(value); + } + }); + return details.sort(); + } + function wrapperClone(wrapper) { + if (wrapper instanceof LazyWrapper) { + return wrapper.clone(); + } + var result2 = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__); + result2.__actions__ = copyArray(wrapper.__actions__); + result2.__index__ = wrapper.__index__; + result2.__values__ = wrapper.__values__; + return result2; + } + function chunk(array, size2, guard) { + if (guard ? isIterateeCall(array, size2, guard) : size2 === undefined2) { + size2 = 1; + } else { + size2 = nativeMax(toInteger(size2), 0); + } + var length = array == null ? 0 : array.length; + if (!length || size2 < 1) { + return []; + } + var index = 0, resIndex = 0, result2 = Array2(nativeCeil(length / size2)); + while (index < length) { + result2[resIndex++] = baseSlice(array, index, index += size2); + } + return result2; + } + function compact(array) { + var index = -1, length = array == null ? 0 : array.length, resIndex = 0, result2 = []; + while (++index < length) { + var value = array[index]; + if (value) { + result2[resIndex++] = value; + } + } + return result2; + } + function concat() { + var length = arguments.length; + if (!length) { + return []; + } + var args = Array2(length - 1), array = arguments[0], index = length; + while (index--) { + args[index - 1] = arguments[index]; + } + return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1)); + } + var difference = baseRest(function(array, values2) { + return isArrayLikeObject(array) ? baseDifference(array, baseFlatten(values2, 1, isArrayLikeObject, true)) : []; + }); + var differenceBy = baseRest(function(array, values2) { + var iteratee2 = last(values2); + if (isArrayLikeObject(iteratee2)) { + iteratee2 = undefined2; + } + return isArrayLikeObject(array) ? baseDifference(array, baseFlatten(values2, 1, isArrayLikeObject, true), getIteratee(iteratee2, 2)) : []; + }); + var differenceWith = baseRest(function(array, values2) { + var comparator = last(values2); + if (isArrayLikeObject(comparator)) { + comparator = undefined2; + } + return isArrayLikeObject(array) ? baseDifference(array, baseFlatten(values2, 1, isArrayLikeObject, true), undefined2, comparator) : []; + }); + function drop(array, n, guard) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + n = guard || n === undefined2 ? 1 : toInteger(n); + return baseSlice(array, n < 0 ? 0 : n, length); + } + function dropRight(array, n, guard) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + n = guard || n === undefined2 ? 1 : toInteger(n); + n = length - n; + return baseSlice(array, 0, n < 0 ? 0 : n); + } + function dropRightWhile(array, predicate) { + return array && array.length ? baseWhile(array, getIteratee(predicate, 3), true, true) : []; + } + function dropWhile(array, predicate) { + return array && array.length ? baseWhile(array, getIteratee(predicate, 3), true) : []; + } + function fill(array, value, start, end) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + if (start && typeof start != "number" && isIterateeCall(array, value, start)) { + start = 0; + end = length; + } + return baseFill(array, value, start, end); + } + function findIndex(array, predicate, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = fromIndex == null ? 0 : toInteger(fromIndex); + if (index < 0) { + index = nativeMax(length + index, 0); + } + return baseFindIndex(array, getIteratee(predicate, 3), index); + } + function findLastIndex(array, predicate, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = length - 1; + if (fromIndex !== undefined2) { + index = toInteger(fromIndex); + index = fromIndex < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1); + } + return baseFindIndex(array, getIteratee(predicate, 3), index, true); + } + function flatten(array) { + var length = array == null ? 0 : array.length; + return length ? baseFlatten(array, 1) : []; + } + function flattenDeep(array) { + var length = array == null ? 0 : array.length; + return length ? baseFlatten(array, INFINITY) : []; + } + function flattenDepth(array, depth) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + depth = depth === undefined2 ? 1 : toInteger(depth); + return baseFlatten(array, depth); + } + function fromPairs(pairs) { + var index = -1, length = pairs == null ? 0 : pairs.length, result2 = {}; + while (++index < length) { + var pair = pairs[index]; + result2[pair[0]] = pair[1]; + } + return result2; + } + function head(array) { + return array && array.length ? array[0] : undefined2; + } + function indexOf(array, value, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = fromIndex == null ? 0 : toInteger(fromIndex); + if (index < 0) { + index = nativeMax(length + index, 0); + } + return baseIndexOf(array, value, index); + } + function initial(array) { + var length = array == null ? 0 : array.length; + return length ? baseSlice(array, 0, -1) : []; + } + var intersection = baseRest(function(arrays) { + var mapped = arrayMap(arrays, castArrayLikeObject); + return mapped.length && mapped[0] === arrays[0] ? baseIntersection(mapped) : []; + }); + var intersectionBy = baseRest(function(arrays) { + var iteratee2 = last(arrays), mapped = arrayMap(arrays, castArrayLikeObject); + if (iteratee2 === last(mapped)) { + iteratee2 = undefined2; + } else { + mapped.pop(); + } + return mapped.length && mapped[0] === arrays[0] ? baseIntersection(mapped, getIteratee(iteratee2, 2)) : []; + }); + var intersectionWith = baseRest(function(arrays) { + var comparator = last(arrays), mapped = arrayMap(arrays, castArrayLikeObject); + comparator = typeof comparator == "function" ? comparator : undefined2; + if (comparator) { + mapped.pop(); + } + return mapped.length && mapped[0] === arrays[0] ? baseIntersection(mapped, undefined2, comparator) : []; + }); + function join(array, separator) { + return array == null ? "" : nativeJoin.call(array, separator); + } + function last(array) { + var length = array == null ? 0 : array.length; + return length ? array[length - 1] : undefined2; + } + function lastIndexOf(array, value, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = length; + if (fromIndex !== undefined2) { + index = toInteger(fromIndex); + index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1); + } + return value === value ? strictLastIndexOf(array, value, index) : baseFindIndex(array, baseIsNaN, index, true); + } + function nth(array, n) { + return array && array.length ? baseNth(array, toInteger(n)) : undefined2; + } + var pull = baseRest(pullAll); + function pullAll(array, values2) { + return array && array.length && values2 && values2.length ? basePullAll(array, values2) : array; + } + function pullAllBy(array, values2, iteratee2) { + return array && array.length && values2 && values2.length ? basePullAll(array, values2, getIteratee(iteratee2, 2)) : array; + } + function pullAllWith(array, values2, comparator) { + return array && array.length && values2 && values2.length ? basePullAll(array, values2, undefined2, comparator) : array; + } + var pullAt = flatRest(function(array, indexes) { + var length = array == null ? 0 : array.length, result2 = baseAt(array, indexes); + basePullAt(array, arrayMap(indexes, function(index) { + return isIndex(index, length) ? +index : index; + }).sort(compareAscending)); + return result2; + }); + function remove(array, predicate) { + var result2 = []; + if (!(array && array.length)) { + return result2; + } + var index = -1, indexes = [], length = array.length; + predicate = getIteratee(predicate, 3); + while (++index < length) { + var value = array[index]; + if (predicate(value, index, array)) { + result2.push(value); + indexes.push(index); + } + } + basePullAt(array, indexes); + return result2; + } + function reverse(array) { + return array == null ? array : nativeReverse.call(array); + } + function slice(array, start, end) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + if (end && typeof end != "number" && isIterateeCall(array, start, end)) { + start = 0; + end = length; + } else { + start = start == null ? 0 : toInteger(start); + end = end === undefined2 ? length : toInteger(end); + } + return baseSlice(array, start, end); + } + function sortedIndex(array, value) { + return baseSortedIndex(array, value); + } + function sortedIndexBy(array, value, iteratee2) { + return baseSortedIndexBy(array, value, getIteratee(iteratee2, 2)); + } + function sortedIndexOf(array, value) { + var length = array == null ? 0 : array.length; + if (length) { + var index = baseSortedIndex(array, value); + if (index < length && eq(array[index], value)) { + return index; + } + } + return -1; + } + function sortedLastIndex(array, value) { + return baseSortedIndex(array, value, true); + } + function sortedLastIndexBy(array, value, iteratee2) { + return baseSortedIndexBy(array, value, getIteratee(iteratee2, 2), true); + } + function sortedLastIndexOf(array, value) { + var length = array == null ? 0 : array.length; + if (length) { + var index = baseSortedIndex(array, value, true) - 1; + if (eq(array[index], value)) { + return index; + } + } + return -1; + } + function sortedUniq(array) { + return array && array.length ? baseSortedUniq(array) : []; + } + function sortedUniqBy(array, iteratee2) { + return array && array.length ? baseSortedUniq(array, getIteratee(iteratee2, 2)) : []; + } + function tail(array) { + var length = array == null ? 0 : array.length; + return length ? baseSlice(array, 1, length) : []; + } + function take(array, n, guard) { + if (!(array && array.length)) { + return []; + } + n = guard || n === undefined2 ? 1 : toInteger(n); + return baseSlice(array, 0, n < 0 ? 0 : n); + } + function takeRight(array, n, guard) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + n = guard || n === undefined2 ? 1 : toInteger(n); + n = length - n; + return baseSlice(array, n < 0 ? 0 : n, length); + } + function takeRightWhile(array, predicate) { + return array && array.length ? baseWhile(array, getIteratee(predicate, 3), false, true) : []; + } + function takeWhile(array, predicate) { + return array && array.length ? baseWhile(array, getIteratee(predicate, 3)) : []; + } + var union = baseRest(function(arrays) { + return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true)); + }); + var unionBy = baseRest(function(arrays) { + var iteratee2 = last(arrays); + if (isArrayLikeObject(iteratee2)) { + iteratee2 = undefined2; + } + return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee2, 2)); + }); + var unionWith = baseRest(function(arrays) { + var comparator = last(arrays); + comparator = typeof comparator == "function" ? comparator : undefined2; + return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined2, comparator); + }); + function uniq(array) { + return array && array.length ? baseUniq(array) : []; + } + function uniqBy(array, iteratee2) { + return array && array.length ? baseUniq(array, getIteratee(iteratee2, 2)) : []; + } + function uniqWith(array, comparator) { + comparator = typeof comparator == "function" ? comparator : undefined2; + return array && array.length ? baseUniq(array, undefined2, comparator) : []; + } + function unzip(array) { + if (!(array && array.length)) { + return []; + } + var length = 0; + array = arrayFilter(array, function(group) { + if (isArrayLikeObject(group)) { + length = nativeMax(group.length, length); + return true; + } + }); + return baseTimes(length, function(index) { + return arrayMap(array, baseProperty(index)); + }); + } + function unzipWith(array, iteratee2) { + if (!(array && array.length)) { + return []; + } + var result2 = unzip(array); + if (iteratee2 == null) { + return result2; + } + return arrayMap(result2, function(group) { + return apply(iteratee2, undefined2, group); + }); + } + var without = baseRest(function(array, values2) { + return isArrayLikeObject(array) ? baseDifference(array, values2) : []; + }); + var xor = baseRest(function(arrays) { + return baseXor(arrayFilter(arrays, isArrayLikeObject)); + }); + var xorBy = baseRest(function(arrays) { + var iteratee2 = last(arrays); + if (isArrayLikeObject(iteratee2)) { + iteratee2 = undefined2; + } + return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee2, 2)); + }); + var xorWith = baseRest(function(arrays) { + var comparator = last(arrays); + comparator = typeof comparator == "function" ? comparator : undefined2; + return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined2, comparator); + }); + var zip = baseRest(unzip); + function zipObject(props, values2) { + return baseZipObject(props || [], values2 || [], assignValue); + } + function zipObjectDeep(props, values2) { + return baseZipObject(props || [], values2 || [], baseSet); + } + var zipWith = baseRest(function(arrays) { + var length = arrays.length, iteratee2 = length > 1 ? arrays[length - 1] : undefined2; + iteratee2 = typeof iteratee2 == "function" ? (arrays.pop(), iteratee2) : undefined2; + return unzipWith(arrays, iteratee2); + }); + function chain(value) { + var result2 = lodash(value); + result2.__chain__ = true; + return result2; + } + function tap(value, interceptor) { + interceptor(value); + return value; + } + function thru(value, interceptor) { + return interceptor(value); + } + var wrapperAt = flatRest(function(paths) { + var length = paths.length, start = length ? paths[0] : 0, value = this.__wrapped__, interceptor = function(object) { + return baseAt(object, paths); + }; + if (length > 1 || this.__actions__.length || !(value instanceof LazyWrapper) || !isIndex(start)) { + return this.thru(interceptor); + } + value = value.slice(start, +start + (length ? 1 : 0)); + value.__actions__.push({ + "func": thru, + "args": [interceptor], + "thisArg": undefined2 + }); + return new LodashWrapper(value, this.__chain__).thru(function(array) { + if (length && !array.length) { + array.push(undefined2); + } + return array; + }); + }); + function wrapperChain() { + return chain(this); + } + function wrapperCommit() { + return new LodashWrapper(this.value(), this.__chain__); + } + function wrapperNext() { + if (this.__values__ === undefined2) { + this.__values__ = toArray2(this.value()); + } + var done = this.__index__ >= this.__values__.length, value = done ? undefined2 : this.__values__[this.__index__++]; + return { "done": done, "value": value }; + } + function wrapperToIterator() { + return this; + } + function wrapperPlant(value) { + var result2, parent2 = this; + while (parent2 instanceof baseLodash) { + var clone2 = wrapperClone(parent2); + clone2.__index__ = 0; + clone2.__values__ = undefined2; + if (result2) { + previous.__wrapped__ = clone2; + } else { + result2 = clone2; + } + var previous = clone2; + parent2 = parent2.__wrapped__; + } + previous.__wrapped__ = value; + return result2; + } + function wrapperReverse() { + var value = this.__wrapped__; + if (value instanceof LazyWrapper) { + var wrapped = value; + if (this.__actions__.length) { + wrapped = new LazyWrapper(this); + } + wrapped = wrapped.reverse(); + wrapped.__actions__.push({ + "func": thru, + "args": [reverse], + "thisArg": undefined2 + }); + return new LodashWrapper(wrapped, this.__chain__); + } + return this.thru(reverse); + } + function wrapperValue() { + return baseWrapperValue(this.__wrapped__, this.__actions__); + } + var countBy = createAggregator(function(result2, value, key) { + if (hasOwnProperty.call(result2, key)) { + ++result2[key]; + } else { + baseAssignValue(result2, key, 1); + } + }); + function every(collection, predicate, guard) { + var func = isArray(collection) ? arrayEvery : baseEvery; + if (guard && isIterateeCall(collection, predicate, guard)) { + predicate = undefined2; + } + return func(collection, getIteratee(predicate, 3)); + } + function filter(collection, predicate) { + var func = isArray(collection) ? arrayFilter : baseFilter; + return func(collection, getIteratee(predicate, 3)); + } + var find = createFind(findIndex); + var findLast = createFind(findLastIndex); + function flatMap(collection, iteratee2) { + return baseFlatten(map(collection, iteratee2), 1); + } + function flatMapDeep(collection, iteratee2) { + return baseFlatten(map(collection, iteratee2), INFINITY); + } + function flatMapDepth(collection, iteratee2, depth) { + depth = depth === undefined2 ? 1 : toInteger(depth); + return baseFlatten(map(collection, iteratee2), depth); + } + function forEach(collection, iteratee2) { + var func = isArray(collection) ? arrayEach : baseEach; + return func(collection, getIteratee(iteratee2, 3)); + } + function forEachRight(collection, iteratee2) { + var func = isArray(collection) ? arrayEachRight : baseEachRight; + return func(collection, getIteratee(iteratee2, 3)); + } + var groupBy = createAggregator(function(result2, value, key) { + if (hasOwnProperty.call(result2, key)) { + result2[key].push(value); + } else { + baseAssignValue(result2, key, [value]); + } + }); + function includes(collection, value, fromIndex, guard) { + collection = isArrayLike(collection) ? collection : values(collection); + fromIndex = fromIndex && !guard ? toInteger(fromIndex) : 0; + var length = collection.length; + if (fromIndex < 0) { + fromIndex = nativeMax(length + fromIndex, 0); + } + return isString(collection) ? fromIndex <= length && collection.indexOf(value, fromIndex) > -1 : !!length && baseIndexOf(collection, value, fromIndex) > -1; + } + var invokeMap = baseRest(function(collection, path, args) { + var index = -1, isFunc = typeof path == "function", result2 = isArrayLike(collection) ? Array2(collection.length) : []; + baseEach(collection, function(value) { + result2[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args); + }); + return result2; + }); + var keyBy = createAggregator(function(result2, value, key) { + baseAssignValue(result2, key, value); + }); + function map(collection, iteratee2) { + var func = isArray(collection) ? arrayMap : baseMap; + return func(collection, getIteratee(iteratee2, 3)); + } + function orderBy(collection, iteratees, orders, guard) { + if (collection == null) { + return []; + } + if (!isArray(iteratees)) { + iteratees = iteratees == null ? [] : [iteratees]; + } + orders = guard ? undefined2 : orders; + if (!isArray(orders)) { + orders = orders == null ? [] : [orders]; + } + return baseOrderBy(collection, iteratees, orders); + } + var partition = createAggregator(function(result2, value, key) { + result2[key ? 0 : 1].push(value); + }, function() { + return [[], []]; + }); + function reduce(collection, iteratee2, accumulator) { + var func = isArray(collection) ? arrayReduce : baseReduce, initAccum = arguments.length < 3; + return func(collection, getIteratee(iteratee2, 4), accumulator, initAccum, baseEach); + } + function reduceRight(collection, iteratee2, accumulator) { + var func = isArray(collection) ? arrayReduceRight : baseReduce, initAccum = arguments.length < 3; + return func(collection, getIteratee(iteratee2, 4), accumulator, initAccum, baseEachRight); + } + function reject(collection, predicate) { + var func = isArray(collection) ? arrayFilter : baseFilter; + return func(collection, negate(getIteratee(predicate, 3))); + } + function sample(collection) { + var func = isArray(collection) ? arraySample : baseSample; + return func(collection); + } + function sampleSize(collection, n, guard) { + if (guard ? isIterateeCall(collection, n, guard) : n === undefined2) { + n = 1; + } else { + n = toInteger(n); + } + var func = isArray(collection) ? arraySampleSize : baseSampleSize; + return func(collection, n); + } + function shuffle(collection) { + var func = isArray(collection) ? arrayShuffle : baseShuffle; + return func(collection); + } + function size(collection) { + if (collection == null) { + return 0; + } + if (isArrayLike(collection)) { + return isString(collection) ? stringSize(collection) : collection.length; + } + var tag = getTag(collection); + if (tag == mapTag || tag == setTag) { + return collection.size; + } + return baseKeys(collection).length; + } + function some(collection, predicate, guard) { + var func = isArray(collection) ? arraySome : baseSome; + if (guard && isIterateeCall(collection, predicate, guard)) { + predicate = undefined2; + } + return func(collection, getIteratee(predicate, 3)); + } + var sortBy = baseRest(function(collection, iteratees) { + if (collection == null) { + return []; + } + var length = iteratees.length; + if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) { + iteratees = []; + } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) { + iteratees = [iteratees[0]]; + } + return baseOrderBy(collection, baseFlatten(iteratees, 1), []); + }); + var now = ctxNow || function() { + return root.Date.now(); + }; + function after(n, func) { + if (typeof func != "function") { + throw new TypeError2(FUNC_ERROR_TEXT); + } + n = toInteger(n); + return function() { + if (--n < 1) { + return func.apply(this, arguments); + } + }; + } + function ary(func, n, guard) { + n = guard ? undefined2 : n; + n = func && n == null ? func.length : n; + return createWrap(func, WRAP_ARY_FLAG, undefined2, undefined2, undefined2, undefined2, n); + } + function before(n, func) { + var result2; + if (typeof func != "function") { + throw new TypeError2(FUNC_ERROR_TEXT); + } + n = toInteger(n); + return function() { + if (--n > 0) { + result2 = func.apply(this, arguments); + } + if (n <= 1) { + func = undefined2; + } + return result2; + }; + } + var bind = baseRest(function(func, thisArg, partials) { + var bitmask = WRAP_BIND_FLAG; + if (partials.length) { + var holders = replaceHolders(partials, getHolder(bind)); + bitmask |= WRAP_PARTIAL_FLAG; + } + return createWrap(func, bitmask, thisArg, partials, holders); + }); + var bindKey = baseRest(function(object, key, partials) { + var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG; + if (partials.length) { + var holders = replaceHolders(partials, getHolder(bindKey)); + bitmask |= WRAP_PARTIAL_FLAG; + } + return createWrap(key, bitmask, object, partials, holders); + }); + function curry(func, arity, guard) { + arity = guard ? undefined2 : arity; + var result2 = createWrap(func, WRAP_CURRY_FLAG, undefined2, undefined2, undefined2, undefined2, undefined2, arity); + result2.placeholder = curry.placeholder; + return result2; + } + function curryRight(func, arity, guard) { + arity = guard ? undefined2 : arity; + var result2 = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined2, undefined2, undefined2, undefined2, undefined2, arity); + result2.placeholder = curryRight.placeholder; + return result2; + } + function debounce(func, wait, options) { + var lastArgs, lastThis, maxWait, result2, timerId, lastCallTime, lastInvokeTime = 0, leading = false, maxing = false, trailing = true; + if (typeof func != "function") { + throw new TypeError2(FUNC_ERROR_TEXT); + } + wait = toNumber(wait) || 0; + if (isObject(options)) { + leading = !!options.leading; + maxing = "maxWait" in options; + maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait; + trailing = "trailing" in options ? !!options.trailing : trailing; + } + function invokeFunc(time) { + var args = lastArgs, thisArg = lastThis; + lastArgs = lastThis = undefined2; + lastInvokeTime = time; + result2 = func.apply(thisArg, args); + return result2; + } + function leadingEdge(time) { + lastInvokeTime = time; + timerId = setTimeout2(timerExpired, wait); + return leading ? invokeFunc(time) : result2; + } + function remainingWait(time) { + var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime, timeWaiting = wait - timeSinceLastCall; + return maxing ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) : timeWaiting; + } + function shouldInvoke(time) { + var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime; + return lastCallTime === undefined2 || timeSinceLastCall >= wait || timeSinceLastCall < 0 || maxing && timeSinceLastInvoke >= maxWait; + } + function timerExpired() { + var time = now(); + if (shouldInvoke(time)) { + return trailingEdge(time); + } + timerId = setTimeout2(timerExpired, remainingWait(time)); + } + function trailingEdge(time) { + timerId = undefined2; + if (trailing && lastArgs) { + return invokeFunc(time); + } + lastArgs = lastThis = undefined2; + return result2; + } + function cancel() { + if (timerId !== undefined2) { + clearTimeout2(timerId); + } + lastInvokeTime = 0; + lastArgs = lastCallTime = lastThis = timerId = undefined2; + } + function flush() { + return timerId === undefined2 ? result2 : trailingEdge(now()); + } + function debounced() { + var time = now(), isInvoking = shouldInvoke(time); + lastArgs = arguments; + lastThis = this; + lastCallTime = time; + if (isInvoking) { + if (timerId === undefined2) { + return leadingEdge(lastCallTime); + } + if (maxing) { + clearTimeout2(timerId); + timerId = setTimeout2(timerExpired, wait); + return invokeFunc(lastCallTime); + } + } + if (timerId === undefined2) { + timerId = setTimeout2(timerExpired, wait); + } + return result2; + } + debounced.cancel = cancel; + debounced.flush = flush; + return debounced; + } + var defer = baseRest(function(func, args) { + return baseDelay(func, 1, args); + }); + var delay = baseRest(function(func, wait, args) { + return baseDelay(func, toNumber(wait) || 0, args); + }); + function flip(func) { + return createWrap(func, WRAP_FLIP_FLAG); + } + function memoize(func, resolver) { + if (typeof func != "function" || resolver != null && typeof resolver != "function") { + throw new TypeError2(FUNC_ERROR_TEXT); + } + var memoized = function() { + var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache = memoized.cache; + if (cache.has(key)) { + return cache.get(key); + } + var result2 = func.apply(this, args); + memoized.cache = cache.set(key, result2) || cache; + return result2; + }; + memoized.cache = new (memoize.Cache || MapCache)(); + return memoized; + } + memoize.Cache = MapCache; + function negate(predicate) { + if (typeof predicate != "function") { + throw new TypeError2(FUNC_ERROR_TEXT); + } + return function() { + var args = arguments; + switch (args.length) { + case 0: + return !predicate.call(this); + case 1: + return !predicate.call(this, args[0]); + case 2: + return !predicate.call(this, args[0], args[1]); + case 3: + return !predicate.call(this, args[0], args[1], args[2]); + } + return !predicate.apply(this, args); + }; + } + function once(func) { + return before(2, func); + } + var overArgs = castRest(function(func, transforms) { + transforms = transforms.length == 1 && isArray(transforms[0]) ? arrayMap(transforms[0], baseUnary(getIteratee())) : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee())); + var funcsLength = transforms.length; + return baseRest(function(args) { + var index = -1, length = nativeMin(args.length, funcsLength); + while (++index < length) { + args[index] = transforms[index].call(this, args[index]); + } + return apply(func, this, args); + }); + }); + var partial = baseRest(function(func, partials) { + var holders = replaceHolders(partials, getHolder(partial)); + return createWrap(func, WRAP_PARTIAL_FLAG, undefined2, partials, holders); + }); + var partialRight = baseRest(function(func, partials) { + var holders = replaceHolders(partials, getHolder(partialRight)); + return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined2, partials, holders); + }); + var rearg = flatRest(function(func, indexes) { + return createWrap(func, WRAP_REARG_FLAG, undefined2, undefined2, undefined2, indexes); + }); + function rest(func, start) { + if (typeof func != "function") { + throw new TypeError2(FUNC_ERROR_TEXT); + } + start = start === undefined2 ? start : toInteger(start); + return baseRest(func, start); + } + function spread(func, start) { + if (typeof func != "function") { + throw new TypeError2(FUNC_ERROR_TEXT); + } + start = start == null ? 0 : nativeMax(toInteger(start), 0); + return baseRest(function(args) { + var array = args[start], otherArgs = castSlice(args, 0, start); + if (array) { + arrayPush(otherArgs, array); + } + return apply(func, this, otherArgs); + }); + } + function throttle(func, wait, options) { + var leading = true, trailing = true; + if (typeof func != "function") { + throw new TypeError2(FUNC_ERROR_TEXT); + } + if (isObject(options)) { + leading = "leading" in options ? !!options.leading : leading; + trailing = "trailing" in options ? !!options.trailing : trailing; + } + return debounce(func, wait, { + "leading": leading, + "maxWait": wait, + "trailing": trailing + }); + } + function unary(func) { + return ary(func, 1); + } + function wrap(value, wrapper) { + return partial(castFunction(wrapper), value); + } + function castArray() { + if (!arguments.length) { + return []; + } + var value = arguments[0]; + return isArray(value) ? value : [value]; + } + function clone(value) { + return baseClone(value, CLONE_SYMBOLS_FLAG); + } + function cloneWith(value, customizer) { + customizer = typeof customizer == "function" ? customizer : undefined2; + return baseClone(value, CLONE_SYMBOLS_FLAG, customizer); + } + function cloneDeep(value) { + return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG); + } + function cloneDeepWith(value, customizer) { + customizer = typeof customizer == "function" ? customizer : undefined2; + return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer); + } + function conformsTo(object, source) { + return source == null || baseConformsTo(object, source, keys(source)); + } + function eq(value, other) { + return value === other || value !== value && other !== other; + } + var gt = createRelationalOperation(baseGt); + var gte = createRelationalOperation(function(value, other) { + return value >= other; + }); + var isArguments = baseIsArguments(/* @__PURE__ */ function() { + return arguments; + }()) ? baseIsArguments : function(value) { + return isObjectLike(value) && hasOwnProperty.call(value, "callee") && !propertyIsEnumerable.call(value, "callee"); + }; + var isArray = Array2.isArray; + var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer; + function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); + } + function isArrayLikeObject(value) { + return isObjectLike(value) && isArrayLike(value); + } + function isBoolean(value) { + return value === true || value === false || isObjectLike(value) && baseGetTag(value) == boolTag; + } + var isBuffer = nativeIsBuffer || stubFalse; + var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate; + function isElement(value) { + return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value); + } + function isEmpty(value) { + if (value == null) { + return true; + } + if (isArrayLike(value) && (isArray(value) || typeof value == "string" || typeof value.splice == "function" || isBuffer(value) || isTypedArray(value) || isArguments(value))) { + return !value.length; + } + var tag = getTag(value); + if (tag == mapTag || tag == setTag) { + return !value.size; + } + if (isPrototype(value)) { + return !baseKeys(value).length; + } + for (var key in value) { + if (hasOwnProperty.call(value, key)) { + return false; + } + } + return true; + } + function isEqual(value, other) { + return baseIsEqual(value, other); + } + function isEqualWith(value, other, customizer) { + customizer = typeof customizer == "function" ? customizer : undefined2; + var result2 = customizer ? customizer(value, other) : undefined2; + return result2 === undefined2 ? baseIsEqual(value, other, undefined2, customizer) : !!result2; + } + function isError(value) { + if (!isObjectLike(value)) { + return false; + } + var tag = baseGetTag(value); + return tag == errorTag || tag == domExcTag || typeof value.message == "string" && typeof value.name == "string" && !isPlainObject(value); + } + function isFinite2(value) { + return typeof value == "number" && nativeIsFinite(value); + } + function isFunction(value) { + if (!isObject(value)) { + return false; + } + var tag = baseGetTag(value); + return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; + } + function isInteger(value) { + return typeof value == "number" && value == toInteger(value); + } + function isLength(value) { + return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + } + function isObject(value) { + var type = typeof value; + return value != null && (type == "object" || type == "function"); + } + function isObjectLike(value) { + return value != null && typeof value == "object"; + } + var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap; + function isMatch(object, source) { + return object === source || baseIsMatch(object, source, getMatchData(source)); + } + function isMatchWith(object, source, customizer) { + customizer = typeof customizer == "function" ? customizer : undefined2; + return baseIsMatch(object, source, getMatchData(source), customizer); + } + function isNaN2(value) { + return isNumber(value) && value != +value; + } + function isNative(value) { + if (isMaskable(value)) { + throw new Error2(CORE_ERROR_TEXT); + } + return baseIsNative(value); + } + function isNull(value) { + return value === null; + } + function isNil(value) { + return value == null; + } + function isNumber(value) { + return typeof value == "number" || isObjectLike(value) && baseGetTag(value) == numberTag; + } + function isPlainObject(value) { + if (!isObjectLike(value) || baseGetTag(value) != objectTag) { + return false; + } + var proto = getPrototype(value); + if (proto === null) { + return true; + } + var Ctor = hasOwnProperty.call(proto, "constructor") && proto.constructor; + return typeof Ctor == "function" && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString; + } + var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp; + function isSafeInteger(value) { + return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER; + } + var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet; + function isString(value) { + return typeof value == "string" || !isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag; + } + function isSymbol(value) { + return typeof value == "symbol" || isObjectLike(value) && baseGetTag(value) == symbolTag; + } + var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; + function isUndefined(value) { + return value === undefined2; + } + function isWeakMap(value) { + return isObjectLike(value) && getTag(value) == weakMapTag; + } + function isWeakSet(value) { + return isObjectLike(value) && baseGetTag(value) == weakSetTag; + } + var lt = createRelationalOperation(baseLt); + var lte = createRelationalOperation(function(value, other) { + return value <= other; + }); + function toArray2(value) { + if (!value) { + return []; + } + if (isArrayLike(value)) { + return isString(value) ? stringToArray(value) : copyArray(value); + } + if (symIterator && value[symIterator]) { + return iteratorToArray(value[symIterator]()); + } + var tag = getTag(value), func = tag == mapTag ? mapToArray : tag == setTag ? setToArray : values; + return func(value); + } + function toFinite(value) { + if (!value) { + return value === 0 ? value : 0; + } + value = toNumber(value); + if (value === INFINITY || value === -INFINITY) { + var sign = value < 0 ? -1 : 1; + return sign * MAX_INTEGER; + } + return value === value ? value : 0; + } + function toInteger(value) { + var result2 = toFinite(value), remainder = result2 % 1; + return result2 === result2 ? remainder ? result2 - remainder : result2 : 0; + } + function toLength(value) { + return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0; + } + function toNumber(value) { + if (typeof value == "number") { + return value; + } + if (isSymbol(value)) { + return NAN; + } + if (isObject(value)) { + var other = typeof value.valueOf == "function" ? value.valueOf() : value; + value = isObject(other) ? other + "" : other; + } + if (typeof value != "string") { + return value === 0 ? value : +value; + } + value = baseTrim(value); + var isBinary = reIsBinary.test(value); + return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value; + } + function toPlainObject(value) { + return copyObject(value, keysIn(value)); + } + function toSafeInteger(value) { + return value ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER) : value === 0 ? value : 0; + } + function toString(value) { + return value == null ? "" : baseToString(value); + } + var assign = createAssigner(function(object, source) { + if (isPrototype(source) || isArrayLike(source)) { + copyObject(source, keys(source), object); + return; + } + for (var key in source) { + if (hasOwnProperty.call(source, key)) { + assignValue(object, key, source[key]); + } + } + }); + var assignIn = createAssigner(function(object, source) { + copyObject(source, keysIn(source), object); + }); + var assignInWith = createAssigner(function(object, source, srcIndex, customizer) { + copyObject(source, keysIn(source), object, customizer); + }); + var assignWith = createAssigner(function(object, source, srcIndex, customizer) { + copyObject(source, keys(source), object, customizer); + }); + var at = flatRest(baseAt); + function create(prototype, properties) { + var result2 = baseCreate(prototype); + return properties == null ? result2 : baseAssign(result2, properties); + } + var defaults = baseRest(function(object, sources) { + object = Object2(object); + var index = -1; + var length = sources.length; + var guard = length > 2 ? sources[2] : undefined2; + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + length = 1; + } + while (++index < length) { + var source = sources[index]; + var props = keysIn(source); + var propsIndex = -1; + var propsLength = props.length; + while (++propsIndex < propsLength) { + var key = props[propsIndex]; + var value = object[key]; + if (value === undefined2 || eq(value, objectProto[key]) && !hasOwnProperty.call(object, key)) { + object[key] = source[key]; + } + } + } + return object; + }); + var defaultsDeep = baseRest(function(args) { + args.push(undefined2, customDefaultsMerge); + return apply(mergeWith, undefined2, args); + }); + function findKey(object, predicate) { + return baseFindKey(object, getIteratee(predicate, 3), baseForOwn); + } + function findLastKey(object, predicate) { + return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight); + } + function forIn(object, iteratee2) { + return object == null ? object : baseFor(object, getIteratee(iteratee2, 3), keysIn); + } + function forInRight(object, iteratee2) { + return object == null ? object : baseForRight(object, getIteratee(iteratee2, 3), keysIn); + } + function forOwn(object, iteratee2) { + return object && baseForOwn(object, getIteratee(iteratee2, 3)); + } + function forOwnRight(object, iteratee2) { + return object && baseForOwnRight(object, getIteratee(iteratee2, 3)); + } + function functions(object) { + return object == null ? [] : baseFunctions(object, keys(object)); + } + function functionsIn(object) { + return object == null ? [] : baseFunctions(object, keysIn(object)); + } + function get(object, path, defaultValue) { + var result2 = object == null ? undefined2 : baseGet(object, path); + return result2 === undefined2 ? defaultValue : result2; + } + function has(object, path) { + return object != null && hasPath(object, path, baseHas); + } + function hasIn(object, path) { + return object != null && hasPath(object, path, baseHasIn); + } + var invert = createInverter(function(result2, value, key) { + if (value != null && typeof value.toString != "function") { + value = nativeObjectToString.call(value); + } + result2[value] = key; + }, constant(identity)); + var invertBy = createInverter(function(result2, value, key) { + if (value != null && typeof value.toString != "function") { + value = nativeObjectToString.call(value); + } + if (hasOwnProperty.call(result2, value)) { + result2[value].push(key); + } else { + result2[value] = [key]; + } + }, getIteratee); + var invoke = baseRest(baseInvoke); + function keys(object) { + return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); + } + function keysIn(object) { + return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object); + } + function mapKeys(object, iteratee2) { + var result2 = {}; + iteratee2 = getIteratee(iteratee2, 3); + baseForOwn(object, function(value, key, object2) { + baseAssignValue(result2, iteratee2(value, key, object2), value); + }); + return result2; + } + function mapValues(object, iteratee2) { + var result2 = {}; + iteratee2 = getIteratee(iteratee2, 3); + baseForOwn(object, function(value, key, object2) { + baseAssignValue(result2, key, iteratee2(value, key, object2)); + }); + return result2; + } + var merge = createAssigner(function(object, source, srcIndex) { + baseMerge(object, source, srcIndex); + }); + var mergeWith = createAssigner(function(object, source, srcIndex, customizer) { + baseMerge(object, source, srcIndex, customizer); + }); + var omit = flatRest(function(object, paths) { + var result2 = {}; + if (object == null) { + return result2; + } + var isDeep = false; + paths = arrayMap(paths, function(path) { + path = castPath(path, object); + isDeep || (isDeep = path.length > 1); + return path; + }); + copyObject(object, getAllKeysIn(object), result2); + if (isDeep) { + result2 = baseClone(result2, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone); + } + var length = paths.length; + while (length--) { + baseUnset(result2, paths[length]); + } + return result2; + }); + function omitBy(object, predicate) { + return pickBy(object, negate(getIteratee(predicate))); + } + var pick = flatRest(function(object, paths) { + return object == null ? {} : basePick(object, paths); + }); + function pickBy(object, predicate) { + if (object == null) { + return {}; + } + var props = arrayMap(getAllKeysIn(object), function(prop) { + return [prop]; + }); + predicate = getIteratee(predicate); + return basePickBy(object, props, function(value, path) { + return predicate(value, path[0]); + }); + } + function result(object, path, defaultValue) { + path = castPath(path, object); + var index = -1, length = path.length; + if (!length) { + length = 1; + object = undefined2; + } + while (++index < length) { + var value = object == null ? undefined2 : object[toKey(path[index])]; + if (value === undefined2) { + index = length; + value = defaultValue; + } + object = isFunction(value) ? value.call(object) : value; + } + return object; + } + function set(object, path, value) { + return object == null ? object : baseSet(object, path, value); + } + function setWith(object, path, value, customizer) { + customizer = typeof customizer == "function" ? customizer : undefined2; + return object == null ? object : baseSet(object, path, value, customizer); + } + var toPairs = createToPairs(keys); + var toPairsIn = createToPairs(keysIn); + function transform(object, iteratee2, accumulator) { + var isArr = isArray(object), isArrLike = isArr || isBuffer(object) || isTypedArray(object); + iteratee2 = getIteratee(iteratee2, 4); + if (accumulator == null) { + var Ctor = object && object.constructor; + if (isArrLike) { + accumulator = isArr ? new Ctor() : []; + } else if (isObject(object)) { + accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {}; + } else { + accumulator = {}; + } + } + (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object2) { + return iteratee2(accumulator, value, index, object2); + }); + return accumulator; + } + function unset(object, path) { + return object == null ? true : baseUnset(object, path); + } + function update(object, path, updater) { + return object == null ? object : baseUpdate(object, path, castFunction(updater)); + } + function updateWith(object, path, updater, customizer) { + customizer = typeof customizer == "function" ? customizer : undefined2; + return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer); + } + function values(object) { + return object == null ? [] : baseValues(object, keys(object)); + } + function valuesIn(object) { + return object == null ? [] : baseValues(object, keysIn(object)); + } + function clamp(number, lower, upper) { + if (upper === undefined2) { + upper = lower; + lower = undefined2; + } + if (upper !== undefined2) { + upper = toNumber(upper); + upper = upper === upper ? upper : 0; + } + if (lower !== undefined2) { + lower = toNumber(lower); + lower = lower === lower ? lower : 0; + } + return baseClamp(toNumber(number), lower, upper); + } + function inRange(number, start, end) { + start = toFinite(start); + if (end === undefined2) { + end = start; + start = 0; + } else { + end = toFinite(end); + } + number = toNumber(number); + return baseInRange(number, start, end); + } + function random(lower, upper, floating) { + if (floating && typeof floating != "boolean" && isIterateeCall(lower, upper, floating)) { + upper = floating = undefined2; + } + if (floating === undefined2) { + if (typeof upper == "boolean") { + floating = upper; + upper = undefined2; + } else if (typeof lower == "boolean") { + floating = lower; + lower = undefined2; + } + } + if (lower === undefined2 && upper === undefined2) { + lower = 0; + upper = 1; + } else { + lower = toFinite(lower); + if (upper === undefined2) { + upper = lower; + lower = 0; + } else { + upper = toFinite(upper); + } + } + if (lower > upper) { + var temp = lower; + lower = upper; + upper = temp; + } + if (floating || lower % 1 || upper % 1) { + var rand = nativeRandom(); + return nativeMin(lower + rand * (upper - lower + freeParseFloat("1e-" + ((rand + "").length - 1))), upper); + } + return baseRandom(lower, upper); + } + var camelCase = createCompounder(function(result2, word, index) { + word = word.toLowerCase(); + return result2 + (index ? capitalize(word) : word); + }); + function capitalize(string) { + return upperFirst(toString(string).toLowerCase()); + } + function deburr(string) { + string = toString(string); + return string && string.replace(reLatin, deburrLetter).replace(reComboMark, ""); + } + function endsWith(string, target, position) { + string = toString(string); + target = baseToString(target); + var length = string.length; + position = position === undefined2 ? length : baseClamp(toInteger(position), 0, length); + var end = position; + position -= target.length; + return position >= 0 && string.slice(position, end) == target; + } + function escape2(string) { + string = toString(string); + return string && reHasUnescapedHtml.test(string) ? string.replace(reUnescapedHtml, escapeHtmlChar) : string; + } + function escapeRegExp(string) { + string = toString(string); + return string && reHasRegExpChar.test(string) ? string.replace(reRegExpChar, "\\$&") : string; + } + var kebabCase = createCompounder(function(result2, word, index) { + return result2 + (index ? "-" : "") + word.toLowerCase(); + }); + var lowerCase = createCompounder(function(result2, word, index) { + return result2 + (index ? " " : "") + word.toLowerCase(); + }); + var lowerFirst = createCaseFirst("toLowerCase"); + function pad(string, length, chars) { + string = toString(string); + length = toInteger(length); + var strLength = length ? stringSize(string) : 0; + if (!length || strLength >= length) { + return string; + } + var mid = (length - strLength) / 2; + return createPadding(nativeFloor(mid), chars) + string + createPadding(nativeCeil(mid), chars); + } + function padEnd(string, length, chars) { + string = toString(string); + length = toInteger(length); + var strLength = length ? stringSize(string) : 0; + return length && strLength < length ? string + createPadding(length - strLength, chars) : string; + } + function padStart(string, length, chars) { + string = toString(string); + length = toInteger(length); + var strLength = length ? stringSize(string) : 0; + return length && strLength < length ? createPadding(length - strLength, chars) + string : string; + } + function parseInt2(string, radix, guard) { + if (guard || radix == null) { + radix = 0; + } else if (radix) { + radix = +radix; + } + return nativeParseInt(toString(string).replace(reTrimStart, ""), radix || 0); + } + function repeat(string, n, guard) { + if (guard ? isIterateeCall(string, n, guard) : n === undefined2) { + n = 1; + } else { + n = toInteger(n); + } + return baseRepeat(toString(string), n); + } + function replace() { + var args = arguments, string = toString(args[0]); + return args.length < 3 ? string : string.replace(args[1], args[2]); + } + var snakeCase = createCompounder(function(result2, word, index) { + return result2 + (index ? "_" : "") + word.toLowerCase(); + }); + function split(string, separator, limit) { + if (limit && typeof limit != "number" && isIterateeCall(string, separator, limit)) { + separator = limit = undefined2; + } + limit = limit === undefined2 ? MAX_ARRAY_LENGTH : limit >>> 0; + if (!limit) { + return []; + } + string = toString(string); + if (string && (typeof separator == "string" || separator != null && !isRegExp(separator))) { + separator = baseToString(separator); + if (!separator && hasUnicode(string)) { + return castSlice(stringToArray(string), 0, limit); + } + } + return string.split(separator, limit); + } + var startCase = createCompounder(function(result2, word, index) { + return result2 + (index ? " " : "") + upperFirst(word); + }); + function startsWith(string, target, position) { + string = toString(string); + position = position == null ? 0 : baseClamp(toInteger(position), 0, string.length); + target = baseToString(target); + return string.slice(position, position + target.length) == target; + } + function template(string, options, guard) { + var settings = lodash.templateSettings; + if (guard && isIterateeCall(string, options, guard)) { + options = undefined2; + } + string = toString(string); + options = assignInWith({}, options, settings, customDefaultsAssignIn); + var imports = assignInWith({}, options.imports, settings.imports, customDefaultsAssignIn), importsKeys = keys(imports), importsValues = baseValues(imports, importsKeys); + var isEscaping, isEvaluating, index = 0, interpolate = options.interpolate || reNoMatch, source = "__p += '"; + var reDelimiters = RegExp2( + (options.escape || reNoMatch).source + "|" + interpolate.source + "|" + (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + "|" + (options.evaluate || reNoMatch).source + "|$", + "g" + ); + var sourceURL = "//# sourceURL=" + (hasOwnProperty.call(options, "sourceURL") ? (options.sourceURL + "").replace(/\s/g, " ") : "lodash.templateSources[" + ++templateCounter + "]") + "\n"; + string.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) { + interpolateValue || (interpolateValue = esTemplateValue); + source += string.slice(index, offset).replace(reUnescapedString, escapeStringChar); + if (escapeValue) { + isEscaping = true; + source += "' +\n__e(" + escapeValue + ") +\n'"; + } + if (evaluateValue) { + isEvaluating = true; + source += "';\n" + evaluateValue + ";\n__p += '"; + } + if (interpolateValue) { + source += "' +\n((__t = (" + interpolateValue + ")) == null ? '' : __t) +\n'"; + } + index = offset + match.length; + return match; + }); + source += "';\n"; + var variable = hasOwnProperty.call(options, "variable") && options.variable; + if (!variable) { + source = "with (obj) {\n" + source + "\n}\n"; + } else if (reForbiddenIdentifierChars.test(variable)) { + throw new Error2(INVALID_TEMPL_VAR_ERROR_TEXT); + } + source = (isEvaluating ? source.replace(reEmptyStringLeading, "") : source).replace(reEmptyStringMiddle, "$1").replace(reEmptyStringTrailing, "$1;"); + source = "function(" + (variable || "obj") + ") {\n" + (variable ? "" : "obj || (obj = {});\n") + "var __t, __p = ''" + (isEscaping ? ", __e = _.escape" : "") + (isEvaluating ? ", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n" : ";\n") + source + "return __p\n}"; + var result2 = attempt(function() { + return Function2(importsKeys, sourceURL + "return " + source).apply(undefined2, importsValues); + }); + result2.source = source; + if (isError(result2)) { + throw result2; + } + return result2; + } + function toLower(value) { + return toString(value).toLowerCase(); + } + function toUpper(value) { + return toString(value).toUpperCase(); + } + function trim(string, chars, guard) { + string = toString(string); + if (string && (guard || chars === undefined2)) { + return baseTrim(string); + } + if (!string || !(chars = baseToString(chars))) { + return string; + } + var strSymbols = stringToArray(string), chrSymbols = stringToArray(chars), start = charsStartIndex(strSymbols, chrSymbols), end = charsEndIndex(strSymbols, chrSymbols) + 1; + return castSlice(strSymbols, start, end).join(""); + } + function trimEnd(string, chars, guard) { + string = toString(string); + if (string && (guard || chars === undefined2)) { + return string.slice(0, trimmedEndIndex(string) + 1); + } + if (!string || !(chars = baseToString(chars))) { + return string; + } + var strSymbols = stringToArray(string), end = charsEndIndex(strSymbols, stringToArray(chars)) + 1; + return castSlice(strSymbols, 0, end).join(""); + } + function trimStart(string, chars, guard) { + string = toString(string); + if (string && (guard || chars === undefined2)) { + return string.replace(reTrimStart, ""); + } + if (!string || !(chars = baseToString(chars))) { + return string; + } + var strSymbols = stringToArray(string), start = charsStartIndex(strSymbols, stringToArray(chars)); + return castSlice(strSymbols, start).join(""); + } + function truncate(string, options) { + var length = DEFAULT_TRUNC_LENGTH, omission = DEFAULT_TRUNC_OMISSION; + if (isObject(options)) { + var separator = "separator" in options ? options.separator : separator; + length = "length" in options ? toInteger(options.length) : length; + omission = "omission" in options ? baseToString(options.omission) : omission; + } + string = toString(string); + var strLength = string.length; + if (hasUnicode(string)) { + var strSymbols = stringToArray(string); + strLength = strSymbols.length; + } + if (length >= strLength) { + return string; + } + var end = length - stringSize(omission); + if (end < 1) { + return omission; + } + var result2 = strSymbols ? castSlice(strSymbols, 0, end).join("") : string.slice(0, end); + if (separator === undefined2) { + return result2 + omission; + } + if (strSymbols) { + end += result2.length - end; + } + if (isRegExp(separator)) { + if (string.slice(end).search(separator)) { + var match, substring = result2; + if (!separator.global) { + separator = RegExp2(separator.source, toString(reFlags.exec(separator)) + "g"); + } + separator.lastIndex = 0; + while (match = separator.exec(substring)) { + var newEnd = match.index; + } + result2 = result2.slice(0, newEnd === undefined2 ? end : newEnd); + } + } else if (string.indexOf(baseToString(separator), end) != end) { + var index = result2.lastIndexOf(separator); + if (index > -1) { + result2 = result2.slice(0, index); + } + } + return result2 + omission; + } + function unescape2(string) { + string = toString(string); + return string && reHasEscapedHtml.test(string) ? string.replace(reEscapedHtml, unescapeHtmlChar) : string; + } + var upperCase = createCompounder(function(result2, word, index) { + return result2 + (index ? " " : "") + word.toUpperCase(); + }); + var upperFirst = createCaseFirst("toUpperCase"); + function words(string, pattern, guard) { + string = toString(string); + pattern = guard ? undefined2 : pattern; + if (pattern === undefined2) { + return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string); + } + return string.match(pattern) || []; + } + var attempt = baseRest(function(func, args) { + try { + return apply(func, undefined2, args); + } catch (e) { + return isError(e) ? e : new Error2(e); + } + }); + var bindAll = flatRest(function(object, methodNames) { + arrayEach(methodNames, function(key) { + key = toKey(key); + baseAssignValue(object, key, bind(object[key], object)); + }); + return object; + }); + function cond(pairs) { + var length = pairs == null ? 0 : pairs.length, toIteratee = getIteratee(); + pairs = !length ? [] : arrayMap(pairs, function(pair) { + if (typeof pair[1] != "function") { + throw new TypeError2(FUNC_ERROR_TEXT); + } + return [toIteratee(pair[0]), pair[1]]; + }); + return baseRest(function(args) { + var index = -1; + while (++index < length) { + var pair = pairs[index]; + if (apply(pair[0], this, args)) { + return apply(pair[1], this, args); + } + } + }); + } + function conforms(source) { + return baseConforms(baseClone(source, CLONE_DEEP_FLAG)); + } + function constant(value) { + return function() { + return value; + }; + } + function defaultTo(value, defaultValue) { + return value == null || value !== value ? defaultValue : value; + } + var flow = createFlow(); + var flowRight = createFlow(true); + function identity(value) { + return value; + } + function iteratee(func) { + return baseIteratee(typeof func == "function" ? func : baseClone(func, CLONE_DEEP_FLAG)); + } + function matches(source) { + return baseMatches(baseClone(source, CLONE_DEEP_FLAG)); + } + function matchesProperty(path, srcValue) { + return baseMatchesProperty(path, baseClone(srcValue, CLONE_DEEP_FLAG)); + } + var method = baseRest(function(path, args) { + return function(object) { + return baseInvoke(object, path, args); + }; + }); + var methodOf = baseRest(function(object, args) { + return function(path) { + return baseInvoke(object, path, args); + }; + }); + function mixin(object, source, options) { + var props = keys(source), methodNames = baseFunctions(source, props); + if (options == null && !(isObject(source) && (methodNames.length || !props.length))) { + options = source; + source = object; + object = this; + methodNames = baseFunctions(source, keys(source)); + } + var chain2 = !(isObject(options) && "chain" in options) || !!options.chain, isFunc = isFunction(object); + arrayEach(methodNames, function(methodName) { + var func = source[methodName]; + object[methodName] = func; + if (isFunc) { + object.prototype[methodName] = function() { + var chainAll = this.__chain__; + if (chain2 || chainAll) { + var result2 = object(this.__wrapped__), actions = result2.__actions__ = copyArray(this.__actions__); + actions.push({ "func": func, "args": arguments, "thisArg": object }); + result2.__chain__ = chainAll; + return result2; + } + return func.apply(object, arrayPush([this.value()], arguments)); + }; + } + }); + return object; + } + function noConflict() { + if (root._ === this) { + root._ = oldDash; + } + return this; + } + function noop() { + } + function nthArg(n) { + n = toInteger(n); + return baseRest(function(args) { + return baseNth(args, n); + }); + } + var over = createOver(arrayMap); + var overEvery = createOver(arrayEvery); + var overSome = createOver(arraySome); + function property(path) { + return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path); + } + function propertyOf(object) { + return function(path) { + return object == null ? undefined2 : baseGet(object, path); + }; + } + var range = createRange(); + var rangeRight = createRange(true); + function stubArray() { + return []; + } + function stubFalse() { + return false; + } + function stubObject() { + return {}; + } + function stubString() { + return ""; + } + function stubTrue() { + return true; + } + function times(n, iteratee2) { + n = toInteger(n); + if (n < 1 || n > MAX_SAFE_INTEGER) { + return []; + } + var index = MAX_ARRAY_LENGTH, length = nativeMin(n, MAX_ARRAY_LENGTH); + iteratee2 = getIteratee(iteratee2); + n -= MAX_ARRAY_LENGTH; + var result2 = baseTimes(length, iteratee2); + while (++index < n) { + iteratee2(index); + } + return result2; + } + function toPath(value) { + if (isArray(value)) { + return arrayMap(value, toKey); + } + return isSymbol(value) ? [value] : copyArray(stringToPath(toString(value))); + } + function uniqueId(prefix) { + var id = ++idCounter; + return toString(prefix) + id; + } + var add = createMathOperation(function(augend, addend) { + return augend + addend; + }, 0); + var ceil = createRound("ceil"); + var divide = createMathOperation(function(dividend, divisor) { + return dividend / divisor; + }, 1); + var floor = createRound("floor"); + function max(array) { + return array && array.length ? baseExtremum(array, identity, baseGt) : undefined2; + } + function maxBy(array, iteratee2) { + return array && array.length ? baseExtremum(array, getIteratee(iteratee2, 2), baseGt) : undefined2; + } + function mean(array) { + return baseMean(array, identity); + } + function meanBy(array, iteratee2) { + return baseMean(array, getIteratee(iteratee2, 2)); + } + function min(array) { + return array && array.length ? baseExtremum(array, identity, baseLt) : undefined2; + } + function minBy(array, iteratee2) { + return array && array.length ? baseExtremum(array, getIteratee(iteratee2, 2), baseLt) : undefined2; + } + var multiply = createMathOperation(function(multiplier, multiplicand) { + return multiplier * multiplicand; + }, 1); + var round = createRound("round"); + var subtract = createMathOperation(function(minuend, subtrahend) { + return minuend - subtrahend; + }, 0); + function sum(array) { + return array && array.length ? baseSum(array, identity) : 0; + } + function sumBy(array, iteratee2) { + return array && array.length ? baseSum(array, getIteratee(iteratee2, 2)) : 0; + } + lodash.after = after; + lodash.ary = ary; + lodash.assign = assign; + lodash.assignIn = assignIn; + lodash.assignInWith = assignInWith; + lodash.assignWith = assignWith; + lodash.at = at; + lodash.before = before; + lodash.bind = bind; + lodash.bindAll = bindAll; + lodash.bindKey = bindKey; + lodash.castArray = castArray; + lodash.chain = chain; + lodash.chunk = chunk; + lodash.compact = compact; + lodash.concat = concat; + lodash.cond = cond; + lodash.conforms = conforms; + lodash.constant = constant; + lodash.countBy = countBy; + lodash.create = create; + lodash.curry = curry; + lodash.curryRight = curryRight; + lodash.debounce = debounce; + lodash.defaults = defaults; + lodash.defaultsDeep = defaultsDeep; + lodash.defer = defer; + lodash.delay = delay; + lodash.difference = difference; + lodash.differenceBy = differenceBy; + lodash.differenceWith = differenceWith; + lodash.drop = drop; + lodash.dropRight = dropRight; + lodash.dropRightWhile = dropRightWhile; + lodash.dropWhile = dropWhile; + lodash.fill = fill; + lodash.filter = filter; + lodash.flatMap = flatMap; + lodash.flatMapDeep = flatMapDeep; + lodash.flatMapDepth = flatMapDepth; + lodash.flatten = flatten; + lodash.flattenDeep = flattenDeep; + lodash.flattenDepth = flattenDepth; + lodash.flip = flip; + lodash.flow = flow; + lodash.flowRight = flowRight; + lodash.fromPairs = fromPairs; + lodash.functions = functions; + lodash.functionsIn = functionsIn; + lodash.groupBy = groupBy; + lodash.initial = initial; + lodash.intersection = intersection; + lodash.intersectionBy = intersectionBy; + lodash.intersectionWith = intersectionWith; + lodash.invert = invert; + lodash.invertBy = invertBy; + lodash.invokeMap = invokeMap; + lodash.iteratee = iteratee; + lodash.keyBy = keyBy; + lodash.keys = keys; + lodash.keysIn = keysIn; + lodash.map = map; + lodash.mapKeys = mapKeys; + lodash.mapValues = mapValues; + lodash.matches = matches; + lodash.matchesProperty = matchesProperty; + lodash.memoize = memoize; + lodash.merge = merge; + lodash.mergeWith = mergeWith; + lodash.method = method; + lodash.methodOf = methodOf; + lodash.mixin = mixin; + lodash.negate = negate; + lodash.nthArg = nthArg; + lodash.omit = omit; + lodash.omitBy = omitBy; + lodash.once = once; + lodash.orderBy = orderBy; + lodash.over = over; + lodash.overArgs = overArgs; + lodash.overEvery = overEvery; + lodash.overSome = overSome; + lodash.partial = partial; + lodash.partialRight = partialRight; + lodash.partition = partition; + lodash.pick = pick; + lodash.pickBy = pickBy; + lodash.property = property; + lodash.propertyOf = propertyOf; + lodash.pull = pull; + lodash.pullAll = pullAll; + lodash.pullAllBy = pullAllBy; + lodash.pullAllWith = pullAllWith; + lodash.pullAt = pullAt; + lodash.range = range; + lodash.rangeRight = rangeRight; + lodash.rearg = rearg; + lodash.reject = reject; + lodash.remove = remove; + lodash.rest = rest; + lodash.reverse = reverse; + lodash.sampleSize = sampleSize; + lodash.set = set; + lodash.setWith = setWith; + lodash.shuffle = shuffle; + lodash.slice = slice; + lodash.sortBy = sortBy; + lodash.sortedUniq = sortedUniq; + lodash.sortedUniqBy = sortedUniqBy; + lodash.split = split; + lodash.spread = spread; + lodash.tail = tail; + lodash.take = take; + lodash.takeRight = takeRight; + lodash.takeRightWhile = takeRightWhile; + lodash.takeWhile = takeWhile; + lodash.tap = tap; + lodash.throttle = throttle; + lodash.thru = thru; + lodash.toArray = toArray2; + lodash.toPairs = toPairs; + lodash.toPairsIn = toPairsIn; + lodash.toPath = toPath; + lodash.toPlainObject = toPlainObject; + lodash.transform = transform; + lodash.unary = unary; + lodash.union = union; + lodash.unionBy = unionBy; + lodash.unionWith = unionWith; + lodash.uniq = uniq; + lodash.uniqBy = uniqBy; + lodash.uniqWith = uniqWith; + lodash.unset = unset; + lodash.unzip = unzip; + lodash.unzipWith = unzipWith; + lodash.update = update; + lodash.updateWith = updateWith; + lodash.values = values; + lodash.valuesIn = valuesIn; + lodash.without = without; + lodash.words = words; + lodash.wrap = wrap; + lodash.xor = xor; + lodash.xorBy = xorBy; + lodash.xorWith = xorWith; + lodash.zip = zip; + lodash.zipObject = zipObject; + lodash.zipObjectDeep = zipObjectDeep; + lodash.zipWith = zipWith; + lodash.entries = toPairs; + lodash.entriesIn = toPairsIn; + lodash.extend = assignIn; + lodash.extendWith = assignInWith; + mixin(lodash, lodash); + lodash.add = add; + lodash.attempt = attempt; + lodash.camelCase = camelCase; + lodash.capitalize = capitalize; + lodash.ceil = ceil; + lodash.clamp = clamp; + lodash.clone = clone; + lodash.cloneDeep = cloneDeep; + lodash.cloneDeepWith = cloneDeepWith; + lodash.cloneWith = cloneWith; + lodash.conformsTo = conformsTo; + lodash.deburr = deburr; + lodash.defaultTo = defaultTo; + lodash.divide = divide; + lodash.endsWith = endsWith; + lodash.eq = eq; + lodash.escape = escape2; + lodash.escapeRegExp = escapeRegExp; + lodash.every = every; + lodash.find = find; + lodash.findIndex = findIndex; + lodash.findKey = findKey; + lodash.findLast = findLast; + lodash.findLastIndex = findLastIndex; + lodash.findLastKey = findLastKey; + lodash.floor = floor; + lodash.forEach = forEach; + lodash.forEachRight = forEachRight; + lodash.forIn = forIn; + lodash.forInRight = forInRight; + lodash.forOwn = forOwn; + lodash.forOwnRight = forOwnRight; + lodash.get = get; + lodash.gt = gt; + lodash.gte = gte; + lodash.has = has; + lodash.hasIn = hasIn; + lodash.head = head; + lodash.identity = identity; + lodash.includes = includes; + lodash.indexOf = indexOf; + lodash.inRange = inRange; + lodash.invoke = invoke; + lodash.isArguments = isArguments; + lodash.isArray = isArray; + lodash.isArrayBuffer = isArrayBuffer; + lodash.isArrayLike = isArrayLike; + lodash.isArrayLikeObject = isArrayLikeObject; + lodash.isBoolean = isBoolean; + lodash.isBuffer = isBuffer; + lodash.isDate = isDate; + lodash.isElement = isElement; + lodash.isEmpty = isEmpty; + lodash.isEqual = isEqual; + lodash.isEqualWith = isEqualWith; + lodash.isError = isError; + lodash.isFinite = isFinite2; + lodash.isFunction = isFunction; + lodash.isInteger = isInteger; + lodash.isLength = isLength; + lodash.isMap = isMap; + lodash.isMatch = isMatch; + lodash.isMatchWith = isMatchWith; + lodash.isNaN = isNaN2; + lodash.isNative = isNative; + lodash.isNil = isNil; + lodash.isNull = isNull; + lodash.isNumber = isNumber; + lodash.isObject = isObject; + lodash.isObjectLike = isObjectLike; + lodash.isPlainObject = isPlainObject; + lodash.isRegExp = isRegExp; + lodash.isSafeInteger = isSafeInteger; + lodash.isSet = isSet; + lodash.isString = isString; + lodash.isSymbol = isSymbol; + lodash.isTypedArray = isTypedArray; + lodash.isUndefined = isUndefined; + lodash.isWeakMap = isWeakMap; + lodash.isWeakSet = isWeakSet; + lodash.join = join; + lodash.kebabCase = kebabCase; + lodash.last = last; + lodash.lastIndexOf = lastIndexOf; + lodash.lowerCase = lowerCase; + lodash.lowerFirst = lowerFirst; + lodash.lt = lt; + lodash.lte = lte; + lodash.max = max; + lodash.maxBy = maxBy; + lodash.mean = mean; + lodash.meanBy = meanBy; + lodash.min = min; + lodash.minBy = minBy; + lodash.stubArray = stubArray; + lodash.stubFalse = stubFalse; + lodash.stubObject = stubObject; + lodash.stubString = stubString; + lodash.stubTrue = stubTrue; + lodash.multiply = multiply; + lodash.nth = nth; + lodash.noConflict = noConflict; + lodash.noop = noop; + lodash.now = now; + lodash.pad = pad; + lodash.padEnd = padEnd; + lodash.padStart = padStart; + lodash.parseInt = parseInt2; + lodash.random = random; + lodash.reduce = reduce; + lodash.reduceRight = reduceRight; + lodash.repeat = repeat; + lodash.replace = replace; + lodash.result = result; + lodash.round = round; + lodash.runInContext = runInContext2; + lodash.sample = sample; + lodash.size = size; + lodash.snakeCase = snakeCase; + lodash.some = some; + lodash.sortedIndex = sortedIndex; + lodash.sortedIndexBy = sortedIndexBy; + lodash.sortedIndexOf = sortedIndexOf; + lodash.sortedLastIndex = sortedLastIndex; + lodash.sortedLastIndexBy = sortedLastIndexBy; + lodash.sortedLastIndexOf = sortedLastIndexOf; + lodash.startCase = startCase; + lodash.startsWith = startsWith; + lodash.subtract = subtract; + lodash.sum = sum; + lodash.sumBy = sumBy; + lodash.template = template; + lodash.times = times; + lodash.toFinite = toFinite; + lodash.toInteger = toInteger; + lodash.toLength = toLength; + lodash.toLower = toLower; + lodash.toNumber = toNumber; + lodash.toSafeInteger = toSafeInteger; + lodash.toString = toString; + lodash.toUpper = toUpper; + lodash.trim = trim; + lodash.trimEnd = trimEnd; + lodash.trimStart = trimStart; + lodash.truncate = truncate; + lodash.unescape = unescape2; + lodash.uniqueId = uniqueId; + lodash.upperCase = upperCase; + lodash.upperFirst = upperFirst; + lodash.each = forEach; + lodash.eachRight = forEachRight; + lodash.first = head; + mixin(lodash, function() { + var source = {}; + baseForOwn(lodash, function(func, methodName) { + if (!hasOwnProperty.call(lodash.prototype, methodName)) { + source[methodName] = func; + } + }); + return source; + }(), { "chain": false }); + lodash.VERSION = VERSION; + arrayEach(["bind", "bindKey", "curry", "curryRight", "partial", "partialRight"], function(methodName) { + lodash[methodName].placeholder = lodash; + }); + arrayEach(["drop", "take"], function(methodName, index) { + LazyWrapper.prototype[methodName] = function(n) { + n = n === undefined2 ? 1 : nativeMax(toInteger(n), 0); + var result2 = this.__filtered__ && !index ? new LazyWrapper(this) : this.clone(); + if (result2.__filtered__) { + result2.__takeCount__ = nativeMin(n, result2.__takeCount__); + } else { + result2.__views__.push({ + "size": nativeMin(n, MAX_ARRAY_LENGTH), + "type": methodName + (result2.__dir__ < 0 ? "Right" : "") + }); + } + return result2; + }; + LazyWrapper.prototype[methodName + "Right"] = function(n) { + return this.reverse()[methodName](n).reverse(); + }; + }); + arrayEach(["filter", "map", "takeWhile"], function(methodName, index) { + var type = index + 1, isFilter = type == LAZY_FILTER_FLAG || type == LAZY_WHILE_FLAG; + LazyWrapper.prototype[methodName] = function(iteratee2) { + var result2 = this.clone(); + result2.__iteratees__.push({ + "iteratee": getIteratee(iteratee2, 3), + "type": type + }); + result2.__filtered__ = result2.__filtered__ || isFilter; + return result2; + }; + }); + arrayEach(["head", "last"], function(methodName, index) { + var takeName = "take" + (index ? "Right" : ""); + LazyWrapper.prototype[methodName] = function() { + return this[takeName](1).value()[0]; + }; + }); + arrayEach(["initial", "tail"], function(methodName, index) { + var dropName = "drop" + (index ? "" : "Right"); + LazyWrapper.prototype[methodName] = function() { + return this.__filtered__ ? new LazyWrapper(this) : this[dropName](1); + }; + }); + LazyWrapper.prototype.compact = function() { + return this.filter(identity); + }; + LazyWrapper.prototype.find = function(predicate) { + return this.filter(predicate).head(); + }; + LazyWrapper.prototype.findLast = function(predicate) { + return this.reverse().find(predicate); + }; + LazyWrapper.prototype.invokeMap = baseRest(function(path, args) { + if (typeof path == "function") { + return new LazyWrapper(this); + } + return this.map(function(value) { + return baseInvoke(value, path, args); + }); + }); + LazyWrapper.prototype.reject = function(predicate) { + return this.filter(negate(getIteratee(predicate))); + }; + LazyWrapper.prototype.slice = function(start, end) { + start = toInteger(start); + var result2 = this; + if (result2.__filtered__ && (start > 0 || end < 0)) { + return new LazyWrapper(result2); + } + if (start < 0) { + result2 = result2.takeRight(-start); + } else if (start) { + result2 = result2.drop(start); + } + if (end !== undefined2) { + end = toInteger(end); + result2 = end < 0 ? result2.dropRight(-end) : result2.take(end - start); + } + return result2; + }; + LazyWrapper.prototype.takeRightWhile = function(predicate) { + return this.reverse().takeWhile(predicate).reverse(); + }; + LazyWrapper.prototype.toArray = function() { + return this.take(MAX_ARRAY_LENGTH); + }; + baseForOwn(LazyWrapper.prototype, function(func, methodName) { + var checkIteratee = /^(?:filter|find|map|reject)|While$/.test(methodName), isTaker = /^(?:head|last)$/.test(methodName), lodashFunc = lodash[isTaker ? "take" + (methodName == "last" ? "Right" : "") : methodName], retUnwrapped = isTaker || /^find/.test(methodName); + if (!lodashFunc) { + return; + } + lodash.prototype[methodName] = function() { + var value = this.__wrapped__, args = isTaker ? [1] : arguments, isLazy = value instanceof LazyWrapper, iteratee2 = args[0], useLazy = isLazy || isArray(value); + var interceptor = function(value2) { + var result3 = lodashFunc.apply(lodash, arrayPush([value2], args)); + return isTaker && chainAll ? result3[0] : result3; + }; + if (useLazy && checkIteratee && typeof iteratee2 == "function" && iteratee2.length != 1) { + isLazy = useLazy = false; + } + var chainAll = this.__chain__, isHybrid = !!this.__actions__.length, isUnwrapped = retUnwrapped && !chainAll, onlyLazy = isLazy && !isHybrid; + if (!retUnwrapped && useLazy) { + value = onlyLazy ? value : new LazyWrapper(this); + var result2 = func.apply(value, args); + result2.__actions__.push({ "func": thru, "args": [interceptor], "thisArg": undefined2 }); + return new LodashWrapper(result2, chainAll); + } + if (isUnwrapped && onlyLazy) { + return func.apply(this, args); + } + result2 = this.thru(interceptor); + return isUnwrapped ? isTaker ? result2.value()[0] : result2.value() : result2; + }; + }); + arrayEach(["pop", "push", "shift", "sort", "splice", "unshift"], function(methodName) { + var func = arrayProto[methodName], chainName = /^(?:push|sort|unshift)$/.test(methodName) ? "tap" : "thru", retUnwrapped = /^(?:pop|shift)$/.test(methodName); + lodash.prototype[methodName] = function() { + var args = arguments; + if (retUnwrapped && !this.__chain__) { + var value = this.value(); + return func.apply(isArray(value) ? value : [], args); + } + return this[chainName](function(value2) { + return func.apply(isArray(value2) ? value2 : [], args); + }); + }; + }); + baseForOwn(LazyWrapper.prototype, function(func, methodName) { + var lodashFunc = lodash[methodName]; + if (lodashFunc) { + var key = lodashFunc.name + ""; + if (!hasOwnProperty.call(realNames, key)) { + realNames[key] = []; + } + realNames[key].push({ "name": methodName, "func": lodashFunc }); + } + }); + realNames[createHybrid(undefined2, WRAP_BIND_KEY_FLAG).name] = [{ + "name": "wrapper", + "func": undefined2 + }]; + LazyWrapper.prototype.clone = lazyClone; + LazyWrapper.prototype.reverse = lazyReverse; + LazyWrapper.prototype.value = lazyValue; + lodash.prototype.at = wrapperAt; + lodash.prototype.chain = wrapperChain; + lodash.prototype.commit = wrapperCommit; + lodash.prototype.next = wrapperNext; + lodash.prototype.plant = wrapperPlant; + lodash.prototype.reverse = wrapperReverse; + lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = wrapperValue; + lodash.prototype.first = lodash.prototype.head; + if (symIterator) { + lodash.prototype[symIterator] = wrapperToIterator; + } + return lodash; + }; + var _2 = runInContext(); + if (typeof define == "function" && typeof define.amd == "object" && define.amd) { + root._ = _2; + define(function() { + return _2; + }); + } else if (freeModule) { + (freeModule.exports = _2)._ = _2; + freeExports._ = _2; + } else { + root._ = _2; + } + }).call(exports2); + } +}); + +// ../../node_modules/openapi-to-postmanv2/lib/bundleRules/spec30.js +var require_spec30 = __commonJS({ + "../../node_modules/openapi-to-postmanv2/lib/bundleRules/spec30.js"(exports2, module2) { + var SCHEMA_CONTAINERS = [ + "allOf", + "oneOf", + "anyOf", + "not", + "additionalProperties", + "items", + "schema" + ]; + var EXAMPLE_CONTAINERS = []; + var REQUEST_BODY_CONTAINER = [ + "requestBody" + ]; + var CONTAINERS = { + schemas: SCHEMA_CONTAINERS, + examples: EXAMPLE_CONTAINERS, + requestBodies: REQUEST_BODY_CONTAINER + }; + var DEFINITIONS = { + headers: "headers", + responses: "responses", + callbacks: "callbacks", + properties: "schemas", + links: "links", + examples: "examples" + }; + var INLINE = [ + "properties", + "value", + "example" + ]; + var ROOT_CONTAINERS_KEYS = [ + "components" + ]; + var COMPONENTS_KEYS = [ + "schemas", + "responses", + "parameters", + "examples", + "requestBodies", + "headers", + "securitySchemes", + "links", + "callbacks" + ]; + module2.exports = { + RULES_30: { + CONTAINERS, + DEFINITIONS, + COMPONENTS_KEYS, + INLINE, + ROOT_CONTAINERS_KEYS + } + }; + } +}); + +// ../../node_modules/openapi-to-postmanv2/lib/bundleRules/spec31.js +var require_spec31 = __commonJS({ + "../../node_modules/openapi-to-postmanv2/lib/bundleRules/spec31.js"(exports2, module2) { + var SCHEMA_CONTAINERS = [ + "allOf", + "oneOf", + "anyOf", + "not", + "additionalProperties", + "items", + "schema" + ]; + var EXAMPLE_CONTAINERS = []; + var REQUEST_BODY_CONTAINER = [ + "requestBody" + ]; + var CONTAINERS = { + schemas: SCHEMA_CONTAINERS, + examples: EXAMPLE_CONTAINERS, + requestBodies: REQUEST_BODY_CONTAINER + }; + var DEFINITIONS = { + headers: "headers", + responses: "responses", + callbacks: "callbacks", + properties: "schemas", + links: "links", + paths: "pathItems", + examples: "examples" + }; + var INLINE = [ + "properties", + "value", + "example" + ]; + var ROOT_CONTAINERS_KEYS = [ + "components" + ]; + var COMPONENTS_KEYS = [ + "schemas", + "responses", + "parameters", + "examples", + "requestBodies", + "headers", + "securitySchemes", + "links", + "callbacks", + "pathItems" + ]; + module2.exports = { + RULES_31: { + CONTAINERS, + DEFINITIONS, + COMPONENTS_KEYS, + INLINE, + ROOT_CONTAINERS_KEYS + } + }; + } +}); + +// ../../node_modules/openapi-to-postmanv2/lib/bundleRules/spec20.js +var require_spec20 = __commonJS({ + "../../node_modules/openapi-to-postmanv2/lib/bundleRules/spec20.js"(exports2, module2) { + var SCHEMA_CONTAINERS = [ + "schema", + "items", + "allOf", + "additionalProperties" + ]; + var CONTAINERS = { + definitions: SCHEMA_CONTAINERS + }; + var DEFINITIONS = { + properties: "definitions", + responses: "responses" + }; + var INLINE = [ + "examples", + "value", + "example" + ]; + var COMPONENTS_KEYS = [ + "definitions", + "parameters", + "responses", + "securityDefinitions" + ]; + var ROOT_CONTAINERS_KEYS = COMPONENTS_KEYS; + module2.exports = { + RULES_20: { + CONTAINERS, + DEFINITIONS, + COMPONENTS_KEYS, + INLINE, + ROOT_CONTAINERS_KEYS + } + }; + } +}); + +// ../../node_modules/openapi-to-postmanv2/lib/30XUtils/inputValidation.js +var require_inputValidation = __commonJS({ + "../../node_modules/openapi-to-postmanv2/lib/30XUtils/inputValidation.js"(exports2, module2) { + var _2 = require_lodash(); + module2.exports = { + /** + * Validate Spec to check if some of the required fields are present. + * + * @param {Object} spec OpenAPI spec + * @return {Object} Validation result + */ + validateSpec: function(spec) { + if (_2.isNil(spec)) { + return { + result: false, + reason: "The Specification is null or undefined" + }; + } + if (_2.isNil(spec.openapi)) { + return { + result: false, + reason: "Specification must contain a semantic version number of the OAS specification" + }; + } + if (_2.isNil(spec.paths)) { + return { + result: false, + reason: "Specification must contain Paths Object for the available operational paths" + }; + } + if (_2.isNil(spec.info)) { + return { + result: false, + reason: "Specification must contain an Info Object for the meta-data of the API" + }; + } + if (!_2.has(spec.info, "$ref")) { + if (_2.isNil(_2.get(spec, "info.title"))) { + return { + result: false, + reason: "Specification must contain a title in order to generate a collection" + }; + } + if (_2.isNil(_2.get(spec, "info.version"))) { + return { + result: false, + reason: "Specification must contain a semantic version number of the API in the Info Object" + }; + } + } + return { + result: true, + openapi: spec + }; + } + }; + } +}); + +// ../../node_modules/js-yaml/lib/common.js +var require_common = __commonJS({ + "../../node_modules/js-yaml/lib/common.js"(exports2, module2) { + "use strict"; + function isNothing(subject) { + return typeof subject === "undefined" || subject === null; + } + function isObject(subject) { + return typeof subject === "object" && subject !== null; + } + function toArray2(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; + } + module2.exports.isNothing = isNothing; + module2.exports.isObject = isObject; + module2.exports.toArray = toArray2; + module2.exports.repeat = repeat; + module2.exports.isNegativeZero = isNegativeZero; + module2.exports.extend = extend; + } +}); + +// ../../node_modules/js-yaml/lib/exception.js +var require_exception = __commonJS({ + "../../node_modules/js-yaml/lib/exception.js"(exports2, module2) { + "use strict"; + 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) { + 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 || ""; + } + } + YAMLException.prototype = Object.create(Error.prototype); + YAMLException.prototype.constructor = YAMLException; + YAMLException.prototype.toString = function toString(compact) { + return this.name + ": " + formatError(this, compact); + }; + module2.exports = YAMLException; + } +}); + +// ../../node_modules/js-yaml/lib/snippet.js +var require_snippet = __commonJS({ + "../../node_modules/js-yaml/lib/snippet.js"(exports2, module2) { + "use strict"; + var common = require_common(); + 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, "\u2192") + 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$/, ""); + } + module2.exports = makeSnippet; + } +}); + +// ../../node_modules/js-yaml/lib/type.js +var require_type = __commonJS({ + "../../node_modules/js-yaml/lib/type.js"(exports2, module2) { + "use strict"; + var YAMLException = require_exception(); + var TYPE_CONSTRUCTOR_OPTIONS = [ + "kind", + "multi", + "resolve", + "construct", + "instanceOf", + "predicate", + "represent", + "representName", + "defaultStyle", + "styleAliases" + ]; + var YAML_NODE_KINDS = [ + "scalar", + "sequence", + "mapping" + ]; + function compileStyleAliases(map) { + var result = {}; + if (map !== null) { + Object.keys(map).forEach(function(style) { + map[style].forEach(function(alias) { + result[String(alias)] = style; + }); + }); + } + return result; + } + function Type(tag, options) { + options = options || {}; + Object.keys(options).forEach(function(name) { + if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) { + throw new YAMLException('Unknown option "' + name + '" is met in definition of "' + tag + '" YAML type.'); + } + }); + this.options = options; + this.tag = tag; + this.kind = options["kind"] || null; + this.resolve = options["resolve"] || function() { + return true; + }; + this.construct = options["construct"] || function(data) { + return data; + }; + this.instanceOf = options["instanceOf"] || null; + this.predicate = options["predicate"] || null; + this.represent = options["represent"] || null; + this.representName = options["representName"] || null; + this.defaultStyle = options["defaultStyle"] || null; + this.multi = options["multi"] || false; + this.styleAliases = compileStyleAliases(options["styleAliases"] || null); + if (YAML_NODE_KINDS.indexOf(this.kind) === -1) { + throw new YAMLException('Unknown kind "' + this.kind + '" is specified for "' + tag + '" YAML type.'); + } + } + module2.exports = Type; + } +}); + +// ../../node_modules/js-yaml/lib/schema.js +var require_schema = __commonJS({ + "../../node_modules/js-yaml/lib/schema.js"(exports2, module2) { + "use strict"; + var YAMLException = require_exception(); + var Type = require_type(); + 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(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) { + explicit.push(definition); + } else if (Array.isArray(definition)) { + explicit = explicit.concat(definition); + } else if (definition && (Array.isArray(definition.implicit) || Array.isArray(definition.explicit))) { + if (definition.implicit) implicit = implicit.concat(definition.implicit); + if (definition.explicit) explicit = explicit.concat(definition.explicit); + } else { + throw new YAMLException("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })"); + } + implicit.forEach(function(type) { + if (!(type instanceof Type)) { + throw new YAMLException("Specified list of YAML types (or a single Type object) contains a non-Type object."); + } + if (type.loadKind && type.loadKind !== "scalar") { + throw new YAMLException("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported."); + } + if (type.multi) { + throw new YAMLException("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit."); + } + }); + explicit.forEach(function(type) { + if (!(type instanceof Type)) { + throw new YAMLException("Specified list of YAML types (or a single Type object) contains a non-Type object."); + } + }); + 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; + }; + module2.exports = Schema; + } +}); + +// ../../node_modules/js-yaml/lib/type/str.js +var require_str = __commonJS({ + "../../node_modules/js-yaml/lib/type/str.js"(exports2, module2) { + "use strict"; + var Type = require_type(); + module2.exports = new Type("tag:yaml.org,2002:str", { + kind: "scalar", + construct: function(data) { + return data !== null ? data : ""; + } + }); + } +}); + +// ../../node_modules/js-yaml/lib/type/seq.js +var require_seq = __commonJS({ + "../../node_modules/js-yaml/lib/type/seq.js"(exports2, module2) { + "use strict"; + var Type = require_type(); + module2.exports = new Type("tag:yaml.org,2002:seq", { + kind: "sequence", + construct: function(data) { + return data !== null ? data : []; + } + }); + } +}); + +// ../../node_modules/js-yaml/lib/type/map.js +var require_map = __commonJS({ + "../../node_modules/js-yaml/lib/type/map.js"(exports2, module2) { + "use strict"; + var Type = require_type(); + module2.exports = new Type("tag:yaml.org,2002:map", { + kind: "mapping", + construct: function(data) { + return data !== null ? data : {}; + } + }); + } +}); + +// ../../node_modules/js-yaml/lib/schema/failsafe.js +var require_failsafe = __commonJS({ + "../../node_modules/js-yaml/lib/schema/failsafe.js"(exports2, module2) { + "use strict"; + var Schema = require_schema(); + module2.exports = new Schema({ + explicit: [ + require_str(), + require_seq(), + require_map() + ] + }); + } +}); + +// ../../node_modules/js-yaml/lib/type/null.js +var require_null = __commonJS({ + "../../node_modules/js-yaml/lib/type/null.js"(exports2, module2) { + "use strict"; + var Type = require_type(); + function resolveYamlNull(data) { + if (data === null) return true; + var max = data.length; + return max === 1 && data === "~" || max === 4 && (data === "null" || data === "Null" || data === "NULL"); + } + function constructYamlNull() { + return null; + } + function isNull(object) { + return object === null; + } + module2.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" + }); + } +}); + +// ../../node_modules/js-yaml/lib/type/bool.js +var require_bool = __commonJS({ + "../../node_modules/js-yaml/lib/type/bool.js"(exports2, module2) { + "use strict"; + var Type = require_type(); + function resolveYamlBoolean(data) { + if (data === null) return false; + var max = data.length; + return max === 4 && (data === "true" || data === "True" || data === "TRUE") || max === 5 && (data === "false" || data === "False" || data === "FALSE"); + } + function constructYamlBoolean(data) { + return data === "true" || data === "True" || data === "TRUE"; + } + function isBoolean(object) { + return Object.prototype.toString.call(object) === "[object Boolean]"; + } + module2.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" + }); + } +}); + +// ../../node_modules/js-yaml/lib/type/int.js +var require_int = __commonJS({ + "../../node_modules/js-yaml/lib/type/int.js"(exports2, module2) { + "use strict"; + var common = require_common(); + var Type = require_type(); + function isHexCode(c) { + return 48 <= c && c <= 57 || 65 <= c && c <= 70 || 97 <= c && c <= 102; + } + function isOctCode(c) { + return 48 <= c && c <= 55; + } + function isDecCode(c) { + return 48 <= c && c <= 57; + } + function resolveYamlInteger(data) { + if (data === null) return false; + var max = data.length, index = 0, hasDigits = false, ch; + if (!max) return false; + ch = data[index]; + if (ch === "-" || ch === "+") { + ch = data[++index]; + } + if (ch === "0") { + if (index + 1 === max) return true; + ch = data[++index]; + if (ch === "b") { + index++; + for (; index < max; index++) { + ch = data[index]; + if (ch === "_") continue; + if (ch !== "0" && ch !== "1") return false; + hasDigits = true; + } + return hasDigits && ch !== "_"; + } + if (ch === "x") { + index++; + for (; index < max; index++) { + ch = data[index]; + if (ch === "_") continue; + if (!isHexCode(data.charCodeAt(index))) return false; + hasDigits = true; + } + return hasDigits && ch !== "_"; + } + 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 !== "_"; + } + } + 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; + } + 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)); + } + module2.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"] + } + }); + } +}); + +// ../../node_modules/js-yaml/lib/type/float.js +var require_float = __commonJS({ + "../../node_modules/js-yaml/lib/type/float.js"(exports2, module2) { + "use strict"; + var common = require_common(); + var Type = require_type(); + var 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))$" + ); + 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); + 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)); + } + module2.exports = new Type("tag:yaml.org,2002:float", { + kind: "scalar", + resolve: resolveYamlFloat, + construct: constructYamlFloat, + predicate: isFloat, + represent: representYamlFloat, + defaultStyle: "lowercase" + }); + } +}); + +// ../../node_modules/js-yaml/lib/schema/json.js +var require_json = __commonJS({ + "../../node_modules/js-yaml/lib/schema/json.js"(exports2, module2) { + "use strict"; + module2.exports = require_failsafe().extend({ + implicit: [ + require_null(), + require_bool(), + require_int(), + require_float() + ] + }); + } +}); + +// ../../node_modules/js-yaml/lib/schema/core.js +var require_core = __commonJS({ + "../../node_modules/js-yaml/lib/schema/core.js"(exports2, module2) { + "use strict"; + module2.exports = require_json(); + } +}); + +// ../../node_modules/js-yaml/lib/type/timestamp.js +var require_timestamp = __commonJS({ + "../../node_modules/js-yaml/lib/type/timestamp.js"(exports2, module2) { + "use strict"; + var Type = require_type(); + var YAML_DATE_REGEXP = new RegExp( + "^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$" + ); + 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 (data === null) return false; + if (YAML_DATE_REGEXP.exec(data) !== null) return true; + if (YAML_TIMESTAMP_REGEXP.exec(data) !== null) return true; + return false; + } + function constructYamlTimestamp(data) { + var match, year, month, day, hour, minute, second, fraction = 0, delta = null, tz_hour, tz_minute, date; + match = YAML_DATE_REGEXP.exec(data); + if (match === null) match = YAML_TIMESTAMP_REGEXP.exec(data); + if (match === null) throw new Error("Date resolve error"); + year = +match[1]; + month = +match[2] - 1; + day = +match[3]; + if (!match[4]) { + return new Date(Date.UTC(year, month, day)); + } + hour = +match[4]; + minute = +match[5]; + second = +match[6]; + if (match[7]) { + fraction = match[7].slice(0, 3); + while (fraction.length < 3) { + fraction += "0"; + } + fraction = +fraction; + } + if (match[9]) { + tz_hour = +match[10]; + tz_minute = +(match[11] || 0); + delta = (tz_hour * 60 + tz_minute) * 6e4; + if (match[9] === "-") delta = -delta; + } + date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction)); + if (delta) date.setTime(date.getTime() - delta); + return date; + } + function representYamlTimestamp(object) { + return object.toISOString(); + } + module2.exports = new Type("tag:yaml.org,2002:timestamp", { + kind: "scalar", + resolve: resolveYamlTimestamp, + construct: constructYamlTimestamp, + instanceOf: Date, + represent: representYamlTimestamp + }); + } +}); + +// ../../node_modules/js-yaml/lib/type/merge.js +var require_merge = __commonJS({ + "../../node_modules/js-yaml/lib/type/merge.js"(exports2, module2) { + "use strict"; + var Type = require_type(); + function resolveYamlMerge(data) { + return data === "<<" || data === null; + } + module2.exports = new Type("tag:yaml.org,2002:merge", { + kind: "scalar", + resolve: resolveYamlMerge + }); + } +}); + +// ../../node_modules/js-yaml/lib/type/binary.js +var require_binary = __commonJS({ + "../../node_modules/js-yaml/lib/type/binary.js"(exports2, module2) { + "use strict"; + var Type = require_type(); + var BASE64_MAP = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r"; + function resolveYamlBinary(data) { + if (data === null) return false; + var code, idx, bitlen = 0, max = data.length, map = BASE64_MAP; + for (idx = 0; idx < max; idx++) { + code = map.indexOf(data.charAt(idx)); + if (code > 64) continue; + if (code < 0) return false; + bitlen += 6; + } + return bitlen % 8 === 0; + } + function constructYamlBinary(data) { + var idx, tailbits, input = data.replace(/[\r\n=]/g, ""), max = input.length, map = BASE64_MAP, bits = 0, result = []; + for (idx = 0; idx < max; idx++) { + if (idx % 4 === 0 && idx) { + result.push(bits >> 16 & 255); + result.push(bits >> 8 & 255); + result.push(bits & 255); + } + bits = bits << 6 | map.indexOf(input.charAt(idx)); + } + tailbits = max % 4 * 6; + if (tailbits === 0) { + result.push(bits >> 16 & 255); + result.push(bits >> 8 & 255); + result.push(bits & 255); + } else if (tailbits === 18) { + result.push(bits >> 10 & 255); + result.push(bits >> 2 & 255); + } else if (tailbits === 12) { + result.push(bits >> 4 & 255); + } + return new Uint8Array(result); + } + function representYamlBinary(object) { + var result = "", bits = 0, idx, tail, max = object.length, map = BASE64_MAP; + for (idx = 0; idx < max; idx++) { + if (idx % 3 === 0 && idx) { + result += map[bits >> 18 & 63]; + result += map[bits >> 12 & 63]; + result += map[bits >> 6 & 63]; + result += map[bits & 63]; + } + bits = (bits << 8) + object[idx]; + } + tail = max % 3; + if (tail === 0) { + result += map[bits >> 18 & 63]; + result += map[bits >> 12 & 63]; + result += map[bits >> 6 & 63]; + result += map[bits & 63]; + } else if (tail === 2) { + result += map[bits >> 10 & 63]; + result += map[bits >> 4 & 63]; + result += map[bits << 2 & 63]; + result += map[64]; + } else if (tail === 1) { + result += map[bits >> 2 & 63]; + result += map[bits << 4 & 63]; + result += map[64]; + result += map[64]; + } + return result; + } + function isBinary(obj) { + return Object.prototype.toString.call(obj) === "[object Uint8Array]"; + } + module2.exports = new Type("tag:yaml.org,2002:binary", { + kind: "scalar", + resolve: resolveYamlBinary, + construct: constructYamlBinary, + predicate: isBinary, + represent: representYamlBinary + }); + } +}); + +// ../../node_modules/js-yaml/lib/type/omap.js +var require_omap = __commonJS({ + "../../node_modules/js-yaml/lib/type/omap.js"(exports2, module2) { + "use strict"; + var Type = require_type(); + var _hasOwnProperty = Object.prototype.hasOwnProperty; + var _toString = Object.prototype.toString; + function resolveYamlOmap(data) { + if (data === null) return true; + var objectKeys = [], index, length, pair, pairKey, pairHasKey, object = data; + for (index = 0, length = object.length; index < length; index += 1) { + pair = object[index]; + pairHasKey = false; + if (_toString.call(pair) !== "[object Object]") return false; + for (pairKey in pair) { + if (_hasOwnProperty.call(pair, pairKey)) { + if (!pairHasKey) pairHasKey = true; + else return false; + } + } + if (!pairHasKey) return false; + if (objectKeys.indexOf(pairKey) === -1) objectKeys.push(pairKey); + else return false; + } + return true; + } + function constructYamlOmap(data) { + return data !== null ? data : []; + } + module2.exports = new Type("tag:yaml.org,2002:omap", { + kind: "sequence", + resolve: resolveYamlOmap, + construct: constructYamlOmap + }); + } +}); + +// ../../node_modules/js-yaml/lib/type/pairs.js +var require_pairs = __commonJS({ + "../../node_modules/js-yaml/lib/type/pairs.js"(exports2, module2) { + "use strict"; + var Type = require_type(); + var _toString = Object.prototype.toString; + function resolveYamlPairs(data) { + if (data === null) return true; + var index, length, pair, keys, result, object = data; + result = new Array(object.length); + for (index = 0, length = object.length; index < length; index += 1) { + pair = object[index]; + if (_toString.call(pair) !== "[object Object]") return false; + keys = Object.keys(pair); + if (keys.length !== 1) return false; + result[index] = [keys[0], pair[keys[0]]]; + } + return true; + } + function constructYamlPairs(data) { + if (data === null) return []; + var index, length, pair, keys, result, object = data; + result = new Array(object.length); + for (index = 0, length = object.length; index < length; index += 1) { + pair = object[index]; + keys = Object.keys(pair); + result[index] = [keys[0], pair[keys[0]]]; + } + return result; + } + module2.exports = new Type("tag:yaml.org,2002:pairs", { + kind: "sequence", + resolve: resolveYamlPairs, + construct: constructYamlPairs + }); + } +}); + +// ../../node_modules/js-yaml/lib/type/set.js +var require_set = __commonJS({ + "../../node_modules/js-yaml/lib/type/set.js"(exports2, module2) { + "use strict"; + var Type = require_type(); + var _hasOwnProperty = Object.prototype.hasOwnProperty; + function resolveYamlSet(data) { + if (data === null) return true; + var key, object = data; + for (key in object) { + if (_hasOwnProperty.call(object, key)) { + if (object[key] !== null) return false; + } + } + return true; + } + function constructYamlSet(data) { + return data !== null ? data : {}; + } + module2.exports = new Type("tag:yaml.org,2002:set", { + kind: "mapping", + resolve: resolveYamlSet, + construct: constructYamlSet + }); + } +}); + +// ../../node_modules/js-yaml/lib/schema/default.js +var require_default = __commonJS({ + "../../node_modules/js-yaml/lib/schema/default.js"(exports2, module2) { + "use strict"; + module2.exports = require_core().extend({ + implicit: [ + require_timestamp(), + require_merge() + ], + explicit: [ + require_binary(), + require_omap(), + require_pairs(), + require_set() + ] + }); + } +}); + +// ../../node_modules/js-yaml/lib/loader.js +var require_loader = __commonJS({ + "../../node_modules/js-yaml/lib/loader.js"(exports2, module2) { + "use strict"; + var common = require_common(); + var YAMLException = require_exception(); + var makeSnippet = require_snippet(); + var DEFAULT_SCHEMA = require_default(); + var _hasOwnProperty = Object.prototype.hasOwnProperty; + var CONTEXT_FLOW_IN = 1; + var CONTEXT_FLOW_OUT = 2; + var CONTEXT_BLOCK_IN = 3; + var CONTEXT_BLOCK_OUT = 4; + var CHOMPING_CLIP = 1; + var CHOMPING_STRIP = 2; + var CHOMPING_KEEP = 3; + var PATTERN_NON_PRINTABLE = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/; + var PATTERN_NON_ASCII_LINE_BREAKS = /[\x85\u2028\u2029]/; + var PATTERN_FLOW_INDICATORS = /[,\[\]\{\}]/; + var PATTERN_TAG_HANDLE = /^(?:!|!!|![a-z\-]+!)$/i; + var PATTERN_TAG_URI = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i; + function _class(obj) { + return Object.prototype.toString.call(obj); + } + function is_EOL(c) { + return c === 10 || c === 13; + } + function is_WHITE_SPACE(c) { + return c === 9 || c === 32; + } + function is_WS_OR_EOL(c) { + return c === 9 || c === 32 || c === 10 || c === 13; + } + function is_FLOW_INDICATOR(c) { + return c === 44 || c === 91 || c === 93 || c === 123 || c === 125; + } + function fromHexCode(c) { + var lc; + if (48 <= c && c <= 57) { + return c - 48; + } + lc = c | 32; + if (97 <= lc && lc <= 102) { + return lc - 97 + 10; + } + return -1; + } + function escapedHexLen(c) { + if (c === 120) { + return 2; + } + if (c === 117) { + return 4; + } + if (c === 85) { + return 8; + } + return 0; + } + function fromDecimalCode(c) { + if (48 <= c && c <= 57) { + return c - 48; + } + return -1; + } + function simpleEscapeSequence(c) { + return c === 48 ? "\0" : c === 97 ? "\x07" : c === 98 ? "\b" : c === 116 ? " " : c === 9 ? " " : c === 110 ? "\n" : c === 118 ? "\v" : c === 102 ? "\f" : c === 114 ? "\r" : c === 101 ? "\x1B" : c === 32 ? " " : c === 34 ? '"' : c === 47 ? "/" : c === 92 ? "\\" : c === 78 ? "\x85" : c === 95 ? "\xA0" : c === 76 ? "\u2028" : c === 80 ? "\u2029" : ""; + } + function charFromCodepoint(c) { + if (c <= 65535) { + return String.fromCharCode(c); + } + return String.fromCharCode( + (c - 65536 >> 10) + 55296, + (c - 65536 & 1023) + 56320 + ); + } + var simpleEscapeCheck = new Array(256); + var simpleEscapeMap = new Array(256); + for (i = 0; i < 256; i++) { + simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0; + simpleEscapeMap[i] = simpleEscapeSequence(i); + } + var i; + function State(input, options) { + this.input = input; + this.filename = options["filename"] || null; + this.schema = options["schema"] || DEFAULT_SCHEMA; + this.onWarning = options["onWarning"] || null; + this.legacy = options["legacy"] || false; + this.json = options["json"] || false; + this.listener = options["listener"] || null; + this.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 = 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 === 9 || 32 <= _character && _character <= 1114111)) { + throwError(state, "expected valid JSON character"); + } + } + } else if (PATTERN_NON_PRINTABLE.test(_result)) { + throwError(state, "the stream contains non-printable characters"); + } + state.result += _result; + } + } + function mergeMappings(state, destination, source, overridableKeys) { + var sourceKeys, key, index, quantity; + if (!common.isObject(source)) { + throwError(state, "cannot merge mappings; the provided source object is unacceptable"); + } + sourceKeys = Object.keys(source); + for (index = 0, quantity = sourceKeys.length; index < quantity; index += 1) { + key = sourceKeys[index]; + if (!_hasOwnProperty.call(destination, key)) { + destination[key] = source[key]; + overridableKeys[key] = true; + } + } + } + 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 (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"); + } + if (keyNode === "__proto__") { + Object.defineProperty(_result, keyNode, { + configurable: true, + enumerable: true, + writable: true, + value: valueNode + }); + } else { + _result[keyNode] = valueNode; + } + delete overridableKeys[keyNode]; + } + return _result; + } + 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++; + } + } 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 === 9 && state.firstTabInLine === -1) { + state.firstTabInLine = state.position; + } + ch = state.input.charCodeAt(++state.position); + } + if (allowComments && ch === 35) { + do { + ch = state.input.charCodeAt(++state.position); + } while (ch !== 10 && ch !== 13 && ch !== 0); + } + if (is_EOL(ch)) { + readLineBreak(state); + ch = state.input.charCodeAt(state.position); + lineBreaks++; + state.lineIndent = 0; + while (ch === 32) { + state.lineIndent++; + ch = state.input.charCodeAt(++state.position); + } + } else { + break; + } + } + if (checkIndent !== -1 && lineBreaks !== 0 && state.lineIndent < checkIndent) { + throwWarning(state, "deficient indentation"); + } + return lineBreaks; + } + function testDocumentSeparator(state) { + var _position = state.position, ch; + ch = state.input.charCodeAt(_position); + if ((ch === 45 || ch === 46) && ch === state.input.charCodeAt(_position + 1) && ch === state.input.charCodeAt(_position + 2)) { + _position += 3; + ch = state.input.charCodeAt(_position); + if (ch === 0 || is_WS_OR_EOL(ch)) { + return true; + } + } + return false; + } + function writeFoldedLines(state, count) { + if (count === 1) { + state.result += " "; + } else if (count > 1) { + state.result += common.repeat("\n", count - 1); + } + } + function readPlainScalar(state, nodeIndent, withinFlowCollection) { + var preceding, following, captureStart, captureEnd, hasPendingContent, _line, _lineStart, _lineIndent, _kind = state.kind, _result = state.result, ch; + ch = state.input.charCodeAt(state.position); + if (is_WS_OR_EOL(ch) || is_FLOW_INDICATOR(ch) || ch === 35 || ch === 38 || ch === 42 || ch === 33 || ch === 124 || ch === 62 || ch === 39 || ch === 34 || ch === 37 || ch === 64 || ch === 96) { + return false; + } + if (ch === 63 || ch === 45) { + following = state.input.charCodeAt(state.position + 1); + if (is_WS_OR_EOL(following) || withinFlowCollection && is_FLOW_INDICATOR(following)) { + return false; + } + } + state.kind = "scalar"; + state.result = ""; + captureStart = captureEnd = state.position; + hasPendingContent = false; + while (ch !== 0) { + if (ch === 58) { + following = state.input.charCodeAt(state.position + 1); + if (is_WS_OR_EOL(following) || withinFlowCollection && is_FLOW_INDICATOR(following)) { + break; + } + } else if (ch === 35) { + preceding = state.input.charCodeAt(state.position - 1); + if (is_WS_OR_EOL(preceding)) { + break; + } + } else if (state.position === state.lineStart && testDocumentSeparator(state) || withinFlowCollection && is_FLOW_INDICATOR(ch)) { + break; + } else if (is_EOL(ch)) { + _line = state.line; + _lineStart = state.lineStart; + _lineIndent = state.lineIndent; + skipSeparationSpace(state, false, -1); + if (state.lineIndent >= nodeIndent) { + hasPendingContent = true; + ch = state.input.charCodeAt(state.position); + continue; + } else { + state.position = captureEnd; + state.line = _line; + state.lineStart = _lineStart; + state.lineIndent = _lineIndent; + break; + } + } + if (hasPendingContent) { + captureSegment(state, captureStart, captureEnd, false); + writeFoldedLines(state, state.line - _line); + captureStart = captureEnd = state.position; + hasPendingContent = false; + } + if (!is_WHITE_SPACE(ch)) { + captureEnd = state.position + 1; + } + ch = state.input.charCodeAt(++state.position); + } + captureSegment(state, captureStart, captureEnd, false); + if (state.result) { + return true; + } + state.kind = _kind; + state.result = _result; + return false; + } + function readSingleQuotedScalar(state, nodeIndent) { + var ch, captureStart, captureEnd; + ch = state.input.charCodeAt(state.position); + if (ch !== 39) { + return false; + } + state.kind = "scalar"; + state.result = ""; + state.position++; + captureStart = captureEnd = state.position; + while ((ch = state.input.charCodeAt(state.position)) !== 0) { + if (ch === 39) { + captureSegment(state, captureStart, state.position, true); + ch = state.input.charCodeAt(++state.position); + if (ch === 39) { + captureStart = state.position; + state.position++; + captureEnd = state.position; + } else { + return true; + } + } else if (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 !== 34) { + return false; + } + state.kind = "scalar"; + state.result = ""; + state.position++; + captureStart = captureEnd = state.position; + while ((ch = state.input.charCodeAt(state.position)) !== 0) { + if (ch === 34) { + captureSegment(state, captureStart, state.position, true); + state.position++; + return true; + } else if (ch === 92) { + captureSegment(state, captureStart, state.position, true); + ch = state.input.charCodeAt(++state.position); + if (is_EOL(ch)) { + skipSeparationSpace(state, false, nodeIndent); + } else if (ch < 256 && simpleEscapeCheck[ch]) { + state.result += simpleEscapeMap[ch]; + state.position++; + } else if ((tmp = escapedHexLen(ch)) > 0) { + hexLength = tmp; + hexResult = 0; + for (; hexLength > 0; hexLength--) { + ch = state.input.charCodeAt(++state.position); + if ((tmp = fromHexCode(ch)) >= 0) { + hexResult = (hexResult << 4) + tmp; + } else { + throwError(state, "expected hexadecimal character"); + } + } + state.result += charFromCodepoint(hexResult); + state.position++; + } else { + throwError(state, "unknown escape sequence"); + } + captureStart = captureEnd = state.position; + } else if (is_EOL(ch)) { + captureSegment(state, captureStart, captureEnd, true); + writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent)); + captureStart = captureEnd = state.position; + } else if (state.position === state.lineStart && testDocumentSeparator(state)) { + throwError(state, "unexpected end of the document within a double quoted scalar"); + } else { + state.position++; + captureEnd = state.position; + } + } + throwError(state, "unexpected end of the stream within a double quoted scalar"); + } + function readFlowCollection(state, nodeIndent) { + var readNext = true, _line, _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; + } + 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 ','"); + } + keyTag = keyNode = valueNode = null; + isPair = isExplicitPair = false; + if (ch === 63) { + following = state.input.charCodeAt(state.position + 1); + if (is_WS_OR_EOL(following)) { + isPair = isExplicitPair = true; + state.position++; + skipSeparationSpace(state, true, nodeIndent); + } + } + _line = state.line; + _lineStart = state.lineStart; + _pos = state.position; + composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); + keyTag = state.tag; + keyNode = state.result; + skipSeparationSpace(state, true, nodeIndent); + ch = state.input.charCodeAt(state.position); + if ((isExplicitPair || state.line === _line) && ch === 58) { + isPair = true; + ch = state.input.charCodeAt(++state.position); + skipSeparationSpace(state, true, nodeIndent); + composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); + valueNode = state.result; + } + if (isMapping) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos); + } else if (isPair) { + _result.push(storeMappingPair(state, null, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos)); + } else { + _result.push(keyNode); + } + skipSeparationSpace(state, true, nodeIndent); + ch = state.input.charCodeAt(state.position); + if (ch === 44) { + readNext = true; + ch = state.input.charCodeAt(++state.position); + } else { + readNext = false; + } + } + throwError(state, "unexpected end of the stream within a flow collection"); + } + function readBlockScalar(state, nodeIndent) { + 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; + } + state.kind = "scalar"; + state.result = ""; + while (ch !== 0) { + ch = state.input.charCodeAt(++state.position); + if (ch === 43 || ch === 45) { + if (CHOMPING_CLIP === chomping) { + chomping = ch === 43 ? CHOMPING_KEEP : CHOMPING_STRIP; + } else { + throwError(state, "repeat of a chomping mode identifier"); + } + } else if ((tmp = fromDecimalCode(ch)) >= 0) { + if (tmp === 0) { + throwError(state, "bad explicit indentation width of a block scalar; it cannot be less than one"); + } else if (!detectedIndent) { + textIndent = nodeIndent + tmp - 1; + detectedIndent = true; + } else { + throwError(state, "repeat of an indentation width identifier"); + } + } else { + break; + } + } + if (is_WHITE_SPACE(ch)) { + do { + ch = state.input.charCodeAt(++state.position); + } while (is_WHITE_SPACE(ch)); + if (ch === 35) { + do { + ch = state.input.charCodeAt(++state.position); + } while (!is_EOL(ch) && ch !== 0); + } + } + while (ch !== 0) { + readLineBreak(state); + state.lineIndent = 0; + ch = state.input.charCodeAt(state.position); + while ((!detectedIndent || state.lineIndent < textIndent) && ch === 32) { + state.lineIndent++; + ch = state.input.charCodeAt(++state.position); + } + if (!detectedIndent && state.lineIndent > textIndent) { + textIndent = state.lineIndent; + } + if (is_EOL(ch)) { + emptyLines++; + continue; + } + if (state.lineIndent < textIndent) { + if (chomping === CHOMPING_KEEP) { + state.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines); + } else if (chomping === CHOMPING_CLIP) { + if (didReadContent) { + state.result += "\n"; + } + } + break; + } + if (folding) { + if (is_WHITE_SPACE(ch)) { + atMoreIndented = true; + state.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines); + } else if (atMoreIndented) { + atMoreIndented = false; + state.result += common.repeat("\n", emptyLines + 1); + } else if (emptyLines === 0) { + if (didReadContent) { + state.result += " "; + } + } else { + state.result += common.repeat("\n", emptyLines); + } + } else { + state.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines); + } + didReadContent = true; + detectedIndent = true; + emptyLines = 0; + captureStart = state.position; + while (!is_EOL(ch) && ch !== 0) { + ch = state.input.charCodeAt(++state.position); + } + captureSegment(state, captureStart, state.position, false); + } + return true; + } + function readBlockSequence(state, nodeIndent) { + var _line, _tag = state.tag, _anchor = state.anchor, _result = [], following, detected = false, ch; + if (state.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 !== 45) { + break; + } + following = state.input.charCodeAt(state.position + 1); + if (!is_WS_OR_EOL(following)) { + break; + } + detected = true; + state.position++; + if (skipSeparationSpace(state, true, -1)) { + if (state.lineIndent <= nodeIndent) { + _result.push(null); + ch = state.input.charCodeAt(state.position); + continue; + } + } + _line = state.line; + composeNode(state, nodeIndent, CONTEXT_BLOCK_IN, false, true); + _result.push(state.result); + skipSeparationSpace(state, true, -1); + ch = state.input.charCodeAt(state.position); + if ((state.line === _line || state.lineIndent > nodeIndent) && ch !== 0) { + throwError(state, "bad indentation of a sequence entry"); + } else if (state.lineIndent < nodeIndent) { + break; + } + } + if (detected) { + state.tag = _tag; + state.anchor = _anchor; + state.kind = "sequence"; + state.result = _result; + return true; + } + return false; + } + function readBlockMapping(state, nodeIndent, flowIndent) { + var following, allowCompact, _line, _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; + } + 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; + } + detected = true; + atExplicitKey = true; + allowCompact = true; + } else if (atExplicitKey) { + atExplicitKey = false; + allowCompact = true; + } else { + throwError(state, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"); + } + state.position += 1; + ch = following; + } else { + _keyLine = state.line; + _keyLineStart = state.lineStart; + _keyPos = state.position; + if (!composeNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)) { + break; + } + if (state.line === _line) { + ch = state.input.charCodeAt(state.position); + while (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; + } + } + if (state.line === _line || state.lineIndent > nodeIndent) { + if (atExplicitKey) { + _keyLine = state.line; + _keyLineStart = state.lineStart; + _keyPos = state.position; + } + if (composeNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) { + if (atExplicitKey) { + keyNode = state.result; + } else { + valueNode = state.result; + } + } + if (!atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _keyLine, _keyLineStart, _keyPos); + keyTag = keyNode = valueNode = null; + } + skipSeparationSpace(state, true, -1); + ch = state.input.charCodeAt(state.position); + } + if ((state.line === _line || state.lineIndent > nodeIndent) && ch !== 0) { + throwError(state, "bad indentation of a mapping entry"); + } else if (state.lineIndent < nodeIndent) { + break; + } + } + if (atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); + } + if (detected) { + state.tag = _tag; + state.anchor = _anchor; + state.kind = "mapping"; + state.result = _result; + } + return detected; + } + function readTagProperty(state) { + 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 { + tagHandle = "!"; + } + _position = state.position; + if (isVerbatim) { + do { + ch = state.input.charCodeAt(++state.position); + } while (ch !== 0 && ch !== 62); + if (state.position < state.length) { + tagName = state.input.slice(_position, state.position); + ch = state.input.charCodeAt(++state.position); + } else { + throwError(state, "unexpected end of the stream within a verbatim tag"); + } + } else { + while (ch !== 0 && !is_WS_OR_EOL(ch)) { + if (ch === 33) { + if (!isNamed) { + tagHandle = state.input.slice(_position - 1, state.position + 1); + if (!PATTERN_TAG_HANDLE.test(tagHandle)) { + throwError(state, "named tag handle cannot contain such characters"); + } + isNamed = true; + _position = state.position + 1; + } else { + throwError(state, "tag suffix cannot contain exclamation marks"); + } + } + ch = state.input.charCodeAt(++state.position); + } + tagName = state.input.slice(_position, state.position); + if (PATTERN_FLOW_INDICATORS.test(tagName)) { + throwError(state, "tag suffix cannot contain flow indicator characters"); + } + } + if (tagName && !PATTERN_TAG_URI.test(tagName)) { + throwError(state, "tag name cannot contain such characters: " + tagName); + } + 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 !== 38) return false; + if (state.anchor !== null) { + throwError(state, "duplication of an anchor property"); + } + ch = state.input.charCodeAt(++state.position); + _position = state.position; + while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { + ch = state.input.charCodeAt(++state.position); + } + if (state.position === _position) { + throwError(state, "name of an anchor node must contain at least one character"); + } + state.anchor = state.input.slice(_position, state.position); + return true; + } + function readAlias(state) { + var _position, alias, ch; + ch = state.input.charCodeAt(state.position); + if (ch !== 42) return false; + ch = state.input.charCodeAt(++state.position); + _position = state.position; + while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { + ch = state.input.charCodeAt(++state.position); + } + if (state.position === _position) { + throwError(state, "name of an alias node must contain at least one character"); + } + alias = state.input.slice(_position, state.position); + if (!_hasOwnProperty.call(state.anchorMap, alias)) { + throwError(state, 'unidentified alias "' + alias + '"'); + } + state.result = state.anchorMap[alias]; + skipSeparationSpace(state, true, -1); + return true; + } + function composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact) { + var allowBlockStyles, allowBlockScalars, allowBlockCollections, indentStatus = 1, atNewLine = false, hasContent = false, typeIndex, typeQuantity, typeList, type, flowIndent, blockIndent; + if (state.listener !== null) { + state.listener("open", state); + } + state.tag = null; + state.anchor = null; + state.kind = null; + state.result = null; + allowBlockStyles = allowBlockScalars = allowBlockCollections = CONTEXT_BLOCK_OUT === nodeContext || CONTEXT_BLOCK_IN === nodeContext; + if (allowToSeek) { + if (skipSeparationSpace(state, true, -1)) { + atNewLine = true; + if (state.lineIndent > parentIndent) { + indentStatus = 1; + } else if (state.lineIndent === parentIndent) { + indentStatus = 0; + } else if (state.lineIndent < parentIndent) { + indentStatus = -1; + } + } + } + if (indentStatus === 1) { + while (readTagProperty(state) || readAnchorProperty(state)) { + if (skipSeparationSpace(state, true, -1)) { + atNewLine = true; + allowBlockCollections = allowBlockStyles; + if (state.lineIndent > parentIndent) { + indentStatus = 1; + } else if (state.lineIndent === parentIndent) { + indentStatus = 0; + } else if (state.lineIndent < parentIndent) { + indentStatus = -1; + } + } else { + allowBlockCollections = false; + } + } + } + if (allowBlockCollections) { + allowBlockCollections = atNewLine || allowCompact; + } + if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) { + if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) { + flowIndent = parentIndent; + } else { + flowIndent = parentIndent + 1; + } + blockIndent = state.position - state.lineStart; + if (indentStatus === 1) { + if (allowBlockCollections && (readBlockSequence(state, blockIndent) || readBlockMapping(state, blockIndent, flowIndent)) || readFlowCollection(state, flowIndent)) { + hasContent = true; + } else { + if (allowBlockScalars && readBlockScalar(state, flowIndent) || readSingleQuotedScalar(state, flowIndent) || readDoubleQuotedScalar(state, flowIndent)) { + hasContent = true; + } else if (readAlias(state)) { + hasContent = true; + if (state.tag !== null || state.anchor !== null) { + throwError(state, "alias node should not have any properties"); + } + } else if (readPlainScalar(state, flowIndent, CONTEXT_FLOW_IN === nodeContext)) { + hasContent = true; + if (state.tag === null) { + state.tag = "?"; + } + } + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; + } + } + } else if (indentStatus === 0) { + hasContent = allowBlockCollections && readBlockSequence(state, blockIndent); + } + } + if (state.tag === null) { + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; + } + } else if (state.tag === "?") { + if (state.result !== null && state.kind !== "scalar") { + throwError(state, 'unacceptable node kind for ! tag; it should be "scalar", not "' + state.kind + '"'); + } + for (typeIndex = 0, typeQuantity = state.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) { + type = state.implicitTypes[typeIndex]; + if (type.resolve(state.result)) { + state.result = type.construct(state.result); + state.tag = type.tag; + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; + } + break; + } + } + } else if (state.tag !== "!") { + if (_hasOwnProperty.call(state.typeMap[state.kind || "fallback"], state.tag)) { + type = state.typeMap[state.kind || "fallback"][state.tag]; + } else { + 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)) { + 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 = /* @__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; + } + hasDirectives = true; + ch = state.input.charCodeAt(++state.position); + _position = state.position; + while (ch !== 0 && !is_WS_OR_EOL(ch)) { + ch = state.input.charCodeAt(++state.position); + } + directiveName = state.input.slice(_position, state.position); + directiveArgs = []; + if (directiveName.length < 1) { + throwError(state, "directive name must not be less than one character in length"); + } + while (ch !== 0) { + while (is_WHITE_SPACE(ch)) { + ch = state.input.charCodeAt(++state.position); + } + if (ch === 35) { + do { + ch = state.input.charCodeAt(++state.position); + } while (ch !== 0 && !is_EOL(ch)); + break; + } + if (is_EOL(ch)) break; + _position = state.position; + while (ch !== 0 && !is_WS_OR_EOL(ch)) { + ch = state.input.charCodeAt(++state.position); + } + directiveArgs.push(state.input.slice(_position, state.position)); + } + if (ch !== 0) readLineBreak(state); + if (_hasOwnProperty.call(directiveHandlers, directiveName)) { + directiveHandlers[directiveName](state, directiveName, directiveArgs); + } else { + throwWarning(state, 'unknown document directive "' + directiveName + '"'); + } + } + skipSeparationSpace(state, true, -1); + if (state.lineIndent === 0 && state.input.charCodeAt(state.position) === 45 && state.input.charCodeAt(state.position + 1) === 45 && state.input.charCodeAt(state.position + 2) === 45) { + state.position += 3; + skipSeparationSpace(state, true, -1); + } else if (hasDirectives) { + throwError(state, "directives end mark is expected"); + } + composeNode(state, state.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true); + skipSeparationSpace(state, true, -1); + if (state.checkLineBreaks && PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart, state.position))) { + throwWarning(state, "non-ASCII line breaks are interpreted as content"); + } + state.documents.push(state.result); + if (state.position === state.lineStart && testDocumentSeparator(state)) { + if (state.input.charCodeAt(state.position) === 46) { + state.position += 3; + skipSeparationSpace(state, true, -1); + } + return; + } + if (state.position < state.length - 1) { + throwError(state, "end of the stream or a document separator is expected"); + } else { + return; + } + } + function loadDocuments(input, options) { + input = String(input); + options = options || {}; + if (input.length !== 0) { + if (input.charCodeAt(input.length - 1) !== 10 && input.charCodeAt(input.length - 1) !== 13) { + input += "\n"; + } + if (input.charCodeAt(0) === 65279) { + input = input.slice(1); + } + } + var state = new State(input, options); + var nullpos = input.indexOf("\0"); + if (nullpos !== -1) { + state.position = nullpos; + throwError(state, "null byte is not allowed in input"); + } + state.input += "\0"; + while (state.input.charCodeAt(state.position) === 32) { + state.lineIndent += 1; + state.position += 1; + } + while (state.position < state.length - 1) { + readDocument(state); + } + return state.documents; + } + function loadAll(input, iterator, options) { + if (iterator !== null && typeof iterator === "object" && typeof options === "undefined") { + options = iterator; + iterator = null; + } + var documents = loadDocuments(input, options); + if (typeof iterator !== "function") { + return documents; + } + for (var index = 0, length = documents.length; index < length; index += 1) { + iterator(documents[index]); + } + } + function load(input, options) { + var documents = loadDocuments(input, options); + if (documents.length === 0) { + return void 0; + } else if (documents.length === 1) { + return documents[0]; + } + throw new YAMLException("expected a single document in the stream, but found more"); + } + module2.exports.loadAll = loadAll; + module2.exports.load = load; + } +}); + +// ../../node_modules/js-yaml/lib/dumper.js +var require_dumper = __commonJS({ + "../../node_modules/js-yaml/lib/dumper.js"(exports2, module2) { + "use strict"; + var common = require_common(); + var YAMLException = require_exception(); + var DEFAULT_SCHEMA = require_default(); + var _toString = Object.prototype.toString; + var _hasOwnProperty = Object.prototype.hasOwnProperty; + var CHAR_BOM = 65279; + var CHAR_TAB = 9; + var CHAR_LINE_FEED = 10; + var CHAR_CARRIAGE_RETURN = 13; + var CHAR_SPACE = 32; + var CHAR_EXCLAMATION = 33; + var CHAR_DOUBLE_QUOTE = 34; + var CHAR_SHARP = 35; + var CHAR_PERCENT = 37; + var CHAR_AMPERSAND = 38; + var CHAR_SINGLE_QUOTE = 39; + var CHAR_ASTERISK = 42; + var CHAR_COMMA = 44; + var CHAR_MINUS = 45; + var CHAR_COLON = 58; + var CHAR_EQUALS = 61; + var CHAR_GREATER_THAN = 62; + var CHAR_QUESTION = 63; + var CHAR_COMMERCIAL_AT = 64; + var CHAR_LEFT_SQUARE_BRACKET = 91; + var CHAR_RIGHT_SQUARE_BRACKET = 93; + var CHAR_GRAVE_ACCENT = 96; + var CHAR_LEFT_CURLY_BRACKET = 123; + var CHAR_VERTICAL_LINE = 124; + var CHAR_RIGHT_CURLY_BRACKET = 125; + var ESCAPE_SEQUENCES = {}; + ESCAPE_SEQUENCES[0] = "\\0"; + ESCAPE_SEQUENCES[7] = "\\a"; + ESCAPE_SEQUENCES[8] = "\\b"; + ESCAPE_SEQUENCES[9] = "\\t"; + ESCAPE_SEQUENCES[10] = "\\n"; + ESCAPE_SEQUENCES[11] = "\\v"; + ESCAPE_SEQUENCES[12] = "\\f"; + ESCAPE_SEQUENCES[13] = "\\r"; + ESCAPE_SEQUENCES[27] = "\\e"; + ESCAPE_SEQUENCES[34] = '\\"'; + ESCAPE_SEQUENCES[92] = "\\\\"; + ESCAPE_SEQUENCES[133] = "\\N"; + ESCAPE_SEQUENCES[160] = "\\_"; + ESCAPE_SEQUENCES[8232] = "\\L"; + ESCAPE_SEQUENCES[8233] = "\\P"; + var DEPRECATED_BOOLEANS_SYNTAX = [ + "y", + "Y", + "yes", + "Yes", + "YES", + "on", + "On", + "ON", + "n", + "N", + "no", + "No", + "NO", + "off", + "Off", + "OFF" + ]; + var DEPRECATED_BASE60_SYNTAX = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/; + function compileStyleMap(schema2, 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 = schema2.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 <= 255) { + handle = "x"; + length = 2; + } else if (character <= 65535) { + handle = "u"; + length = 4; + } else if (character <= 4294967295) { + handle = "U"; + length = 8; + } else { + throw new YAMLException("code point within a string may not be greater than 0xFFFFFFFF"); + } + return "\\" + handle + common.repeat("0", length - string.length) + string; + } + var QUOTING_TYPE_SINGLE = 1; + var QUOTING_TYPE_DOUBLE = 2; + function State(options) { + this.schema = options["schema"] || DEFAULT_SCHEMA; + this.indent = Math.max(1, options["indent"] || 2); + this.noArrayIndent = options["noArrayIndent"] || false; + this.skipInvalid = options["skipInvalid"] || false; + this.flowLevel = common.isNothing(options["flowLevel"]) ? -1 : options["flowLevel"]; + this.styleMap = compileStyleMap(this.schema, options["styles"] || null); + this.sortKeys = options["sortKeys"] || false; + this.lineWidth = options["lineWidth"] || 80; + this.noRefs = options["noRefs"] || false; + this.noCompatMode = options["noCompatMode"] || false; + this.condenseFlow = options["condenseFlow"] || false; + this.quotingType = options["quotingType"] === '"' ? QUOTING_TYPE_DOUBLE : QUOTING_TYPE_SINGLE; + this.forceQuotes = options["forceQuotes"] || false; + this.replacer = typeof options["replacer"] === "function" ? options["replacer"] : null; + this.implicitTypes = this.schema.compiledImplicit; + this.explicitTypes = this.schema.compiledExplicit; + this.tag = null; + this.result = ""; + this.duplicates = []; + this.usedDuplicates = null; + } + function indentString(string, spaces) { + var ind = common.repeat(" ", spaces), position = 0, next = -1, result = "", line, length = string.length; + while (position < length) { + next = string.indexOf("\n", position); + if (next === -1) { + line = string.slice(position); + position = length; + } else { + line = string.slice(position, next + 1); + position = next + 1; + } + if (line.length && line !== "\n") result += ind; + result += line; + } + return result; + } + function generateNextLine(state, level) { + return "\n" + common.repeat(" ", state.indent * level); + } + function testImplicitResolving(state, str) { + var index, length, type; + for (index = 0, length = state.implicitTypes.length; index < length; index += 1) { + type = state.implicitTypes[index]; + if (type.resolve(str)) { + return true; + } + } + return false; + } + function isWhitespace(c) { + return c === CHAR_SPACE || c === CHAR_TAB; + } + function isPrintable(c) { + return 32 <= c && c <= 126 || 161 <= c && c <= 55295 && c !== 8232 && c !== 8233 || 57344 <= c && c <= 65533 && c !== CHAR_BOM || 65536 <= c && c <= 1114111; + } + function isNsCharOrWhitespace(c) { + return isPrintable(c) && c !== CHAR_BOM && c !== CHAR_CARRIAGE_RETURN && c !== CHAR_LINE_FEED; + } + 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 !== CHAR_COMMA && c !== CHAR_LEFT_SQUARE_BRACKET && c !== CHAR_RIGHT_SQUARE_BRACKET && c !== CHAR_LEFT_CURLY_BRACKET && c !== CHAR_RIGHT_CURLY_BRACKET) && c !== CHAR_SHARP && !(prev === CHAR_COLON && !cIsNsChar) || isNsCharOrWhitespace(prev) && !isWhitespace(prev) && c === CHAR_SHARP || prev === CHAR_COLON && cIsNsChar + ); + } + function isPlainSafeFirst(c) { + return isPrintable(c) && c !== CHAR_BOM && !isWhitespace(c) && c !== CHAR_MINUS && c !== CHAR_QUESTION && c !== CHAR_COLON && c !== CHAR_COMMA && c !== CHAR_LEFT_SQUARE_BRACKET && c !== CHAR_RIGHT_SQUARE_BRACKET && c !== CHAR_LEFT_CURLY_BRACKET && c !== CHAR_RIGHT_CURLY_BRACKET && c !== CHAR_SHARP && c !== CHAR_AMPERSAND && c !== CHAR_ASTERISK && c !== CHAR_EXCLAMATION && c !== CHAR_VERTICAL_LINE && c !== CHAR_EQUALS && c !== CHAR_GREATER_THAN && c !== CHAR_SINGLE_QUOTE && c !== CHAR_DOUBLE_QUOTE && c !== CHAR_PERCENT && c !== CHAR_COMMERCIAL_AT && c !== CHAR_GRAVE_ACCENT; + } + function isPlainSafeLast(c) { + return !isWhitespace(c) && c !== CHAR_COLON; + } + function codePointAt(string, pos) { + 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; + } + } + return first; + } + function needIndentIndicator(string) { + var leadingSpaceRe = /^\n* /; + return leadingSpaceRe.test(string); + } + var STYLE_PLAIN = 1; + var STYLE_SINGLE = 2; + var STYLE_LITERAL = 3; + var STYLE_FOLDED = 4; + var STYLE_DOUBLE = 5; + function chooseScalarStyle(string, singleLineOnly, indentPerLevel, lineWidth, testAmbiguousType, quotingType, forceQuotes, inblock) { + var i; + 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 (i = 0; i < string.length; char >= 65536 ? i += 2 : i++) { + char = codePointAt(string, i); + if (!isPrintable(char)) { + return STYLE_DOUBLE; + } + plain = plain && isPlainSafe(char, prevChar, inblock); + prevChar = char; + } + } else { + for (i = 0; i < string.length; char >= 65536 ? i += 2 : i++) { + char = codePointAt(string, i); + if (char === CHAR_LINE_FEED) { + hasLineBreak = true; + if (shouldTrackWidth) { + hasFoldableLine = hasFoldableLine || // 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; + } + hasFoldableLine = hasFoldableLine || shouldTrackWidth && (i - previousLineBreak - 1 > lineWidth && string[previousLineBreak + 1] !== " "); + } + if (!hasLineBreak && !hasFoldableLine) { + if (plain && !forceQuotes && !testAmbiguousType(string)) { + return STYLE_PLAIN; + } + return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE; + } + if (indentPerLevel > 9 && needIndentIndicator(string)) { + return STYLE_DOUBLE; + } + if (!forceQuotes) { + return hasFoldableLine ? STYLE_FOLDED : STYLE_LITERAL; + } + return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE; + } + function writeScalar(state, string, level, iskey, inblock) { + state.dump = function() { + if (string.length === 0) { + return state.quotingType === QUOTING_TYPE_DOUBLE ? '""' : "''"; + } + if (!state.noCompatMode) { + if (DEPRECATED_BOOLEANS_SYNTAX.indexOf(string) !== -1 || DEPRECATED_BASE60_SYNTAX.test(string)) { + return state.quotingType === QUOTING_TYPE_DOUBLE ? '"' + string + '"' : "'" + string + "'"; + } + } + 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, lineWidth) + '"'; + default: + throw new YAMLException("impossible error: invalid scalar style"); + } + }(); + } + function blockHeader(string, indentPerLevel) { + var indentIndicator = needIndentIndicator(string) ? String(indentPerLevel) : ""; + var clip = string[string.length - 1] === "\n"; + 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 match; + while (match = lineRe.exec(string)) { + var prefix = match[1], line = match[2]; + moreIndented = line[0] === " "; + result += prefix + (!prevMoreIndented && !moreIndented && line !== "" ? "\n" : "") + foldLine(line, width); + prevMoreIndented = moreIndented; + } + return result; + } + function foldLine(line, width) { + if (line === "" || line[0] === " ") return line; + var breakRe = / [^ ]/g; + var match; + var start = 0, end, curr = 0, next = 0; + var result = ""; + while (match = breakRe.exec(line)) { + next = match.index; + if (next - start > width) { + end = curr > start ? curr : next; + result += "\n" + line.slice(start, end); + start = end + 1; + } + curr = next; + } + result += "\n"; + if (line.length - start > width && curr > start) { + result += line.slice(start, curr) + "\n" + line.slice(curr + 1); + } else { + result += line.slice(start); + } + return result.slice(1); + } + function escapeString(string) { + var result = ""; + var char = 0; + var escapeSeq; + for (var i = 0; i < string.length; char >= 65536 ? i += 2 : i++) { + char = codePointAt(string, i); + escapeSeq = ESCAPE_SEQUENCES[char]; + if (!escapeSeq && isPrintable(char)) { + result += string[i]; + if (char >= 65536) result += string[i + 1]; + } else { + result += escapeSeq || encodeHex(char); + } + } + return result; + } + function writeFlowSequence(state, level, object) { + 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); + } + 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); + } + if (writeNode(state, level + 1, value, true, true, false, true) || typeof value === "undefined" && writeNode(state, level + 1, null, true, true, false, true)) { + if (!compact || _result !== "") { + _result += generateNextLine(state, level); + } + if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { + _result += "-"; + } else { + _result += "- "; + } + _result += state.dump; + } + } + state.tag = _tag; + state.dump = _result || "[]"; + } + function writeFlowMapping(state, level, object) { + 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; + } + if (state.dump.length > 1024) pairBuffer += "? "; + pairBuffer += state.dump + (state.condenseFlow ? '"' : "") + ":" + (state.condenseFlow ? "" : " "); + if (!writeNode(state, level, objectValue, false, false)) { + continue; + } + pairBuffer += state.dump; + _result += pairBuffer; + } + state.tag = _tag; + state.dump = "{" + _result + "}"; + } + function writeBlockMapping(state, level, object, compact) { + var _result = "", _tag = state.tag, objectKeyList = Object.keys(object), index, length, objectKey, objectValue, explicitPair, pairBuffer; + if (state.sortKeys === true) { + objectKeyList.sort(); + } else if (typeof state.sortKeys === "function") { + objectKeyList.sort(state.sortKeys); + } else if (state.sortKeys) { + throw new YAMLException("sortKeys must be a boolean or a function"); + } + for (index = 0, length = objectKeyList.length; index < length; index += 1) { + pairBuffer = ""; + if (!compact || _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; + } + explicitPair = state.tag !== null && state.tag !== "?" || state.dump && state.dump.length > 1024; + if (explicitPair) { + if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { + pairBuffer += "?"; + } else { + pairBuffer += "? "; + } + } + pairBuffer += state.dump; + if (explicitPair) { + pairBuffer += generateNextLine(state, level); + } + if (!writeNode(state, level + 1, objectValue, true, explicitPair)) { + continue; + } + if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { + pairBuffer += ":"; + } else { + pairBuffer += ": "; + } + pairBuffer += state.dump; + _result += pairBuffer; + } + state.tag = _tag; + state.dump = _result || "{}"; + } + function detectType(state, object, explicit) { + var _result, typeList, 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; + } + 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 !== "?") { + 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 ""; + } + module2.exports.dump = dump; + } +}); + +// ../../node_modules/js-yaml/index.js +var require_js_yaml = __commonJS({ + "../../node_modules/js-yaml/index.js"(exports2, module2) { + "use strict"; + var loader = require_loader(); + var dumper = require_dumper(); + function renamed(from, to) { + return function() { + throw new Error("Function yaml." + from + " is removed in js-yaml 4. Use yaml." + to + " instead, which is now safe by default."); + }; + } + module2.exports.Type = require_type(); + module2.exports.Schema = require_schema(); + module2.exports.FAILSAFE_SCHEMA = require_failsafe(); + module2.exports.JSON_SCHEMA = require_json(); + module2.exports.CORE_SCHEMA = require_core(); + module2.exports.DEFAULT_SCHEMA = require_default(); + module2.exports.load = loader.load; + module2.exports.loadAll = loader.loadAll; + module2.exports.dump = dumper.dump; + module2.exports.YAMLException = require_exception(); + module2.exports.types = { + binary: require_binary(), + float: require_float(), + map: require_map(), + null: require_null(), + pairs: require_pairs(), + set: require_set(), + timestamp: require_timestamp(), + bool: require_bool(), + int: require_int(), + merge: require_merge(), + omap: require_omap(), + seq: require_seq(), + str: require_str() + }; + module2.exports.safeLoad = renamed("safeLoad", "load"); + module2.exports.safeLoadAll = renamed("safeLoadAll", "loadAll"); + module2.exports.safeDump = renamed("safeDump", "dump"); + } +}); + +// ../../node_modules/path-browserify/index.js +var require_path_browserify = __commonJS({ + "../../node_modules/path-browserify/index.js"(exports2, module2) { + "use strict"; + function assertPath(path) { + if (typeof path !== "string") { + throw new TypeError("Path must be a string. Received " + JSON.stringify(path)); + } + } + function normalizeStringPosix(path, allowAboveRoot) { + var res = ""; + var lastSegmentLength = 0; + var lastSlash = -1; + var dots = 0; + var code; + for (var i = 0; i <= path.length; ++i) { + if (i < path.length) + code = path.charCodeAt(i); + else if (code === 47) + break; + else + code = 47; + if (code === 47) { + if (lastSlash === i - 1 || dots === 1) { + } else if (lastSlash !== i - 1 && dots === 2) { + if (res.length < 2 || lastSegmentLength !== 2 || res.charCodeAt(res.length - 1) !== 46 || res.charCodeAt(res.length - 2) !== 46) { + if (res.length > 2) { + var lastSlashIndex = res.lastIndexOf("/"); + if (lastSlashIndex !== res.length - 1) { + if (lastSlashIndex === -1) { + res = ""; + lastSegmentLength = 0; + } else { + res = res.slice(0, lastSlashIndex); + lastSegmentLength = res.length - 1 - res.lastIndexOf("/"); + } + lastSlash = i; + dots = 0; + continue; + } + } else if (res.length === 2 || res.length === 1) { + res = ""; + lastSegmentLength = 0; + lastSlash = i; + dots = 0; + continue; + } + } + if (allowAboveRoot) { + if (res.length > 0) + res += "/.."; + else + res = ".."; + lastSegmentLength = 2; + } + } else { + if (res.length > 0) + res += "/" + path.slice(lastSlash + 1, i); + else + res = path.slice(lastSlash + 1, i); + lastSegmentLength = i - lastSlash - 1; + } + lastSlash = i; + dots = 0; + } else if (code === 46 && dots !== -1) { + ++dots; + } else { + dots = -1; + } + } + return res; + } + function _format(sep, pathObject) { + var dir = pathObject.dir || pathObject.root; + var base = pathObject.base || (pathObject.name || "") + (pathObject.ext || ""); + if (!dir) { + return base; + } + if (dir === pathObject.root) { + return dir + base; + } + return dir + sep + base; + } + var posix = { + // path.resolve([from ...], to) + resolve: function resolve() { + var resolvedPath = ""; + var resolvedAbsolute = false; + var cwd; + for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) { + var path; + if (i >= 0) + path = arguments[i]; + else { + if (cwd === void 0) + cwd = process.cwd(); + path = cwd; + } + assertPath(path); + if (path.length === 0) { + continue; + } + resolvedPath = path + "/" + resolvedPath; + resolvedAbsolute = path.charCodeAt(0) === 47; + } + resolvedPath = normalizeStringPosix(resolvedPath, !resolvedAbsolute); + if (resolvedAbsolute) { + if (resolvedPath.length > 0) + return "/" + resolvedPath; + else + return "/"; + } else if (resolvedPath.length > 0) { + return resolvedPath; + } else { + return "."; + } + }, + normalize: function normalize(path) { + assertPath(path); + if (path.length === 0) return "."; + var isAbsolute = path.charCodeAt(0) === 47; + var trailingSeparator = path.charCodeAt(path.length - 1) === 47; + path = normalizeStringPosix(path, !isAbsolute); + if (path.length === 0 && !isAbsolute) path = "."; + if (path.length > 0 && trailingSeparator) path += "/"; + if (isAbsolute) return "/" + path; + return path; + }, + isAbsolute: function isAbsolute(path) { + assertPath(path); + return path.length > 0 && path.charCodeAt(0) === 47; + }, + join: function join() { + if (arguments.length === 0) + return "."; + var joined; + for (var i = 0; i < arguments.length; ++i) { + var arg = arguments[i]; + assertPath(arg); + if (arg.length > 0) { + if (joined === void 0) + joined = arg; + else + joined += "/" + arg; + } + } + if (joined === void 0) + return "."; + return posix.normalize(joined); + }, + relative: function relative(from, to) { + assertPath(from); + assertPath(to); + if (from === to) return ""; + from = posix.resolve(from); + to = posix.resolve(to); + if (from === to) return ""; + var fromStart = 1; + for (; fromStart < from.length; ++fromStart) { + if (from.charCodeAt(fromStart) !== 47) + break; + } + var fromEnd = from.length; + var fromLen = fromEnd - fromStart; + var toStart = 1; + for (; toStart < to.length; ++toStart) { + if (to.charCodeAt(toStart) !== 47) + break; + } + var toEnd = to.length; + var toLen = toEnd - toStart; + var length = fromLen < toLen ? fromLen : toLen; + var lastCommonSep = -1; + var i = 0; + for (; i <= length; ++i) { + if (i === length) { + if (toLen > length) { + if (to.charCodeAt(toStart + i) === 47) { + return to.slice(toStart + i + 1); + } else if (i === 0) { + return to.slice(toStart + i); + } + } else if (fromLen > length) { + if (from.charCodeAt(fromStart + i) === 47) { + lastCommonSep = i; + } else if (i === 0) { + lastCommonSep = 0; + } + } + break; + } + var fromCode = from.charCodeAt(fromStart + i); + var toCode = to.charCodeAt(toStart + i); + if (fromCode !== toCode) + break; + else if (fromCode === 47) + lastCommonSep = i; + } + var out = ""; + for (i = fromStart + lastCommonSep + 1; i <= fromEnd; ++i) { + if (i === fromEnd || from.charCodeAt(i) === 47) { + if (out.length === 0) + out += ".."; + else + out += "/.."; + } + } + if (out.length > 0) + return out + to.slice(toStart + lastCommonSep); + else { + toStart += lastCommonSep; + if (to.charCodeAt(toStart) === 47) + ++toStart; + return to.slice(toStart); + } + }, + _makeLong: function _makeLong(path) { + return path; + }, + dirname: function dirname(path) { + assertPath(path); + if (path.length === 0) return "."; + var code = path.charCodeAt(0); + var hasRoot = code === 47; + var end = -1; + var matchedSlash = true; + for (var i = path.length - 1; i >= 1; --i) { + code = path.charCodeAt(i); + if (code === 47) { + if (!matchedSlash) { + end = i; + break; + } + } else { + matchedSlash = false; + } + } + if (end === -1) return hasRoot ? "/" : "."; + if (hasRoot && end === 1) return "//"; + return path.slice(0, end); + }, + basename: function basename(path, ext) { + if (ext !== void 0 && typeof ext !== "string") throw new TypeError('"ext" argument must be a string'); + assertPath(path); + var start = 0; + var end = -1; + var matchedSlash = true; + var i; + if (ext !== void 0 && ext.length > 0 && ext.length <= path.length) { + if (ext.length === path.length && ext === path) return ""; + var extIdx = ext.length - 1; + var firstNonSlashEnd = -1; + for (i = path.length - 1; i >= 0; --i) { + var code = path.charCodeAt(i); + if (code === 47) { + if (!matchedSlash) { + start = i + 1; + break; + } + } else { + if (firstNonSlashEnd === -1) { + matchedSlash = false; + firstNonSlashEnd = i + 1; + } + if (extIdx >= 0) { + if (code === ext.charCodeAt(extIdx)) { + if (--extIdx === -1) { + end = i; + } + } else { + extIdx = -1; + end = firstNonSlashEnd; + } + } + } + } + if (start === end) end = firstNonSlashEnd; + else if (end === -1) end = path.length; + return path.slice(start, end); + } else { + for (i = path.length - 1; i >= 0; --i) { + if (path.charCodeAt(i) === 47) { + if (!matchedSlash) { + start = i + 1; + break; + } + } else if (end === -1) { + matchedSlash = false; + end = i + 1; + } + } + if (end === -1) return ""; + return path.slice(start, end); + } + }, + extname: function extname(path) { + assertPath(path); + var startDot = -1; + var startPart = 0; + var end = -1; + var matchedSlash = true; + var preDotState = 0; + for (var i = path.length - 1; i >= 0; --i) { + var code = path.charCodeAt(i); + if (code === 47) { + if (!matchedSlash) { + startPart = i + 1; + break; + } + continue; + } + if (end === -1) { + matchedSlash = false; + end = i + 1; + } + if (code === 46) { + if (startDot === -1) + startDot = i; + else if (preDotState !== 1) + preDotState = 1; + } else if (startDot !== -1) { + preDotState = -1; + } + } + if (startDot === -1 || end === -1 || // We saw a non-dot character immediately before the dot + preDotState === 0 || // The (right-most) trimmed path component is exactly '..' + preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) { + return ""; + } + return path.slice(startDot, end); + }, + format: function format(pathObject) { + if (pathObject === null || typeof pathObject !== "object") { + throw new TypeError('The "pathObject" argument must be of type Object. Received type ' + typeof pathObject); + } + return _format("/", pathObject); + }, + parse: function parse2(path) { + assertPath(path); + var ret = { root: "", dir: "", base: "", ext: "", name: "" }; + if (path.length === 0) return ret; + var code = path.charCodeAt(0); + var isAbsolute = code === 47; + var start; + if (isAbsolute) { + ret.root = "/"; + start = 1; + } else { + start = 0; + } + var startDot = -1; + var startPart = 0; + var end = -1; + var matchedSlash = true; + var i = path.length - 1; + var preDotState = 0; + for (; i >= start; --i) { + code = path.charCodeAt(i); + if (code === 47) { + if (!matchedSlash) { + startPart = i + 1; + break; + } + continue; + } + if (end === -1) { + matchedSlash = false; + end = i + 1; + } + if (code === 46) { + if (startDot === -1) startDot = i; + else if (preDotState !== 1) preDotState = 1; + } else if (startDot !== -1) { + preDotState = -1; + } + } + if (startDot === -1 || end === -1 || // We saw a non-dot character immediately before the dot + preDotState === 0 || // The (right-most) trimmed path component is exactly '..' + preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) { + if (end !== -1) { + if (startPart === 0 && isAbsolute) ret.base = ret.name = path.slice(1, end); + else ret.base = ret.name = path.slice(startPart, end); + } + } else { + if (startPart === 0 && isAbsolute) { + ret.name = path.slice(1, startDot); + ret.base = path.slice(1, end); + } else { + ret.name = path.slice(startPart, startDot); + ret.base = path.slice(startPart, end); + } + ret.ext = path.slice(startDot, end); + } + if (startPart > 0) ret.dir = path.slice(0, startPart - 1); + else if (isAbsolute) ret.dir = "/"; + return ret; + }, + sep: "/", + delimiter: ":", + win32: null, + posix: null + }; + posix.posix = posix; + module2.exports = posix; + } +}); + +// ../../node_modules/http2-client/lib/utils.js +var require_utils = __commonJS({ + "../../node_modules/http2-client/lib/utils.js"(exports2, module2) { + var DebounceTimers = class { + constructor(cb, defaultDelay) { + this.cb = cb; + this.delay = defaultDelay; + this.timers = {}; + this.pausers = {}; + } + setDelay(delay) { + if (delay >= 0) + this.delay = delay; + } + pause(key) { + this.pausers[key] = this.pausers[key] || 0; + this.pausers[key]++; + } + unpause(key) { + var count = this.pausers[key] || 0; + if (count > 0) + count--; + this.pausers[key] = count; + } + unpauseAndTime(key) { + this.unpause(key); + this.time(key); + } + time(key) { + var self2 = this; + var timers = this.timers; + var timer = this.timers[key]; + if (this.pausers[key] > 0) + return; + if (timer) + clearTimeout(timer); + timers[key] = setTimeout(function onTimer() { + self2.cb(key); + delete timers[key]; + }, self2.delay); + } + }; + var ERR_INVALID_ARG_TYPE = class extends TypeError { + constructor(name, expected, actual) { + const type = name.includes(".") ? "property" : "argument"; + let msg = `The "${name}" ${type} ${determiner} ${expected}`; + } + }; + function assertIsObject(value, name, types = "Object") { + if (value !== void 0 && (value === null || typeof value !== "object" || Array.isArray(value))) { + const err = new ERR_INVALID_ARG_TYPE(name, types, value); + Error.captureStackTrace(err, assertIsObject); + throw err; + } + } + module2.exports = { + ERR_INVALID_ARG_TYPE, + assertIsObject, + DebounceTimers + }; + } +}); + +// ../../node_modules/http2-client/lib/request-options.js +var require_request_options = __commonJS({ + "../../node_modules/http2-client/lib/request-options.js"(exports2, module2) { + var { assertIsObject } = require_utils(); + function initializeOptions(options) { + assertIsObject(options, "options"); + options = Object.assign({}, options); + options.allowHalfOpen = true; + options.rejectUnauthorized = false; + assertIsObject(options.settings, "options.settings"); + options.settings = Object.assign({}, options.settings); + options.Http1IncomingMessage = options.Http1IncomingMessage || this.http.IncomingMessage; + options.Http1ServerResponse = options.Http1ServerResponse || this.http.ServerResponse; + options.Http2ServerRequest = options.Http2ServerRequest || (this.http2 || {}).Http2ServerRequest; + options.Http2ServerResponse = options.Http2ServerResponse || (this.http2 || {}).Http2ServerResponse; + return options; + } + function initializeTLSOptions(options, servername) { + options = initializeOptions.call(this, options); + var ALPNProtocols = options.ALPNProtocols = []; + if (this.http2Support) + ALPNProtocols.push("h2"); + if (options.allowHTTP1 == true || !this.http2Support) + ALPNProtocols.push("http/1.1"); + if (servername !== void 0 && options.servername === void 0) + options.servername = servername; + return options; + } + module2.exports = { + initializeTLSOptions + }; + } +}); + +// ../../node_modules/http2-client/lib/request.js +var require_request = __commonJS({ + "../../node_modules/http2-client/lib/request.js"(exports2, module2) { + var { URL: URL3 } = require("url"); + var { EventEmitter } = require("events"); + var _extend = require("util")._extend; + var { DebounceTimers, assertIsObject, ERR_INVALID_ARG_TYPE } = require_utils(); + var { initializeTLSOptions } = require_request_options(); + var http = require("http"); + var https = require("https"); + var { Stream } = require("stream"); + function addFunctions(container, obj) { + const proto = obj.prototype; + Object.keys(proto).forEach((name) => { + if (container.indexOf(name) != -1) + return; + if (name.indexOf("_") != 0 && typeof proto[name] == "function") { + container.push(name); + } + }); + } + var STUBBED_METHODS_NAME = []; + addFunctions(STUBBED_METHODS_NAME, http.ClientRequest); + addFunctions(STUBBED_METHODS_NAME, http.OutgoingMessage); + addFunctions(STUBBED_METHODS_NAME, EventEmitter); + addFunctions(STUBBED_METHODS_NAME, Stream); + var PROPERTIES_TO_PROXY = [ + "httpVersionMajor", + "httpVersionMinor", + "httpVersion" + ]; + var HEADERS_TO_REMOVE = ["host", "connection"]; + var $stubs = Symbol("stubs"); + function ClientRequest() { + this.http2Mimic = true; + this[$stubs] = []; + for (var i = 0; i < STUBBED_METHODS_NAME.length; i++) { + let name = STUBBED_METHODS_NAME[i]; + if (!ClientRequest.prototype[name]) { + this[name] = function method() { + return this.genericStubber(name, arguments); + }.bind(this); + } + } + var requestOptions, cb, url, args; + const isInternal = arguments[0] instanceof RequestInternalEnforce; + var isInternalMethod, isInternalProtocol; + if (isInternal) { + const enforceOptions = arguments[0]; + if (enforceOptions.method) + isInternalMethod = enforceOptions.method; + if (enforceOptions.protocol) + isInternalProtocol = enforceOptions.protocol; + } + if (isInternal) { + args = arguments[0].args; + } else { + args = arguments; + } + if (args[2] != void 0) { + url = args[0]; + requestOptions = args[1]; + cb = args[2]; + } else if (args[1] == void 0) { + requestOptions = args[0]; + } else { + requestOptions = args[0]; + cb = args[1]; + } + cb = cb || function dummy() { + }; + if (typeof requestOptions === "string") { + requestOptions = urlToOptions(new URL3(requestOptions)); + if (!requestOptions.hostname) { + throw new Error("Unable to determine the domain name"); + } + } else { + if (url) { + requestOptions = _extend(urlToOptions(new URL3(url)), requestOptions); + } else { + requestOptions = _extend({}, requestOptions); + } + } + if (isInternalProtocol != isInternalProtocol) { + requestOptions.protocol = isInternalProtocol; + } + if (requestOptions.protocol == "https:" && !requestOptions.port && requestOptions.port != 0) + requestOptions.port = 443; + if (!requestOptions.port && requestOptions.port != 0) + requestOptions.port = 80; + if (isInternalMethod) { + requestOptions.method = isInternalMethod; + } else if (!requestOptions.method) + requestOptions.method = "GET"; + requestOptions.method = requestOptions.method.toUpperCase(); + const requestManager = requestOptions.requestManager || this.getGlobalManager(requestOptions); + requestManager.handleClientRequest(this, requestOptions, cb); + } + ClientRequest.prototype = { + getGlobalManager(options) { + if (options.agent) + return options.agent.protocol == "https:" ? HttpsRequest.globalManager : HttpRequest.globalManager; + else + return HttpRequestManager.globalManager; + }, + genericStubber(method, args) { + if (this[$stubs]) { + this[$stubs].push([method, args]); + return true; + } else + return this[method](...arguments); + }, + on(eventName, cb) { + if (eventName == "response") { + if (!cb.http2Safe) { + eventName = "http1.response"; + arguments[0] = eventName; + } + } + if (this._on) { + this._on(...arguments); + } else + this.genericStubber("on", arguments); + }, + once(eventName, cb) { + if (eventName == "response") { + if (!cb.http2Safe) { + eventName = "http1.response"; + } + } + if (this._once) { + this._once(...arguments); + } else + this.genericStubber("once", arguments); + }, + emitError(error) { + if (this[$stubs]) { + this[$stubs].forEach(([method, args]) => { + if ((method === "on" || method === "once") && args[0] === "error") { + args[1](error); + } + }); + } else + return this.emit("error", error); + }, + take(stream) { + for (var i = 0; i < STUBBED_METHODS_NAME.length; i++) { + let name = STUBBED_METHODS_NAME[i]; + if (stream[name]) { + this[name] = stream[name].bind(stream); + } + } + this._on = stream.on.bind(stream); + this._once = stream.once.bind(stream); + this.proxyProps(stream); + for (let i2 = 0; i2 < this[$stubs].length; i2++) { + var stub = this[$stubs][i2]; + stream[stub[0]](...stub[1]); + } + this[$stubs] = null; + }, + proxyProps(http2Stream) { + function getter() { + return http2Stream[this]; + } + function setter(value) { + http2Stream[this] = value; + } + const notToProxy = ["on", "_on", "_once", "once", "http2Mimic"].concat(STUBBED_METHODS_NAME); + const keys = Object.keys(this); + const keysToProxy = [].concat(PROPERTIES_TO_PROXY); + keys.forEach(function whichProxyKeys(key) { + if (notToProxy.indexOf(key) == -1 && keysToProxy.indexOf(key) == -1) { + keysToProxy.push(key); + } + }); + const properties = Object.getOwnPropertyDescriptors(http2Stream); + for (var i = 0; i < keysToProxy.length; i++) { + let name = keysToProxy[i]; + const propConfig = properties[name]; + let shouldCopyValue; + if (!propConfig) + shouldCopyValue = true; + if (propConfig && (propConfig.writable || propConfig)) + shouldCopyValue = true; + if (shouldCopyValue) + http2Stream[name] = this[name]; + Object.defineProperty(this, name, { + get: getter.bind(name), + set: setter.bind(name) + }); + } + } + }; + var HttpRequestManager = class _HttpRequestManager extends EventEmitter { + constructor(options) { + super(); + this.httpsAgent = https.globalAgent; + this.httpAgent = http.globalAgent; + this.init(options); + } + log() { + } + init(options) { + options = options || {}; + this.http2Clients = {}; + this.cachedHTTP1Result = {}; + this.setModules(); + this.http2Debouncer = new DebounceTimers(function stopConnection(key) { + this.log("stopping ", key); + var foundConnection = this.http2Clients[key]; + if (foundConnection) { + this.removeHttp2Client(key, foundConnection); + } + }.bind(this), 1e3); + this.keepH1IdentificationCacheFor = options.keepH1IdentificationCacheFor || 3e4; + this.http2Debouncer.setDelay(options.keepH2ConnectionFor); + if (options.useHttp) { + this.enforceProtocol = "http:"; + } else if (options.useHttps) { + this.enforceProtocol = "https:"; + } + } + setModules() { + this["http"] = require("http"); + this["https"] = require("https"); + this["tls"] = require("tls"); + this["net"] = require("net"); + this.http2Support = false; + try { + this["http2"] = require("http2"); + this.http2Support = true; + } catch (err) { + } + } + handleClientRequest(clientRequest, requestOptions, cb) { + const requestManager = this; + const clientKey = requestManager.getClientKey(requestOptions); + if (requestManager.hasCachedConnection(clientKey)) { + const socket = requestManager.getHttp2Client(clientKey); + const connectionOptions = { + createConnection() { + return socket; + } + }; + process.nextTick(function onMakeRequest() { + requestManager.makeRequest(clientRequest, clientKey, requestOptions, cb, connectionOptions); + }.bind(requestManager)); + } else + requestManager.holdConnectionToIdentification(clientKey, requestOptions, function onIdentification(error, connectionOptions) { + if (error) { + clientRequest.emitError(error); + return; + } + requestManager.makeRequest(clientRequest, clientKey, requestOptions, cb, connectionOptions); + }.bind(requestManager)); + } + getClientKey(url) { + return `${url.protocol || this.enforceProtocol}${url.servername || url.host || url.hostname}:${url.port}`; + } + getHttp2Client(clientKey) { + return this.http2Clients[clientKey]; + } + setHttp2Client(clientKey, client) { + const httpManager = this; + const prevClient = httpManager.http2Clients[clientKey]; + if (prevClient) + httpManager.removeHttp2Client(clientKey, prevClient); + httpManager.http2Clients[clientKey] = client; + function closeClient() { + httpManager.removeHttp2Client(clientKey, client); + } + client.on("close", closeClient); + client.on("goaway", closeClient); + client.on("error", closeClient); + client.on("frameError", closeClient); + client.on("timeout", closeClient); + } + removeHttp2Client(clientKey, client) { + try { + delete this.http2Clients[clientKey]; + if (!client.closed) { + client.close(); + } + } catch (err) { + } + client.removeAllListeners("close"); + client.removeAllListeners("error"); + client.removeAllListeners("frameError"); + client.removeAllListeners("timeout"); + } + request(url, options, cb) { + var args = new RequestInternalEnforce(arguments); + if (this.enforceProtocol) { + args.protocol = this.enforceProtocol; + } + return new ClientRequest(args); + } + get() { + var args = new RequestInternalEnforce(arguments); + args.method = "GET"; + var request = this.request(args); + request.end(); + return request; + } + hasCachedConnection(clientKey) { + const http2Client = this.getHttp2Client(clientKey); + if (http2Client) { + return true; + } + return this.cachedHTTP1Result[clientKey] + this.keepH1IdentificationCacheFor < Date.now(); + } + makeRequest(inStream, clientKey, requestOptions, cb, connectionOptions) { + const http2Client = this.getHttp2Client(clientKey); + if (http2Client) { + return this.makeHttp2Request(clientKey, inStream, http2Client, Object.assign(connectionOptions || {}, requestOptions), cb); + } + if (!requestOptions.agent) { + if (requestOptions.protocol == "https:") + requestOptions.agent = this.httpsAgent; + else + requestOptions.agent = this.httpAgent; + } + return this.makeHttpRequest(clientKey, inStream, requestOptions, cb, connectionOptions); + } + holdConnectionToIdentification(clientKey, requestOptions, cb) { + const topic = `identify-${clientKey}`; + if (this._events[topic]) + this.once(topic, cb); + else { + this.once(topic, function letKnowThereIsAnEvent() { + }); + const socket = this.identifyConnection(requestOptions, function onIdentify(error, type) { + if (error) { + return cb(error); + } + var options = { + createConnection() { + return socket; + } + }; + if (type == "h2" && this.http2Support) { + var http2Client = this.http2.connect(requestOptions, options); + this.setHttp2Client(clientKey, http2Client); + } else { + this.cachedHTTP1Result[clientKey] = Date.now(); + } + cb(null, options); + this.emit(topic, options); + }.bind(this)); + } + } + makeHttpRequest(clientKey, inStream, options, cb, connectionOptions) { + if (options instanceof URL3) + options = urlToOptions(options); + const h1op = _extend({}, options); + if (connectionOptions) + h1op.createConnection = connectionOptions.createConnection; + const requestModule = h1op.protocol == "https:" ? this.https : this.http; + const req = requestModule.request(h1op, cb); + inStream.take(req); + inStream._on("response", function onHttp1Response(v) { + this.emit("http1.response", v); + }); + } + makeHttp2Request(clientKey, inStream, http2Client, requestOptions, cb) { + var http2Debouncer = this.http2Debouncer; + http2Debouncer.pause(clientKey); + var headers = _extend({}, requestOptions.headers || {}); + if (requestOptions.method) + headers[":method"] = requestOptions.method; + if (requestOptions.path) + headers[":path"] = requestOptions.path; + Object.keys(headers).forEach((key) => { + if (HEADERS_TO_REMOVE.indexOf((key + "").toLowerCase()) != -1) { + delete headers[key]; + } + }); + requestOptions.headers = headers; + var req = http2Client.request( + headers + ); + inStream.emit("socket", requestOptions.createConnection()); + let maxContentLength; + let currentContent = 0; + req.on("data", function onData(data) { + currentContent += data.length; + if (currentContent >= maxContentLength) + http2Debouncer.unpauseAndTime(clientKey); + }); + inStream.take(req); + function onResponse(headers2) { + maxContentLength = parseInt(headers2["content-length"]); + if (maxContentLength < 0) + this.http2Debouncer.unpauseAndTime(clientKey); + _HttpRequestManager.httpCompatibleResponse(req, requestOptions, headers2); + inStream.emit("http1.response", req); + if (cb) + cb(req); + } + onResponse.http2Safe = true; + req.once("response", onResponse.bind(this)); + } + static httpCompatibleResponse(res, requestOptions, headers) { + res.httpVersion = "2.0"; + res.rawHeaders = headers; + res.headers = headers; + res.statusCode = headers[":status"]; + delete headers[":status"]; + } + identifyConnection(requestOptions, cb) { + var socket = this.connect(requestOptions, { allowHTTP1: true }, function onConnect() { + socket.removeListener("error", cb); + if (socket.alpnProtocol == "h2") { + cb(null, "h2"); + } else { + socket.end(); + cb(null, "h1"); + } + }); + socket.on("error", cb); + return socket; + } + connect(authority, options, listener) { + if (typeof options === "function") { + listener = options; + options = void 0; + } + assertIsObject(options, "options"); + options = Object.assign({}, options); + if (typeof authority === "string") + authority = new URL3(authority); + assertIsObject(authority, "authority", ["string", "Object", "URL"]); + var protocol = authority.protocol || options.protocol || (this.enforceProtocol != "detect" ? this.enforceProtocol : null) || "http:"; + var port = "" + (authority.port !== "" ? authority.port : authority.protocol === "http:" ? 80 : 443); + var host = authority.hostname || authority.host || "localhost"; + var socket; + if (typeof options.createConnection === "function") { + socket = options.createConnection(authority, options); + } else { + switch (protocol) { + case "http:": + socket = this.net.connect(port, host, listener); + break; + case "https:": + socket = this.tls.connect(port, host, initializeTLSOptions.call(this, options, host), listener); + break; + default: + throw new Error("Not supprted" + protocol); + } + } + return socket; + } + }; + function urlToOptions(url) { + var options = { + protocol: url.protocol, + hostname: url.hostname, + hash: url.hash, + search: url.search, + pathname: url.pathname, + path: `${url.pathname}${url.search}`, + href: url.href + }; + if (url.port !== "") { + options.port = Number(url.port); + } + if (url.username || url.password) { + options.auth = `${url.username}:${url.password}`; + } + return options; + } + var RequestInternalEnforce = class _RequestInternalEnforce { + constructor(args) { + if (args[0] instanceof _RequestInternalEnforce) { + return args[0]; + } + this.args = args; + this.method = null; + this.protocol = null; + } + }; + var HttpsRequest = class extends HttpRequestManager { + constructor() { + super(...arguments); + this.Agent = https.Agent; + this.globalAgent = https.globalAgent; + this.enforceProtocol = "https:"; + } + }; + var httpsRequestSinglton = new HttpsRequest(); + HttpsRequest.globalManager = httpsRequestSinglton; + HttpsRequest.Manager = HttpsRequest; + var HttpRequest = class extends HttpRequestManager { + constructor() { + super(...arguments); + this.Agent = http.Agent; + this.globalAgent = http.globalAgent; + this.enforceProtocol = "http:"; + } + }; + var httpRequestSinglton = new HttpRequest(); + HttpRequest.globalManager = httpRequestSinglton; + HttpRequest.Manager = HttpRequest; + var singeltonHttpManager = new HttpRequestManager(); + singeltonHttpManager.enforceProtocol = "detect"; + HttpRequestManager.globalManager = singeltonHttpManager; + module2.exports = { + HttpRequest, + HttpsRequest, + HTTP2OutgoingMessage: ClientRequest, + ClientRequest, + HttpRequestManager + }; + } +}); + +// ../../node_modules/http2-client/lib/http.js +var require_http = __commonJS({ + "../../node_modules/http2-client/lib/http.js"(exports2, module2) { + var { + HttpRequest, + ClientRequest + } = require_request(); + var globalManager = HttpRequest.globalManager; + var request = globalManager.request.bind(globalManager); + var get = globalManager.get.bind(globalManager); + var http = Object.assign({}, require("http")); + module2.exports = Object.assign(http, { + ClientRequest, + globalManager, + request, + get + }); + } +}); + +// ../../node_modules/http2-client/lib/https.js +var require_https = __commonJS({ + "../../node_modules/http2-client/lib/https.js"(exports2, module2) { + var { + HttpsRequest, + ClientRequest + } = require_request(); + var globalManager = HttpsRequest.globalManager; + var request = globalManager.request.bind(globalManager); + var get = globalManager.get.bind(globalManager); + var https = Object.assign({}, require("https")); + module2.exports = Object.assign(https, { + ClientRequest, + globalManager, + request, + get + }); + } +}); + +// ../../node_modules/http2-client/lib/index.js +var require_lib = __commonJS({ + "../../node_modules/http2-client/lib/index.js"(exports2, module2) { + var { + HttpRequestManager, + HTTP2OutgoingMessage, + ClientRequest + } = require_request(); + var http = require_http(); + var https = require_https(); + var autoDetectManager = new HttpRequestManager(); + HttpRequestManager.globalManager = autoDetectManager; + var request = autoDetectManager.request.bind(autoDetectManager); + var get = autoDetectManager.get.bind(autoDetectManager); + module2.exports = { + HTTP2OutgoingMessage, + ClientRequest, + globalManager: HttpRequestManager.globalManager, + request, + get, + http, + https + }; + } +}); + +// ../../node_modules/node-fetch-h2/lib/index.js +var require_lib2 = __commonJS({ + "../../node_modules/node-fetch-h2/lib/index.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + function _interopDefault(ex) { + return ex && typeof ex === "object" && "default" in ex ? ex["default"] : ex; + } + var Stream = _interopDefault(require("stream")); + var http = _interopDefault(require("http")); + var Url = _interopDefault(require("url")); + var h2 = _interopDefault(require_lib()); + var zlib = _interopDefault(require("zlib")); + var BUFFER = Symbol("buffer"); + var TYPE = Symbol("type"); + var Blob2 = class _Blob { + constructor() { + this[TYPE] = ""; + const blobParts = arguments[0]; + const options = arguments[1]; + const buffers = []; + if (blobParts) { + const a = blobParts; + const length = Number(a.length); + for (let i = 0; i < length; i++) { + const element = a[i]; + let buffer; + if (element instanceof Buffer) { + buffer = element; + } else if (ArrayBuffer.isView(element)) { + buffer = Buffer.from(element.buffer, element.byteOffset, element.byteLength); + } else if (element instanceof ArrayBuffer) { + buffer = Buffer.from(element); + } else if (element instanceof _Blob) { + buffer = element[BUFFER]; + } else { + buffer = Buffer.from(typeof element === "string" ? element : String(element)); + } + buffers.push(buffer); + } + } + this[BUFFER] = Buffer.concat(buffers); + let type = options && options.type !== void 0 && String(options.type).toLowerCase(); + if (type && !/[^\u0020-\u007E]/.test(type)) { + this[TYPE] = type; + } + } + get size() { + return this[BUFFER].length; + } + get type() { + return this[TYPE]; + } + slice() { + const size = this.size; + const start = arguments[0]; + const end = arguments[1]; + let relativeStart, relativeEnd; + if (start === void 0) { + relativeStart = 0; + } else if (start < 0) { + relativeStart = Math.max(size + start, 0); + } else { + relativeStart = Math.min(start, size); + } + if (end === void 0) { + relativeEnd = size; + } else if (end < 0) { + relativeEnd = Math.max(size + end, 0); + } else { + relativeEnd = Math.min(end, size); + } + const span = Math.max(relativeEnd - relativeStart, 0); + const buffer = this[BUFFER]; + const slicedBuffer = buffer.slice(relativeStart, relativeStart + span); + const blob = new _Blob([], { type: arguments[2] }); + blob[BUFFER] = slicedBuffer; + return blob; + } + }; + Object.defineProperties(Blob2.prototype, { + size: { enumerable: true }, + type: { enumerable: true }, + slice: { enumerable: true } + }); + Object.defineProperty(Blob2.prototype, Symbol.toStringTag, { + value: "Blob", + writable: false, + enumerable: false, + configurable: true + }); + function FetchError(message, type, systemError) { + Error.call(this, message); + this.message = message; + this.type = type; + if (systemError) { + this.code = this.errno = systemError.code; + } + Error.captureStackTrace(this, this.constructor); + } + FetchError.prototype = Object.create(Error.prototype); + FetchError.prototype.constructor = FetchError; + FetchError.prototype.name = "FetchError"; + var convert2; + try { + convert2 = require("encoding").convert; + } catch (e) { + } + var INTERNALS = Symbol("Body internals"); + var PassThrough = Stream.PassThrough; + function Body(body) { + var _this = this; + var _ref = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, _ref$size = _ref.size; + let size = _ref$size === void 0 ? 0 : _ref$size; + var _ref$timeout = _ref.timeout; + let timeout = _ref$timeout === void 0 ? 0 : _ref$timeout; + if (body == null) { + body = null; + } else if (isURLSearchParams(body)) { + body = Buffer.from(body.toString()); + } else if (body instanceof Blob2) { + body = body[BUFFER]; + } else if (Buffer.isBuffer(body)) ; + else if (Object.prototype.toString.call(body) === "[object ArrayBuffer]") { + body = Buffer.from(body); + } else if (ArrayBuffer.isView(body)) { + body = Buffer.from(body.buffer, body.byteOffset, body.byteLength); + } else if (body instanceof Stream) ; + else { + body = Buffer.from(String(body)); + } + this[INTERNALS] = { + body, + disturbed: false, + error: null + }; + this.size = size; + this.timeout = timeout; + if (body instanceof Stream) { + body.on("error", function(err) { + const error = err.name === "AbortError" ? err : new FetchError(`Invalid response body while trying to fetch ${_this.url}: ${err.message}`, "system", err); + _this[INTERNALS].error = error; + }); + } + } + Body.prototype = { + get body() { + return this[INTERNALS].body; + }, + get bodyUsed() { + return this[INTERNALS].disturbed; + }, + /** + * Decode response as ArrayBuffer + * + * @return Promise + */ + arrayBuffer() { + return consumeBody.call(this).then(function(buf) { + return buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength); + }); + }, + /** + * Return raw response as Blob + * + * @return Promise + */ + blob() { + let ct = this.headers && this.headers.get("content-type") || ""; + return consumeBody.call(this).then(function(buf) { + return Object.assign( + // Prevent copying + new Blob2([], { + type: ct.toLowerCase() + }), + { + [BUFFER]: buf + } + ); + }); + }, + /** + * Decode response as json + * + * @return Promise + */ + json() { + var _this2 = this; + return consumeBody.call(this).then(function(buffer) { + try { + return JSON.parse(buffer.toString()); + } catch (err) { + return Body.Promise.reject(new FetchError(`invalid json response body at ${_this2.url} reason: ${err.message}`, "invalid-json")); + } + }); + }, + /** + * Decode response as text + * + * @return Promise + */ + text() { + return consumeBody.call(this).then(function(buffer) { + return buffer.toString(); + }); + }, + /** + * Decode response as buffer (non-spec api) + * + * @return Promise + */ + buffer() { + return consumeBody.call(this); + }, + /** + * Decode response as text, while automatically detecting the encoding and + * trying to decode to UTF-8 (non-spec api) + * + * @return Promise + */ + textConverted() { + var _this3 = this; + return consumeBody.call(this).then(function(buffer) { + return convertBody(buffer, _this3.headers); + }); + } + }; + Object.defineProperties(Body.prototype, { + body: { enumerable: true }, + bodyUsed: { enumerable: true }, + arrayBuffer: { enumerable: true }, + blob: { enumerable: true }, + json: { enumerable: true }, + text: { enumerable: true } + }); + Body.mixIn = function(proto) { + for (const name of Object.getOwnPropertyNames(Body.prototype)) { + if (!(name in proto)) { + const desc = Object.getOwnPropertyDescriptor(Body.prototype, name); + Object.defineProperty(proto, name, desc); + } + } + }; + function consumeBody() { + var _this4 = this; + if (this[INTERNALS].disturbed) { + return Body.Promise.reject(new TypeError(`body used already for: ${this.url}`)); + } + this[INTERNALS].disturbed = true; + if (this[INTERNALS].error) { + return Body.Promise.reject(this[INTERNALS].error); + } + if (this.body === null) { + return Body.Promise.resolve(Buffer.alloc(0)); + } + if (Buffer.isBuffer(this.body)) { + return Body.Promise.resolve(this.body); + } + if (!(this.body instanceof Stream)) { + return Body.Promise.resolve(Buffer.alloc(0)); + } + let accum = []; + let accumBytes = 0; + let abort = false; + return new Body.Promise(function(resolve, reject) { + let resTimeout; + if (_this4.timeout) { + resTimeout = setTimeout(function() { + abort = true; + reject(new FetchError(`Response timeout while trying to fetch ${_this4.url} (over ${_this4.timeout}ms)`, "body-timeout")); + }, _this4.timeout); + } + _this4.body.on("error", function(err) { + if (err.name === "AbortError") { + abort = true; + reject(err); + } else { + reject(new FetchError(`Invalid response body while trying to fetch ${_this4.url}: ${err.message}`, "system", err)); + } + }); + _this4.body.on("data", function(chunk) { + if (abort || chunk === null) { + return; + } + if (_this4.size && accumBytes + chunk.length > _this4.size) { + abort = true; + reject(new FetchError(`content size at ${_this4.url} over limit: ${_this4.size}`, "max-size")); + return; + } + accumBytes += chunk.length; + accum.push(chunk); + }); + _this4.body.on("end", function() { + if (abort) { + return; + } + clearTimeout(resTimeout); + try { + resolve(Buffer.concat(accum)); + } catch (err) { + reject(new FetchError(`Could not create Buffer from response body for ${_this4.url}: ${err.message}`, "system", err)); + } + }); + }); + } + function convertBody(buffer, headers) { + if (typeof convert2 !== "function") { + throw new Error("The package `encoding` must be installed to use the textConverted() function"); + } + const ct = headers.get("content-type"); + let charset = "utf-8"; + let res, str; + if (ct) { + res = /charset=([^;]*)/i.exec(ct); + } + str = buffer.slice(0, 1024).toString(); + if (!res && str) { + res = / 0 && arguments[0] !== void 0 ? arguments[0] : void 0; + this[MAP] = /* @__PURE__ */ Object.create(null); + if (init instanceof _Headers) { + const rawHeaders = init.raw(); + const headerNames = Object.keys(rawHeaders); + for (const headerName of headerNames) { + for (const value of rawHeaders[headerName]) { + this.append(headerName, value); + } + } + return; + } + if (init == null) ; + else if (typeof init === "object") { + const method = init[Symbol.iterator]; + if (method != null) { + if (typeof method !== "function") { + throw new TypeError("Header pairs must be iterable"); + } + const pairs = []; + for (const pair of init) { + if (typeof pair !== "object" || typeof pair[Symbol.iterator] !== "function") { + throw new TypeError("Each header pair must be iterable"); + } + pairs.push(Array.from(pair)); + } + for (const pair of pairs) { + if (pair.length !== 2) { + throw new TypeError("Each header pair must be a name/value tuple"); + } + this.append(pair[0], pair[1]); + } + } else { + for (const key of Object.keys(init)) { + const value = init[key]; + this.append(key, value); + } + } + } else { + throw new TypeError("Provided initializer must be an object"); + } + } + /** + * Return combined header value given name + * + * @param String name Header name + * @return Mixed + */ + get(name) { + name = `${name}`; + validateName(name); + const key = find(this[MAP], name); + if (key === void 0) { + return null; + } + return this[MAP][key].join(", "); + } + /** + * Iterate over all headers + * + * @param Function callback Executed for each item with parameters (value, name, thisArg) + * @param Boolean thisArg `this` context for callback function + * @return Void + */ + forEach(callback) { + let thisArg = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : void 0; + let pairs = getHeaders(this); + let i = 0; + while (i < pairs.length) { + var _pairs$i = pairs[i]; + const name = _pairs$i[0], value = _pairs$i[1]; + callback.call(thisArg, value, name, this); + pairs = getHeaders(this); + i++; + } + } + /** + * Overwrite header values given name + * + * @param String name Header name + * @param String value Header value + * @return Void + */ + set(name, value) { + name = `${name}`; + value = `${value}`; + validateName(name); + validateValue(value); + const key = find(this[MAP], name); + this[MAP][key !== void 0 ? key : name] = [value]; + } + /** + * Append a value onto existing header + * + * @param String name Header name + * @param String value Header value + * @return Void + */ + append(name, value) { + name = `${name}`; + value = `${value}`; + validateName(name); + validateValue(value); + const key = find(this[MAP], name); + if (key !== void 0) { + this[MAP][key].push(value); + } else { + this[MAP][name] = [value]; + } + } + /** + * Check for header name existence + * + * @param String name Header name + * @return Boolean + */ + has(name) { + name = `${name}`; + validateName(name); + return find(this[MAP], name) !== void 0; + } + /** + * Delete all header values given name + * + * @param String name Header name + * @return Void + */ + delete(name) { + name = `${name}`; + validateName(name); + const key = find(this[MAP], name); + if (key !== void 0) { + delete this[MAP][key]; + } + } + /** + * Return raw headers (non-spec api) + * + * @return Object + */ + raw() { + return this[MAP]; + } + /** + * Get an iterator on keys. + * + * @return Iterator + */ + keys() { + return createHeadersIterator(this, "key"); + } + /** + * Get an iterator on values. + * + * @return Iterator + */ + values() { + return createHeadersIterator(this, "value"); + } + /** + * Get an iterator on entries. + * + * This is the default iterator of the Headers object. + * + * @return Iterator + */ + [Symbol.iterator]() { + return createHeadersIterator(this, "key+value"); + } + }; + Headers.prototype.entries = Headers.prototype[Symbol.iterator]; + Object.defineProperty(Headers.prototype, Symbol.toStringTag, { + value: "Headers", + writable: false, + enumerable: false, + configurable: true + }); + Object.defineProperties(Headers.prototype, { + get: { enumerable: true }, + forEach: { enumerable: true }, + set: { enumerable: true }, + append: { enumerable: true }, + has: { enumerable: true }, + delete: { enumerable: true }, + keys: { enumerable: true }, + values: { enumerable: true }, + entries: { enumerable: true } + }); + function getHeaders(headers) { + let kind = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "key+value"; + const keys = Object.keys(headers[MAP]).sort(); + return keys.map(kind === "key" ? function(k) { + return k.toLowerCase(); + } : kind === "value" ? function(k) { + return headers[MAP][k].join(", "); + } : function(k) { + return [k.toLowerCase(), headers[MAP][k].join(", ")]; + }); + } + var INTERNAL = Symbol("internal"); + function createHeadersIterator(target, kind) { + const iterator = Object.create(HeadersIteratorPrototype); + iterator[INTERNAL] = { + target, + kind, + index: 0 + }; + return iterator; + } + var HeadersIteratorPrototype = Object.setPrototypeOf({ + next() { + if (!this || Object.getPrototypeOf(this) !== HeadersIteratorPrototype) { + throw new TypeError("Value of `this` is not a HeadersIterator"); + } + var _INTERNAL = this[INTERNAL]; + const target = _INTERNAL.target, kind = _INTERNAL.kind, index = _INTERNAL.index; + const values = getHeaders(target, kind); + const len = values.length; + if (index >= len) { + return { + value: void 0, + done: true + }; + } + this[INTERNAL].index = index + 1; + return { + value: values[index], + done: false + }; + } + }, Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]()))); + Object.defineProperty(HeadersIteratorPrototype, Symbol.toStringTag, { + value: "HeadersIterator", + writable: false, + enumerable: false, + configurable: true + }); + function exportNodeCompatibleHeaders(headers) { + const obj = Object.assign({ __proto__: null }, headers[MAP]); + const hostHeaderKey = find(headers[MAP], "Host"); + if (hostHeaderKey !== void 0) { + obj[hostHeaderKey] = obj[hostHeaderKey][0]; + } + return obj; + } + function createHeadersLenient(obj) { + const headers = new Headers(); + for (const name of Object.keys(obj)) { + if (invalidTokenRegex.test(name)) { + continue; + } + if (Array.isArray(obj[name])) { + for (const val of obj[name]) { + if (invalidHeaderCharRegex.test(val)) { + continue; + } + if (headers[MAP][name] === void 0) { + headers[MAP][name] = [val]; + } else { + headers[MAP][name].push(val); + } + } + } else if (!invalidHeaderCharRegex.test(obj[name])) { + headers[MAP][name] = [obj[name]]; + } + } + return headers; + } + var INTERNALS$1 = Symbol("Response internals"); + var STATUS_CODES = http.STATUS_CODES; + var Response = class _Response { + constructor() { + let body = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : null; + let opts = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; + Body.call(this, body, opts); + const status = opts.status || 200; + const headers = new Headers(opts.headers); + if (body != null && !headers.has("Content-Type")) { + const contentType = extractContentType(body); + if (contentType) { + headers.append("Content-Type", contentType); + } + } + this[INTERNALS$1] = { + url: opts.url, + status, + statusText: opts.statusText || STATUS_CODES[status], + headers + }; + } + get url() { + return this[INTERNALS$1].url; + } + get status() { + return this[INTERNALS$1].status; + } + /** + * Convenience property representing if the request ended normally + */ + get ok() { + return this[INTERNALS$1].status >= 200 && this[INTERNALS$1].status < 300; + } + get statusText() { + return this[INTERNALS$1].statusText; + } + get headers() { + return this[INTERNALS$1].headers; + } + /** + * Clone this response + * + * @return Response + */ + clone() { + return new _Response(clone(this), { + url: this.url, + status: this.status, + statusText: this.statusText, + headers: this.headers, + ok: this.ok + }); + } + }; + Body.mixIn(Response.prototype); + Object.defineProperties(Response.prototype, { + url: { enumerable: true }, + status: { enumerable: true }, + ok: { enumerable: true }, + statusText: { enumerable: true }, + headers: { enumerable: true }, + clone: { enumerable: true } + }); + Object.defineProperty(Response.prototype, Symbol.toStringTag, { + value: "Response", + writable: false, + enumerable: false, + configurable: true + }); + var INTERNALS$2 = Symbol("Request internals"); + var parse_url = Url.parse; + var format_url = Url.format; + var streamDestructionSupported = "destroy" in Stream.Readable.prototype; + function isRequest(input) { + return typeof input === "object" && typeof input[INTERNALS$2] === "object"; + } + function isAbortSignal(signal) { + const proto = signal && typeof signal === "object" && Object.getPrototypeOf(signal); + return !!(proto && proto.constructor.name === "AbortSignal"); + } + var Request = class _Request { + constructor(input) { + let init = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; + let parsedURL; + if (!isRequest(input)) { + if (input && input.href) { + parsedURL = parse_url(input.href); + } else { + parsedURL = parse_url(`${input}`); + } + input = {}; + } else { + parsedURL = parse_url(input.url); + } + let method = init.method || input.method || "GET"; + method = method.toUpperCase(); + if ((init.body != null || isRequest(input) && input.body !== null) && (method === "GET" || method === "HEAD")) { + throw new TypeError("Request with GET/HEAD method cannot have body"); + } + let inputBody = init.body != null ? init.body : isRequest(input) && input.body !== null ? clone(input) : null; + Body.call(this, inputBody, { + timeout: init.timeout || input.timeout || 0, + size: init.size || input.size || 0 + }); + const headers = new Headers(init.headers || input.headers || {}); + if (inputBody != null && !headers.has("Content-Type")) { + const contentType = extractContentType(inputBody); + if (contentType) { + headers.append("Content-Type", contentType); + } + } + let signal = isRequest(input) ? input.signal : null; + if ("signal" in init) signal = init.signal; + if (signal != null && !isAbortSignal(signal)) { + throw new TypeError("Expected signal to be an instanceof AbortSignal"); + } + this[INTERNALS$2] = { + method, + redirect: init.redirect || input.redirect || "follow", + headers, + parsedURL, + signal + }; + this.follow = init.follow !== void 0 ? init.follow : input.follow !== void 0 ? input.follow : 20; + this.compress = init.compress !== void 0 ? init.compress : input.compress !== void 0 ? input.compress : true; + this.counter = init.counter || input.counter || 0; + this.agent = init.agent || input.agent; + } + get method() { + return this[INTERNALS$2].method; + } + get url() { + return format_url(this[INTERNALS$2].parsedURL); + } + get headers() { + return this[INTERNALS$2].headers; + } + get redirect() { + return this[INTERNALS$2].redirect; + } + get signal() { + return this[INTERNALS$2].signal; + } + /** + * Clone this request + * + * @return Request + */ + clone() { + return new _Request(this); + } + }; + Body.mixIn(Request.prototype); + Object.defineProperty(Request.prototype, Symbol.toStringTag, { + value: "Request", + writable: false, + enumerable: false, + configurable: true + }); + Object.defineProperties(Request.prototype, { + method: { enumerable: true }, + url: { enumerable: true }, + headers: { enumerable: true }, + redirect: { enumerable: true }, + clone: { enumerable: true }, + signal: { enumerable: true } + }); + function getNodeRequestOptions(request) { + const parsedURL = request[INTERNALS$2].parsedURL; + const headers = new Headers(request[INTERNALS$2].headers); + if (!headers.has("Accept")) { + headers.set("Accept", "*/*"); + } + if (!parsedURL.protocol || !parsedURL.hostname) { + throw new TypeError("Only absolute URLs are supported"); + } + if (!/^https?:$/.test(parsedURL.protocol)) { + throw new TypeError("Only HTTP(S) protocols are supported"); + } + if (request.signal && request.body instanceof Stream.Readable && !streamDestructionSupported) { + throw new Error("Cancellation of streamed requests with AbortSignal is not supported in node < 8"); + } + let contentLengthValue = null; + if (request.body == null && /^(POST|PUT)$/i.test(request.method)) { + contentLengthValue = "0"; + } + if (request.body != null) { + const totalBytes = getTotalBytes(request); + if (typeof totalBytes === "number") { + contentLengthValue = String(totalBytes); + } + } + if (contentLengthValue) { + headers.set("Content-Length", contentLengthValue); + } + if (!headers.has("User-Agent")) { + headers.set("User-Agent", "node-fetch/1.0 (+https://github.com/bitinn/node-fetch)"); + } + if (request.compress && !headers.has("Accept-Encoding")) { + headers.set("Accept-Encoding", "gzip,deflate"); + } + if (!headers.has("Connection") && !request.agent) { + headers.set("Connection", "close"); + } + return Object.assign({}, parsedURL, { + method: request.method, + headers: exportNodeCompatibleHeaders(headers), + agent: request.agent + }); + } + function AbortError(message) { + Error.call(this, message); + this.type = "aborted"; + this.message = message; + Error.captureStackTrace(this, this.constructor); + } + AbortError.prototype = Object.create(Error.prototype); + AbortError.prototype.constructor = AbortError; + AbortError.prototype.name = "AbortError"; + var PassThrough$1 = Stream.PassThrough; + var resolve_url = Url.resolve; + function fetch(url, opts) { + if (!fetch.Promise) { + throw new Error("native promise missing, set fetch.Promise to your favorite alternative"); + } + Body.Promise = fetch.Promise; + return new fetch.Promise(function(resolve, reject) { + const request = new Request(url, opts); + const options = getNodeRequestOptions(request); + const send = h2.request; + const signal = request.signal; + let response = null; + const abort = function abort2() { + let error = new AbortError("The user aborted a request."); + reject(error); + if (request.body && request.body instanceof Stream.Readable) { + request.body.destroy(error); + } + if (!response || !response.body) return; + response.body.emit("error", error); + }; + if (signal && signal.aborted) { + abort(); + return; + } + const abortAndFinalize = function abortAndFinalize2() { + abort(); + finalize(); + }; + const req = send(options); + let reqTimeout; + if (signal) { + signal.addEventListener("abort", abortAndFinalize); + } + function finalize() { + req.abort(); + if (signal) signal.removeEventListener("abort", abortAndFinalize); + clearTimeout(reqTimeout); + } + if (request.timeout) { + req.once("socket", function(socket) { + reqTimeout = setTimeout(function() { + reject(new FetchError(`network timeout at: ${request.url}`, "request-timeout")); + finalize(); + }, request.timeout); + }); + } + req.on("error", function(err) { + reject(new FetchError(`request to ${request.url} failed, reason: ${err.message}`, "system", err)); + finalize(); + }); + req.on("response", function(res) { + clearTimeout(reqTimeout); + const headers = createHeadersLenient(res.headers); + if (fetch.isRedirect(res.statusCode)) { + const location2 = headers.get("Location"); + const locationURL = location2 === null ? null : resolve_url(request.url, location2); + switch (request.redirect) { + case "error": + reject(new FetchError(`redirect mode is set to error: ${request.url}`, "no-redirect")); + finalize(); + return; + case "manual": + if (locationURL !== null) { + try { + headers.set("Location", locationURL); + } catch (err) { + reject(err); + } + } + break; + case "follow": + if (locationURL === null) { + break; + } + if (request.counter >= request.follow) { + reject(new FetchError(`maximum redirect reached at: ${request.url}`, "max-redirect")); + finalize(); + return; + } + const requestOpts = { + headers: new Headers(request.headers), + follow: request.follow, + counter: request.counter + 1, + agent: request.agent, + compress: request.compress, + method: request.method, + body: request.body, + signal: request.signal + }; + if (res.statusCode !== 303 && request.body && getTotalBytes(request) === null) { + reject(new FetchError("Cannot follow redirect with body being a readable stream", "unsupported-redirect")); + finalize(); + return; + } + if (res.statusCode === 303 || (res.statusCode === 301 || res.statusCode === 302) && request.method === "POST") { + requestOpts.method = "GET"; + requestOpts.body = void 0; + requestOpts.headers.delete("content-length"); + } + resolve(fetch(new Request(locationURL, requestOpts))); + finalize(); + return; + } + } + res.once("end", function() { + if (signal) signal.removeEventListener("abort", abortAndFinalize); + }); + let body = res.pipe(new PassThrough$1()); + const response_options = { + url: request.url, + status: res.statusCode, + statusText: res.statusMessage, + headers, + size: request.size, + timeout: request.timeout + }; + const codings = headers.get("Content-Encoding"); + if (!request.compress || request.method === "HEAD" || codings === null || res.statusCode === 204 || res.statusCode === 304) { + response = new Response(body, response_options); + resolve(response); + return; + } + const zlibOptions = { + flush: zlib.Z_SYNC_FLUSH, + finishFlush: zlib.Z_SYNC_FLUSH + }; + if (codings == "gzip" || codings == "x-gzip") { + body = body.pipe(zlib.createGunzip(zlibOptions)); + response = new Response(body, response_options); + resolve(response); + return; + } + if (codings == "deflate" || codings == "x-deflate") { + const raw = res.pipe(new PassThrough$1()); + raw.once("data", function(chunk) { + if ((chunk[0] & 15) === 8) { + body = body.pipe(zlib.createInflate()); + } else { + body = body.pipe(zlib.createInflateRaw()); + } + response = new Response(body, response_options); + resolve(response); + }); + return; + } + response = new Response(body, response_options); + resolve(response); + }); + writeToStream(req, request); + }); + } + fetch.isRedirect = function(code) { + return code === 301 || code === 302 || code === 303 || code === 307 || code === 308; + }; + fetch.Promise = global.Promise; + module2.exports = exports2 = fetch; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.default = exports2; + exports2.Headers = Headers; + exports2.Request = Request; + exports2.Response = Response; + exports2.FetchError = FetchError; + } +}); + +// ../../node_modules/oas-resolver-browser/node_modules/yaml/dist/PlainValue-ec8e588e.js +var require_PlainValue_ec8e588e = __commonJS({ + "../../node_modules/oas-resolver-browser/node_modules/yaml/dist/PlainValue-ec8e588e.js"(exports2) { + "use strict"; + var Char = { + ANCHOR: "&", + COMMENT: "#", + TAG: "!", + DIRECTIVES_END: "-", + DOCUMENT_END: "." + }; + var Type = { + ALIAS: "ALIAS", + BLANK_LINE: "BLANK_LINE", + BLOCK_FOLDED: "BLOCK_FOLDED", + BLOCK_LITERAL: "BLOCK_LITERAL", + COMMENT: "COMMENT", + DIRECTIVE: "DIRECTIVE", + DOCUMENT: "DOCUMENT", + FLOW_MAP: "FLOW_MAP", + FLOW_SEQ: "FLOW_SEQ", + MAP: "MAP", + MAP_KEY: "MAP_KEY", + MAP_VALUE: "MAP_VALUE", + PLAIN: "PLAIN", + QUOTE_DOUBLE: "QUOTE_DOUBLE", + QUOTE_SINGLE: "QUOTE_SINGLE", + SEQ: "SEQ", + SEQ_ITEM: "SEQ_ITEM" + }; + var defaultTagPrefix = "tag:yaml.org,2002:"; + var defaultTags = { + MAP: "tag:yaml.org,2002:map", + SEQ: "tag:yaml.org,2002:seq", + STR: "tag:yaml.org,2002:str" + }; + function findLineStarts(src) { + const ls = [0]; + let offset = src.indexOf("\n"); + while (offset !== -1) { + offset += 1; + ls.push(offset); + offset = src.indexOf("\n", offset); + } + return ls; + } + function getSrcInfo(cst) { + let lineStarts, src; + if (typeof cst === "string") { + lineStarts = findLineStarts(cst); + src = cst; + } else { + if (Array.isArray(cst)) cst = cst[0]; + if (cst && cst.context) { + if (!cst.lineStarts) cst.lineStarts = findLineStarts(cst.context.src); + lineStarts = cst.lineStarts; + src = cst.context.src; + } + } + return { + lineStarts, + src + }; + } + function getLinePos(offset, cst) { + if (typeof offset !== "number" || offset < 0) return null; + const { + lineStarts, + src + } = getSrcInfo(cst); + if (!lineStarts || !src || offset > src.length) return null; + for (let i = 0; i < lineStarts.length; ++i) { + const start = lineStarts[i]; + if (offset < start) { + return { + line: i, + col: offset - lineStarts[i - 1] + 1 + }; + } + if (offset === start) return { + line: i + 1, + col: 1 + }; + } + const line = lineStarts.length; + return { + line, + col: offset - lineStarts[line - 1] + 1 + }; + } + function getLine(line, cst) { + const { + lineStarts, + src + } = getSrcInfo(cst); + if (!lineStarts || !(line >= 1) || line > lineStarts.length) return null; + const start = lineStarts[line - 1]; + let end = lineStarts[line]; + while (end && end > start && src[end - 1] === "\n") --end; + return src.slice(start, end); + } + function getPrettyContext({ + start, + end + }, cst, maxWidth = 80) { + let src = getLine(start.line, cst); + if (!src) return null; + let { + col + } = start; + if (src.length > maxWidth) { + if (col <= maxWidth - 10) { + src = src.substr(0, maxWidth - 1) + "\u2026"; + } else { + const halfWidth = Math.round(maxWidth / 2); + if (src.length > col + halfWidth) src = src.substr(0, col + halfWidth - 1) + "\u2026"; + col -= src.length - maxWidth; + src = "\u2026" + src.substr(1 - maxWidth); + } + } + let errLen = 1; + let errEnd = ""; + if (end) { + if (end.line === start.line && col + (end.col - start.col) <= maxWidth + 1) { + errLen = end.col - start.col; + } else { + errLen = Math.min(src.length + 1, maxWidth) - col; + errEnd = "\u2026"; + } + } + const offset = col > 1 ? " ".repeat(col - 1) : ""; + const err = "^".repeat(errLen); + return `${src} +${offset}${err}${errEnd}`; + } + var Range = class _Range { + static copy(orig) { + return new _Range(orig.start, orig.end); + } + constructor(start, end) { + this.start = start; + this.end = end || start; + } + isEmpty() { + return typeof this.start !== "number" || !this.end || this.end <= this.start; + } + /** + * Set `origStart` and `origEnd` to point to the original source range for + * this node, which may differ due to dropped CR characters. + * + * @param {number[]} cr - Positions of dropped CR characters + * @param {number} offset - Starting index of `cr` from the last call + * @returns {number} - The next offset, matching the one found for `origStart` + */ + setOrigRange(cr, offset) { + const { + start, + end + } = this; + if (cr.length === 0 || end <= cr[0]) { + this.origStart = start; + this.origEnd = end; + return offset; + } + let i = offset; + while (i < cr.length) { + if (cr[i] > start) break; + else ++i; + } + this.origStart = start + i; + const nextOffset = i; + while (i < cr.length) { + if (cr[i] >= end) break; + else ++i; + } + this.origEnd = end + i; + return nextOffset; + } + }; + var Node = class _Node { + static addStringTerminator(src, offset, str) { + if (str[str.length - 1] === "\n") return str; + const next = _Node.endOfWhiteSpace(src, offset); + return next >= src.length || src[next] === "\n" ? str + "\n" : str; + } + // ^(---|...) + static atDocumentBoundary(src, offset, sep) { + const ch0 = src[offset]; + if (!ch0) return true; + const prev = src[offset - 1]; + if (prev && prev !== "\n") return false; + if (sep) { + if (ch0 !== sep) return false; + } else { + if (ch0 !== Char.DIRECTIVES_END && ch0 !== Char.DOCUMENT_END) return false; + } + const ch1 = src[offset + 1]; + const ch2 = src[offset + 2]; + if (ch1 !== ch0 || ch2 !== ch0) return false; + const ch3 = src[offset + 3]; + return !ch3 || ch3 === "\n" || ch3 === " " || ch3 === " "; + } + static endOfIdentifier(src, offset) { + let ch = src[offset]; + const isVerbatim = ch === "<"; + const notOk = isVerbatim ? ["\n", " ", " ", ">"] : ["\n", " ", " ", "[", "]", "{", "}", ","]; + while (ch && notOk.indexOf(ch) === -1) ch = src[offset += 1]; + if (isVerbatim && ch === ">") offset += 1; + return offset; + } + static endOfIndent(src, offset) { + let ch = src[offset]; + while (ch === " ") ch = src[offset += 1]; + return offset; + } + static endOfLine(src, offset) { + let ch = src[offset]; + while (ch && ch !== "\n") ch = src[offset += 1]; + return offset; + } + static endOfWhiteSpace(src, offset) { + let ch = src[offset]; + while (ch === " " || ch === " ") ch = src[offset += 1]; + return offset; + } + static startOfLine(src, offset) { + let ch = src[offset - 1]; + if (ch === "\n") return offset; + while (ch && ch !== "\n") ch = src[offset -= 1]; + return offset + 1; + } + /** + * End of indentation, or null if the line's indent level is not more + * than `indent` + * + * @param {string} src + * @param {number} indent + * @param {number} lineStart + * @returns {?number} + */ + static endOfBlockIndent(src, indent, lineStart) { + const inEnd = _Node.endOfIndent(src, lineStart); + if (inEnd > lineStart + indent) { + return inEnd; + } else { + const wsEnd = _Node.endOfWhiteSpace(src, inEnd); + const ch = src[wsEnd]; + if (!ch || ch === "\n") return wsEnd; + } + return null; + } + static atBlank(src, offset, endAsBlank) { + const ch = src[offset]; + return ch === "\n" || ch === " " || ch === " " || endAsBlank && !ch; + } + static nextNodeIsIndented(ch, indentDiff, indicatorAsIndent) { + if (!ch || indentDiff < 0) return false; + if (indentDiff > 0) return true; + return indicatorAsIndent && ch === "-"; + } + // should be at line or string end, or at next non-whitespace char + static normalizeOffset(src, offset) { + const ch = src[offset]; + return !ch ? offset : ch !== "\n" && src[offset - 1] === "\n" ? offset - 1 : _Node.endOfWhiteSpace(src, offset); + } + // fold single newline into space, multiple newlines to N - 1 newlines + // presumes src[offset] === '\n' + static foldNewline(src, offset, indent) { + let inCount = 0; + let error = false; + let fold = ""; + let ch = src[offset + 1]; + while (ch === " " || ch === " " || ch === "\n") { + switch (ch) { + case "\n": + inCount = 0; + offset += 1; + fold += "\n"; + break; + case " ": + if (inCount <= indent) error = true; + offset = _Node.endOfWhiteSpace(src, offset + 2) - 1; + break; + case " ": + inCount += 1; + offset += 1; + break; + } + ch = src[offset + 1]; + } + if (!fold) fold = " "; + if (ch && inCount <= indent) error = true; + return { + fold, + offset, + error + }; + } + constructor(type, props, context) { + Object.defineProperty(this, "context", { + value: context || null, + writable: true + }); + this.error = null; + this.range = null; + this.valueRange = null; + this.props = props || []; + this.type = type; + this.value = null; + } + getPropValue(idx, key, skipKey) { + if (!this.context) return null; + const { + src + } = this.context; + const prop = this.props[idx]; + return prop && src[prop.start] === key ? src.slice(prop.start + (skipKey ? 1 : 0), prop.end) : null; + } + get anchor() { + for (let i = 0; i < this.props.length; ++i) { + const anchor = this.getPropValue(i, Char.ANCHOR, true); + if (anchor != null) return anchor; + } + return null; + } + get comment() { + const comments = []; + for (let i = 0; i < this.props.length; ++i) { + const comment = this.getPropValue(i, Char.COMMENT, true); + if (comment != null) comments.push(comment); + } + return comments.length > 0 ? comments.join("\n") : null; + } + commentHasRequiredWhitespace(start) { + const { + src + } = this.context; + if (this.header && start === this.header.end) return false; + if (!this.valueRange) return false; + const { + end + } = this.valueRange; + return start !== end || _Node.atBlank(src, end - 1); + } + get hasComment() { + if (this.context) { + const { + src + } = this.context; + for (let i = 0; i < this.props.length; ++i) { + if (src[this.props[i].start] === Char.COMMENT) return true; + } + } + return false; + } + get hasProps() { + if (this.context) { + const { + src + } = this.context; + for (let i = 0; i < this.props.length; ++i) { + if (src[this.props[i].start] !== Char.COMMENT) return true; + } + } + return false; + } + get includesTrailingLines() { + return false; + } + get jsonLike() { + const jsonLikeTypes = [Type.FLOW_MAP, Type.FLOW_SEQ, Type.QUOTE_DOUBLE, Type.QUOTE_SINGLE]; + return jsonLikeTypes.indexOf(this.type) !== -1; + } + get rangeAsLinePos() { + if (!this.range || !this.context) return void 0; + const start = getLinePos(this.range.start, this.context.root); + if (!start) return void 0; + const end = getLinePos(this.range.end, this.context.root); + return { + start, + end + }; + } + get rawValue() { + if (!this.valueRange || !this.context) return null; + const { + start, + end + } = this.valueRange; + return this.context.src.slice(start, end); + } + get tag() { + for (let i = 0; i < this.props.length; ++i) { + const tag = this.getPropValue(i, Char.TAG, false); + if (tag != null) { + if (tag[1] === "<") { + return { + verbatim: tag.slice(2, -1) + }; + } else { + const [_2, handle, suffix] = tag.match(/^(.*!)([^!]*)$/); + return { + handle, + suffix + }; + } + } + } + return null; + } + get valueRangeContainsNewline() { + if (!this.valueRange || !this.context) return false; + const { + start, + end + } = this.valueRange; + const { + src + } = this.context; + for (let i = start; i < end; ++i) { + if (src[i] === "\n") return true; + } + return false; + } + parseComment(start) { + const { + src + } = this.context; + if (src[start] === Char.COMMENT) { + const end = _Node.endOfLine(src, start + 1); + const commentRange = new Range(start, end); + this.props.push(commentRange); + return end; + } + return start; + } + /** + * Populates the `origStart` and `origEnd` values of all ranges for this + * node. Extended by child classes to handle descendant nodes. + * + * @param {number[]} cr - Positions of dropped CR characters + * @param {number} offset - Starting index of `cr` from the last call + * @returns {number} - The next offset, matching the one found for `origStart` + */ + setOrigRanges(cr, offset) { + if (this.range) offset = this.range.setOrigRange(cr, offset); + if (this.valueRange) this.valueRange.setOrigRange(cr, offset); + this.props.forEach((prop) => prop.setOrigRange(cr, offset)); + return offset; + } + toString() { + const { + context: { + src + }, + range, + value + } = this; + if (value != null) return value; + const str = src.slice(range.start, range.end); + return _Node.addStringTerminator(src, range.end, str); + } + }; + var YAMLError = class extends Error { + constructor(name, source, message) { + if (!message || !(source instanceof Node)) throw new Error(`Invalid arguments for new ${name}`); + super(); + this.name = name; + this.message = message; + this.source = source; + } + makePretty() { + if (!this.source) return; + this.nodeType = this.source.type; + const cst = this.source.context && this.source.context.root; + if (typeof this.offset === "number") { + this.range = new Range(this.offset, this.offset + 1); + const start = cst && getLinePos(this.offset, cst); + if (start) { + const end = { + line: start.line, + col: start.col + 1 + }; + this.linePos = { + start, + end + }; + } + delete this.offset; + } else { + this.range = this.source.range; + this.linePos = this.source.rangeAsLinePos; + } + if (this.linePos) { + const { + line, + col + } = this.linePos.start; + this.message += ` at line ${line}, column ${col}`; + const ctx = cst && getPrettyContext(this.linePos, cst); + if (ctx) this.message += `: + +${ctx} +`; + } + delete this.source; + } + }; + var YAMLReferenceError = class extends YAMLError { + constructor(source, message) { + super("YAMLReferenceError", source, message); + } + }; + var YAMLSemanticError = class extends YAMLError { + constructor(source, message) { + super("YAMLSemanticError", source, message); + } + }; + var YAMLSyntaxError = class extends YAMLError { + constructor(source, message) { + super("YAMLSyntaxError", source, message); + } + }; + var YAMLWarning = class extends YAMLError { + constructor(source, message) { + super("YAMLWarning", source, message); + } + }; + function _defineProperty(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { + value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + return obj; + } + var PlainValue = class _PlainValue extends Node { + static endOfLine(src, start, inFlow) { + let ch = src[start]; + let offset = start; + while (ch && ch !== "\n") { + if (inFlow && (ch === "[" || ch === "]" || ch === "{" || ch === "}" || ch === ",")) break; + const next = src[offset + 1]; + if (ch === ":" && (!next || next === "\n" || next === " " || next === " " || inFlow && next === ",")) break; + if ((ch === " " || ch === " ") && next === "#") break; + offset += 1; + ch = next; + } + return offset; + } + get strValue() { + if (!this.valueRange || !this.context) return null; + let { + start, + end + } = this.valueRange; + const { + src + } = this.context; + let ch = src[end - 1]; + while (start < end && (ch === "\n" || ch === " " || ch === " ")) ch = src[--end - 1]; + let str = ""; + for (let i = start; i < end; ++i) { + const ch2 = src[i]; + if (ch2 === "\n") { + const { + fold, + offset + } = Node.foldNewline(src, i, -1); + str += fold; + i = offset; + } else if (ch2 === " " || ch2 === " ") { + const wsStart = i; + let next = src[i + 1]; + while (i < end && (next === " " || next === " ")) { + i += 1; + next = src[i + 1]; + } + if (next !== "\n") str += i > wsStart ? src.slice(wsStart, i + 1) : ch2; + } else { + str += ch2; + } + } + const ch0 = src[start]; + switch (ch0) { + case " ": { + const msg = "Plain value cannot start with a tab character"; + const errors = [new YAMLSemanticError(this, msg)]; + return { + errors, + str + }; + } + case "@": + case "`": { + const msg = `Plain value cannot start with reserved character ${ch0}`; + const errors = [new YAMLSemanticError(this, msg)]; + return { + errors, + str + }; + } + default: + return str; + } + } + parseBlockValue(start) { + const { + indent, + inFlow, + src + } = this.context; + let offset = start; + let valueEnd = start; + for (let ch = src[offset]; ch === "\n"; ch = src[offset]) { + if (Node.atDocumentBoundary(src, offset + 1)) break; + const end = Node.endOfBlockIndent(src, indent, offset + 1); + if (end === null || src[end] === "#") break; + if (src[end] === "\n") { + offset = end; + } else { + valueEnd = _PlainValue.endOfLine(src, end, inFlow); + offset = valueEnd; + } + } + if (this.valueRange.isEmpty()) this.valueRange.start = start; + this.valueRange.end = valueEnd; + return valueEnd; + } + /** + * Parses a plain value from the source + * + * Accepted forms are: + * ``` + * #comment + * + * first line + * + * first line #comment + * + * first line + * block + * lines + * + * #comment + * block + * lines + * ``` + * where block lines are empty or have an indent level greater than `indent`. + * + * @param {ParseContext} context + * @param {number} start - Index of first character + * @returns {number} - Index of the character after this scalar, may be `\n` + */ + parse(context, start) { + this.context = context; + const { + inFlow, + src + } = context; + let offset = start; + const ch = src[offset]; + if (ch && ch !== "#" && ch !== "\n") { + offset = _PlainValue.endOfLine(src, start, inFlow); + } + this.valueRange = new Range(start, offset); + offset = Node.endOfWhiteSpace(src, offset); + offset = this.parseComment(offset); + if (!this.hasComment || this.valueRange.isEmpty()) { + offset = this.parseBlockValue(offset); + } + return offset; + } + }; + exports2.Char = Char; + exports2.Node = Node; + exports2.PlainValue = PlainValue; + exports2.Range = Range; + exports2.Type = Type; + exports2.YAMLError = YAMLError; + exports2.YAMLReferenceError = YAMLReferenceError; + exports2.YAMLSemanticError = YAMLSemanticError; + exports2.YAMLSyntaxError = YAMLSyntaxError; + exports2.YAMLWarning = YAMLWarning; + exports2._defineProperty = _defineProperty; + exports2.defaultTagPrefix = defaultTagPrefix; + exports2.defaultTags = defaultTags; + } +}); + +// ../../node_modules/oas-resolver-browser/node_modules/yaml/dist/parse-cst.js +var require_parse_cst = __commonJS({ + "../../node_modules/oas-resolver-browser/node_modules/yaml/dist/parse-cst.js"(exports2) { + "use strict"; + var PlainValue = require_PlainValue_ec8e588e(); + var BlankLine = class extends PlainValue.Node { + constructor() { + super(PlainValue.Type.BLANK_LINE); + } + /* istanbul ignore next */ + get includesTrailingLines() { + return true; + } + /** + * Parses a blank line from the source + * + * @param {ParseContext} context + * @param {number} start - Index of first \n character + * @returns {number} - Index of the character after this + */ + parse(context, start) { + this.context = context; + this.range = new PlainValue.Range(start, start + 1); + return start + 1; + } + }; + var CollectionItem = class extends PlainValue.Node { + constructor(type, props) { + super(type, props); + this.node = null; + } + get includesTrailingLines() { + return !!this.node && this.node.includesTrailingLines; + } + /** + * @param {ParseContext} context + * @param {number} start - Index of first character + * @returns {number} - Index of the character after this + */ + parse(context, start) { + this.context = context; + const { + parseNode, + src + } = context; + let { + atLineStart, + lineStart + } = context; + if (!atLineStart && this.type === PlainValue.Type.SEQ_ITEM) this.error = new PlainValue.YAMLSemanticError(this, "Sequence items must not have preceding content on the same line"); + const indent = atLineStart ? start - lineStart : context.indent; + let offset = PlainValue.Node.endOfWhiteSpace(src, start + 1); + let ch = src[offset]; + const inlineComment = ch === "#"; + const comments = []; + let blankLine = null; + while (ch === "\n" || ch === "#") { + if (ch === "#") { + const end2 = PlainValue.Node.endOfLine(src, offset + 1); + comments.push(new PlainValue.Range(offset, end2)); + offset = end2; + } else { + atLineStart = true; + lineStart = offset + 1; + const wsEnd = PlainValue.Node.endOfWhiteSpace(src, lineStart); + if (src[wsEnd] === "\n" && comments.length === 0) { + blankLine = new BlankLine(); + lineStart = blankLine.parse({ + src + }, lineStart); + } + offset = PlainValue.Node.endOfIndent(src, lineStart); + } + ch = src[offset]; + } + if (PlainValue.Node.nextNodeIsIndented(ch, offset - (lineStart + indent), this.type !== PlainValue.Type.SEQ_ITEM)) { + this.node = parseNode({ + atLineStart, + inCollection: false, + indent, + lineStart, + parent: this + }, offset); + } else if (ch && lineStart > start + 1) { + offset = lineStart - 1; + } + if (this.node) { + if (blankLine) { + const items = context.parent.items || context.parent.contents; + if (items) items.push(blankLine); + } + if (comments.length) Array.prototype.push.apply(this.props, comments); + offset = this.node.range.end; + } else { + if (inlineComment) { + const c = comments[0]; + this.props.push(c); + offset = c.end; + } else { + offset = PlainValue.Node.endOfLine(src, start + 1); + } + } + const end = this.node ? this.node.valueRange.end : offset; + this.valueRange = new PlainValue.Range(start, end); + return offset; + } + setOrigRanges(cr, offset) { + offset = super.setOrigRanges(cr, offset); + return this.node ? this.node.setOrigRanges(cr, offset) : offset; + } + toString() { + const { + context: { + src + }, + node, + range, + value + } = this; + if (value != null) return value; + const str = node ? src.slice(range.start, node.range.start) + String(node) : src.slice(range.start, range.end); + return PlainValue.Node.addStringTerminator(src, range.end, str); + } + }; + var Comment = class extends PlainValue.Node { + constructor() { + super(PlainValue.Type.COMMENT); + } + /** + * Parses a comment line from the source + * + * @param {ParseContext} context + * @param {number} start - Index of first character + * @returns {number} - Index of the character after this scalar + */ + parse(context, start) { + this.context = context; + const offset = this.parseComment(start); + this.range = new PlainValue.Range(start, offset); + return offset; + } + }; + function grabCollectionEndComments(node) { + let cnode = node; + while (cnode instanceof CollectionItem) cnode = cnode.node; + if (!(cnode instanceof Collection)) return null; + const len = cnode.items.length; + let ci = -1; + for (let i = len - 1; i >= 0; --i) { + const n = cnode.items[i]; + if (n.type === PlainValue.Type.COMMENT) { + const { + indent, + lineStart + } = n.context; + if (indent > 0 && n.range.start >= lineStart + indent) break; + ci = i; + } else if (n.type === PlainValue.Type.BLANK_LINE) ci = i; + else break; + } + if (ci === -1) return null; + const ca = cnode.items.splice(ci, len - ci); + const prevEnd = ca[0].range.start; + while (true) { + cnode.range.end = prevEnd; + if (cnode.valueRange && cnode.valueRange.end > prevEnd) cnode.valueRange.end = prevEnd; + if (cnode === node) break; + cnode = cnode.context.parent; + } + return ca; + } + var Collection = class _Collection extends PlainValue.Node { + static nextContentHasIndent(src, offset, indent) { + const lineStart = PlainValue.Node.endOfLine(src, offset) + 1; + offset = PlainValue.Node.endOfWhiteSpace(src, lineStart); + const ch = src[offset]; + if (!ch) return false; + if (offset >= lineStart + indent) return true; + if (ch !== "#" && ch !== "\n") return false; + return _Collection.nextContentHasIndent(src, offset, indent); + } + constructor(firstItem) { + super(firstItem.type === PlainValue.Type.SEQ_ITEM ? PlainValue.Type.SEQ : PlainValue.Type.MAP); + for (let i = firstItem.props.length - 1; i >= 0; --i) { + if (firstItem.props[i].start < firstItem.context.lineStart) { + this.props = firstItem.props.slice(0, i + 1); + firstItem.props = firstItem.props.slice(i + 1); + const itemRange = firstItem.props[0] || firstItem.valueRange; + firstItem.range.start = itemRange.start; + break; + } + } + this.items = [firstItem]; + const ec = grabCollectionEndComments(firstItem); + if (ec) Array.prototype.push.apply(this.items, ec); + } + get includesTrailingLines() { + return this.items.length > 0; + } + /** + * @param {ParseContext} context + * @param {number} start - Index of first character + * @returns {number} - Index of the character after this + */ + parse(context, start) { + this.context = context; + const { + parseNode, + src + } = context; + let lineStart = PlainValue.Node.startOfLine(src, start); + const firstItem = this.items[0]; + firstItem.context.parent = this; + this.valueRange = PlainValue.Range.copy(firstItem.valueRange); + const indent = firstItem.range.start - firstItem.context.lineStart; + let offset = start; + offset = PlainValue.Node.normalizeOffset(src, offset); + let ch = src[offset]; + let atLineStart = PlainValue.Node.endOfWhiteSpace(src, lineStart) === offset; + let prevIncludesTrailingLines = false; + while (ch) { + while (ch === "\n" || ch === "#") { + if (atLineStart && ch === "\n" && !prevIncludesTrailingLines) { + const blankLine = new BlankLine(); + offset = blankLine.parse({ + src + }, offset); + this.valueRange.end = offset; + if (offset >= src.length) { + ch = null; + break; + } + this.items.push(blankLine); + offset -= 1; + } else if (ch === "#") { + if (offset < lineStart + indent && !_Collection.nextContentHasIndent(src, offset, indent)) { + return offset; + } + const comment = new Comment(); + offset = comment.parse({ + indent, + lineStart, + src + }, offset); + this.items.push(comment); + this.valueRange.end = offset; + if (offset >= src.length) { + ch = null; + break; + } + } + lineStart = offset + 1; + offset = PlainValue.Node.endOfIndent(src, lineStart); + if (PlainValue.Node.atBlank(src, offset)) { + const wsEnd = PlainValue.Node.endOfWhiteSpace(src, offset); + const next = src[wsEnd]; + if (!next || next === "\n" || next === "#") { + offset = wsEnd; + } + } + ch = src[offset]; + atLineStart = true; + } + if (!ch) { + break; + } + if (offset !== lineStart + indent && (atLineStart || ch !== ":")) { + if (offset < lineStart + indent) { + if (lineStart > start) offset = lineStart; + break; + } else if (!this.error) { + const msg = "All collection items must start at the same column"; + this.error = new PlainValue.YAMLSyntaxError(this, msg); + } + } + if (firstItem.type === PlainValue.Type.SEQ_ITEM) { + if (ch !== "-") { + if (lineStart > start) offset = lineStart; + break; + } + } else if (ch === "-" && !this.error) { + const next = src[offset + 1]; + if (!next || next === "\n" || next === " " || next === " ") { + const msg = "A collection cannot be both a mapping and a sequence"; + this.error = new PlainValue.YAMLSyntaxError(this, msg); + } + } + const node = parseNode({ + atLineStart, + inCollection: true, + indent, + lineStart, + parent: this + }, offset); + if (!node) return offset; + this.items.push(node); + this.valueRange.end = node.valueRange.end; + offset = PlainValue.Node.normalizeOffset(src, node.range.end); + ch = src[offset]; + atLineStart = false; + prevIncludesTrailingLines = node.includesTrailingLines; + if (ch) { + let ls = offset - 1; + let prev = src[ls]; + while (prev === " " || prev === " ") prev = src[--ls]; + if (prev === "\n") { + lineStart = ls + 1; + atLineStart = true; + } + } + const ec = grabCollectionEndComments(node); + if (ec) Array.prototype.push.apply(this.items, ec); + } + return offset; + } + setOrigRanges(cr, offset) { + offset = super.setOrigRanges(cr, offset); + this.items.forEach((node) => { + offset = node.setOrigRanges(cr, offset); + }); + return offset; + } + toString() { + const { + context: { + src + }, + items, + range, + value + } = this; + if (value != null) return value; + let str = src.slice(range.start, items[0].range.start) + String(items[0]); + for (let i = 1; i < items.length; ++i) { + const item = items[i]; + const { + atLineStart, + indent + } = item.context; + if (atLineStart) for (let i2 = 0; i2 < indent; ++i2) str += " "; + str += String(item); + } + return PlainValue.Node.addStringTerminator(src, range.end, str); + } + }; + var Directive = class extends PlainValue.Node { + constructor() { + super(PlainValue.Type.DIRECTIVE); + this.name = null; + } + get parameters() { + const raw = this.rawValue; + return raw ? raw.trim().split(/[ \t]+/) : []; + } + parseName(start) { + const { + src + } = this.context; + let offset = start; + let ch = src[offset]; + while (ch && ch !== "\n" && ch !== " " && ch !== " ") ch = src[offset += 1]; + this.name = src.slice(start, offset); + return offset; + } + parseParameters(start) { + const { + src + } = this.context; + let offset = start; + let ch = src[offset]; + while (ch && ch !== "\n" && ch !== "#") ch = src[offset += 1]; + this.valueRange = new PlainValue.Range(start, offset); + return offset; + } + parse(context, start) { + this.context = context; + let offset = this.parseName(start + 1); + offset = this.parseParameters(offset); + offset = this.parseComment(offset); + this.range = new PlainValue.Range(start, offset); + return offset; + } + }; + var Document = class _Document extends PlainValue.Node { + static startCommentOrEndBlankLine(src, start) { + const offset = PlainValue.Node.endOfWhiteSpace(src, start); + const ch = src[offset]; + return ch === "#" || ch === "\n" ? offset : start; + } + constructor() { + super(PlainValue.Type.DOCUMENT); + this.directives = null; + this.contents = null; + this.directivesEndMarker = null; + this.documentEndMarker = null; + } + parseDirectives(start) { + const { + src + } = this.context; + this.directives = []; + let atLineStart = true; + let hasDirectives = false; + let offset = start; + while (!PlainValue.Node.atDocumentBoundary(src, offset, PlainValue.Char.DIRECTIVES_END)) { + offset = _Document.startCommentOrEndBlankLine(src, offset); + switch (src[offset]) { + case "\n": + if (atLineStart) { + const blankLine = new BlankLine(); + offset = blankLine.parse({ + src + }, offset); + if (offset < src.length) { + this.directives.push(blankLine); + } + } else { + offset += 1; + atLineStart = true; + } + break; + case "#": + { + const comment = new Comment(); + offset = comment.parse({ + src + }, offset); + this.directives.push(comment); + atLineStart = false; + } + break; + case "%": + { + const directive = new Directive(); + offset = directive.parse({ + parent: this, + src + }, offset); + this.directives.push(directive); + hasDirectives = true; + atLineStart = false; + } + break; + default: + if (hasDirectives) { + this.error = new PlainValue.YAMLSemanticError(this, "Missing directives-end indicator line"); + } else if (this.directives.length > 0) { + this.contents = this.directives; + this.directives = []; + } + return offset; + } + } + if (src[offset]) { + this.directivesEndMarker = new PlainValue.Range(offset, offset + 3); + return offset + 3; + } + if (hasDirectives) { + this.error = new PlainValue.YAMLSemanticError(this, "Missing directives-end indicator line"); + } else if (this.directives.length > 0) { + this.contents = this.directives; + this.directives = []; + } + return offset; + } + parseContents(start) { + const { + parseNode, + src + } = this.context; + if (!this.contents) this.contents = []; + let lineStart = start; + while (src[lineStart - 1] === "-") lineStart -= 1; + let offset = PlainValue.Node.endOfWhiteSpace(src, start); + let atLineStart = lineStart === start; + this.valueRange = new PlainValue.Range(offset); + while (!PlainValue.Node.atDocumentBoundary(src, offset, PlainValue.Char.DOCUMENT_END)) { + switch (src[offset]) { + case "\n": + if (atLineStart) { + const blankLine = new BlankLine(); + offset = blankLine.parse({ + src + }, offset); + if (offset < src.length) { + this.contents.push(blankLine); + } + } else { + offset += 1; + atLineStart = true; + } + lineStart = offset; + break; + case "#": + { + const comment = new Comment(); + offset = comment.parse({ + src + }, offset); + this.contents.push(comment); + atLineStart = false; + } + break; + default: { + const iEnd = PlainValue.Node.endOfIndent(src, offset); + const context = { + atLineStart, + indent: -1, + inFlow: false, + inCollection: false, + lineStart, + parent: this + }; + const node = parseNode(context, iEnd); + if (!node) return this.valueRange.end = iEnd; + this.contents.push(node); + offset = node.range.end; + atLineStart = false; + const ec = grabCollectionEndComments(node); + if (ec) Array.prototype.push.apply(this.contents, ec); + } + } + offset = _Document.startCommentOrEndBlankLine(src, offset); + } + this.valueRange.end = offset; + if (src[offset]) { + this.documentEndMarker = new PlainValue.Range(offset, offset + 3); + offset += 3; + if (src[offset]) { + offset = PlainValue.Node.endOfWhiteSpace(src, offset); + if (src[offset] === "#") { + const comment = new Comment(); + offset = comment.parse({ + src + }, offset); + this.contents.push(comment); + } + switch (src[offset]) { + case "\n": + offset += 1; + break; + case void 0: + break; + default: + this.error = new PlainValue.YAMLSyntaxError(this, "Document end marker line cannot have a non-comment suffix"); + } + } + } + return offset; + } + /** + * @param {ParseContext} context + * @param {number} start - Index of first character + * @returns {number} - Index of the character after this + */ + parse(context, start) { + context.root = this; + this.context = context; + const { + src + } = context; + let offset = src.charCodeAt(start) === 65279 ? start + 1 : start; + offset = this.parseDirectives(offset); + offset = this.parseContents(offset); + return offset; + } + setOrigRanges(cr, offset) { + offset = super.setOrigRanges(cr, offset); + this.directives.forEach((node) => { + offset = node.setOrigRanges(cr, offset); + }); + if (this.directivesEndMarker) offset = this.directivesEndMarker.setOrigRange(cr, offset); + this.contents.forEach((node) => { + offset = node.setOrigRanges(cr, offset); + }); + if (this.documentEndMarker) offset = this.documentEndMarker.setOrigRange(cr, offset); + return offset; + } + toString() { + const { + contents, + directives, + value + } = this; + if (value != null) return value; + let str = directives.join(""); + if (contents.length > 0) { + if (directives.length > 0 || contents[0].type === PlainValue.Type.COMMENT) str += "---\n"; + str += contents.join(""); + } + if (str[str.length - 1] !== "\n") str += "\n"; + return str; + } + }; + var Alias = class extends PlainValue.Node { + /** + * Parses an *alias from the source + * + * @param {ParseContext} context + * @param {number} start - Index of first character + * @returns {number} - Index of the character after this scalar + */ + parse(context, start) { + this.context = context; + const { + src + } = context; + let offset = PlainValue.Node.endOfIdentifier(src, start + 1); + this.valueRange = new PlainValue.Range(start + 1, offset); + offset = PlainValue.Node.endOfWhiteSpace(src, offset); + offset = this.parseComment(offset); + return offset; + } + }; + var Chomp = { + CLIP: "CLIP", + KEEP: "KEEP", + STRIP: "STRIP" + }; + var BlockValue = class extends PlainValue.Node { + constructor(type, props) { + super(type, props); + this.blockIndent = null; + this.chomping = Chomp.CLIP; + this.header = null; + } + get includesTrailingLines() { + return this.chomping === Chomp.KEEP; + } + get strValue() { + if (!this.valueRange || !this.context) return null; + let { + start, + end + } = this.valueRange; + const { + indent, + src + } = this.context; + if (this.valueRange.isEmpty()) return ""; + let lastNewLine = null; + let ch = src[end - 1]; + while (ch === "\n" || ch === " " || ch === " ") { + end -= 1; + if (end <= start) { + if (this.chomping === Chomp.KEEP) break; + else return ""; + } + if (ch === "\n") lastNewLine = end; + ch = src[end - 1]; + } + let keepStart = end + 1; + if (lastNewLine) { + if (this.chomping === Chomp.KEEP) { + keepStart = lastNewLine; + end = this.valueRange.end; + } else { + end = lastNewLine; + } + } + const bi = indent + this.blockIndent; + const folded = this.type === PlainValue.Type.BLOCK_FOLDED; + let atStart = true; + let str = ""; + let sep = ""; + let prevMoreIndented = false; + for (let i = start; i < end; ++i) { + for (let j = 0; j < bi; ++j) { + if (src[i] !== " ") break; + i += 1; + } + const ch2 = src[i]; + if (ch2 === "\n") { + if (sep === "\n") str += "\n"; + else sep = "\n"; + } else { + const lineEnd = PlainValue.Node.endOfLine(src, i); + const line = src.slice(i, lineEnd); + i = lineEnd; + if (folded && (ch2 === " " || ch2 === " ") && i < keepStart) { + if (sep === " ") sep = "\n"; + else if (!prevMoreIndented && !atStart && sep === "\n") sep = "\n\n"; + str += sep + line; + sep = lineEnd < end && src[lineEnd] || ""; + prevMoreIndented = true; + } else { + str += sep + line; + sep = folded && i < keepStart ? " " : "\n"; + prevMoreIndented = false; + } + if (atStart && line !== "") atStart = false; + } + } + return this.chomping === Chomp.STRIP ? str : str + "\n"; + } + parseBlockHeader(start) { + const { + src + } = this.context; + let offset = start + 1; + let bi = ""; + while (true) { + const ch = src[offset]; + switch (ch) { + case "-": + this.chomping = Chomp.STRIP; + break; + case "+": + this.chomping = Chomp.KEEP; + break; + case "0": + case "1": + case "2": + case "3": + case "4": + case "5": + case "6": + case "7": + case "8": + case "9": + bi += ch; + break; + default: + this.blockIndent = Number(bi) || null; + this.header = new PlainValue.Range(start, offset); + return offset; + } + offset += 1; + } + } + parseBlockValue(start) { + const { + indent, + src + } = this.context; + const explicit = !!this.blockIndent; + let offset = start; + let valueEnd = start; + let minBlockIndent = 1; + for (let ch = src[offset]; ch === "\n"; ch = src[offset]) { + offset += 1; + if (PlainValue.Node.atDocumentBoundary(src, offset)) break; + const end = PlainValue.Node.endOfBlockIndent(src, indent, offset); + if (end === null) break; + const ch2 = src[end]; + const lineIndent = end - (offset + indent); + if (!this.blockIndent) { + if (src[end] !== "\n") { + if (lineIndent < minBlockIndent) { + const msg = "Block scalars with more-indented leading empty lines must use an explicit indentation indicator"; + this.error = new PlainValue.YAMLSemanticError(this, msg); + } + this.blockIndent = lineIndent; + } else if (lineIndent > minBlockIndent) { + minBlockIndent = lineIndent; + } + } else if (ch2 && ch2 !== "\n" && lineIndent < this.blockIndent) { + if (src[end] === "#") break; + if (!this.error) { + const src2 = explicit ? "explicit indentation indicator" : "first line"; + const msg = `Block scalars must not be less indented than their ${src2}`; + this.error = new PlainValue.YAMLSemanticError(this, msg); + } + } + if (src[end] === "\n") { + offset = end; + } else { + offset = valueEnd = PlainValue.Node.endOfLine(src, end); + } + } + if (this.chomping !== Chomp.KEEP) { + offset = src[valueEnd] ? valueEnd + 1 : valueEnd; + } + this.valueRange = new PlainValue.Range(start + 1, offset); + return offset; + } + /** + * Parses a block value from the source + * + * Accepted forms are: + * ``` + * BS + * block + * lines + * + * BS #comment + * block + * lines + * ``` + * where the block style BS matches the regexp `[|>][-+1-9]*` and block lines + * are empty or have an indent level greater than `indent`. + * + * @param {ParseContext} context + * @param {number} start - Index of first character + * @returns {number} - Index of the character after this block + */ + parse(context, start) { + this.context = context; + const { + src + } = context; + let offset = this.parseBlockHeader(start); + offset = PlainValue.Node.endOfWhiteSpace(src, offset); + offset = this.parseComment(offset); + offset = this.parseBlockValue(offset); + return offset; + } + setOrigRanges(cr, offset) { + offset = super.setOrigRanges(cr, offset); + return this.header ? this.header.setOrigRange(cr, offset) : offset; + } + }; + var FlowCollection = class extends PlainValue.Node { + constructor(type, props) { + super(type, props); + this.items = null; + } + prevNodeIsJsonLike(idx = this.items.length) { + const node = this.items[idx - 1]; + return !!node && (node.jsonLike || node.type === PlainValue.Type.COMMENT && this.prevNodeIsJsonLike(idx - 1)); + } + /** + * @param {ParseContext} context + * @param {number} start - Index of first character + * @returns {number} - Index of the character after this + */ + parse(context, start) { + this.context = context; + const { + parseNode, + src + } = context; + let { + indent, + lineStart + } = context; + let char = src[start]; + this.items = [{ + char, + offset: start + }]; + let offset = PlainValue.Node.endOfWhiteSpace(src, start + 1); + char = src[offset]; + while (char && char !== "]" && char !== "}") { + switch (char) { + case "\n": + { + lineStart = offset + 1; + const wsEnd = PlainValue.Node.endOfWhiteSpace(src, lineStart); + if (src[wsEnd] === "\n") { + const blankLine = new BlankLine(); + lineStart = blankLine.parse({ + src + }, lineStart); + this.items.push(blankLine); + } + offset = PlainValue.Node.endOfIndent(src, lineStart); + if (offset <= lineStart + indent) { + char = src[offset]; + if (offset < lineStart + indent || char !== "]" && char !== "}") { + const msg = "Insufficient indentation in flow collection"; + this.error = new PlainValue.YAMLSemanticError(this, msg); + } + } + } + break; + case ",": + { + this.items.push({ + char, + offset + }); + offset += 1; + } + break; + case "#": + { + const comment = new Comment(); + offset = comment.parse({ + src + }, offset); + this.items.push(comment); + } + break; + case "?": + case ":": { + const next = src[offset + 1]; + if (next === "\n" || next === " " || next === " " || next === "," || // in-flow : after JSON-like key does not need to be followed by whitespace + char === ":" && this.prevNodeIsJsonLike()) { + this.items.push({ + char, + offset + }); + offset += 1; + break; + } + } + default: { + const node = parseNode({ + atLineStart: false, + inCollection: false, + inFlow: true, + indent: -1, + lineStart, + parent: this + }, offset); + if (!node) { + this.valueRange = new PlainValue.Range(start, offset); + return offset; + } + this.items.push(node); + offset = PlainValue.Node.normalizeOffset(src, node.range.end); + } + } + offset = PlainValue.Node.endOfWhiteSpace(src, offset); + char = src[offset]; + } + this.valueRange = new PlainValue.Range(start, offset + 1); + if (char) { + this.items.push({ + char, + offset + }); + offset = PlainValue.Node.endOfWhiteSpace(src, offset + 1); + offset = this.parseComment(offset); + } + return offset; + } + setOrigRanges(cr, offset) { + offset = super.setOrigRanges(cr, offset); + this.items.forEach((node) => { + if (node instanceof PlainValue.Node) { + offset = node.setOrigRanges(cr, offset); + } else if (cr.length === 0) { + node.origOffset = node.offset; + } else { + let i = offset; + while (i < cr.length) { + if (cr[i] > node.offset) break; + else ++i; + } + node.origOffset = node.offset + i; + offset = i; + } + }); + return offset; + } + toString() { + const { + context: { + src + }, + items, + range, + value + } = this; + if (value != null) return value; + const nodes = items.filter((item) => item instanceof PlainValue.Node); + let str = ""; + let prevEnd = range.start; + nodes.forEach((node) => { + const prefix = src.slice(prevEnd, node.range.start); + prevEnd = node.range.end; + str += prefix + String(node); + if (str[str.length - 1] === "\n" && src[prevEnd - 1] !== "\n" && src[prevEnd] === "\n") { + prevEnd += 1; + } + }); + str += src.slice(prevEnd, range.end); + return PlainValue.Node.addStringTerminator(src, range.end, str); + } + }; + var QuoteDouble = class _QuoteDouble extends PlainValue.Node { + static endOfQuote(src, offset) { + let ch = src[offset]; + while (ch && ch !== '"') { + offset += ch === "\\" ? 2 : 1; + ch = src[offset]; + } + return offset + 1; + } + /** + * @returns {string | { str: string, errors: YAMLSyntaxError[] }} + */ + get strValue() { + if (!this.valueRange || !this.context) return null; + const errors = []; + const { + start, + end + } = this.valueRange; + const { + indent, + src + } = this.context; + if (src[end - 1] !== '"') errors.push(new PlainValue.YAMLSyntaxError(this, 'Missing closing "quote')); + let str = ""; + for (let i = start + 1; i < end - 1; ++i) { + const ch = src[i]; + if (ch === "\n") { + if (PlainValue.Node.atDocumentBoundary(src, i + 1)) errors.push(new PlainValue.YAMLSemanticError(this, "Document boundary indicators are not allowed within string values")); + const { + fold, + offset, + error + } = PlainValue.Node.foldNewline(src, i, indent); + str += fold; + i = offset; + if (error) errors.push(new PlainValue.YAMLSemanticError(this, "Multi-line double-quoted string needs to be sufficiently indented")); + } else if (ch === "\\") { + i += 1; + switch (src[i]) { + case "0": + str += "\0"; + break; + case "a": + str += "\x07"; + break; + case "b": + str += "\b"; + break; + case "e": + str += "\x1B"; + break; + case "f": + str += "\f"; + break; + case "n": + str += "\n"; + break; + case "r": + str += "\r"; + break; + case "t": + str += " "; + break; + case "v": + str += "\v"; + break; + case "N": + str += "\x85"; + break; + case "_": + str += "\xA0"; + break; + case "L": + str += "\u2028"; + break; + case "P": + str += "\u2029"; + break; + case " ": + str += " "; + break; + case '"': + str += '"'; + break; + case "/": + str += "/"; + break; + case "\\": + str += "\\"; + break; + case " ": + str += " "; + break; + case "x": + str += this.parseCharCode(i + 1, 2, errors); + i += 2; + break; + case "u": + str += this.parseCharCode(i + 1, 4, errors); + i += 4; + break; + case "U": + str += this.parseCharCode(i + 1, 8, errors); + i += 8; + break; + case "\n": + while (src[i + 1] === " " || src[i + 1] === " ") i += 1; + break; + default: + errors.push(new PlainValue.YAMLSyntaxError(this, `Invalid escape sequence ${src.substr(i - 1, 2)}`)); + str += "\\" + src[i]; + } + } else if (ch === " " || ch === " ") { + const wsStart = i; + let next = src[i + 1]; + while (next === " " || next === " ") { + i += 1; + next = src[i + 1]; + } + if (next !== "\n") str += i > wsStart ? src.slice(wsStart, i + 1) : ch; + } else { + str += ch; + } + } + return errors.length > 0 ? { + errors, + str + } : str; + } + parseCharCode(offset, length, errors) { + const { + src + } = this.context; + const cc = src.substr(offset, length); + const ok = cc.length === length && /^[0-9a-fA-F]+$/.test(cc); + const code = ok ? parseInt(cc, 16) : NaN; + if (isNaN(code)) { + errors.push(new PlainValue.YAMLSyntaxError(this, `Invalid escape sequence ${src.substr(offset - 2, length + 2)}`)); + return src.substr(offset - 2, length + 2); + } + return String.fromCodePoint(code); + } + /** + * Parses a "double quoted" value from the source + * + * @param {ParseContext} context + * @param {number} start - Index of first character + * @returns {number} - Index of the character after this scalar + */ + parse(context, start) { + this.context = context; + const { + src + } = context; + let offset = _QuoteDouble.endOfQuote(src, start + 1); + this.valueRange = new PlainValue.Range(start, offset); + offset = PlainValue.Node.endOfWhiteSpace(src, offset); + offset = this.parseComment(offset); + return offset; + } + }; + var QuoteSingle = class _QuoteSingle extends PlainValue.Node { + static endOfQuote(src, offset) { + let ch = src[offset]; + while (ch) { + if (ch === "'") { + if (src[offset + 1] !== "'") break; + ch = src[offset += 2]; + } else { + ch = src[offset += 1]; + } + } + return offset + 1; + } + /** + * @returns {string | { str: string, errors: YAMLSyntaxError[] }} + */ + get strValue() { + if (!this.valueRange || !this.context) return null; + const errors = []; + const { + start, + end + } = this.valueRange; + const { + indent, + src + } = this.context; + if (src[end - 1] !== "'") errors.push(new PlainValue.YAMLSyntaxError(this, "Missing closing 'quote")); + let str = ""; + for (let i = start + 1; i < end - 1; ++i) { + const ch = src[i]; + if (ch === "\n") { + if (PlainValue.Node.atDocumentBoundary(src, i + 1)) errors.push(new PlainValue.YAMLSemanticError(this, "Document boundary indicators are not allowed within string values")); + const { + fold, + offset, + error + } = PlainValue.Node.foldNewline(src, i, indent); + str += fold; + i = offset; + if (error) errors.push(new PlainValue.YAMLSemanticError(this, "Multi-line single-quoted string needs to be sufficiently indented")); + } else if (ch === "'") { + str += ch; + i += 1; + if (src[i] !== "'") errors.push(new PlainValue.YAMLSyntaxError(this, "Unescaped single quote? This should not happen.")); + } else if (ch === " " || ch === " ") { + const wsStart = i; + let next = src[i + 1]; + while (next === " " || next === " ") { + i += 1; + next = src[i + 1]; + } + if (next !== "\n") str += i > wsStart ? src.slice(wsStart, i + 1) : ch; + } else { + str += ch; + } + } + return errors.length > 0 ? { + errors, + str + } : str; + } + /** + * Parses a 'single quoted' value from the source + * + * @param {ParseContext} context + * @param {number} start - Index of first character + * @returns {number} - Index of the character after this scalar + */ + parse(context, start) { + this.context = context; + const { + src + } = context; + let offset = _QuoteSingle.endOfQuote(src, start + 1); + this.valueRange = new PlainValue.Range(start, offset); + offset = PlainValue.Node.endOfWhiteSpace(src, offset); + offset = this.parseComment(offset); + return offset; + } + }; + function createNewNode(type, props) { + switch (type) { + case PlainValue.Type.ALIAS: + return new Alias(type, props); + case PlainValue.Type.BLOCK_FOLDED: + case PlainValue.Type.BLOCK_LITERAL: + return new BlockValue(type, props); + case PlainValue.Type.FLOW_MAP: + case PlainValue.Type.FLOW_SEQ: + return new FlowCollection(type, props); + case PlainValue.Type.MAP_KEY: + case PlainValue.Type.MAP_VALUE: + case PlainValue.Type.SEQ_ITEM: + return new CollectionItem(type, props); + case PlainValue.Type.COMMENT: + case PlainValue.Type.PLAIN: + return new PlainValue.PlainValue(type, props); + case PlainValue.Type.QUOTE_DOUBLE: + return new QuoteDouble(type, props); + case PlainValue.Type.QUOTE_SINGLE: + return new QuoteSingle(type, props); + default: + return null; + } + } + var ParseContext = class _ParseContext { + static parseType(src, offset, inFlow) { + switch (src[offset]) { + case "*": + return PlainValue.Type.ALIAS; + case ">": + return PlainValue.Type.BLOCK_FOLDED; + case "|": + return PlainValue.Type.BLOCK_LITERAL; + case "{": + return PlainValue.Type.FLOW_MAP; + case "[": + return PlainValue.Type.FLOW_SEQ; + case "?": + return !inFlow && PlainValue.Node.atBlank(src, offset + 1, true) ? PlainValue.Type.MAP_KEY : PlainValue.Type.PLAIN; + case ":": + return !inFlow && PlainValue.Node.atBlank(src, offset + 1, true) ? PlainValue.Type.MAP_VALUE : PlainValue.Type.PLAIN; + case "-": + return !inFlow && PlainValue.Node.atBlank(src, offset + 1, true) ? PlainValue.Type.SEQ_ITEM : PlainValue.Type.PLAIN; + case '"': + return PlainValue.Type.QUOTE_DOUBLE; + case "'": + return PlainValue.Type.QUOTE_SINGLE; + default: + return PlainValue.Type.PLAIN; + } + } + constructor(orig = {}, { + atLineStart, + inCollection, + inFlow, + indent, + lineStart, + parent + } = {}) { + PlainValue._defineProperty(this, "parseNode", (overlay, start) => { + if (PlainValue.Node.atDocumentBoundary(this.src, start)) return null; + const context = new _ParseContext(this, overlay); + const { + props, + type, + valueStart + } = context.parseProps(start); + const node = createNewNode(type, props); + let offset = node.parse(context, valueStart); + node.range = new PlainValue.Range(start, offset); + if (offset <= start) { + node.error = new Error(`Node#parse consumed no characters`); + node.error.parseEnd = offset; + node.error.source = node; + node.range.end = start + 1; + } + if (context.nodeStartsCollection(node)) { + if (!node.error && !context.atLineStart && context.parent.type === PlainValue.Type.DOCUMENT) { + node.error = new PlainValue.YAMLSyntaxError(node, "Block collection must not have preceding content here (e.g. directives-end indicator)"); + } + const collection = new Collection(node); + offset = collection.parse(new _ParseContext(context), offset); + collection.range = new PlainValue.Range(start, offset); + return collection; + } + return node; + }); + this.atLineStart = atLineStart != null ? atLineStart : orig.atLineStart || false; + this.inCollection = inCollection != null ? inCollection : orig.inCollection || false; + this.inFlow = inFlow != null ? inFlow : orig.inFlow || false; + this.indent = indent != null ? indent : orig.indent; + this.lineStart = lineStart != null ? lineStart : orig.lineStart; + this.parent = parent != null ? parent : orig.parent || {}; + this.root = orig.root; + this.src = orig.src; + } + nodeStartsCollection(node) { + const { + inCollection, + inFlow, + src + } = this; + if (inCollection || inFlow) return false; + if (node instanceof CollectionItem) return true; + let offset = node.range.end; + if (src[offset] === "\n" || src[offset - 1] === "\n") return false; + offset = PlainValue.Node.endOfWhiteSpace(src, offset); + return src[offset] === ":"; + } + // Anchor and tag are before type, which determines the node implementation + // class; hence this intermediate step. + parseProps(offset) { + const { + inFlow, + parent, + src + } = this; + const props = []; + let lineHasProps = false; + offset = this.atLineStart ? PlainValue.Node.endOfIndent(src, offset) : PlainValue.Node.endOfWhiteSpace(src, offset); + let ch = src[offset]; + while (ch === PlainValue.Char.ANCHOR || ch === PlainValue.Char.COMMENT || ch === PlainValue.Char.TAG || ch === "\n") { + if (ch === "\n") { + let inEnd = offset; + let lineStart; + do { + lineStart = inEnd + 1; + inEnd = PlainValue.Node.endOfIndent(src, lineStart); + } while (src[inEnd] === "\n"); + const indentDiff = inEnd - (lineStart + this.indent); + const noIndicatorAsIndent = parent.type === PlainValue.Type.SEQ_ITEM && parent.context.atLineStart; + if (src[inEnd] !== "#" && !PlainValue.Node.nextNodeIsIndented(src[inEnd], indentDiff, !noIndicatorAsIndent)) break; + this.atLineStart = true; + this.lineStart = lineStart; + lineHasProps = false; + offset = inEnd; + } else if (ch === PlainValue.Char.COMMENT) { + const end = PlainValue.Node.endOfLine(src, offset + 1); + props.push(new PlainValue.Range(offset, end)); + offset = end; + } else { + let end = PlainValue.Node.endOfIdentifier(src, offset + 1); + if (ch === PlainValue.Char.TAG && src[end] === "," && /^[a-zA-Z0-9-]+\.[a-zA-Z0-9-]+,\d\d\d\d(-\d\d){0,2}\/\S/.test(src.slice(offset + 1, end + 13))) { + end = PlainValue.Node.endOfIdentifier(src, end + 5); + } + props.push(new PlainValue.Range(offset, end)); + lineHasProps = true; + offset = PlainValue.Node.endOfWhiteSpace(src, end); + } + ch = src[offset]; + } + if (lineHasProps && ch === ":" && PlainValue.Node.atBlank(src, offset + 1, true)) offset -= 1; + const type = _ParseContext.parseType(src, offset, inFlow); + return { + props, + type, + valueStart: offset + }; + } + /** + * Parses a node from the source + * @param {ParseContext} overlay + * @param {number} start - Index of first non-whitespace character for the node + * @returns {?Node} - null if at a document boundary + */ + }; + function parse2(src) { + const cr = []; + if (src.indexOf("\r") !== -1) { + src = src.replace(/\r\n?/g, (match, offset2) => { + if (match.length > 1) cr.push(offset2); + return "\n"; + }); + } + const documents = []; + let offset = 0; + do { + const doc = new Document(); + const context = new ParseContext({ + src + }); + offset = doc.parse(context, offset); + documents.push(doc); + } while (offset < src.length); + documents.setOrigRanges = () => { + if (cr.length === 0) return false; + for (let i = 1; i < cr.length; ++i) cr[i] -= i; + let crOffset = 0; + for (let i = 0; i < documents.length; ++i) { + crOffset = documents[i].setOrigRanges(cr, crOffset); + } + cr.splice(0, cr.length); + return true; + }; + documents.toString = () => documents.join("...\n"); + return documents; + } + exports2.parse = parse2; + } +}); + +// ../../node_modules/oas-resolver-browser/node_modules/yaml/dist/resolveSeq-d03cb037.js +var require_resolveSeq_d03cb037 = __commonJS({ + "../../node_modules/oas-resolver-browser/node_modules/yaml/dist/resolveSeq-d03cb037.js"(exports2) { + "use strict"; + var PlainValue = require_PlainValue_ec8e588e(); + function addCommentBefore(str, indent, comment) { + if (!comment) return str; + const cc = comment.replace(/[\s\S]^/gm, `$&${indent}#`); + return `#${cc} +${indent}${str}`; + } + function addComment(str, indent, comment) { + return !comment ? str : comment.indexOf("\n") === -1 ? `${str} #${comment}` : `${str} +` + comment.replace(/^/gm, `${indent || ""}#`); + } + var Node = class { + }; + function toJSON(value, arg, ctx) { + if (Array.isArray(value)) return value.map((v, i) => toJSON(v, String(i), ctx)); + if (value && typeof value.toJSON === "function") { + const anchor = ctx && ctx.anchors && ctx.anchors.get(value); + if (anchor) ctx.onCreate = (res2) => { + anchor.res = res2; + delete ctx.onCreate; + }; + const res = value.toJSON(arg, ctx); + if (anchor && ctx.onCreate) ctx.onCreate(res); + return res; + } + if ((!ctx || !ctx.keep) && typeof value === "bigint") return Number(value); + return value; + } + var Scalar = class extends Node { + constructor(value) { + super(); + this.value = value; + } + toJSON(arg, ctx) { + return ctx && ctx.keep ? this.value : toJSON(this.value, arg, ctx); + } + toString() { + return String(this.value); + } + }; + function collectionFromPath(schema2, path, value) { + let v = value; + for (let i = path.length - 1; i >= 0; --i) { + const k = path[i]; + if (Number.isInteger(k) && k >= 0) { + const a = []; + a[k] = v; + v = a; + } else { + const o = {}; + Object.defineProperty(o, k, { + value: v, + writable: true, + enumerable: true, + configurable: true + }); + v = o; + } + } + return schema2.createNode(v, false); + } + var isEmptyPath = (path) => path == null || typeof path === "object" && path[Symbol.iterator]().next().done; + var Collection = class _Collection extends Node { + constructor(schema2) { + super(); + PlainValue._defineProperty(this, "items", []); + this.schema = schema2; + } + addIn(path, value) { + if (isEmptyPath(path)) this.add(value); + else { + const [key, ...rest] = path; + const node = this.get(key, true); + if (node instanceof _Collection) node.addIn(rest, value); + else if (node === void 0 && this.schema) this.set(key, collectionFromPath(this.schema, rest, value)); + else throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`); + } + } + deleteIn([key, ...rest]) { + if (rest.length === 0) return this.delete(key); + const node = this.get(key, true); + if (node instanceof _Collection) return node.deleteIn(rest); + else throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`); + } + getIn([key, ...rest], keepScalar) { + const node = this.get(key, true); + if (rest.length === 0) return !keepScalar && node instanceof Scalar ? node.value : node; + else return node instanceof _Collection ? node.getIn(rest, keepScalar) : void 0; + } + hasAllNullValues() { + return this.items.every((node) => { + if (!node || node.type !== "PAIR") return false; + const n = node.value; + return n == null || n instanceof Scalar && n.value == null && !n.commentBefore && !n.comment && !n.tag; + }); + } + hasIn([key, ...rest]) { + if (rest.length === 0) return this.has(key); + const node = this.get(key, true); + return node instanceof _Collection ? node.hasIn(rest) : false; + } + setIn([key, ...rest], value) { + if (rest.length === 0) { + this.set(key, value); + } else { + const node = this.get(key, true); + if (node instanceof _Collection) node.setIn(rest, value); + else if (node === void 0 && this.schema) this.set(key, collectionFromPath(this.schema, rest, value)); + else throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`); + } + } + // overridden in implementations + /* istanbul ignore next */ + toJSON() { + return null; + } + toString(ctx, { + blockItem, + flowChars, + isMap, + itemIndent + }, onComment, onChompKeep) { + const { + indent, + indentStep, + stringify: stringify2 + } = ctx; + const inFlow = this.type === PlainValue.Type.FLOW_MAP || this.type === PlainValue.Type.FLOW_SEQ || ctx.inFlow; + if (inFlow) itemIndent += indentStep; + const allNullValues = isMap && this.hasAllNullValues(); + ctx = Object.assign({}, ctx, { + allNullValues, + indent: itemIndent, + inFlow, + type: null + }); + let chompKeep = false; + let hasItemWithNewLine = false; + const nodes = this.items.reduce((nodes2, item, i) => { + let comment; + if (item) { + if (!chompKeep && item.spaceBefore) nodes2.push({ + type: "comment", + str: "" + }); + if (item.commentBefore) item.commentBefore.match(/^.*$/gm).forEach((line) => { + nodes2.push({ + type: "comment", + str: `#${line}` + }); + }); + if (item.comment) comment = item.comment; + if (inFlow && (!chompKeep && item.spaceBefore || item.commentBefore || item.comment || item.key && (item.key.commentBefore || item.key.comment) || item.value && (item.value.commentBefore || item.value.comment))) hasItemWithNewLine = true; + } + chompKeep = false; + let str2 = stringify2(item, ctx, () => comment = null, () => chompKeep = true); + if (inFlow && !hasItemWithNewLine && str2.includes("\n")) hasItemWithNewLine = true; + if (inFlow && i < this.items.length - 1) str2 += ","; + str2 = addComment(str2, itemIndent, comment); + if (chompKeep && (comment || inFlow)) chompKeep = false; + nodes2.push({ + type: "item", + str: str2 + }); + return nodes2; + }, []); + let str; + if (nodes.length === 0) { + str = flowChars.start + flowChars.end; + } else if (inFlow) { + const { + start, + end + } = flowChars; + const strings = nodes.map((n) => n.str); + if (hasItemWithNewLine || strings.reduce((sum, str2) => sum + str2.length + 2, 2) > _Collection.maxFlowStringSingleLineLength) { + str = start; + for (const s of strings) { + str += s ? ` +${indentStep}${indent}${s}` : "\n"; + } + str += ` +${indent}${end}`; + } else { + str = `${start} ${strings.join(" ")} ${end}`; + } + } else { + const strings = nodes.map(blockItem); + str = strings.shift(); + for (const s of strings) str += s ? ` +${indent}${s}` : "\n"; + } + if (this.comment) { + str += "\n" + this.comment.replace(/^/gm, `${indent}#`); + if (onComment) onComment(); + } else if (chompKeep && onChompKeep) onChompKeep(); + return str; + } + }; + PlainValue._defineProperty(Collection, "maxFlowStringSingleLineLength", 60); + function asItemIndex(key) { + let idx = key instanceof Scalar ? key.value : key; + if (idx && typeof idx === "string") idx = Number(idx); + return Number.isInteger(idx) && idx >= 0 ? idx : null; + } + var YAMLSeq = class extends Collection { + add(value) { + this.items.push(value); + } + delete(key) { + const idx = asItemIndex(key); + if (typeof idx !== "number") return false; + const del = this.items.splice(idx, 1); + return del.length > 0; + } + get(key, keepScalar) { + const idx = asItemIndex(key); + if (typeof idx !== "number") return void 0; + const it = this.items[idx]; + return !keepScalar && it instanceof Scalar ? it.value : it; + } + has(key) { + const idx = asItemIndex(key); + return typeof idx === "number" && idx < this.items.length; + } + set(key, value) { + const idx = asItemIndex(key); + if (typeof idx !== "number") throw new Error(`Expected a valid index, not ${key}.`); + this.items[idx] = value; + } + toJSON(_2, ctx) { + const seq = []; + if (ctx && ctx.onCreate) ctx.onCreate(seq); + let i = 0; + for (const item of this.items) seq.push(toJSON(item, String(i++), ctx)); + return seq; + } + toString(ctx, onComment, onChompKeep) { + if (!ctx) return JSON.stringify(this); + return super.toString(ctx, { + blockItem: (n) => n.type === "comment" ? n.str : `- ${n.str}`, + flowChars: { + start: "[", + end: "]" + }, + isMap: false, + itemIndent: (ctx.indent || "") + " " + }, onComment, onChompKeep); + } + }; + var stringifyKey = (key, jsKey, ctx) => { + if (jsKey === null) return ""; + if (typeof jsKey !== "object") return String(jsKey); + if (key instanceof Node && ctx && ctx.doc) return key.toString({ + anchors: /* @__PURE__ */ Object.create(null), + doc: ctx.doc, + indent: "", + indentStep: ctx.indentStep, + inFlow: true, + inStringifyKey: true, + stringify: ctx.stringify + }); + return JSON.stringify(jsKey); + }; + var Pair = class _Pair extends Node { + constructor(key, value = null) { + super(); + this.key = key; + this.value = value; + this.type = _Pair.Type.PAIR; + } + get commentBefore() { + return this.key instanceof Node ? this.key.commentBefore : void 0; + } + set commentBefore(cb) { + if (this.key == null) this.key = new Scalar(null); + if (this.key instanceof Node) this.key.commentBefore = cb; + else { + const msg = "Pair.commentBefore is an alias for Pair.key.commentBefore. To set it, the key must be a Node."; + throw new Error(msg); + } + } + addToJSMap(ctx, map) { + const key = toJSON(this.key, "", ctx); + if (map instanceof Map) { + const value = toJSON(this.value, key, ctx); + map.set(key, value); + } else if (map instanceof Set) { + map.add(key); + } else { + const stringKey = stringifyKey(this.key, key, ctx); + const value = toJSON(this.value, stringKey, ctx); + if (stringKey in map) Object.defineProperty(map, stringKey, { + value, + writable: true, + enumerable: true, + configurable: true + }); + else map[stringKey] = value; + } + return map; + } + toJSON(_2, ctx) { + const pair = ctx && ctx.mapAsMap ? /* @__PURE__ */ new Map() : {}; + return this.addToJSMap(ctx, pair); + } + toString(ctx, onComment, onChompKeep) { + if (!ctx || !ctx.doc) return JSON.stringify(this); + const { + indent: indentSize, + indentSeq, + simpleKeys + } = ctx.doc.options; + let { + key, + value + } = this; + let keyComment = key instanceof Node && key.comment; + if (simpleKeys) { + if (keyComment) { + throw new Error("With simple keys, key nodes cannot have comments"); + } + if (key instanceof Collection) { + const msg = "With simple keys, collection cannot be used as a key value"; + throw new Error(msg); + } + } + let explicitKey = !simpleKeys && (!key || keyComment || (key instanceof Node ? key instanceof Collection || key.type === PlainValue.Type.BLOCK_FOLDED || key.type === PlainValue.Type.BLOCK_LITERAL : typeof key === "object")); + const { + doc, + indent, + indentStep, + stringify: stringify2 + } = ctx; + ctx = Object.assign({}, ctx, { + implicitKey: !explicitKey, + indent: indent + indentStep + }); + let chompKeep = false; + let str = stringify2(key, ctx, () => keyComment = null, () => chompKeep = true); + str = addComment(str, ctx.indent, keyComment); + if (!explicitKey && str.length > 1024) { + if (simpleKeys) throw new Error("With simple keys, single line scalar must not span more than 1024 characters"); + explicitKey = true; + } + if (ctx.allNullValues && !simpleKeys) { + if (this.comment) { + str = addComment(str, ctx.indent, this.comment); + if (onComment) onComment(); + } else if (chompKeep && !keyComment && onChompKeep) onChompKeep(); + return ctx.inFlow && !explicitKey ? str : `? ${str}`; + } + str = explicitKey ? `? ${str} +${indent}:` : `${str}:`; + if (this.comment) { + str = addComment(str, ctx.indent, this.comment); + if (onComment) onComment(); + } + let vcb = ""; + let valueComment = null; + if (value instanceof Node) { + if (value.spaceBefore) vcb = "\n"; + if (value.commentBefore) { + const cs = value.commentBefore.replace(/^/gm, `${ctx.indent}#`); + vcb += ` +${cs}`; + } + valueComment = value.comment; + } else if (value && typeof value === "object") { + value = doc.schema.createNode(value, true); + } + ctx.implicitKey = false; + if (!explicitKey && !this.comment && value instanceof Scalar) ctx.indentAtStart = str.length + 1; + chompKeep = false; + if (!indentSeq && indentSize >= 2 && !ctx.inFlow && !explicitKey && value instanceof YAMLSeq && value.type !== PlainValue.Type.FLOW_SEQ && !value.tag && !doc.anchors.getName(value)) { + ctx.indent = ctx.indent.substr(2); + } + const valueStr = stringify2(value, ctx, () => valueComment = null, () => chompKeep = true); + let ws = " "; + if (vcb || this.comment) { + ws = `${vcb} +${ctx.indent}`; + } else if (!explicitKey && value instanceof Collection) { + const flow = valueStr[0] === "[" || valueStr[0] === "{"; + if (!flow || valueStr.includes("\n")) ws = ` +${ctx.indent}`; + } else if (valueStr[0] === "\n") ws = ""; + if (chompKeep && !valueComment && onChompKeep) onChompKeep(); + return addComment(str + ws + valueStr, ctx.indent, valueComment); + } + }; + PlainValue._defineProperty(Pair, "Type", { + PAIR: "PAIR", + MERGE_PAIR: "MERGE_PAIR" + }); + var getAliasCount = (node, anchors) => { + if (node instanceof Alias) { + const anchor = anchors.get(node.source); + return anchor.count * anchor.aliasCount; + } else if (node instanceof Collection) { + let count = 0; + for (const item of node.items) { + const c = getAliasCount(item, anchors); + if (c > count) count = c; + } + return count; + } else if (node instanceof Pair) { + const kc = getAliasCount(node.key, anchors); + const vc = getAliasCount(node.value, anchors); + return Math.max(kc, vc); + } + return 1; + }; + var Alias = class _Alias extends Node { + static stringify({ + range, + source + }, { + anchors, + doc, + implicitKey, + inStringifyKey + }) { + let anchor = Object.keys(anchors).find((a) => anchors[a] === source); + if (!anchor && inStringifyKey) anchor = doc.anchors.getName(source) || doc.anchors.newName(); + if (anchor) return `*${anchor}${implicitKey ? " " : ""}`; + const msg = doc.anchors.getName(source) ? "Alias node must be after source node" : "Source node not found for alias node"; + throw new Error(`${msg} [${range}]`); + } + constructor(source) { + super(); + this.source = source; + this.type = PlainValue.Type.ALIAS; + } + set tag(t) { + throw new Error("Alias nodes cannot have tags"); + } + toJSON(arg, ctx) { + if (!ctx) return toJSON(this.source, arg, ctx); + const { + anchors, + maxAliasCount + } = ctx; + const anchor = anchors.get(this.source); + if (!anchor || anchor.res === void 0) { + const msg = "This should not happen: Alias anchor was not resolved?"; + if (this.cstNode) throw new PlainValue.YAMLReferenceError(this.cstNode, msg); + else throw new ReferenceError(msg); + } + if (maxAliasCount >= 0) { + anchor.count += 1; + if (anchor.aliasCount === 0) anchor.aliasCount = getAliasCount(this.source, anchors); + if (anchor.count * anchor.aliasCount > maxAliasCount) { + const msg = "Excessive alias count indicates a resource exhaustion attack"; + if (this.cstNode) throw new PlainValue.YAMLReferenceError(this.cstNode, msg); + else throw new ReferenceError(msg); + } + } + return anchor.res; + } + // Only called when stringifying an alias mapping key while constructing + // Object output. + toString(ctx) { + return _Alias.stringify(this, ctx); + } + }; + PlainValue._defineProperty(Alias, "default", true); + function findPair(items, key) { + const k = key instanceof Scalar ? key.value : key; + for (const it of items) { + if (it instanceof Pair) { + if (it.key === key || it.key === k) return it; + if (it.key && it.key.value === k) return it; + } + } + return void 0; + } + var YAMLMap = class extends Collection { + add(pair, overwrite) { + if (!pair) pair = new Pair(pair); + else if (!(pair instanceof Pair)) pair = new Pair(pair.key || pair, pair.value); + const prev = findPair(this.items, pair.key); + const sortEntries = this.schema && this.schema.sortMapEntries; + if (prev) { + if (overwrite) prev.value = pair.value; + else throw new Error(`Key ${pair.key} already set`); + } else if (sortEntries) { + const i = this.items.findIndex((item) => sortEntries(pair, item) < 0); + if (i === -1) this.items.push(pair); + else this.items.splice(i, 0, pair); + } else { + this.items.push(pair); + } + } + delete(key) { + const it = findPair(this.items, key); + if (!it) return false; + const del = this.items.splice(this.items.indexOf(it), 1); + return del.length > 0; + } + get(key, keepScalar) { + const it = findPair(this.items, key); + const node = it && it.value; + return !keepScalar && node instanceof Scalar ? node.value : node; + } + has(key) { + return !!findPair(this.items, key); + } + set(key, value) { + this.add(new Pair(key, value), true); + } + /** + * @param {*} arg ignored + * @param {*} ctx Conversion context, originally set in Document#toJSON() + * @param {Class} Type If set, forces the returned collection type + * @returns {*} Instance of Type, Map, or Object + */ + toJSON(_2, ctx, Type) { + const map = Type ? new Type() : ctx && ctx.mapAsMap ? /* @__PURE__ */ new Map() : {}; + if (ctx && ctx.onCreate) ctx.onCreate(map); + for (const item of this.items) item.addToJSMap(ctx, map); + return map; + } + toString(ctx, onComment, onChompKeep) { + if (!ctx) return JSON.stringify(this); + for (const item of this.items) { + if (!(item instanceof Pair)) throw new Error(`Map items must all be pairs; found ${JSON.stringify(item)} instead`); + } + return super.toString(ctx, { + blockItem: (n) => n.str, + flowChars: { + start: "{", + end: "}" + }, + isMap: true, + itemIndent: ctx.indent || "" + }, onComment, onChompKeep); + } + }; + var MERGE_KEY = "<<"; + var Merge = class extends Pair { + constructor(pair) { + if (pair instanceof Pair) { + let seq = pair.value; + if (!(seq instanceof YAMLSeq)) { + seq = new YAMLSeq(); + seq.items.push(pair.value); + seq.range = pair.value.range; + } + super(pair.key, seq); + this.range = pair.range; + } else { + super(new Scalar(MERGE_KEY), new YAMLSeq()); + } + this.type = Pair.Type.MERGE_PAIR; + } + // If the value associated with a merge key is a single mapping node, each of + // its key/value pairs is inserted into the current mapping, unless the key + // already exists in it. If the value associated with the merge key is a + // sequence, then this sequence is expected to contain mapping nodes and each + // of these nodes is merged in turn according to its order in the sequence. + // Keys in mapping nodes earlier in the sequence override keys specified in + // later mapping nodes. -- http://yaml.org/type/merge.html + addToJSMap(ctx, map) { + for (const { + source + } of this.value.items) { + if (!(source instanceof YAMLMap)) throw new Error("Merge sources must be maps"); + const srcMap = source.toJSON(null, ctx, Map); + for (const [key, value] of srcMap) { + if (map instanceof Map) { + if (!map.has(key)) map.set(key, value); + } else if (map instanceof Set) { + map.add(key); + } else if (!Object.prototype.hasOwnProperty.call(map, key)) { + Object.defineProperty(map, key, { + value, + writable: true, + enumerable: true, + configurable: true + }); + } + } + } + return map; + } + toString(ctx, onComment) { + const seq = this.value; + if (seq.items.length > 1) return super.toString(ctx, onComment); + this.value = seq.items[0]; + const str = super.toString(ctx, onComment); + this.value = seq; + return str; + } + }; + var binaryOptions = { + defaultType: PlainValue.Type.BLOCK_LITERAL, + lineWidth: 76 + }; + var boolOptions = { + trueStr: "true", + falseStr: "false" + }; + var intOptions = { + asBigInt: false + }; + var nullOptions = { + nullStr: "null" + }; + var strOptions = { + defaultType: PlainValue.Type.PLAIN, + doubleQuoted: { + jsonEncoding: false, + minMultiLineLength: 40 + }, + fold: { + lineWidth: 80, + minContentWidth: 20 + } + }; + function resolveScalar(str, tags, scalarFallback) { + for (const { + format, + test, + resolve + } of tags) { + if (test) { + const match = str.match(test); + if (match) { + let res = resolve.apply(null, match); + if (!(res instanceof Scalar)) res = new Scalar(res); + if (format) res.format = format; + return res; + } + } + } + if (scalarFallback) str = scalarFallback(str); + return new Scalar(str); + } + var FOLD_FLOW = "flow"; + var FOLD_BLOCK = "block"; + var FOLD_QUOTED = "quoted"; + var consumeMoreIndentedLines = (text, i) => { + let ch = text[i + 1]; + while (ch === " " || ch === " ") { + do { + ch = text[i += 1]; + } while (ch && ch !== "\n"); + ch = text[i + 1]; + } + return i; + }; + function foldFlowLines(text, indent, mode, { + indentAtStart, + lineWidth = 80, + minContentWidth = 20, + onFold, + onOverflow + }) { + if (!lineWidth || lineWidth < 0) return text; + const endStep = Math.max(1 + minContentWidth, 1 + lineWidth - indent.length); + if (text.length <= endStep) return text; + const folds = []; + const escapedFolds = {}; + let end = lineWidth - indent.length; + if (typeof indentAtStart === "number") { + if (indentAtStart > lineWidth - Math.max(2, minContentWidth)) folds.push(0); + else end = lineWidth - indentAtStart; + } + let split = void 0; + let prev = void 0; + let overflow = false; + let i = -1; + let escStart = -1; + let escEnd = -1; + if (mode === FOLD_BLOCK) { + i = consumeMoreIndentedLines(text, i); + if (i !== -1) end = i + endStep; + } + for (let ch; ch = text[i += 1]; ) { + if (mode === FOLD_QUOTED && ch === "\\") { + escStart = i; + switch (text[i + 1]) { + case "x": + i += 3; + break; + case "u": + i += 5; + break; + case "U": + i += 9; + break; + default: + i += 1; + } + escEnd = i; + } + if (ch === "\n") { + if (mode === FOLD_BLOCK) i = consumeMoreIndentedLines(text, i); + end = i + endStep; + split = void 0; + } else { + if (ch === " " && prev && prev !== " " && prev !== "\n" && prev !== " ") { + const next = text[i + 1]; + if (next && next !== " " && next !== "\n" && next !== " ") split = i; + } + if (i >= end) { + if (split) { + folds.push(split); + end = split + endStep; + split = void 0; + } else if (mode === FOLD_QUOTED) { + while (prev === " " || prev === " ") { + prev = ch; + ch = text[i += 1]; + overflow = true; + } + const j = i > escEnd + 1 ? i - 2 : escStart - 1; + if (escapedFolds[j]) return text; + folds.push(j); + escapedFolds[j] = true; + end = j + endStep; + split = void 0; + } else { + overflow = true; + } + } + } + prev = ch; + } + if (overflow && onOverflow) onOverflow(); + if (folds.length === 0) return text; + if (onFold) onFold(); + let res = text.slice(0, folds[0]); + for (let i2 = 0; i2 < folds.length; ++i2) { + const fold = folds[i2]; + const end2 = folds[i2 + 1] || text.length; + if (fold === 0) res = ` +${indent}${text.slice(0, end2)}`; + else { + if (mode === FOLD_QUOTED && escapedFolds[fold]) res += `${text[fold]}\\`; + res += ` +${indent}${text.slice(fold + 1, end2)}`; + } + } + return res; + } + var getFoldOptions = ({ + indentAtStart + }) => indentAtStart ? Object.assign({ + indentAtStart + }, strOptions.fold) : strOptions.fold; + var containsDocumentMarker = (str) => /^(%|---|\.\.\.)/m.test(str); + function lineLengthOverLimit(str, lineWidth, indentLength) { + if (!lineWidth || lineWidth < 0) return false; + const limit = lineWidth - indentLength; + const strLen = str.length; + if (strLen <= limit) return false; + for (let i = 0, start = 0; i < strLen; ++i) { + if (str[i] === "\n") { + if (i - start > limit) return true; + start = i + 1; + if (strLen - start <= limit) return false; + } + } + return true; + } + function doubleQuotedString(value, ctx) { + const { + implicitKey + } = ctx; + const { + jsonEncoding, + minMultiLineLength + } = strOptions.doubleQuoted; + const json = JSON.stringify(value); + if (jsonEncoding) return json; + const indent = ctx.indent || (containsDocumentMarker(value) ? " " : ""); + let str = ""; + let start = 0; + for (let i = 0, ch = json[i]; ch; ch = json[++i]) { + if (ch === " " && json[i + 1] === "\\" && json[i + 2] === "n") { + str += json.slice(start, i) + "\\ "; + i += 1; + start = i; + ch = "\\"; + } + if (ch === "\\") switch (json[i + 1]) { + case "u": + { + str += json.slice(start, i); + const code = json.substr(i + 2, 4); + switch (code) { + case "0000": + str += "\\0"; + break; + case "0007": + str += "\\a"; + break; + case "000b": + str += "\\v"; + break; + case "001b": + str += "\\e"; + break; + case "0085": + str += "\\N"; + break; + case "00a0": + str += "\\_"; + break; + case "2028": + str += "\\L"; + break; + case "2029": + str += "\\P"; + break; + default: + if (code.substr(0, 2) === "00") str += "\\x" + code.substr(2); + else str += json.substr(i, 6); + } + i += 5; + start = i + 1; + } + break; + case "n": + if (implicitKey || json[i + 2] === '"' || json.length < minMultiLineLength) { + i += 1; + } else { + str += json.slice(start, i) + "\n\n"; + while (json[i + 2] === "\\" && json[i + 3] === "n" && json[i + 4] !== '"') { + str += "\n"; + i += 2; + } + str += indent; + if (json[i + 2] === " ") str += "\\"; + i += 1; + start = i + 1; + } + break; + default: + i += 1; + } + } + str = start ? str + json.slice(start) : json; + return implicitKey ? str : foldFlowLines(str, indent, FOLD_QUOTED, getFoldOptions(ctx)); + } + function singleQuotedString(value, ctx) { + if (ctx.implicitKey) { + if (/\n/.test(value)) return doubleQuotedString(value, ctx); + } else { + if (/[ \t]\n|\n[ \t]/.test(value)) return doubleQuotedString(value, ctx); + } + const indent = ctx.indent || (containsDocumentMarker(value) ? " " : ""); + const res = "'" + value.replace(/'/g, "''").replace(/\n+/g, `$& +${indent}`) + "'"; + return ctx.implicitKey ? res : foldFlowLines(res, indent, FOLD_FLOW, getFoldOptions(ctx)); + } + function blockString({ + comment, + type, + value + }, ctx, onComment, onChompKeep) { + if (/\n[\t ]+$/.test(value) || /^\s*$/.test(value)) { + return doubleQuotedString(value, ctx); + } + const indent = ctx.indent || (ctx.forceBlockIndent || containsDocumentMarker(value) ? " " : ""); + const indentSize = indent ? "2" : "1"; + const literal = type === PlainValue.Type.BLOCK_FOLDED ? false : type === PlainValue.Type.BLOCK_LITERAL ? true : !lineLengthOverLimit(value, strOptions.fold.lineWidth, indent.length); + let header = literal ? "|" : ">"; + if (!value) return header + "\n"; + let wsStart = ""; + let wsEnd = ""; + value = value.replace(/[\n\t ]*$/, (ws) => { + const n = ws.indexOf("\n"); + if (n === -1) { + header += "-"; + } else if (value === ws || n !== ws.length - 1) { + header += "+"; + if (onChompKeep) onChompKeep(); + } + wsEnd = ws.replace(/\n$/, ""); + return ""; + }).replace(/^[\n ]*/, (ws) => { + if (ws.indexOf(" ") !== -1) header += indentSize; + const m = ws.match(/ +$/); + if (m) { + wsStart = ws.slice(0, -m[0].length); + return m[0]; + } else { + wsStart = ws; + return ""; + } + }); + if (wsEnd) wsEnd = wsEnd.replace(/\n+(?!\n|$)/g, `$&${indent}`); + if (wsStart) wsStart = wsStart.replace(/\n+/g, `$&${indent}`); + if (comment) { + header += " #" + comment.replace(/ ?[\r\n]+/g, " "); + if (onComment) onComment(); + } + if (!value) return `${header}${indentSize} +${indent}${wsEnd}`; + if (literal) { + value = value.replace(/\n+/g, `$&${indent}`); + return `${header} +${indent}${wsStart}${value}${wsEnd}`; + } + value = value.replace(/\n+/g, "\n$&").replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g, "$1$2").replace(/\n+/g, `$&${indent}`); + const body = foldFlowLines(`${wsStart}${value}${wsEnd}`, indent, FOLD_BLOCK, strOptions.fold); + return `${header} +${indent}${body}`; + } + function plainString(item, ctx, onComment, onChompKeep) { + const { + comment, + type, + value + } = item; + const { + actualString, + implicitKey, + indent, + inFlow + } = ctx; + if (implicitKey && /[\n[\]{},]/.test(value) || inFlow && /[[\]{},]/.test(value)) { + return doubleQuotedString(value, ctx); + } + if (!value || /^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(value)) { + return implicitKey || inFlow || value.indexOf("\n") === -1 ? value.indexOf('"') !== -1 && value.indexOf("'") === -1 ? singleQuotedString(value, ctx) : doubleQuotedString(value, ctx) : blockString(item, ctx, onComment, onChompKeep); + } + if (!implicitKey && !inFlow && type !== PlainValue.Type.PLAIN && value.indexOf("\n") !== -1) { + return blockString(item, ctx, onComment, onChompKeep); + } + if (indent === "" && containsDocumentMarker(value)) { + ctx.forceBlockIndent = true; + return blockString(item, ctx, onComment, onChompKeep); + } + const str = value.replace(/\n+/g, `$& +${indent}`); + if (actualString) { + const { + tags + } = ctx.doc.schema; + const resolved = resolveScalar(str, tags, tags.scalarFallback).value; + if (typeof resolved !== "string") return doubleQuotedString(value, ctx); + } + const body = implicitKey ? str : foldFlowLines(str, indent, FOLD_FLOW, getFoldOptions(ctx)); + if (comment && !inFlow && (body.indexOf("\n") !== -1 || comment.indexOf("\n") !== -1)) { + if (onComment) onComment(); + return addCommentBefore(body, indent, comment); + } + return body; + } + function stringifyString(item, ctx, onComment, onChompKeep) { + const { + defaultType + } = strOptions; + const { + implicitKey, + inFlow + } = ctx; + let { + type, + value + } = item; + if (typeof value !== "string") { + value = String(value); + item = Object.assign({}, item, { + value + }); + } + const _stringify = (_type) => { + switch (_type) { + case PlainValue.Type.BLOCK_FOLDED: + case PlainValue.Type.BLOCK_LITERAL: + return blockString(item, ctx, onComment, onChompKeep); + case PlainValue.Type.QUOTE_DOUBLE: + return doubleQuotedString(value, ctx); + case PlainValue.Type.QUOTE_SINGLE: + return singleQuotedString(value, ctx); + case PlainValue.Type.PLAIN: + return plainString(item, ctx, onComment, onChompKeep); + default: + return null; + } + }; + if (type !== PlainValue.Type.QUOTE_DOUBLE && /[\x00-\x08\x0b-\x1f\x7f-\x9f]/.test(value)) { + type = PlainValue.Type.QUOTE_DOUBLE; + } else if ((implicitKey || inFlow) && (type === PlainValue.Type.BLOCK_FOLDED || type === PlainValue.Type.BLOCK_LITERAL)) { + type = PlainValue.Type.QUOTE_DOUBLE; + } + let res = _stringify(type); + if (res === null) { + res = _stringify(defaultType); + if (res === null) throw new Error(`Unsupported default string type ${defaultType}`); + } + return res; + } + function stringifyNumber({ + format, + minFractionDigits, + tag, + value + }) { + if (typeof value === "bigint") return String(value); + if (!isFinite(value)) return isNaN(value) ? ".nan" : value < 0 ? "-.inf" : ".inf"; + let n = JSON.stringify(value); + if (!format && minFractionDigits && (!tag || tag === "tag:yaml.org,2002:float") && /^\d/.test(n)) { + let i = n.indexOf("."); + if (i < 0) { + i = n.length; + n += "."; + } + let d = minFractionDigits - (n.length - i - 1); + while (d-- > 0) n += "0"; + } + return n; + } + function checkFlowCollectionEnd(errors, cst) { + let char, name; + switch (cst.type) { + case PlainValue.Type.FLOW_MAP: + char = "}"; + name = "flow map"; + break; + case PlainValue.Type.FLOW_SEQ: + char = "]"; + name = "flow sequence"; + break; + default: + errors.push(new PlainValue.YAMLSemanticError(cst, "Not a flow collection!?")); + return; + } + let lastItem; + for (let i = cst.items.length - 1; i >= 0; --i) { + const item = cst.items[i]; + if (!item || item.type !== PlainValue.Type.COMMENT) { + lastItem = item; + break; + } + } + if (lastItem && lastItem.char !== char) { + const msg = `Expected ${name} to end with ${char}`; + let err; + if (typeof lastItem.offset === "number") { + err = new PlainValue.YAMLSemanticError(cst, msg); + err.offset = lastItem.offset + 1; + } else { + err = new PlainValue.YAMLSemanticError(lastItem, msg); + if (lastItem.range && lastItem.range.end) err.offset = lastItem.range.end - lastItem.range.start; + } + errors.push(err); + } + } + function checkFlowCommentSpace(errors, comment) { + const prev = comment.context.src[comment.range.start - 1]; + if (prev !== "\n" && prev !== " " && prev !== " ") { + const msg = "Comments must be separated from other tokens by white space characters"; + errors.push(new PlainValue.YAMLSemanticError(comment, msg)); + } + } + function getLongKeyError(source, key) { + const sk = String(key); + const k = sk.substr(0, 8) + "..." + sk.substr(-8); + return new PlainValue.YAMLSemanticError(source, `The "${k}" key is too long`); + } + function resolveComments(collection, comments) { + for (const { + afterKey, + before, + comment + } of comments) { + let item = collection.items[before]; + if (!item) { + if (comment !== void 0) { + if (collection.comment) collection.comment += "\n" + comment; + else collection.comment = comment; + } + } else { + if (afterKey && item.value) item = item.value; + if (comment === void 0) { + if (afterKey || !item.commentBefore) item.spaceBefore = true; + } else { + if (item.commentBefore) item.commentBefore += "\n" + comment; + else item.commentBefore = comment; + } + } + } + } + function resolveString(doc, node) { + const res = node.strValue; + if (!res) return ""; + if (typeof res === "string") return res; + res.errors.forEach((error) => { + if (!error.source) error.source = node; + doc.errors.push(error); + }); + return res.str; + } + function resolveTagHandle(doc, node) { + const { + handle, + suffix + } = node.tag; + let prefix = doc.tagPrefixes.find((p) => p.handle === handle); + if (!prefix) { + const dtp = doc.getDefaults().tagPrefixes; + if (dtp) prefix = dtp.find((p) => p.handle === handle); + if (!prefix) throw new PlainValue.YAMLSemanticError(node, `The ${handle} tag handle is non-default and was not declared.`); + } + if (!suffix) throw new PlainValue.YAMLSemanticError(node, `The ${handle} tag has no suffix.`); + if (handle === "!" && (doc.version || doc.options.version) === "1.0") { + if (suffix[0] === "^") { + doc.warnings.push(new PlainValue.YAMLWarning(node, "YAML 1.0 ^ tag expansion is not supported")); + return suffix; + } + if (/[:/]/.test(suffix)) { + const vocab = suffix.match(/^([a-z0-9-]+)\/(.*)/i); + return vocab ? `tag:${vocab[1]}.yaml.org,2002:${vocab[2]}` : `tag:${suffix}`; + } + } + return prefix.prefix + decodeURIComponent(suffix); + } + function resolveTagName(doc, node) { + const { + tag, + type + } = node; + let nonSpecific = false; + if (tag) { + const { + handle, + suffix, + verbatim + } = tag; + if (verbatim) { + if (verbatim !== "!" && verbatim !== "!!") return verbatim; + const msg = `Verbatim tags aren't resolved, so ${verbatim} is invalid.`; + doc.errors.push(new PlainValue.YAMLSemanticError(node, msg)); + } else if (handle === "!" && !suffix) { + nonSpecific = true; + } else { + try { + return resolveTagHandle(doc, node); + } catch (error) { + doc.errors.push(error); + } + } + } + switch (type) { + case PlainValue.Type.BLOCK_FOLDED: + case PlainValue.Type.BLOCK_LITERAL: + case PlainValue.Type.QUOTE_DOUBLE: + case PlainValue.Type.QUOTE_SINGLE: + return PlainValue.defaultTags.STR; + case PlainValue.Type.FLOW_MAP: + case PlainValue.Type.MAP: + return PlainValue.defaultTags.MAP; + case PlainValue.Type.FLOW_SEQ: + case PlainValue.Type.SEQ: + return PlainValue.defaultTags.SEQ; + case PlainValue.Type.PLAIN: + return nonSpecific ? PlainValue.defaultTags.STR : null; + default: + return null; + } + } + function resolveByTagName(doc, node, tagName) { + const { + tags + } = doc.schema; + const matchWithTest = []; + for (const tag of tags) { + if (tag.tag === tagName) { + if (tag.test) matchWithTest.push(tag); + else { + const res = tag.resolve(doc, node); + return res instanceof Collection ? res : new Scalar(res); + } + } + } + const str = resolveString(doc, node); + if (typeof str === "string" && matchWithTest.length > 0) return resolveScalar(str, matchWithTest, tags.scalarFallback); + return null; + } + function getFallbackTagName({ + type + }) { + switch (type) { + case PlainValue.Type.FLOW_MAP: + case PlainValue.Type.MAP: + return PlainValue.defaultTags.MAP; + case PlainValue.Type.FLOW_SEQ: + case PlainValue.Type.SEQ: + return PlainValue.defaultTags.SEQ; + default: + return PlainValue.defaultTags.STR; + } + } + function resolveTag(doc, node, tagName) { + try { + const res = resolveByTagName(doc, node, tagName); + if (res) { + if (tagName && node.tag) res.tag = tagName; + return res; + } + } catch (error) { + if (!error.source) error.source = node; + doc.errors.push(error); + return null; + } + try { + const fallback = getFallbackTagName(node); + if (!fallback) throw new Error(`The tag ${tagName} is unavailable`); + const msg = `The tag ${tagName} is unavailable, falling back to ${fallback}`; + doc.warnings.push(new PlainValue.YAMLWarning(node, msg)); + const res = resolveByTagName(doc, node, fallback); + res.tag = tagName; + return res; + } catch (error) { + const refError = new PlainValue.YAMLReferenceError(node, error.message); + refError.stack = error.stack; + doc.errors.push(refError); + return null; + } + } + var isCollectionItem = (node) => { + if (!node) return false; + const { + type + } = node; + return type === PlainValue.Type.MAP_KEY || type === PlainValue.Type.MAP_VALUE || type === PlainValue.Type.SEQ_ITEM; + }; + function resolveNodeProps(errors, node) { + const comments = { + before: [], + after: [] + }; + let hasAnchor = false; + let hasTag = false; + const props = isCollectionItem(node.context.parent) ? node.context.parent.props.concat(node.props) : node.props; + for (const { + start, + end + } of props) { + switch (node.context.src[start]) { + case PlainValue.Char.COMMENT: { + if (!node.commentHasRequiredWhitespace(start)) { + const msg = "Comments must be separated from other tokens by white space characters"; + errors.push(new PlainValue.YAMLSemanticError(node, msg)); + } + const { + header, + valueRange + } = node; + const cc = valueRange && (start > valueRange.start || header && start > header.start) ? comments.after : comments.before; + cc.push(node.context.src.slice(start + 1, end)); + break; + } + case PlainValue.Char.ANCHOR: + if (hasAnchor) { + const msg = "A node can have at most one anchor"; + errors.push(new PlainValue.YAMLSemanticError(node, msg)); + } + hasAnchor = true; + break; + case PlainValue.Char.TAG: + if (hasTag) { + const msg = "A node can have at most one tag"; + errors.push(new PlainValue.YAMLSemanticError(node, msg)); + } + hasTag = true; + break; + } + } + return { + comments, + hasAnchor, + hasTag + }; + } + function resolveNodeValue(doc, node) { + const { + anchors, + errors, + schema: schema2 + } = doc; + if (node.type === PlainValue.Type.ALIAS) { + const name = node.rawValue; + const src = anchors.getNode(name); + if (!src) { + const msg = `Aliased anchor not found: ${name}`; + errors.push(new PlainValue.YAMLReferenceError(node, msg)); + return null; + } + const res = new Alias(src); + anchors._cstAliases.push(res); + return res; + } + const tagName = resolveTagName(doc, node); + if (tagName) return resolveTag(doc, node, tagName); + if (node.type !== PlainValue.Type.PLAIN) { + const msg = `Failed to resolve ${node.type} node here`; + errors.push(new PlainValue.YAMLSyntaxError(node, msg)); + return null; + } + try { + const str = resolveString(doc, node); + return resolveScalar(str, schema2.tags, schema2.tags.scalarFallback); + } catch (error) { + if (!error.source) error.source = node; + errors.push(error); + return null; + } + } + function resolveNode(doc, node) { + if (!node) return null; + if (node.error) doc.errors.push(node.error); + const { + comments, + hasAnchor, + hasTag + } = resolveNodeProps(doc.errors, node); + if (hasAnchor) { + const { + anchors + } = doc; + const name = node.anchor; + const prev = anchors.getNode(name); + if (prev) anchors.map[anchors.newName(name)] = prev; + anchors.map[name] = node; + } + if (node.type === PlainValue.Type.ALIAS && (hasAnchor || hasTag)) { + const msg = "An alias node must not specify any properties"; + doc.errors.push(new PlainValue.YAMLSemanticError(node, msg)); + } + const res = resolveNodeValue(doc, node); + if (res) { + res.range = [node.range.start, node.range.end]; + if (doc.options.keepCstNodes) res.cstNode = node; + if (doc.options.keepNodeTypes) res.type = node.type; + const cb = comments.before.join("\n"); + if (cb) { + res.commentBefore = res.commentBefore ? `${res.commentBefore} +${cb}` : cb; + } + const ca = comments.after.join("\n"); + if (ca) res.comment = res.comment ? `${res.comment} +${ca}` : ca; + } + return node.resolved = res; + } + function resolveMap(doc, cst) { + if (cst.type !== PlainValue.Type.MAP && cst.type !== PlainValue.Type.FLOW_MAP) { + const msg = `A ${cst.type} node cannot be resolved as a mapping`; + doc.errors.push(new PlainValue.YAMLSyntaxError(cst, msg)); + return null; + } + const { + comments, + items + } = cst.type === PlainValue.Type.FLOW_MAP ? resolveFlowMapItems(doc, cst) : resolveBlockMapItems(doc, cst); + const map = new YAMLMap(); + map.items = items; + resolveComments(map, comments); + let hasCollectionKey = false; + for (let i = 0; i < items.length; ++i) { + const { + key: iKey + } = items[i]; + if (iKey instanceof Collection) hasCollectionKey = true; + if (doc.schema.merge && iKey && iKey.value === MERGE_KEY) { + items[i] = new Merge(items[i]); + const sources = items[i].value.items; + let error = null; + sources.some((node) => { + if (node instanceof Alias) { + const { + type + } = node.source; + if (type === PlainValue.Type.MAP || type === PlainValue.Type.FLOW_MAP) return false; + return error = "Merge nodes aliases can only point to maps"; + } + return error = "Merge nodes can only have Alias nodes as values"; + }); + if (error) doc.errors.push(new PlainValue.YAMLSemanticError(cst, error)); + } else { + for (let j = i + 1; j < items.length; ++j) { + const { + key: jKey + } = items[j]; + if (iKey === jKey || iKey && jKey && Object.prototype.hasOwnProperty.call(iKey, "value") && iKey.value === jKey.value) { + const msg = `Map keys must be unique; "${iKey}" is repeated`; + doc.errors.push(new PlainValue.YAMLSemanticError(cst, msg)); + break; + } + } + } + } + if (hasCollectionKey && !doc.options.mapAsMap) { + const warn = "Keys with collection values will be stringified as YAML due to JS Object restrictions. Use mapAsMap: true to avoid this."; + doc.warnings.push(new PlainValue.YAMLWarning(cst, warn)); + } + cst.resolved = map; + return map; + } + var valueHasPairComment = ({ + context: { + lineStart, + node, + src + }, + props + }) => { + if (props.length === 0) return false; + const { + start + } = props[0]; + if (node && start > node.valueRange.start) return false; + if (src[start] !== PlainValue.Char.COMMENT) return false; + for (let i = lineStart; i < start; ++i) if (src[i] === "\n") return false; + return true; + }; + function resolvePairComment(item, pair) { + if (!valueHasPairComment(item)) return; + const comment = item.getPropValue(0, PlainValue.Char.COMMENT, true); + let found = false; + const cb = pair.value.commentBefore; + if (cb && cb.startsWith(comment)) { + pair.value.commentBefore = cb.substr(comment.length + 1); + found = true; + } else { + const cc = pair.value.comment; + if (!item.node && cc && cc.startsWith(comment)) { + pair.value.comment = cc.substr(comment.length + 1); + found = true; + } + } + if (found) pair.comment = comment; + } + function resolveBlockMapItems(doc, cst) { + const comments = []; + const items = []; + let key = void 0; + let keyStart = null; + for (let i = 0; i < cst.items.length; ++i) { + const item = cst.items[i]; + switch (item.type) { + case PlainValue.Type.BLANK_LINE: + comments.push({ + afterKey: !!key, + before: items.length + }); + break; + case PlainValue.Type.COMMENT: + comments.push({ + afterKey: !!key, + before: items.length, + comment: item.comment + }); + break; + case PlainValue.Type.MAP_KEY: + if (key !== void 0) items.push(new Pair(key)); + if (item.error) doc.errors.push(item.error); + key = resolveNode(doc, item.node); + keyStart = null; + break; + case PlainValue.Type.MAP_VALUE: + { + if (key === void 0) key = null; + if (item.error) doc.errors.push(item.error); + if (!item.context.atLineStart && item.node && item.node.type === PlainValue.Type.MAP && !item.node.context.atLineStart) { + const msg = "Nested mappings are not allowed in compact mappings"; + doc.errors.push(new PlainValue.YAMLSemanticError(item.node, msg)); + } + let valueNode = item.node; + if (!valueNode && item.props.length > 0) { + valueNode = new PlainValue.PlainValue(PlainValue.Type.PLAIN, []); + valueNode.context = { + parent: item, + src: item.context.src + }; + const pos = item.range.start + 1; + valueNode.range = { + start: pos, + end: pos + }; + valueNode.valueRange = { + start: pos, + end: pos + }; + if (typeof item.range.origStart === "number") { + const origPos = item.range.origStart + 1; + valueNode.range.origStart = valueNode.range.origEnd = origPos; + valueNode.valueRange.origStart = valueNode.valueRange.origEnd = origPos; + } + } + const pair = new Pair(key, resolveNode(doc, valueNode)); + resolvePairComment(item, pair); + items.push(pair); + if (key && typeof keyStart === "number") { + if (item.range.start > keyStart + 1024) doc.errors.push(getLongKeyError(cst, key)); + } + key = void 0; + keyStart = null; + } + break; + default: + if (key !== void 0) items.push(new Pair(key)); + key = resolveNode(doc, item); + keyStart = item.range.start; + if (item.error) doc.errors.push(item.error); + next: for (let j = i + 1; ; ++j) { + const nextItem = cst.items[j]; + switch (nextItem && nextItem.type) { + case PlainValue.Type.BLANK_LINE: + case PlainValue.Type.COMMENT: + continue next; + case PlainValue.Type.MAP_VALUE: + break next; + default: { + const msg = "Implicit map keys need to be followed by map values"; + doc.errors.push(new PlainValue.YAMLSemanticError(item, msg)); + break next; + } + } + } + if (item.valueRangeContainsNewline) { + const msg = "Implicit map keys need to be on a single line"; + doc.errors.push(new PlainValue.YAMLSemanticError(item, msg)); + } + } + } + if (key !== void 0) items.push(new Pair(key)); + return { + comments, + items + }; + } + function resolveFlowMapItems(doc, cst) { + const comments = []; + const items = []; + let key = void 0; + let explicitKey = false; + let next = "{"; + for (let i = 0; i < cst.items.length; ++i) { + const item = cst.items[i]; + if (typeof item.char === "string") { + const { + char, + offset + } = item; + if (char === "?" && key === void 0 && !explicitKey) { + explicitKey = true; + next = ":"; + continue; + } + if (char === ":") { + if (key === void 0) key = null; + if (next === ":") { + next = ","; + continue; + } + } else { + if (explicitKey) { + if (key === void 0 && char !== ",") key = null; + explicitKey = false; + } + if (key !== void 0) { + items.push(new Pair(key)); + key = void 0; + if (char === ",") { + next = ":"; + continue; + } + } + } + if (char === "}") { + if (i === cst.items.length - 1) continue; + } else if (char === next) { + next = ":"; + continue; + } + const msg = `Flow map contains an unexpected ${char}`; + const err = new PlainValue.YAMLSyntaxError(cst, msg); + err.offset = offset; + doc.errors.push(err); + } else if (item.type === PlainValue.Type.BLANK_LINE) { + comments.push({ + afterKey: !!key, + before: items.length + }); + } else if (item.type === PlainValue.Type.COMMENT) { + checkFlowCommentSpace(doc.errors, item); + comments.push({ + afterKey: !!key, + before: items.length, + comment: item.comment + }); + } else if (key === void 0) { + if (next === ",") doc.errors.push(new PlainValue.YAMLSemanticError(item, "Separator , missing in flow map")); + key = resolveNode(doc, item); + } else { + if (next !== ",") doc.errors.push(new PlainValue.YAMLSemanticError(item, "Indicator : missing in flow map entry")); + items.push(new Pair(key, resolveNode(doc, item))); + key = void 0; + explicitKey = false; + } + } + checkFlowCollectionEnd(doc.errors, cst); + if (key !== void 0) items.push(new Pair(key)); + return { + comments, + items + }; + } + function resolveSeq(doc, cst) { + if (cst.type !== PlainValue.Type.SEQ && cst.type !== PlainValue.Type.FLOW_SEQ) { + const msg = `A ${cst.type} node cannot be resolved as a sequence`; + doc.errors.push(new PlainValue.YAMLSyntaxError(cst, msg)); + return null; + } + const { + comments, + items + } = cst.type === PlainValue.Type.FLOW_SEQ ? resolveFlowSeqItems(doc, cst) : resolveBlockSeqItems(doc, cst); + const seq = new YAMLSeq(); + seq.items = items; + resolveComments(seq, comments); + if (!doc.options.mapAsMap && items.some((it) => it instanceof Pair && it.key instanceof Collection)) { + const warn = "Keys with collection values will be stringified as YAML due to JS Object restrictions. Use mapAsMap: true to avoid this."; + doc.warnings.push(new PlainValue.YAMLWarning(cst, warn)); + } + cst.resolved = seq; + return seq; + } + function resolveBlockSeqItems(doc, cst) { + const comments = []; + const items = []; + for (let i = 0; i < cst.items.length; ++i) { + const item = cst.items[i]; + switch (item.type) { + case PlainValue.Type.BLANK_LINE: + comments.push({ + before: items.length + }); + break; + case PlainValue.Type.COMMENT: + comments.push({ + comment: item.comment, + before: items.length + }); + break; + case PlainValue.Type.SEQ_ITEM: + if (item.error) doc.errors.push(item.error); + items.push(resolveNode(doc, item.node)); + if (item.hasProps) { + const msg = "Sequence items cannot have tags or anchors before the - indicator"; + doc.errors.push(new PlainValue.YAMLSemanticError(item, msg)); + } + break; + default: + if (item.error) doc.errors.push(item.error); + doc.errors.push(new PlainValue.YAMLSyntaxError(item, `Unexpected ${item.type} node in sequence`)); + } + } + return { + comments, + items + }; + } + function resolveFlowSeqItems(doc, cst) { + const comments = []; + const items = []; + let explicitKey = false; + let key = void 0; + let keyStart = null; + let next = "["; + let prevItem = null; + for (let i = 0; i < cst.items.length; ++i) { + const item = cst.items[i]; + if (typeof item.char === "string") { + const { + char, + offset + } = item; + if (char !== ":" && (explicitKey || key !== void 0)) { + if (explicitKey && key === void 0) key = next ? items.pop() : null; + items.push(new Pair(key)); + explicitKey = false; + key = void 0; + keyStart = null; + } + if (char === next) { + next = null; + } else if (!next && char === "?") { + explicitKey = true; + } else if (next !== "[" && char === ":" && key === void 0) { + if (next === ",") { + key = items.pop(); + if (key instanceof Pair) { + const msg = "Chaining flow sequence pairs is invalid"; + const err = new PlainValue.YAMLSemanticError(cst, msg); + err.offset = offset; + doc.errors.push(err); + } + if (!explicitKey && typeof keyStart === "number") { + const keyEnd = item.range ? item.range.start : item.offset; + if (keyEnd > keyStart + 1024) doc.errors.push(getLongKeyError(cst, key)); + const { + src + } = prevItem.context; + for (let i2 = keyStart; i2 < keyEnd; ++i2) if (src[i2] === "\n") { + const msg = "Implicit keys of flow sequence pairs need to be on a single line"; + doc.errors.push(new PlainValue.YAMLSemanticError(prevItem, msg)); + break; + } + } + } else { + key = null; + } + keyStart = null; + explicitKey = false; + next = null; + } else if (next === "[" || char !== "]" || i < cst.items.length - 1) { + const msg = `Flow sequence contains an unexpected ${char}`; + const err = new PlainValue.YAMLSyntaxError(cst, msg); + err.offset = offset; + doc.errors.push(err); + } + } else if (item.type === PlainValue.Type.BLANK_LINE) { + comments.push({ + before: items.length + }); + } else if (item.type === PlainValue.Type.COMMENT) { + checkFlowCommentSpace(doc.errors, item); + comments.push({ + comment: item.comment, + before: items.length + }); + } else { + if (next) { + const msg = `Expected a ${next} in flow sequence`; + doc.errors.push(new PlainValue.YAMLSemanticError(item, msg)); + } + const value = resolveNode(doc, item); + if (key === void 0) { + items.push(value); + prevItem = item; + } else { + items.push(new Pair(key, value)); + key = void 0; + } + keyStart = item.range.start; + next = ","; + } + } + checkFlowCollectionEnd(doc.errors, cst); + if (key !== void 0) items.push(new Pair(key)); + return { + comments, + items + }; + } + exports2.Alias = Alias; + exports2.Collection = Collection; + exports2.Merge = Merge; + exports2.Node = Node; + exports2.Pair = Pair; + exports2.Scalar = Scalar; + exports2.YAMLMap = YAMLMap; + exports2.YAMLSeq = YAMLSeq; + exports2.addComment = addComment; + exports2.binaryOptions = binaryOptions; + exports2.boolOptions = boolOptions; + exports2.findPair = findPair; + exports2.intOptions = intOptions; + exports2.isEmptyPath = isEmptyPath; + exports2.nullOptions = nullOptions; + exports2.resolveMap = resolveMap; + exports2.resolveNode = resolveNode; + exports2.resolveSeq = resolveSeq; + exports2.resolveString = resolveString; + exports2.strOptions = strOptions; + exports2.stringifyNumber = stringifyNumber; + exports2.stringifyString = stringifyString; + exports2.toJSON = toJSON; + } +}); + +// ../../node_modules/oas-resolver-browser/node_modules/yaml/dist/warnings-1000a372.js +var require_warnings_1000a372 = __commonJS({ + "../../node_modules/oas-resolver-browser/node_modules/yaml/dist/warnings-1000a372.js"(exports2) { + "use strict"; + var PlainValue = require_PlainValue_ec8e588e(); + var resolveSeq = require_resolveSeq_d03cb037(); + var binary = { + identify: (value) => value instanceof Uint8Array, + // Buffer inherits from Uint8Array + default: false, + tag: "tag:yaml.org,2002:binary", + /** + * Returns a Buffer in node and an Uint8Array in browsers + * + * To use the resulting buffer as an image, you'll want to do something like: + * + * const blob = new Blob([buffer], { type: 'image/jpeg' }) + * document.querySelector('#photo').src = URL.createObjectURL(blob) + */ + resolve: (doc, node) => { + const src = resolveSeq.resolveString(doc, node); + if (typeof Buffer === "function") { + return Buffer.from(src, "base64"); + } else if (typeof atob === "function") { + const str = atob(src.replace(/[\n\r]/g, "")); + const buffer = new Uint8Array(str.length); + for (let i = 0; i < str.length; ++i) buffer[i] = str.charCodeAt(i); + return buffer; + } else { + const msg = "This environment does not support reading binary tags; either Buffer or atob is required"; + doc.errors.push(new PlainValue.YAMLReferenceError(node, msg)); + return null; + } + }, + options: resolveSeq.binaryOptions, + stringify: ({ + comment, + type, + value + }, ctx, onComment, onChompKeep) => { + let src; + if (typeof Buffer === "function") { + src = value instanceof Buffer ? value.toString("base64") : Buffer.from(value.buffer).toString("base64"); + } else if (typeof btoa === "function") { + let s = ""; + for (let i = 0; i < value.length; ++i) s += String.fromCharCode(value[i]); + src = btoa(s); + } else { + throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required"); + } + if (!type) type = resolveSeq.binaryOptions.defaultType; + if (type === PlainValue.Type.QUOTE_DOUBLE) { + value = src; + } else { + const { + lineWidth + } = resolveSeq.binaryOptions; + const n = Math.ceil(src.length / lineWidth); + const lines = new Array(n); + for (let i = 0, o = 0; i < n; ++i, o += lineWidth) { + lines[i] = src.substr(o, lineWidth); + } + value = lines.join(type === PlainValue.Type.BLOCK_LITERAL ? "\n" : " "); + } + return resolveSeq.stringifyString({ + comment, + type, + value + }, ctx, onComment, onChompKeep); + } + }; + function parsePairs(doc, cst) { + const seq = resolveSeq.resolveSeq(doc, cst); + for (let i = 0; i < seq.items.length; ++i) { + let item = seq.items[i]; + if (item instanceof resolveSeq.Pair) continue; + else if (item instanceof resolveSeq.YAMLMap) { + if (item.items.length > 1) { + const msg = "Each pair must have its own sequence indicator"; + throw new PlainValue.YAMLSemanticError(cst, msg); + } + const pair = item.items[0] || new resolveSeq.Pair(); + if (item.commentBefore) pair.commentBefore = pair.commentBefore ? `${item.commentBefore} +${pair.commentBefore}` : item.commentBefore; + if (item.comment) pair.comment = pair.comment ? `${item.comment} +${pair.comment}` : item.comment; + item = pair; + } + seq.items[i] = item instanceof resolveSeq.Pair ? item : new resolveSeq.Pair(item); + } + return seq; + } + function createPairs(schema2, iterable, ctx) { + const pairs2 = new resolveSeq.YAMLSeq(schema2); + pairs2.tag = "tag:yaml.org,2002:pairs"; + for (const it of iterable) { + let key, value; + if (Array.isArray(it)) { + if (it.length === 2) { + key = it[0]; + value = it[1]; + } else throw new TypeError(`Expected [key, value] tuple: ${it}`); + } else if (it && it instanceof Object) { + const keys = Object.keys(it); + if (keys.length === 1) { + key = keys[0]; + value = it[key]; + } else throw new TypeError(`Expected { key: value } tuple: ${it}`); + } else { + key = it; + } + const pair = schema2.createPair(key, value, ctx); + pairs2.items.push(pair); + } + return pairs2; + } + var pairs = { + default: false, + tag: "tag:yaml.org,2002:pairs", + resolve: parsePairs, + createNode: createPairs + }; + var YAMLOMap = class _YAMLOMap extends resolveSeq.YAMLSeq { + constructor() { + super(); + PlainValue._defineProperty(this, "add", resolveSeq.YAMLMap.prototype.add.bind(this)); + PlainValue._defineProperty(this, "delete", resolveSeq.YAMLMap.prototype.delete.bind(this)); + PlainValue._defineProperty(this, "get", resolveSeq.YAMLMap.prototype.get.bind(this)); + PlainValue._defineProperty(this, "has", resolveSeq.YAMLMap.prototype.has.bind(this)); + PlainValue._defineProperty(this, "set", resolveSeq.YAMLMap.prototype.set.bind(this)); + this.tag = _YAMLOMap.tag; + } + toJSON(_2, ctx) { + const map = /* @__PURE__ */ new Map(); + if (ctx && ctx.onCreate) ctx.onCreate(map); + for (const pair of this.items) { + let key, value; + if (pair instanceof resolveSeq.Pair) { + key = resolveSeq.toJSON(pair.key, "", ctx); + value = resolveSeq.toJSON(pair.value, key, ctx); + } else { + key = resolveSeq.toJSON(pair, "", ctx); + } + if (map.has(key)) throw new Error("Ordered maps must not include duplicate keys"); + map.set(key, value); + } + return map; + } + }; + PlainValue._defineProperty(YAMLOMap, "tag", "tag:yaml.org,2002:omap"); + function parseOMap(doc, cst) { + const pairs2 = parsePairs(doc, cst); + const seenKeys = []; + for (const { + key + } of pairs2.items) { + if (key instanceof resolveSeq.Scalar) { + if (seenKeys.includes(key.value)) { + const msg = "Ordered maps must not include duplicate keys"; + throw new PlainValue.YAMLSemanticError(cst, msg); + } else { + seenKeys.push(key.value); + } + } + } + return Object.assign(new YAMLOMap(), pairs2); + } + function createOMap(schema2, iterable, ctx) { + const pairs2 = createPairs(schema2, iterable, ctx); + const omap2 = new YAMLOMap(); + omap2.items = pairs2.items; + return omap2; + } + var omap = { + identify: (value) => value instanceof Map, + nodeClass: YAMLOMap, + default: false, + tag: "tag:yaml.org,2002:omap", + resolve: parseOMap, + createNode: createOMap + }; + var YAMLSet = class _YAMLSet extends resolveSeq.YAMLMap { + constructor() { + super(); + this.tag = _YAMLSet.tag; + } + add(key) { + const pair = key instanceof resolveSeq.Pair ? key : new resolveSeq.Pair(key); + const prev = resolveSeq.findPair(this.items, pair.key); + if (!prev) this.items.push(pair); + } + get(key, keepPair) { + const pair = resolveSeq.findPair(this.items, key); + return !keepPair && pair instanceof resolveSeq.Pair ? pair.key instanceof resolveSeq.Scalar ? pair.key.value : pair.key : pair; + } + set(key, value) { + if (typeof value !== "boolean") throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof value}`); + const prev = resolveSeq.findPair(this.items, key); + if (prev && !value) { + this.items.splice(this.items.indexOf(prev), 1); + } else if (!prev && value) { + this.items.push(new resolveSeq.Pair(key)); + } + } + toJSON(_2, ctx) { + return super.toJSON(_2, ctx, Set); + } + toString(ctx, onComment, onChompKeep) { + if (!ctx) return JSON.stringify(this); + if (this.hasAllNullValues()) return super.toString(ctx, onComment, onChompKeep); + else throw new Error("Set items must all have null values"); + } + }; + PlainValue._defineProperty(YAMLSet, "tag", "tag:yaml.org,2002:set"); + function parseSet(doc, cst) { + const map = resolveSeq.resolveMap(doc, cst); + if (!map.hasAllNullValues()) throw new PlainValue.YAMLSemanticError(cst, "Set items must all have null values"); + return Object.assign(new YAMLSet(), map); + } + function createSet(schema2, iterable, ctx) { + const set2 = new YAMLSet(); + for (const value of iterable) set2.items.push(schema2.createPair(value, null, ctx)); + return set2; + } + var set = { + identify: (value) => value instanceof Set, + nodeClass: YAMLSet, + default: false, + tag: "tag:yaml.org,2002:set", + resolve: parseSet, + createNode: createSet + }; + var parseSexagesimal = (sign, parts) => { + const n = parts.split(":").reduce((n2, p) => n2 * 60 + Number(p), 0); + return sign === "-" ? -n : n; + }; + var stringifySexagesimal = ({ + value + }) => { + if (isNaN(value) || !isFinite(value)) return resolveSeq.stringifyNumber(value); + let sign = ""; + if (value < 0) { + sign = "-"; + value = Math.abs(value); + } + const parts = [value % 60]; + if (value < 60) { + parts.unshift(0); + } else { + value = Math.round((value - parts[0]) / 60); + parts.unshift(value % 60); + if (value >= 60) { + value = Math.round((value - parts[0]) / 60); + parts.unshift(value); + } + } + return sign + parts.map((n) => n < 10 ? "0" + String(n) : String(n)).join(":").replace(/000000\d*$/, ""); + }; + var intTime = { + identify: (value) => typeof value === "number", + default: true, + tag: "tag:yaml.org,2002:int", + format: "TIME", + test: /^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+)$/, + resolve: (str, sign, parts) => parseSexagesimal(sign, parts.replace(/_/g, "")), + stringify: stringifySexagesimal + }; + var floatTime = { + identify: (value) => typeof value === "number", + default: true, + tag: "tag:yaml.org,2002:float", + format: "TIME", + test: /^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*)$/, + resolve: (str, sign, parts) => parseSexagesimal(sign, parts.replace(/_/g, "")), + stringify: stringifySexagesimal + }; + var timestamp = { + identify: (value) => value instanceof Date, + default: true, + tag: "tag:yaml.org,2002:timestamp", + // If the time zone is omitted, the timestamp is assumed to be specified in UTC. The time part + // may be omitted altogether, resulting in a date format. In such a case, the time part is + // assumed to be 00:00:00Z (start of day, UTC). + test: RegExp("^(?:([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?)$"), + resolve: (str, year, month, day, hour, minute, second, millisec, tz) => { + if (millisec) millisec = (millisec + "00").substr(1, 3); + let date = Date.UTC(year, month - 1, day, hour || 0, minute || 0, second || 0, millisec || 0); + if (tz && tz !== "Z") { + let d = parseSexagesimal(tz[0], tz.slice(1)); + if (Math.abs(d) < 30) d *= 60; + date -= 6e4 * d; + } + return new Date(date); + }, + stringify: ({ + value + }) => value.toISOString().replace(/((T00:00)?:00)?\.000Z$/, "") + }; + function shouldWarn(deprecation) { + const env = typeof process !== "undefined" && process.env || {}; + if (deprecation) { + if (typeof YAML_SILENCE_DEPRECATION_WARNINGS !== "undefined") return !YAML_SILENCE_DEPRECATION_WARNINGS; + return !env.YAML_SILENCE_DEPRECATION_WARNINGS; + } + if (typeof YAML_SILENCE_WARNINGS !== "undefined") return !YAML_SILENCE_WARNINGS; + return !env.YAML_SILENCE_WARNINGS; + } + function warn(warning, type) { + if (shouldWarn(false)) { + const emit = typeof process !== "undefined" && process.emitWarning; + if (emit) emit(warning, type); + else { + console.warn(type ? `${type}: ${warning}` : warning); + } + } + } + function warnFileDeprecation(filename) { + if (shouldWarn(true)) { + const path = filename.replace(/.*yaml[/\\]/i, "").replace(/\.js$/, "").replace(/\\/g, "/"); + warn(`The endpoint 'yaml/${path}' will be removed in a future release.`, "DeprecationWarning"); + } + } + var warned = {}; + function warnOptionDeprecation(name, alternative) { + if (!warned[name] && shouldWarn(true)) { + warned[name] = true; + let msg = `The option '${name}' will be removed in a future release`; + msg += alternative ? `, use '${alternative}' instead.` : "."; + warn(msg, "DeprecationWarning"); + } + } + exports2.binary = binary; + exports2.floatTime = floatTime; + exports2.intTime = intTime; + exports2.omap = omap; + exports2.pairs = pairs; + exports2.set = set; + exports2.timestamp = timestamp; + exports2.warn = warn; + exports2.warnFileDeprecation = warnFileDeprecation; + exports2.warnOptionDeprecation = warnOptionDeprecation; + } +}); + +// ../../node_modules/oas-resolver-browser/node_modules/yaml/dist/Schema-88e323a7.js +var require_Schema_88e323a7 = __commonJS({ + "../../node_modules/oas-resolver-browser/node_modules/yaml/dist/Schema-88e323a7.js"(exports2) { + "use strict"; + var PlainValue = require_PlainValue_ec8e588e(); + var resolveSeq = require_resolveSeq_d03cb037(); + var warnings = require_warnings_1000a372(); + function createMap(schema2, obj, ctx) { + const map2 = new resolveSeq.YAMLMap(schema2); + if (obj instanceof Map) { + for (const [key, value] of obj) map2.items.push(schema2.createPair(key, value, ctx)); + } else if (obj && typeof obj === "object") { + for (const key of Object.keys(obj)) map2.items.push(schema2.createPair(key, obj[key], ctx)); + } + if (typeof schema2.sortMapEntries === "function") { + map2.items.sort(schema2.sortMapEntries); + } + return map2; + } + var map = { + createNode: createMap, + default: true, + nodeClass: resolveSeq.YAMLMap, + tag: "tag:yaml.org,2002:map", + resolve: resolveSeq.resolveMap + }; + function createSeq(schema2, obj, ctx) { + const seq2 = new resolveSeq.YAMLSeq(schema2); + if (obj && obj[Symbol.iterator]) { + for (const it of obj) { + const v = schema2.createNode(it, ctx.wrapScalars, null, ctx); + seq2.items.push(v); + } + } + return seq2; + } + var seq = { + createNode: createSeq, + default: true, + nodeClass: resolveSeq.YAMLSeq, + tag: "tag:yaml.org,2002:seq", + resolve: resolveSeq.resolveSeq + }; + var string = { + identify: (value) => typeof value === "string", + default: true, + tag: "tag:yaml.org,2002:str", + resolve: resolveSeq.resolveString, + stringify(item, ctx, onComment, onChompKeep) { + ctx = Object.assign({ + actualString: true + }, ctx); + return resolveSeq.stringifyString(item, ctx, onComment, onChompKeep); + }, + options: resolveSeq.strOptions + }; + var failsafe = [map, seq, string]; + var intIdentify$2 = (value) => typeof value === "bigint" || Number.isInteger(value); + var intResolve$1 = (src, part, radix) => resolveSeq.intOptions.asBigInt ? BigInt(src) : parseInt(part, radix); + function intStringify$1(node, radix, prefix) { + const { + value + } = node; + if (intIdentify$2(value) && value >= 0) return prefix + value.toString(radix); + return resolveSeq.stringifyNumber(node); + } + var nullObj = { + identify: (value) => value == null, + createNode: (schema2, value, ctx) => ctx.wrapScalars ? new resolveSeq.Scalar(null) : null, + default: true, + tag: "tag:yaml.org,2002:null", + test: /^(?:~|[Nn]ull|NULL)?$/, + resolve: () => null, + options: resolveSeq.nullOptions, + stringify: () => resolveSeq.nullOptions.nullStr + }; + var boolObj = { + identify: (value) => typeof value === "boolean", + default: true, + tag: "tag:yaml.org,2002:bool", + test: /^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/, + resolve: (str) => str[0] === "t" || str[0] === "T", + options: resolveSeq.boolOptions, + stringify: ({ + value + }) => value ? resolveSeq.boolOptions.trueStr : resolveSeq.boolOptions.falseStr + }; + var octObj = { + identify: (value) => intIdentify$2(value) && value >= 0, + default: true, + tag: "tag:yaml.org,2002:int", + format: "OCT", + test: /^0o([0-7]+)$/, + resolve: (str, oct) => intResolve$1(str, oct, 8), + options: resolveSeq.intOptions, + stringify: (node) => intStringify$1(node, 8, "0o") + }; + var intObj = { + identify: intIdentify$2, + default: true, + tag: "tag:yaml.org,2002:int", + test: /^[-+]?[0-9]+$/, + resolve: (str) => intResolve$1(str, str, 10), + options: resolveSeq.intOptions, + stringify: resolveSeq.stringifyNumber + }; + var hexObj = { + identify: (value) => intIdentify$2(value) && value >= 0, + default: true, + tag: "tag:yaml.org,2002:int", + format: "HEX", + test: /^0x([0-9a-fA-F]+)$/, + resolve: (str, hex) => intResolve$1(str, hex, 16), + options: resolveSeq.intOptions, + stringify: (node) => intStringify$1(node, 16, "0x") + }; + var nanObj = { + identify: (value) => typeof value === "number", + default: true, + tag: "tag:yaml.org,2002:float", + test: /^(?:[-+]?\.inf|(\.nan))$/i, + resolve: (str, nan) => nan ? NaN : str[0] === "-" ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY, + stringify: resolveSeq.stringifyNumber + }; + var expObj = { + identify: (value) => typeof value === "number", + default: true, + tag: "tag:yaml.org,2002:float", + format: "EXP", + test: /^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/, + resolve: (str) => parseFloat(str), + stringify: ({ + value + }) => Number(value).toExponential() + }; + var floatObj = { + identify: (value) => typeof value === "number", + default: true, + tag: "tag:yaml.org,2002:float", + test: /^[-+]?(?:\.([0-9]+)|[0-9]+\.([0-9]*))$/, + resolve(str, frac1, frac2) { + const frac = frac1 || frac2; + const node = new resolveSeq.Scalar(parseFloat(str)); + if (frac && frac[frac.length - 1] === "0") node.minFractionDigits = frac.length; + return node; + }, + stringify: resolveSeq.stringifyNumber + }; + var core = failsafe.concat([nullObj, boolObj, octObj, intObj, hexObj, nanObj, expObj, floatObj]); + var intIdentify$1 = (value) => typeof value === "bigint" || Number.isInteger(value); + var stringifyJSON = ({ + value + }) => JSON.stringify(value); + var json = [map, seq, { + identify: (value) => typeof value === "string", + default: true, + tag: "tag:yaml.org,2002:str", + resolve: resolveSeq.resolveString, + stringify: stringifyJSON + }, { + identify: (value) => value == null, + createNode: (schema2, value, ctx) => ctx.wrapScalars ? new resolveSeq.Scalar(null) : null, + default: true, + tag: "tag:yaml.org,2002:null", + test: /^null$/, + resolve: () => null, + stringify: stringifyJSON + }, { + identify: (value) => typeof value === "boolean", + default: true, + tag: "tag:yaml.org,2002:bool", + test: /^true|false$/, + resolve: (str) => str === "true", + stringify: stringifyJSON + }, { + identify: intIdentify$1, + default: true, + tag: "tag:yaml.org,2002:int", + test: /^-?(?:0|[1-9][0-9]*)$/, + resolve: (str) => resolveSeq.intOptions.asBigInt ? BigInt(str) : parseInt(str, 10), + stringify: ({ + value + }) => intIdentify$1(value) ? value.toString() : JSON.stringify(value) + }, { + identify: (value) => typeof value === "number", + default: true, + tag: "tag:yaml.org,2002:float", + test: /^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/, + resolve: (str) => parseFloat(str), + stringify: stringifyJSON + }]; + json.scalarFallback = (str) => { + throw new SyntaxError(`Unresolved plain scalar ${JSON.stringify(str)}`); + }; + var boolStringify = ({ + value + }) => value ? resolveSeq.boolOptions.trueStr : resolveSeq.boolOptions.falseStr; + var intIdentify = (value) => typeof value === "bigint" || Number.isInteger(value); + function intResolve(sign, src, radix) { + let str = src.replace(/_/g, ""); + if (resolveSeq.intOptions.asBigInt) { + switch (radix) { + case 2: + str = `0b${str}`; + break; + case 8: + str = `0o${str}`; + break; + case 16: + str = `0x${str}`; + break; + } + const n2 = BigInt(str); + return sign === "-" ? BigInt(-1) * n2 : n2; + } + const n = parseInt(str, radix); + return sign === "-" ? -1 * n : n; + } + function intStringify(node, radix, prefix) { + const { + value + } = node; + if (intIdentify(value)) { + const str = value.toString(radix); + return value < 0 ? "-" + prefix + str.substr(1) : prefix + str; + } + return resolveSeq.stringifyNumber(node); + } + var yaml11 = failsafe.concat([{ + identify: (value) => value == null, + createNode: (schema2, value, ctx) => ctx.wrapScalars ? new resolveSeq.Scalar(null) : null, + default: true, + tag: "tag:yaml.org,2002:null", + test: /^(?:~|[Nn]ull|NULL)?$/, + resolve: () => null, + options: resolveSeq.nullOptions, + stringify: () => resolveSeq.nullOptions.nullStr + }, { + identify: (value) => typeof value === "boolean", + default: true, + tag: "tag:yaml.org,2002:bool", + test: /^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/, + resolve: () => true, + options: resolveSeq.boolOptions, + stringify: boolStringify + }, { + identify: (value) => typeof value === "boolean", + default: true, + tag: "tag:yaml.org,2002:bool", + test: /^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/i, + resolve: () => false, + options: resolveSeq.boolOptions, + stringify: boolStringify + }, { + identify: intIdentify, + default: true, + tag: "tag:yaml.org,2002:int", + format: "BIN", + test: /^([-+]?)0b([0-1_]+)$/, + resolve: (str, sign, bin) => intResolve(sign, bin, 2), + stringify: (node) => intStringify(node, 2, "0b") + }, { + identify: intIdentify, + default: true, + tag: "tag:yaml.org,2002:int", + format: "OCT", + test: /^([-+]?)0([0-7_]+)$/, + resolve: (str, sign, oct) => intResolve(sign, oct, 8), + stringify: (node) => intStringify(node, 8, "0") + }, { + identify: intIdentify, + default: true, + tag: "tag:yaml.org,2002:int", + test: /^([-+]?)([0-9][0-9_]*)$/, + resolve: (str, sign, abs) => intResolve(sign, abs, 10), + stringify: resolveSeq.stringifyNumber + }, { + identify: intIdentify, + default: true, + tag: "tag:yaml.org,2002:int", + format: "HEX", + test: /^([-+]?)0x([0-9a-fA-F_]+)$/, + resolve: (str, sign, hex) => intResolve(sign, hex, 16), + stringify: (node) => intStringify(node, 16, "0x") + }, { + identify: (value) => typeof value === "number", + default: true, + tag: "tag:yaml.org,2002:float", + test: /^(?:[-+]?\.inf|(\.nan))$/i, + resolve: (str, nan) => nan ? NaN : str[0] === "-" ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY, + stringify: resolveSeq.stringifyNumber + }, { + identify: (value) => typeof value === "number", + default: true, + tag: "tag:yaml.org,2002:float", + format: "EXP", + test: /^[-+]?([0-9][0-9_]*)?(\.[0-9_]*)?[eE][-+]?[0-9]+$/, + resolve: (str) => parseFloat(str.replace(/_/g, "")), + stringify: ({ + value + }) => Number(value).toExponential() + }, { + identify: (value) => typeof value === "number", + default: true, + tag: "tag:yaml.org,2002:float", + test: /^[-+]?(?:[0-9][0-9_]*)?\.([0-9_]*)$/, + resolve(str, frac) { + const node = new resolveSeq.Scalar(parseFloat(str.replace(/_/g, ""))); + if (frac) { + const f = frac.replace(/_/g, ""); + if (f[f.length - 1] === "0") node.minFractionDigits = f.length; + } + return node; + }, + stringify: resolveSeq.stringifyNumber + }], warnings.binary, warnings.omap, warnings.pairs, warnings.set, warnings.intTime, warnings.floatTime, warnings.timestamp); + var schemas = { + core, + failsafe, + json, + yaml11 + }; + var tags = { + binary: warnings.binary, + bool: boolObj, + float: floatObj, + floatExp: expObj, + floatNaN: nanObj, + floatTime: warnings.floatTime, + int: intObj, + intHex: hexObj, + intOct: octObj, + intTime: warnings.intTime, + map, + null: nullObj, + omap: warnings.omap, + pairs: warnings.pairs, + seq, + set: warnings.set, + timestamp: warnings.timestamp + }; + function findTagObject(value, tagName, tags2) { + if (tagName) { + const match = tags2.filter((t) => t.tag === tagName); + const tagObj = match.find((t) => !t.format) || match[0]; + if (!tagObj) throw new Error(`Tag ${tagName} not found`); + return tagObj; + } + return tags2.find((t) => (t.identify && t.identify(value) || t.class && value instanceof t.class) && !t.format); + } + function createNode(value, tagName, ctx) { + if (value instanceof resolveSeq.Node) return value; + const { + defaultPrefix, + onTagObj, + prevObjects, + schema: schema2, + wrapScalars + } = ctx; + if (tagName && tagName.startsWith("!!")) tagName = defaultPrefix + tagName.slice(2); + let tagObj = findTagObject(value, tagName, schema2.tags); + if (!tagObj) { + if (typeof value.toJSON === "function") value = value.toJSON(); + if (!value || typeof value !== "object") return wrapScalars ? new resolveSeq.Scalar(value) : value; + tagObj = value instanceof Map ? map : value[Symbol.iterator] ? seq : map; + } + if (onTagObj) { + onTagObj(tagObj); + delete ctx.onTagObj; + } + const obj = { + value: void 0, + node: void 0 + }; + if (value && typeof value === "object" && prevObjects) { + const prev = prevObjects.get(value); + if (prev) { + const alias = new resolveSeq.Alias(prev); + ctx.aliasNodes.push(alias); + return alias; + } + obj.value = value; + prevObjects.set(value, obj); + } + obj.node = tagObj.createNode ? tagObj.createNode(ctx.schema, value, ctx) : wrapScalars ? new resolveSeq.Scalar(value) : value; + if (tagName && obj.node instanceof resolveSeq.Node) obj.node.tag = tagName; + return obj.node; + } + function getSchemaTags(schemas2, knownTags, customTags, schemaId) { + let tags2 = schemas2[schemaId.replace(/\W/g, "")]; + if (!tags2) { + const keys = Object.keys(schemas2).map((key) => JSON.stringify(key)).join(", "); + throw new Error(`Unknown schema "${schemaId}"; use one of ${keys}`); + } + if (Array.isArray(customTags)) { + for (const tag of customTags) tags2 = tags2.concat(tag); + } else if (typeof customTags === "function") { + tags2 = customTags(tags2.slice()); + } + for (let i = 0; i < tags2.length; ++i) { + const tag = tags2[i]; + if (typeof tag === "string") { + const tagObj = knownTags[tag]; + if (!tagObj) { + const keys = Object.keys(knownTags).map((key) => JSON.stringify(key)).join(", "); + throw new Error(`Unknown custom tag "${tag}"; use one of ${keys}`); + } + tags2[i] = tagObj; + } + } + return tags2; + } + var sortMapEntriesByKey = (a, b) => a.key < b.key ? -1 : a.key > b.key ? 1 : 0; + var Schema = class _Schema { + // TODO: remove in v2 + // TODO: remove in v2 + constructor({ + customTags, + merge, + schema: schema2, + sortMapEntries, + tags: deprecatedCustomTags + }) { + this.merge = !!merge; + this.name = schema2; + this.sortMapEntries = sortMapEntries === true ? sortMapEntriesByKey : sortMapEntries || null; + if (!customTags && deprecatedCustomTags) warnings.warnOptionDeprecation("tags", "customTags"); + this.tags = getSchemaTags(schemas, tags, customTags || deprecatedCustomTags, schema2); + } + createNode(value, wrapScalars, tagName, ctx) { + const baseCtx = { + defaultPrefix: _Schema.defaultPrefix, + schema: this, + wrapScalars + }; + const createCtx = ctx ? Object.assign(ctx, baseCtx) : baseCtx; + return createNode(value, tagName, createCtx); + } + createPair(key, value, ctx) { + if (!ctx) ctx = { + wrapScalars: true + }; + const k = this.createNode(key, ctx.wrapScalars, null, ctx); + const v = this.createNode(value, ctx.wrapScalars, null, ctx); + return new resolveSeq.Pair(k, v); + } + }; + PlainValue._defineProperty(Schema, "defaultPrefix", PlainValue.defaultTagPrefix); + PlainValue._defineProperty(Schema, "defaultTags", PlainValue.defaultTags); + exports2.Schema = Schema; + } +}); + +// ../../node_modules/oas-resolver-browser/node_modules/yaml/dist/Document-9b4560a1.js +var require_Document_9b4560a1 = __commonJS({ + "../../node_modules/oas-resolver-browser/node_modules/yaml/dist/Document-9b4560a1.js"(exports2) { + "use strict"; + var PlainValue = require_PlainValue_ec8e588e(); + var resolveSeq = require_resolveSeq_d03cb037(); + var Schema = require_Schema_88e323a7(); + var defaultOptions = { + anchorPrefix: "a", + customTags: null, + indent: 2, + indentSeq: true, + keepCstNodes: false, + keepNodeTypes: true, + keepBlobsInJSON: true, + mapAsMap: false, + maxAliasCount: 100, + prettyErrors: false, + // TODO Set true in v2 + simpleKeys: false, + version: "1.2" + }; + var scalarOptions = { + get binary() { + return resolveSeq.binaryOptions; + }, + set binary(opt) { + Object.assign(resolveSeq.binaryOptions, opt); + }, + get bool() { + return resolveSeq.boolOptions; + }, + set bool(opt) { + Object.assign(resolveSeq.boolOptions, opt); + }, + get int() { + return resolveSeq.intOptions; + }, + set int(opt) { + Object.assign(resolveSeq.intOptions, opt); + }, + get null() { + return resolveSeq.nullOptions; + }, + set null(opt) { + Object.assign(resolveSeq.nullOptions, opt); + }, + get str() { + return resolveSeq.strOptions; + }, + set str(opt) { + Object.assign(resolveSeq.strOptions, opt); + } + }; + var documentOptions = { + "1.0": { + schema: "yaml-1.1", + merge: true, + tagPrefixes: [{ + handle: "!", + prefix: PlainValue.defaultTagPrefix + }, { + handle: "!!", + prefix: "tag:private.yaml.org,2002:" + }] + }, + 1.1: { + schema: "yaml-1.1", + merge: true, + tagPrefixes: [{ + handle: "!", + prefix: "!" + }, { + handle: "!!", + prefix: PlainValue.defaultTagPrefix + }] + }, + 1.2: { + schema: "core", + merge: false, + tagPrefixes: [{ + handle: "!", + prefix: "!" + }, { + handle: "!!", + prefix: PlainValue.defaultTagPrefix + }] + } + }; + function stringifyTag(doc, tag) { + if ((doc.version || doc.options.version) === "1.0") { + const priv = tag.match(/^tag:private\.yaml\.org,2002:([^:/]+)$/); + if (priv) return "!" + priv[1]; + const vocab = tag.match(/^tag:([a-zA-Z0-9-]+)\.yaml\.org,2002:(.*)/); + return vocab ? `!${vocab[1]}/${vocab[2]}` : `!${tag.replace(/^tag:/, "")}`; + } + let p = doc.tagPrefixes.find((p2) => tag.indexOf(p2.prefix) === 0); + if (!p) { + const dtp = doc.getDefaults().tagPrefixes; + p = dtp && dtp.find((p2) => tag.indexOf(p2.prefix) === 0); + } + if (!p) return tag[0] === "!" ? tag : `!<${tag}>`; + const suffix = tag.substr(p.prefix.length).replace(/[!,[\]{}]/g, (ch) => ({ + "!": "%21", + ",": "%2C", + "[": "%5B", + "]": "%5D", + "{": "%7B", + "}": "%7D" + })[ch]); + return p.handle + suffix; + } + function getTagObject(tags, item) { + if (item instanceof resolveSeq.Alias) return resolveSeq.Alias; + if (item.tag) { + const match = tags.filter((t) => t.tag === item.tag); + if (match.length > 0) return match.find((t) => t.format === item.format) || match[0]; + } + let tagObj, obj; + if (item instanceof resolveSeq.Scalar) { + obj = item.value; + const match = tags.filter((t) => t.identify && t.identify(obj) || t.class && obj instanceof t.class); + tagObj = match.find((t) => t.format === item.format) || match.find((t) => !t.format); + } else { + obj = item; + tagObj = tags.find((t) => t.nodeClass && obj instanceof t.nodeClass); + } + if (!tagObj) { + const name = obj && obj.constructor ? obj.constructor.name : typeof obj; + throw new Error(`Tag not resolved for ${name} value`); + } + return tagObj; + } + function stringifyProps(node, tagObj, { + anchors, + doc + }) { + const props = []; + const anchor = doc.anchors.getName(node); + if (anchor) { + anchors[anchor] = node; + props.push(`&${anchor}`); + } + if (node.tag) { + props.push(stringifyTag(doc, node.tag)); + } else if (!tagObj.default) { + props.push(stringifyTag(doc, tagObj.tag)); + } + return props.join(" "); + } + function stringify2(item, ctx, onComment, onChompKeep) { + const { + anchors, + schema: schema2 + } = ctx.doc; + let tagObj; + if (!(item instanceof resolveSeq.Node)) { + const createCtx = { + aliasNodes: [], + onTagObj: (o) => tagObj = o, + prevObjects: /* @__PURE__ */ new Map() + }; + item = schema2.createNode(item, true, null, createCtx); + for (const alias of createCtx.aliasNodes) { + alias.source = alias.source.node; + let name = anchors.getName(alias.source); + if (!name) { + name = anchors.newName(); + anchors.map[name] = alias.source; + } + } + } + if (item instanceof resolveSeq.Pair) return item.toString(ctx, onComment, onChompKeep); + if (!tagObj) tagObj = getTagObject(schema2.tags, item); + const props = stringifyProps(item, tagObj, ctx); + if (props.length > 0) ctx.indentAtStart = (ctx.indentAtStart || 0) + props.length + 1; + const str = typeof tagObj.stringify === "function" ? tagObj.stringify(item, ctx, onComment, onChompKeep) : item instanceof resolveSeq.Scalar ? resolveSeq.stringifyString(item, ctx, onComment, onChompKeep) : item.toString(ctx, onComment, onChompKeep); + if (!props) return str; + return item instanceof resolveSeq.Scalar || str[0] === "{" || str[0] === "[" ? `${props} ${str}` : `${props} +${ctx.indent}${str}`; + } + var Anchors = class _Anchors { + static validAnchorNode(node) { + return node instanceof resolveSeq.Scalar || node instanceof resolveSeq.YAMLSeq || node instanceof resolveSeq.YAMLMap; + } + constructor(prefix) { + PlainValue._defineProperty(this, "map", /* @__PURE__ */ Object.create(null)); + this.prefix = prefix; + } + createAlias(node, name) { + this.setAnchor(node, name); + return new resolveSeq.Alias(node); + } + createMergePair(...sources) { + const merge = new resolveSeq.Merge(); + merge.value.items = sources.map((s) => { + if (s instanceof resolveSeq.Alias) { + if (s.source instanceof resolveSeq.YAMLMap) return s; + } else if (s instanceof resolveSeq.YAMLMap) { + return this.createAlias(s); + } + throw new Error("Merge sources must be Map nodes or their Aliases"); + }); + return merge; + } + getName(node) { + const { + map + } = this; + return Object.keys(map).find((a) => map[a] === node); + } + getNames() { + return Object.keys(this.map); + } + getNode(name) { + return this.map[name]; + } + newName(prefix) { + if (!prefix) prefix = this.prefix; + const names = Object.keys(this.map); + for (let i = 1; true; ++i) { + const name = `${prefix}${i}`; + if (!names.includes(name)) return name; + } + } + // During parsing, map & aliases contain CST nodes + resolveNodes() { + const { + map, + _cstAliases + } = this; + Object.keys(map).forEach((a) => { + map[a] = map[a].resolved; + }); + _cstAliases.forEach((a) => { + a.source = a.source.resolved; + }); + delete this._cstAliases; + } + setAnchor(node, name) { + if (node != null && !_Anchors.validAnchorNode(node)) { + throw new Error("Anchors may only be set for Scalar, Seq and Map nodes"); + } + if (name && /[\x00-\x19\s,[\]{}]/.test(name)) { + throw new Error("Anchor names must not contain whitespace or control characters"); + } + const { + map + } = this; + const prev = node && Object.keys(map).find((a) => map[a] === node); + if (prev) { + if (!name) { + return prev; + } else if (prev !== name) { + delete map[prev]; + map[name] = node; + } + } else { + if (!name) { + if (!node) return null; + name = this.newName(); + } + map[name] = node; + } + return name; + } + }; + var visit = (node, tags) => { + if (node && typeof node === "object") { + const { + tag + } = node; + if (node instanceof resolveSeq.Collection) { + if (tag) tags[tag] = true; + node.items.forEach((n) => visit(n, tags)); + } else if (node instanceof resolveSeq.Pair) { + visit(node.key, tags); + visit(node.value, tags); + } else if (node instanceof resolveSeq.Scalar) { + if (tag) tags[tag] = true; + } + } + return tags; + }; + var listTagNames = (node) => Object.keys(visit(node, {})); + function parseContents(doc, contents) { + const comments = { + before: [], + after: [] + }; + let body = void 0; + let spaceBefore = false; + for (const node of contents) { + if (node.valueRange) { + if (body !== void 0) { + const msg = "Document contains trailing content not separated by a ... or --- line"; + doc.errors.push(new PlainValue.YAMLSyntaxError(node, msg)); + break; + } + const res = resolveSeq.resolveNode(doc, node); + if (spaceBefore) { + res.spaceBefore = true; + spaceBefore = false; + } + body = res; + } else if (node.comment !== null) { + const cc = body === void 0 ? comments.before : comments.after; + cc.push(node.comment); + } else if (node.type === PlainValue.Type.BLANK_LINE) { + spaceBefore = true; + if (body === void 0 && comments.before.length > 0 && !doc.commentBefore) { + doc.commentBefore = comments.before.join("\n"); + comments.before = []; + } + } + } + doc.contents = body || null; + if (!body) { + doc.comment = comments.before.concat(comments.after).join("\n") || null; + } else { + const cb = comments.before.join("\n"); + if (cb) { + const cbNode = body instanceof resolveSeq.Collection && body.items[0] ? body.items[0] : body; + cbNode.commentBefore = cbNode.commentBefore ? `${cb} +${cbNode.commentBefore}` : cb; + } + doc.comment = comments.after.join("\n") || null; + } + } + function resolveTagDirective({ + tagPrefixes + }, directive) { + const [handle, prefix] = directive.parameters; + if (!handle || !prefix) { + const msg = "Insufficient parameters given for %TAG directive"; + throw new PlainValue.YAMLSemanticError(directive, msg); + } + if (tagPrefixes.some((p) => p.handle === handle)) { + const msg = "The %TAG directive must only be given at most once per handle in the same document."; + throw new PlainValue.YAMLSemanticError(directive, msg); + } + return { + handle, + prefix + }; + } + function resolveYamlDirective(doc, directive) { + let [version2] = directive.parameters; + if (directive.name === "YAML:1.0") version2 = "1.0"; + if (!version2) { + const msg = "Insufficient parameters given for %YAML directive"; + throw new PlainValue.YAMLSemanticError(directive, msg); + } + if (!documentOptions[version2]) { + const v0 = doc.version || doc.options.version; + const msg = `Document will be parsed as YAML ${v0} rather than YAML ${version2}`; + doc.warnings.push(new PlainValue.YAMLWarning(directive, msg)); + } + return version2; + } + function parseDirectives(doc, directives, prevDoc) { + const directiveComments = []; + let hasDirectives = false; + for (const directive of directives) { + const { + comment, + name + } = directive; + switch (name) { + case "TAG": + try { + doc.tagPrefixes.push(resolveTagDirective(doc, directive)); + } catch (error) { + doc.errors.push(error); + } + hasDirectives = true; + break; + case "YAML": + case "YAML:1.0": + if (doc.version) { + const msg = "The %YAML directive must only be given at most once per document."; + doc.errors.push(new PlainValue.YAMLSemanticError(directive, msg)); + } + try { + doc.version = resolveYamlDirective(doc, directive); + } catch (error) { + doc.errors.push(error); + } + hasDirectives = true; + break; + default: + if (name) { + const msg = `YAML only supports %TAG and %YAML directives, and not %${name}`; + doc.warnings.push(new PlainValue.YAMLWarning(directive, msg)); + } + } + if (comment) directiveComments.push(comment); + } + if (prevDoc && !hasDirectives && "1.1" === (doc.version || prevDoc.version || doc.options.version)) { + const copyTagPrefix = ({ + handle, + prefix + }) => ({ + handle, + prefix + }); + doc.tagPrefixes = prevDoc.tagPrefixes.map(copyTagPrefix); + doc.version = prevDoc.version; + } + doc.commentBefore = directiveComments.join("\n") || null; + } + function assertCollection(contents) { + if (contents instanceof resolveSeq.Collection) return true; + throw new Error("Expected a YAML collection as document contents"); + } + var Document = class _Document { + constructor(options) { + this.anchors = new Anchors(options.anchorPrefix); + this.commentBefore = null; + this.comment = null; + this.contents = null; + this.directivesEndMarker = null; + this.errors = []; + this.options = options; + this.schema = null; + this.tagPrefixes = []; + this.version = null; + this.warnings = []; + } + add(value) { + assertCollection(this.contents); + return this.contents.add(value); + } + addIn(path, value) { + assertCollection(this.contents); + this.contents.addIn(path, value); + } + delete(key) { + assertCollection(this.contents); + return this.contents.delete(key); + } + deleteIn(path) { + if (resolveSeq.isEmptyPath(path)) { + if (this.contents == null) return false; + this.contents = null; + return true; + } + assertCollection(this.contents); + return this.contents.deleteIn(path); + } + getDefaults() { + return _Document.defaults[this.version] || _Document.defaults[this.options.version] || {}; + } + get(key, keepScalar) { + return this.contents instanceof resolveSeq.Collection ? this.contents.get(key, keepScalar) : void 0; + } + getIn(path, keepScalar) { + if (resolveSeq.isEmptyPath(path)) return !keepScalar && this.contents instanceof resolveSeq.Scalar ? this.contents.value : this.contents; + return this.contents instanceof resolveSeq.Collection ? this.contents.getIn(path, keepScalar) : void 0; + } + has(key) { + return this.contents instanceof resolveSeq.Collection ? this.contents.has(key) : false; + } + hasIn(path) { + if (resolveSeq.isEmptyPath(path)) return this.contents !== void 0; + return this.contents instanceof resolveSeq.Collection ? this.contents.hasIn(path) : false; + } + set(key, value) { + assertCollection(this.contents); + this.contents.set(key, value); + } + setIn(path, value) { + if (resolveSeq.isEmptyPath(path)) this.contents = value; + else { + assertCollection(this.contents); + this.contents.setIn(path, value); + } + } + setSchema(id, customTags) { + if (!id && !customTags && this.schema) return; + if (typeof id === "number") id = id.toFixed(1); + if (id === "1.0" || id === "1.1" || id === "1.2") { + if (this.version) this.version = id; + else this.options.version = id; + delete this.options.schema; + } else if (id && typeof id === "string") { + this.options.schema = id; + } + if (Array.isArray(customTags)) this.options.customTags = customTags; + const opt = Object.assign({}, this.getDefaults(), this.options); + this.schema = new Schema.Schema(opt); + } + parse(node, prevDoc) { + if (this.options.keepCstNodes) this.cstNode = node; + if (this.options.keepNodeTypes) this.type = "DOCUMENT"; + const { + directives = [], + contents = [], + directivesEndMarker, + error, + valueRange + } = node; + if (error) { + if (!error.source) error.source = this; + this.errors.push(error); + } + parseDirectives(this, directives, prevDoc); + if (directivesEndMarker) this.directivesEndMarker = true; + this.range = valueRange ? [valueRange.start, valueRange.end] : null; + this.setSchema(); + this.anchors._cstAliases = []; + parseContents(this, contents); + this.anchors.resolveNodes(); + if (this.options.prettyErrors) { + for (const error2 of this.errors) if (error2 instanceof PlainValue.YAMLError) error2.makePretty(); + for (const warn of this.warnings) if (warn instanceof PlainValue.YAMLError) warn.makePretty(); + } + return this; + } + listNonDefaultTags() { + return listTagNames(this.contents).filter((t) => t.indexOf(Schema.Schema.defaultPrefix) !== 0); + } + setTagPrefix(handle, prefix) { + if (handle[0] !== "!" || handle[handle.length - 1] !== "!") throw new Error("Handle must start and end with !"); + if (prefix) { + const prev = this.tagPrefixes.find((p) => p.handle === handle); + if (prev) prev.prefix = prefix; + else this.tagPrefixes.push({ + handle, + prefix + }); + } else { + this.tagPrefixes = this.tagPrefixes.filter((p) => p.handle !== handle); + } + } + toJSON(arg, onAnchor) { + const { + keepBlobsInJSON, + mapAsMap, + maxAliasCount + } = this.options; + const keep = keepBlobsInJSON && (typeof arg !== "string" || !(this.contents instanceof resolveSeq.Scalar)); + const ctx = { + doc: this, + indentStep: " ", + keep, + mapAsMap: keep && !!mapAsMap, + maxAliasCount, + stringify: stringify2 + // Requiring directly in Pair would create circular dependencies + }; + const anchorNames = Object.keys(this.anchors.map); + if (anchorNames.length > 0) ctx.anchors = new Map(anchorNames.map((name) => [this.anchors.map[name], { + alias: [], + aliasCount: 0, + count: 1 + }])); + const res = resolveSeq.toJSON(this.contents, arg, ctx); + if (typeof onAnchor === "function" && ctx.anchors) for (const { + count, + res: res2 + } of ctx.anchors.values()) onAnchor(res2, count); + return res; + } + toString() { + if (this.errors.length > 0) throw new Error("Document with errors cannot be stringified"); + const indentSize = this.options.indent; + if (!Number.isInteger(indentSize) || indentSize <= 0) { + const s = JSON.stringify(indentSize); + throw new Error(`"indent" option must be a positive integer, not ${s}`); + } + this.setSchema(); + const lines = []; + let hasDirectives = false; + if (this.version) { + let vd = "%YAML 1.2"; + if (this.schema.name === "yaml-1.1") { + if (this.version === "1.0") vd = "%YAML:1.0"; + else if (this.version === "1.1") vd = "%YAML 1.1"; + } + lines.push(vd); + hasDirectives = true; + } + const tagNames = this.listNonDefaultTags(); + this.tagPrefixes.forEach(({ + handle, + prefix + }) => { + if (tagNames.some((t) => t.indexOf(prefix) === 0)) { + lines.push(`%TAG ${handle} ${prefix}`); + hasDirectives = true; + } + }); + if (hasDirectives || this.directivesEndMarker) lines.push("---"); + if (this.commentBefore) { + if (hasDirectives || !this.directivesEndMarker) lines.unshift(""); + lines.unshift(this.commentBefore.replace(/^/gm, "#")); + } + const ctx = { + anchors: /* @__PURE__ */ Object.create(null), + doc: this, + indent: "", + indentStep: " ".repeat(indentSize), + stringify: stringify2 + // Requiring directly in nodes would create circular dependencies + }; + let chompKeep = false; + let contentComment = null; + if (this.contents) { + if (this.contents instanceof resolveSeq.Node) { + if (this.contents.spaceBefore && (hasDirectives || this.directivesEndMarker)) lines.push(""); + if (this.contents.commentBefore) lines.push(this.contents.commentBefore.replace(/^/gm, "#")); + ctx.forceBlockIndent = !!this.comment; + contentComment = this.contents.comment; + } + const onChompKeep = contentComment ? null : () => chompKeep = true; + const body = stringify2(this.contents, ctx, () => contentComment = null, onChompKeep); + lines.push(resolveSeq.addComment(body, "", contentComment)); + } else if (this.contents !== void 0) { + lines.push(stringify2(this.contents, ctx)); + } + if (this.comment) { + if ((!chompKeep || contentComment) && lines[lines.length - 1] !== "") lines.push(""); + lines.push(this.comment.replace(/^/gm, "#")); + } + return lines.join("\n") + "\n"; + } + }; + PlainValue._defineProperty(Document, "defaults", documentOptions); + exports2.Document = Document; + exports2.defaultOptions = defaultOptions; + exports2.scalarOptions = scalarOptions; + } +}); + +// ../../node_modules/oas-resolver-browser/node_modules/yaml/dist/index.js +var require_dist = __commonJS({ + "../../node_modules/oas-resolver-browser/node_modules/yaml/dist/index.js"(exports2) { + "use strict"; + var parseCst = require_parse_cst(); + var Document$1 = require_Document_9b4560a1(); + var Schema = require_Schema_88e323a7(); + var PlainValue = require_PlainValue_ec8e588e(); + var warnings = require_warnings_1000a372(); + require_resolveSeq_d03cb037(); + function createNode(value, wrapScalars = true, tag) { + if (tag === void 0 && typeof wrapScalars === "string") { + tag = wrapScalars; + wrapScalars = true; + } + const options = Object.assign({}, Document$1.Document.defaults[Document$1.defaultOptions.version], Document$1.defaultOptions); + const schema2 = new Schema.Schema(options); + return schema2.createNode(value, wrapScalars, tag); + } + var Document = class extends Document$1.Document { + constructor(options) { + super(Object.assign({}, Document$1.defaultOptions, options)); + } + }; + function parseAllDocuments(src, options) { + const stream = []; + let prev; + for (const cstDoc of parseCst.parse(src)) { + const doc = new Document(options); + doc.parse(cstDoc, prev); + stream.push(doc); + prev = doc; + } + return stream; + } + function parseDocument(src, options) { + const cst = parseCst.parse(src); + const doc = new Document(options).parse(cst[0]); + if (cst.length > 1) { + const errMsg = "Source contains multiple documents; please use YAML.parseAllDocuments()"; + doc.errors.unshift(new PlainValue.YAMLSemanticError(cst[1], errMsg)); + } + return doc; + } + function parse2(src, options) { + const doc = parseDocument(src, options); + doc.warnings.forEach((warning) => warnings.warn(warning)); + if (doc.errors.length > 0) throw doc.errors[0]; + return doc.toJSON(); + } + function stringify2(value, options) { + const doc = new Document(options); + doc.contents = value; + return String(doc); + } + var YAML = { + createNode, + defaultOptions: Document$1.defaultOptions, + Document, + parse: parse2, + parseAllDocuments, + parseCST: parseCst.parse, + parseDocument, + scalarOptions: Document$1.scalarOptions, + stringify: stringify2 + }; + exports2.YAML = YAML; + } +}); + +// ../../node_modules/oas-resolver-browser/node_modules/yaml/index.js +var require_yaml = __commonJS({ + "../../node_modules/oas-resolver-browser/node_modules/yaml/index.js"(exports2, module2) { + module2.exports = require_dist().YAML; + } +}); + +// ../../node_modules/reftools/lib/jptr.js +var require_jptr = __commonJS({ + "../../node_modules/reftools/lib/jptr.js"(exports2, module2) { + "use strict"; + function jpescape(s) { + return s.replace(/\~/g, "~0").replace(/\//g, "~1"); + } + function jpunescape(s) { + return s.replace(/\~1/g, "/").replace(/~0/g, "~"); + } + function jptr(obj, prop, newValue) { + if (typeof obj === "undefined") return false; + if (!prop || typeof prop !== "string" || prop === "#") return typeof newValue !== "undefined" ? newValue : obj; + if (prop.indexOf("#") >= 0) { + let parts = prop.split("#"); + let uri = parts[0]; + if (uri) return false; + prop = parts[1]; + prop = decodeURIComponent(prop.slice(1).split("+").join(" ")); + } + if (prop.startsWith("/")) prop = prop.slice(1); + let components = prop.split("/"); + for (let i = 0; i < components.length; i++) { + components[i] = jpunescape(components[i]); + let setAndLast = typeof newValue !== "undefined" && i == components.length - 1; + let index = parseInt(components[i], 10); + if (!Array.isArray(obj) || isNaN(index) || index.toString() !== components[i]) { + index = Array.isArray(obj) && components[i] === "-" ? -2 : -1; + } else { + components[i] = i > 0 ? components[i - 1] : ""; + } + if (index != -1 || obj && obj.hasOwnProperty(components[i])) { + if (index >= 0) { + if (setAndLast) { + obj[index] = newValue; + } + obj = obj[index]; + } else if (index === -2) { + if (setAndLast) { + if (Array.isArray(obj)) { + obj.push(newValue); + } + return newValue; + } else return void 0; + } else { + if (setAndLast) { + obj[components[i]] = newValue; + } + obj = obj[components[i]]; + } + } else { + if (typeof newValue !== "undefined" && typeof obj === "object" && !Array.isArray(obj)) { + obj[components[i]] = setAndLast ? newValue : components[i + 1] === "0" || components[i + 1] === "-" ? [] : {}; + obj = obj[components[i]]; + } else return false; + } + } + return obj; + } + module2.exports = { + jptr, + jpescape, + jpunescape + }; + } +}); + +// ../../node_modules/reftools/lib/recurse.js +var require_recurse = __commonJS({ + "../../node_modules/reftools/lib/recurse.js"(exports2, module2) { + "use strict"; + var jpescape = require_jptr().jpescape; + function defaultState() { + return { + path: "#", + depth: 0, + pkey: "", + parent: {}, + payload: {}, + seen: /* @__PURE__ */ new WeakMap(), + identity: false, + identityDetection: false + }; + } + function recurse(object, state, callback) { + if (!state) state = { depth: 0 }; + if (!state.depth) { + state = Object.assign({}, defaultState(), state); + } + if (typeof object !== "object") return; + let oPath = state.path; + for (let key in object) { + state.key = key; + state.path = state.path + "/" + encodeURIComponent(jpescape(key)); + state.identityPath = state.seen.get(object[key]); + state.identity = typeof state.identityPath !== "undefined"; + if (object.hasOwnProperty(key)) { + callback(object, key, state); + } + if (typeof object[key] === "object" && !state.identity) { + if (state.identityDetection && !Array.isArray(object[key]) && object[key] !== null) { + state.seen.set(object[key], state.path); + } + let newState = {}; + newState.parent = object; + newState.path = state.path; + newState.depth = state.depth ? state.depth + 1 : 1; + newState.pkey = key; + newState.payload = state.payload; + newState.seen = state.seen; + newState.identity = false; + newState.identityDetection = state.identityDetection; + recurse(object[key], newState, callback); + } + state.path = oPath; + } + } + module2.exports = { + recurse + }; + } +}); + +// ../../node_modules/reftools/lib/clone.js +var require_clone = __commonJS({ + "../../node_modules/reftools/lib/clone.js"(exports2, module2) { + "use strict"; + function nop(obj) { + return obj; + } + function clone(obj) { + return JSON.parse(JSON.stringify(obj)); + } + function shallowClone(obj) { + let result = {}; + for (let p in obj) { + if (obj.hasOwnProperty(p)) { + result[p] = obj[p]; + } + } + return result; + } + function deepClone(obj) { + let result = Array.isArray(obj) ? [] : {}; + for (let p in obj) { + if (obj.hasOwnProperty(p) || Array.isArray(obj)) { + result[p] = typeof obj[p] === "object" ? deepClone(obj[p]) : obj[p]; + } + } + return result; + } + function fastClone(obj) { + return Object.assign({}, obj); + } + function circularClone(obj, hash) { + if (!hash) hash = /* @__PURE__ */ new WeakMap(); + if (Object(obj) !== obj || obj instanceof Function) return obj; + if (hash.has(obj)) return hash.get(obj); + try { + var result = new obj.constructor(); + } catch (e) { + result = Object.create(Object.getPrototypeOf(obj)); + } + hash.set(obj, result); + return Object.assign(result, ...Object.keys(obj).map( + (key) => ({ [key]: circularClone(obj[key], hash) }) + )); + } + module2.exports = { + nop, + clone, + shallowClone, + deepClone, + fastClone, + circularClone + }; + } +}); + +// ../../node_modules/reftools/lib/isref.js +var require_isref = __commonJS({ + "../../node_modules/reftools/lib/isref.js"(exports2, module2) { + "use strict"; + function isRef(obj, key) { + return key === "$ref" && (!!obj && typeof obj[key] === "string"); + } + module2.exports = { + isRef + }; + } +}); + +// ../../node_modules/reftools/lib/dereference.js +var require_dereference = __commonJS({ + "../../node_modules/reftools/lib/dereference.js"(exports2, module2) { + "use strict"; + var recurse = require_recurse().recurse; + var clone = require_clone().shallowClone; + var jptr = require_jptr().jptr; + var isRef = require_isref().isRef; + var getLogger = function(options) { + if (options && options.verbose) { + return { + warn: function() { + var args = Array.prototype.slice.call(arguments); + console.warn.apply(console, args); + } + }; + } else { + return { + warn: function() { + } + }; + } + }; + function dereference(o, definitions, options) { + if (!options) options = {}; + if (!options.cache) options.cache = {}; + if (!options.state) options.state = {}; + options.state.identityDetection = true; + options.depth = options.depth ? options.depth + 1 : 1; + let obj = options.depth > 1 ? o : clone(o); + let container = { data: obj }; + let defs = options.depth > 1 ? definitions : clone(definitions); + if (!options.master) options.master = obj; + let logger = getLogger(options); + let changes = 1; + while (changes > 0) { + changes = 0; + recurse(container, options.state, function(obj2, key, state) { + if (isRef(obj2, key)) { + let $ref = obj2[key]; + changes++; + if (!options.cache[$ref]) { + let entry = {}; + entry.path = state.path.split("/$ref")[0]; + entry.key = $ref; + logger.warn("Dereffing %s at %s", $ref, entry.path); + entry.source = defs; + entry.data = jptr(entry.source, entry.key); + if (entry.data === false) { + entry.data = jptr(options.master, entry.key); + entry.source = options.master; + } + if (entry.data === false) { + logger.warn("Missing $ref target", entry.key); + } + options.cache[$ref] = entry; + entry.data = state.parent[state.pkey] = dereference(jptr(entry.source, entry.key), entry.source, options); + if (options.$ref && typeof state.parent[state.pkey] === "object" && state.parent[state.pkey] !== null) state.parent[state.pkey][options.$ref] = $ref; + entry.resolved = true; + } else { + let entry = options.cache[$ref]; + if (entry.resolved) { + logger.warn("Patching %s for %s", $ref, entry.path); + state.parent[state.pkey] = entry.data; + if (options.$ref && typeof state.parent[state.pkey] === "object" && state.parent[state.pkey] !== null) state.parent[state.pkey][options.$ref] = $ref; + } else if ($ref === entry.path) { + throw new Error(`Tight circle at ${entry.path}`); + } else { + logger.warn("Unresolved ref"); + state.parent[state.pkey] = jptr(entry.source, entry.path); + if (state.parent[state.pkey] === false) { + state.parent[state.pkey] = jptr(entry.source, entry.key); + } + if (options.$ref && typeof state.parent[state.pkey] === "object" && state.parent[state.pkey] !== null) state.parent[options.$ref] = $ref; + } + } + } + }); + } + return container.data; + } + module2.exports = { + dereference + }; + } +}); + +// ../../node_modules/fast-safe-stringify/index.js +var require_fast_safe_stringify = __commonJS({ + "../../node_modules/fast-safe-stringify/index.js"(exports2, module2) { + module2.exports = stringify2; + stringify2.default = stringify2; + stringify2.stable = deterministicStringify; + stringify2.stableStringify = deterministicStringify; + var LIMIT_REPLACE_NODE = "[...]"; + var CIRCULAR_REPLACE_NODE = "[Circular]"; + var arr = []; + var replacerStack = []; + function defaultOptions() { + return { + depthLimit: Number.MAX_SAFE_INTEGER, + edgesLimit: Number.MAX_SAFE_INTEGER + }; + } + function stringify2(obj, replacer, spacer, options) { + if (typeof options === "undefined") { + options = defaultOptions(); + } + decirc(obj, "", 0, [], void 0, 0, options); + var res; + try { + if (replacerStack.length === 0) { + res = JSON.stringify(obj, replacer, spacer); + } else { + res = JSON.stringify(obj, replaceGetterValues(replacer), spacer); + } + } catch (_2) { + return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]"); + } finally { + while (arr.length !== 0) { + var part = arr.pop(); + if (part.length === 4) { + Object.defineProperty(part[0], part[1], part[3]); + } else { + part[0][part[1]] = part[2]; + } + } + } + return res; + } + function setReplace(replace, val, k, parent) { + var propertyDescriptor = Object.getOwnPropertyDescriptor(parent, k); + if (propertyDescriptor.get !== void 0) { + if (propertyDescriptor.configurable) { + Object.defineProperty(parent, k, { value: replace }); + arr.push([parent, k, val, propertyDescriptor]); + } else { + replacerStack.push([val, k, replace]); + } + } else { + parent[k] = replace; + arr.push([parent, k, val]); + } + } + function decirc(val, k, edgeIndex, stack, parent, depth, options) { + depth += 1; + var i; + if (typeof val === "object" && val !== null) { + for (i = 0; i < stack.length; i++) { + if (stack[i] === val) { + setReplace(CIRCULAR_REPLACE_NODE, val, k, parent); + return; + } + } + if (typeof options.depthLimit !== "undefined" && depth > options.depthLimit) { + setReplace(LIMIT_REPLACE_NODE, val, k, parent); + return; + } + if (typeof options.edgesLimit !== "undefined" && edgeIndex + 1 > options.edgesLimit) { + setReplace(LIMIT_REPLACE_NODE, val, k, parent); + return; + } + stack.push(val); + if (Array.isArray(val)) { + for (i = 0; i < val.length; i++) { + decirc(val[i], i, i, stack, val, depth, options); + } + } else { + var keys = Object.keys(val); + for (i = 0; i < keys.length; i++) { + var key = keys[i]; + decirc(val[key], key, i, stack, val, depth, options); + } + } + stack.pop(); + } + } + function compareFunction(a, b) { + if (a < b) { + return -1; + } + if (a > b) { + return 1; + } + return 0; + } + function deterministicStringify(obj, replacer, spacer, options) { + if (typeof options === "undefined") { + options = defaultOptions(); + } + var tmp = deterministicDecirc(obj, "", 0, [], void 0, 0, options) || obj; + var res; + try { + if (replacerStack.length === 0) { + res = JSON.stringify(tmp, replacer, spacer); + } else { + res = JSON.stringify(tmp, replaceGetterValues(replacer), spacer); + } + } catch (_2) { + return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]"); + } finally { + while (arr.length !== 0) { + var part = arr.pop(); + if (part.length === 4) { + Object.defineProperty(part[0], part[1], part[3]); + } else { + part[0][part[1]] = part[2]; + } + } + } + return res; + } + function deterministicDecirc(val, k, edgeIndex, stack, parent, depth, options) { + depth += 1; + var i; + if (typeof val === "object" && val !== null) { + for (i = 0; i < stack.length; i++) { + if (stack[i] === val) { + setReplace(CIRCULAR_REPLACE_NODE, val, k, parent); + return; + } + } + try { + if (typeof val.toJSON === "function") { + return; + } + } catch (_2) { + return; + } + if (typeof options.depthLimit !== "undefined" && depth > options.depthLimit) { + setReplace(LIMIT_REPLACE_NODE, val, k, parent); + return; + } + if (typeof options.edgesLimit !== "undefined" && edgeIndex + 1 > options.edgesLimit) { + setReplace(LIMIT_REPLACE_NODE, val, k, parent); + return; + } + stack.push(val); + if (Array.isArray(val)) { + for (i = 0; i < val.length; i++) { + deterministicDecirc(val[i], i, i, stack, val, depth, options); + } + } else { + var tmp = {}; + var keys = Object.keys(val).sort(compareFunction); + for (i = 0; i < keys.length; i++) { + var key = keys[i]; + deterministicDecirc(val[key], key, i, stack, val, depth, options); + tmp[key] = val[key]; + } + if (typeof parent !== "undefined") { + arr.push([parent, k, val]); + parent[k] = tmp; + } else { + return tmp; + } + } + stack.pop(); + } + } + function replaceGetterValues(replacer) { + replacer = typeof replacer !== "undefined" ? replacer : function(k, v) { + return v; + }; + return function(key, val) { + if (replacerStack.length > 0) { + for (var i = 0; i < replacerStack.length; i++) { + var part = replacerStack[i]; + if (part[1] === key && part[0] === val) { + val = part[2]; + replacerStack.splice(i, 1); + break; + } + } + } + return replacer.call(this, key, val); + }; + } + } +}); + +// ../../node_modules/oas-kit-common/index.js +var require_oas_kit_common = __commonJS({ + "../../node_modules/oas-kit-common/index.js"(exports2, module2) { + "use strict"; + var sjs = require_fast_safe_stringify(); + var colour = process.env.NODE_DISABLE_COLORS ? { red: "", yellow: "", green: "", normal: "" } : { red: "\x1B[31m", yellow: "\x1B[33;1m", green: "\x1B[32m", normal: "\x1B[0m" }; + function uniqueOnly(value, index, self2) { + return self2.indexOf(value) === index; + } + function hasDuplicates(array) { + return new Set(array).size !== array.length; + } + function allSame(array) { + return new Set(array).size <= 1; + } + function deepEquals(obj1, obj2) { + function _equals(obj12, obj22) { + return sjs.stringify(obj12) === sjs.stringify(Object.assign({}, obj12, obj22)); + } + return _equals(obj1, obj2) && _equals(obj2, obj1); + } + function compressArray(arr) { + let result = []; + for (let candidate of arr) { + let dupe = result.find(function(e, i, a) { + return deepEquals(e, candidate); + }); + if (!dupe) result.push(candidate); + } + return result; + } + function distinctArray(arr) { + return arr.length === compressArray(arr).length; + } + function firstDupe(arr) { + return arr.find(function(e, i, a) { + return arr.indexOf(e) < i; + }); + } + function hash(s) { + let hash2 = 0; + let chr; + if (s.length === 0) return hash2; + for (let i = 0; i < s.length; i++) { + chr = s.charCodeAt(i); + hash2 = (hash2 << 5) - hash2 + chr; + hash2 |= 0; + } + return hash2; + } + String.prototype.toCamelCase = function camelize() { + return this.toLowerCase().replace(/[-_ \/\.](.)/g, function(match, group1) { + return group1.toUpperCase(); + }); + }; + var parameterTypeProperties = [ + "format", + "minimum", + "maximum", + "exclusiveMinimum", + "exclusiveMaximum", + "minLength", + "maxLength", + "multipleOf", + "minItems", + "maxItems", + "uniqueItems", + "minProperties", + "maxProperties", + "additionalProperties", + "pattern", + "enum", + "default" + ]; + var arrayProperties = [ + "items", + "minItems", + "maxItems", + "uniqueItems" + ]; + var httpMethods = [ + "get", + "post", + "put", + "delete", + "patch", + "head", + "options", + "trace" + ]; + function sanitise(s) { + s = s.replace("[]", "Array"); + let components = s.split("/"); + components[0] = components[0].replace(/[^A-Za-z0-9_\-\.]+|\s+/gm, "_"); + return components.join("/"); + } + function sanitiseAll(s) { + return sanitise(s.split("/").join("_")); + } + module2.exports = { + colour, + uniqueOnly, + hasDuplicates, + allSame, + distinctArray, + firstDupe, + hash, + parameterTypeProperties, + arrayProperties, + httpMethods, + sanitise, + sanitiseAll + }; + } +}); + +// ../../node_modules/oas-resolver-browser/index.js +var require_oas_resolver_browser = __commonJS({ + "../../node_modules/oas-resolver-browser/index.js"(exports2, module2) { + "use strict"; + var fs = require("fs"); + var path = typeof process === "object" ? require("path") : require_path_browserify(); + var url = require("url"); + var fetch = require_lib2(); + var yaml = require_yaml(); + var jptr = require_jptr().jptr; + var recurse = require_recurse().recurse; + var clone = require_clone().clone; + var deRef = require_dereference().dereference; + var isRef = require_isref().isRef; + var common = require_oas_kit_common(); + function unique(arr) { + return [...new Set(arr)]; + } + function readFileAsync(filename, encoding, options, pointer, def) { + return new Promise(function(resolve2, reject) { + let files = options.files || null; + filename = decodeURI(filename); + if (files) { + if (files[filename]) { + resolve2(files[filename]); + } else { + if (options.ignoreIOErrors && def) { + if (options.verbose) console.warn("FAILED", pointer); + options.externalRefs[pointer].failed = true; + resolve2(def); + } else { + reject("Could not read file: " + filename); + } + } + } else { + fs.readFile(filename, encoding, function(err, data) { + if (err) { + if (options.ignoreIOErrors && def) { + options.externalRefs[pointer].failed = true; + resolve2(def); + } else { + reject(err); + } + } else { + resolve2(data); + } + }); + } + }); + } + function resolveAllFragment(obj, context, src, parentPath, base, options) { + let attachPoint = options.externalRefs[src + parentPath].paths[0]; + let baseUrl = url.parse(base); + let seen = {}; + let changes = 1; + while (changes) { + changes = 0; + recurse(obj, { identityDetection: true }, function(obj2, key, state) { + if (isRef(obj2, key)) { + if (obj2[key].startsWith("#")) { + if (!seen[obj2[key]] && !obj2.$fixed) { + let target = clone(jptr(context, obj2[key])); + if (options.verbose > 1) console.warn((target === false ? common.colour.red : common.colour.green) + "Fragment resolution", obj2[key], common.colour.normal); + if (target === false) { + state.parent[state.pkey] = {}; + if (options.fatal) { + let ex = new Error("Fragment $ref resolution failed " + obj2[key]); + if (options.promise) options.promise.reject(ex); + else throw ex; + } + } else { + changes++; + state.parent[state.pkey] = target; + seen[obj2[key]] = state.path.replace("/%24ref", ""); + } + } else { + if (!obj2.$fixed) { + let newRef = (attachPoint + "/" + seen[obj2[key]]).split("/#/").join("/"); + state.parent[state.pkey] = { $ref: newRef, "x-miro": obj2[key], $fixed: true }; + if (options.verbose > 1) console.warn("Replacing with", newRef); + changes++; + } + } + } else if (baseUrl.protocol) { + let newRef = url.resolve(base, obj2[key]).toString(); + if (options.verbose > 1) console.warn(common.colour.yellow + "Rewriting external url ref", obj2[key], "as", newRef, common.colour.normal); + obj2["x-miro"] = obj2[key]; + if (options.externalRefs[obj2[key]]) { + if (!options.externalRefs[newRef]) { + options.externalRefs[newRef] = options.externalRefs[obj2[key]]; + } + options.externalRefs[newRef].failed = options.externalRefs[obj2[key]].failed; + } + obj2[key] = newRef; + } else if (!obj2["x-miro"]) { + let newRef = url.resolve(base, obj2[key]).toString(); + let failed = false; + if (options.externalRefs[obj2[key]]) { + failed = options.externalRefs[obj2[key]].failed; + } + if (!failed) { + if (options.verbose > 1) console.warn(common.colour.yellow + "Rewriting external ref", obj2[key], "as", newRef, common.colour.normal); + obj2["x-miro"] = obj2[key]; + obj2[key] = newRef; + } + } + } + }); + } + recurse(obj, {}, function(obj2, key, state) { + if (isRef(obj2, key)) { + if (typeof obj2.$fixed !== "undefined") delete obj2.$fixed; + } + }); + if (options.verbose > 1) console.warn("Finished fragment resolution"); + return obj; + } + function filterData(data, options) { + if (!options.filters || !options.filters.length) return data; + for (let filter of options.filters) { + data = filter(data, options); + } + return data; + } + function testProtocol(input, backup) { + if (input && input.length > 2) return input; + if (backup && backup.length > 2) return backup; + return "file:"; + } + function resolveExternal(root, pointer, options, callback) { + var u = url.parse(options.source); + var base = options.source.split("\\").join("/").split("/"); + let doc = base.pop(); + if (!doc) base.pop(); + let fragment = ""; + let fnComponents = pointer.split("#"); + if (fnComponents.length > 1) { + fragment = "#" + fnComponents[1]; + pointer = fnComponents[0]; + } + base = base.join("/"); + let u2 = url.parse(pointer); + let effectiveProtocol = testProtocol(u2.protocol, u.protocol); + let target; + if (effectiveProtocol === "file:") { + target = path.resolve(base ? base + "/" : "", pointer); + } else { + target = url.resolve(base ? base + "/" : "", pointer); + } + if (options.cache[target]) { + if (options.verbose) console.warn("CACHED", target, fragment); + let context = clone(options.cache[target]); + let data = options.externalRef = context; + if (fragment) { + data = jptr(data, fragment); + if (data === false) { + data = {}; + if (options.fatal) { + let ex = new Error("Cached $ref resolution failed " + target + fragment); + if (options.promise) options.promise.reject(ex); + else throw ex; + } + } + } + data = resolveAllFragment(data, context, pointer, fragment, target, options); + data = filterData(data, options); + callback(clone(data), target, options); + return Promise.resolve(data); + } + if (options.verbose) console.warn("GET", target, fragment); + if (options.handlers && options.handlers[effectiveProtocol]) { + return options.handlers[effectiveProtocol](base, pointer, fragment, options).then(function(data) { + options.externalRef = data; + data = filterData(data, options); + options.cache[target] = data; + callback(data, target, options); + return data; + }).catch(function(ex) { + if (options.verbose) console.warn(ex); + throw ex; + }); + } else if (effectiveProtocol && effectiveProtocol.startsWith("http")) { + const fetchOptions = Object.assign({}, options.fetchOptions, { agent: options.agent }); + return options.fetch(target, fetchOptions).then(function(res) { + if (res.status !== 200) { + if (options.ignoreIOErrors) { + if (options.verbose) console.warn("FAILED", pointer); + options.externalRefs[pointer].failed = true; + return '{"$ref":"' + pointer + '"}'; + } else { + throw new Error(`Received status code ${res.status}: ${target}`); + } + } + return res.text(); + }).then(function(data) { + try { + let context = yaml.parse(data, { schema: "core", prettyErrors: true }); + data = options.externalRef = context; + options.cache[target] = clone(data); + if (fragment) { + data = jptr(data, fragment); + if (data === false) { + data = {}; + if (options.fatal) { + let ex = new Error("Remote $ref resolution failed " + target + fragment); + if (options.promise) options.promise.reject(ex); + else throw ex; + } + } + } + data = resolveAllFragment(data, context, pointer, fragment, target, options); + data = filterData(data, options); + } catch (ex) { + if (options.verbose) console.warn(ex); + if (options.promise && options.fatal) options.promise.reject(ex); + else throw ex; + } + callback(data, target, options); + return data; + }).catch(function(err) { + if (options.verbose) console.warn(err); + options.cache[target] = {}; + if (options.promise && options.fatal) options.promise.reject(err); + else throw err; + }); + } else { + const def = '{"$ref":"' + pointer + '"}'; + return readFileAsync(target, options.encoding || "utf8", options, pointer, def).then(function(data) { + try { + let context = yaml.parse(data, { schema: "core", prettyErrors: true }); + data = options.externalRef = context; + options.cache[target] = clone(data); + if (fragment) { + data = jptr(data, fragment); + if (data === false) { + data = {}; + if (options.fatal) { + let ex = new Error("File $ref resolution failed " + target + fragment); + if (options.promise) options.promise.reject(ex); + else throw ex; + } + } + } + data = resolveAllFragment(data, context, pointer, fragment, target, options); + data = filterData(data, options); + } catch (ex) { + if (options.verbose) console.warn(ex); + if (options.promise && options.fatal) options.promise.reject(ex); + else throw ex; + } + callback(data, target, options); + return data; + }).catch(function(err) { + if (options.verbose) console.warn(err); + if (options.promise && options.fatal) options.promise.reject(err); + else throw err; + }); + } + } + function scanExternalRefs(options) { + return new Promise(function(res, rej) { + function inner(obj, key, state) { + if (obj[key] && isRef(obj[key], "$ref")) { + let $ref = obj[key].$ref; + if (!$ref.startsWith("#")) { + let $extra = ""; + if (!refs[$ref]) { + let potential = Object.keys(refs).find(function(e, i, a) { + return $ref.startsWith(e + "/"); + }); + if (potential) { + if (options.verbose) console.warn("Found potential subschema at", potential); + $extra = "/" + ($ref.split("#")[1] || "").replace(potential.split("#")[1] || ""); + $extra = $extra.split("/undefined").join(""); + $ref = potential; + } + } + if (!refs[$ref]) { + refs[$ref] = { resolved: false, paths: [], extras: {}, description: obj[key].description }; + } + if (refs[$ref].resolved) { + if (refs[$ref].failed) { + } else if (options.rewriteRefs) { + let newRef = refs[$ref].resolvedAt; + if (options.verbose > 1) console.warn("Rewriting ref", $ref, newRef); + obj[key]["x-miro"] = $ref; + obj[key].$ref = newRef + $extra; + } else { + obj[key] = clone(refs[$ref].data); + } + } else { + refs[$ref].paths.push(state.path); + refs[$ref].extras[state.path] = $extra; + } + } + } + } + let refs = options.externalRefs; + if (options.resolver.depth > 0 && options.source === options.resolver.base) { + return res(refs); + } + recurse(options.openapi.definitions, { identityDetection: true, path: "#/definitions" }, inner); + recurse(options.openapi.components, { identityDetection: true, path: "#/components" }, inner); + recurse(options.openapi, { identityDetection: true }, inner); + res(refs); + }); + } + function findExternalRefs(options) { + return new Promise(function(res, rej) { + scanExternalRefs(options).then(function(refs) { + for (let ref in refs) { + if (!refs[ref].resolved) { + let depth = options.resolver.depth; + if (depth > 0) depth++; + options.resolver.actions[depth].push(function() { + return resolveExternal(options.openapi, ref, options, function(data, source, options2) { + if (!refs[ref].resolved) { + let external = {}; + external.context = refs[ref]; + external.$ref = ref; + external.original = clone(data); + external.updated = data; + external.source = source; + options2.externals.push(external); + refs[ref].resolved = true; + } + let localOptions = Object.assign({}, options2, { + source: "", + resolver: { + actions: options2.resolver.actions, + depth: options2.resolver.actions.length - 1, + base: options2.resolver.base + } + }); + if (options2.patch && refs[ref].description && !data.description && typeof data === "object") { + data.description = refs[ref].description; + } + refs[ref].data = data; + let pointers = unique(refs[ref].paths); + pointers = pointers.sort(function(a, b) { + const aComp = a.startsWith("#/components/") || a.startsWith("#/definitions/"); + const bComp = b.startsWith("#/components/") || b.startsWith("#/definitions/"); + if (aComp && !bComp) return -1; + if (bComp && !aComp) return 1; + return 0; + }); + for (let ptr of pointers) { + if (refs[ref].resolvedAt && ptr !== refs[ref].resolvedAt && ptr.indexOf("x-ms-examples/") < 0) { + if (options2.verbose > 1) console.warn("Creating pointer to data at", ptr); + jptr(options2.openapi, ptr, { $ref: refs[ref].resolvedAt + refs[ref].extras[ptr], "x-miro": ref + refs[ref].extras[ptr] }); + } else { + if (refs[ref].resolvedAt) { + if (options2.verbose > 1) console.warn("Avoiding circular reference"); + } else { + refs[ref].resolvedAt = ptr; + if (options2.verbose > 1) console.warn("Creating initial clone of data at", ptr); + } + let cdata = clone(data); + jptr(options2.openapi, ptr, cdata); + } + } + if (options2.resolver.actions[localOptions.resolver.depth].length === 0) { + options2.resolver.actions[localOptions.resolver.depth].push(function() { + return findExternalRefs(localOptions); + }); + } + }); + }); + } + } + }).catch(function(ex) { + if (options.verbose) console.warn(ex); + rej(ex); + }); + let result = { options }; + result.actions = options.resolver.actions[options.resolver.depth]; + res(result); + }); + } + var serial = (funcs) => funcs.reduce((promise, func) => promise.then((result) => func().then(Array.prototype.concat.bind(result))), Promise.resolve([])); + function loopReferences(options, res, rej) { + options.resolver.actions.push([]); + findExternalRefs(options).then(function(data) { + serial(data.actions).then(function() { + if (options.resolver.depth >= options.resolver.actions.length) { + console.warn("Ran off the end of resolver actions"); + return res(true); + } else { + options.resolver.depth++; + if (options.resolver.actions[options.resolver.depth].length) { + setTimeout(function() { + loopReferences(data.options, res, rej); + }, 0); + } else { + if (options.verbose > 1) console.warn(common.colour.yellow + "Finished external resolution!", common.colour.normal); + if (options.resolveInternal) { + if (options.verbose > 1) console.warn(common.colour.yellow + "Starting internal resolution!", common.colour.normal); + options.openapi = deRef(options.openapi, options.original, { verbose: options.verbose - 1 }); + if (options.verbose > 1) console.warn(common.colour.yellow + "Finished internal resolution!", common.colour.normal); + } + recurse(options.openapi, {}, function(obj, key, state) { + if (isRef(obj, key)) { + if (!options.preserveMiro) delete obj["x-miro"]; + } + }); + res(options); + } + } + }).catch(function(ex) { + if (options.verbose) console.warn(ex); + rej(ex); + }); + }).catch(function(ex) { + if (options.verbose) console.warn(ex); + rej(ex); + }); + } + function setupOptions(options) { + if (!options.cache) options.cache = {}; + if (!options.fetch) options.fetch = fetch; + if (options.source) { + let srcUrl = url.parse(options.source); + if (!srcUrl.protocol || srcUrl.protocol.length <= 2) { + options.source = path.resolve(options.source); + } + } + options.externals = []; + options.externalRefs = {}; + options.rewriteRefs = true; + options.resolver = {}; + options.resolver.depth = 0; + options.resolver.base = options.source; + options.resolver.actions = [[]]; + } + function optionalResolve(options) { + setupOptions(options); + return new Promise(function(res, rej) { + if (options.resolve) + loopReferences(options, res, rej); + else + res(options); + }); + } + function resolve(openapi, source, options) { + if (!options) options = {}; + options.openapi = openapi; + options.source = source; + options.resolve = true; + setupOptions(options); + return new Promise(function(res, rej) { + loopReferences(options, res, rej); + }); + } + module2.exports = { + optionalResolve, + resolve + }; + } +}); + +// ../../node_modules/openapi-to-postmanv2/node_modules/yaml/dist/PlainValue-ec8e588e.js +var require_PlainValue_ec8e588e2 = __commonJS({ + "../../node_modules/openapi-to-postmanv2/node_modules/yaml/dist/PlainValue-ec8e588e.js"(exports2) { + "use strict"; + var Char = { + ANCHOR: "&", + COMMENT: "#", + TAG: "!", + DIRECTIVES_END: "-", + DOCUMENT_END: "." + }; + var Type = { + ALIAS: "ALIAS", + BLANK_LINE: "BLANK_LINE", + BLOCK_FOLDED: "BLOCK_FOLDED", + BLOCK_LITERAL: "BLOCK_LITERAL", + COMMENT: "COMMENT", + DIRECTIVE: "DIRECTIVE", + DOCUMENT: "DOCUMENT", + FLOW_MAP: "FLOW_MAP", + FLOW_SEQ: "FLOW_SEQ", + MAP: "MAP", + MAP_KEY: "MAP_KEY", + MAP_VALUE: "MAP_VALUE", + PLAIN: "PLAIN", + QUOTE_DOUBLE: "QUOTE_DOUBLE", + QUOTE_SINGLE: "QUOTE_SINGLE", + SEQ: "SEQ", + SEQ_ITEM: "SEQ_ITEM" + }; + var defaultTagPrefix = "tag:yaml.org,2002:"; + var defaultTags = { + MAP: "tag:yaml.org,2002:map", + SEQ: "tag:yaml.org,2002:seq", + STR: "tag:yaml.org,2002:str" + }; + function findLineStarts(src) { + const ls = [0]; + let offset = src.indexOf("\n"); + while (offset !== -1) { + offset += 1; + ls.push(offset); + offset = src.indexOf("\n", offset); + } + return ls; + } + function getSrcInfo(cst) { + let lineStarts, src; + if (typeof cst === "string") { + lineStarts = findLineStarts(cst); + src = cst; + } else { + if (Array.isArray(cst)) cst = cst[0]; + if (cst && cst.context) { + if (!cst.lineStarts) cst.lineStarts = findLineStarts(cst.context.src); + lineStarts = cst.lineStarts; + src = cst.context.src; + } + } + return { + lineStarts, + src + }; + } + function getLinePos(offset, cst) { + if (typeof offset !== "number" || offset < 0) return null; + const { + lineStarts, + src + } = getSrcInfo(cst); + if (!lineStarts || !src || offset > src.length) return null; + for (let i = 0; i < lineStarts.length; ++i) { + const start = lineStarts[i]; + if (offset < start) { + return { + line: i, + col: offset - lineStarts[i - 1] + 1 + }; + } + if (offset === start) return { + line: i + 1, + col: 1 + }; + } + const line = lineStarts.length; + return { + line, + col: offset - lineStarts[line - 1] + 1 + }; + } + function getLine(line, cst) { + const { + lineStarts, + src + } = getSrcInfo(cst); + if (!lineStarts || !(line >= 1) || line > lineStarts.length) return null; + const start = lineStarts[line - 1]; + let end = lineStarts[line]; + while (end && end > start && src[end - 1] === "\n") --end; + return src.slice(start, end); + } + function getPrettyContext({ + start, + end + }, cst, maxWidth = 80) { + let src = getLine(start.line, cst); + if (!src) return null; + let { + col + } = start; + if (src.length > maxWidth) { + if (col <= maxWidth - 10) { + src = src.substr(0, maxWidth - 1) + "\u2026"; + } else { + const halfWidth = Math.round(maxWidth / 2); + if (src.length > col + halfWidth) src = src.substr(0, col + halfWidth - 1) + "\u2026"; + col -= src.length - maxWidth; + src = "\u2026" + src.substr(1 - maxWidth); + } + } + let errLen = 1; + let errEnd = ""; + if (end) { + if (end.line === start.line && col + (end.col - start.col) <= maxWidth + 1) { + errLen = end.col - start.col; + } else { + errLen = Math.min(src.length + 1, maxWidth) - col; + errEnd = "\u2026"; + } + } + const offset = col > 1 ? " ".repeat(col - 1) : ""; + const err = "^".repeat(errLen); + return `${src} +${offset}${err}${errEnd}`; + } + var Range = class _Range { + static copy(orig) { + return new _Range(orig.start, orig.end); + } + constructor(start, end) { + this.start = start; + this.end = end || start; + } + isEmpty() { + return typeof this.start !== "number" || !this.end || this.end <= this.start; + } + /** + * Set `origStart` and `origEnd` to point to the original source range for + * this node, which may differ due to dropped CR characters. + * + * @param {number[]} cr - Positions of dropped CR characters + * @param {number} offset - Starting index of `cr` from the last call + * @returns {number} - The next offset, matching the one found for `origStart` + */ + setOrigRange(cr, offset) { + const { + start, + end + } = this; + if (cr.length === 0 || end <= cr[0]) { + this.origStart = start; + this.origEnd = end; + return offset; + } + let i = offset; + while (i < cr.length) { + if (cr[i] > start) break; + else ++i; + } + this.origStart = start + i; + const nextOffset = i; + while (i < cr.length) { + if (cr[i] >= end) break; + else ++i; + } + this.origEnd = end + i; + return nextOffset; + } + }; + var Node = class _Node { + static addStringTerminator(src, offset, str) { + if (str[str.length - 1] === "\n") return str; + const next = _Node.endOfWhiteSpace(src, offset); + return next >= src.length || src[next] === "\n" ? str + "\n" : str; + } + // ^(---|...) + static atDocumentBoundary(src, offset, sep) { + const ch0 = src[offset]; + if (!ch0) return true; + const prev = src[offset - 1]; + if (prev && prev !== "\n") return false; + if (sep) { + if (ch0 !== sep) return false; + } else { + if (ch0 !== Char.DIRECTIVES_END && ch0 !== Char.DOCUMENT_END) return false; + } + const ch1 = src[offset + 1]; + const ch2 = src[offset + 2]; + if (ch1 !== ch0 || ch2 !== ch0) return false; + const ch3 = src[offset + 3]; + return !ch3 || ch3 === "\n" || ch3 === " " || ch3 === " "; + } + static endOfIdentifier(src, offset) { + let ch = src[offset]; + const isVerbatim = ch === "<"; + const notOk = isVerbatim ? ["\n", " ", " ", ">"] : ["\n", " ", " ", "[", "]", "{", "}", ","]; + while (ch && notOk.indexOf(ch) === -1) ch = src[offset += 1]; + if (isVerbatim && ch === ">") offset += 1; + return offset; + } + static endOfIndent(src, offset) { + let ch = src[offset]; + while (ch === " ") ch = src[offset += 1]; + return offset; + } + static endOfLine(src, offset) { + let ch = src[offset]; + while (ch && ch !== "\n") ch = src[offset += 1]; + return offset; + } + static endOfWhiteSpace(src, offset) { + let ch = src[offset]; + while (ch === " " || ch === " ") ch = src[offset += 1]; + return offset; + } + static startOfLine(src, offset) { + let ch = src[offset - 1]; + if (ch === "\n") return offset; + while (ch && ch !== "\n") ch = src[offset -= 1]; + return offset + 1; + } + /** + * End of indentation, or null if the line's indent level is not more + * than `indent` + * + * @param {string} src + * @param {number} indent + * @param {number} lineStart + * @returns {?number} + */ + static endOfBlockIndent(src, indent, lineStart) { + const inEnd = _Node.endOfIndent(src, lineStart); + if (inEnd > lineStart + indent) { + return inEnd; + } else { + const wsEnd = _Node.endOfWhiteSpace(src, inEnd); + const ch = src[wsEnd]; + if (!ch || ch === "\n") return wsEnd; + } + return null; + } + static atBlank(src, offset, endAsBlank) { + const ch = src[offset]; + return ch === "\n" || ch === " " || ch === " " || endAsBlank && !ch; + } + static nextNodeIsIndented(ch, indentDiff, indicatorAsIndent) { + if (!ch || indentDiff < 0) return false; + if (indentDiff > 0) return true; + return indicatorAsIndent && ch === "-"; + } + // should be at line or string end, or at next non-whitespace char + static normalizeOffset(src, offset) { + const ch = src[offset]; + return !ch ? offset : ch !== "\n" && src[offset - 1] === "\n" ? offset - 1 : _Node.endOfWhiteSpace(src, offset); + } + // fold single newline into space, multiple newlines to N - 1 newlines + // presumes src[offset] === '\n' + static foldNewline(src, offset, indent) { + let inCount = 0; + let error = false; + let fold = ""; + let ch = src[offset + 1]; + while (ch === " " || ch === " " || ch === "\n") { + switch (ch) { + case "\n": + inCount = 0; + offset += 1; + fold += "\n"; + break; + case " ": + if (inCount <= indent) error = true; + offset = _Node.endOfWhiteSpace(src, offset + 2) - 1; + break; + case " ": + inCount += 1; + offset += 1; + break; + } + ch = src[offset + 1]; + } + if (!fold) fold = " "; + if (ch && inCount <= indent) error = true; + return { + fold, + offset, + error + }; + } + constructor(type, props, context) { + Object.defineProperty(this, "context", { + value: context || null, + writable: true + }); + this.error = null; + this.range = null; + this.valueRange = null; + this.props = props || []; + this.type = type; + this.value = null; + } + getPropValue(idx, key, skipKey) { + if (!this.context) return null; + const { + src + } = this.context; + const prop = this.props[idx]; + return prop && src[prop.start] === key ? src.slice(prop.start + (skipKey ? 1 : 0), prop.end) : null; + } + get anchor() { + for (let i = 0; i < this.props.length; ++i) { + const anchor = this.getPropValue(i, Char.ANCHOR, true); + if (anchor != null) return anchor; + } + return null; + } + get comment() { + const comments = []; + for (let i = 0; i < this.props.length; ++i) { + const comment = this.getPropValue(i, Char.COMMENT, true); + if (comment != null) comments.push(comment); + } + return comments.length > 0 ? comments.join("\n") : null; + } + commentHasRequiredWhitespace(start) { + const { + src + } = this.context; + if (this.header && start === this.header.end) return false; + if (!this.valueRange) return false; + const { + end + } = this.valueRange; + return start !== end || _Node.atBlank(src, end - 1); + } + get hasComment() { + if (this.context) { + const { + src + } = this.context; + for (let i = 0; i < this.props.length; ++i) { + if (src[this.props[i].start] === Char.COMMENT) return true; + } + } + return false; + } + get hasProps() { + if (this.context) { + const { + src + } = this.context; + for (let i = 0; i < this.props.length; ++i) { + if (src[this.props[i].start] !== Char.COMMENT) return true; + } + } + return false; + } + get includesTrailingLines() { + return false; + } + get jsonLike() { + const jsonLikeTypes = [Type.FLOW_MAP, Type.FLOW_SEQ, Type.QUOTE_DOUBLE, Type.QUOTE_SINGLE]; + return jsonLikeTypes.indexOf(this.type) !== -1; + } + get rangeAsLinePos() { + if (!this.range || !this.context) return void 0; + const start = getLinePos(this.range.start, this.context.root); + if (!start) return void 0; + const end = getLinePos(this.range.end, this.context.root); + return { + start, + end + }; + } + get rawValue() { + if (!this.valueRange || !this.context) return null; + const { + start, + end + } = this.valueRange; + return this.context.src.slice(start, end); + } + get tag() { + for (let i = 0; i < this.props.length; ++i) { + const tag = this.getPropValue(i, Char.TAG, false); + if (tag != null) { + if (tag[1] === "<") { + return { + verbatim: tag.slice(2, -1) + }; + } else { + const [_2, handle, suffix] = tag.match(/^(.*!)([^!]*)$/); + return { + handle, + suffix + }; + } + } + } + return null; + } + get valueRangeContainsNewline() { + if (!this.valueRange || !this.context) return false; + const { + start, + end + } = this.valueRange; + const { + src + } = this.context; + for (let i = start; i < end; ++i) { + if (src[i] === "\n") return true; + } + return false; + } + parseComment(start) { + const { + src + } = this.context; + if (src[start] === Char.COMMENT) { + const end = _Node.endOfLine(src, start + 1); + const commentRange = new Range(start, end); + this.props.push(commentRange); + return end; + } + return start; + } + /** + * Populates the `origStart` and `origEnd` values of all ranges for this + * node. Extended by child classes to handle descendant nodes. + * + * @param {number[]} cr - Positions of dropped CR characters + * @param {number} offset - Starting index of `cr` from the last call + * @returns {number} - The next offset, matching the one found for `origStart` + */ + setOrigRanges(cr, offset) { + if (this.range) offset = this.range.setOrigRange(cr, offset); + if (this.valueRange) this.valueRange.setOrigRange(cr, offset); + this.props.forEach((prop) => prop.setOrigRange(cr, offset)); + return offset; + } + toString() { + const { + context: { + src + }, + range, + value + } = this; + if (value != null) return value; + const str = src.slice(range.start, range.end); + return _Node.addStringTerminator(src, range.end, str); + } + }; + var YAMLError = class extends Error { + constructor(name, source, message) { + if (!message || !(source instanceof Node)) throw new Error(`Invalid arguments for new ${name}`); + super(); + this.name = name; + this.message = message; + this.source = source; + } + makePretty() { + if (!this.source) return; + this.nodeType = this.source.type; + const cst = this.source.context && this.source.context.root; + if (typeof this.offset === "number") { + this.range = new Range(this.offset, this.offset + 1); + const start = cst && getLinePos(this.offset, cst); + if (start) { + const end = { + line: start.line, + col: start.col + 1 + }; + this.linePos = { + start, + end + }; + } + delete this.offset; + } else { + this.range = this.source.range; + this.linePos = this.source.rangeAsLinePos; + } + if (this.linePos) { + const { + line, + col + } = this.linePos.start; + this.message += ` at line ${line}, column ${col}`; + const ctx = cst && getPrettyContext(this.linePos, cst); + if (ctx) this.message += `: + +${ctx} +`; + } + delete this.source; + } + }; + var YAMLReferenceError = class extends YAMLError { + constructor(source, message) { + super("YAMLReferenceError", source, message); + } + }; + var YAMLSemanticError = class extends YAMLError { + constructor(source, message) { + super("YAMLSemanticError", source, message); + } + }; + var YAMLSyntaxError = class extends YAMLError { + constructor(source, message) { + super("YAMLSyntaxError", source, message); + } + }; + var YAMLWarning = class extends YAMLError { + constructor(source, message) { + super("YAMLWarning", source, message); + } + }; + function _defineProperty(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { + value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + return obj; + } + var PlainValue = class _PlainValue extends Node { + static endOfLine(src, start, inFlow) { + let ch = src[start]; + let offset = start; + while (ch && ch !== "\n") { + if (inFlow && (ch === "[" || ch === "]" || ch === "{" || ch === "}" || ch === ",")) break; + const next = src[offset + 1]; + if (ch === ":" && (!next || next === "\n" || next === " " || next === " " || inFlow && next === ",")) break; + if ((ch === " " || ch === " ") && next === "#") break; + offset += 1; + ch = next; + } + return offset; + } + get strValue() { + if (!this.valueRange || !this.context) return null; + let { + start, + end + } = this.valueRange; + const { + src + } = this.context; + let ch = src[end - 1]; + while (start < end && (ch === "\n" || ch === " " || ch === " ")) ch = src[--end - 1]; + let str = ""; + for (let i = start; i < end; ++i) { + const ch2 = src[i]; + if (ch2 === "\n") { + const { + fold, + offset + } = Node.foldNewline(src, i, -1); + str += fold; + i = offset; + } else if (ch2 === " " || ch2 === " ") { + const wsStart = i; + let next = src[i + 1]; + while (i < end && (next === " " || next === " ")) { + i += 1; + next = src[i + 1]; + } + if (next !== "\n") str += i > wsStart ? src.slice(wsStart, i + 1) : ch2; + } else { + str += ch2; + } + } + const ch0 = src[start]; + switch (ch0) { + case " ": { + const msg = "Plain value cannot start with a tab character"; + const errors = [new YAMLSemanticError(this, msg)]; + return { + errors, + str + }; + } + case "@": + case "`": { + const msg = `Plain value cannot start with reserved character ${ch0}`; + const errors = [new YAMLSemanticError(this, msg)]; + return { + errors, + str + }; + } + default: + return str; + } + } + parseBlockValue(start) { + const { + indent, + inFlow, + src + } = this.context; + let offset = start; + let valueEnd = start; + for (let ch = src[offset]; ch === "\n"; ch = src[offset]) { + if (Node.atDocumentBoundary(src, offset + 1)) break; + const end = Node.endOfBlockIndent(src, indent, offset + 1); + if (end === null || src[end] === "#") break; + if (src[end] === "\n") { + offset = end; + } else { + valueEnd = _PlainValue.endOfLine(src, end, inFlow); + offset = valueEnd; + } + } + if (this.valueRange.isEmpty()) this.valueRange.start = start; + this.valueRange.end = valueEnd; + return valueEnd; + } + /** + * Parses a plain value from the source + * + * Accepted forms are: + * ``` + * #comment + * + * first line + * + * first line #comment + * + * first line + * block + * lines + * + * #comment + * block + * lines + * ``` + * where block lines are empty or have an indent level greater than `indent`. + * + * @param {ParseContext} context + * @param {number} start - Index of first character + * @returns {number} - Index of the character after this scalar, may be `\n` + */ + parse(context, start) { + this.context = context; + const { + inFlow, + src + } = context; + let offset = start; + const ch = src[offset]; + if (ch && ch !== "#" && ch !== "\n") { + offset = _PlainValue.endOfLine(src, start, inFlow); + } + this.valueRange = new Range(start, offset); + offset = Node.endOfWhiteSpace(src, offset); + offset = this.parseComment(offset); + if (!this.hasComment || this.valueRange.isEmpty()) { + offset = this.parseBlockValue(offset); + } + return offset; + } + }; + exports2.Char = Char; + exports2.Node = Node; + exports2.PlainValue = PlainValue; + exports2.Range = Range; + exports2.Type = Type; + exports2.YAMLError = YAMLError; + exports2.YAMLReferenceError = YAMLReferenceError; + exports2.YAMLSemanticError = YAMLSemanticError; + exports2.YAMLSyntaxError = YAMLSyntaxError; + exports2.YAMLWarning = YAMLWarning; + exports2._defineProperty = _defineProperty; + exports2.defaultTagPrefix = defaultTagPrefix; + exports2.defaultTags = defaultTags; + } +}); + +// ../../node_modules/openapi-to-postmanv2/node_modules/yaml/dist/parse-cst.js +var require_parse_cst2 = __commonJS({ + "../../node_modules/openapi-to-postmanv2/node_modules/yaml/dist/parse-cst.js"(exports2) { + "use strict"; + var PlainValue = require_PlainValue_ec8e588e2(); + var BlankLine = class extends PlainValue.Node { + constructor() { + super(PlainValue.Type.BLANK_LINE); + } + /* istanbul ignore next */ + get includesTrailingLines() { + return true; + } + /** + * Parses a blank line from the source + * + * @param {ParseContext} context + * @param {number} start - Index of first \n character + * @returns {number} - Index of the character after this + */ + parse(context, start) { + this.context = context; + this.range = new PlainValue.Range(start, start + 1); + return start + 1; + } + }; + var CollectionItem = class extends PlainValue.Node { + constructor(type, props) { + super(type, props); + this.node = null; + } + get includesTrailingLines() { + return !!this.node && this.node.includesTrailingLines; + } + /** + * @param {ParseContext} context + * @param {number} start - Index of first character + * @returns {number} - Index of the character after this + */ + parse(context, start) { + this.context = context; + const { + parseNode, + src + } = context; + let { + atLineStart, + lineStart + } = context; + if (!atLineStart && this.type === PlainValue.Type.SEQ_ITEM) this.error = new PlainValue.YAMLSemanticError(this, "Sequence items must not have preceding content on the same line"); + const indent = atLineStart ? start - lineStart : context.indent; + let offset = PlainValue.Node.endOfWhiteSpace(src, start + 1); + let ch = src[offset]; + const inlineComment = ch === "#"; + const comments = []; + let blankLine = null; + while (ch === "\n" || ch === "#") { + if (ch === "#") { + const end2 = PlainValue.Node.endOfLine(src, offset + 1); + comments.push(new PlainValue.Range(offset, end2)); + offset = end2; + } else { + atLineStart = true; + lineStart = offset + 1; + const wsEnd = PlainValue.Node.endOfWhiteSpace(src, lineStart); + if (src[wsEnd] === "\n" && comments.length === 0) { + blankLine = new BlankLine(); + lineStart = blankLine.parse({ + src + }, lineStart); + } + offset = PlainValue.Node.endOfIndent(src, lineStart); + } + ch = src[offset]; + } + if (PlainValue.Node.nextNodeIsIndented(ch, offset - (lineStart + indent), this.type !== PlainValue.Type.SEQ_ITEM)) { + this.node = parseNode({ + atLineStart, + inCollection: false, + indent, + lineStart, + parent: this + }, offset); + } else if (ch && lineStart > start + 1) { + offset = lineStart - 1; + } + if (this.node) { + if (blankLine) { + const items = context.parent.items || context.parent.contents; + if (items) items.push(blankLine); + } + if (comments.length) Array.prototype.push.apply(this.props, comments); + offset = this.node.range.end; + } else { + if (inlineComment) { + const c = comments[0]; + this.props.push(c); + offset = c.end; + } else { + offset = PlainValue.Node.endOfLine(src, start + 1); + } + } + const end = this.node ? this.node.valueRange.end : offset; + this.valueRange = new PlainValue.Range(start, end); + return offset; + } + setOrigRanges(cr, offset) { + offset = super.setOrigRanges(cr, offset); + return this.node ? this.node.setOrigRanges(cr, offset) : offset; + } + toString() { + const { + context: { + src + }, + node, + range, + value + } = this; + if (value != null) return value; + const str = node ? src.slice(range.start, node.range.start) + String(node) : src.slice(range.start, range.end); + return PlainValue.Node.addStringTerminator(src, range.end, str); + } + }; + var Comment = class extends PlainValue.Node { + constructor() { + super(PlainValue.Type.COMMENT); + } + /** + * Parses a comment line from the source + * + * @param {ParseContext} context + * @param {number} start - Index of first character + * @returns {number} - Index of the character after this scalar + */ + parse(context, start) { + this.context = context; + const offset = this.parseComment(start); + this.range = new PlainValue.Range(start, offset); + return offset; + } + }; + function grabCollectionEndComments(node) { + let cnode = node; + while (cnode instanceof CollectionItem) cnode = cnode.node; + if (!(cnode instanceof Collection)) return null; + const len = cnode.items.length; + let ci = -1; + for (let i = len - 1; i >= 0; --i) { + const n = cnode.items[i]; + if (n.type === PlainValue.Type.COMMENT) { + const { + indent, + lineStart + } = n.context; + if (indent > 0 && n.range.start >= lineStart + indent) break; + ci = i; + } else if (n.type === PlainValue.Type.BLANK_LINE) ci = i; + else break; + } + if (ci === -1) return null; + const ca = cnode.items.splice(ci, len - ci); + const prevEnd = ca[0].range.start; + while (true) { + cnode.range.end = prevEnd; + if (cnode.valueRange && cnode.valueRange.end > prevEnd) cnode.valueRange.end = prevEnd; + if (cnode === node) break; + cnode = cnode.context.parent; + } + return ca; + } + var Collection = class _Collection extends PlainValue.Node { + static nextContentHasIndent(src, offset, indent) { + const lineStart = PlainValue.Node.endOfLine(src, offset) + 1; + offset = PlainValue.Node.endOfWhiteSpace(src, lineStart); + const ch = src[offset]; + if (!ch) return false; + if (offset >= lineStart + indent) return true; + if (ch !== "#" && ch !== "\n") return false; + return _Collection.nextContentHasIndent(src, offset, indent); + } + constructor(firstItem) { + super(firstItem.type === PlainValue.Type.SEQ_ITEM ? PlainValue.Type.SEQ : PlainValue.Type.MAP); + for (let i = firstItem.props.length - 1; i >= 0; --i) { + if (firstItem.props[i].start < firstItem.context.lineStart) { + this.props = firstItem.props.slice(0, i + 1); + firstItem.props = firstItem.props.slice(i + 1); + const itemRange = firstItem.props[0] || firstItem.valueRange; + firstItem.range.start = itemRange.start; + break; + } + } + this.items = [firstItem]; + const ec = grabCollectionEndComments(firstItem); + if (ec) Array.prototype.push.apply(this.items, ec); + } + get includesTrailingLines() { + return this.items.length > 0; + } + /** + * @param {ParseContext} context + * @param {number} start - Index of first character + * @returns {number} - Index of the character after this + */ + parse(context, start) { + this.context = context; + const { + parseNode, + src + } = context; + let lineStart = PlainValue.Node.startOfLine(src, start); + const firstItem = this.items[0]; + firstItem.context.parent = this; + this.valueRange = PlainValue.Range.copy(firstItem.valueRange); + const indent = firstItem.range.start - firstItem.context.lineStart; + let offset = start; + offset = PlainValue.Node.normalizeOffset(src, offset); + let ch = src[offset]; + let atLineStart = PlainValue.Node.endOfWhiteSpace(src, lineStart) === offset; + let prevIncludesTrailingLines = false; + while (ch) { + while (ch === "\n" || ch === "#") { + if (atLineStart && ch === "\n" && !prevIncludesTrailingLines) { + const blankLine = new BlankLine(); + offset = blankLine.parse({ + src + }, offset); + this.valueRange.end = offset; + if (offset >= src.length) { + ch = null; + break; + } + this.items.push(blankLine); + offset -= 1; + } else if (ch === "#") { + if (offset < lineStart + indent && !_Collection.nextContentHasIndent(src, offset, indent)) { + return offset; + } + const comment = new Comment(); + offset = comment.parse({ + indent, + lineStart, + src + }, offset); + this.items.push(comment); + this.valueRange.end = offset; + if (offset >= src.length) { + ch = null; + break; + } + } + lineStart = offset + 1; + offset = PlainValue.Node.endOfIndent(src, lineStart); + if (PlainValue.Node.atBlank(src, offset)) { + const wsEnd = PlainValue.Node.endOfWhiteSpace(src, offset); + const next = src[wsEnd]; + if (!next || next === "\n" || next === "#") { + offset = wsEnd; + } + } + ch = src[offset]; + atLineStart = true; + } + if (!ch) { + break; + } + if (offset !== lineStart + indent && (atLineStart || ch !== ":")) { + if (offset < lineStart + indent) { + if (lineStart > start) offset = lineStart; + break; + } else if (!this.error) { + const msg = "All collection items must start at the same column"; + this.error = new PlainValue.YAMLSyntaxError(this, msg); + } + } + if (firstItem.type === PlainValue.Type.SEQ_ITEM) { + if (ch !== "-") { + if (lineStart > start) offset = lineStart; + break; + } + } else if (ch === "-" && !this.error) { + const next = src[offset + 1]; + if (!next || next === "\n" || next === " " || next === " ") { + const msg = "A collection cannot be both a mapping and a sequence"; + this.error = new PlainValue.YAMLSyntaxError(this, msg); + } + } + const node = parseNode({ + atLineStart, + inCollection: true, + indent, + lineStart, + parent: this + }, offset); + if (!node) return offset; + this.items.push(node); + this.valueRange.end = node.valueRange.end; + offset = PlainValue.Node.normalizeOffset(src, node.range.end); + ch = src[offset]; + atLineStart = false; + prevIncludesTrailingLines = node.includesTrailingLines; + if (ch) { + let ls = offset - 1; + let prev = src[ls]; + while (prev === " " || prev === " ") prev = src[--ls]; + if (prev === "\n") { + lineStart = ls + 1; + atLineStart = true; + } + } + const ec = grabCollectionEndComments(node); + if (ec) Array.prototype.push.apply(this.items, ec); + } + return offset; + } + setOrigRanges(cr, offset) { + offset = super.setOrigRanges(cr, offset); + this.items.forEach((node) => { + offset = node.setOrigRanges(cr, offset); + }); + return offset; + } + toString() { + const { + context: { + src + }, + items, + range, + value + } = this; + if (value != null) return value; + let str = src.slice(range.start, items[0].range.start) + String(items[0]); + for (let i = 1; i < items.length; ++i) { + const item = items[i]; + const { + atLineStart, + indent + } = item.context; + if (atLineStart) for (let i2 = 0; i2 < indent; ++i2) str += " "; + str += String(item); + } + return PlainValue.Node.addStringTerminator(src, range.end, str); + } + }; + var Directive = class extends PlainValue.Node { + constructor() { + super(PlainValue.Type.DIRECTIVE); + this.name = null; + } + get parameters() { + const raw = this.rawValue; + return raw ? raw.trim().split(/[ \t]+/) : []; + } + parseName(start) { + const { + src + } = this.context; + let offset = start; + let ch = src[offset]; + while (ch && ch !== "\n" && ch !== " " && ch !== " ") ch = src[offset += 1]; + this.name = src.slice(start, offset); + return offset; + } + parseParameters(start) { + const { + src + } = this.context; + let offset = start; + let ch = src[offset]; + while (ch && ch !== "\n" && ch !== "#") ch = src[offset += 1]; + this.valueRange = new PlainValue.Range(start, offset); + return offset; + } + parse(context, start) { + this.context = context; + let offset = this.parseName(start + 1); + offset = this.parseParameters(offset); + offset = this.parseComment(offset); + this.range = new PlainValue.Range(start, offset); + return offset; + } + }; + var Document = class _Document extends PlainValue.Node { + static startCommentOrEndBlankLine(src, start) { + const offset = PlainValue.Node.endOfWhiteSpace(src, start); + const ch = src[offset]; + return ch === "#" || ch === "\n" ? offset : start; + } + constructor() { + super(PlainValue.Type.DOCUMENT); + this.directives = null; + this.contents = null; + this.directivesEndMarker = null; + this.documentEndMarker = null; + } + parseDirectives(start) { + const { + src + } = this.context; + this.directives = []; + let atLineStart = true; + let hasDirectives = false; + let offset = start; + while (!PlainValue.Node.atDocumentBoundary(src, offset, PlainValue.Char.DIRECTIVES_END)) { + offset = _Document.startCommentOrEndBlankLine(src, offset); + switch (src[offset]) { + case "\n": + if (atLineStart) { + const blankLine = new BlankLine(); + offset = blankLine.parse({ + src + }, offset); + if (offset < src.length) { + this.directives.push(blankLine); + } + } else { + offset += 1; + atLineStart = true; + } + break; + case "#": + { + const comment = new Comment(); + offset = comment.parse({ + src + }, offset); + this.directives.push(comment); + atLineStart = false; + } + break; + case "%": + { + const directive = new Directive(); + offset = directive.parse({ + parent: this, + src + }, offset); + this.directives.push(directive); + hasDirectives = true; + atLineStart = false; + } + break; + default: + if (hasDirectives) { + this.error = new PlainValue.YAMLSemanticError(this, "Missing directives-end indicator line"); + } else if (this.directives.length > 0) { + this.contents = this.directives; + this.directives = []; + } + return offset; + } + } + if (src[offset]) { + this.directivesEndMarker = new PlainValue.Range(offset, offset + 3); + return offset + 3; + } + if (hasDirectives) { + this.error = new PlainValue.YAMLSemanticError(this, "Missing directives-end indicator line"); + } else if (this.directives.length > 0) { + this.contents = this.directives; + this.directives = []; + } + return offset; + } + parseContents(start) { + const { + parseNode, + src + } = this.context; + if (!this.contents) this.contents = []; + let lineStart = start; + while (src[lineStart - 1] === "-") lineStart -= 1; + let offset = PlainValue.Node.endOfWhiteSpace(src, start); + let atLineStart = lineStart === start; + this.valueRange = new PlainValue.Range(offset); + while (!PlainValue.Node.atDocumentBoundary(src, offset, PlainValue.Char.DOCUMENT_END)) { + switch (src[offset]) { + case "\n": + if (atLineStart) { + const blankLine = new BlankLine(); + offset = blankLine.parse({ + src + }, offset); + if (offset < src.length) { + this.contents.push(blankLine); + } + } else { + offset += 1; + atLineStart = true; + } + lineStart = offset; + break; + case "#": + { + const comment = new Comment(); + offset = comment.parse({ + src + }, offset); + this.contents.push(comment); + atLineStart = false; + } + break; + default: { + const iEnd = PlainValue.Node.endOfIndent(src, offset); + const context = { + atLineStart, + indent: -1, + inFlow: false, + inCollection: false, + lineStart, + parent: this + }; + const node = parseNode(context, iEnd); + if (!node) return this.valueRange.end = iEnd; + this.contents.push(node); + offset = node.range.end; + atLineStart = false; + const ec = grabCollectionEndComments(node); + if (ec) Array.prototype.push.apply(this.contents, ec); + } + } + offset = _Document.startCommentOrEndBlankLine(src, offset); + } + this.valueRange.end = offset; + if (src[offset]) { + this.documentEndMarker = new PlainValue.Range(offset, offset + 3); + offset += 3; + if (src[offset]) { + offset = PlainValue.Node.endOfWhiteSpace(src, offset); + if (src[offset] === "#") { + const comment = new Comment(); + offset = comment.parse({ + src + }, offset); + this.contents.push(comment); + } + switch (src[offset]) { + case "\n": + offset += 1; + break; + case void 0: + break; + default: + this.error = new PlainValue.YAMLSyntaxError(this, "Document end marker line cannot have a non-comment suffix"); + } + } + } + return offset; + } + /** + * @param {ParseContext} context + * @param {number} start - Index of first character + * @returns {number} - Index of the character after this + */ + parse(context, start) { + context.root = this; + this.context = context; + const { + src + } = context; + let offset = src.charCodeAt(start) === 65279 ? start + 1 : start; + offset = this.parseDirectives(offset); + offset = this.parseContents(offset); + return offset; + } + setOrigRanges(cr, offset) { + offset = super.setOrigRanges(cr, offset); + this.directives.forEach((node) => { + offset = node.setOrigRanges(cr, offset); + }); + if (this.directivesEndMarker) offset = this.directivesEndMarker.setOrigRange(cr, offset); + this.contents.forEach((node) => { + offset = node.setOrigRanges(cr, offset); + }); + if (this.documentEndMarker) offset = this.documentEndMarker.setOrigRange(cr, offset); + return offset; + } + toString() { + const { + contents, + directives, + value + } = this; + if (value != null) return value; + let str = directives.join(""); + if (contents.length > 0) { + if (directives.length > 0 || contents[0].type === PlainValue.Type.COMMENT) str += "---\n"; + str += contents.join(""); + } + if (str[str.length - 1] !== "\n") str += "\n"; + return str; + } + }; + var Alias = class extends PlainValue.Node { + /** + * Parses an *alias from the source + * + * @param {ParseContext} context + * @param {number} start - Index of first character + * @returns {number} - Index of the character after this scalar + */ + parse(context, start) { + this.context = context; + const { + src + } = context; + let offset = PlainValue.Node.endOfIdentifier(src, start + 1); + this.valueRange = new PlainValue.Range(start + 1, offset); + offset = PlainValue.Node.endOfWhiteSpace(src, offset); + offset = this.parseComment(offset); + return offset; + } + }; + var Chomp = { + CLIP: "CLIP", + KEEP: "KEEP", + STRIP: "STRIP" + }; + var BlockValue = class extends PlainValue.Node { + constructor(type, props) { + super(type, props); + this.blockIndent = null; + this.chomping = Chomp.CLIP; + this.header = null; + } + get includesTrailingLines() { + return this.chomping === Chomp.KEEP; + } + get strValue() { + if (!this.valueRange || !this.context) return null; + let { + start, + end + } = this.valueRange; + const { + indent, + src + } = this.context; + if (this.valueRange.isEmpty()) return ""; + let lastNewLine = null; + let ch = src[end - 1]; + while (ch === "\n" || ch === " " || ch === " ") { + end -= 1; + if (end <= start) { + if (this.chomping === Chomp.KEEP) break; + else return ""; + } + if (ch === "\n") lastNewLine = end; + ch = src[end - 1]; + } + let keepStart = end + 1; + if (lastNewLine) { + if (this.chomping === Chomp.KEEP) { + keepStart = lastNewLine; + end = this.valueRange.end; + } else { + end = lastNewLine; + } + } + const bi = indent + this.blockIndent; + const folded = this.type === PlainValue.Type.BLOCK_FOLDED; + let atStart = true; + let str = ""; + let sep = ""; + let prevMoreIndented = false; + for (let i = start; i < end; ++i) { + for (let j = 0; j < bi; ++j) { + if (src[i] !== " ") break; + i += 1; + } + const ch2 = src[i]; + if (ch2 === "\n") { + if (sep === "\n") str += "\n"; + else sep = "\n"; + } else { + const lineEnd = PlainValue.Node.endOfLine(src, i); + const line = src.slice(i, lineEnd); + i = lineEnd; + if (folded && (ch2 === " " || ch2 === " ") && i < keepStart) { + if (sep === " ") sep = "\n"; + else if (!prevMoreIndented && !atStart && sep === "\n") sep = "\n\n"; + str += sep + line; + sep = lineEnd < end && src[lineEnd] || ""; + prevMoreIndented = true; + } else { + str += sep + line; + sep = folded && i < keepStart ? " " : "\n"; + prevMoreIndented = false; + } + if (atStart && line !== "") atStart = false; + } + } + return this.chomping === Chomp.STRIP ? str : str + "\n"; + } + parseBlockHeader(start) { + const { + src + } = this.context; + let offset = start + 1; + let bi = ""; + while (true) { + const ch = src[offset]; + switch (ch) { + case "-": + this.chomping = Chomp.STRIP; + break; + case "+": + this.chomping = Chomp.KEEP; + break; + case "0": + case "1": + case "2": + case "3": + case "4": + case "5": + case "6": + case "7": + case "8": + case "9": + bi += ch; + break; + default: + this.blockIndent = Number(bi) || null; + this.header = new PlainValue.Range(start, offset); + return offset; + } + offset += 1; + } + } + parseBlockValue(start) { + const { + indent, + src + } = this.context; + const explicit = !!this.blockIndent; + let offset = start; + let valueEnd = start; + let minBlockIndent = 1; + for (let ch = src[offset]; ch === "\n"; ch = src[offset]) { + offset += 1; + if (PlainValue.Node.atDocumentBoundary(src, offset)) break; + const end = PlainValue.Node.endOfBlockIndent(src, indent, offset); + if (end === null) break; + const ch2 = src[end]; + const lineIndent = end - (offset + indent); + if (!this.blockIndent) { + if (src[end] !== "\n") { + if (lineIndent < minBlockIndent) { + const msg = "Block scalars with more-indented leading empty lines must use an explicit indentation indicator"; + this.error = new PlainValue.YAMLSemanticError(this, msg); + } + this.blockIndent = lineIndent; + } else if (lineIndent > minBlockIndent) { + minBlockIndent = lineIndent; + } + } else if (ch2 && ch2 !== "\n" && lineIndent < this.blockIndent) { + if (src[end] === "#") break; + if (!this.error) { + const src2 = explicit ? "explicit indentation indicator" : "first line"; + const msg = `Block scalars must not be less indented than their ${src2}`; + this.error = new PlainValue.YAMLSemanticError(this, msg); + } + } + if (src[end] === "\n") { + offset = end; + } else { + offset = valueEnd = PlainValue.Node.endOfLine(src, end); + } + } + if (this.chomping !== Chomp.KEEP) { + offset = src[valueEnd] ? valueEnd + 1 : valueEnd; + } + this.valueRange = new PlainValue.Range(start + 1, offset); + return offset; + } + /** + * Parses a block value from the source + * + * Accepted forms are: + * ``` + * BS + * block + * lines + * + * BS #comment + * block + * lines + * ``` + * where the block style BS matches the regexp `[|>][-+1-9]*` and block lines + * are empty or have an indent level greater than `indent`. + * + * @param {ParseContext} context + * @param {number} start - Index of first character + * @returns {number} - Index of the character after this block + */ + parse(context, start) { + this.context = context; + const { + src + } = context; + let offset = this.parseBlockHeader(start); + offset = PlainValue.Node.endOfWhiteSpace(src, offset); + offset = this.parseComment(offset); + offset = this.parseBlockValue(offset); + return offset; + } + setOrigRanges(cr, offset) { + offset = super.setOrigRanges(cr, offset); + return this.header ? this.header.setOrigRange(cr, offset) : offset; + } + }; + var FlowCollection = class extends PlainValue.Node { + constructor(type, props) { + super(type, props); + this.items = null; + } + prevNodeIsJsonLike(idx = this.items.length) { + const node = this.items[idx - 1]; + return !!node && (node.jsonLike || node.type === PlainValue.Type.COMMENT && this.prevNodeIsJsonLike(idx - 1)); + } + /** + * @param {ParseContext} context + * @param {number} start - Index of first character + * @returns {number} - Index of the character after this + */ + parse(context, start) { + this.context = context; + const { + parseNode, + src + } = context; + let { + indent, + lineStart + } = context; + let char = src[start]; + this.items = [{ + char, + offset: start + }]; + let offset = PlainValue.Node.endOfWhiteSpace(src, start + 1); + char = src[offset]; + while (char && char !== "]" && char !== "}") { + switch (char) { + case "\n": + { + lineStart = offset + 1; + const wsEnd = PlainValue.Node.endOfWhiteSpace(src, lineStart); + if (src[wsEnd] === "\n") { + const blankLine = new BlankLine(); + lineStart = blankLine.parse({ + src + }, lineStart); + this.items.push(blankLine); + } + offset = PlainValue.Node.endOfIndent(src, lineStart); + if (offset <= lineStart + indent) { + char = src[offset]; + if (offset < lineStart + indent || char !== "]" && char !== "}") { + const msg = "Insufficient indentation in flow collection"; + this.error = new PlainValue.YAMLSemanticError(this, msg); + } + } + } + break; + case ",": + { + this.items.push({ + char, + offset + }); + offset += 1; + } + break; + case "#": + { + const comment = new Comment(); + offset = comment.parse({ + src + }, offset); + this.items.push(comment); + } + break; + case "?": + case ":": { + const next = src[offset + 1]; + if (next === "\n" || next === " " || next === " " || next === "," || // in-flow : after JSON-like key does not need to be followed by whitespace + char === ":" && this.prevNodeIsJsonLike()) { + this.items.push({ + char, + offset + }); + offset += 1; + break; + } + } + default: { + const node = parseNode({ + atLineStart: false, + inCollection: false, + inFlow: true, + indent: -1, + lineStart, + parent: this + }, offset); + if (!node) { + this.valueRange = new PlainValue.Range(start, offset); + return offset; + } + this.items.push(node); + offset = PlainValue.Node.normalizeOffset(src, node.range.end); + } + } + offset = PlainValue.Node.endOfWhiteSpace(src, offset); + char = src[offset]; + } + this.valueRange = new PlainValue.Range(start, offset + 1); + if (char) { + this.items.push({ + char, + offset + }); + offset = PlainValue.Node.endOfWhiteSpace(src, offset + 1); + offset = this.parseComment(offset); + } + return offset; + } + setOrigRanges(cr, offset) { + offset = super.setOrigRanges(cr, offset); + this.items.forEach((node) => { + if (node instanceof PlainValue.Node) { + offset = node.setOrigRanges(cr, offset); + } else if (cr.length === 0) { + node.origOffset = node.offset; + } else { + let i = offset; + while (i < cr.length) { + if (cr[i] > node.offset) break; + else ++i; + } + node.origOffset = node.offset + i; + offset = i; + } + }); + return offset; + } + toString() { + const { + context: { + src + }, + items, + range, + value + } = this; + if (value != null) return value; + const nodes = items.filter((item) => item instanceof PlainValue.Node); + let str = ""; + let prevEnd = range.start; + nodes.forEach((node) => { + const prefix = src.slice(prevEnd, node.range.start); + prevEnd = node.range.end; + str += prefix + String(node); + if (str[str.length - 1] === "\n" && src[prevEnd - 1] !== "\n" && src[prevEnd] === "\n") { + prevEnd += 1; + } + }); + str += src.slice(prevEnd, range.end); + return PlainValue.Node.addStringTerminator(src, range.end, str); + } + }; + var QuoteDouble = class _QuoteDouble extends PlainValue.Node { + static endOfQuote(src, offset) { + let ch = src[offset]; + while (ch && ch !== '"') { + offset += ch === "\\" ? 2 : 1; + ch = src[offset]; + } + return offset + 1; + } + /** + * @returns {string | { str: string, errors: YAMLSyntaxError[] }} + */ + get strValue() { + if (!this.valueRange || !this.context) return null; + const errors = []; + const { + start, + end + } = this.valueRange; + const { + indent, + src + } = this.context; + if (src[end - 1] !== '"') errors.push(new PlainValue.YAMLSyntaxError(this, 'Missing closing "quote')); + let str = ""; + for (let i = start + 1; i < end - 1; ++i) { + const ch = src[i]; + if (ch === "\n") { + if (PlainValue.Node.atDocumentBoundary(src, i + 1)) errors.push(new PlainValue.YAMLSemanticError(this, "Document boundary indicators are not allowed within string values")); + const { + fold, + offset, + error + } = PlainValue.Node.foldNewline(src, i, indent); + str += fold; + i = offset; + if (error) errors.push(new PlainValue.YAMLSemanticError(this, "Multi-line double-quoted string needs to be sufficiently indented")); + } else if (ch === "\\") { + i += 1; + switch (src[i]) { + case "0": + str += "\0"; + break; + case "a": + str += "\x07"; + break; + case "b": + str += "\b"; + break; + case "e": + str += "\x1B"; + break; + case "f": + str += "\f"; + break; + case "n": + str += "\n"; + break; + case "r": + str += "\r"; + break; + case "t": + str += " "; + break; + case "v": + str += "\v"; + break; + case "N": + str += "\x85"; + break; + case "_": + str += "\xA0"; + break; + case "L": + str += "\u2028"; + break; + case "P": + str += "\u2029"; + break; + case " ": + str += " "; + break; + case '"': + str += '"'; + break; + case "/": + str += "/"; + break; + case "\\": + str += "\\"; + break; + case " ": + str += " "; + break; + case "x": + str += this.parseCharCode(i + 1, 2, errors); + i += 2; + break; + case "u": + str += this.parseCharCode(i + 1, 4, errors); + i += 4; + break; + case "U": + str += this.parseCharCode(i + 1, 8, errors); + i += 8; + break; + case "\n": + while (src[i + 1] === " " || src[i + 1] === " ") i += 1; + break; + default: + errors.push(new PlainValue.YAMLSyntaxError(this, `Invalid escape sequence ${src.substr(i - 1, 2)}`)); + str += "\\" + src[i]; + } + } else if (ch === " " || ch === " ") { + const wsStart = i; + let next = src[i + 1]; + while (next === " " || next === " ") { + i += 1; + next = src[i + 1]; + } + if (next !== "\n") str += i > wsStart ? src.slice(wsStart, i + 1) : ch; + } else { + str += ch; + } + } + return errors.length > 0 ? { + errors, + str + } : str; + } + parseCharCode(offset, length, errors) { + const { + src + } = this.context; + const cc = src.substr(offset, length); + const ok = cc.length === length && /^[0-9a-fA-F]+$/.test(cc); + const code = ok ? parseInt(cc, 16) : NaN; + if (isNaN(code)) { + errors.push(new PlainValue.YAMLSyntaxError(this, `Invalid escape sequence ${src.substr(offset - 2, length + 2)}`)); + return src.substr(offset - 2, length + 2); + } + return String.fromCodePoint(code); + } + /** + * Parses a "double quoted" value from the source + * + * @param {ParseContext} context + * @param {number} start - Index of first character + * @returns {number} - Index of the character after this scalar + */ + parse(context, start) { + this.context = context; + const { + src + } = context; + let offset = _QuoteDouble.endOfQuote(src, start + 1); + this.valueRange = new PlainValue.Range(start, offset); + offset = PlainValue.Node.endOfWhiteSpace(src, offset); + offset = this.parseComment(offset); + return offset; + } + }; + var QuoteSingle = class _QuoteSingle extends PlainValue.Node { + static endOfQuote(src, offset) { + let ch = src[offset]; + while (ch) { + if (ch === "'") { + if (src[offset + 1] !== "'") break; + ch = src[offset += 2]; + } else { + ch = src[offset += 1]; + } + } + return offset + 1; + } + /** + * @returns {string | { str: string, errors: YAMLSyntaxError[] }} + */ + get strValue() { + if (!this.valueRange || !this.context) return null; + const errors = []; + const { + start, + end + } = this.valueRange; + const { + indent, + src + } = this.context; + if (src[end - 1] !== "'") errors.push(new PlainValue.YAMLSyntaxError(this, "Missing closing 'quote")); + let str = ""; + for (let i = start + 1; i < end - 1; ++i) { + const ch = src[i]; + if (ch === "\n") { + if (PlainValue.Node.atDocumentBoundary(src, i + 1)) errors.push(new PlainValue.YAMLSemanticError(this, "Document boundary indicators are not allowed within string values")); + const { + fold, + offset, + error + } = PlainValue.Node.foldNewline(src, i, indent); + str += fold; + i = offset; + if (error) errors.push(new PlainValue.YAMLSemanticError(this, "Multi-line single-quoted string needs to be sufficiently indented")); + } else if (ch === "'") { + str += ch; + i += 1; + if (src[i] !== "'") errors.push(new PlainValue.YAMLSyntaxError(this, "Unescaped single quote? This should not happen.")); + } else if (ch === " " || ch === " ") { + const wsStart = i; + let next = src[i + 1]; + while (next === " " || next === " ") { + i += 1; + next = src[i + 1]; + } + if (next !== "\n") str += i > wsStart ? src.slice(wsStart, i + 1) : ch; + } else { + str += ch; + } + } + return errors.length > 0 ? { + errors, + str + } : str; + } + /** + * Parses a 'single quoted' value from the source + * + * @param {ParseContext} context + * @param {number} start - Index of first character + * @returns {number} - Index of the character after this scalar + */ + parse(context, start) { + this.context = context; + const { + src + } = context; + let offset = _QuoteSingle.endOfQuote(src, start + 1); + this.valueRange = new PlainValue.Range(start, offset); + offset = PlainValue.Node.endOfWhiteSpace(src, offset); + offset = this.parseComment(offset); + return offset; + } + }; + function createNewNode(type, props) { + switch (type) { + case PlainValue.Type.ALIAS: + return new Alias(type, props); + case PlainValue.Type.BLOCK_FOLDED: + case PlainValue.Type.BLOCK_LITERAL: + return new BlockValue(type, props); + case PlainValue.Type.FLOW_MAP: + case PlainValue.Type.FLOW_SEQ: + return new FlowCollection(type, props); + case PlainValue.Type.MAP_KEY: + case PlainValue.Type.MAP_VALUE: + case PlainValue.Type.SEQ_ITEM: + return new CollectionItem(type, props); + case PlainValue.Type.COMMENT: + case PlainValue.Type.PLAIN: + return new PlainValue.PlainValue(type, props); + case PlainValue.Type.QUOTE_DOUBLE: + return new QuoteDouble(type, props); + case PlainValue.Type.QUOTE_SINGLE: + return new QuoteSingle(type, props); + default: + return null; + } + } + var ParseContext = class _ParseContext { + static parseType(src, offset, inFlow) { + switch (src[offset]) { + case "*": + return PlainValue.Type.ALIAS; + case ">": + return PlainValue.Type.BLOCK_FOLDED; + case "|": + return PlainValue.Type.BLOCK_LITERAL; + case "{": + return PlainValue.Type.FLOW_MAP; + case "[": + return PlainValue.Type.FLOW_SEQ; + case "?": + return !inFlow && PlainValue.Node.atBlank(src, offset + 1, true) ? PlainValue.Type.MAP_KEY : PlainValue.Type.PLAIN; + case ":": + return !inFlow && PlainValue.Node.atBlank(src, offset + 1, true) ? PlainValue.Type.MAP_VALUE : PlainValue.Type.PLAIN; + case "-": + return !inFlow && PlainValue.Node.atBlank(src, offset + 1, true) ? PlainValue.Type.SEQ_ITEM : PlainValue.Type.PLAIN; + case '"': + return PlainValue.Type.QUOTE_DOUBLE; + case "'": + return PlainValue.Type.QUOTE_SINGLE; + default: + return PlainValue.Type.PLAIN; + } + } + constructor(orig = {}, { + atLineStart, + inCollection, + inFlow, + indent, + lineStart, + parent + } = {}) { + PlainValue._defineProperty(this, "parseNode", (overlay, start) => { + if (PlainValue.Node.atDocumentBoundary(this.src, start)) return null; + const context = new _ParseContext(this, overlay); + const { + props, + type, + valueStart + } = context.parseProps(start); + const node = createNewNode(type, props); + let offset = node.parse(context, valueStart); + node.range = new PlainValue.Range(start, offset); + if (offset <= start) { + node.error = new Error(`Node#parse consumed no characters`); + node.error.parseEnd = offset; + node.error.source = node; + node.range.end = start + 1; + } + if (context.nodeStartsCollection(node)) { + if (!node.error && !context.atLineStart && context.parent.type === PlainValue.Type.DOCUMENT) { + node.error = new PlainValue.YAMLSyntaxError(node, "Block collection must not have preceding content here (e.g. directives-end indicator)"); + } + const collection = new Collection(node); + offset = collection.parse(new _ParseContext(context), offset); + collection.range = new PlainValue.Range(start, offset); + return collection; + } + return node; + }); + this.atLineStart = atLineStart != null ? atLineStart : orig.atLineStart || false; + this.inCollection = inCollection != null ? inCollection : orig.inCollection || false; + this.inFlow = inFlow != null ? inFlow : orig.inFlow || false; + this.indent = indent != null ? indent : orig.indent; + this.lineStart = lineStart != null ? lineStart : orig.lineStart; + this.parent = parent != null ? parent : orig.parent || {}; + this.root = orig.root; + this.src = orig.src; + } + nodeStartsCollection(node) { + const { + inCollection, + inFlow, + src + } = this; + if (inCollection || inFlow) return false; + if (node instanceof CollectionItem) return true; + let offset = node.range.end; + if (src[offset] === "\n" || src[offset - 1] === "\n") return false; + offset = PlainValue.Node.endOfWhiteSpace(src, offset); + return src[offset] === ":"; + } + // Anchor and tag are before type, which determines the node implementation + // class; hence this intermediate step. + parseProps(offset) { + const { + inFlow, + parent, + src + } = this; + const props = []; + let lineHasProps = false; + offset = this.atLineStart ? PlainValue.Node.endOfIndent(src, offset) : PlainValue.Node.endOfWhiteSpace(src, offset); + let ch = src[offset]; + while (ch === PlainValue.Char.ANCHOR || ch === PlainValue.Char.COMMENT || ch === PlainValue.Char.TAG || ch === "\n") { + if (ch === "\n") { + let inEnd = offset; + let lineStart; + do { + lineStart = inEnd + 1; + inEnd = PlainValue.Node.endOfIndent(src, lineStart); + } while (src[inEnd] === "\n"); + const indentDiff = inEnd - (lineStart + this.indent); + const noIndicatorAsIndent = parent.type === PlainValue.Type.SEQ_ITEM && parent.context.atLineStart; + if (src[inEnd] !== "#" && !PlainValue.Node.nextNodeIsIndented(src[inEnd], indentDiff, !noIndicatorAsIndent)) break; + this.atLineStart = true; + this.lineStart = lineStart; + lineHasProps = false; + offset = inEnd; + } else if (ch === PlainValue.Char.COMMENT) { + const end = PlainValue.Node.endOfLine(src, offset + 1); + props.push(new PlainValue.Range(offset, end)); + offset = end; + } else { + let end = PlainValue.Node.endOfIdentifier(src, offset + 1); + if (ch === PlainValue.Char.TAG && src[end] === "," && /^[a-zA-Z0-9-]+\.[a-zA-Z0-9-]+,\d\d\d\d(-\d\d){0,2}\/\S/.test(src.slice(offset + 1, end + 13))) { + end = PlainValue.Node.endOfIdentifier(src, end + 5); + } + props.push(new PlainValue.Range(offset, end)); + lineHasProps = true; + offset = PlainValue.Node.endOfWhiteSpace(src, end); + } + ch = src[offset]; + } + if (lineHasProps && ch === ":" && PlainValue.Node.atBlank(src, offset + 1, true)) offset -= 1; + const type = _ParseContext.parseType(src, offset, inFlow); + return { + props, + type, + valueStart: offset + }; + } + /** + * Parses a node from the source + * @param {ParseContext} overlay + * @param {number} start - Index of first non-whitespace character for the node + * @returns {?Node} - null if at a document boundary + */ + }; + function parse2(src) { + const cr = []; + if (src.indexOf("\r") !== -1) { + src = src.replace(/\r\n?/g, (match, offset2) => { + if (match.length > 1) cr.push(offset2); + return "\n"; + }); + } + const documents = []; + let offset = 0; + do { + const doc = new Document(); + const context = new ParseContext({ + src + }); + offset = doc.parse(context, offset); + documents.push(doc); + } while (offset < src.length); + documents.setOrigRanges = () => { + if (cr.length === 0) return false; + for (let i = 1; i < cr.length; ++i) cr[i] -= i; + let crOffset = 0; + for (let i = 0; i < documents.length; ++i) { + crOffset = documents[i].setOrigRanges(cr, crOffset); + } + cr.splice(0, cr.length); + return true; + }; + documents.toString = () => documents.join("...\n"); + return documents; + } + exports2.parse = parse2; + } +}); + +// ../../node_modules/openapi-to-postmanv2/node_modules/yaml/dist/resolveSeq-d03cb037.js +var require_resolveSeq_d03cb0372 = __commonJS({ + "../../node_modules/openapi-to-postmanv2/node_modules/yaml/dist/resolveSeq-d03cb037.js"(exports2) { + "use strict"; + var PlainValue = require_PlainValue_ec8e588e2(); + function addCommentBefore(str, indent, comment) { + if (!comment) return str; + const cc = comment.replace(/[\s\S]^/gm, `$&${indent}#`); + return `#${cc} +${indent}${str}`; + } + function addComment(str, indent, comment) { + return !comment ? str : comment.indexOf("\n") === -1 ? `${str} #${comment}` : `${str} +` + comment.replace(/^/gm, `${indent || ""}#`); + } + var Node = class { + }; + function toJSON(value, arg, ctx) { + if (Array.isArray(value)) return value.map((v, i) => toJSON(v, String(i), ctx)); + if (value && typeof value.toJSON === "function") { + const anchor = ctx && ctx.anchors && ctx.anchors.get(value); + if (anchor) ctx.onCreate = (res2) => { + anchor.res = res2; + delete ctx.onCreate; + }; + const res = value.toJSON(arg, ctx); + if (anchor && ctx.onCreate) ctx.onCreate(res); + return res; + } + if ((!ctx || !ctx.keep) && typeof value === "bigint") return Number(value); + return value; + } + var Scalar = class extends Node { + constructor(value) { + super(); + this.value = value; + } + toJSON(arg, ctx) { + return ctx && ctx.keep ? this.value : toJSON(this.value, arg, ctx); + } + toString() { + return String(this.value); + } + }; + function collectionFromPath(schema2, path, value) { + let v = value; + for (let i = path.length - 1; i >= 0; --i) { + const k = path[i]; + if (Number.isInteger(k) && k >= 0) { + const a = []; + a[k] = v; + v = a; + } else { + const o = {}; + Object.defineProperty(o, k, { + value: v, + writable: true, + enumerable: true, + configurable: true + }); + v = o; + } + } + return schema2.createNode(v, false); + } + var isEmptyPath = (path) => path == null || typeof path === "object" && path[Symbol.iterator]().next().done; + var Collection = class _Collection extends Node { + constructor(schema2) { + super(); + PlainValue._defineProperty(this, "items", []); + this.schema = schema2; + } + addIn(path, value) { + if (isEmptyPath(path)) this.add(value); + else { + const [key, ...rest] = path; + const node = this.get(key, true); + if (node instanceof _Collection) node.addIn(rest, value); + else if (node === void 0 && this.schema) this.set(key, collectionFromPath(this.schema, rest, value)); + else throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`); + } + } + deleteIn([key, ...rest]) { + if (rest.length === 0) return this.delete(key); + const node = this.get(key, true); + if (node instanceof _Collection) return node.deleteIn(rest); + else throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`); + } + getIn([key, ...rest], keepScalar) { + const node = this.get(key, true); + if (rest.length === 0) return !keepScalar && node instanceof Scalar ? node.value : node; + else return node instanceof _Collection ? node.getIn(rest, keepScalar) : void 0; + } + hasAllNullValues() { + return this.items.every((node) => { + if (!node || node.type !== "PAIR") return false; + const n = node.value; + return n == null || n instanceof Scalar && n.value == null && !n.commentBefore && !n.comment && !n.tag; + }); + } + hasIn([key, ...rest]) { + if (rest.length === 0) return this.has(key); + const node = this.get(key, true); + return node instanceof _Collection ? node.hasIn(rest) : false; + } + setIn([key, ...rest], value) { + if (rest.length === 0) { + this.set(key, value); + } else { + const node = this.get(key, true); + if (node instanceof _Collection) node.setIn(rest, value); + else if (node === void 0 && this.schema) this.set(key, collectionFromPath(this.schema, rest, value)); + else throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`); + } + } + // overridden in implementations + /* istanbul ignore next */ + toJSON() { + return null; + } + toString(ctx, { + blockItem, + flowChars, + isMap, + itemIndent + }, onComment, onChompKeep) { + const { + indent, + indentStep, + stringify: stringify2 + } = ctx; + const inFlow = this.type === PlainValue.Type.FLOW_MAP || this.type === PlainValue.Type.FLOW_SEQ || ctx.inFlow; + if (inFlow) itemIndent += indentStep; + const allNullValues = isMap && this.hasAllNullValues(); + ctx = Object.assign({}, ctx, { + allNullValues, + indent: itemIndent, + inFlow, + type: null + }); + let chompKeep = false; + let hasItemWithNewLine = false; + const nodes = this.items.reduce((nodes2, item, i) => { + let comment; + if (item) { + if (!chompKeep && item.spaceBefore) nodes2.push({ + type: "comment", + str: "" + }); + if (item.commentBefore) item.commentBefore.match(/^.*$/gm).forEach((line) => { + nodes2.push({ + type: "comment", + str: `#${line}` + }); + }); + if (item.comment) comment = item.comment; + if (inFlow && (!chompKeep && item.spaceBefore || item.commentBefore || item.comment || item.key && (item.key.commentBefore || item.key.comment) || item.value && (item.value.commentBefore || item.value.comment))) hasItemWithNewLine = true; + } + chompKeep = false; + let str2 = stringify2(item, ctx, () => comment = null, () => chompKeep = true); + if (inFlow && !hasItemWithNewLine && str2.includes("\n")) hasItemWithNewLine = true; + if (inFlow && i < this.items.length - 1) str2 += ","; + str2 = addComment(str2, itemIndent, comment); + if (chompKeep && (comment || inFlow)) chompKeep = false; + nodes2.push({ + type: "item", + str: str2 + }); + return nodes2; + }, []); + let str; + if (nodes.length === 0) { + str = flowChars.start + flowChars.end; + } else if (inFlow) { + const { + start, + end + } = flowChars; + const strings = nodes.map((n) => n.str); + if (hasItemWithNewLine || strings.reduce((sum, str2) => sum + str2.length + 2, 2) > _Collection.maxFlowStringSingleLineLength) { + str = start; + for (const s of strings) { + str += s ? ` +${indentStep}${indent}${s}` : "\n"; + } + str += ` +${indent}${end}`; + } else { + str = `${start} ${strings.join(" ")} ${end}`; + } + } else { + const strings = nodes.map(blockItem); + str = strings.shift(); + for (const s of strings) str += s ? ` +${indent}${s}` : "\n"; + } + if (this.comment) { + str += "\n" + this.comment.replace(/^/gm, `${indent}#`); + if (onComment) onComment(); + } else if (chompKeep && onChompKeep) onChompKeep(); + return str; + } + }; + PlainValue._defineProperty(Collection, "maxFlowStringSingleLineLength", 60); + function asItemIndex(key) { + let idx = key instanceof Scalar ? key.value : key; + if (idx && typeof idx === "string") idx = Number(idx); + return Number.isInteger(idx) && idx >= 0 ? idx : null; + } + var YAMLSeq = class extends Collection { + add(value) { + this.items.push(value); + } + delete(key) { + const idx = asItemIndex(key); + if (typeof idx !== "number") return false; + const del = this.items.splice(idx, 1); + return del.length > 0; + } + get(key, keepScalar) { + const idx = asItemIndex(key); + if (typeof idx !== "number") return void 0; + const it = this.items[idx]; + return !keepScalar && it instanceof Scalar ? it.value : it; + } + has(key) { + const idx = asItemIndex(key); + return typeof idx === "number" && idx < this.items.length; + } + set(key, value) { + const idx = asItemIndex(key); + if (typeof idx !== "number") throw new Error(`Expected a valid index, not ${key}.`); + this.items[idx] = value; + } + toJSON(_2, ctx) { + const seq = []; + if (ctx && ctx.onCreate) ctx.onCreate(seq); + let i = 0; + for (const item of this.items) seq.push(toJSON(item, String(i++), ctx)); + return seq; + } + toString(ctx, onComment, onChompKeep) { + if (!ctx) return JSON.stringify(this); + return super.toString(ctx, { + blockItem: (n) => n.type === "comment" ? n.str : `- ${n.str}`, + flowChars: { + start: "[", + end: "]" + }, + isMap: false, + itemIndent: (ctx.indent || "") + " " + }, onComment, onChompKeep); + } + }; + var stringifyKey = (key, jsKey, ctx) => { + if (jsKey === null) return ""; + if (typeof jsKey !== "object") return String(jsKey); + if (key instanceof Node && ctx && ctx.doc) return key.toString({ + anchors: /* @__PURE__ */ Object.create(null), + doc: ctx.doc, + indent: "", + indentStep: ctx.indentStep, + inFlow: true, + inStringifyKey: true, + stringify: ctx.stringify + }); + return JSON.stringify(jsKey); + }; + var Pair = class _Pair extends Node { + constructor(key, value = null) { + super(); + this.key = key; + this.value = value; + this.type = _Pair.Type.PAIR; + } + get commentBefore() { + return this.key instanceof Node ? this.key.commentBefore : void 0; + } + set commentBefore(cb) { + if (this.key == null) this.key = new Scalar(null); + if (this.key instanceof Node) this.key.commentBefore = cb; + else { + const msg = "Pair.commentBefore is an alias for Pair.key.commentBefore. To set it, the key must be a Node."; + throw new Error(msg); + } + } + addToJSMap(ctx, map) { + const key = toJSON(this.key, "", ctx); + if (map instanceof Map) { + const value = toJSON(this.value, key, ctx); + map.set(key, value); + } else if (map instanceof Set) { + map.add(key); + } else { + const stringKey = stringifyKey(this.key, key, ctx); + const value = toJSON(this.value, stringKey, ctx); + if (stringKey in map) Object.defineProperty(map, stringKey, { + value, + writable: true, + enumerable: true, + configurable: true + }); + else map[stringKey] = value; + } + return map; + } + toJSON(_2, ctx) { + const pair = ctx && ctx.mapAsMap ? /* @__PURE__ */ new Map() : {}; + return this.addToJSMap(ctx, pair); + } + toString(ctx, onComment, onChompKeep) { + if (!ctx || !ctx.doc) return JSON.stringify(this); + const { + indent: indentSize, + indentSeq, + simpleKeys + } = ctx.doc.options; + let { + key, + value + } = this; + let keyComment = key instanceof Node && key.comment; + if (simpleKeys) { + if (keyComment) { + throw new Error("With simple keys, key nodes cannot have comments"); + } + if (key instanceof Collection) { + const msg = "With simple keys, collection cannot be used as a key value"; + throw new Error(msg); + } + } + let explicitKey = !simpleKeys && (!key || keyComment || (key instanceof Node ? key instanceof Collection || key.type === PlainValue.Type.BLOCK_FOLDED || key.type === PlainValue.Type.BLOCK_LITERAL : typeof key === "object")); + const { + doc, + indent, + indentStep, + stringify: stringify2 + } = ctx; + ctx = Object.assign({}, ctx, { + implicitKey: !explicitKey, + indent: indent + indentStep + }); + let chompKeep = false; + let str = stringify2(key, ctx, () => keyComment = null, () => chompKeep = true); + str = addComment(str, ctx.indent, keyComment); + if (!explicitKey && str.length > 1024) { + if (simpleKeys) throw new Error("With simple keys, single line scalar must not span more than 1024 characters"); + explicitKey = true; + } + if (ctx.allNullValues && !simpleKeys) { + if (this.comment) { + str = addComment(str, ctx.indent, this.comment); + if (onComment) onComment(); + } else if (chompKeep && !keyComment && onChompKeep) onChompKeep(); + return ctx.inFlow && !explicitKey ? str : `? ${str}`; + } + str = explicitKey ? `? ${str} +${indent}:` : `${str}:`; + if (this.comment) { + str = addComment(str, ctx.indent, this.comment); + if (onComment) onComment(); + } + let vcb = ""; + let valueComment = null; + if (value instanceof Node) { + if (value.spaceBefore) vcb = "\n"; + if (value.commentBefore) { + const cs = value.commentBefore.replace(/^/gm, `${ctx.indent}#`); + vcb += ` +${cs}`; + } + valueComment = value.comment; + } else if (value && typeof value === "object") { + value = doc.schema.createNode(value, true); + } + ctx.implicitKey = false; + if (!explicitKey && !this.comment && value instanceof Scalar) ctx.indentAtStart = str.length + 1; + chompKeep = false; + if (!indentSeq && indentSize >= 2 && !ctx.inFlow && !explicitKey && value instanceof YAMLSeq && value.type !== PlainValue.Type.FLOW_SEQ && !value.tag && !doc.anchors.getName(value)) { + ctx.indent = ctx.indent.substr(2); + } + const valueStr = stringify2(value, ctx, () => valueComment = null, () => chompKeep = true); + let ws = " "; + if (vcb || this.comment) { + ws = `${vcb} +${ctx.indent}`; + } else if (!explicitKey && value instanceof Collection) { + const flow = valueStr[0] === "[" || valueStr[0] === "{"; + if (!flow || valueStr.includes("\n")) ws = ` +${ctx.indent}`; + } else if (valueStr[0] === "\n") ws = ""; + if (chompKeep && !valueComment && onChompKeep) onChompKeep(); + return addComment(str + ws + valueStr, ctx.indent, valueComment); + } + }; + PlainValue._defineProperty(Pair, "Type", { + PAIR: "PAIR", + MERGE_PAIR: "MERGE_PAIR" + }); + var getAliasCount = (node, anchors) => { + if (node instanceof Alias) { + const anchor = anchors.get(node.source); + return anchor.count * anchor.aliasCount; + } else if (node instanceof Collection) { + let count = 0; + for (const item of node.items) { + const c = getAliasCount(item, anchors); + if (c > count) count = c; + } + return count; + } else if (node instanceof Pair) { + const kc = getAliasCount(node.key, anchors); + const vc = getAliasCount(node.value, anchors); + return Math.max(kc, vc); + } + return 1; + }; + var Alias = class _Alias extends Node { + static stringify({ + range, + source + }, { + anchors, + doc, + implicitKey, + inStringifyKey + }) { + let anchor = Object.keys(anchors).find((a) => anchors[a] === source); + if (!anchor && inStringifyKey) anchor = doc.anchors.getName(source) || doc.anchors.newName(); + if (anchor) return `*${anchor}${implicitKey ? " " : ""}`; + const msg = doc.anchors.getName(source) ? "Alias node must be after source node" : "Source node not found for alias node"; + throw new Error(`${msg} [${range}]`); + } + constructor(source) { + super(); + this.source = source; + this.type = PlainValue.Type.ALIAS; + } + set tag(t) { + throw new Error("Alias nodes cannot have tags"); + } + toJSON(arg, ctx) { + if (!ctx) return toJSON(this.source, arg, ctx); + const { + anchors, + maxAliasCount + } = ctx; + const anchor = anchors.get(this.source); + if (!anchor || anchor.res === void 0) { + const msg = "This should not happen: Alias anchor was not resolved?"; + if (this.cstNode) throw new PlainValue.YAMLReferenceError(this.cstNode, msg); + else throw new ReferenceError(msg); + } + if (maxAliasCount >= 0) { + anchor.count += 1; + if (anchor.aliasCount === 0) anchor.aliasCount = getAliasCount(this.source, anchors); + if (anchor.count * anchor.aliasCount > maxAliasCount) { + const msg = "Excessive alias count indicates a resource exhaustion attack"; + if (this.cstNode) throw new PlainValue.YAMLReferenceError(this.cstNode, msg); + else throw new ReferenceError(msg); + } + } + return anchor.res; + } + // Only called when stringifying an alias mapping key while constructing + // Object output. + toString(ctx) { + return _Alias.stringify(this, ctx); + } + }; + PlainValue._defineProperty(Alias, "default", true); + function findPair(items, key) { + const k = key instanceof Scalar ? key.value : key; + for (const it of items) { + if (it instanceof Pair) { + if (it.key === key || it.key === k) return it; + if (it.key && it.key.value === k) return it; + } + } + return void 0; + } + var YAMLMap = class extends Collection { + add(pair, overwrite) { + if (!pair) pair = new Pair(pair); + else if (!(pair instanceof Pair)) pair = new Pair(pair.key || pair, pair.value); + const prev = findPair(this.items, pair.key); + const sortEntries = this.schema && this.schema.sortMapEntries; + if (prev) { + if (overwrite) prev.value = pair.value; + else throw new Error(`Key ${pair.key} already set`); + } else if (sortEntries) { + const i = this.items.findIndex((item) => sortEntries(pair, item) < 0); + if (i === -1) this.items.push(pair); + else this.items.splice(i, 0, pair); + } else { + this.items.push(pair); + } + } + delete(key) { + const it = findPair(this.items, key); + if (!it) return false; + const del = this.items.splice(this.items.indexOf(it), 1); + return del.length > 0; + } + get(key, keepScalar) { + const it = findPair(this.items, key); + const node = it && it.value; + return !keepScalar && node instanceof Scalar ? node.value : node; + } + has(key) { + return !!findPair(this.items, key); + } + set(key, value) { + this.add(new Pair(key, value), true); + } + /** + * @param {*} arg ignored + * @param {*} ctx Conversion context, originally set in Document#toJSON() + * @param {Class} Type If set, forces the returned collection type + * @returns {*} Instance of Type, Map, or Object + */ + toJSON(_2, ctx, Type) { + const map = Type ? new Type() : ctx && ctx.mapAsMap ? /* @__PURE__ */ new Map() : {}; + if (ctx && ctx.onCreate) ctx.onCreate(map); + for (const item of this.items) item.addToJSMap(ctx, map); + return map; + } + toString(ctx, onComment, onChompKeep) { + if (!ctx) return JSON.stringify(this); + for (const item of this.items) { + if (!(item instanceof Pair)) throw new Error(`Map items must all be pairs; found ${JSON.stringify(item)} instead`); + } + return super.toString(ctx, { + blockItem: (n) => n.str, + flowChars: { + start: "{", + end: "}" + }, + isMap: true, + itemIndent: ctx.indent || "" + }, onComment, onChompKeep); + } + }; + var MERGE_KEY = "<<"; + var Merge = class extends Pair { + constructor(pair) { + if (pair instanceof Pair) { + let seq = pair.value; + if (!(seq instanceof YAMLSeq)) { + seq = new YAMLSeq(); + seq.items.push(pair.value); + seq.range = pair.value.range; + } + super(pair.key, seq); + this.range = pair.range; + } else { + super(new Scalar(MERGE_KEY), new YAMLSeq()); + } + this.type = Pair.Type.MERGE_PAIR; + } + // If the value associated with a merge key is a single mapping node, each of + // its key/value pairs is inserted into the current mapping, unless the key + // already exists in it. If the value associated with the merge key is a + // sequence, then this sequence is expected to contain mapping nodes and each + // of these nodes is merged in turn according to its order in the sequence. + // Keys in mapping nodes earlier in the sequence override keys specified in + // later mapping nodes. -- http://yaml.org/type/merge.html + addToJSMap(ctx, map) { + for (const { + source + } of this.value.items) { + if (!(source instanceof YAMLMap)) throw new Error("Merge sources must be maps"); + const srcMap = source.toJSON(null, ctx, Map); + for (const [key, value] of srcMap) { + if (map instanceof Map) { + if (!map.has(key)) map.set(key, value); + } else if (map instanceof Set) { + map.add(key); + } else if (!Object.prototype.hasOwnProperty.call(map, key)) { + Object.defineProperty(map, key, { + value, + writable: true, + enumerable: true, + configurable: true + }); + } + } + } + return map; + } + toString(ctx, onComment) { + const seq = this.value; + if (seq.items.length > 1) return super.toString(ctx, onComment); + this.value = seq.items[0]; + const str = super.toString(ctx, onComment); + this.value = seq; + return str; + } + }; + var binaryOptions = { + defaultType: PlainValue.Type.BLOCK_LITERAL, + lineWidth: 76 + }; + var boolOptions = { + trueStr: "true", + falseStr: "false" + }; + var intOptions = { + asBigInt: false + }; + var nullOptions = { + nullStr: "null" + }; + var strOptions = { + defaultType: PlainValue.Type.PLAIN, + doubleQuoted: { + jsonEncoding: false, + minMultiLineLength: 40 + }, + fold: { + lineWidth: 80, + minContentWidth: 20 + } + }; + function resolveScalar(str, tags, scalarFallback) { + for (const { + format, + test, + resolve + } of tags) { + if (test) { + const match = str.match(test); + if (match) { + let res = resolve.apply(null, match); + if (!(res instanceof Scalar)) res = new Scalar(res); + if (format) res.format = format; + return res; + } + } + } + if (scalarFallback) str = scalarFallback(str); + return new Scalar(str); + } + var FOLD_FLOW = "flow"; + var FOLD_BLOCK = "block"; + var FOLD_QUOTED = "quoted"; + var consumeMoreIndentedLines = (text, i) => { + let ch = text[i + 1]; + while (ch === " " || ch === " ") { + do { + ch = text[i += 1]; + } while (ch && ch !== "\n"); + ch = text[i + 1]; + } + return i; + }; + function foldFlowLines(text, indent, mode, { + indentAtStart, + lineWidth = 80, + minContentWidth = 20, + onFold, + onOverflow + }) { + if (!lineWidth || lineWidth < 0) return text; + const endStep = Math.max(1 + minContentWidth, 1 + lineWidth - indent.length); + if (text.length <= endStep) return text; + const folds = []; + const escapedFolds = {}; + let end = lineWidth - indent.length; + if (typeof indentAtStart === "number") { + if (indentAtStart > lineWidth - Math.max(2, minContentWidth)) folds.push(0); + else end = lineWidth - indentAtStart; + } + let split = void 0; + let prev = void 0; + let overflow = false; + let i = -1; + let escStart = -1; + let escEnd = -1; + if (mode === FOLD_BLOCK) { + i = consumeMoreIndentedLines(text, i); + if (i !== -1) end = i + endStep; + } + for (let ch; ch = text[i += 1]; ) { + if (mode === FOLD_QUOTED && ch === "\\") { + escStart = i; + switch (text[i + 1]) { + case "x": + i += 3; + break; + case "u": + i += 5; + break; + case "U": + i += 9; + break; + default: + i += 1; + } + escEnd = i; + } + if (ch === "\n") { + if (mode === FOLD_BLOCK) i = consumeMoreIndentedLines(text, i); + end = i + endStep; + split = void 0; + } else { + if (ch === " " && prev && prev !== " " && prev !== "\n" && prev !== " ") { + const next = text[i + 1]; + if (next && next !== " " && next !== "\n" && next !== " ") split = i; + } + if (i >= end) { + if (split) { + folds.push(split); + end = split + endStep; + split = void 0; + } else if (mode === FOLD_QUOTED) { + while (prev === " " || prev === " ") { + prev = ch; + ch = text[i += 1]; + overflow = true; + } + const j = i > escEnd + 1 ? i - 2 : escStart - 1; + if (escapedFolds[j]) return text; + folds.push(j); + escapedFolds[j] = true; + end = j + endStep; + split = void 0; + } else { + overflow = true; + } + } + } + prev = ch; + } + if (overflow && onOverflow) onOverflow(); + if (folds.length === 0) return text; + if (onFold) onFold(); + let res = text.slice(0, folds[0]); + for (let i2 = 0; i2 < folds.length; ++i2) { + const fold = folds[i2]; + const end2 = folds[i2 + 1] || text.length; + if (fold === 0) res = ` +${indent}${text.slice(0, end2)}`; + else { + if (mode === FOLD_QUOTED && escapedFolds[fold]) res += `${text[fold]}\\`; + res += ` +${indent}${text.slice(fold + 1, end2)}`; + } + } + return res; + } + var getFoldOptions = ({ + indentAtStart + }) => indentAtStart ? Object.assign({ + indentAtStart + }, strOptions.fold) : strOptions.fold; + var containsDocumentMarker = (str) => /^(%|---|\.\.\.)/m.test(str); + function lineLengthOverLimit(str, lineWidth, indentLength) { + if (!lineWidth || lineWidth < 0) return false; + const limit = lineWidth - indentLength; + const strLen = str.length; + if (strLen <= limit) return false; + for (let i = 0, start = 0; i < strLen; ++i) { + if (str[i] === "\n") { + if (i - start > limit) return true; + start = i + 1; + if (strLen - start <= limit) return false; + } + } + return true; + } + function doubleQuotedString(value, ctx) { + const { + implicitKey + } = ctx; + const { + jsonEncoding, + minMultiLineLength + } = strOptions.doubleQuoted; + const json = JSON.stringify(value); + if (jsonEncoding) return json; + const indent = ctx.indent || (containsDocumentMarker(value) ? " " : ""); + let str = ""; + let start = 0; + for (let i = 0, ch = json[i]; ch; ch = json[++i]) { + if (ch === " " && json[i + 1] === "\\" && json[i + 2] === "n") { + str += json.slice(start, i) + "\\ "; + i += 1; + start = i; + ch = "\\"; + } + if (ch === "\\") switch (json[i + 1]) { + case "u": + { + str += json.slice(start, i); + const code = json.substr(i + 2, 4); + switch (code) { + case "0000": + str += "\\0"; + break; + case "0007": + str += "\\a"; + break; + case "000b": + str += "\\v"; + break; + case "001b": + str += "\\e"; + break; + case "0085": + str += "\\N"; + break; + case "00a0": + str += "\\_"; + break; + case "2028": + str += "\\L"; + break; + case "2029": + str += "\\P"; + break; + default: + if (code.substr(0, 2) === "00") str += "\\x" + code.substr(2); + else str += json.substr(i, 6); + } + i += 5; + start = i + 1; + } + break; + case "n": + if (implicitKey || json[i + 2] === '"' || json.length < minMultiLineLength) { + i += 1; + } else { + str += json.slice(start, i) + "\n\n"; + while (json[i + 2] === "\\" && json[i + 3] === "n" && json[i + 4] !== '"') { + str += "\n"; + i += 2; + } + str += indent; + if (json[i + 2] === " ") str += "\\"; + i += 1; + start = i + 1; + } + break; + default: + i += 1; + } + } + str = start ? str + json.slice(start) : json; + return implicitKey ? str : foldFlowLines(str, indent, FOLD_QUOTED, getFoldOptions(ctx)); + } + function singleQuotedString(value, ctx) { + if (ctx.implicitKey) { + if (/\n/.test(value)) return doubleQuotedString(value, ctx); + } else { + if (/[ \t]\n|\n[ \t]/.test(value)) return doubleQuotedString(value, ctx); + } + const indent = ctx.indent || (containsDocumentMarker(value) ? " " : ""); + const res = "'" + value.replace(/'/g, "''").replace(/\n+/g, `$& +${indent}`) + "'"; + return ctx.implicitKey ? res : foldFlowLines(res, indent, FOLD_FLOW, getFoldOptions(ctx)); + } + function blockString({ + comment, + type, + value + }, ctx, onComment, onChompKeep) { + if (/\n[\t ]+$/.test(value) || /^\s*$/.test(value)) { + return doubleQuotedString(value, ctx); + } + const indent = ctx.indent || (ctx.forceBlockIndent || containsDocumentMarker(value) ? " " : ""); + const indentSize = indent ? "2" : "1"; + const literal = type === PlainValue.Type.BLOCK_FOLDED ? false : type === PlainValue.Type.BLOCK_LITERAL ? true : !lineLengthOverLimit(value, strOptions.fold.lineWidth, indent.length); + let header = literal ? "|" : ">"; + if (!value) return header + "\n"; + let wsStart = ""; + let wsEnd = ""; + value = value.replace(/[\n\t ]*$/, (ws) => { + const n = ws.indexOf("\n"); + if (n === -1) { + header += "-"; + } else if (value === ws || n !== ws.length - 1) { + header += "+"; + if (onChompKeep) onChompKeep(); + } + wsEnd = ws.replace(/\n$/, ""); + return ""; + }).replace(/^[\n ]*/, (ws) => { + if (ws.indexOf(" ") !== -1) header += indentSize; + const m = ws.match(/ +$/); + if (m) { + wsStart = ws.slice(0, -m[0].length); + return m[0]; + } else { + wsStart = ws; + return ""; + } + }); + if (wsEnd) wsEnd = wsEnd.replace(/\n+(?!\n|$)/g, `$&${indent}`); + if (wsStart) wsStart = wsStart.replace(/\n+/g, `$&${indent}`); + if (comment) { + header += " #" + comment.replace(/ ?[\r\n]+/g, " "); + if (onComment) onComment(); + } + if (!value) return `${header}${indentSize} +${indent}${wsEnd}`; + if (literal) { + value = value.replace(/\n+/g, `$&${indent}`); + return `${header} +${indent}${wsStart}${value}${wsEnd}`; + } + value = value.replace(/\n+/g, "\n$&").replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g, "$1$2").replace(/\n+/g, `$&${indent}`); + const body = foldFlowLines(`${wsStart}${value}${wsEnd}`, indent, FOLD_BLOCK, strOptions.fold); + return `${header} +${indent}${body}`; + } + function plainString(item, ctx, onComment, onChompKeep) { + const { + comment, + type, + value + } = item; + const { + actualString, + implicitKey, + indent, + inFlow + } = ctx; + if (implicitKey && /[\n[\]{},]/.test(value) || inFlow && /[[\]{},]/.test(value)) { + return doubleQuotedString(value, ctx); + } + if (!value || /^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(value)) { + return implicitKey || inFlow || value.indexOf("\n") === -1 ? value.indexOf('"') !== -1 && value.indexOf("'") === -1 ? singleQuotedString(value, ctx) : doubleQuotedString(value, ctx) : blockString(item, ctx, onComment, onChompKeep); + } + if (!implicitKey && !inFlow && type !== PlainValue.Type.PLAIN && value.indexOf("\n") !== -1) { + return blockString(item, ctx, onComment, onChompKeep); + } + if (indent === "" && containsDocumentMarker(value)) { + ctx.forceBlockIndent = true; + return blockString(item, ctx, onComment, onChompKeep); + } + const str = value.replace(/\n+/g, `$& +${indent}`); + if (actualString) { + const { + tags + } = ctx.doc.schema; + const resolved = resolveScalar(str, tags, tags.scalarFallback).value; + if (typeof resolved !== "string") return doubleQuotedString(value, ctx); + } + const body = implicitKey ? str : foldFlowLines(str, indent, FOLD_FLOW, getFoldOptions(ctx)); + if (comment && !inFlow && (body.indexOf("\n") !== -1 || comment.indexOf("\n") !== -1)) { + if (onComment) onComment(); + return addCommentBefore(body, indent, comment); + } + return body; + } + function stringifyString(item, ctx, onComment, onChompKeep) { + const { + defaultType + } = strOptions; + const { + implicitKey, + inFlow + } = ctx; + let { + type, + value + } = item; + if (typeof value !== "string") { + value = String(value); + item = Object.assign({}, item, { + value + }); + } + const _stringify = (_type) => { + switch (_type) { + case PlainValue.Type.BLOCK_FOLDED: + case PlainValue.Type.BLOCK_LITERAL: + return blockString(item, ctx, onComment, onChompKeep); + case PlainValue.Type.QUOTE_DOUBLE: + return doubleQuotedString(value, ctx); + case PlainValue.Type.QUOTE_SINGLE: + return singleQuotedString(value, ctx); + case PlainValue.Type.PLAIN: + return plainString(item, ctx, onComment, onChompKeep); + default: + return null; + } + }; + if (type !== PlainValue.Type.QUOTE_DOUBLE && /[\x00-\x08\x0b-\x1f\x7f-\x9f]/.test(value)) { + type = PlainValue.Type.QUOTE_DOUBLE; + } else if ((implicitKey || inFlow) && (type === PlainValue.Type.BLOCK_FOLDED || type === PlainValue.Type.BLOCK_LITERAL)) { + type = PlainValue.Type.QUOTE_DOUBLE; + } + let res = _stringify(type); + if (res === null) { + res = _stringify(defaultType); + if (res === null) throw new Error(`Unsupported default string type ${defaultType}`); + } + return res; + } + function stringifyNumber({ + format, + minFractionDigits, + tag, + value + }) { + if (typeof value === "bigint") return String(value); + if (!isFinite(value)) return isNaN(value) ? ".nan" : value < 0 ? "-.inf" : ".inf"; + let n = JSON.stringify(value); + if (!format && minFractionDigits && (!tag || tag === "tag:yaml.org,2002:float") && /^\d/.test(n)) { + let i = n.indexOf("."); + if (i < 0) { + i = n.length; + n += "."; + } + let d = minFractionDigits - (n.length - i - 1); + while (d-- > 0) n += "0"; + } + return n; + } + function checkFlowCollectionEnd(errors, cst) { + let char, name; + switch (cst.type) { + case PlainValue.Type.FLOW_MAP: + char = "}"; + name = "flow map"; + break; + case PlainValue.Type.FLOW_SEQ: + char = "]"; + name = "flow sequence"; + break; + default: + errors.push(new PlainValue.YAMLSemanticError(cst, "Not a flow collection!?")); + return; + } + let lastItem; + for (let i = cst.items.length - 1; i >= 0; --i) { + const item = cst.items[i]; + if (!item || item.type !== PlainValue.Type.COMMENT) { + lastItem = item; + break; + } + } + if (lastItem && lastItem.char !== char) { + const msg = `Expected ${name} to end with ${char}`; + let err; + if (typeof lastItem.offset === "number") { + err = new PlainValue.YAMLSemanticError(cst, msg); + err.offset = lastItem.offset + 1; + } else { + err = new PlainValue.YAMLSemanticError(lastItem, msg); + if (lastItem.range && lastItem.range.end) err.offset = lastItem.range.end - lastItem.range.start; + } + errors.push(err); + } + } + function checkFlowCommentSpace(errors, comment) { + const prev = comment.context.src[comment.range.start - 1]; + if (prev !== "\n" && prev !== " " && prev !== " ") { + const msg = "Comments must be separated from other tokens by white space characters"; + errors.push(new PlainValue.YAMLSemanticError(comment, msg)); + } + } + function getLongKeyError(source, key) { + const sk = String(key); + const k = sk.substr(0, 8) + "..." + sk.substr(-8); + return new PlainValue.YAMLSemanticError(source, `The "${k}" key is too long`); + } + function resolveComments(collection, comments) { + for (const { + afterKey, + before, + comment + } of comments) { + let item = collection.items[before]; + if (!item) { + if (comment !== void 0) { + if (collection.comment) collection.comment += "\n" + comment; + else collection.comment = comment; + } + } else { + if (afterKey && item.value) item = item.value; + if (comment === void 0) { + if (afterKey || !item.commentBefore) item.spaceBefore = true; + } else { + if (item.commentBefore) item.commentBefore += "\n" + comment; + else item.commentBefore = comment; + } + } + } + } + function resolveString(doc, node) { + const res = node.strValue; + if (!res) return ""; + if (typeof res === "string") return res; + res.errors.forEach((error) => { + if (!error.source) error.source = node; + doc.errors.push(error); + }); + return res.str; + } + function resolveTagHandle(doc, node) { + const { + handle, + suffix + } = node.tag; + let prefix = doc.tagPrefixes.find((p) => p.handle === handle); + if (!prefix) { + const dtp = doc.getDefaults().tagPrefixes; + if (dtp) prefix = dtp.find((p) => p.handle === handle); + if (!prefix) throw new PlainValue.YAMLSemanticError(node, `The ${handle} tag handle is non-default and was not declared.`); + } + if (!suffix) throw new PlainValue.YAMLSemanticError(node, `The ${handle} tag has no suffix.`); + if (handle === "!" && (doc.version || doc.options.version) === "1.0") { + if (suffix[0] === "^") { + doc.warnings.push(new PlainValue.YAMLWarning(node, "YAML 1.0 ^ tag expansion is not supported")); + return suffix; + } + if (/[:/]/.test(suffix)) { + const vocab = suffix.match(/^([a-z0-9-]+)\/(.*)/i); + return vocab ? `tag:${vocab[1]}.yaml.org,2002:${vocab[2]}` : `tag:${suffix}`; + } + } + return prefix.prefix + decodeURIComponent(suffix); + } + function resolveTagName(doc, node) { + const { + tag, + type + } = node; + let nonSpecific = false; + if (tag) { + const { + handle, + suffix, + verbatim + } = tag; + if (verbatim) { + if (verbatim !== "!" && verbatim !== "!!") return verbatim; + const msg = `Verbatim tags aren't resolved, so ${verbatim} is invalid.`; + doc.errors.push(new PlainValue.YAMLSemanticError(node, msg)); + } else if (handle === "!" && !suffix) { + nonSpecific = true; + } else { + try { + return resolveTagHandle(doc, node); + } catch (error) { + doc.errors.push(error); + } + } + } + switch (type) { + case PlainValue.Type.BLOCK_FOLDED: + case PlainValue.Type.BLOCK_LITERAL: + case PlainValue.Type.QUOTE_DOUBLE: + case PlainValue.Type.QUOTE_SINGLE: + return PlainValue.defaultTags.STR; + case PlainValue.Type.FLOW_MAP: + case PlainValue.Type.MAP: + return PlainValue.defaultTags.MAP; + case PlainValue.Type.FLOW_SEQ: + case PlainValue.Type.SEQ: + return PlainValue.defaultTags.SEQ; + case PlainValue.Type.PLAIN: + return nonSpecific ? PlainValue.defaultTags.STR : null; + default: + return null; + } + } + function resolveByTagName(doc, node, tagName) { + const { + tags + } = doc.schema; + const matchWithTest = []; + for (const tag of tags) { + if (tag.tag === tagName) { + if (tag.test) matchWithTest.push(tag); + else { + const res = tag.resolve(doc, node); + return res instanceof Collection ? res : new Scalar(res); + } + } + } + const str = resolveString(doc, node); + if (typeof str === "string" && matchWithTest.length > 0) return resolveScalar(str, matchWithTest, tags.scalarFallback); + return null; + } + function getFallbackTagName({ + type + }) { + switch (type) { + case PlainValue.Type.FLOW_MAP: + case PlainValue.Type.MAP: + return PlainValue.defaultTags.MAP; + case PlainValue.Type.FLOW_SEQ: + case PlainValue.Type.SEQ: + return PlainValue.defaultTags.SEQ; + default: + return PlainValue.defaultTags.STR; + } + } + function resolveTag(doc, node, tagName) { + try { + const res = resolveByTagName(doc, node, tagName); + if (res) { + if (tagName && node.tag) res.tag = tagName; + return res; + } + } catch (error) { + if (!error.source) error.source = node; + doc.errors.push(error); + return null; + } + try { + const fallback = getFallbackTagName(node); + if (!fallback) throw new Error(`The tag ${tagName} is unavailable`); + const msg = `The tag ${tagName} is unavailable, falling back to ${fallback}`; + doc.warnings.push(new PlainValue.YAMLWarning(node, msg)); + const res = resolveByTagName(doc, node, fallback); + res.tag = tagName; + return res; + } catch (error) { + const refError = new PlainValue.YAMLReferenceError(node, error.message); + refError.stack = error.stack; + doc.errors.push(refError); + return null; + } + } + var isCollectionItem = (node) => { + if (!node) return false; + const { + type + } = node; + return type === PlainValue.Type.MAP_KEY || type === PlainValue.Type.MAP_VALUE || type === PlainValue.Type.SEQ_ITEM; + }; + function resolveNodeProps(errors, node) { + const comments = { + before: [], + after: [] + }; + let hasAnchor = false; + let hasTag = false; + const props = isCollectionItem(node.context.parent) ? node.context.parent.props.concat(node.props) : node.props; + for (const { + start, + end + } of props) { + switch (node.context.src[start]) { + case PlainValue.Char.COMMENT: { + if (!node.commentHasRequiredWhitespace(start)) { + const msg = "Comments must be separated from other tokens by white space characters"; + errors.push(new PlainValue.YAMLSemanticError(node, msg)); + } + const { + header, + valueRange + } = node; + const cc = valueRange && (start > valueRange.start || header && start > header.start) ? comments.after : comments.before; + cc.push(node.context.src.slice(start + 1, end)); + break; + } + case PlainValue.Char.ANCHOR: + if (hasAnchor) { + const msg = "A node can have at most one anchor"; + errors.push(new PlainValue.YAMLSemanticError(node, msg)); + } + hasAnchor = true; + break; + case PlainValue.Char.TAG: + if (hasTag) { + const msg = "A node can have at most one tag"; + errors.push(new PlainValue.YAMLSemanticError(node, msg)); + } + hasTag = true; + break; + } + } + return { + comments, + hasAnchor, + hasTag + }; + } + function resolveNodeValue(doc, node) { + const { + anchors, + errors, + schema: schema2 + } = doc; + if (node.type === PlainValue.Type.ALIAS) { + const name = node.rawValue; + const src = anchors.getNode(name); + if (!src) { + const msg = `Aliased anchor not found: ${name}`; + errors.push(new PlainValue.YAMLReferenceError(node, msg)); + return null; + } + const res = new Alias(src); + anchors._cstAliases.push(res); + return res; + } + const tagName = resolveTagName(doc, node); + if (tagName) return resolveTag(doc, node, tagName); + if (node.type !== PlainValue.Type.PLAIN) { + const msg = `Failed to resolve ${node.type} node here`; + errors.push(new PlainValue.YAMLSyntaxError(node, msg)); + return null; + } + try { + const str = resolveString(doc, node); + return resolveScalar(str, schema2.tags, schema2.tags.scalarFallback); + } catch (error) { + if (!error.source) error.source = node; + errors.push(error); + return null; + } + } + function resolveNode(doc, node) { + if (!node) return null; + if (node.error) doc.errors.push(node.error); + const { + comments, + hasAnchor, + hasTag + } = resolveNodeProps(doc.errors, node); + if (hasAnchor) { + const { + anchors + } = doc; + const name = node.anchor; + const prev = anchors.getNode(name); + if (prev) anchors.map[anchors.newName(name)] = prev; + anchors.map[name] = node; + } + if (node.type === PlainValue.Type.ALIAS && (hasAnchor || hasTag)) { + const msg = "An alias node must not specify any properties"; + doc.errors.push(new PlainValue.YAMLSemanticError(node, msg)); + } + const res = resolveNodeValue(doc, node); + if (res) { + res.range = [node.range.start, node.range.end]; + if (doc.options.keepCstNodes) res.cstNode = node; + if (doc.options.keepNodeTypes) res.type = node.type; + const cb = comments.before.join("\n"); + if (cb) { + res.commentBefore = res.commentBefore ? `${res.commentBefore} +${cb}` : cb; + } + const ca = comments.after.join("\n"); + if (ca) res.comment = res.comment ? `${res.comment} +${ca}` : ca; + } + return node.resolved = res; + } + function resolveMap(doc, cst) { + if (cst.type !== PlainValue.Type.MAP && cst.type !== PlainValue.Type.FLOW_MAP) { + const msg = `A ${cst.type} node cannot be resolved as a mapping`; + doc.errors.push(new PlainValue.YAMLSyntaxError(cst, msg)); + return null; + } + const { + comments, + items + } = cst.type === PlainValue.Type.FLOW_MAP ? resolveFlowMapItems(doc, cst) : resolveBlockMapItems(doc, cst); + const map = new YAMLMap(); + map.items = items; + resolveComments(map, comments); + let hasCollectionKey = false; + for (let i = 0; i < items.length; ++i) { + const { + key: iKey + } = items[i]; + if (iKey instanceof Collection) hasCollectionKey = true; + if (doc.schema.merge && iKey && iKey.value === MERGE_KEY) { + items[i] = new Merge(items[i]); + const sources = items[i].value.items; + let error = null; + sources.some((node) => { + if (node instanceof Alias) { + const { + type + } = node.source; + if (type === PlainValue.Type.MAP || type === PlainValue.Type.FLOW_MAP) return false; + return error = "Merge nodes aliases can only point to maps"; + } + return error = "Merge nodes can only have Alias nodes as values"; + }); + if (error) doc.errors.push(new PlainValue.YAMLSemanticError(cst, error)); + } else { + for (let j = i + 1; j < items.length; ++j) { + const { + key: jKey + } = items[j]; + if (iKey === jKey || iKey && jKey && Object.prototype.hasOwnProperty.call(iKey, "value") && iKey.value === jKey.value) { + const msg = `Map keys must be unique; "${iKey}" is repeated`; + doc.errors.push(new PlainValue.YAMLSemanticError(cst, msg)); + break; + } + } + } + } + if (hasCollectionKey && !doc.options.mapAsMap) { + const warn = "Keys with collection values will be stringified as YAML due to JS Object restrictions. Use mapAsMap: true to avoid this."; + doc.warnings.push(new PlainValue.YAMLWarning(cst, warn)); + } + cst.resolved = map; + return map; + } + var valueHasPairComment = ({ + context: { + lineStart, + node, + src + }, + props + }) => { + if (props.length === 0) return false; + const { + start + } = props[0]; + if (node && start > node.valueRange.start) return false; + if (src[start] !== PlainValue.Char.COMMENT) return false; + for (let i = lineStart; i < start; ++i) if (src[i] === "\n") return false; + return true; + }; + function resolvePairComment(item, pair) { + if (!valueHasPairComment(item)) return; + const comment = item.getPropValue(0, PlainValue.Char.COMMENT, true); + let found = false; + const cb = pair.value.commentBefore; + if (cb && cb.startsWith(comment)) { + pair.value.commentBefore = cb.substr(comment.length + 1); + found = true; + } else { + const cc = pair.value.comment; + if (!item.node && cc && cc.startsWith(comment)) { + pair.value.comment = cc.substr(comment.length + 1); + found = true; + } + } + if (found) pair.comment = comment; + } + function resolveBlockMapItems(doc, cst) { + const comments = []; + const items = []; + let key = void 0; + let keyStart = null; + for (let i = 0; i < cst.items.length; ++i) { + const item = cst.items[i]; + switch (item.type) { + case PlainValue.Type.BLANK_LINE: + comments.push({ + afterKey: !!key, + before: items.length + }); + break; + case PlainValue.Type.COMMENT: + comments.push({ + afterKey: !!key, + before: items.length, + comment: item.comment + }); + break; + case PlainValue.Type.MAP_KEY: + if (key !== void 0) items.push(new Pair(key)); + if (item.error) doc.errors.push(item.error); + key = resolveNode(doc, item.node); + keyStart = null; + break; + case PlainValue.Type.MAP_VALUE: + { + if (key === void 0) key = null; + if (item.error) doc.errors.push(item.error); + if (!item.context.atLineStart && item.node && item.node.type === PlainValue.Type.MAP && !item.node.context.atLineStart) { + const msg = "Nested mappings are not allowed in compact mappings"; + doc.errors.push(new PlainValue.YAMLSemanticError(item.node, msg)); + } + let valueNode = item.node; + if (!valueNode && item.props.length > 0) { + valueNode = new PlainValue.PlainValue(PlainValue.Type.PLAIN, []); + valueNode.context = { + parent: item, + src: item.context.src + }; + const pos = item.range.start + 1; + valueNode.range = { + start: pos, + end: pos + }; + valueNode.valueRange = { + start: pos, + end: pos + }; + if (typeof item.range.origStart === "number") { + const origPos = item.range.origStart + 1; + valueNode.range.origStart = valueNode.range.origEnd = origPos; + valueNode.valueRange.origStart = valueNode.valueRange.origEnd = origPos; + } + } + const pair = new Pair(key, resolveNode(doc, valueNode)); + resolvePairComment(item, pair); + items.push(pair); + if (key && typeof keyStart === "number") { + if (item.range.start > keyStart + 1024) doc.errors.push(getLongKeyError(cst, key)); + } + key = void 0; + keyStart = null; + } + break; + default: + if (key !== void 0) items.push(new Pair(key)); + key = resolveNode(doc, item); + keyStart = item.range.start; + if (item.error) doc.errors.push(item.error); + next: for (let j = i + 1; ; ++j) { + const nextItem = cst.items[j]; + switch (nextItem && nextItem.type) { + case PlainValue.Type.BLANK_LINE: + case PlainValue.Type.COMMENT: + continue next; + case PlainValue.Type.MAP_VALUE: + break next; + default: { + const msg = "Implicit map keys need to be followed by map values"; + doc.errors.push(new PlainValue.YAMLSemanticError(item, msg)); + break next; + } + } + } + if (item.valueRangeContainsNewline) { + const msg = "Implicit map keys need to be on a single line"; + doc.errors.push(new PlainValue.YAMLSemanticError(item, msg)); + } + } + } + if (key !== void 0) items.push(new Pair(key)); + return { + comments, + items + }; + } + function resolveFlowMapItems(doc, cst) { + const comments = []; + const items = []; + let key = void 0; + let explicitKey = false; + let next = "{"; + for (let i = 0; i < cst.items.length; ++i) { + const item = cst.items[i]; + if (typeof item.char === "string") { + const { + char, + offset + } = item; + if (char === "?" && key === void 0 && !explicitKey) { + explicitKey = true; + next = ":"; + continue; + } + if (char === ":") { + if (key === void 0) key = null; + if (next === ":") { + next = ","; + continue; + } + } else { + if (explicitKey) { + if (key === void 0 && char !== ",") key = null; + explicitKey = false; + } + if (key !== void 0) { + items.push(new Pair(key)); + key = void 0; + if (char === ",") { + next = ":"; + continue; + } + } + } + if (char === "}") { + if (i === cst.items.length - 1) continue; + } else if (char === next) { + next = ":"; + continue; + } + const msg = `Flow map contains an unexpected ${char}`; + const err = new PlainValue.YAMLSyntaxError(cst, msg); + err.offset = offset; + doc.errors.push(err); + } else if (item.type === PlainValue.Type.BLANK_LINE) { + comments.push({ + afterKey: !!key, + before: items.length + }); + } else if (item.type === PlainValue.Type.COMMENT) { + checkFlowCommentSpace(doc.errors, item); + comments.push({ + afterKey: !!key, + before: items.length, + comment: item.comment + }); + } else if (key === void 0) { + if (next === ",") doc.errors.push(new PlainValue.YAMLSemanticError(item, "Separator , missing in flow map")); + key = resolveNode(doc, item); + } else { + if (next !== ",") doc.errors.push(new PlainValue.YAMLSemanticError(item, "Indicator : missing in flow map entry")); + items.push(new Pair(key, resolveNode(doc, item))); + key = void 0; + explicitKey = false; + } + } + checkFlowCollectionEnd(doc.errors, cst); + if (key !== void 0) items.push(new Pair(key)); + return { + comments, + items + }; + } + function resolveSeq(doc, cst) { + if (cst.type !== PlainValue.Type.SEQ && cst.type !== PlainValue.Type.FLOW_SEQ) { + const msg = `A ${cst.type} node cannot be resolved as a sequence`; + doc.errors.push(new PlainValue.YAMLSyntaxError(cst, msg)); + return null; + } + const { + comments, + items + } = cst.type === PlainValue.Type.FLOW_SEQ ? resolveFlowSeqItems(doc, cst) : resolveBlockSeqItems(doc, cst); + const seq = new YAMLSeq(); + seq.items = items; + resolveComments(seq, comments); + if (!doc.options.mapAsMap && items.some((it) => it instanceof Pair && it.key instanceof Collection)) { + const warn = "Keys with collection values will be stringified as YAML due to JS Object restrictions. Use mapAsMap: true to avoid this."; + doc.warnings.push(new PlainValue.YAMLWarning(cst, warn)); + } + cst.resolved = seq; + return seq; + } + function resolveBlockSeqItems(doc, cst) { + const comments = []; + const items = []; + for (let i = 0; i < cst.items.length; ++i) { + const item = cst.items[i]; + switch (item.type) { + case PlainValue.Type.BLANK_LINE: + comments.push({ + before: items.length + }); + break; + case PlainValue.Type.COMMENT: + comments.push({ + comment: item.comment, + before: items.length + }); + break; + case PlainValue.Type.SEQ_ITEM: + if (item.error) doc.errors.push(item.error); + items.push(resolveNode(doc, item.node)); + if (item.hasProps) { + const msg = "Sequence items cannot have tags or anchors before the - indicator"; + doc.errors.push(new PlainValue.YAMLSemanticError(item, msg)); + } + break; + default: + if (item.error) doc.errors.push(item.error); + doc.errors.push(new PlainValue.YAMLSyntaxError(item, `Unexpected ${item.type} node in sequence`)); + } + } + return { + comments, + items + }; + } + function resolveFlowSeqItems(doc, cst) { + const comments = []; + const items = []; + let explicitKey = false; + let key = void 0; + let keyStart = null; + let next = "["; + let prevItem = null; + for (let i = 0; i < cst.items.length; ++i) { + const item = cst.items[i]; + if (typeof item.char === "string") { + const { + char, + offset + } = item; + if (char !== ":" && (explicitKey || key !== void 0)) { + if (explicitKey && key === void 0) key = next ? items.pop() : null; + items.push(new Pair(key)); + explicitKey = false; + key = void 0; + keyStart = null; + } + if (char === next) { + next = null; + } else if (!next && char === "?") { + explicitKey = true; + } else if (next !== "[" && char === ":" && key === void 0) { + if (next === ",") { + key = items.pop(); + if (key instanceof Pair) { + const msg = "Chaining flow sequence pairs is invalid"; + const err = new PlainValue.YAMLSemanticError(cst, msg); + err.offset = offset; + doc.errors.push(err); + } + if (!explicitKey && typeof keyStart === "number") { + const keyEnd = item.range ? item.range.start : item.offset; + if (keyEnd > keyStart + 1024) doc.errors.push(getLongKeyError(cst, key)); + const { + src + } = prevItem.context; + for (let i2 = keyStart; i2 < keyEnd; ++i2) if (src[i2] === "\n") { + const msg = "Implicit keys of flow sequence pairs need to be on a single line"; + doc.errors.push(new PlainValue.YAMLSemanticError(prevItem, msg)); + break; + } + } + } else { + key = null; + } + keyStart = null; + explicitKey = false; + next = null; + } else if (next === "[" || char !== "]" || i < cst.items.length - 1) { + const msg = `Flow sequence contains an unexpected ${char}`; + const err = new PlainValue.YAMLSyntaxError(cst, msg); + err.offset = offset; + doc.errors.push(err); + } + } else if (item.type === PlainValue.Type.BLANK_LINE) { + comments.push({ + before: items.length + }); + } else if (item.type === PlainValue.Type.COMMENT) { + checkFlowCommentSpace(doc.errors, item); + comments.push({ + comment: item.comment, + before: items.length + }); + } else { + if (next) { + const msg = `Expected a ${next} in flow sequence`; + doc.errors.push(new PlainValue.YAMLSemanticError(item, msg)); + } + const value = resolveNode(doc, item); + if (key === void 0) { + items.push(value); + prevItem = item; + } else { + items.push(new Pair(key, value)); + key = void 0; + } + keyStart = item.range.start; + next = ","; + } + } + checkFlowCollectionEnd(doc.errors, cst); + if (key !== void 0) items.push(new Pair(key)); + return { + comments, + items + }; + } + exports2.Alias = Alias; + exports2.Collection = Collection; + exports2.Merge = Merge; + exports2.Node = Node; + exports2.Pair = Pair; + exports2.Scalar = Scalar; + exports2.YAMLMap = YAMLMap; + exports2.YAMLSeq = YAMLSeq; + exports2.addComment = addComment; + exports2.binaryOptions = binaryOptions; + exports2.boolOptions = boolOptions; + exports2.findPair = findPair; + exports2.intOptions = intOptions; + exports2.isEmptyPath = isEmptyPath; + exports2.nullOptions = nullOptions; + exports2.resolveMap = resolveMap; + exports2.resolveNode = resolveNode; + exports2.resolveSeq = resolveSeq; + exports2.resolveString = resolveString; + exports2.strOptions = strOptions; + exports2.stringifyNumber = stringifyNumber; + exports2.stringifyString = stringifyString; + exports2.toJSON = toJSON; + } +}); + +// ../../node_modules/openapi-to-postmanv2/node_modules/yaml/dist/warnings-1000a372.js +var require_warnings_1000a3722 = __commonJS({ + "../../node_modules/openapi-to-postmanv2/node_modules/yaml/dist/warnings-1000a372.js"(exports2) { + "use strict"; + var PlainValue = require_PlainValue_ec8e588e2(); + var resolveSeq = require_resolveSeq_d03cb0372(); + var binary = { + identify: (value) => value instanceof Uint8Array, + // Buffer inherits from Uint8Array + default: false, + tag: "tag:yaml.org,2002:binary", + /** + * Returns a Buffer in node and an Uint8Array in browsers + * + * To use the resulting buffer as an image, you'll want to do something like: + * + * const blob = new Blob([buffer], { type: 'image/jpeg' }) + * document.querySelector('#photo').src = URL.createObjectURL(blob) + */ + resolve: (doc, node) => { + const src = resolveSeq.resolveString(doc, node); + if (typeof Buffer === "function") { + return Buffer.from(src, "base64"); + } else if (typeof atob === "function") { + const str = atob(src.replace(/[\n\r]/g, "")); + const buffer = new Uint8Array(str.length); + for (let i = 0; i < str.length; ++i) buffer[i] = str.charCodeAt(i); + return buffer; + } else { + const msg = "This environment does not support reading binary tags; either Buffer or atob is required"; + doc.errors.push(new PlainValue.YAMLReferenceError(node, msg)); + return null; + } + }, + options: resolveSeq.binaryOptions, + stringify: ({ + comment, + type, + value + }, ctx, onComment, onChompKeep) => { + let src; + if (typeof Buffer === "function") { + src = value instanceof Buffer ? value.toString("base64") : Buffer.from(value.buffer).toString("base64"); + } else if (typeof btoa === "function") { + let s = ""; + for (let i = 0; i < value.length; ++i) s += String.fromCharCode(value[i]); + src = btoa(s); + } else { + throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required"); + } + if (!type) type = resolveSeq.binaryOptions.defaultType; + if (type === PlainValue.Type.QUOTE_DOUBLE) { + value = src; + } else { + const { + lineWidth + } = resolveSeq.binaryOptions; + const n = Math.ceil(src.length / lineWidth); + const lines = new Array(n); + for (let i = 0, o = 0; i < n; ++i, o += lineWidth) { + lines[i] = src.substr(o, lineWidth); + } + value = lines.join(type === PlainValue.Type.BLOCK_LITERAL ? "\n" : " "); + } + return resolveSeq.stringifyString({ + comment, + type, + value + }, ctx, onComment, onChompKeep); + } + }; + function parsePairs(doc, cst) { + const seq = resolveSeq.resolveSeq(doc, cst); + for (let i = 0; i < seq.items.length; ++i) { + let item = seq.items[i]; + if (item instanceof resolveSeq.Pair) continue; + else if (item instanceof resolveSeq.YAMLMap) { + if (item.items.length > 1) { + const msg = "Each pair must have its own sequence indicator"; + throw new PlainValue.YAMLSemanticError(cst, msg); + } + const pair = item.items[0] || new resolveSeq.Pair(); + if (item.commentBefore) pair.commentBefore = pair.commentBefore ? `${item.commentBefore} +${pair.commentBefore}` : item.commentBefore; + if (item.comment) pair.comment = pair.comment ? `${item.comment} +${pair.comment}` : item.comment; + item = pair; + } + seq.items[i] = item instanceof resolveSeq.Pair ? item : new resolveSeq.Pair(item); + } + return seq; + } + function createPairs(schema2, iterable, ctx) { + const pairs2 = new resolveSeq.YAMLSeq(schema2); + pairs2.tag = "tag:yaml.org,2002:pairs"; + for (const it of iterable) { + let key, value; + if (Array.isArray(it)) { + if (it.length === 2) { + key = it[0]; + value = it[1]; + } else throw new TypeError(`Expected [key, value] tuple: ${it}`); + } else if (it && it instanceof Object) { + const keys = Object.keys(it); + if (keys.length === 1) { + key = keys[0]; + value = it[key]; + } else throw new TypeError(`Expected { key: value } tuple: ${it}`); + } else { + key = it; + } + const pair = schema2.createPair(key, value, ctx); + pairs2.items.push(pair); + } + return pairs2; + } + var pairs = { + default: false, + tag: "tag:yaml.org,2002:pairs", + resolve: parsePairs, + createNode: createPairs + }; + var YAMLOMap = class _YAMLOMap extends resolveSeq.YAMLSeq { + constructor() { + super(); + PlainValue._defineProperty(this, "add", resolveSeq.YAMLMap.prototype.add.bind(this)); + PlainValue._defineProperty(this, "delete", resolveSeq.YAMLMap.prototype.delete.bind(this)); + PlainValue._defineProperty(this, "get", resolveSeq.YAMLMap.prototype.get.bind(this)); + PlainValue._defineProperty(this, "has", resolveSeq.YAMLMap.prototype.has.bind(this)); + PlainValue._defineProperty(this, "set", resolveSeq.YAMLMap.prototype.set.bind(this)); + this.tag = _YAMLOMap.tag; + } + toJSON(_2, ctx) { + const map = /* @__PURE__ */ new Map(); + if (ctx && ctx.onCreate) ctx.onCreate(map); + for (const pair of this.items) { + let key, value; + if (pair instanceof resolveSeq.Pair) { + key = resolveSeq.toJSON(pair.key, "", ctx); + value = resolveSeq.toJSON(pair.value, key, ctx); + } else { + key = resolveSeq.toJSON(pair, "", ctx); + } + if (map.has(key)) throw new Error("Ordered maps must not include duplicate keys"); + map.set(key, value); + } + return map; + } + }; + PlainValue._defineProperty(YAMLOMap, "tag", "tag:yaml.org,2002:omap"); + function parseOMap(doc, cst) { + const pairs2 = parsePairs(doc, cst); + const seenKeys = []; + for (const { + key + } of pairs2.items) { + if (key instanceof resolveSeq.Scalar) { + if (seenKeys.includes(key.value)) { + const msg = "Ordered maps must not include duplicate keys"; + throw new PlainValue.YAMLSemanticError(cst, msg); + } else { + seenKeys.push(key.value); + } + } + } + return Object.assign(new YAMLOMap(), pairs2); + } + function createOMap(schema2, iterable, ctx) { + const pairs2 = createPairs(schema2, iterable, ctx); + const omap2 = new YAMLOMap(); + omap2.items = pairs2.items; + return omap2; + } + var omap = { + identify: (value) => value instanceof Map, + nodeClass: YAMLOMap, + default: false, + tag: "tag:yaml.org,2002:omap", + resolve: parseOMap, + createNode: createOMap + }; + var YAMLSet = class _YAMLSet extends resolveSeq.YAMLMap { + constructor() { + super(); + this.tag = _YAMLSet.tag; + } + add(key) { + const pair = key instanceof resolveSeq.Pair ? key : new resolveSeq.Pair(key); + const prev = resolveSeq.findPair(this.items, pair.key); + if (!prev) this.items.push(pair); + } + get(key, keepPair) { + const pair = resolveSeq.findPair(this.items, key); + return !keepPair && pair instanceof resolveSeq.Pair ? pair.key instanceof resolveSeq.Scalar ? pair.key.value : pair.key : pair; + } + set(key, value) { + if (typeof value !== "boolean") throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof value}`); + const prev = resolveSeq.findPair(this.items, key); + if (prev && !value) { + this.items.splice(this.items.indexOf(prev), 1); + } else if (!prev && value) { + this.items.push(new resolveSeq.Pair(key)); + } + } + toJSON(_2, ctx) { + return super.toJSON(_2, ctx, Set); + } + toString(ctx, onComment, onChompKeep) { + if (!ctx) return JSON.stringify(this); + if (this.hasAllNullValues()) return super.toString(ctx, onComment, onChompKeep); + else throw new Error("Set items must all have null values"); + } + }; + PlainValue._defineProperty(YAMLSet, "tag", "tag:yaml.org,2002:set"); + function parseSet(doc, cst) { + const map = resolveSeq.resolveMap(doc, cst); + if (!map.hasAllNullValues()) throw new PlainValue.YAMLSemanticError(cst, "Set items must all have null values"); + return Object.assign(new YAMLSet(), map); + } + function createSet(schema2, iterable, ctx) { + const set2 = new YAMLSet(); + for (const value of iterable) set2.items.push(schema2.createPair(value, null, ctx)); + return set2; + } + var set = { + identify: (value) => value instanceof Set, + nodeClass: YAMLSet, + default: false, + tag: "tag:yaml.org,2002:set", + resolve: parseSet, + createNode: createSet + }; + var parseSexagesimal = (sign, parts) => { + const n = parts.split(":").reduce((n2, p) => n2 * 60 + Number(p), 0); + return sign === "-" ? -n : n; + }; + var stringifySexagesimal = ({ + value + }) => { + if (isNaN(value) || !isFinite(value)) return resolveSeq.stringifyNumber(value); + let sign = ""; + if (value < 0) { + sign = "-"; + value = Math.abs(value); + } + const parts = [value % 60]; + if (value < 60) { + parts.unshift(0); + } else { + value = Math.round((value - parts[0]) / 60); + parts.unshift(value % 60); + if (value >= 60) { + value = Math.round((value - parts[0]) / 60); + parts.unshift(value); + } + } + return sign + parts.map((n) => n < 10 ? "0" + String(n) : String(n)).join(":").replace(/000000\d*$/, ""); + }; + var intTime = { + identify: (value) => typeof value === "number", + default: true, + tag: "tag:yaml.org,2002:int", + format: "TIME", + test: /^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+)$/, + resolve: (str, sign, parts) => parseSexagesimal(sign, parts.replace(/_/g, "")), + stringify: stringifySexagesimal + }; + var floatTime = { + identify: (value) => typeof value === "number", + default: true, + tag: "tag:yaml.org,2002:float", + format: "TIME", + test: /^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*)$/, + resolve: (str, sign, parts) => parseSexagesimal(sign, parts.replace(/_/g, "")), + stringify: stringifySexagesimal + }; + var timestamp = { + identify: (value) => value instanceof Date, + default: true, + tag: "tag:yaml.org,2002:timestamp", + // If the time zone is omitted, the timestamp is assumed to be specified in UTC. The time part + // may be omitted altogether, resulting in a date format. In such a case, the time part is + // assumed to be 00:00:00Z (start of day, UTC). + test: RegExp("^(?:([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?)$"), + resolve: (str, year, month, day, hour, minute, second, millisec, tz) => { + if (millisec) millisec = (millisec + "00").substr(1, 3); + let date = Date.UTC(year, month - 1, day, hour || 0, minute || 0, second || 0, millisec || 0); + if (tz && tz !== "Z") { + let d = parseSexagesimal(tz[0], tz.slice(1)); + if (Math.abs(d) < 30) d *= 60; + date -= 6e4 * d; + } + return new Date(date); + }, + stringify: ({ + value + }) => value.toISOString().replace(/((T00:00)?:00)?\.000Z$/, "") + }; + function shouldWarn(deprecation) { + const env = typeof process !== "undefined" && process.env || {}; + if (deprecation) { + if (typeof YAML_SILENCE_DEPRECATION_WARNINGS !== "undefined") return !YAML_SILENCE_DEPRECATION_WARNINGS; + return !env.YAML_SILENCE_DEPRECATION_WARNINGS; + } + if (typeof YAML_SILENCE_WARNINGS !== "undefined") return !YAML_SILENCE_WARNINGS; + return !env.YAML_SILENCE_WARNINGS; + } + function warn(warning, type) { + if (shouldWarn(false)) { + const emit = typeof process !== "undefined" && process.emitWarning; + if (emit) emit(warning, type); + else { + console.warn(type ? `${type}: ${warning}` : warning); + } + } + } + function warnFileDeprecation(filename) { + if (shouldWarn(true)) { + const path = filename.replace(/.*yaml[/\\]/i, "").replace(/\.js$/, "").replace(/\\/g, "/"); + warn(`The endpoint 'yaml/${path}' will be removed in a future release.`, "DeprecationWarning"); + } + } + var warned = {}; + function warnOptionDeprecation(name, alternative) { + if (!warned[name] && shouldWarn(true)) { + warned[name] = true; + let msg = `The option '${name}' will be removed in a future release`; + msg += alternative ? `, use '${alternative}' instead.` : "."; + warn(msg, "DeprecationWarning"); + } + } + exports2.binary = binary; + exports2.floatTime = floatTime; + exports2.intTime = intTime; + exports2.omap = omap; + exports2.pairs = pairs; + exports2.set = set; + exports2.timestamp = timestamp; + exports2.warn = warn; + exports2.warnFileDeprecation = warnFileDeprecation; + exports2.warnOptionDeprecation = warnOptionDeprecation; + } +}); + +// ../../node_modules/openapi-to-postmanv2/node_modules/yaml/dist/Schema-88e323a7.js +var require_Schema_88e323a72 = __commonJS({ + "../../node_modules/openapi-to-postmanv2/node_modules/yaml/dist/Schema-88e323a7.js"(exports2) { + "use strict"; + var PlainValue = require_PlainValue_ec8e588e2(); + var resolveSeq = require_resolveSeq_d03cb0372(); + var warnings = require_warnings_1000a3722(); + function createMap(schema2, obj, ctx) { + const map2 = new resolveSeq.YAMLMap(schema2); + if (obj instanceof Map) { + for (const [key, value] of obj) map2.items.push(schema2.createPair(key, value, ctx)); + } else if (obj && typeof obj === "object") { + for (const key of Object.keys(obj)) map2.items.push(schema2.createPair(key, obj[key], ctx)); + } + if (typeof schema2.sortMapEntries === "function") { + map2.items.sort(schema2.sortMapEntries); + } + return map2; + } + var map = { + createNode: createMap, + default: true, + nodeClass: resolveSeq.YAMLMap, + tag: "tag:yaml.org,2002:map", + resolve: resolveSeq.resolveMap + }; + function createSeq(schema2, obj, ctx) { + const seq2 = new resolveSeq.YAMLSeq(schema2); + if (obj && obj[Symbol.iterator]) { + for (const it of obj) { + const v = schema2.createNode(it, ctx.wrapScalars, null, ctx); + seq2.items.push(v); + } + } + return seq2; + } + var seq = { + createNode: createSeq, + default: true, + nodeClass: resolveSeq.YAMLSeq, + tag: "tag:yaml.org,2002:seq", + resolve: resolveSeq.resolveSeq + }; + var string = { + identify: (value) => typeof value === "string", + default: true, + tag: "tag:yaml.org,2002:str", + resolve: resolveSeq.resolveString, + stringify(item, ctx, onComment, onChompKeep) { + ctx = Object.assign({ + actualString: true + }, ctx); + return resolveSeq.stringifyString(item, ctx, onComment, onChompKeep); + }, + options: resolveSeq.strOptions + }; + var failsafe = [map, seq, string]; + var intIdentify$2 = (value) => typeof value === "bigint" || Number.isInteger(value); + var intResolve$1 = (src, part, radix) => resolveSeq.intOptions.asBigInt ? BigInt(src) : parseInt(part, radix); + function intStringify$1(node, radix, prefix) { + const { + value + } = node; + if (intIdentify$2(value) && value >= 0) return prefix + value.toString(radix); + return resolveSeq.stringifyNumber(node); + } + var nullObj = { + identify: (value) => value == null, + createNode: (schema2, value, ctx) => ctx.wrapScalars ? new resolveSeq.Scalar(null) : null, + default: true, + tag: "tag:yaml.org,2002:null", + test: /^(?:~|[Nn]ull|NULL)?$/, + resolve: () => null, + options: resolveSeq.nullOptions, + stringify: () => resolveSeq.nullOptions.nullStr + }; + var boolObj = { + identify: (value) => typeof value === "boolean", + default: true, + tag: "tag:yaml.org,2002:bool", + test: /^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/, + resolve: (str) => str[0] === "t" || str[0] === "T", + options: resolveSeq.boolOptions, + stringify: ({ + value + }) => value ? resolveSeq.boolOptions.trueStr : resolveSeq.boolOptions.falseStr + }; + var octObj = { + identify: (value) => intIdentify$2(value) && value >= 0, + default: true, + tag: "tag:yaml.org,2002:int", + format: "OCT", + test: /^0o([0-7]+)$/, + resolve: (str, oct) => intResolve$1(str, oct, 8), + options: resolveSeq.intOptions, + stringify: (node) => intStringify$1(node, 8, "0o") + }; + var intObj = { + identify: intIdentify$2, + default: true, + tag: "tag:yaml.org,2002:int", + test: /^[-+]?[0-9]+$/, + resolve: (str) => intResolve$1(str, str, 10), + options: resolveSeq.intOptions, + stringify: resolveSeq.stringifyNumber + }; + var hexObj = { + identify: (value) => intIdentify$2(value) && value >= 0, + default: true, + tag: "tag:yaml.org,2002:int", + format: "HEX", + test: /^0x([0-9a-fA-F]+)$/, + resolve: (str, hex) => intResolve$1(str, hex, 16), + options: resolveSeq.intOptions, + stringify: (node) => intStringify$1(node, 16, "0x") + }; + var nanObj = { + identify: (value) => typeof value === "number", + default: true, + tag: "tag:yaml.org,2002:float", + test: /^(?:[-+]?\.inf|(\.nan))$/i, + resolve: (str, nan) => nan ? NaN : str[0] === "-" ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY, + stringify: resolveSeq.stringifyNumber + }; + var expObj = { + identify: (value) => typeof value === "number", + default: true, + tag: "tag:yaml.org,2002:float", + format: "EXP", + test: /^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/, + resolve: (str) => parseFloat(str), + stringify: ({ + value + }) => Number(value).toExponential() + }; + var floatObj = { + identify: (value) => typeof value === "number", + default: true, + tag: "tag:yaml.org,2002:float", + test: /^[-+]?(?:\.([0-9]+)|[0-9]+\.([0-9]*))$/, + resolve(str, frac1, frac2) { + const frac = frac1 || frac2; + const node = new resolveSeq.Scalar(parseFloat(str)); + if (frac && frac[frac.length - 1] === "0") node.minFractionDigits = frac.length; + return node; + }, + stringify: resolveSeq.stringifyNumber + }; + var core = failsafe.concat([nullObj, boolObj, octObj, intObj, hexObj, nanObj, expObj, floatObj]); + var intIdentify$1 = (value) => typeof value === "bigint" || Number.isInteger(value); + var stringifyJSON = ({ + value + }) => JSON.stringify(value); + var json = [map, seq, { + identify: (value) => typeof value === "string", + default: true, + tag: "tag:yaml.org,2002:str", + resolve: resolveSeq.resolveString, + stringify: stringifyJSON + }, { + identify: (value) => value == null, + createNode: (schema2, value, ctx) => ctx.wrapScalars ? new resolveSeq.Scalar(null) : null, + default: true, + tag: "tag:yaml.org,2002:null", + test: /^null$/, + resolve: () => null, + stringify: stringifyJSON + }, { + identify: (value) => typeof value === "boolean", + default: true, + tag: "tag:yaml.org,2002:bool", + test: /^true|false$/, + resolve: (str) => str === "true", + stringify: stringifyJSON + }, { + identify: intIdentify$1, + default: true, + tag: "tag:yaml.org,2002:int", + test: /^-?(?:0|[1-9][0-9]*)$/, + resolve: (str) => resolveSeq.intOptions.asBigInt ? BigInt(str) : parseInt(str, 10), + stringify: ({ + value + }) => intIdentify$1(value) ? value.toString() : JSON.stringify(value) + }, { + identify: (value) => typeof value === "number", + default: true, + tag: "tag:yaml.org,2002:float", + test: /^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/, + resolve: (str) => parseFloat(str), + stringify: stringifyJSON + }]; + json.scalarFallback = (str) => { + throw new SyntaxError(`Unresolved plain scalar ${JSON.stringify(str)}`); + }; + var boolStringify = ({ + value + }) => value ? resolveSeq.boolOptions.trueStr : resolveSeq.boolOptions.falseStr; + var intIdentify = (value) => typeof value === "bigint" || Number.isInteger(value); + function intResolve(sign, src, radix) { + let str = src.replace(/_/g, ""); + if (resolveSeq.intOptions.asBigInt) { + switch (radix) { + case 2: + str = `0b${str}`; + break; + case 8: + str = `0o${str}`; + break; + case 16: + str = `0x${str}`; + break; + } + const n2 = BigInt(str); + return sign === "-" ? BigInt(-1) * n2 : n2; + } + const n = parseInt(str, radix); + return sign === "-" ? -1 * n : n; + } + function intStringify(node, radix, prefix) { + const { + value + } = node; + if (intIdentify(value)) { + const str = value.toString(radix); + return value < 0 ? "-" + prefix + str.substr(1) : prefix + str; + } + return resolveSeq.stringifyNumber(node); + } + var yaml11 = failsafe.concat([{ + identify: (value) => value == null, + createNode: (schema2, value, ctx) => ctx.wrapScalars ? new resolveSeq.Scalar(null) : null, + default: true, + tag: "tag:yaml.org,2002:null", + test: /^(?:~|[Nn]ull|NULL)?$/, + resolve: () => null, + options: resolveSeq.nullOptions, + stringify: () => resolveSeq.nullOptions.nullStr + }, { + identify: (value) => typeof value === "boolean", + default: true, + tag: "tag:yaml.org,2002:bool", + test: /^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/, + resolve: () => true, + options: resolveSeq.boolOptions, + stringify: boolStringify + }, { + identify: (value) => typeof value === "boolean", + default: true, + tag: "tag:yaml.org,2002:bool", + test: /^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/i, + resolve: () => false, + options: resolveSeq.boolOptions, + stringify: boolStringify + }, { + identify: intIdentify, + default: true, + tag: "tag:yaml.org,2002:int", + format: "BIN", + test: /^([-+]?)0b([0-1_]+)$/, + resolve: (str, sign, bin) => intResolve(sign, bin, 2), + stringify: (node) => intStringify(node, 2, "0b") + }, { + identify: intIdentify, + default: true, + tag: "tag:yaml.org,2002:int", + format: "OCT", + test: /^([-+]?)0([0-7_]+)$/, + resolve: (str, sign, oct) => intResolve(sign, oct, 8), + stringify: (node) => intStringify(node, 8, "0") + }, { + identify: intIdentify, + default: true, + tag: "tag:yaml.org,2002:int", + test: /^([-+]?)([0-9][0-9_]*)$/, + resolve: (str, sign, abs) => intResolve(sign, abs, 10), + stringify: resolveSeq.stringifyNumber + }, { + identify: intIdentify, + default: true, + tag: "tag:yaml.org,2002:int", + format: "HEX", + test: /^([-+]?)0x([0-9a-fA-F_]+)$/, + resolve: (str, sign, hex) => intResolve(sign, hex, 16), + stringify: (node) => intStringify(node, 16, "0x") + }, { + identify: (value) => typeof value === "number", + default: true, + tag: "tag:yaml.org,2002:float", + test: /^(?:[-+]?\.inf|(\.nan))$/i, + resolve: (str, nan) => nan ? NaN : str[0] === "-" ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY, + stringify: resolveSeq.stringifyNumber + }, { + identify: (value) => typeof value === "number", + default: true, + tag: "tag:yaml.org,2002:float", + format: "EXP", + test: /^[-+]?([0-9][0-9_]*)?(\.[0-9_]*)?[eE][-+]?[0-9]+$/, + resolve: (str) => parseFloat(str.replace(/_/g, "")), + stringify: ({ + value + }) => Number(value).toExponential() + }, { + identify: (value) => typeof value === "number", + default: true, + tag: "tag:yaml.org,2002:float", + test: /^[-+]?(?:[0-9][0-9_]*)?\.([0-9_]*)$/, + resolve(str, frac) { + const node = new resolveSeq.Scalar(parseFloat(str.replace(/_/g, ""))); + if (frac) { + const f = frac.replace(/_/g, ""); + if (f[f.length - 1] === "0") node.minFractionDigits = f.length; + } + return node; + }, + stringify: resolveSeq.stringifyNumber + }], warnings.binary, warnings.omap, warnings.pairs, warnings.set, warnings.intTime, warnings.floatTime, warnings.timestamp); + var schemas = { + core, + failsafe, + json, + yaml11 + }; + var tags = { + binary: warnings.binary, + bool: boolObj, + float: floatObj, + floatExp: expObj, + floatNaN: nanObj, + floatTime: warnings.floatTime, + int: intObj, + intHex: hexObj, + intOct: octObj, + intTime: warnings.intTime, + map, + null: nullObj, + omap: warnings.omap, + pairs: warnings.pairs, + seq, + set: warnings.set, + timestamp: warnings.timestamp + }; + function findTagObject(value, tagName, tags2) { + if (tagName) { + const match = tags2.filter((t) => t.tag === tagName); + const tagObj = match.find((t) => !t.format) || match[0]; + if (!tagObj) throw new Error(`Tag ${tagName} not found`); + return tagObj; + } + return tags2.find((t) => (t.identify && t.identify(value) || t.class && value instanceof t.class) && !t.format); + } + function createNode(value, tagName, ctx) { + if (value instanceof resolveSeq.Node) return value; + const { + defaultPrefix, + onTagObj, + prevObjects, + schema: schema2, + wrapScalars + } = ctx; + if (tagName && tagName.startsWith("!!")) tagName = defaultPrefix + tagName.slice(2); + let tagObj = findTagObject(value, tagName, schema2.tags); + if (!tagObj) { + if (typeof value.toJSON === "function") value = value.toJSON(); + if (!value || typeof value !== "object") return wrapScalars ? new resolveSeq.Scalar(value) : value; + tagObj = value instanceof Map ? map : value[Symbol.iterator] ? seq : map; + } + if (onTagObj) { + onTagObj(tagObj); + delete ctx.onTagObj; + } + const obj = { + value: void 0, + node: void 0 + }; + if (value && typeof value === "object" && prevObjects) { + const prev = prevObjects.get(value); + if (prev) { + const alias = new resolveSeq.Alias(prev); + ctx.aliasNodes.push(alias); + return alias; + } + obj.value = value; + prevObjects.set(value, obj); + } + obj.node = tagObj.createNode ? tagObj.createNode(ctx.schema, value, ctx) : wrapScalars ? new resolveSeq.Scalar(value) : value; + if (tagName && obj.node instanceof resolveSeq.Node) obj.node.tag = tagName; + return obj.node; + } + function getSchemaTags(schemas2, knownTags, customTags, schemaId) { + let tags2 = schemas2[schemaId.replace(/\W/g, "")]; + if (!tags2) { + const keys = Object.keys(schemas2).map((key) => JSON.stringify(key)).join(", "); + throw new Error(`Unknown schema "${schemaId}"; use one of ${keys}`); + } + if (Array.isArray(customTags)) { + for (const tag of customTags) tags2 = tags2.concat(tag); + } else if (typeof customTags === "function") { + tags2 = customTags(tags2.slice()); + } + for (let i = 0; i < tags2.length; ++i) { + const tag = tags2[i]; + if (typeof tag === "string") { + const tagObj = knownTags[tag]; + if (!tagObj) { + const keys = Object.keys(knownTags).map((key) => JSON.stringify(key)).join(", "); + throw new Error(`Unknown custom tag "${tag}"; use one of ${keys}`); + } + tags2[i] = tagObj; + } + } + return tags2; + } + var sortMapEntriesByKey = (a, b) => a.key < b.key ? -1 : a.key > b.key ? 1 : 0; + var Schema = class _Schema { + // TODO: remove in v2 + // TODO: remove in v2 + constructor({ + customTags, + merge, + schema: schema2, + sortMapEntries, + tags: deprecatedCustomTags + }) { + this.merge = !!merge; + this.name = schema2; + this.sortMapEntries = sortMapEntries === true ? sortMapEntriesByKey : sortMapEntries || null; + if (!customTags && deprecatedCustomTags) warnings.warnOptionDeprecation("tags", "customTags"); + this.tags = getSchemaTags(schemas, tags, customTags || deprecatedCustomTags, schema2); + } + createNode(value, wrapScalars, tagName, ctx) { + const baseCtx = { + defaultPrefix: _Schema.defaultPrefix, + schema: this, + wrapScalars + }; + const createCtx = ctx ? Object.assign(ctx, baseCtx) : baseCtx; + return createNode(value, tagName, createCtx); + } + createPair(key, value, ctx) { + if (!ctx) ctx = { + wrapScalars: true + }; + const k = this.createNode(key, ctx.wrapScalars, null, ctx); + const v = this.createNode(value, ctx.wrapScalars, null, ctx); + return new resolveSeq.Pair(k, v); + } + }; + PlainValue._defineProperty(Schema, "defaultPrefix", PlainValue.defaultTagPrefix); + PlainValue._defineProperty(Schema, "defaultTags", PlainValue.defaultTags); + exports2.Schema = Schema; + } +}); + +// ../../node_modules/openapi-to-postmanv2/node_modules/yaml/dist/Document-9b4560a1.js +var require_Document_9b4560a12 = __commonJS({ + "../../node_modules/openapi-to-postmanv2/node_modules/yaml/dist/Document-9b4560a1.js"(exports2) { + "use strict"; + var PlainValue = require_PlainValue_ec8e588e2(); + var resolveSeq = require_resolveSeq_d03cb0372(); + var Schema = require_Schema_88e323a72(); + var defaultOptions = { + anchorPrefix: "a", + customTags: null, + indent: 2, + indentSeq: true, + keepCstNodes: false, + keepNodeTypes: true, + keepBlobsInJSON: true, + mapAsMap: false, + maxAliasCount: 100, + prettyErrors: false, + // TODO Set true in v2 + simpleKeys: false, + version: "1.2" + }; + var scalarOptions = { + get binary() { + return resolveSeq.binaryOptions; + }, + set binary(opt) { + Object.assign(resolveSeq.binaryOptions, opt); + }, + get bool() { + return resolveSeq.boolOptions; + }, + set bool(opt) { + Object.assign(resolveSeq.boolOptions, opt); + }, + get int() { + return resolveSeq.intOptions; + }, + set int(opt) { + Object.assign(resolveSeq.intOptions, opt); + }, + get null() { + return resolveSeq.nullOptions; + }, + set null(opt) { + Object.assign(resolveSeq.nullOptions, opt); + }, + get str() { + return resolveSeq.strOptions; + }, + set str(opt) { + Object.assign(resolveSeq.strOptions, opt); + } + }; + var documentOptions = { + "1.0": { + schema: "yaml-1.1", + merge: true, + tagPrefixes: [{ + handle: "!", + prefix: PlainValue.defaultTagPrefix + }, { + handle: "!!", + prefix: "tag:private.yaml.org,2002:" + }] + }, + 1.1: { + schema: "yaml-1.1", + merge: true, + tagPrefixes: [{ + handle: "!", + prefix: "!" + }, { + handle: "!!", + prefix: PlainValue.defaultTagPrefix + }] + }, + 1.2: { + schema: "core", + merge: false, + tagPrefixes: [{ + handle: "!", + prefix: "!" + }, { + handle: "!!", + prefix: PlainValue.defaultTagPrefix + }] + } + }; + function stringifyTag(doc, tag) { + if ((doc.version || doc.options.version) === "1.0") { + const priv = tag.match(/^tag:private\.yaml\.org,2002:([^:/]+)$/); + if (priv) return "!" + priv[1]; + const vocab = tag.match(/^tag:([a-zA-Z0-9-]+)\.yaml\.org,2002:(.*)/); + return vocab ? `!${vocab[1]}/${vocab[2]}` : `!${tag.replace(/^tag:/, "")}`; + } + let p = doc.tagPrefixes.find((p2) => tag.indexOf(p2.prefix) === 0); + if (!p) { + const dtp = doc.getDefaults().tagPrefixes; + p = dtp && dtp.find((p2) => tag.indexOf(p2.prefix) === 0); + } + if (!p) return tag[0] === "!" ? tag : `!<${tag}>`; + const suffix = tag.substr(p.prefix.length).replace(/[!,[\]{}]/g, (ch) => ({ + "!": "%21", + ",": "%2C", + "[": "%5B", + "]": "%5D", + "{": "%7B", + "}": "%7D" + })[ch]); + return p.handle + suffix; + } + function getTagObject(tags, item) { + if (item instanceof resolveSeq.Alias) return resolveSeq.Alias; + if (item.tag) { + const match = tags.filter((t) => t.tag === item.tag); + if (match.length > 0) return match.find((t) => t.format === item.format) || match[0]; + } + let tagObj, obj; + if (item instanceof resolveSeq.Scalar) { + obj = item.value; + const match = tags.filter((t) => t.identify && t.identify(obj) || t.class && obj instanceof t.class); + tagObj = match.find((t) => t.format === item.format) || match.find((t) => !t.format); + } else { + obj = item; + tagObj = tags.find((t) => t.nodeClass && obj instanceof t.nodeClass); + } + if (!tagObj) { + const name = obj && obj.constructor ? obj.constructor.name : typeof obj; + throw new Error(`Tag not resolved for ${name} value`); + } + return tagObj; + } + function stringifyProps(node, tagObj, { + anchors, + doc + }) { + const props = []; + const anchor = doc.anchors.getName(node); + if (anchor) { + anchors[anchor] = node; + props.push(`&${anchor}`); + } + if (node.tag) { + props.push(stringifyTag(doc, node.tag)); + } else if (!tagObj.default) { + props.push(stringifyTag(doc, tagObj.tag)); + } + return props.join(" "); + } + function stringify2(item, ctx, onComment, onChompKeep) { + const { + anchors, + schema: schema2 + } = ctx.doc; + let tagObj; + if (!(item instanceof resolveSeq.Node)) { + const createCtx = { + aliasNodes: [], + onTagObj: (o) => tagObj = o, + prevObjects: /* @__PURE__ */ new Map() + }; + item = schema2.createNode(item, true, null, createCtx); + for (const alias of createCtx.aliasNodes) { + alias.source = alias.source.node; + let name = anchors.getName(alias.source); + if (!name) { + name = anchors.newName(); + anchors.map[name] = alias.source; + } + } + } + if (item instanceof resolveSeq.Pair) return item.toString(ctx, onComment, onChompKeep); + if (!tagObj) tagObj = getTagObject(schema2.tags, item); + const props = stringifyProps(item, tagObj, ctx); + if (props.length > 0) ctx.indentAtStart = (ctx.indentAtStart || 0) + props.length + 1; + const str = typeof tagObj.stringify === "function" ? tagObj.stringify(item, ctx, onComment, onChompKeep) : item instanceof resolveSeq.Scalar ? resolveSeq.stringifyString(item, ctx, onComment, onChompKeep) : item.toString(ctx, onComment, onChompKeep); + if (!props) return str; + return item instanceof resolveSeq.Scalar || str[0] === "{" || str[0] === "[" ? `${props} ${str}` : `${props} +${ctx.indent}${str}`; + } + var Anchors = class _Anchors { + static validAnchorNode(node) { + return node instanceof resolveSeq.Scalar || node instanceof resolveSeq.YAMLSeq || node instanceof resolveSeq.YAMLMap; + } + constructor(prefix) { + PlainValue._defineProperty(this, "map", /* @__PURE__ */ Object.create(null)); + this.prefix = prefix; + } + createAlias(node, name) { + this.setAnchor(node, name); + return new resolveSeq.Alias(node); + } + createMergePair(...sources) { + const merge = new resolveSeq.Merge(); + merge.value.items = sources.map((s) => { + if (s instanceof resolveSeq.Alias) { + if (s.source instanceof resolveSeq.YAMLMap) return s; + } else if (s instanceof resolveSeq.YAMLMap) { + return this.createAlias(s); + } + throw new Error("Merge sources must be Map nodes or their Aliases"); + }); + return merge; + } + getName(node) { + const { + map + } = this; + return Object.keys(map).find((a) => map[a] === node); + } + getNames() { + return Object.keys(this.map); + } + getNode(name) { + return this.map[name]; + } + newName(prefix) { + if (!prefix) prefix = this.prefix; + const names = Object.keys(this.map); + for (let i = 1; true; ++i) { + const name = `${prefix}${i}`; + if (!names.includes(name)) return name; + } + } + // During parsing, map & aliases contain CST nodes + resolveNodes() { + const { + map, + _cstAliases + } = this; + Object.keys(map).forEach((a) => { + map[a] = map[a].resolved; + }); + _cstAliases.forEach((a) => { + a.source = a.source.resolved; + }); + delete this._cstAliases; + } + setAnchor(node, name) { + if (node != null && !_Anchors.validAnchorNode(node)) { + throw new Error("Anchors may only be set for Scalar, Seq and Map nodes"); + } + if (name && /[\x00-\x19\s,[\]{}]/.test(name)) { + throw new Error("Anchor names must not contain whitespace or control characters"); + } + const { + map + } = this; + const prev = node && Object.keys(map).find((a) => map[a] === node); + if (prev) { + if (!name) { + return prev; + } else if (prev !== name) { + delete map[prev]; + map[name] = node; + } + } else { + if (!name) { + if (!node) return null; + name = this.newName(); + } + map[name] = node; + } + return name; + } + }; + var visit = (node, tags) => { + if (node && typeof node === "object") { + const { + tag + } = node; + if (node instanceof resolveSeq.Collection) { + if (tag) tags[tag] = true; + node.items.forEach((n) => visit(n, tags)); + } else if (node instanceof resolveSeq.Pair) { + visit(node.key, tags); + visit(node.value, tags); + } else if (node instanceof resolveSeq.Scalar) { + if (tag) tags[tag] = true; + } + } + return tags; + }; + var listTagNames = (node) => Object.keys(visit(node, {})); + function parseContents(doc, contents) { + const comments = { + before: [], + after: [] + }; + let body = void 0; + let spaceBefore = false; + for (const node of contents) { + if (node.valueRange) { + if (body !== void 0) { + const msg = "Document contains trailing content not separated by a ... or --- line"; + doc.errors.push(new PlainValue.YAMLSyntaxError(node, msg)); + break; + } + const res = resolveSeq.resolveNode(doc, node); + if (spaceBefore) { + res.spaceBefore = true; + spaceBefore = false; + } + body = res; + } else if (node.comment !== null) { + const cc = body === void 0 ? comments.before : comments.after; + cc.push(node.comment); + } else if (node.type === PlainValue.Type.BLANK_LINE) { + spaceBefore = true; + if (body === void 0 && comments.before.length > 0 && !doc.commentBefore) { + doc.commentBefore = comments.before.join("\n"); + comments.before = []; + } + } + } + doc.contents = body || null; + if (!body) { + doc.comment = comments.before.concat(comments.after).join("\n") || null; + } else { + const cb = comments.before.join("\n"); + if (cb) { + const cbNode = body instanceof resolveSeq.Collection && body.items[0] ? body.items[0] : body; + cbNode.commentBefore = cbNode.commentBefore ? `${cb} +${cbNode.commentBefore}` : cb; + } + doc.comment = comments.after.join("\n") || null; + } + } + function resolveTagDirective({ + tagPrefixes + }, directive) { + const [handle, prefix] = directive.parameters; + if (!handle || !prefix) { + const msg = "Insufficient parameters given for %TAG directive"; + throw new PlainValue.YAMLSemanticError(directive, msg); + } + if (tagPrefixes.some((p) => p.handle === handle)) { + const msg = "The %TAG directive must only be given at most once per handle in the same document."; + throw new PlainValue.YAMLSemanticError(directive, msg); + } + return { + handle, + prefix + }; + } + function resolveYamlDirective(doc, directive) { + let [version2] = directive.parameters; + if (directive.name === "YAML:1.0") version2 = "1.0"; + if (!version2) { + const msg = "Insufficient parameters given for %YAML directive"; + throw new PlainValue.YAMLSemanticError(directive, msg); + } + if (!documentOptions[version2]) { + const v0 = doc.version || doc.options.version; + const msg = `Document will be parsed as YAML ${v0} rather than YAML ${version2}`; + doc.warnings.push(new PlainValue.YAMLWarning(directive, msg)); + } + return version2; + } + function parseDirectives(doc, directives, prevDoc) { + const directiveComments = []; + let hasDirectives = false; + for (const directive of directives) { + const { + comment, + name + } = directive; + switch (name) { + case "TAG": + try { + doc.tagPrefixes.push(resolveTagDirective(doc, directive)); + } catch (error) { + doc.errors.push(error); + } + hasDirectives = true; + break; + case "YAML": + case "YAML:1.0": + if (doc.version) { + const msg = "The %YAML directive must only be given at most once per document."; + doc.errors.push(new PlainValue.YAMLSemanticError(directive, msg)); + } + try { + doc.version = resolveYamlDirective(doc, directive); + } catch (error) { + doc.errors.push(error); + } + hasDirectives = true; + break; + default: + if (name) { + const msg = `YAML only supports %TAG and %YAML directives, and not %${name}`; + doc.warnings.push(new PlainValue.YAMLWarning(directive, msg)); + } + } + if (comment) directiveComments.push(comment); + } + if (prevDoc && !hasDirectives && "1.1" === (doc.version || prevDoc.version || doc.options.version)) { + const copyTagPrefix = ({ + handle, + prefix + }) => ({ + handle, + prefix + }); + doc.tagPrefixes = prevDoc.tagPrefixes.map(copyTagPrefix); + doc.version = prevDoc.version; + } + doc.commentBefore = directiveComments.join("\n") || null; + } + function assertCollection(contents) { + if (contents instanceof resolveSeq.Collection) return true; + throw new Error("Expected a YAML collection as document contents"); + } + var Document = class _Document { + constructor(options) { + this.anchors = new Anchors(options.anchorPrefix); + this.commentBefore = null; + this.comment = null; + this.contents = null; + this.directivesEndMarker = null; + this.errors = []; + this.options = options; + this.schema = null; + this.tagPrefixes = []; + this.version = null; + this.warnings = []; + } + add(value) { + assertCollection(this.contents); + return this.contents.add(value); + } + addIn(path, value) { + assertCollection(this.contents); + this.contents.addIn(path, value); + } + delete(key) { + assertCollection(this.contents); + return this.contents.delete(key); + } + deleteIn(path) { + if (resolveSeq.isEmptyPath(path)) { + if (this.contents == null) return false; + this.contents = null; + return true; + } + assertCollection(this.contents); + return this.contents.deleteIn(path); + } + getDefaults() { + return _Document.defaults[this.version] || _Document.defaults[this.options.version] || {}; + } + get(key, keepScalar) { + return this.contents instanceof resolveSeq.Collection ? this.contents.get(key, keepScalar) : void 0; + } + getIn(path, keepScalar) { + if (resolveSeq.isEmptyPath(path)) return !keepScalar && this.contents instanceof resolveSeq.Scalar ? this.contents.value : this.contents; + return this.contents instanceof resolveSeq.Collection ? this.contents.getIn(path, keepScalar) : void 0; + } + has(key) { + return this.contents instanceof resolveSeq.Collection ? this.contents.has(key) : false; + } + hasIn(path) { + if (resolveSeq.isEmptyPath(path)) return this.contents !== void 0; + return this.contents instanceof resolveSeq.Collection ? this.contents.hasIn(path) : false; + } + set(key, value) { + assertCollection(this.contents); + this.contents.set(key, value); + } + setIn(path, value) { + if (resolveSeq.isEmptyPath(path)) this.contents = value; + else { + assertCollection(this.contents); + this.contents.setIn(path, value); + } + } + setSchema(id, customTags) { + if (!id && !customTags && this.schema) return; + if (typeof id === "number") id = id.toFixed(1); + if (id === "1.0" || id === "1.1" || id === "1.2") { + if (this.version) this.version = id; + else this.options.version = id; + delete this.options.schema; + } else if (id && typeof id === "string") { + this.options.schema = id; + } + if (Array.isArray(customTags)) this.options.customTags = customTags; + const opt = Object.assign({}, this.getDefaults(), this.options); + this.schema = new Schema.Schema(opt); + } + parse(node, prevDoc) { + if (this.options.keepCstNodes) this.cstNode = node; + if (this.options.keepNodeTypes) this.type = "DOCUMENT"; + const { + directives = [], + contents = [], + directivesEndMarker, + error, + valueRange + } = node; + if (error) { + if (!error.source) error.source = this; + this.errors.push(error); + } + parseDirectives(this, directives, prevDoc); + if (directivesEndMarker) this.directivesEndMarker = true; + this.range = valueRange ? [valueRange.start, valueRange.end] : null; + this.setSchema(); + this.anchors._cstAliases = []; + parseContents(this, contents); + this.anchors.resolveNodes(); + if (this.options.prettyErrors) { + for (const error2 of this.errors) if (error2 instanceof PlainValue.YAMLError) error2.makePretty(); + for (const warn of this.warnings) if (warn instanceof PlainValue.YAMLError) warn.makePretty(); + } + return this; + } + listNonDefaultTags() { + return listTagNames(this.contents).filter((t) => t.indexOf(Schema.Schema.defaultPrefix) !== 0); + } + setTagPrefix(handle, prefix) { + if (handle[0] !== "!" || handle[handle.length - 1] !== "!") throw new Error("Handle must start and end with !"); + if (prefix) { + const prev = this.tagPrefixes.find((p) => p.handle === handle); + if (prev) prev.prefix = prefix; + else this.tagPrefixes.push({ + handle, + prefix + }); + } else { + this.tagPrefixes = this.tagPrefixes.filter((p) => p.handle !== handle); + } + } + toJSON(arg, onAnchor) { + const { + keepBlobsInJSON, + mapAsMap, + maxAliasCount + } = this.options; + const keep = keepBlobsInJSON && (typeof arg !== "string" || !(this.contents instanceof resolveSeq.Scalar)); + const ctx = { + doc: this, + indentStep: " ", + keep, + mapAsMap: keep && !!mapAsMap, + maxAliasCount, + stringify: stringify2 + // Requiring directly in Pair would create circular dependencies + }; + const anchorNames = Object.keys(this.anchors.map); + if (anchorNames.length > 0) ctx.anchors = new Map(anchorNames.map((name) => [this.anchors.map[name], { + alias: [], + aliasCount: 0, + count: 1 + }])); + const res = resolveSeq.toJSON(this.contents, arg, ctx); + if (typeof onAnchor === "function" && ctx.anchors) for (const { + count, + res: res2 + } of ctx.anchors.values()) onAnchor(res2, count); + return res; + } + toString() { + if (this.errors.length > 0) throw new Error("Document with errors cannot be stringified"); + const indentSize = this.options.indent; + if (!Number.isInteger(indentSize) || indentSize <= 0) { + const s = JSON.stringify(indentSize); + throw new Error(`"indent" option must be a positive integer, not ${s}`); + } + this.setSchema(); + const lines = []; + let hasDirectives = false; + if (this.version) { + let vd = "%YAML 1.2"; + if (this.schema.name === "yaml-1.1") { + if (this.version === "1.0") vd = "%YAML:1.0"; + else if (this.version === "1.1") vd = "%YAML 1.1"; + } + lines.push(vd); + hasDirectives = true; + } + const tagNames = this.listNonDefaultTags(); + this.tagPrefixes.forEach(({ + handle, + prefix + }) => { + if (tagNames.some((t) => t.indexOf(prefix) === 0)) { + lines.push(`%TAG ${handle} ${prefix}`); + hasDirectives = true; + } + }); + if (hasDirectives || this.directivesEndMarker) lines.push("---"); + if (this.commentBefore) { + if (hasDirectives || !this.directivesEndMarker) lines.unshift(""); + lines.unshift(this.commentBefore.replace(/^/gm, "#")); + } + const ctx = { + anchors: /* @__PURE__ */ Object.create(null), + doc: this, + indent: "", + indentStep: " ".repeat(indentSize), + stringify: stringify2 + // Requiring directly in nodes would create circular dependencies + }; + let chompKeep = false; + let contentComment = null; + if (this.contents) { + if (this.contents instanceof resolveSeq.Node) { + if (this.contents.spaceBefore && (hasDirectives || this.directivesEndMarker)) lines.push(""); + if (this.contents.commentBefore) lines.push(this.contents.commentBefore.replace(/^/gm, "#")); + ctx.forceBlockIndent = !!this.comment; + contentComment = this.contents.comment; + } + const onChompKeep = contentComment ? null : () => chompKeep = true; + const body = stringify2(this.contents, ctx, () => contentComment = null, onChompKeep); + lines.push(resolveSeq.addComment(body, "", contentComment)); + } else if (this.contents !== void 0) { + lines.push(stringify2(this.contents, ctx)); + } + if (this.comment) { + if ((!chompKeep || contentComment) && lines[lines.length - 1] !== "") lines.push(""); + lines.push(this.comment.replace(/^/gm, "#")); + } + return lines.join("\n") + "\n"; + } + }; + PlainValue._defineProperty(Document, "defaults", documentOptions); + exports2.Document = Document; + exports2.defaultOptions = defaultOptions; + exports2.scalarOptions = scalarOptions; + } +}); + +// ../../node_modules/openapi-to-postmanv2/node_modules/yaml/dist/index.js +var require_dist2 = __commonJS({ + "../../node_modules/openapi-to-postmanv2/node_modules/yaml/dist/index.js"(exports2) { + "use strict"; + var parseCst = require_parse_cst2(); + var Document$1 = require_Document_9b4560a12(); + var Schema = require_Schema_88e323a72(); + var PlainValue = require_PlainValue_ec8e588e2(); + var warnings = require_warnings_1000a3722(); + require_resolveSeq_d03cb0372(); + function createNode(value, wrapScalars = true, tag) { + if (tag === void 0 && typeof wrapScalars === "string") { + tag = wrapScalars; + wrapScalars = true; + } + const options = Object.assign({}, Document$1.Document.defaults[Document$1.defaultOptions.version], Document$1.defaultOptions); + const schema2 = new Schema.Schema(options); + return schema2.createNode(value, wrapScalars, tag); + } + var Document = class extends Document$1.Document { + constructor(options) { + super(Object.assign({}, Document$1.defaultOptions, options)); + } + }; + function parseAllDocuments(src, options) { + const stream = []; + let prev; + for (const cstDoc of parseCst.parse(src)) { + const doc = new Document(options); + doc.parse(cstDoc, prev); + stream.push(doc); + prev = doc; + } + return stream; + } + function parseDocument(src, options) { + const cst = parseCst.parse(src); + const doc = new Document(options).parse(cst[0]); + if (cst.length > 1) { + const errMsg = "Source contains multiple documents; please use YAML.parseAllDocuments()"; + doc.errors.unshift(new PlainValue.YAMLSemanticError(cst[1], errMsg)); + } + return doc; + } + function parse2(src, options) { + const doc = parseDocument(src, options); + doc.warnings.forEach((warning) => warnings.warn(warning)); + if (doc.errors.length > 0) throw doc.errors[0]; + return doc.toJSON(); + } + function stringify2(value, options) { + const doc = new Document(options); + doc.contents = value; + return String(doc); + } + var YAML = { + createNode, + defaultOptions: Document$1.defaultOptions, + Document, + parse: parse2, + parseAllDocuments, + parseCST: parseCst.parse, + parseDocument, + scalarOptions: Document$1.scalarOptions, + stringify: stringify2 + }; + exports2.YAML = YAML; + } +}); + +// ../../node_modules/openapi-to-postmanv2/node_modules/yaml/index.js +var require_yaml2 = __commonJS({ + "../../node_modules/openapi-to-postmanv2/node_modules/yaml/index.js"(exports2, module2) { + module2.exports = require_dist2().YAML; + } +}); + +// ../../node_modules/openapi-to-postmanv2/lib/parse.js +var require_parse = __commonJS({ + "../../node_modules/openapi-to-postmanv2/lib/parse.js"(exports2, module2) { + var yaml = require_js_yaml(); + var fs = require("fs"); + var _2 = require_lodash(); + var path = require("path"); + var pathBrowserify = require_path_browserify(); + var resolver = require_oas_resolver_browser(); + var yamlParse = require_yaml2(); + var { compareVersion, getVersionFromSpec } = require_versionUtils(); + var BROWSER = "browser"; + var YAML_FORMAT = "yaml"; + var JSON_FORMAT = "json"; + var UNSUPPORTED_FORMAT = "unsupported"; + function looksLikeJson(spec) { + return typeof spec === "string" && spec.startsWith("{"); + } + module2.exports = { + asJson: function(spec) { + try { + return JSON.parse(spec); + } catch (jsonException) { + throw new SyntaxError(`Specification is not a valid JSON. ${jsonException}`); + } + }, + asYaml: function(spec) { + try { + let obj = yaml.load(spec, { + schema: yaml.JSON_SCHEMA + }); + if (typeof obj !== "object") { + throw new Error(""); + } + return obj; + } catch (yamlException) { + throw new SyntaxError(`Specification is not a valid YAML. ${yamlException}`); + } + }, + /** Converts OpenAPI input to OpenAPI Object + * @param {String} openApiSpec OpenAPI input in string + * @returns {Object} oasObject + */ + getOasObject: function(openApiSpec) { + let oasObject = openApiSpec, inputFormat = UNSUPPORTED_FORMAT, detailedError = "Invalid format. Input must be in YAML or JSON format."; + try { + oasObject = this.asYaml(openApiSpec); + inputFormat = looksLikeJson(openApiSpec) ? JSON_FORMAT : YAML_FORMAT; + } catch (yamlException) { + try { + oasObject = this.asJson(openApiSpec); + inputFormat = JSON_FORMAT; + } catch (jsonException) { + if (openApiSpec && openApiSpec[0] === "{") { + detailedError += " " + jsonException.message; + } else if (openApiSpec && openApiSpec.indexOf("openapi:") === 0) { + detailedError += " " + yamlException.message; + } + return { + result: false, + reason: detailedError + }; + } + } + return { + result: true, + oasObject, + inputFormat + }; + }, + /** Given an array of files returns the root OAS file if present + * + * @param {Array} input input object that contains files array + * @param {Object} inputValidation Validator according to version + * @param {Object} options computed process options + * @param {Object} files Files map + * @param {string} specificationVersion the string of the desired version + * @param {boolean} allowReadingFS wheter to allow reading content from file system + * @return {String} rootFile + */ + getRootFiles: function(input, inputValidation, options, files = {}, specificationVersion, allowReadingFS = true) { + let rootFilesArray = [], filesPathArray = input.data, origin = input.origin || ""; + filesPathArray.forEach((filePath) => { + let obj, file, oasObject; + try { + if (origin === BROWSER) { + path = pathBrowserify; + } + if (!_2.isEmpty(files)) { + file = files[path.resolve(filePath.fileName)]; + } else if (allowReadingFS) { + file = fs.readFileSync(filePath.fileName, "utf8"); + } + obj = this.getOasObject(file); + if (obj.result) { + oasObject = obj.oasObject; + } else { + return; + } + if (inputValidation.validateSpec(oasObject, options).result) { + if (specificationVersion) { + if (compareVersion(specificationVersion, getVersionFromSpec(oasObject))) { + rootFilesArray.push(filePath.fileName); + } + } else { + rootFilesArray.push(filePath.fileName); + } + } + } catch (e) { + throw new Error(e.message); + } + }); + return rootFilesArray; + }, + /** + * Resolve file references and generate single OAS Object + * + * @param {Object} openapi OpenAPI + * @param {Object} options options + * @param {Object} files Map of files path and content + * @return {Object} Resolved content + */ + resolveContent: function(openapi, options, files) { + return resolver.resolve(openapi, options.source, { + options: Object.assign({}, options), + resolve: true, + cache: [], + externals: [], + externalRefs: {}, + rewriteRefs: true, + openapi, + files, + browser: options.browser || "", + resolveInternal: true + }); + }, + /** Resolves all OpenAPI file references and returns a single OAS Object + * + * @param {Object} source Root file path + * @param {Object} options Configurable options as per oas-resolver module. + * @param {Object} files Map of files path and content + * @return {Object} Resolved OpenAPI Schema + */ + mergeFiles: function(source, options = {}, files = {}) { + options.source = source; + options.origin = source; + if (!_2.isEmpty(files)) { + if (options.browser) { + path = pathBrowserify; + } + let content = files[path.resolve(source)], unresolved; + try { + unresolved = yamlParse.parse(content, { prettyErrors: true }); + } catch (err) { + throw new Error("\nLine: " + err.linePos.start.line + ", col: " + err.linePos.start.col + " " + err.message); + } + return new Promise((resolve, reject) => { + return this.resolveContent(unresolved, options, files).then((result) => { + return resolve(result.openapi); + }, (err) => { + return reject(err); + }); + }); + } + return this.readFileAsync(source, "utf8").then((content) => { + try { + return yamlParse.parse(content, { prettyErrors: true }); + } catch (err) { + throw new Error("\nLine: " + err.linePos.start.line + ", col: " + err.linePos.start.col + " " + err.message); + } + }, (err) => { + throw new Error(err.message); + }).then((unresolved) => { + if (options.resolve === true) { + return this.resolveContent(unresolved, options); + } + }, (err) => { + throw err; + }).then((result) => { + return result.openapi; + }, (err) => { + throw err; + }); + }, + /** Read File asynchronously + * + * @param {String} filePath Path of the file. + * @param {String} encoding encoding + * @return {String} Contents of the file + */ + readFileAsync: function(filePath, encoding) { + return new Promise((resolve, reject) => { + fs.readFile(filePath, encoding, (err, data) => { + if (err) { + reject(err); + } else { + resolve(data); + } + }); + }); + }, + /** + * Serializes the given API as JSON, using the given spaces for formatting. + * + * @param {object} api specification to parse + * @param {string|number} spaces number of spaces to use for tabulation + * + * @return {String} Contents of the file in json format + */ + toJSON: function(api, spaces) { + return JSON.stringify(api, null, spaces); + }, + /** + * Serializes the given API as YAML, using the given spaces for formatting. + * + * @param {object} api API to convert to YAML + * @param {string|number} spaces number of spaces to ident + * @param {number} lineWidth set max line width. (default: 80) + * + * @return {String} Contents of the file in yaml format + */ + toYAML: function(api, spaces, lineWidth) { + return yaml.dump(api, { + indent: spaces, + lineWidth, + noRefs: true + }); + }, + YAML_FORMAT, + JSON_FORMAT + }; + } +}); + +// ../../node_modules/openapi-to-postmanv2/lib/common/schemaUtilsCommon.js +var require_schemaUtilsCommon = __commonJS({ + "../../node_modules/openapi-to-postmanv2/lib/common/schemaUtilsCommon.js"(exports2, module2) { + var parse2 = require_parse(); + var _2 = require_lodash(); + var typesMap = { + integer: { + int32: "", + int64: "" + }, + number: { + float: "", + double: "" + }, + string: { + byte: "", + binary: "", + date: "", + "date-time": "", + password: "" + }, + boolean: "", + array: "", + object: "" + }; + var schemaTypeToJsValidator = { + "string": (d) => typeof d === "string", + "number": (d) => !isNaN(d), + "integer": (d) => !isNaN(d) && Number.isInteger(Number(d)), + "boolean": (d) => _2.isBoolean(d) || d === "true" || d === "false", + "array": (d) => Array.isArray(d), + "object": (d) => typeof d === "object" && !Array.isArray(d) + }; + function removeSharpAndSlashFromFirstPosition(schemaPath) { + return schemaPath[0] === "#" ? schemaPath.slice(2) : schemaPath; + } + function removeWordFromLastPosition(schemaPath, word) { + let splittedDataPath = schemaPath.split("/"); + if (splittedDataPath[splittedDataPath.length - 1] === word) { + splittedDataPath.splice(-1); + } + return splittedDataPath.join("/"); + } + function compareType(value, type) { + return value === "<" + type + ">"; + } + function isTypeValueArrayCheck(value, types) { + return types.find((type) => { + return compareType(value, type); + }) !== void 0; + } + function checkValueOnlyTypes(value, types) { + return Array.isArray(types) ? isTypeValueArrayCheck(value, types) : compareType(value, types); + } + function getDefaultFromTypeAndFormat(type, format) { + return typesMap[type][format]; + } + function checkValueTypesAndFormat(value, types, format) { + let typesNotInMap = [], typesArray = Array.isArray(types) ? types : [types], found = typesArray.find((type) => { + let defaultValue; + if (typesMap.hasOwnProperty(type)) { + defaultValue = getDefaultFromTypeAndFormat(type, format); + if (!defaultValue && format) { + defaultValue = "<" + format + ">"; + } + } else { + typesNotInMap.push(type); + } + return defaultValue === value; + }); + if (found) { + return true; + } + found = typesNotInMap.find((type) => { + let defaultValue; + defaultValue = "<" + type + (format ? "-" + format : "") + ">"; + return defaultValue === value; + }); + return found !== void 0; + } + function checkValueEqualsDefault(value, definedDefault) { + return value === definedDefault; + } + function isTypeValue(value, schema2) { + if (!_2.isObject(schema2)) { + return false; + } + if (schema2.hasOwnProperty("type") && schema2.hasOwnProperty("default")) { + const isDefault = checkValueEqualsDefault(value, schema2.default); + if (isDefault) { + return true; + } + } + if (schema2.hasOwnProperty("type") && !schema2.hasOwnProperty("format")) { + return checkValueOnlyTypes(value, schema2.type); + } + if (schema2.hasOwnProperty("type") && schema2.hasOwnProperty("format")) { + return checkValueTypesAndFormat(value, schema2.type, schema2.format); + } + } + function checkIsCorrectType(value, schema2) { + if (_2.has(schema2, "type") && typeof schemaTypeToJsValidator[schema2.type] === "function") { + const isCorrectType = schemaTypeToJsValidator[schema2.type](value); + if (isCorrectType) { + return true; + } + } + return isTypeValue(value, schema2); + } + module2.exports = { + /** + * Parses an OAS string/object as a YAML or JSON + * @param {YAML/JSON} openApiSpec - The OAS 3.x specification specified in either YAML or JSON + * @param {object} inputValidation - Concrete validator according to version + * @param {Object} options computed process options + * @returns {Object} - Contains the parsed JSON-version of the OAS spec, or an error + * @no-unit-test + */ + parseSpec: function(openApiSpec, inputValidation, options) { + var openApiObj = openApiSpec, obj, rootValidation; + if (typeof openApiSpec === "string") { + obj = parse2.getOasObject(openApiSpec); + if (obj.result) { + openApiObj = obj.oasObject; + } else { + return obj; + } + } + rootValidation = inputValidation.validateSpec(openApiObj, options); + if (!rootValidation.result) { + return { + result: false, + reason: rootValidation.reason + }; + } + return { + result: true, + openapi: rootValidation.openapi + }; + }, + formatDataPath: function(dataPath) { + let initialDotIfExist = dataPath[0] === "/" ? "." : "", decodedDataPath = decodeURIComponent(dataPath), splittedDataPath = decodedDataPath.split("/"), isANumber = (value) => { + return !isNaN(value); + }, formattedElements = splittedDataPath.map((element, index) => { + if (element !== "" && isANumber(element)) { + return `[${element}]`; + } + if (element === "" || element[0] === ".") { + return element; + } + if (index === 0 && !initialDotIfExist) { + return `${element}`; + } + return `.${element}`; + }), formattedDataPath = formattedElements.join(""); + return `${formattedDataPath}`; + }, + handleExclusiveMaximum: function(schema2, max) { + max = _2.has(schema2, "maximum") ? schema2.maximum : max; + if (_2.has(schema2, "exclusiveMaximum")) { + if (typeof schema2.exclusiveMaximum === "boolean") { + return schema2.multipleOf ? max - schema2.multipleOf : max - 1; + } else if (typeof schema2.exclusiveMaximum === "number") { + return schema2.multipleOf ? schema2.exclusiveMaximum - schema2.multipleOf : schema2.exclusiveMaximum - 1; + } + } + return max; + }, + handleExclusiveMinimum: function(schema2, min) { + min = _2.has(schema2, "minimum") ? schema2.minimum : min; + if (_2.has(schema2, "exclusiveMinimum")) { + if (typeof schema2.exclusiveMinimum === "boolean") { + return schema2.multipleOf ? min + schema2.multipleOf : min + 1; + } else if (typeof schema2.exclusiveMinimum === "number") { + return schema2.multipleOf ? schema2.exclusiveMinimum + schema2.multipleOf : schema2.exclusiveMinimum + 1; + } + } + return min; + }, + /** + * Removes initial "#/" from a schema path and the last "/type" segment + * @param {string} schemaPath - The OAS 3.x specification specified in either YAML or JSON + * @returns {string} - The schemaPath with initial #/ and last "/type" removed + */ + formatSchemaPathFromAJVErrorToConvertToDataPath: function(schemaPath) { + let result = removeSharpAndSlashFromFirstPosition(schemaPath), keywordsToRemoveFromPath = ["type", "format", "maxLength", "minLength"]; + _2.forEach(keywordsToRemoveFromPath, (keyword) => { + result = removeWordFromLastPosition(result, keyword); + }); + return result; + }, + typesMap, + /** + * Checks if value is the representation of its type like: + * "" + * Works in array types + * @param {string} value - Value to check for + * @param {*} schema - The schema portion used in validation + * @returns {Boolean} the value is the representation of its type + */ + isTypeValue, + /** + * Checks if value is correct according to schema + * If the value should be numeric, it tries to convert and then validate + * also validates if the value is a correct representation in the form of + * or etc for integers format 32 or format 64 + * @param {string} value - Value to check for + * @param {*} schema - The schema portion used in validation + * @returns {Boolean} the value is the representation of its type + */ + checkIsCorrectType, + isKnownType: function(schema2) { + return typeof schemaTypeToJsValidator[schema2.type] === "function"; + }, + getServersPathVars: function(servers) { + return servers.reduce((acc, current) => { + const newVarNames = _2.has(current, "variables") ? Object.keys(current.variables).filter((varName) => { + return !acc.includes(varName); + }) : []; + return [...acc, ...newVarNames]; + }, []); + } + }; + } +}); + +// ../../node_modules/openapi-to-postmanv2/lib/30XUtils/schemaUtils30X.js +var require_schemaUtils30X = __commonJS({ + "../../node_modules/openapi-to-postmanv2/lib/30XUtils/schemaUtils30X.js"(exports2, module2) { + var inputValidation30X = require_inputValidation(); + var schemaUtilsCommon = require_schemaUtilsCommon(); + var _2 = require_lodash(); + module2.exports = { + version: "3.0.x", + /** + * Parses an OAS string/object as a YAML or JSON + * @param {YAML/JSON} openApiSpec - The OAS 3.x specification specified in either YAML or JSON + * @param {object} options - The parsing options + * @returns {Object} - Contains the parsed JSON-version of the OAS spec, or an error + * @no-unit-test + */ + parseSpec: function(openApiSpec, options) { + return schemaUtilsCommon.parseSpec(openApiSpec, inputValidation30X, options); + }, + /** + * Get the required elements for conversion from spec parsed data + * @param {object} spec openapi parsed value + * @returns {object} required elements to convert + */ + getRequiredData(spec) { + return { + info: spec.info, + components: spec.components ? spec.components : [], + paths: spec.paths + }; + }, + /** + * Compares two types and return if they match or not + * @param {string} currentType the type in schema + * @param {string} typeToValidate the type to compare + * @returns {boolean} the result of the comparation + */ + compareTypes(currentType, typeToValidate) { + return currentType === typeToValidate; + }, + /** + * This method is to make this module matches with schemaUtilsXXX interface content + * It only returns the provided schema + * @param {object} schema a provided schema + * @returns {object} it returns the same schema + */ + fixExamplesByVersion(schema2) { + return schema2; + }, + /** + * Check if request body type is binary type + * @param {string} bodyType the bodyType provided in a request body content + * @param {object} contentObj The request body content provided in spec + * @returns {boolean} Returns true if content is a binary type + */ + isBinaryContentType(bodyType, contentObj) { + return bodyType && !_2.isEmpty(_2.get(contentObj, [bodyType, "schema"])) && contentObj[bodyType].schema.type === "string" && contentObj[bodyType].schema.format === "binary"; + }, + getOuterPropsIfIsSupported() { + return void 0; + }, + addOuterPropsToRefSchemaIfIsSupported(refSchema) { + return refSchema; + }, + inputValidation: inputValidation30X + }; + } +}); + +// ../../node_modules/openapi-to-postmanv2/lib/swaggerUtils/inputValidationSwagger.js +var require_inputValidationSwagger = __commonJS({ + "../../node_modules/openapi-to-postmanv2/lib/swaggerUtils/inputValidationSwagger.js"(exports2, module2) { + var _2 = require_lodash(); + module2.exports = { + /** + * Validate Spec to check if some of the required fields are present. + * @param {Object} spec OpenAPI spec + * @param {object} options Validation options + * @return {Object} Validation result + */ + validateSpec: function(spec, options) { + if (_2.isNil(spec)) { + return { + result: false, + reason: "The Specification is null or undefined" + }; + } + if (spec.swagger !== "2.0") { + return { + result: false, + reason: 'The value of "swagger" field must be 2.0' + }; + } + if (!spec.info) { + return { + result: false, + reason: 'The Swagger specification must have an "info" field' + }; + } + if (!(_2.get(spec, "info.title") && _2.get(spec, "info.version")) && !options.isFolder) { + return { + result: false, + reason: "Title, and version fields are required for the Info Object" + }; + } + if (!spec.paths) { + return { + result: false, + reason: 'The Swagger specification must have a "paths" field' + }; + } + return { + result: true, + openapi: spec + }; + } + }; + } +}); + +// ../../node_modules/openapi-to-postmanv2/lib/swaggerUtils/schemaUtilsSwagger.js +var require_schemaUtilsSwagger = __commonJS({ + "../../node_modules/openapi-to-postmanv2/lib/swaggerUtils/schemaUtilsSwagger.js"(exports2, module2) { + var inputValidationSwagger = require_inputValidationSwagger(); + var schemaUtilsCommon = require_schemaUtilsCommon(); + var _2 = require_lodash(); + module2.exports = { + version: "2.0", + /** + * Parses an OAS string/object as a YAML or JSON + * @param {YAML/JSON} openApiSpec - The swagger 2.0 specification specified in either YAML or JSON + * @param {Object} options computed process options + * @returns {Object} - Contains the parsed JSON-version of the OAS spec, or an error + * @no-unit-test + */ + parseSpec: function(openApiSpec, options) { + return schemaUtilsCommon.parseSpec(openApiSpec, inputValidationSwagger, options); + }, + /** + * Get the required elements for conversion from spec parsed data + * @param {object} spec openapi parsed value + * @returns {object} required elements to convert + */ + getRequiredData: function(spec) { + return { + info: spec.info, + components: spec.components ? spec.components : [], + paths: spec.paths + }; + }, + /** + * Compares two types and return if they match or not + * @param {string} currentType the type in schema + * @param {string} typeToValidate the type to compare + * @returns {boolean} the result of the comparation + */ + compareTypes(currentType, typeToValidate) { + return currentType === typeToValidate; + }, + /** + * This method is to make this module matches with schemaUtilsXXX interface content + * It only returns the provided schema + * @param {object} schema a provided schema + * @returns {object} it returns the same schema + */ + fixExamplesByVersion(schema2) { + return schema2; + }, + /** + * Check if request body type is binary type + * @param {string} bodyType the bodyType provided in a request body content + * @param {object} contentObj The request body content provided in spec + * @returns {boolean} Returns true if content is a binary type + */ + isBinaryContentType(bodyType, contentObj) { + return bodyType && !_2.isEmpty(_2.get(contentObj, [bodyType, "schema"])) && contentObj[bodyType].schema.type === "string" && contentObj[bodyType].schema.format === "binary"; + }, + getOuterPropsIfIsSupported() { + return void 0; + }, + addOuterPropsToRefSchemaIfIsSupported(refSchema) { + return refSchema; + }, + inputValidation: inputValidationSwagger + }; + } +}); + +// ../../node_modules/openapi-to-postmanv2/lib/31XUtils/inputValidation31X.js +var require_inputValidation31X = __commonJS({ + "../../node_modules/openapi-to-postmanv2/lib/31XUtils/inputValidation31X.js"(exports2, module2) { + var _2 = require_lodash(); + module2.exports = { + /** + * Validate Spec to check if some of the required fields are present. + * OpenAPI 3.1 only openapi and info are always required, + * but the document must also contain at least one of paths or webhooks or components. + * @param {Object} spec OpenAPI spec + * @param {Object} options computed process options + * @return {Object} Validation result + */ + validateSpec: function(spec, options) { + const includeWebhooksOption = options.includeWebhooks; + if (_2.isNil(spec)) { + return { + result: false, + reason: "The Specification is null or undefined" + }; + } + if (_2.isNil(spec.openapi)) { + return { + result: false, + reason: "Specification must contain a semantic version number of the OAS specification" + }; + } + if (_2.isNil(spec.info)) { + return { + result: false, + reason: "Specification must contain an Info Object for the meta-data of the API" + }; + } + if (!_2.has(spec.info, "$ref")) { + if (_2.isNil(_2.get(spec, "info.title"))) { + return { + result: false, + reason: "Specification must contain a title in order to generate a collection" + }; + } + if (_2.isNil(_2.get(spec, "info.version"))) { + return { + result: false, + reason: "Specification must contain a semantic version number of the API in the Info Object" + }; + } + } + if (_2.isNil(spec.paths) && !includeWebhooksOption) { + return { + result: false, + reason: "Specification must contain Paths Object for the available operational paths" + }; + } + if (includeWebhooksOption && _2.isNil(spec.paths) && _2.isNil(spec.webhooks) && _2.isNil(spec.components)) { + return { + result: false, + reason: "Specification must contain either Paths, Webhooks or Components sections" + }; + } + return { + result: true, + openapi: spec + }; + } + }; + } +}); + +// ../../node_modules/openapi-to-postmanv2/lib/31XUtils/schemaUtils31X.js +var require_schemaUtils31X = __commonJS({ + "../../node_modules/openapi-to-postmanv2/lib/31XUtils/schemaUtils31X.js"(exports2, module2) { + var inputValidation31X = require_inputValidation31X(); + var schemaUtilsCommon = require_schemaUtilsCommon(); + var _2 = require_lodash(); + var fileUploadTypes = [ + "application/octet-stream" + ]; + module2.exports = { + version: "3.1.x", + /** + * Parses an OAS 3.1.X string/object as a YAML or JSON + * @param {YAML/JSON} openApiSpec - The OAS 3.1.x specification specified in either YAML or JSON + * @param {Object} options computed process options + * @returns {Object} - Contains the parsed JSON-version of the OAS spec, or an error + * @no-unit-test + */ + parseSpec: function(openApiSpec, options) { + return schemaUtilsCommon.parseSpec(openApiSpec, inputValidation31X, options); + }, + inputValidation: inputValidation31X, + /** + * Get the required elements for conversion from spec parsed data + * @param {object} spec openapi parsed value + * @returns {object} required elements to convert + */ + getRequiredData(spec) { + return { + info: spec.info, + paths: spec.paths ? spec.paths : {}, + components: spec.components ? spec.components : {}, + webhooks: spec.webhooks ? spec.webhooks : {} + }; + }, + /** + * Compares two types and return if they match or not. + * In case that the provided type is an array it checks of the typeToCompare exists in. + * @param {string | array} currentType the type in schema, it could be an array of types + * @param {string} typeToValidate the type to compare + * @returns {boolean} the result of the comparation + */ + compareTypes(currentType, typeToValidate) { + let isTypeMatching = currentType === typeToValidate; + if (Array.isArray(currentType)) { + isTypeMatching = currentType.includes(typeToValidate); + } + return isTypeMatching; + }, + /** + * Identifies the correct type from the list according to the example + * + * @param {*} examples provided example values + * @param {Array} typesArray the types array of the schema + * @returns {string} the most according type to the example + */ + findTypeByExample(examples, typesArray) { + const mapTypes = { + "boolean": "boolean", + "null": "null", + "undefined": "null", + "number": "number", + "bigInt": "number", + "object": "object", + "string": "string" + }; + let foundType, foundExample; + for (let index = 0; index < examples.length; index++) { + const example = examples[index]; + let exampleType = typeof example, mappedType = mapTypes[exampleType]; + if (mappedType === "number") { + mappedType = Number.isInteger(example) ? "integer" : mappedType; + } + foundType = typesArray.find((type) => { + return type === mappedType; + }); + if (foundType) { + foundExample = example; + break; + } + } + return { foundType, foundExample }; + }, + /** + * Takes the first element from 'examples' property in a schema and adds a new 'example' property. + * This method is used before faking the schema. (Schema faker uses the example property to fakle the schema) + * @param {object} schema a provided schema + * @returns {object} it returns the schema with a new example property + */ + fixExamplesByVersion(schema2) { + const hasExamplesInRoot = _2.has(schema2, "examples"), hasChildItems = _2.has(schema2, "type") && _2.has(schema2, "items"), hasProperties = _2.has(schema2, "properties"), typeIsAnArray = _2.has(schema2, "type") && Array.isArray(schema2.type); + if (hasExamplesInRoot && typeIsAnArray) { + let typeAndExample = this.findTypeByExample(schema2.examples, schema2.type), foundType = typeAndExample.foundType, foundExample = typeAndExample.foundExample; + schema2.type = foundType ? foundType : schema2.type[0]; + schema2.example = foundExample ? foundExample : schema2.examples[0]; + } + if (hasExamplesInRoot && !typeIsAnArray) { + schema2.example = schema2.examples[0]; + } + if (!hasExamplesInRoot && typeIsAnArray) { + schema2.type = schema2.type[0]; + } + if (!hasExamplesInRoot && hasChildItems) { + schema2.items = this.fixExamplesByVersion(schema2.items); + } else if (hasProperties) { + const schemaProperties = _2.keys(schema2.properties); + schemaProperties.forEach((property) => { + schema2.properties[property] = this.fixExamplesByVersion(schema2.properties[property]); + }); + } + return schema2; + }, + /** + * Check if request body type is binary type. + * Open api 3.1 does not need that a binary content has a schema within. It comes as an empty object + * @param {string} bodyType the bodyType provided in a request body content + * @param {object} contentObj The request body content provided in spec + * @returns {boolean} Returns true if content is a binary type + */ + isBinaryContentType(bodyType, contentObj) { + return _2.keys(contentObj[bodyType]).length === 0 && fileUploadTypes.includes(bodyType); + }, + getOuterPropsIfIsSupported(schema2) { + const schemaOuterProps = _2.cloneDeep(schema2); + delete schemaOuterProps.$ref; + return schemaOuterProps; + }, + addOuterPropsToRefSchemaIfIsSupported(refSchema, outerProps) { + const resolvedSchema = _2.cloneDeep(refSchema), outerKeys = _2.keys(outerProps); + if (_2.isObject(resolvedSchema) && _2.isObject(outerProps)) { + outerKeys.forEach((key) => { + resolvedSchema[key] = resolvedSchema[key] && Array.isArray(resolvedSchema[key]) ? [.../* @__PURE__ */ new Set([...resolvedSchema[key], ...outerProps[key]])] : outerProps[key]; + }); + } + return resolvedSchema; + } + }; + } +}); + +// ../../node_modules/openapi-to-postmanv2/lib/common/versionUtils.js +var require_versionUtils = __commonJS({ + "../../node_modules/openapi-to-postmanv2/lib/common/versionUtils.js"(exports2, module2) { + var _2 = require_lodash(); + var VERSION_30 = { key: "openapi", version: "3.0" }; + var VERSION_31 = { key: "openapi", version: "3.1" }; + var VERSION_20 = { key: "swagger", version: "2.0" }; + var GENERIC_VERSION2 = { key: "swagger", version: "2." }; + var GENERIC_VERSION3 = { key: "openapi", version: "3." }; + var DEFAULT_SPEC_VERSION = VERSION_30.version; + var SWAGGER_VERSION = VERSION_20.version; + var VERSION_3_1 = VERSION_31.version; + var fs = require("fs"); + var { RULES_30 } = require_spec30(); + var { RULES_31 } = require_spec31(); + var { RULES_20 } = require_spec20(); + function getVersionRegexp({ key, version: version2 }) { + return new RegExp(`${key}['|"]?\\s*:\\s*[\\]?['|"]?${version2}`); + } + function getFileByContent(data) { + const version2RegExp = getVersionRegexp(GENERIC_VERSION2), version3RegExp = getVersionRegexp(GENERIC_VERSION3), file = data.find((element) => { + return element.content.match(version2RegExp) || element.content.match(version3RegExp); + }); + return file.content; + } + function compareVersion(input, version2) { + let numberInput, numberVersion; + numberInput = parseFloat(input); + numberVersion = parseFloat(version2); + if (!isNaN(numberInput) && !isNaN(numberVersion)) { + return numberInput === numberVersion; + } + return false; + } + function getVersionRegexBySpecificationVersion(specificationVersion) { + let versionRegExp; + if (compareVersion(specificationVersion, "2.0")) { + versionRegExp = getVersionRegexp(VERSION_20); + } else if (compareVersion(specificationVersion, "3.1")) { + versionRegExp = getVersionRegexp(VERSION_31); + } else { + versionRegExp = getVersionRegexp(VERSION_30); + } + return versionRegExp; + } + function getFileByContentSpecificationVersion(data, specificationVersion) { + let versionRegExp, file; + versionRegExp = getVersionRegexBySpecificationVersion(specificationVersion); + file = data.find((element) => { + return element.content.match(versionRegExp); + }); + if (!file) { + throw new Error("Not files with version"); + } + return file.content; + } + function getFileByFileName(data) { + const version2RegExp = getVersionRegexp(GENERIC_VERSION2), version3RegExp = getVersionRegexp(GENERIC_VERSION3); + let file = data.map((element) => { + return fs.readFileSync(element.fileName, "utf8"); + }).find((content) => { + return content.match(version2RegExp) || content.match(version3RegExp); + }); + return file; + } + function getFileByFileNameSpecificVersion(data, specificationVersion) { + const versionRegExp = getVersionRegexBySpecificationVersion(specificationVersion); + let file = data.map((element) => { + return fs.readFileSync(element.fileName, "utf8"); + }).find((content) => { + return content.match(versionRegExp); + }); + return file; + } + function getFileWithVersion(data, specificationVersion) { + let file; + if (_2.has(data[0], "content")) { + if (specificationVersion) { + file = getFileByContentSpecificationVersion(data, specificationVersion); + } else { + file = getFileByContent(data); + } + } else if (_2.has(data[0], "fileName")) { + if (specificationVersion) { + file = getFileByFileNameSpecificVersion(data, specificationVersion); + } else { + file = getFileByFileName(data); + } + } + return file; + } + function getVersionByStringInput(version2) { + if (!version2) { + return false; + } + let found = [DEFAULT_SPEC_VERSION, SWAGGER_VERSION, VERSION_3_1].find((supportedVersion) => { + return compareVersion(version2, supportedVersion); + }); + return found; + } + function getSpecVersion({ type, data, specificationVersion }) { + if (!data) { + return DEFAULT_SPEC_VERSION; + } + if (["multiFile"].includes(type)) { + if (!specificationVersion) { + return DEFAULT_SPEC_VERSION; + } + return getVersionByStringInput(specificationVersion); + } + if (["folder"].includes(type)) { + data = getFileWithVersion(data, specificationVersion); + } else if (["file"].includes(type)) { + try { + data = fs.readFileSync(data, "utf8"); + } catch (error) { + return DEFAULT_SPEC_VERSION; + } + } + if (type === "json") { + data = JSON.stringify(data); + } + const openapi30 = getVersionRegexp(VERSION_30), openapi31 = getVersionRegexp(VERSION_31), openapi20 = getVersionRegexp(VERSION_20), is30 = typeof data === "string" && data.match(openapi30), is31 = typeof data === "string" && data.match(openapi31), is20 = typeof data === "string" && data.match(openapi20); + let version2 = DEFAULT_SPEC_VERSION; + if (is30) { + version2 = VERSION_30.version; + } else if (is31) { + version2 = VERSION_31.version; + } else if (is20) { + version2 = VERSION_20.version; + } + return version2; + } + function getConcreteSchemaUtils({ type, data, specificationVersion }) { + const specVersion = getSpecVersion({ type, data, specificationVersion }); + let concreteUtils = {}; + if (specVersion === DEFAULT_SPEC_VERSION) { + concreteUtils = require_schemaUtils30X(); + } else if (specVersion === VERSION_20.version) { + concreteUtils = require_schemaUtilsSwagger(); + } else { + concreteUtils = require_schemaUtils31X(); + } + return concreteUtils; + } + function filterOptionsByVersion(options, version2) { + options = options.filter((option) => { + return option.supportedIn.includes(version2); + }); + return options; + } + function isSwagger(version2) { + return compareVersion(version2, VERSION_20.version); + } + function validateSupportedVersion(version2) { + if (!version2) { + return false; + } + let isValid = [DEFAULT_SPEC_VERSION, VERSION_3_1, SWAGGER_VERSION].find((supportedVersion) => { + return compareVersion(version2, supportedVersion); + }); + return isValid !== void 0; + } + function getBundleRulesDataByVersion(version2) { + const is31 = compareVersion(version2, VERSION_31.version), is20 = compareVersion(version2, VERSION_20.version); + if (is20) { + return RULES_20; + } else if (is31) { + return RULES_31; + } else { + return RULES_30; + } + } + function getVersionFromSpec(spec) { + if (!_2.isNil(spec) && _2.has(spec, "swagger")) { + return spec.swagger; + } + if (!_2.isNil(spec) && _2.has(spec, "openapi")) { + return spec.openapi; + } + } + module2.exports = { + getSpecVersion, + getConcreteSchemaUtils, + filterOptionsByVersion, + isSwagger, + compareVersion, + getVersionRegexBySpecificationVersion, + SWAGGER_VERSION, + VERSION_3_1, + validateSupportedVersion, + getBundleRulesDataByVersion, + getVersionFromSpec + }; + } +}); + +// ../../node_modules/call-me-maybe/src/next.js +var require_next = __commonJS({ + "../../node_modules/call-me-maybe/src/next.js"(exports2, module2) { + "use strict"; + function makeNext() { + if (typeof process === "object" && typeof process.nextTick === "function") { + return process.nextTick; + } else if (typeof setImmediate === "function") { + return setImmediate; + } else { + return function next(f) { + setTimeout(f, 0); + }; + } + } + module2.exports = makeNext(); + } +}); + +// ../../node_modules/call-me-maybe/src/maybe.js +var require_maybe = __commonJS({ + "../../node_modules/call-me-maybe/src/maybe.js"(exports2, module2) { + "use strict"; + var next = require_next(); + module2.exports = function maybe(cb, promise) { + if (cb) { + promise.then(function(result) { + next(function() { + cb(null, result); + }); + }, function(err) { + next(function() { + cb(err); + }); + }); + return void 0; + } else { + return promise; + } + }; + } +}); + +// ../../node_modules/swagger2openapi/node_modules/yaml/dist/PlainValue-ec8e588e.js +var require_PlainValue_ec8e588e3 = __commonJS({ + "../../node_modules/swagger2openapi/node_modules/yaml/dist/PlainValue-ec8e588e.js"(exports2) { + "use strict"; + var Char = { + ANCHOR: "&", + COMMENT: "#", + TAG: "!", + DIRECTIVES_END: "-", + DOCUMENT_END: "." + }; + var Type = { + ALIAS: "ALIAS", + BLANK_LINE: "BLANK_LINE", + BLOCK_FOLDED: "BLOCK_FOLDED", + BLOCK_LITERAL: "BLOCK_LITERAL", + COMMENT: "COMMENT", + DIRECTIVE: "DIRECTIVE", + DOCUMENT: "DOCUMENT", + FLOW_MAP: "FLOW_MAP", + FLOW_SEQ: "FLOW_SEQ", + MAP: "MAP", + MAP_KEY: "MAP_KEY", + MAP_VALUE: "MAP_VALUE", + PLAIN: "PLAIN", + QUOTE_DOUBLE: "QUOTE_DOUBLE", + QUOTE_SINGLE: "QUOTE_SINGLE", + SEQ: "SEQ", + SEQ_ITEM: "SEQ_ITEM" + }; + var defaultTagPrefix = "tag:yaml.org,2002:"; + var defaultTags = { + MAP: "tag:yaml.org,2002:map", + SEQ: "tag:yaml.org,2002:seq", + STR: "tag:yaml.org,2002:str" + }; + function findLineStarts(src) { + const ls = [0]; + let offset = src.indexOf("\n"); + while (offset !== -1) { + offset += 1; + ls.push(offset); + offset = src.indexOf("\n", offset); + } + return ls; + } + function getSrcInfo(cst) { + let lineStarts, src; + if (typeof cst === "string") { + lineStarts = findLineStarts(cst); + src = cst; + } else { + if (Array.isArray(cst)) cst = cst[0]; + if (cst && cst.context) { + if (!cst.lineStarts) cst.lineStarts = findLineStarts(cst.context.src); + lineStarts = cst.lineStarts; + src = cst.context.src; + } + } + return { + lineStarts, + src + }; + } + function getLinePos(offset, cst) { + if (typeof offset !== "number" || offset < 0) return null; + const { + lineStarts, + src + } = getSrcInfo(cst); + if (!lineStarts || !src || offset > src.length) return null; + for (let i = 0; i < lineStarts.length; ++i) { + const start = lineStarts[i]; + if (offset < start) { + return { + line: i, + col: offset - lineStarts[i - 1] + 1 + }; + } + if (offset === start) return { + line: i + 1, + col: 1 + }; + } + const line = lineStarts.length; + return { + line, + col: offset - lineStarts[line - 1] + 1 + }; + } + function getLine(line, cst) { + const { + lineStarts, + src + } = getSrcInfo(cst); + if (!lineStarts || !(line >= 1) || line > lineStarts.length) return null; + const start = lineStarts[line - 1]; + let end = lineStarts[line]; + while (end && end > start && src[end - 1] === "\n") --end; + return src.slice(start, end); + } + function getPrettyContext({ + start, + end + }, cst, maxWidth = 80) { + let src = getLine(start.line, cst); + if (!src) return null; + let { + col + } = start; + if (src.length > maxWidth) { + if (col <= maxWidth - 10) { + src = src.substr(0, maxWidth - 1) + "\u2026"; + } else { + const halfWidth = Math.round(maxWidth / 2); + if (src.length > col + halfWidth) src = src.substr(0, col + halfWidth - 1) + "\u2026"; + col -= src.length - maxWidth; + src = "\u2026" + src.substr(1 - maxWidth); + } + } + let errLen = 1; + let errEnd = ""; + if (end) { + if (end.line === start.line && col + (end.col - start.col) <= maxWidth + 1) { + errLen = end.col - start.col; + } else { + errLen = Math.min(src.length + 1, maxWidth) - col; + errEnd = "\u2026"; + } + } + const offset = col > 1 ? " ".repeat(col - 1) : ""; + const err = "^".repeat(errLen); + return `${src} +${offset}${err}${errEnd}`; + } + var Range = class _Range { + static copy(orig) { + return new _Range(orig.start, orig.end); + } + constructor(start, end) { + this.start = start; + this.end = end || start; + } + isEmpty() { + return typeof this.start !== "number" || !this.end || this.end <= this.start; + } + /** + * Set `origStart` and `origEnd` to point to the original source range for + * this node, which may differ due to dropped CR characters. + * + * @param {number[]} cr - Positions of dropped CR characters + * @param {number} offset - Starting index of `cr` from the last call + * @returns {number} - The next offset, matching the one found for `origStart` + */ + setOrigRange(cr, offset) { + const { + start, + end + } = this; + if (cr.length === 0 || end <= cr[0]) { + this.origStart = start; + this.origEnd = end; + return offset; + } + let i = offset; + while (i < cr.length) { + if (cr[i] > start) break; + else ++i; + } + this.origStart = start + i; + const nextOffset = i; + while (i < cr.length) { + if (cr[i] >= end) break; + else ++i; + } + this.origEnd = end + i; + return nextOffset; + } + }; + var Node = class _Node { + static addStringTerminator(src, offset, str) { + if (str[str.length - 1] === "\n") return str; + const next = _Node.endOfWhiteSpace(src, offset); + return next >= src.length || src[next] === "\n" ? str + "\n" : str; + } + // ^(---|...) + static atDocumentBoundary(src, offset, sep) { + const ch0 = src[offset]; + if (!ch0) return true; + const prev = src[offset - 1]; + if (prev && prev !== "\n") return false; + if (sep) { + if (ch0 !== sep) return false; + } else { + if (ch0 !== Char.DIRECTIVES_END && ch0 !== Char.DOCUMENT_END) return false; + } + const ch1 = src[offset + 1]; + const ch2 = src[offset + 2]; + if (ch1 !== ch0 || ch2 !== ch0) return false; + const ch3 = src[offset + 3]; + return !ch3 || ch3 === "\n" || ch3 === " " || ch3 === " "; + } + static endOfIdentifier(src, offset) { + let ch = src[offset]; + const isVerbatim = ch === "<"; + const notOk = isVerbatim ? ["\n", " ", " ", ">"] : ["\n", " ", " ", "[", "]", "{", "}", ","]; + while (ch && notOk.indexOf(ch) === -1) ch = src[offset += 1]; + if (isVerbatim && ch === ">") offset += 1; + return offset; + } + static endOfIndent(src, offset) { + let ch = src[offset]; + while (ch === " ") ch = src[offset += 1]; + return offset; + } + static endOfLine(src, offset) { + let ch = src[offset]; + while (ch && ch !== "\n") ch = src[offset += 1]; + return offset; + } + static endOfWhiteSpace(src, offset) { + let ch = src[offset]; + while (ch === " " || ch === " ") ch = src[offset += 1]; + return offset; + } + static startOfLine(src, offset) { + let ch = src[offset - 1]; + if (ch === "\n") return offset; + while (ch && ch !== "\n") ch = src[offset -= 1]; + return offset + 1; + } + /** + * End of indentation, or null if the line's indent level is not more + * than `indent` + * + * @param {string} src + * @param {number} indent + * @param {number} lineStart + * @returns {?number} + */ + static endOfBlockIndent(src, indent, lineStart) { + const inEnd = _Node.endOfIndent(src, lineStart); + if (inEnd > lineStart + indent) { + return inEnd; + } else { + const wsEnd = _Node.endOfWhiteSpace(src, inEnd); + const ch = src[wsEnd]; + if (!ch || ch === "\n") return wsEnd; + } + return null; + } + static atBlank(src, offset, endAsBlank) { + const ch = src[offset]; + return ch === "\n" || ch === " " || ch === " " || endAsBlank && !ch; + } + static nextNodeIsIndented(ch, indentDiff, indicatorAsIndent) { + if (!ch || indentDiff < 0) return false; + if (indentDiff > 0) return true; + return indicatorAsIndent && ch === "-"; + } + // should be at line or string end, or at next non-whitespace char + static normalizeOffset(src, offset) { + const ch = src[offset]; + return !ch ? offset : ch !== "\n" && src[offset - 1] === "\n" ? offset - 1 : _Node.endOfWhiteSpace(src, offset); + } + // fold single newline into space, multiple newlines to N - 1 newlines + // presumes src[offset] === '\n' + static foldNewline(src, offset, indent) { + let inCount = 0; + let error = false; + let fold = ""; + let ch = src[offset + 1]; + while (ch === " " || ch === " " || ch === "\n") { + switch (ch) { + case "\n": + inCount = 0; + offset += 1; + fold += "\n"; + break; + case " ": + if (inCount <= indent) error = true; + offset = _Node.endOfWhiteSpace(src, offset + 2) - 1; + break; + case " ": + inCount += 1; + offset += 1; + break; + } + ch = src[offset + 1]; + } + if (!fold) fold = " "; + if (ch && inCount <= indent) error = true; + return { + fold, + offset, + error + }; + } + constructor(type, props, context) { + Object.defineProperty(this, "context", { + value: context || null, + writable: true + }); + this.error = null; + this.range = null; + this.valueRange = null; + this.props = props || []; + this.type = type; + this.value = null; + } + getPropValue(idx, key, skipKey) { + if (!this.context) return null; + const { + src + } = this.context; + const prop = this.props[idx]; + return prop && src[prop.start] === key ? src.slice(prop.start + (skipKey ? 1 : 0), prop.end) : null; + } + get anchor() { + for (let i = 0; i < this.props.length; ++i) { + const anchor = this.getPropValue(i, Char.ANCHOR, true); + if (anchor != null) return anchor; + } + return null; + } + get comment() { + const comments = []; + for (let i = 0; i < this.props.length; ++i) { + const comment = this.getPropValue(i, Char.COMMENT, true); + if (comment != null) comments.push(comment); + } + return comments.length > 0 ? comments.join("\n") : null; + } + commentHasRequiredWhitespace(start) { + const { + src + } = this.context; + if (this.header && start === this.header.end) return false; + if (!this.valueRange) return false; + const { + end + } = this.valueRange; + return start !== end || _Node.atBlank(src, end - 1); + } + get hasComment() { + if (this.context) { + const { + src + } = this.context; + for (let i = 0; i < this.props.length; ++i) { + if (src[this.props[i].start] === Char.COMMENT) return true; + } + } + return false; + } + get hasProps() { + if (this.context) { + const { + src + } = this.context; + for (let i = 0; i < this.props.length; ++i) { + if (src[this.props[i].start] !== Char.COMMENT) return true; + } + } + return false; + } + get includesTrailingLines() { + return false; + } + get jsonLike() { + const jsonLikeTypes = [Type.FLOW_MAP, Type.FLOW_SEQ, Type.QUOTE_DOUBLE, Type.QUOTE_SINGLE]; + return jsonLikeTypes.indexOf(this.type) !== -1; + } + get rangeAsLinePos() { + if (!this.range || !this.context) return void 0; + const start = getLinePos(this.range.start, this.context.root); + if (!start) return void 0; + const end = getLinePos(this.range.end, this.context.root); + return { + start, + end + }; + } + get rawValue() { + if (!this.valueRange || !this.context) return null; + const { + start, + end + } = this.valueRange; + return this.context.src.slice(start, end); + } + get tag() { + for (let i = 0; i < this.props.length; ++i) { + const tag = this.getPropValue(i, Char.TAG, false); + if (tag != null) { + if (tag[1] === "<") { + return { + verbatim: tag.slice(2, -1) + }; + } else { + const [_2, handle, suffix] = tag.match(/^(.*!)([^!]*)$/); + return { + handle, + suffix + }; + } + } + } + return null; + } + get valueRangeContainsNewline() { + if (!this.valueRange || !this.context) return false; + const { + start, + end + } = this.valueRange; + const { + src + } = this.context; + for (let i = start; i < end; ++i) { + if (src[i] === "\n") return true; + } + return false; + } + parseComment(start) { + const { + src + } = this.context; + if (src[start] === Char.COMMENT) { + const end = _Node.endOfLine(src, start + 1); + const commentRange = new Range(start, end); + this.props.push(commentRange); + return end; + } + return start; + } + /** + * Populates the `origStart` and `origEnd` values of all ranges for this + * node. Extended by child classes to handle descendant nodes. + * + * @param {number[]} cr - Positions of dropped CR characters + * @param {number} offset - Starting index of `cr` from the last call + * @returns {number} - The next offset, matching the one found for `origStart` + */ + setOrigRanges(cr, offset) { + if (this.range) offset = this.range.setOrigRange(cr, offset); + if (this.valueRange) this.valueRange.setOrigRange(cr, offset); + this.props.forEach((prop) => prop.setOrigRange(cr, offset)); + return offset; + } + toString() { + const { + context: { + src + }, + range, + value + } = this; + if (value != null) return value; + const str = src.slice(range.start, range.end); + return _Node.addStringTerminator(src, range.end, str); + } + }; + var YAMLError = class extends Error { + constructor(name, source, message) { + if (!message || !(source instanceof Node)) throw new Error(`Invalid arguments for new ${name}`); + super(); + this.name = name; + this.message = message; + this.source = source; + } + makePretty() { + if (!this.source) return; + this.nodeType = this.source.type; + const cst = this.source.context && this.source.context.root; + if (typeof this.offset === "number") { + this.range = new Range(this.offset, this.offset + 1); + const start = cst && getLinePos(this.offset, cst); + if (start) { + const end = { + line: start.line, + col: start.col + 1 + }; + this.linePos = { + start, + end + }; + } + delete this.offset; + } else { + this.range = this.source.range; + this.linePos = this.source.rangeAsLinePos; + } + if (this.linePos) { + const { + line, + col + } = this.linePos.start; + this.message += ` at line ${line}, column ${col}`; + const ctx = cst && getPrettyContext(this.linePos, cst); + if (ctx) this.message += `: + +${ctx} +`; + } + delete this.source; + } + }; + var YAMLReferenceError = class extends YAMLError { + constructor(source, message) { + super("YAMLReferenceError", source, message); + } + }; + var YAMLSemanticError = class extends YAMLError { + constructor(source, message) { + super("YAMLSemanticError", source, message); + } + }; + var YAMLSyntaxError = class extends YAMLError { + constructor(source, message) { + super("YAMLSyntaxError", source, message); + } + }; + var YAMLWarning = class extends YAMLError { + constructor(source, message) { + super("YAMLWarning", source, message); + } + }; + function _defineProperty(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { + value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + return obj; + } + var PlainValue = class _PlainValue extends Node { + static endOfLine(src, start, inFlow) { + let ch = src[start]; + let offset = start; + while (ch && ch !== "\n") { + if (inFlow && (ch === "[" || ch === "]" || ch === "{" || ch === "}" || ch === ",")) break; + const next = src[offset + 1]; + if (ch === ":" && (!next || next === "\n" || next === " " || next === " " || inFlow && next === ",")) break; + if ((ch === " " || ch === " ") && next === "#") break; + offset += 1; + ch = next; + } + return offset; + } + get strValue() { + if (!this.valueRange || !this.context) return null; + let { + start, + end + } = this.valueRange; + const { + src + } = this.context; + let ch = src[end - 1]; + while (start < end && (ch === "\n" || ch === " " || ch === " ")) ch = src[--end - 1]; + let str = ""; + for (let i = start; i < end; ++i) { + const ch2 = src[i]; + if (ch2 === "\n") { + const { + fold, + offset + } = Node.foldNewline(src, i, -1); + str += fold; + i = offset; + } else if (ch2 === " " || ch2 === " ") { + const wsStart = i; + let next = src[i + 1]; + while (i < end && (next === " " || next === " ")) { + i += 1; + next = src[i + 1]; + } + if (next !== "\n") str += i > wsStart ? src.slice(wsStart, i + 1) : ch2; + } else { + str += ch2; + } + } + const ch0 = src[start]; + switch (ch0) { + case " ": { + const msg = "Plain value cannot start with a tab character"; + const errors = [new YAMLSemanticError(this, msg)]; + return { + errors, + str + }; + } + case "@": + case "`": { + const msg = `Plain value cannot start with reserved character ${ch0}`; + const errors = [new YAMLSemanticError(this, msg)]; + return { + errors, + str + }; + } + default: + return str; + } + } + parseBlockValue(start) { + const { + indent, + inFlow, + src + } = this.context; + let offset = start; + let valueEnd = start; + for (let ch = src[offset]; ch === "\n"; ch = src[offset]) { + if (Node.atDocumentBoundary(src, offset + 1)) break; + const end = Node.endOfBlockIndent(src, indent, offset + 1); + if (end === null || src[end] === "#") break; + if (src[end] === "\n") { + offset = end; + } else { + valueEnd = _PlainValue.endOfLine(src, end, inFlow); + offset = valueEnd; + } + } + if (this.valueRange.isEmpty()) this.valueRange.start = start; + this.valueRange.end = valueEnd; + return valueEnd; + } + /** + * Parses a plain value from the source + * + * Accepted forms are: + * ``` + * #comment + * + * first line + * + * first line #comment + * + * first line + * block + * lines + * + * #comment + * block + * lines + * ``` + * where block lines are empty or have an indent level greater than `indent`. + * + * @param {ParseContext} context + * @param {number} start - Index of first character + * @returns {number} - Index of the character after this scalar, may be `\n` + */ + parse(context, start) { + this.context = context; + const { + inFlow, + src + } = context; + let offset = start; + const ch = src[offset]; + if (ch && ch !== "#" && ch !== "\n") { + offset = _PlainValue.endOfLine(src, start, inFlow); + } + this.valueRange = new Range(start, offset); + offset = Node.endOfWhiteSpace(src, offset); + offset = this.parseComment(offset); + if (!this.hasComment || this.valueRange.isEmpty()) { + offset = this.parseBlockValue(offset); + } + return offset; + } + }; + exports2.Char = Char; + exports2.Node = Node; + exports2.PlainValue = PlainValue; + exports2.Range = Range; + exports2.Type = Type; + exports2.YAMLError = YAMLError; + exports2.YAMLReferenceError = YAMLReferenceError; + exports2.YAMLSemanticError = YAMLSemanticError; + exports2.YAMLSyntaxError = YAMLSyntaxError; + exports2.YAMLWarning = YAMLWarning; + exports2._defineProperty = _defineProperty; + exports2.defaultTagPrefix = defaultTagPrefix; + exports2.defaultTags = defaultTags; + } +}); + +// ../../node_modules/swagger2openapi/node_modules/yaml/dist/parse-cst.js +var require_parse_cst3 = __commonJS({ + "../../node_modules/swagger2openapi/node_modules/yaml/dist/parse-cst.js"(exports2) { + "use strict"; + var PlainValue = require_PlainValue_ec8e588e3(); + var BlankLine = class extends PlainValue.Node { + constructor() { + super(PlainValue.Type.BLANK_LINE); + } + /* istanbul ignore next */ + get includesTrailingLines() { + return true; + } + /** + * Parses a blank line from the source + * + * @param {ParseContext} context + * @param {number} start - Index of first \n character + * @returns {number} - Index of the character after this + */ + parse(context, start) { + this.context = context; + this.range = new PlainValue.Range(start, start + 1); + return start + 1; + } + }; + var CollectionItem = class extends PlainValue.Node { + constructor(type, props) { + super(type, props); + this.node = null; + } + get includesTrailingLines() { + return !!this.node && this.node.includesTrailingLines; + } + /** + * @param {ParseContext} context + * @param {number} start - Index of first character + * @returns {number} - Index of the character after this + */ + parse(context, start) { + this.context = context; + const { + parseNode, + src + } = context; + let { + atLineStart, + lineStart + } = context; + if (!atLineStart && this.type === PlainValue.Type.SEQ_ITEM) this.error = new PlainValue.YAMLSemanticError(this, "Sequence items must not have preceding content on the same line"); + const indent = atLineStart ? start - lineStart : context.indent; + let offset = PlainValue.Node.endOfWhiteSpace(src, start + 1); + let ch = src[offset]; + const inlineComment = ch === "#"; + const comments = []; + let blankLine = null; + while (ch === "\n" || ch === "#") { + if (ch === "#") { + const end2 = PlainValue.Node.endOfLine(src, offset + 1); + comments.push(new PlainValue.Range(offset, end2)); + offset = end2; + } else { + atLineStart = true; + lineStart = offset + 1; + const wsEnd = PlainValue.Node.endOfWhiteSpace(src, lineStart); + if (src[wsEnd] === "\n" && comments.length === 0) { + blankLine = new BlankLine(); + lineStart = blankLine.parse({ + src + }, lineStart); + } + offset = PlainValue.Node.endOfIndent(src, lineStart); + } + ch = src[offset]; + } + if (PlainValue.Node.nextNodeIsIndented(ch, offset - (lineStart + indent), this.type !== PlainValue.Type.SEQ_ITEM)) { + this.node = parseNode({ + atLineStart, + inCollection: false, + indent, + lineStart, + parent: this + }, offset); + } else if (ch && lineStart > start + 1) { + offset = lineStart - 1; + } + if (this.node) { + if (blankLine) { + const items = context.parent.items || context.parent.contents; + if (items) items.push(blankLine); + } + if (comments.length) Array.prototype.push.apply(this.props, comments); + offset = this.node.range.end; + } else { + if (inlineComment) { + const c = comments[0]; + this.props.push(c); + offset = c.end; + } else { + offset = PlainValue.Node.endOfLine(src, start + 1); + } + } + const end = this.node ? this.node.valueRange.end : offset; + this.valueRange = new PlainValue.Range(start, end); + return offset; + } + setOrigRanges(cr, offset) { + offset = super.setOrigRanges(cr, offset); + return this.node ? this.node.setOrigRanges(cr, offset) : offset; + } + toString() { + const { + context: { + src + }, + node, + range, + value + } = this; + if (value != null) return value; + const str = node ? src.slice(range.start, node.range.start) + String(node) : src.slice(range.start, range.end); + return PlainValue.Node.addStringTerminator(src, range.end, str); + } + }; + var Comment = class extends PlainValue.Node { + constructor() { + super(PlainValue.Type.COMMENT); + } + /** + * Parses a comment line from the source + * + * @param {ParseContext} context + * @param {number} start - Index of first character + * @returns {number} - Index of the character after this scalar + */ + parse(context, start) { + this.context = context; + const offset = this.parseComment(start); + this.range = new PlainValue.Range(start, offset); + return offset; + } + }; + function grabCollectionEndComments(node) { + let cnode = node; + while (cnode instanceof CollectionItem) cnode = cnode.node; + if (!(cnode instanceof Collection)) return null; + const len = cnode.items.length; + let ci = -1; + for (let i = len - 1; i >= 0; --i) { + const n = cnode.items[i]; + if (n.type === PlainValue.Type.COMMENT) { + const { + indent, + lineStart + } = n.context; + if (indent > 0 && n.range.start >= lineStart + indent) break; + ci = i; + } else if (n.type === PlainValue.Type.BLANK_LINE) ci = i; + else break; + } + if (ci === -1) return null; + const ca = cnode.items.splice(ci, len - ci); + const prevEnd = ca[0].range.start; + while (true) { + cnode.range.end = prevEnd; + if (cnode.valueRange && cnode.valueRange.end > prevEnd) cnode.valueRange.end = prevEnd; + if (cnode === node) break; + cnode = cnode.context.parent; + } + return ca; + } + var Collection = class _Collection extends PlainValue.Node { + static nextContentHasIndent(src, offset, indent) { + const lineStart = PlainValue.Node.endOfLine(src, offset) + 1; + offset = PlainValue.Node.endOfWhiteSpace(src, lineStart); + const ch = src[offset]; + if (!ch) return false; + if (offset >= lineStart + indent) return true; + if (ch !== "#" && ch !== "\n") return false; + return _Collection.nextContentHasIndent(src, offset, indent); + } + constructor(firstItem) { + super(firstItem.type === PlainValue.Type.SEQ_ITEM ? PlainValue.Type.SEQ : PlainValue.Type.MAP); + for (let i = firstItem.props.length - 1; i >= 0; --i) { + if (firstItem.props[i].start < firstItem.context.lineStart) { + this.props = firstItem.props.slice(0, i + 1); + firstItem.props = firstItem.props.slice(i + 1); + const itemRange = firstItem.props[0] || firstItem.valueRange; + firstItem.range.start = itemRange.start; + break; + } + } + this.items = [firstItem]; + const ec = grabCollectionEndComments(firstItem); + if (ec) Array.prototype.push.apply(this.items, ec); + } + get includesTrailingLines() { + return this.items.length > 0; + } + /** + * @param {ParseContext} context + * @param {number} start - Index of first character + * @returns {number} - Index of the character after this + */ + parse(context, start) { + this.context = context; + const { + parseNode, + src + } = context; + let lineStart = PlainValue.Node.startOfLine(src, start); + const firstItem = this.items[0]; + firstItem.context.parent = this; + this.valueRange = PlainValue.Range.copy(firstItem.valueRange); + const indent = firstItem.range.start - firstItem.context.lineStart; + let offset = start; + offset = PlainValue.Node.normalizeOffset(src, offset); + let ch = src[offset]; + let atLineStart = PlainValue.Node.endOfWhiteSpace(src, lineStart) === offset; + let prevIncludesTrailingLines = false; + while (ch) { + while (ch === "\n" || ch === "#") { + if (atLineStart && ch === "\n" && !prevIncludesTrailingLines) { + const blankLine = new BlankLine(); + offset = blankLine.parse({ + src + }, offset); + this.valueRange.end = offset; + if (offset >= src.length) { + ch = null; + break; + } + this.items.push(blankLine); + offset -= 1; + } else if (ch === "#") { + if (offset < lineStart + indent && !_Collection.nextContentHasIndent(src, offset, indent)) { + return offset; + } + const comment = new Comment(); + offset = comment.parse({ + indent, + lineStart, + src + }, offset); + this.items.push(comment); + this.valueRange.end = offset; + if (offset >= src.length) { + ch = null; + break; + } + } + lineStart = offset + 1; + offset = PlainValue.Node.endOfIndent(src, lineStart); + if (PlainValue.Node.atBlank(src, offset)) { + const wsEnd = PlainValue.Node.endOfWhiteSpace(src, offset); + const next = src[wsEnd]; + if (!next || next === "\n" || next === "#") { + offset = wsEnd; + } + } + ch = src[offset]; + atLineStart = true; + } + if (!ch) { + break; + } + if (offset !== lineStart + indent && (atLineStart || ch !== ":")) { + if (offset < lineStart + indent) { + if (lineStart > start) offset = lineStart; + break; + } else if (!this.error) { + const msg = "All collection items must start at the same column"; + this.error = new PlainValue.YAMLSyntaxError(this, msg); + } + } + if (firstItem.type === PlainValue.Type.SEQ_ITEM) { + if (ch !== "-") { + if (lineStart > start) offset = lineStart; + break; + } + } else if (ch === "-" && !this.error) { + const next = src[offset + 1]; + if (!next || next === "\n" || next === " " || next === " ") { + const msg = "A collection cannot be both a mapping and a sequence"; + this.error = new PlainValue.YAMLSyntaxError(this, msg); + } + } + const node = parseNode({ + atLineStart, + inCollection: true, + indent, + lineStart, + parent: this + }, offset); + if (!node) return offset; + this.items.push(node); + this.valueRange.end = node.valueRange.end; + offset = PlainValue.Node.normalizeOffset(src, node.range.end); + ch = src[offset]; + atLineStart = false; + prevIncludesTrailingLines = node.includesTrailingLines; + if (ch) { + let ls = offset - 1; + let prev = src[ls]; + while (prev === " " || prev === " ") prev = src[--ls]; + if (prev === "\n") { + lineStart = ls + 1; + atLineStart = true; + } + } + const ec = grabCollectionEndComments(node); + if (ec) Array.prototype.push.apply(this.items, ec); + } + return offset; + } + setOrigRanges(cr, offset) { + offset = super.setOrigRanges(cr, offset); + this.items.forEach((node) => { + offset = node.setOrigRanges(cr, offset); + }); + return offset; + } + toString() { + const { + context: { + src + }, + items, + range, + value + } = this; + if (value != null) return value; + let str = src.slice(range.start, items[0].range.start) + String(items[0]); + for (let i = 1; i < items.length; ++i) { + const item = items[i]; + const { + atLineStart, + indent + } = item.context; + if (atLineStart) for (let i2 = 0; i2 < indent; ++i2) str += " "; + str += String(item); + } + return PlainValue.Node.addStringTerminator(src, range.end, str); + } + }; + var Directive = class extends PlainValue.Node { + constructor() { + super(PlainValue.Type.DIRECTIVE); + this.name = null; + } + get parameters() { + const raw = this.rawValue; + return raw ? raw.trim().split(/[ \t]+/) : []; + } + parseName(start) { + const { + src + } = this.context; + let offset = start; + let ch = src[offset]; + while (ch && ch !== "\n" && ch !== " " && ch !== " ") ch = src[offset += 1]; + this.name = src.slice(start, offset); + return offset; + } + parseParameters(start) { + const { + src + } = this.context; + let offset = start; + let ch = src[offset]; + while (ch && ch !== "\n" && ch !== "#") ch = src[offset += 1]; + this.valueRange = new PlainValue.Range(start, offset); + return offset; + } + parse(context, start) { + this.context = context; + let offset = this.parseName(start + 1); + offset = this.parseParameters(offset); + offset = this.parseComment(offset); + this.range = new PlainValue.Range(start, offset); + return offset; + } + }; + var Document = class _Document extends PlainValue.Node { + static startCommentOrEndBlankLine(src, start) { + const offset = PlainValue.Node.endOfWhiteSpace(src, start); + const ch = src[offset]; + return ch === "#" || ch === "\n" ? offset : start; + } + constructor() { + super(PlainValue.Type.DOCUMENT); + this.directives = null; + this.contents = null; + this.directivesEndMarker = null; + this.documentEndMarker = null; + } + parseDirectives(start) { + const { + src + } = this.context; + this.directives = []; + let atLineStart = true; + let hasDirectives = false; + let offset = start; + while (!PlainValue.Node.atDocumentBoundary(src, offset, PlainValue.Char.DIRECTIVES_END)) { + offset = _Document.startCommentOrEndBlankLine(src, offset); + switch (src[offset]) { + case "\n": + if (atLineStart) { + const blankLine = new BlankLine(); + offset = blankLine.parse({ + src + }, offset); + if (offset < src.length) { + this.directives.push(blankLine); + } + } else { + offset += 1; + atLineStart = true; + } + break; + case "#": + { + const comment = new Comment(); + offset = comment.parse({ + src + }, offset); + this.directives.push(comment); + atLineStart = false; + } + break; + case "%": + { + const directive = new Directive(); + offset = directive.parse({ + parent: this, + src + }, offset); + this.directives.push(directive); + hasDirectives = true; + atLineStart = false; + } + break; + default: + if (hasDirectives) { + this.error = new PlainValue.YAMLSemanticError(this, "Missing directives-end indicator line"); + } else if (this.directives.length > 0) { + this.contents = this.directives; + this.directives = []; + } + return offset; + } + } + if (src[offset]) { + this.directivesEndMarker = new PlainValue.Range(offset, offset + 3); + return offset + 3; + } + if (hasDirectives) { + this.error = new PlainValue.YAMLSemanticError(this, "Missing directives-end indicator line"); + } else if (this.directives.length > 0) { + this.contents = this.directives; + this.directives = []; + } + return offset; + } + parseContents(start) { + const { + parseNode, + src + } = this.context; + if (!this.contents) this.contents = []; + let lineStart = start; + while (src[lineStart - 1] === "-") lineStart -= 1; + let offset = PlainValue.Node.endOfWhiteSpace(src, start); + let atLineStart = lineStart === start; + this.valueRange = new PlainValue.Range(offset); + while (!PlainValue.Node.atDocumentBoundary(src, offset, PlainValue.Char.DOCUMENT_END)) { + switch (src[offset]) { + case "\n": + if (atLineStart) { + const blankLine = new BlankLine(); + offset = blankLine.parse({ + src + }, offset); + if (offset < src.length) { + this.contents.push(blankLine); + } + } else { + offset += 1; + atLineStart = true; + } + lineStart = offset; + break; + case "#": + { + const comment = new Comment(); + offset = comment.parse({ + src + }, offset); + this.contents.push(comment); + atLineStart = false; + } + break; + default: { + const iEnd = PlainValue.Node.endOfIndent(src, offset); + const context = { + atLineStart, + indent: -1, + inFlow: false, + inCollection: false, + lineStart, + parent: this + }; + const node = parseNode(context, iEnd); + if (!node) return this.valueRange.end = iEnd; + this.contents.push(node); + offset = node.range.end; + atLineStart = false; + const ec = grabCollectionEndComments(node); + if (ec) Array.prototype.push.apply(this.contents, ec); + } + } + offset = _Document.startCommentOrEndBlankLine(src, offset); + } + this.valueRange.end = offset; + if (src[offset]) { + this.documentEndMarker = new PlainValue.Range(offset, offset + 3); + offset += 3; + if (src[offset]) { + offset = PlainValue.Node.endOfWhiteSpace(src, offset); + if (src[offset] === "#") { + const comment = new Comment(); + offset = comment.parse({ + src + }, offset); + this.contents.push(comment); + } + switch (src[offset]) { + case "\n": + offset += 1; + break; + case void 0: + break; + default: + this.error = new PlainValue.YAMLSyntaxError(this, "Document end marker line cannot have a non-comment suffix"); + } + } + } + return offset; + } + /** + * @param {ParseContext} context + * @param {number} start - Index of first character + * @returns {number} - Index of the character after this + */ + parse(context, start) { + context.root = this; + this.context = context; + const { + src + } = context; + let offset = src.charCodeAt(start) === 65279 ? start + 1 : start; + offset = this.parseDirectives(offset); + offset = this.parseContents(offset); + return offset; + } + setOrigRanges(cr, offset) { + offset = super.setOrigRanges(cr, offset); + this.directives.forEach((node) => { + offset = node.setOrigRanges(cr, offset); + }); + if (this.directivesEndMarker) offset = this.directivesEndMarker.setOrigRange(cr, offset); + this.contents.forEach((node) => { + offset = node.setOrigRanges(cr, offset); + }); + if (this.documentEndMarker) offset = this.documentEndMarker.setOrigRange(cr, offset); + return offset; + } + toString() { + const { + contents, + directives, + value + } = this; + if (value != null) return value; + let str = directives.join(""); + if (contents.length > 0) { + if (directives.length > 0 || contents[0].type === PlainValue.Type.COMMENT) str += "---\n"; + str += contents.join(""); + } + if (str[str.length - 1] !== "\n") str += "\n"; + return str; + } + }; + var Alias = class extends PlainValue.Node { + /** + * Parses an *alias from the source + * + * @param {ParseContext} context + * @param {number} start - Index of first character + * @returns {number} - Index of the character after this scalar + */ + parse(context, start) { + this.context = context; + const { + src + } = context; + let offset = PlainValue.Node.endOfIdentifier(src, start + 1); + this.valueRange = new PlainValue.Range(start + 1, offset); + offset = PlainValue.Node.endOfWhiteSpace(src, offset); + offset = this.parseComment(offset); + return offset; + } + }; + var Chomp = { + CLIP: "CLIP", + KEEP: "KEEP", + STRIP: "STRIP" + }; + var BlockValue = class extends PlainValue.Node { + constructor(type, props) { + super(type, props); + this.blockIndent = null; + this.chomping = Chomp.CLIP; + this.header = null; + } + get includesTrailingLines() { + return this.chomping === Chomp.KEEP; + } + get strValue() { + if (!this.valueRange || !this.context) return null; + let { + start, + end + } = this.valueRange; + const { + indent, + src + } = this.context; + if (this.valueRange.isEmpty()) return ""; + let lastNewLine = null; + let ch = src[end - 1]; + while (ch === "\n" || ch === " " || ch === " ") { + end -= 1; + if (end <= start) { + if (this.chomping === Chomp.KEEP) break; + else return ""; + } + if (ch === "\n") lastNewLine = end; + ch = src[end - 1]; + } + let keepStart = end + 1; + if (lastNewLine) { + if (this.chomping === Chomp.KEEP) { + keepStart = lastNewLine; + end = this.valueRange.end; + } else { + end = lastNewLine; + } + } + const bi = indent + this.blockIndent; + const folded = this.type === PlainValue.Type.BLOCK_FOLDED; + let atStart = true; + let str = ""; + let sep = ""; + let prevMoreIndented = false; + for (let i = start; i < end; ++i) { + for (let j = 0; j < bi; ++j) { + if (src[i] !== " ") break; + i += 1; + } + const ch2 = src[i]; + if (ch2 === "\n") { + if (sep === "\n") str += "\n"; + else sep = "\n"; + } else { + const lineEnd = PlainValue.Node.endOfLine(src, i); + const line = src.slice(i, lineEnd); + i = lineEnd; + if (folded && (ch2 === " " || ch2 === " ") && i < keepStart) { + if (sep === " ") sep = "\n"; + else if (!prevMoreIndented && !atStart && sep === "\n") sep = "\n\n"; + str += sep + line; + sep = lineEnd < end && src[lineEnd] || ""; + prevMoreIndented = true; + } else { + str += sep + line; + sep = folded && i < keepStart ? " " : "\n"; + prevMoreIndented = false; + } + if (atStart && line !== "") atStart = false; + } + } + return this.chomping === Chomp.STRIP ? str : str + "\n"; + } + parseBlockHeader(start) { + const { + src + } = this.context; + let offset = start + 1; + let bi = ""; + while (true) { + const ch = src[offset]; + switch (ch) { + case "-": + this.chomping = Chomp.STRIP; + break; + case "+": + this.chomping = Chomp.KEEP; + break; + case "0": + case "1": + case "2": + case "3": + case "4": + case "5": + case "6": + case "7": + case "8": + case "9": + bi += ch; + break; + default: + this.blockIndent = Number(bi) || null; + this.header = new PlainValue.Range(start, offset); + return offset; + } + offset += 1; + } + } + parseBlockValue(start) { + const { + indent, + src + } = this.context; + const explicit = !!this.blockIndent; + let offset = start; + let valueEnd = start; + let minBlockIndent = 1; + for (let ch = src[offset]; ch === "\n"; ch = src[offset]) { + offset += 1; + if (PlainValue.Node.atDocumentBoundary(src, offset)) break; + const end = PlainValue.Node.endOfBlockIndent(src, indent, offset); + if (end === null) break; + const ch2 = src[end]; + const lineIndent = end - (offset + indent); + if (!this.blockIndent) { + if (src[end] !== "\n") { + if (lineIndent < minBlockIndent) { + const msg = "Block scalars with more-indented leading empty lines must use an explicit indentation indicator"; + this.error = new PlainValue.YAMLSemanticError(this, msg); + } + this.blockIndent = lineIndent; + } else if (lineIndent > minBlockIndent) { + minBlockIndent = lineIndent; + } + } else if (ch2 && ch2 !== "\n" && lineIndent < this.blockIndent) { + if (src[end] === "#") break; + if (!this.error) { + const src2 = explicit ? "explicit indentation indicator" : "first line"; + const msg = `Block scalars must not be less indented than their ${src2}`; + this.error = new PlainValue.YAMLSemanticError(this, msg); + } + } + if (src[end] === "\n") { + offset = end; + } else { + offset = valueEnd = PlainValue.Node.endOfLine(src, end); + } + } + if (this.chomping !== Chomp.KEEP) { + offset = src[valueEnd] ? valueEnd + 1 : valueEnd; + } + this.valueRange = new PlainValue.Range(start + 1, offset); + return offset; + } + /** + * Parses a block value from the source + * + * Accepted forms are: + * ``` + * BS + * block + * lines + * + * BS #comment + * block + * lines + * ``` + * where the block style BS matches the regexp `[|>][-+1-9]*` and block lines + * are empty or have an indent level greater than `indent`. + * + * @param {ParseContext} context + * @param {number} start - Index of first character + * @returns {number} - Index of the character after this block + */ + parse(context, start) { + this.context = context; + const { + src + } = context; + let offset = this.parseBlockHeader(start); + offset = PlainValue.Node.endOfWhiteSpace(src, offset); + offset = this.parseComment(offset); + offset = this.parseBlockValue(offset); + return offset; + } + setOrigRanges(cr, offset) { + offset = super.setOrigRanges(cr, offset); + return this.header ? this.header.setOrigRange(cr, offset) : offset; + } + }; + var FlowCollection = class extends PlainValue.Node { + constructor(type, props) { + super(type, props); + this.items = null; + } + prevNodeIsJsonLike(idx = this.items.length) { + const node = this.items[idx - 1]; + return !!node && (node.jsonLike || node.type === PlainValue.Type.COMMENT && this.prevNodeIsJsonLike(idx - 1)); + } + /** + * @param {ParseContext} context + * @param {number} start - Index of first character + * @returns {number} - Index of the character after this + */ + parse(context, start) { + this.context = context; + const { + parseNode, + src + } = context; + let { + indent, + lineStart + } = context; + let char = src[start]; + this.items = [{ + char, + offset: start + }]; + let offset = PlainValue.Node.endOfWhiteSpace(src, start + 1); + char = src[offset]; + while (char && char !== "]" && char !== "}") { + switch (char) { + case "\n": + { + lineStart = offset + 1; + const wsEnd = PlainValue.Node.endOfWhiteSpace(src, lineStart); + if (src[wsEnd] === "\n") { + const blankLine = new BlankLine(); + lineStart = blankLine.parse({ + src + }, lineStart); + this.items.push(blankLine); + } + offset = PlainValue.Node.endOfIndent(src, lineStart); + if (offset <= lineStart + indent) { + char = src[offset]; + if (offset < lineStart + indent || char !== "]" && char !== "}") { + const msg = "Insufficient indentation in flow collection"; + this.error = new PlainValue.YAMLSemanticError(this, msg); + } + } + } + break; + case ",": + { + this.items.push({ + char, + offset + }); + offset += 1; + } + break; + case "#": + { + const comment = new Comment(); + offset = comment.parse({ + src + }, offset); + this.items.push(comment); + } + break; + case "?": + case ":": { + const next = src[offset + 1]; + if (next === "\n" || next === " " || next === " " || next === "," || // in-flow : after JSON-like key does not need to be followed by whitespace + char === ":" && this.prevNodeIsJsonLike()) { + this.items.push({ + char, + offset + }); + offset += 1; + break; + } + } + default: { + const node = parseNode({ + atLineStart: false, + inCollection: false, + inFlow: true, + indent: -1, + lineStart, + parent: this + }, offset); + if (!node) { + this.valueRange = new PlainValue.Range(start, offset); + return offset; + } + this.items.push(node); + offset = PlainValue.Node.normalizeOffset(src, node.range.end); + } + } + offset = PlainValue.Node.endOfWhiteSpace(src, offset); + char = src[offset]; + } + this.valueRange = new PlainValue.Range(start, offset + 1); + if (char) { + this.items.push({ + char, + offset + }); + offset = PlainValue.Node.endOfWhiteSpace(src, offset + 1); + offset = this.parseComment(offset); + } + return offset; + } + setOrigRanges(cr, offset) { + offset = super.setOrigRanges(cr, offset); + this.items.forEach((node) => { + if (node instanceof PlainValue.Node) { + offset = node.setOrigRanges(cr, offset); + } else if (cr.length === 0) { + node.origOffset = node.offset; + } else { + let i = offset; + while (i < cr.length) { + if (cr[i] > node.offset) break; + else ++i; + } + node.origOffset = node.offset + i; + offset = i; + } + }); + return offset; + } + toString() { + const { + context: { + src + }, + items, + range, + value + } = this; + if (value != null) return value; + const nodes = items.filter((item) => item instanceof PlainValue.Node); + let str = ""; + let prevEnd = range.start; + nodes.forEach((node) => { + const prefix = src.slice(prevEnd, node.range.start); + prevEnd = node.range.end; + str += prefix + String(node); + if (str[str.length - 1] === "\n" && src[prevEnd - 1] !== "\n" && src[prevEnd] === "\n") { + prevEnd += 1; + } + }); + str += src.slice(prevEnd, range.end); + return PlainValue.Node.addStringTerminator(src, range.end, str); + } + }; + var QuoteDouble = class _QuoteDouble extends PlainValue.Node { + static endOfQuote(src, offset) { + let ch = src[offset]; + while (ch && ch !== '"') { + offset += ch === "\\" ? 2 : 1; + ch = src[offset]; + } + return offset + 1; + } + /** + * @returns {string | { str: string, errors: YAMLSyntaxError[] }} + */ + get strValue() { + if (!this.valueRange || !this.context) return null; + const errors = []; + const { + start, + end + } = this.valueRange; + const { + indent, + src + } = this.context; + if (src[end - 1] !== '"') errors.push(new PlainValue.YAMLSyntaxError(this, 'Missing closing "quote')); + let str = ""; + for (let i = start + 1; i < end - 1; ++i) { + const ch = src[i]; + if (ch === "\n") { + if (PlainValue.Node.atDocumentBoundary(src, i + 1)) errors.push(new PlainValue.YAMLSemanticError(this, "Document boundary indicators are not allowed within string values")); + const { + fold, + offset, + error + } = PlainValue.Node.foldNewline(src, i, indent); + str += fold; + i = offset; + if (error) errors.push(new PlainValue.YAMLSemanticError(this, "Multi-line double-quoted string needs to be sufficiently indented")); + } else if (ch === "\\") { + i += 1; + switch (src[i]) { + case "0": + str += "\0"; + break; + case "a": + str += "\x07"; + break; + case "b": + str += "\b"; + break; + case "e": + str += "\x1B"; + break; + case "f": + str += "\f"; + break; + case "n": + str += "\n"; + break; + case "r": + str += "\r"; + break; + case "t": + str += " "; + break; + case "v": + str += "\v"; + break; + case "N": + str += "\x85"; + break; + case "_": + str += "\xA0"; + break; + case "L": + str += "\u2028"; + break; + case "P": + str += "\u2029"; + break; + case " ": + str += " "; + break; + case '"': + str += '"'; + break; + case "/": + str += "/"; + break; + case "\\": + str += "\\"; + break; + case " ": + str += " "; + break; + case "x": + str += this.parseCharCode(i + 1, 2, errors); + i += 2; + break; + case "u": + str += this.parseCharCode(i + 1, 4, errors); + i += 4; + break; + case "U": + str += this.parseCharCode(i + 1, 8, errors); + i += 8; + break; + case "\n": + while (src[i + 1] === " " || src[i + 1] === " ") i += 1; + break; + default: + errors.push(new PlainValue.YAMLSyntaxError(this, `Invalid escape sequence ${src.substr(i - 1, 2)}`)); + str += "\\" + src[i]; + } + } else if (ch === " " || ch === " ") { + const wsStart = i; + let next = src[i + 1]; + while (next === " " || next === " ") { + i += 1; + next = src[i + 1]; + } + if (next !== "\n") str += i > wsStart ? src.slice(wsStart, i + 1) : ch; + } else { + str += ch; + } + } + return errors.length > 0 ? { + errors, + str + } : str; + } + parseCharCode(offset, length, errors) { + const { + src + } = this.context; + const cc = src.substr(offset, length); + const ok = cc.length === length && /^[0-9a-fA-F]+$/.test(cc); + const code = ok ? parseInt(cc, 16) : NaN; + if (isNaN(code)) { + errors.push(new PlainValue.YAMLSyntaxError(this, `Invalid escape sequence ${src.substr(offset - 2, length + 2)}`)); + return src.substr(offset - 2, length + 2); + } + return String.fromCodePoint(code); + } + /** + * Parses a "double quoted" value from the source + * + * @param {ParseContext} context + * @param {number} start - Index of first character + * @returns {number} - Index of the character after this scalar + */ + parse(context, start) { + this.context = context; + const { + src + } = context; + let offset = _QuoteDouble.endOfQuote(src, start + 1); + this.valueRange = new PlainValue.Range(start, offset); + offset = PlainValue.Node.endOfWhiteSpace(src, offset); + offset = this.parseComment(offset); + return offset; + } + }; + var QuoteSingle = class _QuoteSingle extends PlainValue.Node { + static endOfQuote(src, offset) { + let ch = src[offset]; + while (ch) { + if (ch === "'") { + if (src[offset + 1] !== "'") break; + ch = src[offset += 2]; + } else { + ch = src[offset += 1]; + } + } + return offset + 1; + } + /** + * @returns {string | { str: string, errors: YAMLSyntaxError[] }} + */ + get strValue() { + if (!this.valueRange || !this.context) return null; + const errors = []; + const { + start, + end + } = this.valueRange; + const { + indent, + src + } = this.context; + if (src[end - 1] !== "'") errors.push(new PlainValue.YAMLSyntaxError(this, "Missing closing 'quote")); + let str = ""; + for (let i = start + 1; i < end - 1; ++i) { + const ch = src[i]; + if (ch === "\n") { + if (PlainValue.Node.atDocumentBoundary(src, i + 1)) errors.push(new PlainValue.YAMLSemanticError(this, "Document boundary indicators are not allowed within string values")); + const { + fold, + offset, + error + } = PlainValue.Node.foldNewline(src, i, indent); + str += fold; + i = offset; + if (error) errors.push(new PlainValue.YAMLSemanticError(this, "Multi-line single-quoted string needs to be sufficiently indented")); + } else if (ch === "'") { + str += ch; + i += 1; + if (src[i] !== "'") errors.push(new PlainValue.YAMLSyntaxError(this, "Unescaped single quote? This should not happen.")); + } else if (ch === " " || ch === " ") { + const wsStart = i; + let next = src[i + 1]; + while (next === " " || next === " ") { + i += 1; + next = src[i + 1]; + } + if (next !== "\n") str += i > wsStart ? src.slice(wsStart, i + 1) : ch; + } else { + str += ch; + } + } + return errors.length > 0 ? { + errors, + str + } : str; + } + /** + * Parses a 'single quoted' value from the source + * + * @param {ParseContext} context + * @param {number} start - Index of first character + * @returns {number} - Index of the character after this scalar + */ + parse(context, start) { + this.context = context; + const { + src + } = context; + let offset = _QuoteSingle.endOfQuote(src, start + 1); + this.valueRange = new PlainValue.Range(start, offset); + offset = PlainValue.Node.endOfWhiteSpace(src, offset); + offset = this.parseComment(offset); + return offset; + } + }; + function createNewNode(type, props) { + switch (type) { + case PlainValue.Type.ALIAS: + return new Alias(type, props); + case PlainValue.Type.BLOCK_FOLDED: + case PlainValue.Type.BLOCK_LITERAL: + return new BlockValue(type, props); + case PlainValue.Type.FLOW_MAP: + case PlainValue.Type.FLOW_SEQ: + return new FlowCollection(type, props); + case PlainValue.Type.MAP_KEY: + case PlainValue.Type.MAP_VALUE: + case PlainValue.Type.SEQ_ITEM: + return new CollectionItem(type, props); + case PlainValue.Type.COMMENT: + case PlainValue.Type.PLAIN: + return new PlainValue.PlainValue(type, props); + case PlainValue.Type.QUOTE_DOUBLE: + return new QuoteDouble(type, props); + case PlainValue.Type.QUOTE_SINGLE: + return new QuoteSingle(type, props); + default: + return null; + } + } + var ParseContext = class _ParseContext { + static parseType(src, offset, inFlow) { + switch (src[offset]) { + case "*": + return PlainValue.Type.ALIAS; + case ">": + return PlainValue.Type.BLOCK_FOLDED; + case "|": + return PlainValue.Type.BLOCK_LITERAL; + case "{": + return PlainValue.Type.FLOW_MAP; + case "[": + return PlainValue.Type.FLOW_SEQ; + case "?": + return !inFlow && PlainValue.Node.atBlank(src, offset + 1, true) ? PlainValue.Type.MAP_KEY : PlainValue.Type.PLAIN; + case ":": + return !inFlow && PlainValue.Node.atBlank(src, offset + 1, true) ? PlainValue.Type.MAP_VALUE : PlainValue.Type.PLAIN; + case "-": + return !inFlow && PlainValue.Node.atBlank(src, offset + 1, true) ? PlainValue.Type.SEQ_ITEM : PlainValue.Type.PLAIN; + case '"': + return PlainValue.Type.QUOTE_DOUBLE; + case "'": + return PlainValue.Type.QUOTE_SINGLE; + default: + return PlainValue.Type.PLAIN; + } + } + constructor(orig = {}, { + atLineStart, + inCollection, + inFlow, + indent, + lineStart, + parent + } = {}) { + PlainValue._defineProperty(this, "parseNode", (overlay, start) => { + if (PlainValue.Node.atDocumentBoundary(this.src, start)) return null; + const context = new _ParseContext(this, overlay); + const { + props, + type, + valueStart + } = context.parseProps(start); + const node = createNewNode(type, props); + let offset = node.parse(context, valueStart); + node.range = new PlainValue.Range(start, offset); + if (offset <= start) { + node.error = new Error(`Node#parse consumed no characters`); + node.error.parseEnd = offset; + node.error.source = node; + node.range.end = start + 1; + } + if (context.nodeStartsCollection(node)) { + if (!node.error && !context.atLineStart && context.parent.type === PlainValue.Type.DOCUMENT) { + node.error = new PlainValue.YAMLSyntaxError(node, "Block collection must not have preceding content here (e.g. directives-end indicator)"); + } + const collection = new Collection(node); + offset = collection.parse(new _ParseContext(context), offset); + collection.range = new PlainValue.Range(start, offset); + return collection; + } + return node; + }); + this.atLineStart = atLineStart != null ? atLineStart : orig.atLineStart || false; + this.inCollection = inCollection != null ? inCollection : orig.inCollection || false; + this.inFlow = inFlow != null ? inFlow : orig.inFlow || false; + this.indent = indent != null ? indent : orig.indent; + this.lineStart = lineStart != null ? lineStart : orig.lineStart; + this.parent = parent != null ? parent : orig.parent || {}; + this.root = orig.root; + this.src = orig.src; + } + nodeStartsCollection(node) { + const { + inCollection, + inFlow, + src + } = this; + if (inCollection || inFlow) return false; + if (node instanceof CollectionItem) return true; + let offset = node.range.end; + if (src[offset] === "\n" || src[offset - 1] === "\n") return false; + offset = PlainValue.Node.endOfWhiteSpace(src, offset); + return src[offset] === ":"; + } + // Anchor and tag are before type, which determines the node implementation + // class; hence this intermediate step. + parseProps(offset) { + const { + inFlow, + parent, + src + } = this; + const props = []; + let lineHasProps = false; + offset = this.atLineStart ? PlainValue.Node.endOfIndent(src, offset) : PlainValue.Node.endOfWhiteSpace(src, offset); + let ch = src[offset]; + while (ch === PlainValue.Char.ANCHOR || ch === PlainValue.Char.COMMENT || ch === PlainValue.Char.TAG || ch === "\n") { + if (ch === "\n") { + let inEnd = offset; + let lineStart; + do { + lineStart = inEnd + 1; + inEnd = PlainValue.Node.endOfIndent(src, lineStart); + } while (src[inEnd] === "\n"); + const indentDiff = inEnd - (lineStart + this.indent); + const noIndicatorAsIndent = parent.type === PlainValue.Type.SEQ_ITEM && parent.context.atLineStart; + if (src[inEnd] !== "#" && !PlainValue.Node.nextNodeIsIndented(src[inEnd], indentDiff, !noIndicatorAsIndent)) break; + this.atLineStart = true; + this.lineStart = lineStart; + lineHasProps = false; + offset = inEnd; + } else if (ch === PlainValue.Char.COMMENT) { + const end = PlainValue.Node.endOfLine(src, offset + 1); + props.push(new PlainValue.Range(offset, end)); + offset = end; + } else { + let end = PlainValue.Node.endOfIdentifier(src, offset + 1); + if (ch === PlainValue.Char.TAG && src[end] === "," && /^[a-zA-Z0-9-]+\.[a-zA-Z0-9-]+,\d\d\d\d(-\d\d){0,2}\/\S/.test(src.slice(offset + 1, end + 13))) { + end = PlainValue.Node.endOfIdentifier(src, end + 5); + } + props.push(new PlainValue.Range(offset, end)); + lineHasProps = true; + offset = PlainValue.Node.endOfWhiteSpace(src, end); + } + ch = src[offset]; + } + if (lineHasProps && ch === ":" && PlainValue.Node.atBlank(src, offset + 1, true)) offset -= 1; + const type = _ParseContext.parseType(src, offset, inFlow); + return { + props, + type, + valueStart: offset + }; + } + /** + * Parses a node from the source + * @param {ParseContext} overlay + * @param {number} start - Index of first non-whitespace character for the node + * @returns {?Node} - null if at a document boundary + */ + }; + function parse2(src) { + const cr = []; + if (src.indexOf("\r") !== -1) { + src = src.replace(/\r\n?/g, (match, offset2) => { + if (match.length > 1) cr.push(offset2); + return "\n"; + }); + } + const documents = []; + let offset = 0; + do { + const doc = new Document(); + const context = new ParseContext({ + src + }); + offset = doc.parse(context, offset); + documents.push(doc); + } while (offset < src.length); + documents.setOrigRanges = () => { + if (cr.length === 0) return false; + for (let i = 1; i < cr.length; ++i) cr[i] -= i; + let crOffset = 0; + for (let i = 0; i < documents.length; ++i) { + crOffset = documents[i].setOrigRanges(cr, crOffset); + } + cr.splice(0, cr.length); + return true; + }; + documents.toString = () => documents.join("...\n"); + return documents; + } + exports2.parse = parse2; + } +}); + +// ../../node_modules/swagger2openapi/node_modules/yaml/dist/resolveSeq-d03cb037.js +var require_resolveSeq_d03cb0373 = __commonJS({ + "../../node_modules/swagger2openapi/node_modules/yaml/dist/resolveSeq-d03cb037.js"(exports2) { + "use strict"; + var PlainValue = require_PlainValue_ec8e588e3(); + function addCommentBefore(str, indent, comment) { + if (!comment) return str; + const cc = comment.replace(/[\s\S]^/gm, `$&${indent}#`); + return `#${cc} +${indent}${str}`; + } + function addComment(str, indent, comment) { + return !comment ? str : comment.indexOf("\n") === -1 ? `${str} #${comment}` : `${str} +` + comment.replace(/^/gm, `${indent || ""}#`); + } + var Node = class { + }; + function toJSON(value, arg, ctx) { + if (Array.isArray(value)) return value.map((v, i) => toJSON(v, String(i), ctx)); + if (value && typeof value.toJSON === "function") { + const anchor = ctx && ctx.anchors && ctx.anchors.get(value); + if (anchor) ctx.onCreate = (res2) => { + anchor.res = res2; + delete ctx.onCreate; + }; + const res = value.toJSON(arg, ctx); + if (anchor && ctx.onCreate) ctx.onCreate(res); + return res; + } + if ((!ctx || !ctx.keep) && typeof value === "bigint") return Number(value); + return value; + } + var Scalar = class extends Node { + constructor(value) { + super(); + this.value = value; + } + toJSON(arg, ctx) { + return ctx && ctx.keep ? this.value : toJSON(this.value, arg, ctx); + } + toString() { + return String(this.value); + } + }; + function collectionFromPath(schema2, path, value) { + let v = value; + for (let i = path.length - 1; i >= 0; --i) { + const k = path[i]; + if (Number.isInteger(k) && k >= 0) { + const a = []; + a[k] = v; + v = a; + } else { + const o = {}; + Object.defineProperty(o, k, { + value: v, + writable: true, + enumerable: true, + configurable: true + }); + v = o; + } + } + return schema2.createNode(v, false); + } + var isEmptyPath = (path) => path == null || typeof path === "object" && path[Symbol.iterator]().next().done; + var Collection = class _Collection extends Node { + constructor(schema2) { + super(); + PlainValue._defineProperty(this, "items", []); + this.schema = schema2; + } + addIn(path, value) { + if (isEmptyPath(path)) this.add(value); + else { + const [key, ...rest] = path; + const node = this.get(key, true); + if (node instanceof _Collection) node.addIn(rest, value); + else if (node === void 0 && this.schema) this.set(key, collectionFromPath(this.schema, rest, value)); + else throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`); + } + } + deleteIn([key, ...rest]) { + if (rest.length === 0) return this.delete(key); + const node = this.get(key, true); + if (node instanceof _Collection) return node.deleteIn(rest); + else throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`); + } + getIn([key, ...rest], keepScalar) { + const node = this.get(key, true); + if (rest.length === 0) return !keepScalar && node instanceof Scalar ? node.value : node; + else return node instanceof _Collection ? node.getIn(rest, keepScalar) : void 0; + } + hasAllNullValues() { + return this.items.every((node) => { + if (!node || node.type !== "PAIR") return false; + const n = node.value; + return n == null || n instanceof Scalar && n.value == null && !n.commentBefore && !n.comment && !n.tag; + }); + } + hasIn([key, ...rest]) { + if (rest.length === 0) return this.has(key); + const node = this.get(key, true); + return node instanceof _Collection ? node.hasIn(rest) : false; + } + setIn([key, ...rest], value) { + if (rest.length === 0) { + this.set(key, value); + } else { + const node = this.get(key, true); + if (node instanceof _Collection) node.setIn(rest, value); + else if (node === void 0 && this.schema) this.set(key, collectionFromPath(this.schema, rest, value)); + else throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`); + } + } + // overridden in implementations + /* istanbul ignore next */ + toJSON() { + return null; + } + toString(ctx, { + blockItem, + flowChars, + isMap, + itemIndent + }, onComment, onChompKeep) { + const { + indent, + indentStep, + stringify: stringify2 + } = ctx; + const inFlow = this.type === PlainValue.Type.FLOW_MAP || this.type === PlainValue.Type.FLOW_SEQ || ctx.inFlow; + if (inFlow) itemIndent += indentStep; + const allNullValues = isMap && this.hasAllNullValues(); + ctx = Object.assign({}, ctx, { + allNullValues, + indent: itemIndent, + inFlow, + type: null + }); + let chompKeep = false; + let hasItemWithNewLine = false; + const nodes = this.items.reduce((nodes2, item, i) => { + let comment; + if (item) { + if (!chompKeep && item.spaceBefore) nodes2.push({ + type: "comment", + str: "" + }); + if (item.commentBefore) item.commentBefore.match(/^.*$/gm).forEach((line) => { + nodes2.push({ + type: "comment", + str: `#${line}` + }); + }); + if (item.comment) comment = item.comment; + if (inFlow && (!chompKeep && item.spaceBefore || item.commentBefore || item.comment || item.key && (item.key.commentBefore || item.key.comment) || item.value && (item.value.commentBefore || item.value.comment))) hasItemWithNewLine = true; + } + chompKeep = false; + let str2 = stringify2(item, ctx, () => comment = null, () => chompKeep = true); + if (inFlow && !hasItemWithNewLine && str2.includes("\n")) hasItemWithNewLine = true; + if (inFlow && i < this.items.length - 1) str2 += ","; + str2 = addComment(str2, itemIndent, comment); + if (chompKeep && (comment || inFlow)) chompKeep = false; + nodes2.push({ + type: "item", + str: str2 + }); + return nodes2; + }, []); + let str; + if (nodes.length === 0) { + str = flowChars.start + flowChars.end; + } else if (inFlow) { + const { + start, + end + } = flowChars; + const strings = nodes.map((n) => n.str); + if (hasItemWithNewLine || strings.reduce((sum, str2) => sum + str2.length + 2, 2) > _Collection.maxFlowStringSingleLineLength) { + str = start; + for (const s of strings) { + str += s ? ` +${indentStep}${indent}${s}` : "\n"; + } + str += ` +${indent}${end}`; + } else { + str = `${start} ${strings.join(" ")} ${end}`; + } + } else { + const strings = nodes.map(blockItem); + str = strings.shift(); + for (const s of strings) str += s ? ` +${indent}${s}` : "\n"; + } + if (this.comment) { + str += "\n" + this.comment.replace(/^/gm, `${indent}#`); + if (onComment) onComment(); + } else if (chompKeep && onChompKeep) onChompKeep(); + return str; + } + }; + PlainValue._defineProperty(Collection, "maxFlowStringSingleLineLength", 60); + function asItemIndex(key) { + let idx = key instanceof Scalar ? key.value : key; + if (idx && typeof idx === "string") idx = Number(idx); + return Number.isInteger(idx) && idx >= 0 ? idx : null; + } + var YAMLSeq = class extends Collection { + add(value) { + this.items.push(value); + } + delete(key) { + const idx = asItemIndex(key); + if (typeof idx !== "number") return false; + const del = this.items.splice(idx, 1); + return del.length > 0; + } + get(key, keepScalar) { + const idx = asItemIndex(key); + if (typeof idx !== "number") return void 0; + const it = this.items[idx]; + return !keepScalar && it instanceof Scalar ? it.value : it; + } + has(key) { + const idx = asItemIndex(key); + return typeof idx === "number" && idx < this.items.length; + } + set(key, value) { + const idx = asItemIndex(key); + if (typeof idx !== "number") throw new Error(`Expected a valid index, not ${key}.`); + this.items[idx] = value; + } + toJSON(_2, ctx) { + const seq = []; + if (ctx && ctx.onCreate) ctx.onCreate(seq); + let i = 0; + for (const item of this.items) seq.push(toJSON(item, String(i++), ctx)); + return seq; + } + toString(ctx, onComment, onChompKeep) { + if (!ctx) return JSON.stringify(this); + return super.toString(ctx, { + blockItem: (n) => n.type === "comment" ? n.str : `- ${n.str}`, + flowChars: { + start: "[", + end: "]" + }, + isMap: false, + itemIndent: (ctx.indent || "") + " " + }, onComment, onChompKeep); + } + }; + var stringifyKey = (key, jsKey, ctx) => { + if (jsKey === null) return ""; + if (typeof jsKey !== "object") return String(jsKey); + if (key instanceof Node && ctx && ctx.doc) return key.toString({ + anchors: /* @__PURE__ */ Object.create(null), + doc: ctx.doc, + indent: "", + indentStep: ctx.indentStep, + inFlow: true, + inStringifyKey: true, + stringify: ctx.stringify + }); + return JSON.stringify(jsKey); + }; + var Pair = class _Pair extends Node { + constructor(key, value = null) { + super(); + this.key = key; + this.value = value; + this.type = _Pair.Type.PAIR; + } + get commentBefore() { + return this.key instanceof Node ? this.key.commentBefore : void 0; + } + set commentBefore(cb) { + if (this.key == null) this.key = new Scalar(null); + if (this.key instanceof Node) this.key.commentBefore = cb; + else { + const msg = "Pair.commentBefore is an alias for Pair.key.commentBefore. To set it, the key must be a Node."; + throw new Error(msg); + } + } + addToJSMap(ctx, map) { + const key = toJSON(this.key, "", ctx); + if (map instanceof Map) { + const value = toJSON(this.value, key, ctx); + map.set(key, value); + } else if (map instanceof Set) { + map.add(key); + } else { + const stringKey = stringifyKey(this.key, key, ctx); + const value = toJSON(this.value, stringKey, ctx); + if (stringKey in map) Object.defineProperty(map, stringKey, { + value, + writable: true, + enumerable: true, + configurable: true + }); + else map[stringKey] = value; + } + return map; + } + toJSON(_2, ctx) { + const pair = ctx && ctx.mapAsMap ? /* @__PURE__ */ new Map() : {}; + return this.addToJSMap(ctx, pair); + } + toString(ctx, onComment, onChompKeep) { + if (!ctx || !ctx.doc) return JSON.stringify(this); + const { + indent: indentSize, + indentSeq, + simpleKeys + } = ctx.doc.options; + let { + key, + value + } = this; + let keyComment = key instanceof Node && key.comment; + if (simpleKeys) { + if (keyComment) { + throw new Error("With simple keys, key nodes cannot have comments"); + } + if (key instanceof Collection) { + const msg = "With simple keys, collection cannot be used as a key value"; + throw new Error(msg); + } + } + let explicitKey = !simpleKeys && (!key || keyComment || (key instanceof Node ? key instanceof Collection || key.type === PlainValue.Type.BLOCK_FOLDED || key.type === PlainValue.Type.BLOCK_LITERAL : typeof key === "object")); + const { + doc, + indent, + indentStep, + stringify: stringify2 + } = ctx; + ctx = Object.assign({}, ctx, { + implicitKey: !explicitKey, + indent: indent + indentStep + }); + let chompKeep = false; + let str = stringify2(key, ctx, () => keyComment = null, () => chompKeep = true); + str = addComment(str, ctx.indent, keyComment); + if (!explicitKey && str.length > 1024) { + if (simpleKeys) throw new Error("With simple keys, single line scalar must not span more than 1024 characters"); + explicitKey = true; + } + if (ctx.allNullValues && !simpleKeys) { + if (this.comment) { + str = addComment(str, ctx.indent, this.comment); + if (onComment) onComment(); + } else if (chompKeep && !keyComment && onChompKeep) onChompKeep(); + return ctx.inFlow && !explicitKey ? str : `? ${str}`; + } + str = explicitKey ? `? ${str} +${indent}:` : `${str}:`; + if (this.comment) { + str = addComment(str, ctx.indent, this.comment); + if (onComment) onComment(); + } + let vcb = ""; + let valueComment = null; + if (value instanceof Node) { + if (value.spaceBefore) vcb = "\n"; + if (value.commentBefore) { + const cs = value.commentBefore.replace(/^/gm, `${ctx.indent}#`); + vcb += ` +${cs}`; + } + valueComment = value.comment; + } else if (value && typeof value === "object") { + value = doc.schema.createNode(value, true); + } + ctx.implicitKey = false; + if (!explicitKey && !this.comment && value instanceof Scalar) ctx.indentAtStart = str.length + 1; + chompKeep = false; + if (!indentSeq && indentSize >= 2 && !ctx.inFlow && !explicitKey && value instanceof YAMLSeq && value.type !== PlainValue.Type.FLOW_SEQ && !value.tag && !doc.anchors.getName(value)) { + ctx.indent = ctx.indent.substr(2); + } + const valueStr = stringify2(value, ctx, () => valueComment = null, () => chompKeep = true); + let ws = " "; + if (vcb || this.comment) { + ws = `${vcb} +${ctx.indent}`; + } else if (!explicitKey && value instanceof Collection) { + const flow = valueStr[0] === "[" || valueStr[0] === "{"; + if (!flow || valueStr.includes("\n")) ws = ` +${ctx.indent}`; + } else if (valueStr[0] === "\n") ws = ""; + if (chompKeep && !valueComment && onChompKeep) onChompKeep(); + return addComment(str + ws + valueStr, ctx.indent, valueComment); + } + }; + PlainValue._defineProperty(Pair, "Type", { + PAIR: "PAIR", + MERGE_PAIR: "MERGE_PAIR" + }); + var getAliasCount = (node, anchors) => { + if (node instanceof Alias) { + const anchor = anchors.get(node.source); + return anchor.count * anchor.aliasCount; + } else if (node instanceof Collection) { + let count = 0; + for (const item of node.items) { + const c = getAliasCount(item, anchors); + if (c > count) count = c; + } + return count; + } else if (node instanceof Pair) { + const kc = getAliasCount(node.key, anchors); + const vc = getAliasCount(node.value, anchors); + return Math.max(kc, vc); + } + return 1; + }; + var Alias = class _Alias extends Node { + static stringify({ + range, + source + }, { + anchors, + doc, + implicitKey, + inStringifyKey + }) { + let anchor = Object.keys(anchors).find((a) => anchors[a] === source); + if (!anchor && inStringifyKey) anchor = doc.anchors.getName(source) || doc.anchors.newName(); + if (anchor) return `*${anchor}${implicitKey ? " " : ""}`; + const msg = doc.anchors.getName(source) ? "Alias node must be after source node" : "Source node not found for alias node"; + throw new Error(`${msg} [${range}]`); + } + constructor(source) { + super(); + this.source = source; + this.type = PlainValue.Type.ALIAS; + } + set tag(t) { + throw new Error("Alias nodes cannot have tags"); + } + toJSON(arg, ctx) { + if (!ctx) return toJSON(this.source, arg, ctx); + const { + anchors, + maxAliasCount + } = ctx; + const anchor = anchors.get(this.source); + if (!anchor || anchor.res === void 0) { + const msg = "This should not happen: Alias anchor was not resolved?"; + if (this.cstNode) throw new PlainValue.YAMLReferenceError(this.cstNode, msg); + else throw new ReferenceError(msg); + } + if (maxAliasCount >= 0) { + anchor.count += 1; + if (anchor.aliasCount === 0) anchor.aliasCount = getAliasCount(this.source, anchors); + if (anchor.count * anchor.aliasCount > maxAliasCount) { + const msg = "Excessive alias count indicates a resource exhaustion attack"; + if (this.cstNode) throw new PlainValue.YAMLReferenceError(this.cstNode, msg); + else throw new ReferenceError(msg); + } + } + return anchor.res; + } + // Only called when stringifying an alias mapping key while constructing + // Object output. + toString(ctx) { + return _Alias.stringify(this, ctx); + } + }; + PlainValue._defineProperty(Alias, "default", true); + function findPair(items, key) { + const k = key instanceof Scalar ? key.value : key; + for (const it of items) { + if (it instanceof Pair) { + if (it.key === key || it.key === k) return it; + if (it.key && it.key.value === k) return it; + } + } + return void 0; + } + var YAMLMap = class extends Collection { + add(pair, overwrite) { + if (!pair) pair = new Pair(pair); + else if (!(pair instanceof Pair)) pair = new Pair(pair.key || pair, pair.value); + const prev = findPair(this.items, pair.key); + const sortEntries = this.schema && this.schema.sortMapEntries; + if (prev) { + if (overwrite) prev.value = pair.value; + else throw new Error(`Key ${pair.key} already set`); + } else if (sortEntries) { + const i = this.items.findIndex((item) => sortEntries(pair, item) < 0); + if (i === -1) this.items.push(pair); + else this.items.splice(i, 0, pair); + } else { + this.items.push(pair); + } + } + delete(key) { + const it = findPair(this.items, key); + if (!it) return false; + const del = this.items.splice(this.items.indexOf(it), 1); + return del.length > 0; + } + get(key, keepScalar) { + const it = findPair(this.items, key); + const node = it && it.value; + return !keepScalar && node instanceof Scalar ? node.value : node; + } + has(key) { + return !!findPair(this.items, key); + } + set(key, value) { + this.add(new Pair(key, value), true); + } + /** + * @param {*} arg ignored + * @param {*} ctx Conversion context, originally set in Document#toJSON() + * @param {Class} Type If set, forces the returned collection type + * @returns {*} Instance of Type, Map, or Object + */ + toJSON(_2, ctx, Type) { + const map = Type ? new Type() : ctx && ctx.mapAsMap ? /* @__PURE__ */ new Map() : {}; + if (ctx && ctx.onCreate) ctx.onCreate(map); + for (const item of this.items) item.addToJSMap(ctx, map); + return map; + } + toString(ctx, onComment, onChompKeep) { + if (!ctx) return JSON.stringify(this); + for (const item of this.items) { + if (!(item instanceof Pair)) throw new Error(`Map items must all be pairs; found ${JSON.stringify(item)} instead`); + } + return super.toString(ctx, { + blockItem: (n) => n.str, + flowChars: { + start: "{", + end: "}" + }, + isMap: true, + itemIndent: ctx.indent || "" + }, onComment, onChompKeep); + } + }; + var MERGE_KEY = "<<"; + var Merge = class extends Pair { + constructor(pair) { + if (pair instanceof Pair) { + let seq = pair.value; + if (!(seq instanceof YAMLSeq)) { + seq = new YAMLSeq(); + seq.items.push(pair.value); + seq.range = pair.value.range; + } + super(pair.key, seq); + this.range = pair.range; + } else { + super(new Scalar(MERGE_KEY), new YAMLSeq()); + } + this.type = Pair.Type.MERGE_PAIR; + } + // If the value associated with a merge key is a single mapping node, each of + // its key/value pairs is inserted into the current mapping, unless the key + // already exists in it. If the value associated with the merge key is a + // sequence, then this sequence is expected to contain mapping nodes and each + // of these nodes is merged in turn according to its order in the sequence. + // Keys in mapping nodes earlier in the sequence override keys specified in + // later mapping nodes. -- http://yaml.org/type/merge.html + addToJSMap(ctx, map) { + for (const { + source + } of this.value.items) { + if (!(source instanceof YAMLMap)) throw new Error("Merge sources must be maps"); + const srcMap = source.toJSON(null, ctx, Map); + for (const [key, value] of srcMap) { + if (map instanceof Map) { + if (!map.has(key)) map.set(key, value); + } else if (map instanceof Set) { + map.add(key); + } else if (!Object.prototype.hasOwnProperty.call(map, key)) { + Object.defineProperty(map, key, { + value, + writable: true, + enumerable: true, + configurable: true + }); + } + } + } + return map; + } + toString(ctx, onComment) { + const seq = this.value; + if (seq.items.length > 1) return super.toString(ctx, onComment); + this.value = seq.items[0]; + const str = super.toString(ctx, onComment); + this.value = seq; + return str; + } + }; + var binaryOptions = { + defaultType: PlainValue.Type.BLOCK_LITERAL, + lineWidth: 76 + }; + var boolOptions = { + trueStr: "true", + falseStr: "false" + }; + var intOptions = { + asBigInt: false + }; + var nullOptions = { + nullStr: "null" + }; + var strOptions = { + defaultType: PlainValue.Type.PLAIN, + doubleQuoted: { + jsonEncoding: false, + minMultiLineLength: 40 + }, + fold: { + lineWidth: 80, + minContentWidth: 20 + } + }; + function resolveScalar(str, tags, scalarFallback) { + for (const { + format, + test, + resolve + } of tags) { + if (test) { + const match = str.match(test); + if (match) { + let res = resolve.apply(null, match); + if (!(res instanceof Scalar)) res = new Scalar(res); + if (format) res.format = format; + return res; + } + } + } + if (scalarFallback) str = scalarFallback(str); + return new Scalar(str); + } + var FOLD_FLOW = "flow"; + var FOLD_BLOCK = "block"; + var FOLD_QUOTED = "quoted"; + var consumeMoreIndentedLines = (text, i) => { + let ch = text[i + 1]; + while (ch === " " || ch === " ") { + do { + ch = text[i += 1]; + } while (ch && ch !== "\n"); + ch = text[i + 1]; + } + return i; + }; + function foldFlowLines(text, indent, mode, { + indentAtStart, + lineWidth = 80, + minContentWidth = 20, + onFold, + onOverflow + }) { + if (!lineWidth || lineWidth < 0) return text; + const endStep = Math.max(1 + minContentWidth, 1 + lineWidth - indent.length); + if (text.length <= endStep) return text; + const folds = []; + const escapedFolds = {}; + let end = lineWidth - indent.length; + if (typeof indentAtStart === "number") { + if (indentAtStart > lineWidth - Math.max(2, minContentWidth)) folds.push(0); + else end = lineWidth - indentAtStart; + } + let split = void 0; + let prev = void 0; + let overflow = false; + let i = -1; + let escStart = -1; + let escEnd = -1; + if (mode === FOLD_BLOCK) { + i = consumeMoreIndentedLines(text, i); + if (i !== -1) end = i + endStep; + } + for (let ch; ch = text[i += 1]; ) { + if (mode === FOLD_QUOTED && ch === "\\") { + escStart = i; + switch (text[i + 1]) { + case "x": + i += 3; + break; + case "u": + i += 5; + break; + case "U": + i += 9; + break; + default: + i += 1; + } + escEnd = i; + } + if (ch === "\n") { + if (mode === FOLD_BLOCK) i = consumeMoreIndentedLines(text, i); + end = i + endStep; + split = void 0; + } else { + if (ch === " " && prev && prev !== " " && prev !== "\n" && prev !== " ") { + const next = text[i + 1]; + if (next && next !== " " && next !== "\n" && next !== " ") split = i; + } + if (i >= end) { + if (split) { + folds.push(split); + end = split + endStep; + split = void 0; + } else if (mode === FOLD_QUOTED) { + while (prev === " " || prev === " ") { + prev = ch; + ch = text[i += 1]; + overflow = true; + } + const j = i > escEnd + 1 ? i - 2 : escStart - 1; + if (escapedFolds[j]) return text; + folds.push(j); + escapedFolds[j] = true; + end = j + endStep; + split = void 0; + } else { + overflow = true; + } + } + } + prev = ch; + } + if (overflow && onOverflow) onOverflow(); + if (folds.length === 0) return text; + if (onFold) onFold(); + let res = text.slice(0, folds[0]); + for (let i2 = 0; i2 < folds.length; ++i2) { + const fold = folds[i2]; + const end2 = folds[i2 + 1] || text.length; + if (fold === 0) res = ` +${indent}${text.slice(0, end2)}`; + else { + if (mode === FOLD_QUOTED && escapedFolds[fold]) res += `${text[fold]}\\`; + res += ` +${indent}${text.slice(fold + 1, end2)}`; + } + } + return res; + } + var getFoldOptions = ({ + indentAtStart + }) => indentAtStart ? Object.assign({ + indentAtStart + }, strOptions.fold) : strOptions.fold; + var containsDocumentMarker = (str) => /^(%|---|\.\.\.)/m.test(str); + function lineLengthOverLimit(str, lineWidth, indentLength) { + if (!lineWidth || lineWidth < 0) return false; + const limit = lineWidth - indentLength; + const strLen = str.length; + if (strLen <= limit) return false; + for (let i = 0, start = 0; i < strLen; ++i) { + if (str[i] === "\n") { + if (i - start > limit) return true; + start = i + 1; + if (strLen - start <= limit) return false; + } + } + return true; + } + function doubleQuotedString(value, ctx) { + const { + implicitKey + } = ctx; + const { + jsonEncoding, + minMultiLineLength + } = strOptions.doubleQuoted; + const json = JSON.stringify(value); + if (jsonEncoding) return json; + const indent = ctx.indent || (containsDocumentMarker(value) ? " " : ""); + let str = ""; + let start = 0; + for (let i = 0, ch = json[i]; ch; ch = json[++i]) { + if (ch === " " && json[i + 1] === "\\" && json[i + 2] === "n") { + str += json.slice(start, i) + "\\ "; + i += 1; + start = i; + ch = "\\"; + } + if (ch === "\\") switch (json[i + 1]) { + case "u": + { + str += json.slice(start, i); + const code = json.substr(i + 2, 4); + switch (code) { + case "0000": + str += "\\0"; + break; + case "0007": + str += "\\a"; + break; + case "000b": + str += "\\v"; + break; + case "001b": + str += "\\e"; + break; + case "0085": + str += "\\N"; + break; + case "00a0": + str += "\\_"; + break; + case "2028": + str += "\\L"; + break; + case "2029": + str += "\\P"; + break; + default: + if (code.substr(0, 2) === "00") str += "\\x" + code.substr(2); + else str += json.substr(i, 6); + } + i += 5; + start = i + 1; + } + break; + case "n": + if (implicitKey || json[i + 2] === '"' || json.length < minMultiLineLength) { + i += 1; + } else { + str += json.slice(start, i) + "\n\n"; + while (json[i + 2] === "\\" && json[i + 3] === "n" && json[i + 4] !== '"') { + str += "\n"; + i += 2; + } + str += indent; + if (json[i + 2] === " ") str += "\\"; + i += 1; + start = i + 1; + } + break; + default: + i += 1; + } + } + str = start ? str + json.slice(start) : json; + return implicitKey ? str : foldFlowLines(str, indent, FOLD_QUOTED, getFoldOptions(ctx)); + } + function singleQuotedString(value, ctx) { + if (ctx.implicitKey) { + if (/\n/.test(value)) return doubleQuotedString(value, ctx); + } else { + if (/[ \t]\n|\n[ \t]/.test(value)) return doubleQuotedString(value, ctx); + } + const indent = ctx.indent || (containsDocumentMarker(value) ? " " : ""); + const res = "'" + value.replace(/'/g, "''").replace(/\n+/g, `$& +${indent}`) + "'"; + return ctx.implicitKey ? res : foldFlowLines(res, indent, FOLD_FLOW, getFoldOptions(ctx)); + } + function blockString({ + comment, + type, + value + }, ctx, onComment, onChompKeep) { + if (/\n[\t ]+$/.test(value) || /^\s*$/.test(value)) { + return doubleQuotedString(value, ctx); + } + const indent = ctx.indent || (ctx.forceBlockIndent || containsDocumentMarker(value) ? " " : ""); + const indentSize = indent ? "2" : "1"; + const literal = type === PlainValue.Type.BLOCK_FOLDED ? false : type === PlainValue.Type.BLOCK_LITERAL ? true : !lineLengthOverLimit(value, strOptions.fold.lineWidth, indent.length); + let header = literal ? "|" : ">"; + if (!value) return header + "\n"; + let wsStart = ""; + let wsEnd = ""; + value = value.replace(/[\n\t ]*$/, (ws) => { + const n = ws.indexOf("\n"); + if (n === -1) { + header += "-"; + } else if (value === ws || n !== ws.length - 1) { + header += "+"; + if (onChompKeep) onChompKeep(); + } + wsEnd = ws.replace(/\n$/, ""); + return ""; + }).replace(/^[\n ]*/, (ws) => { + if (ws.indexOf(" ") !== -1) header += indentSize; + const m = ws.match(/ +$/); + if (m) { + wsStart = ws.slice(0, -m[0].length); + return m[0]; + } else { + wsStart = ws; + return ""; + } + }); + if (wsEnd) wsEnd = wsEnd.replace(/\n+(?!\n|$)/g, `$&${indent}`); + if (wsStart) wsStart = wsStart.replace(/\n+/g, `$&${indent}`); + if (comment) { + header += " #" + comment.replace(/ ?[\r\n]+/g, " "); + if (onComment) onComment(); + } + if (!value) return `${header}${indentSize} +${indent}${wsEnd}`; + if (literal) { + value = value.replace(/\n+/g, `$&${indent}`); + return `${header} +${indent}${wsStart}${value}${wsEnd}`; + } + value = value.replace(/\n+/g, "\n$&").replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g, "$1$2").replace(/\n+/g, `$&${indent}`); + const body = foldFlowLines(`${wsStart}${value}${wsEnd}`, indent, FOLD_BLOCK, strOptions.fold); + return `${header} +${indent}${body}`; + } + function plainString(item, ctx, onComment, onChompKeep) { + const { + comment, + type, + value + } = item; + const { + actualString, + implicitKey, + indent, + inFlow + } = ctx; + if (implicitKey && /[\n[\]{},]/.test(value) || inFlow && /[[\]{},]/.test(value)) { + return doubleQuotedString(value, ctx); + } + if (!value || /^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(value)) { + return implicitKey || inFlow || value.indexOf("\n") === -1 ? value.indexOf('"') !== -1 && value.indexOf("'") === -1 ? singleQuotedString(value, ctx) : doubleQuotedString(value, ctx) : blockString(item, ctx, onComment, onChompKeep); + } + if (!implicitKey && !inFlow && type !== PlainValue.Type.PLAIN && value.indexOf("\n") !== -1) { + return blockString(item, ctx, onComment, onChompKeep); + } + if (indent === "" && containsDocumentMarker(value)) { + ctx.forceBlockIndent = true; + return blockString(item, ctx, onComment, onChompKeep); + } + const str = value.replace(/\n+/g, `$& +${indent}`); + if (actualString) { + const { + tags + } = ctx.doc.schema; + const resolved = resolveScalar(str, tags, tags.scalarFallback).value; + if (typeof resolved !== "string") return doubleQuotedString(value, ctx); + } + const body = implicitKey ? str : foldFlowLines(str, indent, FOLD_FLOW, getFoldOptions(ctx)); + if (comment && !inFlow && (body.indexOf("\n") !== -1 || comment.indexOf("\n") !== -1)) { + if (onComment) onComment(); + return addCommentBefore(body, indent, comment); + } + return body; + } + function stringifyString(item, ctx, onComment, onChompKeep) { + const { + defaultType + } = strOptions; + const { + implicitKey, + inFlow + } = ctx; + let { + type, + value + } = item; + if (typeof value !== "string") { + value = String(value); + item = Object.assign({}, item, { + value + }); + } + const _stringify = (_type) => { + switch (_type) { + case PlainValue.Type.BLOCK_FOLDED: + case PlainValue.Type.BLOCK_LITERAL: + return blockString(item, ctx, onComment, onChompKeep); + case PlainValue.Type.QUOTE_DOUBLE: + return doubleQuotedString(value, ctx); + case PlainValue.Type.QUOTE_SINGLE: + return singleQuotedString(value, ctx); + case PlainValue.Type.PLAIN: + return plainString(item, ctx, onComment, onChompKeep); + default: + return null; + } + }; + if (type !== PlainValue.Type.QUOTE_DOUBLE && /[\x00-\x08\x0b-\x1f\x7f-\x9f]/.test(value)) { + type = PlainValue.Type.QUOTE_DOUBLE; + } else if ((implicitKey || inFlow) && (type === PlainValue.Type.BLOCK_FOLDED || type === PlainValue.Type.BLOCK_LITERAL)) { + type = PlainValue.Type.QUOTE_DOUBLE; + } + let res = _stringify(type); + if (res === null) { + res = _stringify(defaultType); + if (res === null) throw new Error(`Unsupported default string type ${defaultType}`); + } + return res; + } + function stringifyNumber({ + format, + minFractionDigits, + tag, + value + }) { + if (typeof value === "bigint") return String(value); + if (!isFinite(value)) return isNaN(value) ? ".nan" : value < 0 ? "-.inf" : ".inf"; + let n = JSON.stringify(value); + if (!format && minFractionDigits && (!tag || tag === "tag:yaml.org,2002:float") && /^\d/.test(n)) { + let i = n.indexOf("."); + if (i < 0) { + i = n.length; + n += "."; + } + let d = minFractionDigits - (n.length - i - 1); + while (d-- > 0) n += "0"; + } + return n; + } + function checkFlowCollectionEnd(errors, cst) { + let char, name; + switch (cst.type) { + case PlainValue.Type.FLOW_MAP: + char = "}"; + name = "flow map"; + break; + case PlainValue.Type.FLOW_SEQ: + char = "]"; + name = "flow sequence"; + break; + default: + errors.push(new PlainValue.YAMLSemanticError(cst, "Not a flow collection!?")); + return; + } + let lastItem; + for (let i = cst.items.length - 1; i >= 0; --i) { + const item = cst.items[i]; + if (!item || item.type !== PlainValue.Type.COMMENT) { + lastItem = item; + break; + } + } + if (lastItem && lastItem.char !== char) { + const msg = `Expected ${name} to end with ${char}`; + let err; + if (typeof lastItem.offset === "number") { + err = new PlainValue.YAMLSemanticError(cst, msg); + err.offset = lastItem.offset + 1; + } else { + err = new PlainValue.YAMLSemanticError(lastItem, msg); + if (lastItem.range && lastItem.range.end) err.offset = lastItem.range.end - lastItem.range.start; + } + errors.push(err); + } + } + function checkFlowCommentSpace(errors, comment) { + const prev = comment.context.src[comment.range.start - 1]; + if (prev !== "\n" && prev !== " " && prev !== " ") { + const msg = "Comments must be separated from other tokens by white space characters"; + errors.push(new PlainValue.YAMLSemanticError(comment, msg)); + } + } + function getLongKeyError(source, key) { + const sk = String(key); + const k = sk.substr(0, 8) + "..." + sk.substr(-8); + return new PlainValue.YAMLSemanticError(source, `The "${k}" key is too long`); + } + function resolveComments(collection, comments) { + for (const { + afterKey, + before, + comment + } of comments) { + let item = collection.items[before]; + if (!item) { + if (comment !== void 0) { + if (collection.comment) collection.comment += "\n" + comment; + else collection.comment = comment; + } + } else { + if (afterKey && item.value) item = item.value; + if (comment === void 0) { + if (afterKey || !item.commentBefore) item.spaceBefore = true; + } else { + if (item.commentBefore) item.commentBefore += "\n" + comment; + else item.commentBefore = comment; + } + } + } + } + function resolveString(doc, node) { + const res = node.strValue; + if (!res) return ""; + if (typeof res === "string") return res; + res.errors.forEach((error) => { + if (!error.source) error.source = node; + doc.errors.push(error); + }); + return res.str; + } + function resolveTagHandle(doc, node) { + const { + handle, + suffix + } = node.tag; + let prefix = doc.tagPrefixes.find((p) => p.handle === handle); + if (!prefix) { + const dtp = doc.getDefaults().tagPrefixes; + if (dtp) prefix = dtp.find((p) => p.handle === handle); + if (!prefix) throw new PlainValue.YAMLSemanticError(node, `The ${handle} tag handle is non-default and was not declared.`); + } + if (!suffix) throw new PlainValue.YAMLSemanticError(node, `The ${handle} tag has no suffix.`); + if (handle === "!" && (doc.version || doc.options.version) === "1.0") { + if (suffix[0] === "^") { + doc.warnings.push(new PlainValue.YAMLWarning(node, "YAML 1.0 ^ tag expansion is not supported")); + return suffix; + } + if (/[:/]/.test(suffix)) { + const vocab = suffix.match(/^([a-z0-9-]+)\/(.*)/i); + return vocab ? `tag:${vocab[1]}.yaml.org,2002:${vocab[2]}` : `tag:${suffix}`; + } + } + return prefix.prefix + decodeURIComponent(suffix); + } + function resolveTagName(doc, node) { + const { + tag, + type + } = node; + let nonSpecific = false; + if (tag) { + const { + handle, + suffix, + verbatim + } = tag; + if (verbatim) { + if (verbatim !== "!" && verbatim !== "!!") return verbatim; + const msg = `Verbatim tags aren't resolved, so ${verbatim} is invalid.`; + doc.errors.push(new PlainValue.YAMLSemanticError(node, msg)); + } else if (handle === "!" && !suffix) { + nonSpecific = true; + } else { + try { + return resolveTagHandle(doc, node); + } catch (error) { + doc.errors.push(error); + } + } + } + switch (type) { + case PlainValue.Type.BLOCK_FOLDED: + case PlainValue.Type.BLOCK_LITERAL: + case PlainValue.Type.QUOTE_DOUBLE: + case PlainValue.Type.QUOTE_SINGLE: + return PlainValue.defaultTags.STR; + case PlainValue.Type.FLOW_MAP: + case PlainValue.Type.MAP: + return PlainValue.defaultTags.MAP; + case PlainValue.Type.FLOW_SEQ: + case PlainValue.Type.SEQ: + return PlainValue.defaultTags.SEQ; + case PlainValue.Type.PLAIN: + return nonSpecific ? PlainValue.defaultTags.STR : null; + default: + return null; + } + } + function resolveByTagName(doc, node, tagName) { + const { + tags + } = doc.schema; + const matchWithTest = []; + for (const tag of tags) { + if (tag.tag === tagName) { + if (tag.test) matchWithTest.push(tag); + else { + const res = tag.resolve(doc, node); + return res instanceof Collection ? res : new Scalar(res); + } + } + } + const str = resolveString(doc, node); + if (typeof str === "string" && matchWithTest.length > 0) return resolveScalar(str, matchWithTest, tags.scalarFallback); + return null; + } + function getFallbackTagName({ + type + }) { + switch (type) { + case PlainValue.Type.FLOW_MAP: + case PlainValue.Type.MAP: + return PlainValue.defaultTags.MAP; + case PlainValue.Type.FLOW_SEQ: + case PlainValue.Type.SEQ: + return PlainValue.defaultTags.SEQ; + default: + return PlainValue.defaultTags.STR; + } + } + function resolveTag(doc, node, tagName) { + try { + const res = resolveByTagName(doc, node, tagName); + if (res) { + if (tagName && node.tag) res.tag = tagName; + return res; + } + } catch (error) { + if (!error.source) error.source = node; + doc.errors.push(error); + return null; + } + try { + const fallback = getFallbackTagName(node); + if (!fallback) throw new Error(`The tag ${tagName} is unavailable`); + const msg = `The tag ${tagName} is unavailable, falling back to ${fallback}`; + doc.warnings.push(new PlainValue.YAMLWarning(node, msg)); + const res = resolveByTagName(doc, node, fallback); + res.tag = tagName; + return res; + } catch (error) { + const refError = new PlainValue.YAMLReferenceError(node, error.message); + refError.stack = error.stack; + doc.errors.push(refError); + return null; + } + } + var isCollectionItem = (node) => { + if (!node) return false; + const { + type + } = node; + return type === PlainValue.Type.MAP_KEY || type === PlainValue.Type.MAP_VALUE || type === PlainValue.Type.SEQ_ITEM; + }; + function resolveNodeProps(errors, node) { + const comments = { + before: [], + after: [] + }; + let hasAnchor = false; + let hasTag = false; + const props = isCollectionItem(node.context.parent) ? node.context.parent.props.concat(node.props) : node.props; + for (const { + start, + end + } of props) { + switch (node.context.src[start]) { + case PlainValue.Char.COMMENT: { + if (!node.commentHasRequiredWhitespace(start)) { + const msg = "Comments must be separated from other tokens by white space characters"; + errors.push(new PlainValue.YAMLSemanticError(node, msg)); + } + const { + header, + valueRange + } = node; + const cc = valueRange && (start > valueRange.start || header && start > header.start) ? comments.after : comments.before; + cc.push(node.context.src.slice(start + 1, end)); + break; + } + case PlainValue.Char.ANCHOR: + if (hasAnchor) { + const msg = "A node can have at most one anchor"; + errors.push(new PlainValue.YAMLSemanticError(node, msg)); + } + hasAnchor = true; + break; + case PlainValue.Char.TAG: + if (hasTag) { + const msg = "A node can have at most one tag"; + errors.push(new PlainValue.YAMLSemanticError(node, msg)); + } + hasTag = true; + break; + } + } + return { + comments, + hasAnchor, + hasTag + }; + } + function resolveNodeValue(doc, node) { + const { + anchors, + errors, + schema: schema2 + } = doc; + if (node.type === PlainValue.Type.ALIAS) { + const name = node.rawValue; + const src = anchors.getNode(name); + if (!src) { + const msg = `Aliased anchor not found: ${name}`; + errors.push(new PlainValue.YAMLReferenceError(node, msg)); + return null; + } + const res = new Alias(src); + anchors._cstAliases.push(res); + return res; + } + const tagName = resolveTagName(doc, node); + if (tagName) return resolveTag(doc, node, tagName); + if (node.type !== PlainValue.Type.PLAIN) { + const msg = `Failed to resolve ${node.type} node here`; + errors.push(new PlainValue.YAMLSyntaxError(node, msg)); + return null; + } + try { + const str = resolveString(doc, node); + return resolveScalar(str, schema2.tags, schema2.tags.scalarFallback); + } catch (error) { + if (!error.source) error.source = node; + errors.push(error); + return null; + } + } + function resolveNode(doc, node) { + if (!node) return null; + if (node.error) doc.errors.push(node.error); + const { + comments, + hasAnchor, + hasTag + } = resolveNodeProps(doc.errors, node); + if (hasAnchor) { + const { + anchors + } = doc; + const name = node.anchor; + const prev = anchors.getNode(name); + if (prev) anchors.map[anchors.newName(name)] = prev; + anchors.map[name] = node; + } + if (node.type === PlainValue.Type.ALIAS && (hasAnchor || hasTag)) { + const msg = "An alias node must not specify any properties"; + doc.errors.push(new PlainValue.YAMLSemanticError(node, msg)); + } + const res = resolveNodeValue(doc, node); + if (res) { + res.range = [node.range.start, node.range.end]; + if (doc.options.keepCstNodes) res.cstNode = node; + if (doc.options.keepNodeTypes) res.type = node.type; + const cb = comments.before.join("\n"); + if (cb) { + res.commentBefore = res.commentBefore ? `${res.commentBefore} +${cb}` : cb; + } + const ca = comments.after.join("\n"); + if (ca) res.comment = res.comment ? `${res.comment} +${ca}` : ca; + } + return node.resolved = res; + } + function resolveMap(doc, cst) { + if (cst.type !== PlainValue.Type.MAP && cst.type !== PlainValue.Type.FLOW_MAP) { + const msg = `A ${cst.type} node cannot be resolved as a mapping`; + doc.errors.push(new PlainValue.YAMLSyntaxError(cst, msg)); + return null; + } + const { + comments, + items + } = cst.type === PlainValue.Type.FLOW_MAP ? resolveFlowMapItems(doc, cst) : resolveBlockMapItems(doc, cst); + const map = new YAMLMap(); + map.items = items; + resolveComments(map, comments); + let hasCollectionKey = false; + for (let i = 0; i < items.length; ++i) { + const { + key: iKey + } = items[i]; + if (iKey instanceof Collection) hasCollectionKey = true; + if (doc.schema.merge && iKey && iKey.value === MERGE_KEY) { + items[i] = new Merge(items[i]); + const sources = items[i].value.items; + let error = null; + sources.some((node) => { + if (node instanceof Alias) { + const { + type + } = node.source; + if (type === PlainValue.Type.MAP || type === PlainValue.Type.FLOW_MAP) return false; + return error = "Merge nodes aliases can only point to maps"; + } + return error = "Merge nodes can only have Alias nodes as values"; + }); + if (error) doc.errors.push(new PlainValue.YAMLSemanticError(cst, error)); + } else { + for (let j = i + 1; j < items.length; ++j) { + const { + key: jKey + } = items[j]; + if (iKey === jKey || iKey && jKey && Object.prototype.hasOwnProperty.call(iKey, "value") && iKey.value === jKey.value) { + const msg = `Map keys must be unique; "${iKey}" is repeated`; + doc.errors.push(new PlainValue.YAMLSemanticError(cst, msg)); + break; + } + } + } + } + if (hasCollectionKey && !doc.options.mapAsMap) { + const warn = "Keys with collection values will be stringified as YAML due to JS Object restrictions. Use mapAsMap: true to avoid this."; + doc.warnings.push(new PlainValue.YAMLWarning(cst, warn)); + } + cst.resolved = map; + return map; + } + var valueHasPairComment = ({ + context: { + lineStart, + node, + src + }, + props + }) => { + if (props.length === 0) return false; + const { + start + } = props[0]; + if (node && start > node.valueRange.start) return false; + if (src[start] !== PlainValue.Char.COMMENT) return false; + for (let i = lineStart; i < start; ++i) if (src[i] === "\n") return false; + return true; + }; + function resolvePairComment(item, pair) { + if (!valueHasPairComment(item)) return; + const comment = item.getPropValue(0, PlainValue.Char.COMMENT, true); + let found = false; + const cb = pair.value.commentBefore; + if (cb && cb.startsWith(comment)) { + pair.value.commentBefore = cb.substr(comment.length + 1); + found = true; + } else { + const cc = pair.value.comment; + if (!item.node && cc && cc.startsWith(comment)) { + pair.value.comment = cc.substr(comment.length + 1); + found = true; + } + } + if (found) pair.comment = comment; + } + function resolveBlockMapItems(doc, cst) { + const comments = []; + const items = []; + let key = void 0; + let keyStart = null; + for (let i = 0; i < cst.items.length; ++i) { + const item = cst.items[i]; + switch (item.type) { + case PlainValue.Type.BLANK_LINE: + comments.push({ + afterKey: !!key, + before: items.length + }); + break; + case PlainValue.Type.COMMENT: + comments.push({ + afterKey: !!key, + before: items.length, + comment: item.comment + }); + break; + case PlainValue.Type.MAP_KEY: + if (key !== void 0) items.push(new Pair(key)); + if (item.error) doc.errors.push(item.error); + key = resolveNode(doc, item.node); + keyStart = null; + break; + case PlainValue.Type.MAP_VALUE: + { + if (key === void 0) key = null; + if (item.error) doc.errors.push(item.error); + if (!item.context.atLineStart && item.node && item.node.type === PlainValue.Type.MAP && !item.node.context.atLineStart) { + const msg = "Nested mappings are not allowed in compact mappings"; + doc.errors.push(new PlainValue.YAMLSemanticError(item.node, msg)); + } + let valueNode = item.node; + if (!valueNode && item.props.length > 0) { + valueNode = new PlainValue.PlainValue(PlainValue.Type.PLAIN, []); + valueNode.context = { + parent: item, + src: item.context.src + }; + const pos = item.range.start + 1; + valueNode.range = { + start: pos, + end: pos + }; + valueNode.valueRange = { + start: pos, + end: pos + }; + if (typeof item.range.origStart === "number") { + const origPos = item.range.origStart + 1; + valueNode.range.origStart = valueNode.range.origEnd = origPos; + valueNode.valueRange.origStart = valueNode.valueRange.origEnd = origPos; + } + } + const pair = new Pair(key, resolveNode(doc, valueNode)); + resolvePairComment(item, pair); + items.push(pair); + if (key && typeof keyStart === "number") { + if (item.range.start > keyStart + 1024) doc.errors.push(getLongKeyError(cst, key)); + } + key = void 0; + keyStart = null; + } + break; + default: + if (key !== void 0) items.push(new Pair(key)); + key = resolveNode(doc, item); + keyStart = item.range.start; + if (item.error) doc.errors.push(item.error); + next: for (let j = i + 1; ; ++j) { + const nextItem = cst.items[j]; + switch (nextItem && nextItem.type) { + case PlainValue.Type.BLANK_LINE: + case PlainValue.Type.COMMENT: + continue next; + case PlainValue.Type.MAP_VALUE: + break next; + default: { + const msg = "Implicit map keys need to be followed by map values"; + doc.errors.push(new PlainValue.YAMLSemanticError(item, msg)); + break next; + } + } + } + if (item.valueRangeContainsNewline) { + const msg = "Implicit map keys need to be on a single line"; + doc.errors.push(new PlainValue.YAMLSemanticError(item, msg)); + } + } + } + if (key !== void 0) items.push(new Pair(key)); + return { + comments, + items + }; + } + function resolveFlowMapItems(doc, cst) { + const comments = []; + const items = []; + let key = void 0; + let explicitKey = false; + let next = "{"; + for (let i = 0; i < cst.items.length; ++i) { + const item = cst.items[i]; + if (typeof item.char === "string") { + const { + char, + offset + } = item; + if (char === "?" && key === void 0 && !explicitKey) { + explicitKey = true; + next = ":"; + continue; + } + if (char === ":") { + if (key === void 0) key = null; + if (next === ":") { + next = ","; + continue; + } + } else { + if (explicitKey) { + if (key === void 0 && char !== ",") key = null; + explicitKey = false; + } + if (key !== void 0) { + items.push(new Pair(key)); + key = void 0; + if (char === ",") { + next = ":"; + continue; + } + } + } + if (char === "}") { + if (i === cst.items.length - 1) continue; + } else if (char === next) { + next = ":"; + continue; + } + const msg = `Flow map contains an unexpected ${char}`; + const err = new PlainValue.YAMLSyntaxError(cst, msg); + err.offset = offset; + doc.errors.push(err); + } else if (item.type === PlainValue.Type.BLANK_LINE) { + comments.push({ + afterKey: !!key, + before: items.length + }); + } else if (item.type === PlainValue.Type.COMMENT) { + checkFlowCommentSpace(doc.errors, item); + comments.push({ + afterKey: !!key, + before: items.length, + comment: item.comment + }); + } else if (key === void 0) { + if (next === ",") doc.errors.push(new PlainValue.YAMLSemanticError(item, "Separator , missing in flow map")); + key = resolveNode(doc, item); + } else { + if (next !== ",") doc.errors.push(new PlainValue.YAMLSemanticError(item, "Indicator : missing in flow map entry")); + items.push(new Pair(key, resolveNode(doc, item))); + key = void 0; + explicitKey = false; + } + } + checkFlowCollectionEnd(doc.errors, cst); + if (key !== void 0) items.push(new Pair(key)); + return { + comments, + items + }; + } + function resolveSeq(doc, cst) { + if (cst.type !== PlainValue.Type.SEQ && cst.type !== PlainValue.Type.FLOW_SEQ) { + const msg = `A ${cst.type} node cannot be resolved as a sequence`; + doc.errors.push(new PlainValue.YAMLSyntaxError(cst, msg)); + return null; + } + const { + comments, + items + } = cst.type === PlainValue.Type.FLOW_SEQ ? resolveFlowSeqItems(doc, cst) : resolveBlockSeqItems(doc, cst); + const seq = new YAMLSeq(); + seq.items = items; + resolveComments(seq, comments); + if (!doc.options.mapAsMap && items.some((it) => it instanceof Pair && it.key instanceof Collection)) { + const warn = "Keys with collection values will be stringified as YAML due to JS Object restrictions. Use mapAsMap: true to avoid this."; + doc.warnings.push(new PlainValue.YAMLWarning(cst, warn)); + } + cst.resolved = seq; + return seq; + } + function resolveBlockSeqItems(doc, cst) { + const comments = []; + const items = []; + for (let i = 0; i < cst.items.length; ++i) { + const item = cst.items[i]; + switch (item.type) { + case PlainValue.Type.BLANK_LINE: + comments.push({ + before: items.length + }); + break; + case PlainValue.Type.COMMENT: + comments.push({ + comment: item.comment, + before: items.length + }); + break; + case PlainValue.Type.SEQ_ITEM: + if (item.error) doc.errors.push(item.error); + items.push(resolveNode(doc, item.node)); + if (item.hasProps) { + const msg = "Sequence items cannot have tags or anchors before the - indicator"; + doc.errors.push(new PlainValue.YAMLSemanticError(item, msg)); + } + break; + default: + if (item.error) doc.errors.push(item.error); + doc.errors.push(new PlainValue.YAMLSyntaxError(item, `Unexpected ${item.type} node in sequence`)); + } + } + return { + comments, + items + }; + } + function resolveFlowSeqItems(doc, cst) { + const comments = []; + const items = []; + let explicitKey = false; + let key = void 0; + let keyStart = null; + let next = "["; + let prevItem = null; + for (let i = 0; i < cst.items.length; ++i) { + const item = cst.items[i]; + if (typeof item.char === "string") { + const { + char, + offset + } = item; + if (char !== ":" && (explicitKey || key !== void 0)) { + if (explicitKey && key === void 0) key = next ? items.pop() : null; + items.push(new Pair(key)); + explicitKey = false; + key = void 0; + keyStart = null; + } + if (char === next) { + next = null; + } else if (!next && char === "?") { + explicitKey = true; + } else if (next !== "[" && char === ":" && key === void 0) { + if (next === ",") { + key = items.pop(); + if (key instanceof Pair) { + const msg = "Chaining flow sequence pairs is invalid"; + const err = new PlainValue.YAMLSemanticError(cst, msg); + err.offset = offset; + doc.errors.push(err); + } + if (!explicitKey && typeof keyStart === "number") { + const keyEnd = item.range ? item.range.start : item.offset; + if (keyEnd > keyStart + 1024) doc.errors.push(getLongKeyError(cst, key)); + const { + src + } = prevItem.context; + for (let i2 = keyStart; i2 < keyEnd; ++i2) if (src[i2] === "\n") { + const msg = "Implicit keys of flow sequence pairs need to be on a single line"; + doc.errors.push(new PlainValue.YAMLSemanticError(prevItem, msg)); + break; + } + } + } else { + key = null; + } + keyStart = null; + explicitKey = false; + next = null; + } else if (next === "[" || char !== "]" || i < cst.items.length - 1) { + const msg = `Flow sequence contains an unexpected ${char}`; + const err = new PlainValue.YAMLSyntaxError(cst, msg); + err.offset = offset; + doc.errors.push(err); + } + } else if (item.type === PlainValue.Type.BLANK_LINE) { + comments.push({ + before: items.length + }); + } else if (item.type === PlainValue.Type.COMMENT) { + checkFlowCommentSpace(doc.errors, item); + comments.push({ + comment: item.comment, + before: items.length + }); + } else { + if (next) { + const msg = `Expected a ${next} in flow sequence`; + doc.errors.push(new PlainValue.YAMLSemanticError(item, msg)); + } + const value = resolveNode(doc, item); + if (key === void 0) { + items.push(value); + prevItem = item; + } else { + items.push(new Pair(key, value)); + key = void 0; + } + keyStart = item.range.start; + next = ","; + } + } + checkFlowCollectionEnd(doc.errors, cst); + if (key !== void 0) items.push(new Pair(key)); + return { + comments, + items + }; + } + exports2.Alias = Alias; + exports2.Collection = Collection; + exports2.Merge = Merge; + exports2.Node = Node; + exports2.Pair = Pair; + exports2.Scalar = Scalar; + exports2.YAMLMap = YAMLMap; + exports2.YAMLSeq = YAMLSeq; + exports2.addComment = addComment; + exports2.binaryOptions = binaryOptions; + exports2.boolOptions = boolOptions; + exports2.findPair = findPair; + exports2.intOptions = intOptions; + exports2.isEmptyPath = isEmptyPath; + exports2.nullOptions = nullOptions; + exports2.resolveMap = resolveMap; + exports2.resolveNode = resolveNode; + exports2.resolveSeq = resolveSeq; + exports2.resolveString = resolveString; + exports2.strOptions = strOptions; + exports2.stringifyNumber = stringifyNumber; + exports2.stringifyString = stringifyString; + exports2.toJSON = toJSON; + } +}); + +// ../../node_modules/swagger2openapi/node_modules/yaml/dist/warnings-1000a372.js +var require_warnings_1000a3723 = __commonJS({ + "../../node_modules/swagger2openapi/node_modules/yaml/dist/warnings-1000a372.js"(exports2) { + "use strict"; + var PlainValue = require_PlainValue_ec8e588e3(); + var resolveSeq = require_resolveSeq_d03cb0373(); + var binary = { + identify: (value) => value instanceof Uint8Array, + // Buffer inherits from Uint8Array + default: false, + tag: "tag:yaml.org,2002:binary", + /** + * Returns a Buffer in node and an Uint8Array in browsers + * + * To use the resulting buffer as an image, you'll want to do something like: + * + * const blob = new Blob([buffer], { type: 'image/jpeg' }) + * document.querySelector('#photo').src = URL.createObjectURL(blob) + */ + resolve: (doc, node) => { + const src = resolveSeq.resolveString(doc, node); + if (typeof Buffer === "function") { + return Buffer.from(src, "base64"); + } else if (typeof atob === "function") { + const str = atob(src.replace(/[\n\r]/g, "")); + const buffer = new Uint8Array(str.length); + for (let i = 0; i < str.length; ++i) buffer[i] = str.charCodeAt(i); + return buffer; + } else { + const msg = "This environment does not support reading binary tags; either Buffer or atob is required"; + doc.errors.push(new PlainValue.YAMLReferenceError(node, msg)); + return null; + } + }, + options: resolveSeq.binaryOptions, + stringify: ({ + comment, + type, + value + }, ctx, onComment, onChompKeep) => { + let src; + if (typeof Buffer === "function") { + src = value instanceof Buffer ? value.toString("base64") : Buffer.from(value.buffer).toString("base64"); + } else if (typeof btoa === "function") { + let s = ""; + for (let i = 0; i < value.length; ++i) s += String.fromCharCode(value[i]); + src = btoa(s); + } else { + throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required"); + } + if (!type) type = resolveSeq.binaryOptions.defaultType; + if (type === PlainValue.Type.QUOTE_DOUBLE) { + value = src; + } else { + const { + lineWidth + } = resolveSeq.binaryOptions; + const n = Math.ceil(src.length / lineWidth); + const lines = new Array(n); + for (let i = 0, o = 0; i < n; ++i, o += lineWidth) { + lines[i] = src.substr(o, lineWidth); + } + value = lines.join(type === PlainValue.Type.BLOCK_LITERAL ? "\n" : " "); + } + return resolveSeq.stringifyString({ + comment, + type, + value + }, ctx, onComment, onChompKeep); + } + }; + function parsePairs(doc, cst) { + const seq = resolveSeq.resolveSeq(doc, cst); + for (let i = 0; i < seq.items.length; ++i) { + let item = seq.items[i]; + if (item instanceof resolveSeq.Pair) continue; + else if (item instanceof resolveSeq.YAMLMap) { + if (item.items.length > 1) { + const msg = "Each pair must have its own sequence indicator"; + throw new PlainValue.YAMLSemanticError(cst, msg); + } + const pair = item.items[0] || new resolveSeq.Pair(); + if (item.commentBefore) pair.commentBefore = pair.commentBefore ? `${item.commentBefore} +${pair.commentBefore}` : item.commentBefore; + if (item.comment) pair.comment = pair.comment ? `${item.comment} +${pair.comment}` : item.comment; + item = pair; + } + seq.items[i] = item instanceof resolveSeq.Pair ? item : new resolveSeq.Pair(item); + } + return seq; + } + function createPairs(schema2, iterable, ctx) { + const pairs2 = new resolveSeq.YAMLSeq(schema2); + pairs2.tag = "tag:yaml.org,2002:pairs"; + for (const it of iterable) { + let key, value; + if (Array.isArray(it)) { + if (it.length === 2) { + key = it[0]; + value = it[1]; + } else throw new TypeError(`Expected [key, value] tuple: ${it}`); + } else if (it && it instanceof Object) { + const keys = Object.keys(it); + if (keys.length === 1) { + key = keys[0]; + value = it[key]; + } else throw new TypeError(`Expected { key: value } tuple: ${it}`); + } else { + key = it; + } + const pair = schema2.createPair(key, value, ctx); + pairs2.items.push(pair); + } + return pairs2; + } + var pairs = { + default: false, + tag: "tag:yaml.org,2002:pairs", + resolve: parsePairs, + createNode: createPairs + }; + var YAMLOMap = class _YAMLOMap extends resolveSeq.YAMLSeq { + constructor() { + super(); + PlainValue._defineProperty(this, "add", resolveSeq.YAMLMap.prototype.add.bind(this)); + PlainValue._defineProperty(this, "delete", resolveSeq.YAMLMap.prototype.delete.bind(this)); + PlainValue._defineProperty(this, "get", resolveSeq.YAMLMap.prototype.get.bind(this)); + PlainValue._defineProperty(this, "has", resolveSeq.YAMLMap.prototype.has.bind(this)); + PlainValue._defineProperty(this, "set", resolveSeq.YAMLMap.prototype.set.bind(this)); + this.tag = _YAMLOMap.tag; + } + toJSON(_2, ctx) { + const map = /* @__PURE__ */ new Map(); + if (ctx && ctx.onCreate) ctx.onCreate(map); + for (const pair of this.items) { + let key, value; + if (pair instanceof resolveSeq.Pair) { + key = resolveSeq.toJSON(pair.key, "", ctx); + value = resolveSeq.toJSON(pair.value, key, ctx); + } else { + key = resolveSeq.toJSON(pair, "", ctx); + } + if (map.has(key)) throw new Error("Ordered maps must not include duplicate keys"); + map.set(key, value); + } + return map; + } + }; + PlainValue._defineProperty(YAMLOMap, "tag", "tag:yaml.org,2002:omap"); + function parseOMap(doc, cst) { + const pairs2 = parsePairs(doc, cst); + const seenKeys = []; + for (const { + key + } of pairs2.items) { + if (key instanceof resolveSeq.Scalar) { + if (seenKeys.includes(key.value)) { + const msg = "Ordered maps must not include duplicate keys"; + throw new PlainValue.YAMLSemanticError(cst, msg); + } else { + seenKeys.push(key.value); + } + } + } + return Object.assign(new YAMLOMap(), pairs2); + } + function createOMap(schema2, iterable, ctx) { + const pairs2 = createPairs(schema2, iterable, ctx); + const omap2 = new YAMLOMap(); + omap2.items = pairs2.items; + return omap2; + } + var omap = { + identify: (value) => value instanceof Map, + nodeClass: YAMLOMap, + default: false, + tag: "tag:yaml.org,2002:omap", + resolve: parseOMap, + createNode: createOMap + }; + var YAMLSet = class _YAMLSet extends resolveSeq.YAMLMap { + constructor() { + super(); + this.tag = _YAMLSet.tag; + } + add(key) { + const pair = key instanceof resolveSeq.Pair ? key : new resolveSeq.Pair(key); + const prev = resolveSeq.findPair(this.items, pair.key); + if (!prev) this.items.push(pair); + } + get(key, keepPair) { + const pair = resolveSeq.findPair(this.items, key); + return !keepPair && pair instanceof resolveSeq.Pair ? pair.key instanceof resolveSeq.Scalar ? pair.key.value : pair.key : pair; + } + set(key, value) { + if (typeof value !== "boolean") throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof value}`); + const prev = resolveSeq.findPair(this.items, key); + if (prev && !value) { + this.items.splice(this.items.indexOf(prev), 1); + } else if (!prev && value) { + this.items.push(new resolveSeq.Pair(key)); + } + } + toJSON(_2, ctx) { + return super.toJSON(_2, ctx, Set); + } + toString(ctx, onComment, onChompKeep) { + if (!ctx) return JSON.stringify(this); + if (this.hasAllNullValues()) return super.toString(ctx, onComment, onChompKeep); + else throw new Error("Set items must all have null values"); + } + }; + PlainValue._defineProperty(YAMLSet, "tag", "tag:yaml.org,2002:set"); + function parseSet(doc, cst) { + const map = resolveSeq.resolveMap(doc, cst); + if (!map.hasAllNullValues()) throw new PlainValue.YAMLSemanticError(cst, "Set items must all have null values"); + return Object.assign(new YAMLSet(), map); + } + function createSet(schema2, iterable, ctx) { + const set2 = new YAMLSet(); + for (const value of iterable) set2.items.push(schema2.createPair(value, null, ctx)); + return set2; + } + var set = { + identify: (value) => value instanceof Set, + nodeClass: YAMLSet, + default: false, + tag: "tag:yaml.org,2002:set", + resolve: parseSet, + createNode: createSet + }; + var parseSexagesimal = (sign, parts) => { + const n = parts.split(":").reduce((n2, p) => n2 * 60 + Number(p), 0); + return sign === "-" ? -n : n; + }; + var stringifySexagesimal = ({ + value + }) => { + if (isNaN(value) || !isFinite(value)) return resolveSeq.stringifyNumber(value); + let sign = ""; + if (value < 0) { + sign = "-"; + value = Math.abs(value); + } + const parts = [value % 60]; + if (value < 60) { + parts.unshift(0); + } else { + value = Math.round((value - parts[0]) / 60); + parts.unshift(value % 60); + if (value >= 60) { + value = Math.round((value - parts[0]) / 60); + parts.unshift(value); + } + } + return sign + parts.map((n) => n < 10 ? "0" + String(n) : String(n)).join(":").replace(/000000\d*$/, ""); + }; + var intTime = { + identify: (value) => typeof value === "number", + default: true, + tag: "tag:yaml.org,2002:int", + format: "TIME", + test: /^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+)$/, + resolve: (str, sign, parts) => parseSexagesimal(sign, parts.replace(/_/g, "")), + stringify: stringifySexagesimal + }; + var floatTime = { + identify: (value) => typeof value === "number", + default: true, + tag: "tag:yaml.org,2002:float", + format: "TIME", + test: /^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*)$/, + resolve: (str, sign, parts) => parseSexagesimal(sign, parts.replace(/_/g, "")), + stringify: stringifySexagesimal + }; + var timestamp = { + identify: (value) => value instanceof Date, + default: true, + tag: "tag:yaml.org,2002:timestamp", + // If the time zone is omitted, the timestamp is assumed to be specified in UTC. The time part + // may be omitted altogether, resulting in a date format. In such a case, the time part is + // assumed to be 00:00:00Z (start of day, UTC). + test: RegExp("^(?:([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?)$"), + resolve: (str, year, month, day, hour, minute, second, millisec, tz) => { + if (millisec) millisec = (millisec + "00").substr(1, 3); + let date = Date.UTC(year, month - 1, day, hour || 0, minute || 0, second || 0, millisec || 0); + if (tz && tz !== "Z") { + let d = parseSexagesimal(tz[0], tz.slice(1)); + if (Math.abs(d) < 30) d *= 60; + date -= 6e4 * d; + } + return new Date(date); + }, + stringify: ({ + value + }) => value.toISOString().replace(/((T00:00)?:00)?\.000Z$/, "") + }; + function shouldWarn(deprecation) { + const env = typeof process !== "undefined" && process.env || {}; + if (deprecation) { + if (typeof YAML_SILENCE_DEPRECATION_WARNINGS !== "undefined") return !YAML_SILENCE_DEPRECATION_WARNINGS; + return !env.YAML_SILENCE_DEPRECATION_WARNINGS; + } + if (typeof YAML_SILENCE_WARNINGS !== "undefined") return !YAML_SILENCE_WARNINGS; + return !env.YAML_SILENCE_WARNINGS; + } + function warn(warning, type) { + if (shouldWarn(false)) { + const emit = typeof process !== "undefined" && process.emitWarning; + if (emit) emit(warning, type); + else { + console.warn(type ? `${type}: ${warning}` : warning); + } + } + } + function warnFileDeprecation(filename) { + if (shouldWarn(true)) { + const path = filename.replace(/.*yaml[/\\]/i, "").replace(/\.js$/, "").replace(/\\/g, "/"); + warn(`The endpoint 'yaml/${path}' will be removed in a future release.`, "DeprecationWarning"); + } + } + var warned = {}; + function warnOptionDeprecation(name, alternative) { + if (!warned[name] && shouldWarn(true)) { + warned[name] = true; + let msg = `The option '${name}' will be removed in a future release`; + msg += alternative ? `, use '${alternative}' instead.` : "."; + warn(msg, "DeprecationWarning"); + } + } + exports2.binary = binary; + exports2.floatTime = floatTime; + exports2.intTime = intTime; + exports2.omap = omap; + exports2.pairs = pairs; + exports2.set = set; + exports2.timestamp = timestamp; + exports2.warn = warn; + exports2.warnFileDeprecation = warnFileDeprecation; + exports2.warnOptionDeprecation = warnOptionDeprecation; + } +}); + +// ../../node_modules/swagger2openapi/node_modules/yaml/dist/Schema-88e323a7.js +var require_Schema_88e323a73 = __commonJS({ + "../../node_modules/swagger2openapi/node_modules/yaml/dist/Schema-88e323a7.js"(exports2) { + "use strict"; + var PlainValue = require_PlainValue_ec8e588e3(); + var resolveSeq = require_resolveSeq_d03cb0373(); + var warnings = require_warnings_1000a3723(); + function createMap(schema2, obj, ctx) { + const map2 = new resolveSeq.YAMLMap(schema2); + if (obj instanceof Map) { + for (const [key, value] of obj) map2.items.push(schema2.createPair(key, value, ctx)); + } else if (obj && typeof obj === "object") { + for (const key of Object.keys(obj)) map2.items.push(schema2.createPair(key, obj[key], ctx)); + } + if (typeof schema2.sortMapEntries === "function") { + map2.items.sort(schema2.sortMapEntries); + } + return map2; + } + var map = { + createNode: createMap, + default: true, + nodeClass: resolveSeq.YAMLMap, + tag: "tag:yaml.org,2002:map", + resolve: resolveSeq.resolveMap + }; + function createSeq(schema2, obj, ctx) { + const seq2 = new resolveSeq.YAMLSeq(schema2); + if (obj && obj[Symbol.iterator]) { + for (const it of obj) { + const v = schema2.createNode(it, ctx.wrapScalars, null, ctx); + seq2.items.push(v); + } + } + return seq2; + } + var seq = { + createNode: createSeq, + default: true, + nodeClass: resolveSeq.YAMLSeq, + tag: "tag:yaml.org,2002:seq", + resolve: resolveSeq.resolveSeq + }; + var string = { + identify: (value) => typeof value === "string", + default: true, + tag: "tag:yaml.org,2002:str", + resolve: resolveSeq.resolveString, + stringify(item, ctx, onComment, onChompKeep) { + ctx = Object.assign({ + actualString: true + }, ctx); + return resolveSeq.stringifyString(item, ctx, onComment, onChompKeep); + }, + options: resolveSeq.strOptions + }; + var failsafe = [map, seq, string]; + var intIdentify$2 = (value) => typeof value === "bigint" || Number.isInteger(value); + var intResolve$1 = (src, part, radix) => resolveSeq.intOptions.asBigInt ? BigInt(src) : parseInt(part, radix); + function intStringify$1(node, radix, prefix) { + const { + value + } = node; + if (intIdentify$2(value) && value >= 0) return prefix + value.toString(radix); + return resolveSeq.stringifyNumber(node); + } + var nullObj = { + identify: (value) => value == null, + createNode: (schema2, value, ctx) => ctx.wrapScalars ? new resolveSeq.Scalar(null) : null, + default: true, + tag: "tag:yaml.org,2002:null", + test: /^(?:~|[Nn]ull|NULL)?$/, + resolve: () => null, + options: resolveSeq.nullOptions, + stringify: () => resolveSeq.nullOptions.nullStr + }; + var boolObj = { + identify: (value) => typeof value === "boolean", + default: true, + tag: "tag:yaml.org,2002:bool", + test: /^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/, + resolve: (str) => str[0] === "t" || str[0] === "T", + options: resolveSeq.boolOptions, + stringify: ({ + value + }) => value ? resolveSeq.boolOptions.trueStr : resolveSeq.boolOptions.falseStr + }; + var octObj = { + identify: (value) => intIdentify$2(value) && value >= 0, + default: true, + tag: "tag:yaml.org,2002:int", + format: "OCT", + test: /^0o([0-7]+)$/, + resolve: (str, oct) => intResolve$1(str, oct, 8), + options: resolveSeq.intOptions, + stringify: (node) => intStringify$1(node, 8, "0o") + }; + var intObj = { + identify: intIdentify$2, + default: true, + tag: "tag:yaml.org,2002:int", + test: /^[-+]?[0-9]+$/, + resolve: (str) => intResolve$1(str, str, 10), + options: resolveSeq.intOptions, + stringify: resolveSeq.stringifyNumber + }; + var hexObj = { + identify: (value) => intIdentify$2(value) && value >= 0, + default: true, + tag: "tag:yaml.org,2002:int", + format: "HEX", + test: /^0x([0-9a-fA-F]+)$/, + resolve: (str, hex) => intResolve$1(str, hex, 16), + options: resolveSeq.intOptions, + stringify: (node) => intStringify$1(node, 16, "0x") + }; + var nanObj = { + identify: (value) => typeof value === "number", + default: true, + tag: "tag:yaml.org,2002:float", + test: /^(?:[-+]?\.inf|(\.nan))$/i, + resolve: (str, nan) => nan ? NaN : str[0] === "-" ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY, + stringify: resolveSeq.stringifyNumber + }; + var expObj = { + identify: (value) => typeof value === "number", + default: true, + tag: "tag:yaml.org,2002:float", + format: "EXP", + test: /^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/, + resolve: (str) => parseFloat(str), + stringify: ({ + value + }) => Number(value).toExponential() + }; + var floatObj = { + identify: (value) => typeof value === "number", + default: true, + tag: "tag:yaml.org,2002:float", + test: /^[-+]?(?:\.([0-9]+)|[0-9]+\.([0-9]*))$/, + resolve(str, frac1, frac2) { + const frac = frac1 || frac2; + const node = new resolveSeq.Scalar(parseFloat(str)); + if (frac && frac[frac.length - 1] === "0") node.minFractionDigits = frac.length; + return node; + }, + stringify: resolveSeq.stringifyNumber + }; + var core = failsafe.concat([nullObj, boolObj, octObj, intObj, hexObj, nanObj, expObj, floatObj]); + var intIdentify$1 = (value) => typeof value === "bigint" || Number.isInteger(value); + var stringifyJSON = ({ + value + }) => JSON.stringify(value); + var json = [map, seq, { + identify: (value) => typeof value === "string", + default: true, + tag: "tag:yaml.org,2002:str", + resolve: resolveSeq.resolveString, + stringify: stringifyJSON + }, { + identify: (value) => value == null, + createNode: (schema2, value, ctx) => ctx.wrapScalars ? new resolveSeq.Scalar(null) : null, + default: true, + tag: "tag:yaml.org,2002:null", + test: /^null$/, + resolve: () => null, + stringify: stringifyJSON + }, { + identify: (value) => typeof value === "boolean", + default: true, + tag: "tag:yaml.org,2002:bool", + test: /^true|false$/, + resolve: (str) => str === "true", + stringify: stringifyJSON + }, { + identify: intIdentify$1, + default: true, + tag: "tag:yaml.org,2002:int", + test: /^-?(?:0|[1-9][0-9]*)$/, + resolve: (str) => resolveSeq.intOptions.asBigInt ? BigInt(str) : parseInt(str, 10), + stringify: ({ + value + }) => intIdentify$1(value) ? value.toString() : JSON.stringify(value) + }, { + identify: (value) => typeof value === "number", + default: true, + tag: "tag:yaml.org,2002:float", + test: /^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/, + resolve: (str) => parseFloat(str), + stringify: stringifyJSON + }]; + json.scalarFallback = (str) => { + throw new SyntaxError(`Unresolved plain scalar ${JSON.stringify(str)}`); + }; + var boolStringify = ({ + value + }) => value ? resolveSeq.boolOptions.trueStr : resolveSeq.boolOptions.falseStr; + var intIdentify = (value) => typeof value === "bigint" || Number.isInteger(value); + function intResolve(sign, src, radix) { + let str = src.replace(/_/g, ""); + if (resolveSeq.intOptions.asBigInt) { + switch (radix) { + case 2: + str = `0b${str}`; + break; + case 8: + str = `0o${str}`; + break; + case 16: + str = `0x${str}`; + break; + } + const n2 = BigInt(str); + return sign === "-" ? BigInt(-1) * n2 : n2; + } + const n = parseInt(str, radix); + return sign === "-" ? -1 * n : n; + } + function intStringify(node, radix, prefix) { + const { + value + } = node; + if (intIdentify(value)) { + const str = value.toString(radix); + return value < 0 ? "-" + prefix + str.substr(1) : prefix + str; + } + return resolveSeq.stringifyNumber(node); + } + var yaml11 = failsafe.concat([{ + identify: (value) => value == null, + createNode: (schema2, value, ctx) => ctx.wrapScalars ? new resolveSeq.Scalar(null) : null, + default: true, + tag: "tag:yaml.org,2002:null", + test: /^(?:~|[Nn]ull|NULL)?$/, + resolve: () => null, + options: resolveSeq.nullOptions, + stringify: () => resolveSeq.nullOptions.nullStr + }, { + identify: (value) => typeof value === "boolean", + default: true, + tag: "tag:yaml.org,2002:bool", + test: /^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/, + resolve: () => true, + options: resolveSeq.boolOptions, + stringify: boolStringify + }, { + identify: (value) => typeof value === "boolean", + default: true, + tag: "tag:yaml.org,2002:bool", + test: /^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/i, + resolve: () => false, + options: resolveSeq.boolOptions, + stringify: boolStringify + }, { + identify: intIdentify, + default: true, + tag: "tag:yaml.org,2002:int", + format: "BIN", + test: /^([-+]?)0b([0-1_]+)$/, + resolve: (str, sign, bin) => intResolve(sign, bin, 2), + stringify: (node) => intStringify(node, 2, "0b") + }, { + identify: intIdentify, + default: true, + tag: "tag:yaml.org,2002:int", + format: "OCT", + test: /^([-+]?)0([0-7_]+)$/, + resolve: (str, sign, oct) => intResolve(sign, oct, 8), + stringify: (node) => intStringify(node, 8, "0") + }, { + identify: intIdentify, + default: true, + tag: "tag:yaml.org,2002:int", + test: /^([-+]?)([0-9][0-9_]*)$/, + resolve: (str, sign, abs) => intResolve(sign, abs, 10), + stringify: resolveSeq.stringifyNumber + }, { + identify: intIdentify, + default: true, + tag: "tag:yaml.org,2002:int", + format: "HEX", + test: /^([-+]?)0x([0-9a-fA-F_]+)$/, + resolve: (str, sign, hex) => intResolve(sign, hex, 16), + stringify: (node) => intStringify(node, 16, "0x") + }, { + identify: (value) => typeof value === "number", + default: true, + tag: "tag:yaml.org,2002:float", + test: /^(?:[-+]?\.inf|(\.nan))$/i, + resolve: (str, nan) => nan ? NaN : str[0] === "-" ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY, + stringify: resolveSeq.stringifyNumber + }, { + identify: (value) => typeof value === "number", + default: true, + tag: "tag:yaml.org,2002:float", + format: "EXP", + test: /^[-+]?([0-9][0-9_]*)?(\.[0-9_]*)?[eE][-+]?[0-9]+$/, + resolve: (str) => parseFloat(str.replace(/_/g, "")), + stringify: ({ + value + }) => Number(value).toExponential() + }, { + identify: (value) => typeof value === "number", + default: true, + tag: "tag:yaml.org,2002:float", + test: /^[-+]?(?:[0-9][0-9_]*)?\.([0-9_]*)$/, + resolve(str, frac) { + const node = new resolveSeq.Scalar(parseFloat(str.replace(/_/g, ""))); + if (frac) { + const f = frac.replace(/_/g, ""); + if (f[f.length - 1] === "0") node.minFractionDigits = f.length; + } + return node; + }, + stringify: resolveSeq.stringifyNumber + }], warnings.binary, warnings.omap, warnings.pairs, warnings.set, warnings.intTime, warnings.floatTime, warnings.timestamp); + var schemas = { + core, + failsafe, + json, + yaml11 + }; + var tags = { + binary: warnings.binary, + bool: boolObj, + float: floatObj, + floatExp: expObj, + floatNaN: nanObj, + floatTime: warnings.floatTime, + int: intObj, + intHex: hexObj, + intOct: octObj, + intTime: warnings.intTime, + map, + null: nullObj, + omap: warnings.omap, + pairs: warnings.pairs, + seq, + set: warnings.set, + timestamp: warnings.timestamp + }; + function findTagObject(value, tagName, tags2) { + if (tagName) { + const match = tags2.filter((t) => t.tag === tagName); + const tagObj = match.find((t) => !t.format) || match[0]; + if (!tagObj) throw new Error(`Tag ${tagName} not found`); + return tagObj; + } + return tags2.find((t) => (t.identify && t.identify(value) || t.class && value instanceof t.class) && !t.format); + } + function createNode(value, tagName, ctx) { + if (value instanceof resolveSeq.Node) return value; + const { + defaultPrefix, + onTagObj, + prevObjects, + schema: schema2, + wrapScalars + } = ctx; + if (tagName && tagName.startsWith("!!")) tagName = defaultPrefix + tagName.slice(2); + let tagObj = findTagObject(value, tagName, schema2.tags); + if (!tagObj) { + if (typeof value.toJSON === "function") value = value.toJSON(); + if (!value || typeof value !== "object") return wrapScalars ? new resolveSeq.Scalar(value) : value; + tagObj = value instanceof Map ? map : value[Symbol.iterator] ? seq : map; + } + if (onTagObj) { + onTagObj(tagObj); + delete ctx.onTagObj; + } + const obj = { + value: void 0, + node: void 0 + }; + if (value && typeof value === "object" && prevObjects) { + const prev = prevObjects.get(value); + if (prev) { + const alias = new resolveSeq.Alias(prev); + ctx.aliasNodes.push(alias); + return alias; + } + obj.value = value; + prevObjects.set(value, obj); + } + obj.node = tagObj.createNode ? tagObj.createNode(ctx.schema, value, ctx) : wrapScalars ? new resolveSeq.Scalar(value) : value; + if (tagName && obj.node instanceof resolveSeq.Node) obj.node.tag = tagName; + return obj.node; + } + function getSchemaTags(schemas2, knownTags, customTags, schemaId) { + let tags2 = schemas2[schemaId.replace(/\W/g, "")]; + if (!tags2) { + const keys = Object.keys(schemas2).map((key) => JSON.stringify(key)).join(", "); + throw new Error(`Unknown schema "${schemaId}"; use one of ${keys}`); + } + if (Array.isArray(customTags)) { + for (const tag of customTags) tags2 = tags2.concat(tag); + } else if (typeof customTags === "function") { + tags2 = customTags(tags2.slice()); + } + for (let i = 0; i < tags2.length; ++i) { + const tag = tags2[i]; + if (typeof tag === "string") { + const tagObj = knownTags[tag]; + if (!tagObj) { + const keys = Object.keys(knownTags).map((key) => JSON.stringify(key)).join(", "); + throw new Error(`Unknown custom tag "${tag}"; use one of ${keys}`); + } + tags2[i] = tagObj; + } + } + return tags2; + } + var sortMapEntriesByKey = (a, b) => a.key < b.key ? -1 : a.key > b.key ? 1 : 0; + var Schema = class _Schema { + // TODO: remove in v2 + // TODO: remove in v2 + constructor({ + customTags, + merge, + schema: schema2, + sortMapEntries, + tags: deprecatedCustomTags + }) { + this.merge = !!merge; + this.name = schema2; + this.sortMapEntries = sortMapEntries === true ? sortMapEntriesByKey : sortMapEntries || null; + if (!customTags && deprecatedCustomTags) warnings.warnOptionDeprecation("tags", "customTags"); + this.tags = getSchemaTags(schemas, tags, customTags || deprecatedCustomTags, schema2); + } + createNode(value, wrapScalars, tagName, ctx) { + const baseCtx = { + defaultPrefix: _Schema.defaultPrefix, + schema: this, + wrapScalars + }; + const createCtx = ctx ? Object.assign(ctx, baseCtx) : baseCtx; + return createNode(value, tagName, createCtx); + } + createPair(key, value, ctx) { + if (!ctx) ctx = { + wrapScalars: true + }; + const k = this.createNode(key, ctx.wrapScalars, null, ctx); + const v = this.createNode(value, ctx.wrapScalars, null, ctx); + return new resolveSeq.Pair(k, v); + } + }; + PlainValue._defineProperty(Schema, "defaultPrefix", PlainValue.defaultTagPrefix); + PlainValue._defineProperty(Schema, "defaultTags", PlainValue.defaultTags); + exports2.Schema = Schema; + } +}); + +// ../../node_modules/swagger2openapi/node_modules/yaml/dist/Document-9b4560a1.js +var require_Document_9b4560a13 = __commonJS({ + "../../node_modules/swagger2openapi/node_modules/yaml/dist/Document-9b4560a1.js"(exports2) { + "use strict"; + var PlainValue = require_PlainValue_ec8e588e3(); + var resolveSeq = require_resolveSeq_d03cb0373(); + var Schema = require_Schema_88e323a73(); + var defaultOptions = { + anchorPrefix: "a", + customTags: null, + indent: 2, + indentSeq: true, + keepCstNodes: false, + keepNodeTypes: true, + keepBlobsInJSON: true, + mapAsMap: false, + maxAliasCount: 100, + prettyErrors: false, + // TODO Set true in v2 + simpleKeys: false, + version: "1.2" + }; + var scalarOptions = { + get binary() { + return resolveSeq.binaryOptions; + }, + set binary(opt) { + Object.assign(resolveSeq.binaryOptions, opt); + }, + get bool() { + return resolveSeq.boolOptions; + }, + set bool(opt) { + Object.assign(resolveSeq.boolOptions, opt); + }, + get int() { + return resolveSeq.intOptions; + }, + set int(opt) { + Object.assign(resolveSeq.intOptions, opt); + }, + get null() { + return resolveSeq.nullOptions; + }, + set null(opt) { + Object.assign(resolveSeq.nullOptions, opt); + }, + get str() { + return resolveSeq.strOptions; + }, + set str(opt) { + Object.assign(resolveSeq.strOptions, opt); + } + }; + var documentOptions = { + "1.0": { + schema: "yaml-1.1", + merge: true, + tagPrefixes: [{ + handle: "!", + prefix: PlainValue.defaultTagPrefix + }, { + handle: "!!", + prefix: "tag:private.yaml.org,2002:" + }] + }, + 1.1: { + schema: "yaml-1.1", + merge: true, + tagPrefixes: [{ + handle: "!", + prefix: "!" + }, { + handle: "!!", + prefix: PlainValue.defaultTagPrefix + }] + }, + 1.2: { + schema: "core", + merge: false, + tagPrefixes: [{ + handle: "!", + prefix: "!" + }, { + handle: "!!", + prefix: PlainValue.defaultTagPrefix + }] + } + }; + function stringifyTag(doc, tag) { + if ((doc.version || doc.options.version) === "1.0") { + const priv = tag.match(/^tag:private\.yaml\.org,2002:([^:/]+)$/); + if (priv) return "!" + priv[1]; + const vocab = tag.match(/^tag:([a-zA-Z0-9-]+)\.yaml\.org,2002:(.*)/); + return vocab ? `!${vocab[1]}/${vocab[2]}` : `!${tag.replace(/^tag:/, "")}`; + } + let p = doc.tagPrefixes.find((p2) => tag.indexOf(p2.prefix) === 0); + if (!p) { + const dtp = doc.getDefaults().tagPrefixes; + p = dtp && dtp.find((p2) => tag.indexOf(p2.prefix) === 0); + } + if (!p) return tag[0] === "!" ? tag : `!<${tag}>`; + const suffix = tag.substr(p.prefix.length).replace(/[!,[\]{}]/g, (ch) => ({ + "!": "%21", + ",": "%2C", + "[": "%5B", + "]": "%5D", + "{": "%7B", + "}": "%7D" + })[ch]); + return p.handle + suffix; + } + function getTagObject(tags, item) { + if (item instanceof resolveSeq.Alias) return resolveSeq.Alias; + if (item.tag) { + const match = tags.filter((t) => t.tag === item.tag); + if (match.length > 0) return match.find((t) => t.format === item.format) || match[0]; + } + let tagObj, obj; + if (item instanceof resolveSeq.Scalar) { + obj = item.value; + const match = tags.filter((t) => t.identify && t.identify(obj) || t.class && obj instanceof t.class); + tagObj = match.find((t) => t.format === item.format) || match.find((t) => !t.format); + } else { + obj = item; + tagObj = tags.find((t) => t.nodeClass && obj instanceof t.nodeClass); + } + if (!tagObj) { + const name = obj && obj.constructor ? obj.constructor.name : typeof obj; + throw new Error(`Tag not resolved for ${name} value`); + } + return tagObj; + } + function stringifyProps(node, tagObj, { + anchors, + doc + }) { + const props = []; + const anchor = doc.anchors.getName(node); + if (anchor) { + anchors[anchor] = node; + props.push(`&${anchor}`); + } + if (node.tag) { + props.push(stringifyTag(doc, node.tag)); + } else if (!tagObj.default) { + props.push(stringifyTag(doc, tagObj.tag)); + } + return props.join(" "); + } + function stringify2(item, ctx, onComment, onChompKeep) { + const { + anchors, + schema: schema2 + } = ctx.doc; + let tagObj; + if (!(item instanceof resolveSeq.Node)) { + const createCtx = { + aliasNodes: [], + onTagObj: (o) => tagObj = o, + prevObjects: /* @__PURE__ */ new Map() + }; + item = schema2.createNode(item, true, null, createCtx); + for (const alias of createCtx.aliasNodes) { + alias.source = alias.source.node; + let name = anchors.getName(alias.source); + if (!name) { + name = anchors.newName(); + anchors.map[name] = alias.source; + } + } + } + if (item instanceof resolveSeq.Pair) return item.toString(ctx, onComment, onChompKeep); + if (!tagObj) tagObj = getTagObject(schema2.tags, item); + const props = stringifyProps(item, tagObj, ctx); + if (props.length > 0) ctx.indentAtStart = (ctx.indentAtStart || 0) + props.length + 1; + const str = typeof tagObj.stringify === "function" ? tagObj.stringify(item, ctx, onComment, onChompKeep) : item instanceof resolveSeq.Scalar ? resolveSeq.stringifyString(item, ctx, onComment, onChompKeep) : item.toString(ctx, onComment, onChompKeep); + if (!props) return str; + return item instanceof resolveSeq.Scalar || str[0] === "{" || str[0] === "[" ? `${props} ${str}` : `${props} +${ctx.indent}${str}`; + } + var Anchors = class _Anchors { + static validAnchorNode(node) { + return node instanceof resolveSeq.Scalar || node instanceof resolveSeq.YAMLSeq || node instanceof resolveSeq.YAMLMap; + } + constructor(prefix) { + PlainValue._defineProperty(this, "map", /* @__PURE__ */ Object.create(null)); + this.prefix = prefix; + } + createAlias(node, name) { + this.setAnchor(node, name); + return new resolveSeq.Alias(node); + } + createMergePair(...sources) { + const merge = new resolveSeq.Merge(); + merge.value.items = sources.map((s) => { + if (s instanceof resolveSeq.Alias) { + if (s.source instanceof resolveSeq.YAMLMap) return s; + } else if (s instanceof resolveSeq.YAMLMap) { + return this.createAlias(s); + } + throw new Error("Merge sources must be Map nodes or their Aliases"); + }); + return merge; + } + getName(node) { + const { + map + } = this; + return Object.keys(map).find((a) => map[a] === node); + } + getNames() { + return Object.keys(this.map); + } + getNode(name) { + return this.map[name]; + } + newName(prefix) { + if (!prefix) prefix = this.prefix; + const names = Object.keys(this.map); + for (let i = 1; true; ++i) { + const name = `${prefix}${i}`; + if (!names.includes(name)) return name; + } + } + // During parsing, map & aliases contain CST nodes + resolveNodes() { + const { + map, + _cstAliases + } = this; + Object.keys(map).forEach((a) => { + map[a] = map[a].resolved; + }); + _cstAliases.forEach((a) => { + a.source = a.source.resolved; + }); + delete this._cstAliases; + } + setAnchor(node, name) { + if (node != null && !_Anchors.validAnchorNode(node)) { + throw new Error("Anchors may only be set for Scalar, Seq and Map nodes"); + } + if (name && /[\x00-\x19\s,[\]{}]/.test(name)) { + throw new Error("Anchor names must not contain whitespace or control characters"); + } + const { + map + } = this; + const prev = node && Object.keys(map).find((a) => map[a] === node); + if (prev) { + if (!name) { + return prev; + } else if (prev !== name) { + delete map[prev]; + map[name] = node; + } + } else { + if (!name) { + if (!node) return null; + name = this.newName(); + } + map[name] = node; + } + return name; + } + }; + var visit = (node, tags) => { + if (node && typeof node === "object") { + const { + tag + } = node; + if (node instanceof resolveSeq.Collection) { + if (tag) tags[tag] = true; + node.items.forEach((n) => visit(n, tags)); + } else if (node instanceof resolveSeq.Pair) { + visit(node.key, tags); + visit(node.value, tags); + } else if (node instanceof resolveSeq.Scalar) { + if (tag) tags[tag] = true; + } + } + return tags; + }; + var listTagNames = (node) => Object.keys(visit(node, {})); + function parseContents(doc, contents) { + const comments = { + before: [], + after: [] + }; + let body = void 0; + let spaceBefore = false; + for (const node of contents) { + if (node.valueRange) { + if (body !== void 0) { + const msg = "Document contains trailing content not separated by a ... or --- line"; + doc.errors.push(new PlainValue.YAMLSyntaxError(node, msg)); + break; + } + const res = resolveSeq.resolveNode(doc, node); + if (spaceBefore) { + res.spaceBefore = true; + spaceBefore = false; + } + body = res; + } else if (node.comment !== null) { + const cc = body === void 0 ? comments.before : comments.after; + cc.push(node.comment); + } else if (node.type === PlainValue.Type.BLANK_LINE) { + spaceBefore = true; + if (body === void 0 && comments.before.length > 0 && !doc.commentBefore) { + doc.commentBefore = comments.before.join("\n"); + comments.before = []; + } + } + } + doc.contents = body || null; + if (!body) { + doc.comment = comments.before.concat(comments.after).join("\n") || null; + } else { + const cb = comments.before.join("\n"); + if (cb) { + const cbNode = body instanceof resolveSeq.Collection && body.items[0] ? body.items[0] : body; + cbNode.commentBefore = cbNode.commentBefore ? `${cb} +${cbNode.commentBefore}` : cb; + } + doc.comment = comments.after.join("\n") || null; + } + } + function resolveTagDirective({ + tagPrefixes + }, directive) { + const [handle, prefix] = directive.parameters; + if (!handle || !prefix) { + const msg = "Insufficient parameters given for %TAG directive"; + throw new PlainValue.YAMLSemanticError(directive, msg); + } + if (tagPrefixes.some((p) => p.handle === handle)) { + const msg = "The %TAG directive must only be given at most once per handle in the same document."; + throw new PlainValue.YAMLSemanticError(directive, msg); + } + return { + handle, + prefix + }; + } + function resolveYamlDirective(doc, directive) { + let [version2] = directive.parameters; + if (directive.name === "YAML:1.0") version2 = "1.0"; + if (!version2) { + const msg = "Insufficient parameters given for %YAML directive"; + throw new PlainValue.YAMLSemanticError(directive, msg); + } + if (!documentOptions[version2]) { + const v0 = doc.version || doc.options.version; + const msg = `Document will be parsed as YAML ${v0} rather than YAML ${version2}`; + doc.warnings.push(new PlainValue.YAMLWarning(directive, msg)); + } + return version2; + } + function parseDirectives(doc, directives, prevDoc) { + const directiveComments = []; + let hasDirectives = false; + for (const directive of directives) { + const { + comment, + name + } = directive; + switch (name) { + case "TAG": + try { + doc.tagPrefixes.push(resolveTagDirective(doc, directive)); + } catch (error) { + doc.errors.push(error); + } + hasDirectives = true; + break; + case "YAML": + case "YAML:1.0": + if (doc.version) { + const msg = "The %YAML directive must only be given at most once per document."; + doc.errors.push(new PlainValue.YAMLSemanticError(directive, msg)); + } + try { + doc.version = resolveYamlDirective(doc, directive); + } catch (error) { + doc.errors.push(error); + } + hasDirectives = true; + break; + default: + if (name) { + const msg = `YAML only supports %TAG and %YAML directives, and not %${name}`; + doc.warnings.push(new PlainValue.YAMLWarning(directive, msg)); + } + } + if (comment) directiveComments.push(comment); + } + if (prevDoc && !hasDirectives && "1.1" === (doc.version || prevDoc.version || doc.options.version)) { + const copyTagPrefix = ({ + handle, + prefix + }) => ({ + handle, + prefix + }); + doc.tagPrefixes = prevDoc.tagPrefixes.map(copyTagPrefix); + doc.version = prevDoc.version; + } + doc.commentBefore = directiveComments.join("\n") || null; + } + function assertCollection(contents) { + if (contents instanceof resolveSeq.Collection) return true; + throw new Error("Expected a YAML collection as document contents"); + } + var Document = class _Document { + constructor(options) { + this.anchors = new Anchors(options.anchorPrefix); + this.commentBefore = null; + this.comment = null; + this.contents = null; + this.directivesEndMarker = null; + this.errors = []; + this.options = options; + this.schema = null; + this.tagPrefixes = []; + this.version = null; + this.warnings = []; + } + add(value) { + assertCollection(this.contents); + return this.contents.add(value); + } + addIn(path, value) { + assertCollection(this.contents); + this.contents.addIn(path, value); + } + delete(key) { + assertCollection(this.contents); + return this.contents.delete(key); + } + deleteIn(path) { + if (resolveSeq.isEmptyPath(path)) { + if (this.contents == null) return false; + this.contents = null; + return true; + } + assertCollection(this.contents); + return this.contents.deleteIn(path); + } + getDefaults() { + return _Document.defaults[this.version] || _Document.defaults[this.options.version] || {}; + } + get(key, keepScalar) { + return this.contents instanceof resolveSeq.Collection ? this.contents.get(key, keepScalar) : void 0; + } + getIn(path, keepScalar) { + if (resolveSeq.isEmptyPath(path)) return !keepScalar && this.contents instanceof resolveSeq.Scalar ? this.contents.value : this.contents; + return this.contents instanceof resolveSeq.Collection ? this.contents.getIn(path, keepScalar) : void 0; + } + has(key) { + return this.contents instanceof resolveSeq.Collection ? this.contents.has(key) : false; + } + hasIn(path) { + if (resolveSeq.isEmptyPath(path)) return this.contents !== void 0; + return this.contents instanceof resolveSeq.Collection ? this.contents.hasIn(path) : false; + } + set(key, value) { + assertCollection(this.contents); + this.contents.set(key, value); + } + setIn(path, value) { + if (resolveSeq.isEmptyPath(path)) this.contents = value; + else { + assertCollection(this.contents); + this.contents.setIn(path, value); + } + } + setSchema(id, customTags) { + if (!id && !customTags && this.schema) return; + if (typeof id === "number") id = id.toFixed(1); + if (id === "1.0" || id === "1.1" || id === "1.2") { + if (this.version) this.version = id; + else this.options.version = id; + delete this.options.schema; + } else if (id && typeof id === "string") { + this.options.schema = id; + } + if (Array.isArray(customTags)) this.options.customTags = customTags; + const opt = Object.assign({}, this.getDefaults(), this.options); + this.schema = new Schema.Schema(opt); + } + parse(node, prevDoc) { + if (this.options.keepCstNodes) this.cstNode = node; + if (this.options.keepNodeTypes) this.type = "DOCUMENT"; + const { + directives = [], + contents = [], + directivesEndMarker, + error, + valueRange + } = node; + if (error) { + if (!error.source) error.source = this; + this.errors.push(error); + } + parseDirectives(this, directives, prevDoc); + if (directivesEndMarker) this.directivesEndMarker = true; + this.range = valueRange ? [valueRange.start, valueRange.end] : null; + this.setSchema(); + this.anchors._cstAliases = []; + parseContents(this, contents); + this.anchors.resolveNodes(); + if (this.options.prettyErrors) { + for (const error2 of this.errors) if (error2 instanceof PlainValue.YAMLError) error2.makePretty(); + for (const warn of this.warnings) if (warn instanceof PlainValue.YAMLError) warn.makePretty(); + } + return this; + } + listNonDefaultTags() { + return listTagNames(this.contents).filter((t) => t.indexOf(Schema.Schema.defaultPrefix) !== 0); + } + setTagPrefix(handle, prefix) { + if (handle[0] !== "!" || handle[handle.length - 1] !== "!") throw new Error("Handle must start and end with !"); + if (prefix) { + const prev = this.tagPrefixes.find((p) => p.handle === handle); + if (prev) prev.prefix = prefix; + else this.tagPrefixes.push({ + handle, + prefix + }); + } else { + this.tagPrefixes = this.tagPrefixes.filter((p) => p.handle !== handle); + } + } + toJSON(arg, onAnchor) { + const { + keepBlobsInJSON, + mapAsMap, + maxAliasCount + } = this.options; + const keep = keepBlobsInJSON && (typeof arg !== "string" || !(this.contents instanceof resolveSeq.Scalar)); + const ctx = { + doc: this, + indentStep: " ", + keep, + mapAsMap: keep && !!mapAsMap, + maxAliasCount, + stringify: stringify2 + // Requiring directly in Pair would create circular dependencies + }; + const anchorNames = Object.keys(this.anchors.map); + if (anchorNames.length > 0) ctx.anchors = new Map(anchorNames.map((name) => [this.anchors.map[name], { + alias: [], + aliasCount: 0, + count: 1 + }])); + const res = resolveSeq.toJSON(this.contents, arg, ctx); + if (typeof onAnchor === "function" && ctx.anchors) for (const { + count, + res: res2 + } of ctx.anchors.values()) onAnchor(res2, count); + return res; + } + toString() { + if (this.errors.length > 0) throw new Error("Document with errors cannot be stringified"); + const indentSize = this.options.indent; + if (!Number.isInteger(indentSize) || indentSize <= 0) { + const s = JSON.stringify(indentSize); + throw new Error(`"indent" option must be a positive integer, not ${s}`); + } + this.setSchema(); + const lines = []; + let hasDirectives = false; + if (this.version) { + let vd = "%YAML 1.2"; + if (this.schema.name === "yaml-1.1") { + if (this.version === "1.0") vd = "%YAML:1.0"; + else if (this.version === "1.1") vd = "%YAML 1.1"; + } + lines.push(vd); + hasDirectives = true; + } + const tagNames = this.listNonDefaultTags(); + this.tagPrefixes.forEach(({ + handle, + prefix + }) => { + if (tagNames.some((t) => t.indexOf(prefix) === 0)) { + lines.push(`%TAG ${handle} ${prefix}`); + hasDirectives = true; + } + }); + if (hasDirectives || this.directivesEndMarker) lines.push("---"); + if (this.commentBefore) { + if (hasDirectives || !this.directivesEndMarker) lines.unshift(""); + lines.unshift(this.commentBefore.replace(/^/gm, "#")); + } + const ctx = { + anchors: /* @__PURE__ */ Object.create(null), + doc: this, + indent: "", + indentStep: " ".repeat(indentSize), + stringify: stringify2 + // Requiring directly in nodes would create circular dependencies + }; + let chompKeep = false; + let contentComment = null; + if (this.contents) { + if (this.contents instanceof resolveSeq.Node) { + if (this.contents.spaceBefore && (hasDirectives || this.directivesEndMarker)) lines.push(""); + if (this.contents.commentBefore) lines.push(this.contents.commentBefore.replace(/^/gm, "#")); + ctx.forceBlockIndent = !!this.comment; + contentComment = this.contents.comment; + } + const onChompKeep = contentComment ? null : () => chompKeep = true; + const body = stringify2(this.contents, ctx, () => contentComment = null, onChompKeep); + lines.push(resolveSeq.addComment(body, "", contentComment)); + } else if (this.contents !== void 0) { + lines.push(stringify2(this.contents, ctx)); + } + if (this.comment) { + if ((!chompKeep || contentComment) && lines[lines.length - 1] !== "") lines.push(""); + lines.push(this.comment.replace(/^/gm, "#")); + } + return lines.join("\n") + "\n"; + } + }; + PlainValue._defineProperty(Document, "defaults", documentOptions); + exports2.Document = Document; + exports2.defaultOptions = defaultOptions; + exports2.scalarOptions = scalarOptions; + } +}); + +// ../../node_modules/swagger2openapi/node_modules/yaml/dist/index.js +var require_dist3 = __commonJS({ + "../../node_modules/swagger2openapi/node_modules/yaml/dist/index.js"(exports2) { + "use strict"; + var parseCst = require_parse_cst3(); + var Document$1 = require_Document_9b4560a13(); + var Schema = require_Schema_88e323a73(); + var PlainValue = require_PlainValue_ec8e588e3(); + var warnings = require_warnings_1000a3723(); + require_resolveSeq_d03cb0373(); + function createNode(value, wrapScalars = true, tag) { + if (tag === void 0 && typeof wrapScalars === "string") { + tag = wrapScalars; + wrapScalars = true; + } + const options = Object.assign({}, Document$1.Document.defaults[Document$1.defaultOptions.version], Document$1.defaultOptions); + const schema2 = new Schema.Schema(options); + return schema2.createNode(value, wrapScalars, tag); + } + var Document = class extends Document$1.Document { + constructor(options) { + super(Object.assign({}, Document$1.defaultOptions, options)); + } + }; + function parseAllDocuments(src, options) { + const stream = []; + let prev; + for (const cstDoc of parseCst.parse(src)) { + const doc = new Document(options); + doc.parse(cstDoc, prev); + stream.push(doc); + prev = doc; + } + return stream; + } + function parseDocument(src, options) { + const cst = parseCst.parse(src); + const doc = new Document(options).parse(cst[0]); + if (cst.length > 1) { + const errMsg = "Source contains multiple documents; please use YAML.parseAllDocuments()"; + doc.errors.unshift(new PlainValue.YAMLSemanticError(cst[1], errMsg)); + } + return doc; + } + function parse2(src, options) { + const doc = parseDocument(src, options); + doc.warnings.forEach((warning) => warnings.warn(warning)); + if (doc.errors.length > 0) throw doc.errors[0]; + return doc.toJSON(); + } + function stringify2(value, options) { + const doc = new Document(options); + doc.contents = value; + return String(doc); + } + var YAML = { + createNode, + defaultOptions: Document$1.defaultOptions, + Document, + parse: parse2, + parseAllDocuments, + parseCST: parseCst.parse, + parseDocument, + scalarOptions: Document$1.scalarOptions, + stringify: stringify2 + }; + exports2.YAML = YAML; + } +}); + +// ../../node_modules/swagger2openapi/node_modules/yaml/index.js +var require_yaml3 = __commonJS({ + "../../node_modules/swagger2openapi/node_modules/yaml/index.js"(exports2, module2) { + module2.exports = require_dist3().YAML; + } +}); + +// ../../node_modules/oas-resolver/node_modules/yaml/dist/PlainValue-ec8e588e.js +var require_PlainValue_ec8e588e4 = __commonJS({ + "../../node_modules/oas-resolver/node_modules/yaml/dist/PlainValue-ec8e588e.js"(exports2) { + "use strict"; + var Char = { + ANCHOR: "&", + COMMENT: "#", + TAG: "!", + DIRECTIVES_END: "-", + DOCUMENT_END: "." + }; + var Type = { + ALIAS: "ALIAS", + BLANK_LINE: "BLANK_LINE", + BLOCK_FOLDED: "BLOCK_FOLDED", + BLOCK_LITERAL: "BLOCK_LITERAL", + COMMENT: "COMMENT", + DIRECTIVE: "DIRECTIVE", + DOCUMENT: "DOCUMENT", + FLOW_MAP: "FLOW_MAP", + FLOW_SEQ: "FLOW_SEQ", + MAP: "MAP", + MAP_KEY: "MAP_KEY", + MAP_VALUE: "MAP_VALUE", + PLAIN: "PLAIN", + QUOTE_DOUBLE: "QUOTE_DOUBLE", + QUOTE_SINGLE: "QUOTE_SINGLE", + SEQ: "SEQ", + SEQ_ITEM: "SEQ_ITEM" + }; + var defaultTagPrefix = "tag:yaml.org,2002:"; + var defaultTags = { + MAP: "tag:yaml.org,2002:map", + SEQ: "tag:yaml.org,2002:seq", + STR: "tag:yaml.org,2002:str" + }; + function findLineStarts(src) { + const ls = [0]; + let offset = src.indexOf("\n"); + while (offset !== -1) { + offset += 1; + ls.push(offset); + offset = src.indexOf("\n", offset); + } + return ls; + } + function getSrcInfo(cst) { + let lineStarts, src; + if (typeof cst === "string") { + lineStarts = findLineStarts(cst); + src = cst; + } else { + if (Array.isArray(cst)) cst = cst[0]; + if (cst && cst.context) { + if (!cst.lineStarts) cst.lineStarts = findLineStarts(cst.context.src); + lineStarts = cst.lineStarts; + src = cst.context.src; + } + } + return { + lineStarts, + src + }; + } + function getLinePos(offset, cst) { + if (typeof offset !== "number" || offset < 0) return null; + const { + lineStarts, + src + } = getSrcInfo(cst); + if (!lineStarts || !src || offset > src.length) return null; + for (let i = 0; i < lineStarts.length; ++i) { + const start = lineStarts[i]; + if (offset < start) { + return { + line: i, + col: offset - lineStarts[i - 1] + 1 + }; + } + if (offset === start) return { + line: i + 1, + col: 1 + }; + } + const line = lineStarts.length; + return { + line, + col: offset - lineStarts[line - 1] + 1 + }; + } + function getLine(line, cst) { + const { + lineStarts, + src + } = getSrcInfo(cst); + if (!lineStarts || !(line >= 1) || line > lineStarts.length) return null; + const start = lineStarts[line - 1]; + let end = lineStarts[line]; + while (end && end > start && src[end - 1] === "\n") --end; + return src.slice(start, end); + } + function getPrettyContext({ + start, + end + }, cst, maxWidth = 80) { + let src = getLine(start.line, cst); + if (!src) return null; + let { + col + } = start; + if (src.length > maxWidth) { + if (col <= maxWidth - 10) { + src = src.substr(0, maxWidth - 1) + "\u2026"; + } else { + const halfWidth = Math.round(maxWidth / 2); + if (src.length > col + halfWidth) src = src.substr(0, col + halfWidth - 1) + "\u2026"; + col -= src.length - maxWidth; + src = "\u2026" + src.substr(1 - maxWidth); + } + } + let errLen = 1; + let errEnd = ""; + if (end) { + if (end.line === start.line && col + (end.col - start.col) <= maxWidth + 1) { + errLen = end.col - start.col; + } else { + errLen = Math.min(src.length + 1, maxWidth) - col; + errEnd = "\u2026"; + } + } + const offset = col > 1 ? " ".repeat(col - 1) : ""; + const err = "^".repeat(errLen); + return `${src} +${offset}${err}${errEnd}`; + } + var Range = class _Range { + static copy(orig) { + return new _Range(orig.start, orig.end); + } + constructor(start, end) { + this.start = start; + this.end = end || start; + } + isEmpty() { + return typeof this.start !== "number" || !this.end || this.end <= this.start; + } + /** + * Set `origStart` and `origEnd` to point to the original source range for + * this node, which may differ due to dropped CR characters. + * + * @param {number[]} cr - Positions of dropped CR characters + * @param {number} offset - Starting index of `cr` from the last call + * @returns {number} - The next offset, matching the one found for `origStart` + */ + setOrigRange(cr, offset) { + const { + start, + end + } = this; + if (cr.length === 0 || end <= cr[0]) { + this.origStart = start; + this.origEnd = end; + return offset; + } + let i = offset; + while (i < cr.length) { + if (cr[i] > start) break; + else ++i; + } + this.origStart = start + i; + const nextOffset = i; + while (i < cr.length) { + if (cr[i] >= end) break; + else ++i; + } + this.origEnd = end + i; + return nextOffset; + } + }; + var Node = class _Node { + static addStringTerminator(src, offset, str) { + if (str[str.length - 1] === "\n") return str; + const next = _Node.endOfWhiteSpace(src, offset); + return next >= src.length || src[next] === "\n" ? str + "\n" : str; + } + // ^(---|...) + static atDocumentBoundary(src, offset, sep) { + const ch0 = src[offset]; + if (!ch0) return true; + const prev = src[offset - 1]; + if (prev && prev !== "\n") return false; + if (sep) { + if (ch0 !== sep) return false; + } else { + if (ch0 !== Char.DIRECTIVES_END && ch0 !== Char.DOCUMENT_END) return false; + } + const ch1 = src[offset + 1]; + const ch2 = src[offset + 2]; + if (ch1 !== ch0 || ch2 !== ch0) return false; + const ch3 = src[offset + 3]; + return !ch3 || ch3 === "\n" || ch3 === " " || ch3 === " "; + } + static endOfIdentifier(src, offset) { + let ch = src[offset]; + const isVerbatim = ch === "<"; + const notOk = isVerbatim ? ["\n", " ", " ", ">"] : ["\n", " ", " ", "[", "]", "{", "}", ","]; + while (ch && notOk.indexOf(ch) === -1) ch = src[offset += 1]; + if (isVerbatim && ch === ">") offset += 1; + return offset; + } + static endOfIndent(src, offset) { + let ch = src[offset]; + while (ch === " ") ch = src[offset += 1]; + return offset; + } + static endOfLine(src, offset) { + let ch = src[offset]; + while (ch && ch !== "\n") ch = src[offset += 1]; + return offset; + } + static endOfWhiteSpace(src, offset) { + let ch = src[offset]; + while (ch === " " || ch === " ") ch = src[offset += 1]; + return offset; + } + static startOfLine(src, offset) { + let ch = src[offset - 1]; + if (ch === "\n") return offset; + while (ch && ch !== "\n") ch = src[offset -= 1]; + return offset + 1; + } + /** + * End of indentation, or null if the line's indent level is not more + * than `indent` + * + * @param {string} src + * @param {number} indent + * @param {number} lineStart + * @returns {?number} + */ + static endOfBlockIndent(src, indent, lineStart) { + const inEnd = _Node.endOfIndent(src, lineStart); + if (inEnd > lineStart + indent) { + return inEnd; + } else { + const wsEnd = _Node.endOfWhiteSpace(src, inEnd); + const ch = src[wsEnd]; + if (!ch || ch === "\n") return wsEnd; + } + return null; + } + static atBlank(src, offset, endAsBlank) { + const ch = src[offset]; + return ch === "\n" || ch === " " || ch === " " || endAsBlank && !ch; + } + static nextNodeIsIndented(ch, indentDiff, indicatorAsIndent) { + if (!ch || indentDiff < 0) return false; + if (indentDiff > 0) return true; + return indicatorAsIndent && ch === "-"; + } + // should be at line or string end, or at next non-whitespace char + static normalizeOffset(src, offset) { + const ch = src[offset]; + return !ch ? offset : ch !== "\n" && src[offset - 1] === "\n" ? offset - 1 : _Node.endOfWhiteSpace(src, offset); + } + // fold single newline into space, multiple newlines to N - 1 newlines + // presumes src[offset] === '\n' + static foldNewline(src, offset, indent) { + let inCount = 0; + let error = false; + let fold = ""; + let ch = src[offset + 1]; + while (ch === " " || ch === " " || ch === "\n") { + switch (ch) { + case "\n": + inCount = 0; + offset += 1; + fold += "\n"; + break; + case " ": + if (inCount <= indent) error = true; + offset = _Node.endOfWhiteSpace(src, offset + 2) - 1; + break; + case " ": + inCount += 1; + offset += 1; + break; + } + ch = src[offset + 1]; + } + if (!fold) fold = " "; + if (ch && inCount <= indent) error = true; + return { + fold, + offset, + error + }; + } + constructor(type, props, context) { + Object.defineProperty(this, "context", { + value: context || null, + writable: true + }); + this.error = null; + this.range = null; + this.valueRange = null; + this.props = props || []; + this.type = type; + this.value = null; + } + getPropValue(idx, key, skipKey) { + if (!this.context) return null; + const { + src + } = this.context; + const prop = this.props[idx]; + return prop && src[prop.start] === key ? src.slice(prop.start + (skipKey ? 1 : 0), prop.end) : null; + } + get anchor() { + for (let i = 0; i < this.props.length; ++i) { + const anchor = this.getPropValue(i, Char.ANCHOR, true); + if (anchor != null) return anchor; + } + return null; + } + get comment() { + const comments = []; + for (let i = 0; i < this.props.length; ++i) { + const comment = this.getPropValue(i, Char.COMMENT, true); + if (comment != null) comments.push(comment); + } + return comments.length > 0 ? comments.join("\n") : null; + } + commentHasRequiredWhitespace(start) { + const { + src + } = this.context; + if (this.header && start === this.header.end) return false; + if (!this.valueRange) return false; + const { + end + } = this.valueRange; + return start !== end || _Node.atBlank(src, end - 1); + } + get hasComment() { + if (this.context) { + const { + src + } = this.context; + for (let i = 0; i < this.props.length; ++i) { + if (src[this.props[i].start] === Char.COMMENT) return true; + } + } + return false; + } + get hasProps() { + if (this.context) { + const { + src + } = this.context; + for (let i = 0; i < this.props.length; ++i) { + if (src[this.props[i].start] !== Char.COMMENT) return true; + } + } + return false; + } + get includesTrailingLines() { + return false; + } + get jsonLike() { + const jsonLikeTypes = [Type.FLOW_MAP, Type.FLOW_SEQ, Type.QUOTE_DOUBLE, Type.QUOTE_SINGLE]; + return jsonLikeTypes.indexOf(this.type) !== -1; + } + get rangeAsLinePos() { + if (!this.range || !this.context) return void 0; + const start = getLinePos(this.range.start, this.context.root); + if (!start) return void 0; + const end = getLinePos(this.range.end, this.context.root); + return { + start, + end + }; + } + get rawValue() { + if (!this.valueRange || !this.context) return null; + const { + start, + end + } = this.valueRange; + return this.context.src.slice(start, end); + } + get tag() { + for (let i = 0; i < this.props.length; ++i) { + const tag = this.getPropValue(i, Char.TAG, false); + if (tag != null) { + if (tag[1] === "<") { + return { + verbatim: tag.slice(2, -1) + }; + } else { + const [_2, handle, suffix] = tag.match(/^(.*!)([^!]*)$/); + return { + handle, + suffix + }; + } + } + } + return null; + } + get valueRangeContainsNewline() { + if (!this.valueRange || !this.context) return false; + const { + start, + end + } = this.valueRange; + const { + src + } = this.context; + for (let i = start; i < end; ++i) { + if (src[i] === "\n") return true; + } + return false; + } + parseComment(start) { + const { + src + } = this.context; + if (src[start] === Char.COMMENT) { + const end = _Node.endOfLine(src, start + 1); + const commentRange = new Range(start, end); + this.props.push(commentRange); + return end; + } + return start; + } + /** + * Populates the `origStart` and `origEnd` values of all ranges for this + * node. Extended by child classes to handle descendant nodes. + * + * @param {number[]} cr - Positions of dropped CR characters + * @param {number} offset - Starting index of `cr` from the last call + * @returns {number} - The next offset, matching the one found for `origStart` + */ + setOrigRanges(cr, offset) { + if (this.range) offset = this.range.setOrigRange(cr, offset); + if (this.valueRange) this.valueRange.setOrigRange(cr, offset); + this.props.forEach((prop) => prop.setOrigRange(cr, offset)); + return offset; + } + toString() { + const { + context: { + src + }, + range, + value + } = this; + if (value != null) return value; + const str = src.slice(range.start, range.end); + return _Node.addStringTerminator(src, range.end, str); + } + }; + var YAMLError = class extends Error { + constructor(name, source, message) { + if (!message || !(source instanceof Node)) throw new Error(`Invalid arguments for new ${name}`); + super(); + this.name = name; + this.message = message; + this.source = source; + } + makePretty() { + if (!this.source) return; + this.nodeType = this.source.type; + const cst = this.source.context && this.source.context.root; + if (typeof this.offset === "number") { + this.range = new Range(this.offset, this.offset + 1); + const start = cst && getLinePos(this.offset, cst); + if (start) { + const end = { + line: start.line, + col: start.col + 1 + }; + this.linePos = { + start, + end + }; + } + delete this.offset; + } else { + this.range = this.source.range; + this.linePos = this.source.rangeAsLinePos; + } + if (this.linePos) { + const { + line, + col + } = this.linePos.start; + this.message += ` at line ${line}, column ${col}`; + const ctx = cst && getPrettyContext(this.linePos, cst); + if (ctx) this.message += `: + +${ctx} +`; + } + delete this.source; + } + }; + var YAMLReferenceError = class extends YAMLError { + constructor(source, message) { + super("YAMLReferenceError", source, message); + } + }; + var YAMLSemanticError = class extends YAMLError { + constructor(source, message) { + super("YAMLSemanticError", source, message); + } + }; + var YAMLSyntaxError = class extends YAMLError { + constructor(source, message) { + super("YAMLSyntaxError", source, message); + } + }; + var YAMLWarning = class extends YAMLError { + constructor(source, message) { + super("YAMLWarning", source, message); + } + }; + function _defineProperty(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { + value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + return obj; + } + var PlainValue = class _PlainValue extends Node { + static endOfLine(src, start, inFlow) { + let ch = src[start]; + let offset = start; + while (ch && ch !== "\n") { + if (inFlow && (ch === "[" || ch === "]" || ch === "{" || ch === "}" || ch === ",")) break; + const next = src[offset + 1]; + if (ch === ":" && (!next || next === "\n" || next === " " || next === " " || inFlow && next === ",")) break; + if ((ch === " " || ch === " ") && next === "#") break; + offset += 1; + ch = next; + } + return offset; + } + get strValue() { + if (!this.valueRange || !this.context) return null; + let { + start, + end + } = this.valueRange; + const { + src + } = this.context; + let ch = src[end - 1]; + while (start < end && (ch === "\n" || ch === " " || ch === " ")) ch = src[--end - 1]; + let str = ""; + for (let i = start; i < end; ++i) { + const ch2 = src[i]; + if (ch2 === "\n") { + const { + fold, + offset + } = Node.foldNewline(src, i, -1); + str += fold; + i = offset; + } else if (ch2 === " " || ch2 === " ") { + const wsStart = i; + let next = src[i + 1]; + while (i < end && (next === " " || next === " ")) { + i += 1; + next = src[i + 1]; + } + if (next !== "\n") str += i > wsStart ? src.slice(wsStart, i + 1) : ch2; + } else { + str += ch2; + } + } + const ch0 = src[start]; + switch (ch0) { + case " ": { + const msg = "Plain value cannot start with a tab character"; + const errors = [new YAMLSemanticError(this, msg)]; + return { + errors, + str + }; + } + case "@": + case "`": { + const msg = `Plain value cannot start with reserved character ${ch0}`; + const errors = [new YAMLSemanticError(this, msg)]; + return { + errors, + str + }; + } + default: + return str; + } + } + parseBlockValue(start) { + const { + indent, + inFlow, + src + } = this.context; + let offset = start; + let valueEnd = start; + for (let ch = src[offset]; ch === "\n"; ch = src[offset]) { + if (Node.atDocumentBoundary(src, offset + 1)) break; + const end = Node.endOfBlockIndent(src, indent, offset + 1); + if (end === null || src[end] === "#") break; + if (src[end] === "\n") { + offset = end; + } else { + valueEnd = _PlainValue.endOfLine(src, end, inFlow); + offset = valueEnd; + } + } + if (this.valueRange.isEmpty()) this.valueRange.start = start; + this.valueRange.end = valueEnd; + return valueEnd; + } + /** + * Parses a plain value from the source + * + * Accepted forms are: + * ``` + * #comment + * + * first line + * + * first line #comment + * + * first line + * block + * lines + * + * #comment + * block + * lines + * ``` + * where block lines are empty or have an indent level greater than `indent`. + * + * @param {ParseContext} context + * @param {number} start - Index of first character + * @returns {number} - Index of the character after this scalar, may be `\n` + */ + parse(context, start) { + this.context = context; + const { + inFlow, + src + } = context; + let offset = start; + const ch = src[offset]; + if (ch && ch !== "#" && ch !== "\n") { + offset = _PlainValue.endOfLine(src, start, inFlow); + } + this.valueRange = new Range(start, offset); + offset = Node.endOfWhiteSpace(src, offset); + offset = this.parseComment(offset); + if (!this.hasComment || this.valueRange.isEmpty()) { + offset = this.parseBlockValue(offset); + } + return offset; + } + }; + exports2.Char = Char; + exports2.Node = Node; + exports2.PlainValue = PlainValue; + exports2.Range = Range; + exports2.Type = Type; + exports2.YAMLError = YAMLError; + exports2.YAMLReferenceError = YAMLReferenceError; + exports2.YAMLSemanticError = YAMLSemanticError; + exports2.YAMLSyntaxError = YAMLSyntaxError; + exports2.YAMLWarning = YAMLWarning; + exports2._defineProperty = _defineProperty; + exports2.defaultTagPrefix = defaultTagPrefix; + exports2.defaultTags = defaultTags; + } +}); + +// ../../node_modules/oas-resolver/node_modules/yaml/dist/parse-cst.js +var require_parse_cst4 = __commonJS({ + "../../node_modules/oas-resolver/node_modules/yaml/dist/parse-cst.js"(exports2) { + "use strict"; + var PlainValue = require_PlainValue_ec8e588e4(); + var BlankLine = class extends PlainValue.Node { + constructor() { + super(PlainValue.Type.BLANK_LINE); + } + /* istanbul ignore next */ + get includesTrailingLines() { + return true; + } + /** + * Parses a blank line from the source + * + * @param {ParseContext} context + * @param {number} start - Index of first \n character + * @returns {number} - Index of the character after this + */ + parse(context, start) { + this.context = context; + this.range = new PlainValue.Range(start, start + 1); + return start + 1; + } + }; + var CollectionItem = class extends PlainValue.Node { + constructor(type, props) { + super(type, props); + this.node = null; + } + get includesTrailingLines() { + return !!this.node && this.node.includesTrailingLines; + } + /** + * @param {ParseContext} context + * @param {number} start - Index of first character + * @returns {number} - Index of the character after this + */ + parse(context, start) { + this.context = context; + const { + parseNode, + src + } = context; + let { + atLineStart, + lineStart + } = context; + if (!atLineStart && this.type === PlainValue.Type.SEQ_ITEM) this.error = new PlainValue.YAMLSemanticError(this, "Sequence items must not have preceding content on the same line"); + const indent = atLineStart ? start - lineStart : context.indent; + let offset = PlainValue.Node.endOfWhiteSpace(src, start + 1); + let ch = src[offset]; + const inlineComment = ch === "#"; + const comments = []; + let blankLine = null; + while (ch === "\n" || ch === "#") { + if (ch === "#") { + const end2 = PlainValue.Node.endOfLine(src, offset + 1); + comments.push(new PlainValue.Range(offset, end2)); + offset = end2; + } else { + atLineStart = true; + lineStart = offset + 1; + const wsEnd = PlainValue.Node.endOfWhiteSpace(src, lineStart); + if (src[wsEnd] === "\n" && comments.length === 0) { + blankLine = new BlankLine(); + lineStart = blankLine.parse({ + src + }, lineStart); + } + offset = PlainValue.Node.endOfIndent(src, lineStart); + } + ch = src[offset]; + } + if (PlainValue.Node.nextNodeIsIndented(ch, offset - (lineStart + indent), this.type !== PlainValue.Type.SEQ_ITEM)) { + this.node = parseNode({ + atLineStart, + inCollection: false, + indent, + lineStart, + parent: this + }, offset); + } else if (ch && lineStart > start + 1) { + offset = lineStart - 1; + } + if (this.node) { + if (blankLine) { + const items = context.parent.items || context.parent.contents; + if (items) items.push(blankLine); + } + if (comments.length) Array.prototype.push.apply(this.props, comments); + offset = this.node.range.end; + } else { + if (inlineComment) { + const c = comments[0]; + this.props.push(c); + offset = c.end; + } else { + offset = PlainValue.Node.endOfLine(src, start + 1); + } + } + const end = this.node ? this.node.valueRange.end : offset; + this.valueRange = new PlainValue.Range(start, end); + return offset; + } + setOrigRanges(cr, offset) { + offset = super.setOrigRanges(cr, offset); + return this.node ? this.node.setOrigRanges(cr, offset) : offset; + } + toString() { + const { + context: { + src + }, + node, + range, + value + } = this; + if (value != null) return value; + const str = node ? src.slice(range.start, node.range.start) + String(node) : src.slice(range.start, range.end); + return PlainValue.Node.addStringTerminator(src, range.end, str); + } + }; + var Comment = class extends PlainValue.Node { + constructor() { + super(PlainValue.Type.COMMENT); + } + /** + * Parses a comment line from the source + * + * @param {ParseContext} context + * @param {number} start - Index of first character + * @returns {number} - Index of the character after this scalar + */ + parse(context, start) { + this.context = context; + const offset = this.parseComment(start); + this.range = new PlainValue.Range(start, offset); + return offset; + } + }; + function grabCollectionEndComments(node) { + let cnode = node; + while (cnode instanceof CollectionItem) cnode = cnode.node; + if (!(cnode instanceof Collection)) return null; + const len = cnode.items.length; + let ci = -1; + for (let i = len - 1; i >= 0; --i) { + const n = cnode.items[i]; + if (n.type === PlainValue.Type.COMMENT) { + const { + indent, + lineStart + } = n.context; + if (indent > 0 && n.range.start >= lineStart + indent) break; + ci = i; + } else if (n.type === PlainValue.Type.BLANK_LINE) ci = i; + else break; + } + if (ci === -1) return null; + const ca = cnode.items.splice(ci, len - ci); + const prevEnd = ca[0].range.start; + while (true) { + cnode.range.end = prevEnd; + if (cnode.valueRange && cnode.valueRange.end > prevEnd) cnode.valueRange.end = prevEnd; + if (cnode === node) break; + cnode = cnode.context.parent; + } + return ca; + } + var Collection = class _Collection extends PlainValue.Node { + static nextContentHasIndent(src, offset, indent) { + const lineStart = PlainValue.Node.endOfLine(src, offset) + 1; + offset = PlainValue.Node.endOfWhiteSpace(src, lineStart); + const ch = src[offset]; + if (!ch) return false; + if (offset >= lineStart + indent) return true; + if (ch !== "#" && ch !== "\n") return false; + return _Collection.nextContentHasIndent(src, offset, indent); + } + constructor(firstItem) { + super(firstItem.type === PlainValue.Type.SEQ_ITEM ? PlainValue.Type.SEQ : PlainValue.Type.MAP); + for (let i = firstItem.props.length - 1; i >= 0; --i) { + if (firstItem.props[i].start < firstItem.context.lineStart) { + this.props = firstItem.props.slice(0, i + 1); + firstItem.props = firstItem.props.slice(i + 1); + const itemRange = firstItem.props[0] || firstItem.valueRange; + firstItem.range.start = itemRange.start; + break; + } + } + this.items = [firstItem]; + const ec = grabCollectionEndComments(firstItem); + if (ec) Array.prototype.push.apply(this.items, ec); + } + get includesTrailingLines() { + return this.items.length > 0; + } + /** + * @param {ParseContext} context + * @param {number} start - Index of first character + * @returns {number} - Index of the character after this + */ + parse(context, start) { + this.context = context; + const { + parseNode, + src + } = context; + let lineStart = PlainValue.Node.startOfLine(src, start); + const firstItem = this.items[0]; + firstItem.context.parent = this; + this.valueRange = PlainValue.Range.copy(firstItem.valueRange); + const indent = firstItem.range.start - firstItem.context.lineStart; + let offset = start; + offset = PlainValue.Node.normalizeOffset(src, offset); + let ch = src[offset]; + let atLineStart = PlainValue.Node.endOfWhiteSpace(src, lineStart) === offset; + let prevIncludesTrailingLines = false; + while (ch) { + while (ch === "\n" || ch === "#") { + if (atLineStart && ch === "\n" && !prevIncludesTrailingLines) { + const blankLine = new BlankLine(); + offset = blankLine.parse({ + src + }, offset); + this.valueRange.end = offset; + if (offset >= src.length) { + ch = null; + break; + } + this.items.push(blankLine); + offset -= 1; + } else if (ch === "#") { + if (offset < lineStart + indent && !_Collection.nextContentHasIndent(src, offset, indent)) { + return offset; + } + const comment = new Comment(); + offset = comment.parse({ + indent, + lineStart, + src + }, offset); + this.items.push(comment); + this.valueRange.end = offset; + if (offset >= src.length) { + ch = null; + break; + } + } + lineStart = offset + 1; + offset = PlainValue.Node.endOfIndent(src, lineStart); + if (PlainValue.Node.atBlank(src, offset)) { + const wsEnd = PlainValue.Node.endOfWhiteSpace(src, offset); + const next = src[wsEnd]; + if (!next || next === "\n" || next === "#") { + offset = wsEnd; + } + } + ch = src[offset]; + atLineStart = true; + } + if (!ch) { + break; + } + if (offset !== lineStart + indent && (atLineStart || ch !== ":")) { + if (offset < lineStart + indent) { + if (lineStart > start) offset = lineStart; + break; + } else if (!this.error) { + const msg = "All collection items must start at the same column"; + this.error = new PlainValue.YAMLSyntaxError(this, msg); + } + } + if (firstItem.type === PlainValue.Type.SEQ_ITEM) { + if (ch !== "-") { + if (lineStart > start) offset = lineStart; + break; + } + } else if (ch === "-" && !this.error) { + const next = src[offset + 1]; + if (!next || next === "\n" || next === " " || next === " ") { + const msg = "A collection cannot be both a mapping and a sequence"; + this.error = new PlainValue.YAMLSyntaxError(this, msg); + } + } + const node = parseNode({ + atLineStart, + inCollection: true, + indent, + lineStart, + parent: this + }, offset); + if (!node) return offset; + this.items.push(node); + this.valueRange.end = node.valueRange.end; + offset = PlainValue.Node.normalizeOffset(src, node.range.end); + ch = src[offset]; + atLineStart = false; + prevIncludesTrailingLines = node.includesTrailingLines; + if (ch) { + let ls = offset - 1; + let prev = src[ls]; + while (prev === " " || prev === " ") prev = src[--ls]; + if (prev === "\n") { + lineStart = ls + 1; + atLineStart = true; + } + } + const ec = grabCollectionEndComments(node); + if (ec) Array.prototype.push.apply(this.items, ec); + } + return offset; + } + setOrigRanges(cr, offset) { + offset = super.setOrigRanges(cr, offset); + this.items.forEach((node) => { + offset = node.setOrigRanges(cr, offset); + }); + return offset; + } + toString() { + const { + context: { + src + }, + items, + range, + value + } = this; + if (value != null) return value; + let str = src.slice(range.start, items[0].range.start) + String(items[0]); + for (let i = 1; i < items.length; ++i) { + const item = items[i]; + const { + atLineStart, + indent + } = item.context; + if (atLineStart) for (let i2 = 0; i2 < indent; ++i2) str += " "; + str += String(item); + } + return PlainValue.Node.addStringTerminator(src, range.end, str); + } + }; + var Directive = class extends PlainValue.Node { + constructor() { + super(PlainValue.Type.DIRECTIVE); + this.name = null; + } + get parameters() { + const raw = this.rawValue; + return raw ? raw.trim().split(/[ \t]+/) : []; + } + parseName(start) { + const { + src + } = this.context; + let offset = start; + let ch = src[offset]; + while (ch && ch !== "\n" && ch !== " " && ch !== " ") ch = src[offset += 1]; + this.name = src.slice(start, offset); + return offset; + } + parseParameters(start) { + const { + src + } = this.context; + let offset = start; + let ch = src[offset]; + while (ch && ch !== "\n" && ch !== "#") ch = src[offset += 1]; + this.valueRange = new PlainValue.Range(start, offset); + return offset; + } + parse(context, start) { + this.context = context; + let offset = this.parseName(start + 1); + offset = this.parseParameters(offset); + offset = this.parseComment(offset); + this.range = new PlainValue.Range(start, offset); + return offset; + } + }; + var Document = class _Document extends PlainValue.Node { + static startCommentOrEndBlankLine(src, start) { + const offset = PlainValue.Node.endOfWhiteSpace(src, start); + const ch = src[offset]; + return ch === "#" || ch === "\n" ? offset : start; + } + constructor() { + super(PlainValue.Type.DOCUMENT); + this.directives = null; + this.contents = null; + this.directivesEndMarker = null; + this.documentEndMarker = null; + } + parseDirectives(start) { + const { + src + } = this.context; + this.directives = []; + let atLineStart = true; + let hasDirectives = false; + let offset = start; + while (!PlainValue.Node.atDocumentBoundary(src, offset, PlainValue.Char.DIRECTIVES_END)) { + offset = _Document.startCommentOrEndBlankLine(src, offset); + switch (src[offset]) { + case "\n": + if (atLineStart) { + const blankLine = new BlankLine(); + offset = blankLine.parse({ + src + }, offset); + if (offset < src.length) { + this.directives.push(blankLine); + } + } else { + offset += 1; + atLineStart = true; + } + break; + case "#": + { + const comment = new Comment(); + offset = comment.parse({ + src + }, offset); + this.directives.push(comment); + atLineStart = false; + } + break; + case "%": + { + const directive = new Directive(); + offset = directive.parse({ + parent: this, + src + }, offset); + this.directives.push(directive); + hasDirectives = true; + atLineStart = false; + } + break; + default: + if (hasDirectives) { + this.error = new PlainValue.YAMLSemanticError(this, "Missing directives-end indicator line"); + } else if (this.directives.length > 0) { + this.contents = this.directives; + this.directives = []; + } + return offset; + } + } + if (src[offset]) { + this.directivesEndMarker = new PlainValue.Range(offset, offset + 3); + return offset + 3; + } + if (hasDirectives) { + this.error = new PlainValue.YAMLSemanticError(this, "Missing directives-end indicator line"); + } else if (this.directives.length > 0) { + this.contents = this.directives; + this.directives = []; + } + return offset; + } + parseContents(start) { + const { + parseNode, + src + } = this.context; + if (!this.contents) this.contents = []; + let lineStart = start; + while (src[lineStart - 1] === "-") lineStart -= 1; + let offset = PlainValue.Node.endOfWhiteSpace(src, start); + let atLineStart = lineStart === start; + this.valueRange = new PlainValue.Range(offset); + while (!PlainValue.Node.atDocumentBoundary(src, offset, PlainValue.Char.DOCUMENT_END)) { + switch (src[offset]) { + case "\n": + if (atLineStart) { + const blankLine = new BlankLine(); + offset = blankLine.parse({ + src + }, offset); + if (offset < src.length) { + this.contents.push(blankLine); + } + } else { + offset += 1; + atLineStart = true; + } + lineStart = offset; + break; + case "#": + { + const comment = new Comment(); + offset = comment.parse({ + src + }, offset); + this.contents.push(comment); + atLineStart = false; + } + break; + default: { + const iEnd = PlainValue.Node.endOfIndent(src, offset); + const context = { + atLineStart, + indent: -1, + inFlow: false, + inCollection: false, + lineStart, + parent: this + }; + const node = parseNode(context, iEnd); + if (!node) return this.valueRange.end = iEnd; + this.contents.push(node); + offset = node.range.end; + atLineStart = false; + const ec = grabCollectionEndComments(node); + if (ec) Array.prototype.push.apply(this.contents, ec); + } + } + offset = _Document.startCommentOrEndBlankLine(src, offset); + } + this.valueRange.end = offset; + if (src[offset]) { + this.documentEndMarker = new PlainValue.Range(offset, offset + 3); + offset += 3; + if (src[offset]) { + offset = PlainValue.Node.endOfWhiteSpace(src, offset); + if (src[offset] === "#") { + const comment = new Comment(); + offset = comment.parse({ + src + }, offset); + this.contents.push(comment); + } + switch (src[offset]) { + case "\n": + offset += 1; + break; + case void 0: + break; + default: + this.error = new PlainValue.YAMLSyntaxError(this, "Document end marker line cannot have a non-comment suffix"); + } + } + } + return offset; + } + /** + * @param {ParseContext} context + * @param {number} start - Index of first character + * @returns {number} - Index of the character after this + */ + parse(context, start) { + context.root = this; + this.context = context; + const { + src + } = context; + let offset = src.charCodeAt(start) === 65279 ? start + 1 : start; + offset = this.parseDirectives(offset); + offset = this.parseContents(offset); + return offset; + } + setOrigRanges(cr, offset) { + offset = super.setOrigRanges(cr, offset); + this.directives.forEach((node) => { + offset = node.setOrigRanges(cr, offset); + }); + if (this.directivesEndMarker) offset = this.directivesEndMarker.setOrigRange(cr, offset); + this.contents.forEach((node) => { + offset = node.setOrigRanges(cr, offset); + }); + if (this.documentEndMarker) offset = this.documentEndMarker.setOrigRange(cr, offset); + return offset; + } + toString() { + const { + contents, + directives, + value + } = this; + if (value != null) return value; + let str = directives.join(""); + if (contents.length > 0) { + if (directives.length > 0 || contents[0].type === PlainValue.Type.COMMENT) str += "---\n"; + str += contents.join(""); + } + if (str[str.length - 1] !== "\n") str += "\n"; + return str; + } + }; + var Alias = class extends PlainValue.Node { + /** + * Parses an *alias from the source + * + * @param {ParseContext} context + * @param {number} start - Index of first character + * @returns {number} - Index of the character after this scalar + */ + parse(context, start) { + this.context = context; + const { + src + } = context; + let offset = PlainValue.Node.endOfIdentifier(src, start + 1); + this.valueRange = new PlainValue.Range(start + 1, offset); + offset = PlainValue.Node.endOfWhiteSpace(src, offset); + offset = this.parseComment(offset); + return offset; + } + }; + var Chomp = { + CLIP: "CLIP", + KEEP: "KEEP", + STRIP: "STRIP" + }; + var BlockValue = class extends PlainValue.Node { + constructor(type, props) { + super(type, props); + this.blockIndent = null; + this.chomping = Chomp.CLIP; + this.header = null; + } + get includesTrailingLines() { + return this.chomping === Chomp.KEEP; + } + get strValue() { + if (!this.valueRange || !this.context) return null; + let { + start, + end + } = this.valueRange; + const { + indent, + src + } = this.context; + if (this.valueRange.isEmpty()) return ""; + let lastNewLine = null; + let ch = src[end - 1]; + while (ch === "\n" || ch === " " || ch === " ") { + end -= 1; + if (end <= start) { + if (this.chomping === Chomp.KEEP) break; + else return ""; + } + if (ch === "\n") lastNewLine = end; + ch = src[end - 1]; + } + let keepStart = end + 1; + if (lastNewLine) { + if (this.chomping === Chomp.KEEP) { + keepStart = lastNewLine; + end = this.valueRange.end; + } else { + end = lastNewLine; + } + } + const bi = indent + this.blockIndent; + const folded = this.type === PlainValue.Type.BLOCK_FOLDED; + let atStart = true; + let str = ""; + let sep = ""; + let prevMoreIndented = false; + for (let i = start; i < end; ++i) { + for (let j = 0; j < bi; ++j) { + if (src[i] !== " ") break; + i += 1; + } + const ch2 = src[i]; + if (ch2 === "\n") { + if (sep === "\n") str += "\n"; + else sep = "\n"; + } else { + const lineEnd = PlainValue.Node.endOfLine(src, i); + const line = src.slice(i, lineEnd); + i = lineEnd; + if (folded && (ch2 === " " || ch2 === " ") && i < keepStart) { + if (sep === " ") sep = "\n"; + else if (!prevMoreIndented && !atStart && sep === "\n") sep = "\n\n"; + str += sep + line; + sep = lineEnd < end && src[lineEnd] || ""; + prevMoreIndented = true; + } else { + str += sep + line; + sep = folded && i < keepStart ? " " : "\n"; + prevMoreIndented = false; + } + if (atStart && line !== "") atStart = false; + } + } + return this.chomping === Chomp.STRIP ? str : str + "\n"; + } + parseBlockHeader(start) { + const { + src + } = this.context; + let offset = start + 1; + let bi = ""; + while (true) { + const ch = src[offset]; + switch (ch) { + case "-": + this.chomping = Chomp.STRIP; + break; + case "+": + this.chomping = Chomp.KEEP; + break; + case "0": + case "1": + case "2": + case "3": + case "4": + case "5": + case "6": + case "7": + case "8": + case "9": + bi += ch; + break; + default: + this.blockIndent = Number(bi) || null; + this.header = new PlainValue.Range(start, offset); + return offset; + } + offset += 1; + } + } + parseBlockValue(start) { + const { + indent, + src + } = this.context; + const explicit = !!this.blockIndent; + let offset = start; + let valueEnd = start; + let minBlockIndent = 1; + for (let ch = src[offset]; ch === "\n"; ch = src[offset]) { + offset += 1; + if (PlainValue.Node.atDocumentBoundary(src, offset)) break; + const end = PlainValue.Node.endOfBlockIndent(src, indent, offset); + if (end === null) break; + const ch2 = src[end]; + const lineIndent = end - (offset + indent); + if (!this.blockIndent) { + if (src[end] !== "\n") { + if (lineIndent < minBlockIndent) { + const msg = "Block scalars with more-indented leading empty lines must use an explicit indentation indicator"; + this.error = new PlainValue.YAMLSemanticError(this, msg); + } + this.blockIndent = lineIndent; + } else if (lineIndent > minBlockIndent) { + minBlockIndent = lineIndent; + } + } else if (ch2 && ch2 !== "\n" && lineIndent < this.blockIndent) { + if (src[end] === "#") break; + if (!this.error) { + const src2 = explicit ? "explicit indentation indicator" : "first line"; + const msg = `Block scalars must not be less indented than their ${src2}`; + this.error = new PlainValue.YAMLSemanticError(this, msg); + } + } + if (src[end] === "\n") { + offset = end; + } else { + offset = valueEnd = PlainValue.Node.endOfLine(src, end); + } + } + if (this.chomping !== Chomp.KEEP) { + offset = src[valueEnd] ? valueEnd + 1 : valueEnd; + } + this.valueRange = new PlainValue.Range(start + 1, offset); + return offset; + } + /** + * Parses a block value from the source + * + * Accepted forms are: + * ``` + * BS + * block + * lines + * + * BS #comment + * block + * lines + * ``` + * where the block style BS matches the regexp `[|>][-+1-9]*` and block lines + * are empty or have an indent level greater than `indent`. + * + * @param {ParseContext} context + * @param {number} start - Index of first character + * @returns {number} - Index of the character after this block + */ + parse(context, start) { + this.context = context; + const { + src + } = context; + let offset = this.parseBlockHeader(start); + offset = PlainValue.Node.endOfWhiteSpace(src, offset); + offset = this.parseComment(offset); + offset = this.parseBlockValue(offset); + return offset; + } + setOrigRanges(cr, offset) { + offset = super.setOrigRanges(cr, offset); + return this.header ? this.header.setOrigRange(cr, offset) : offset; + } + }; + var FlowCollection = class extends PlainValue.Node { + constructor(type, props) { + super(type, props); + this.items = null; + } + prevNodeIsJsonLike(idx = this.items.length) { + const node = this.items[idx - 1]; + return !!node && (node.jsonLike || node.type === PlainValue.Type.COMMENT && this.prevNodeIsJsonLike(idx - 1)); + } + /** + * @param {ParseContext} context + * @param {number} start - Index of first character + * @returns {number} - Index of the character after this + */ + parse(context, start) { + this.context = context; + const { + parseNode, + src + } = context; + let { + indent, + lineStart + } = context; + let char = src[start]; + this.items = [{ + char, + offset: start + }]; + let offset = PlainValue.Node.endOfWhiteSpace(src, start + 1); + char = src[offset]; + while (char && char !== "]" && char !== "}") { + switch (char) { + case "\n": + { + lineStart = offset + 1; + const wsEnd = PlainValue.Node.endOfWhiteSpace(src, lineStart); + if (src[wsEnd] === "\n") { + const blankLine = new BlankLine(); + lineStart = blankLine.parse({ + src + }, lineStart); + this.items.push(blankLine); + } + offset = PlainValue.Node.endOfIndent(src, lineStart); + if (offset <= lineStart + indent) { + char = src[offset]; + if (offset < lineStart + indent || char !== "]" && char !== "}") { + const msg = "Insufficient indentation in flow collection"; + this.error = new PlainValue.YAMLSemanticError(this, msg); + } + } + } + break; + case ",": + { + this.items.push({ + char, + offset + }); + offset += 1; + } + break; + case "#": + { + const comment = new Comment(); + offset = comment.parse({ + src + }, offset); + this.items.push(comment); + } + break; + case "?": + case ":": { + const next = src[offset + 1]; + if (next === "\n" || next === " " || next === " " || next === "," || // in-flow : after JSON-like key does not need to be followed by whitespace + char === ":" && this.prevNodeIsJsonLike()) { + this.items.push({ + char, + offset + }); + offset += 1; + break; + } + } + default: { + const node = parseNode({ + atLineStart: false, + inCollection: false, + inFlow: true, + indent: -1, + lineStart, + parent: this + }, offset); + if (!node) { + this.valueRange = new PlainValue.Range(start, offset); + return offset; + } + this.items.push(node); + offset = PlainValue.Node.normalizeOffset(src, node.range.end); + } + } + offset = PlainValue.Node.endOfWhiteSpace(src, offset); + char = src[offset]; + } + this.valueRange = new PlainValue.Range(start, offset + 1); + if (char) { + this.items.push({ + char, + offset + }); + offset = PlainValue.Node.endOfWhiteSpace(src, offset + 1); + offset = this.parseComment(offset); + } + return offset; + } + setOrigRanges(cr, offset) { + offset = super.setOrigRanges(cr, offset); + this.items.forEach((node) => { + if (node instanceof PlainValue.Node) { + offset = node.setOrigRanges(cr, offset); + } else if (cr.length === 0) { + node.origOffset = node.offset; + } else { + let i = offset; + while (i < cr.length) { + if (cr[i] > node.offset) break; + else ++i; + } + node.origOffset = node.offset + i; + offset = i; + } + }); + return offset; + } + toString() { + const { + context: { + src + }, + items, + range, + value + } = this; + if (value != null) return value; + const nodes = items.filter((item) => item instanceof PlainValue.Node); + let str = ""; + let prevEnd = range.start; + nodes.forEach((node) => { + const prefix = src.slice(prevEnd, node.range.start); + prevEnd = node.range.end; + str += prefix + String(node); + if (str[str.length - 1] === "\n" && src[prevEnd - 1] !== "\n" && src[prevEnd] === "\n") { + prevEnd += 1; + } + }); + str += src.slice(prevEnd, range.end); + return PlainValue.Node.addStringTerminator(src, range.end, str); + } + }; + var QuoteDouble = class _QuoteDouble extends PlainValue.Node { + static endOfQuote(src, offset) { + let ch = src[offset]; + while (ch && ch !== '"') { + offset += ch === "\\" ? 2 : 1; + ch = src[offset]; + } + return offset + 1; + } + /** + * @returns {string | { str: string, errors: YAMLSyntaxError[] }} + */ + get strValue() { + if (!this.valueRange || !this.context) return null; + const errors = []; + const { + start, + end + } = this.valueRange; + const { + indent, + src + } = this.context; + if (src[end - 1] !== '"') errors.push(new PlainValue.YAMLSyntaxError(this, 'Missing closing "quote')); + let str = ""; + for (let i = start + 1; i < end - 1; ++i) { + const ch = src[i]; + if (ch === "\n") { + if (PlainValue.Node.atDocumentBoundary(src, i + 1)) errors.push(new PlainValue.YAMLSemanticError(this, "Document boundary indicators are not allowed within string values")); + const { + fold, + offset, + error + } = PlainValue.Node.foldNewline(src, i, indent); + str += fold; + i = offset; + if (error) errors.push(new PlainValue.YAMLSemanticError(this, "Multi-line double-quoted string needs to be sufficiently indented")); + } else if (ch === "\\") { + i += 1; + switch (src[i]) { + case "0": + str += "\0"; + break; + case "a": + str += "\x07"; + break; + case "b": + str += "\b"; + break; + case "e": + str += "\x1B"; + break; + case "f": + str += "\f"; + break; + case "n": + str += "\n"; + break; + case "r": + str += "\r"; + break; + case "t": + str += " "; + break; + case "v": + str += "\v"; + break; + case "N": + str += "\x85"; + break; + case "_": + str += "\xA0"; + break; + case "L": + str += "\u2028"; + break; + case "P": + str += "\u2029"; + break; + case " ": + str += " "; + break; + case '"': + str += '"'; + break; + case "/": + str += "/"; + break; + case "\\": + str += "\\"; + break; + case " ": + str += " "; + break; + case "x": + str += this.parseCharCode(i + 1, 2, errors); + i += 2; + break; + case "u": + str += this.parseCharCode(i + 1, 4, errors); + i += 4; + break; + case "U": + str += this.parseCharCode(i + 1, 8, errors); + i += 8; + break; + case "\n": + while (src[i + 1] === " " || src[i + 1] === " ") i += 1; + break; + default: + errors.push(new PlainValue.YAMLSyntaxError(this, `Invalid escape sequence ${src.substr(i - 1, 2)}`)); + str += "\\" + src[i]; + } + } else if (ch === " " || ch === " ") { + const wsStart = i; + let next = src[i + 1]; + while (next === " " || next === " ") { + i += 1; + next = src[i + 1]; + } + if (next !== "\n") str += i > wsStart ? src.slice(wsStart, i + 1) : ch; + } else { + str += ch; + } + } + return errors.length > 0 ? { + errors, + str + } : str; + } + parseCharCode(offset, length, errors) { + const { + src + } = this.context; + const cc = src.substr(offset, length); + const ok = cc.length === length && /^[0-9a-fA-F]+$/.test(cc); + const code = ok ? parseInt(cc, 16) : NaN; + if (isNaN(code)) { + errors.push(new PlainValue.YAMLSyntaxError(this, `Invalid escape sequence ${src.substr(offset - 2, length + 2)}`)); + return src.substr(offset - 2, length + 2); + } + return String.fromCodePoint(code); + } + /** + * Parses a "double quoted" value from the source + * + * @param {ParseContext} context + * @param {number} start - Index of first character + * @returns {number} - Index of the character after this scalar + */ + parse(context, start) { + this.context = context; + const { + src + } = context; + let offset = _QuoteDouble.endOfQuote(src, start + 1); + this.valueRange = new PlainValue.Range(start, offset); + offset = PlainValue.Node.endOfWhiteSpace(src, offset); + offset = this.parseComment(offset); + return offset; + } + }; + var QuoteSingle = class _QuoteSingle extends PlainValue.Node { + static endOfQuote(src, offset) { + let ch = src[offset]; + while (ch) { + if (ch === "'") { + if (src[offset + 1] !== "'") break; + ch = src[offset += 2]; + } else { + ch = src[offset += 1]; + } + } + return offset + 1; + } + /** + * @returns {string | { str: string, errors: YAMLSyntaxError[] }} + */ + get strValue() { + if (!this.valueRange || !this.context) return null; + const errors = []; + const { + start, + end + } = this.valueRange; + const { + indent, + src + } = this.context; + if (src[end - 1] !== "'") errors.push(new PlainValue.YAMLSyntaxError(this, "Missing closing 'quote")); + let str = ""; + for (let i = start + 1; i < end - 1; ++i) { + const ch = src[i]; + if (ch === "\n") { + if (PlainValue.Node.atDocumentBoundary(src, i + 1)) errors.push(new PlainValue.YAMLSemanticError(this, "Document boundary indicators are not allowed within string values")); + const { + fold, + offset, + error + } = PlainValue.Node.foldNewline(src, i, indent); + str += fold; + i = offset; + if (error) errors.push(new PlainValue.YAMLSemanticError(this, "Multi-line single-quoted string needs to be sufficiently indented")); + } else if (ch === "'") { + str += ch; + i += 1; + if (src[i] !== "'") errors.push(new PlainValue.YAMLSyntaxError(this, "Unescaped single quote? This should not happen.")); + } else if (ch === " " || ch === " ") { + const wsStart = i; + let next = src[i + 1]; + while (next === " " || next === " ") { + i += 1; + next = src[i + 1]; + } + if (next !== "\n") str += i > wsStart ? src.slice(wsStart, i + 1) : ch; + } else { + str += ch; + } + } + return errors.length > 0 ? { + errors, + str + } : str; + } + /** + * Parses a 'single quoted' value from the source + * + * @param {ParseContext} context + * @param {number} start - Index of first character + * @returns {number} - Index of the character after this scalar + */ + parse(context, start) { + this.context = context; + const { + src + } = context; + let offset = _QuoteSingle.endOfQuote(src, start + 1); + this.valueRange = new PlainValue.Range(start, offset); + offset = PlainValue.Node.endOfWhiteSpace(src, offset); + offset = this.parseComment(offset); + return offset; + } + }; + function createNewNode(type, props) { + switch (type) { + case PlainValue.Type.ALIAS: + return new Alias(type, props); + case PlainValue.Type.BLOCK_FOLDED: + case PlainValue.Type.BLOCK_LITERAL: + return new BlockValue(type, props); + case PlainValue.Type.FLOW_MAP: + case PlainValue.Type.FLOW_SEQ: + return new FlowCollection(type, props); + case PlainValue.Type.MAP_KEY: + case PlainValue.Type.MAP_VALUE: + case PlainValue.Type.SEQ_ITEM: + return new CollectionItem(type, props); + case PlainValue.Type.COMMENT: + case PlainValue.Type.PLAIN: + return new PlainValue.PlainValue(type, props); + case PlainValue.Type.QUOTE_DOUBLE: + return new QuoteDouble(type, props); + case PlainValue.Type.QUOTE_SINGLE: + return new QuoteSingle(type, props); + default: + return null; + } + } + var ParseContext = class _ParseContext { + static parseType(src, offset, inFlow) { + switch (src[offset]) { + case "*": + return PlainValue.Type.ALIAS; + case ">": + return PlainValue.Type.BLOCK_FOLDED; + case "|": + return PlainValue.Type.BLOCK_LITERAL; + case "{": + return PlainValue.Type.FLOW_MAP; + case "[": + return PlainValue.Type.FLOW_SEQ; + case "?": + return !inFlow && PlainValue.Node.atBlank(src, offset + 1, true) ? PlainValue.Type.MAP_KEY : PlainValue.Type.PLAIN; + case ":": + return !inFlow && PlainValue.Node.atBlank(src, offset + 1, true) ? PlainValue.Type.MAP_VALUE : PlainValue.Type.PLAIN; + case "-": + return !inFlow && PlainValue.Node.atBlank(src, offset + 1, true) ? PlainValue.Type.SEQ_ITEM : PlainValue.Type.PLAIN; + case '"': + return PlainValue.Type.QUOTE_DOUBLE; + case "'": + return PlainValue.Type.QUOTE_SINGLE; + default: + return PlainValue.Type.PLAIN; + } + } + constructor(orig = {}, { + atLineStart, + inCollection, + inFlow, + indent, + lineStart, + parent + } = {}) { + PlainValue._defineProperty(this, "parseNode", (overlay, start) => { + if (PlainValue.Node.atDocumentBoundary(this.src, start)) return null; + const context = new _ParseContext(this, overlay); + const { + props, + type, + valueStart + } = context.parseProps(start); + const node = createNewNode(type, props); + let offset = node.parse(context, valueStart); + node.range = new PlainValue.Range(start, offset); + if (offset <= start) { + node.error = new Error(`Node#parse consumed no characters`); + node.error.parseEnd = offset; + node.error.source = node; + node.range.end = start + 1; + } + if (context.nodeStartsCollection(node)) { + if (!node.error && !context.atLineStart && context.parent.type === PlainValue.Type.DOCUMENT) { + node.error = new PlainValue.YAMLSyntaxError(node, "Block collection must not have preceding content here (e.g. directives-end indicator)"); + } + const collection = new Collection(node); + offset = collection.parse(new _ParseContext(context), offset); + collection.range = new PlainValue.Range(start, offset); + return collection; + } + return node; + }); + this.atLineStart = atLineStart != null ? atLineStart : orig.atLineStart || false; + this.inCollection = inCollection != null ? inCollection : orig.inCollection || false; + this.inFlow = inFlow != null ? inFlow : orig.inFlow || false; + this.indent = indent != null ? indent : orig.indent; + this.lineStart = lineStart != null ? lineStart : orig.lineStart; + this.parent = parent != null ? parent : orig.parent || {}; + this.root = orig.root; + this.src = orig.src; + } + nodeStartsCollection(node) { + const { + inCollection, + inFlow, + src + } = this; + if (inCollection || inFlow) return false; + if (node instanceof CollectionItem) return true; + let offset = node.range.end; + if (src[offset] === "\n" || src[offset - 1] === "\n") return false; + offset = PlainValue.Node.endOfWhiteSpace(src, offset); + return src[offset] === ":"; + } + // Anchor and tag are before type, which determines the node implementation + // class; hence this intermediate step. + parseProps(offset) { + const { + inFlow, + parent, + src + } = this; + const props = []; + let lineHasProps = false; + offset = this.atLineStart ? PlainValue.Node.endOfIndent(src, offset) : PlainValue.Node.endOfWhiteSpace(src, offset); + let ch = src[offset]; + while (ch === PlainValue.Char.ANCHOR || ch === PlainValue.Char.COMMENT || ch === PlainValue.Char.TAG || ch === "\n") { + if (ch === "\n") { + let inEnd = offset; + let lineStart; + do { + lineStart = inEnd + 1; + inEnd = PlainValue.Node.endOfIndent(src, lineStart); + } while (src[inEnd] === "\n"); + const indentDiff = inEnd - (lineStart + this.indent); + const noIndicatorAsIndent = parent.type === PlainValue.Type.SEQ_ITEM && parent.context.atLineStart; + if (src[inEnd] !== "#" && !PlainValue.Node.nextNodeIsIndented(src[inEnd], indentDiff, !noIndicatorAsIndent)) break; + this.atLineStart = true; + this.lineStart = lineStart; + lineHasProps = false; + offset = inEnd; + } else if (ch === PlainValue.Char.COMMENT) { + const end = PlainValue.Node.endOfLine(src, offset + 1); + props.push(new PlainValue.Range(offset, end)); + offset = end; + } else { + let end = PlainValue.Node.endOfIdentifier(src, offset + 1); + if (ch === PlainValue.Char.TAG && src[end] === "," && /^[a-zA-Z0-9-]+\.[a-zA-Z0-9-]+,\d\d\d\d(-\d\d){0,2}\/\S/.test(src.slice(offset + 1, end + 13))) { + end = PlainValue.Node.endOfIdentifier(src, end + 5); + } + props.push(new PlainValue.Range(offset, end)); + lineHasProps = true; + offset = PlainValue.Node.endOfWhiteSpace(src, end); + } + ch = src[offset]; + } + if (lineHasProps && ch === ":" && PlainValue.Node.atBlank(src, offset + 1, true)) offset -= 1; + const type = _ParseContext.parseType(src, offset, inFlow); + return { + props, + type, + valueStart: offset + }; + } + /** + * Parses a node from the source + * @param {ParseContext} overlay + * @param {number} start - Index of first non-whitespace character for the node + * @returns {?Node} - null if at a document boundary + */ + }; + function parse2(src) { + const cr = []; + if (src.indexOf("\r") !== -1) { + src = src.replace(/\r\n?/g, (match, offset2) => { + if (match.length > 1) cr.push(offset2); + return "\n"; + }); + } + const documents = []; + let offset = 0; + do { + const doc = new Document(); + const context = new ParseContext({ + src + }); + offset = doc.parse(context, offset); + documents.push(doc); + } while (offset < src.length); + documents.setOrigRanges = () => { + if (cr.length === 0) return false; + for (let i = 1; i < cr.length; ++i) cr[i] -= i; + let crOffset = 0; + for (let i = 0; i < documents.length; ++i) { + crOffset = documents[i].setOrigRanges(cr, crOffset); + } + cr.splice(0, cr.length); + return true; + }; + documents.toString = () => documents.join("...\n"); + return documents; + } + exports2.parse = parse2; + } +}); + +// ../../node_modules/oas-resolver/node_modules/yaml/dist/resolveSeq-d03cb037.js +var require_resolveSeq_d03cb0374 = __commonJS({ + "../../node_modules/oas-resolver/node_modules/yaml/dist/resolveSeq-d03cb037.js"(exports2) { + "use strict"; + var PlainValue = require_PlainValue_ec8e588e4(); + function addCommentBefore(str, indent, comment) { + if (!comment) return str; + const cc = comment.replace(/[\s\S]^/gm, `$&${indent}#`); + return `#${cc} +${indent}${str}`; + } + function addComment(str, indent, comment) { + return !comment ? str : comment.indexOf("\n") === -1 ? `${str} #${comment}` : `${str} +` + comment.replace(/^/gm, `${indent || ""}#`); + } + var Node = class { + }; + function toJSON(value, arg, ctx) { + if (Array.isArray(value)) return value.map((v, i) => toJSON(v, String(i), ctx)); + if (value && typeof value.toJSON === "function") { + const anchor = ctx && ctx.anchors && ctx.anchors.get(value); + if (anchor) ctx.onCreate = (res2) => { + anchor.res = res2; + delete ctx.onCreate; + }; + const res = value.toJSON(arg, ctx); + if (anchor && ctx.onCreate) ctx.onCreate(res); + return res; + } + if ((!ctx || !ctx.keep) && typeof value === "bigint") return Number(value); + return value; + } + var Scalar = class extends Node { + constructor(value) { + super(); + this.value = value; + } + toJSON(arg, ctx) { + return ctx && ctx.keep ? this.value : toJSON(this.value, arg, ctx); + } + toString() { + return String(this.value); + } + }; + function collectionFromPath(schema2, path, value) { + let v = value; + for (let i = path.length - 1; i >= 0; --i) { + const k = path[i]; + if (Number.isInteger(k) && k >= 0) { + const a = []; + a[k] = v; + v = a; + } else { + const o = {}; + Object.defineProperty(o, k, { + value: v, + writable: true, + enumerable: true, + configurable: true + }); + v = o; + } + } + return schema2.createNode(v, false); + } + var isEmptyPath = (path) => path == null || typeof path === "object" && path[Symbol.iterator]().next().done; + var Collection = class _Collection extends Node { + constructor(schema2) { + super(); + PlainValue._defineProperty(this, "items", []); + this.schema = schema2; + } + addIn(path, value) { + if (isEmptyPath(path)) this.add(value); + else { + const [key, ...rest] = path; + const node = this.get(key, true); + if (node instanceof _Collection) node.addIn(rest, value); + else if (node === void 0 && this.schema) this.set(key, collectionFromPath(this.schema, rest, value)); + else throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`); + } + } + deleteIn([key, ...rest]) { + if (rest.length === 0) return this.delete(key); + const node = this.get(key, true); + if (node instanceof _Collection) return node.deleteIn(rest); + else throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`); + } + getIn([key, ...rest], keepScalar) { + const node = this.get(key, true); + if (rest.length === 0) return !keepScalar && node instanceof Scalar ? node.value : node; + else return node instanceof _Collection ? node.getIn(rest, keepScalar) : void 0; + } + hasAllNullValues() { + return this.items.every((node) => { + if (!node || node.type !== "PAIR") return false; + const n = node.value; + return n == null || n instanceof Scalar && n.value == null && !n.commentBefore && !n.comment && !n.tag; + }); + } + hasIn([key, ...rest]) { + if (rest.length === 0) return this.has(key); + const node = this.get(key, true); + return node instanceof _Collection ? node.hasIn(rest) : false; + } + setIn([key, ...rest], value) { + if (rest.length === 0) { + this.set(key, value); + } else { + const node = this.get(key, true); + if (node instanceof _Collection) node.setIn(rest, value); + else if (node === void 0 && this.schema) this.set(key, collectionFromPath(this.schema, rest, value)); + else throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`); + } + } + // overridden in implementations + /* istanbul ignore next */ + toJSON() { + return null; + } + toString(ctx, { + blockItem, + flowChars, + isMap, + itemIndent + }, onComment, onChompKeep) { + const { + indent, + indentStep, + stringify: stringify2 + } = ctx; + const inFlow = this.type === PlainValue.Type.FLOW_MAP || this.type === PlainValue.Type.FLOW_SEQ || ctx.inFlow; + if (inFlow) itemIndent += indentStep; + const allNullValues = isMap && this.hasAllNullValues(); + ctx = Object.assign({}, ctx, { + allNullValues, + indent: itemIndent, + inFlow, + type: null + }); + let chompKeep = false; + let hasItemWithNewLine = false; + const nodes = this.items.reduce((nodes2, item, i) => { + let comment; + if (item) { + if (!chompKeep && item.spaceBefore) nodes2.push({ + type: "comment", + str: "" + }); + if (item.commentBefore) item.commentBefore.match(/^.*$/gm).forEach((line) => { + nodes2.push({ + type: "comment", + str: `#${line}` + }); + }); + if (item.comment) comment = item.comment; + if (inFlow && (!chompKeep && item.spaceBefore || item.commentBefore || item.comment || item.key && (item.key.commentBefore || item.key.comment) || item.value && (item.value.commentBefore || item.value.comment))) hasItemWithNewLine = true; + } + chompKeep = false; + let str2 = stringify2(item, ctx, () => comment = null, () => chompKeep = true); + if (inFlow && !hasItemWithNewLine && str2.includes("\n")) hasItemWithNewLine = true; + if (inFlow && i < this.items.length - 1) str2 += ","; + str2 = addComment(str2, itemIndent, comment); + if (chompKeep && (comment || inFlow)) chompKeep = false; + nodes2.push({ + type: "item", + str: str2 + }); + return nodes2; + }, []); + let str; + if (nodes.length === 0) { + str = flowChars.start + flowChars.end; + } else if (inFlow) { + const { + start, + end + } = flowChars; + const strings = nodes.map((n) => n.str); + if (hasItemWithNewLine || strings.reduce((sum, str2) => sum + str2.length + 2, 2) > _Collection.maxFlowStringSingleLineLength) { + str = start; + for (const s of strings) { + str += s ? ` +${indentStep}${indent}${s}` : "\n"; + } + str += ` +${indent}${end}`; + } else { + str = `${start} ${strings.join(" ")} ${end}`; + } + } else { + const strings = nodes.map(blockItem); + str = strings.shift(); + for (const s of strings) str += s ? ` +${indent}${s}` : "\n"; + } + if (this.comment) { + str += "\n" + this.comment.replace(/^/gm, `${indent}#`); + if (onComment) onComment(); + } else if (chompKeep && onChompKeep) onChompKeep(); + return str; + } + }; + PlainValue._defineProperty(Collection, "maxFlowStringSingleLineLength", 60); + function asItemIndex(key) { + let idx = key instanceof Scalar ? key.value : key; + if (idx && typeof idx === "string") idx = Number(idx); + return Number.isInteger(idx) && idx >= 0 ? idx : null; + } + var YAMLSeq = class extends Collection { + add(value) { + this.items.push(value); + } + delete(key) { + const idx = asItemIndex(key); + if (typeof idx !== "number") return false; + const del = this.items.splice(idx, 1); + return del.length > 0; + } + get(key, keepScalar) { + const idx = asItemIndex(key); + if (typeof idx !== "number") return void 0; + const it = this.items[idx]; + return !keepScalar && it instanceof Scalar ? it.value : it; + } + has(key) { + const idx = asItemIndex(key); + return typeof idx === "number" && idx < this.items.length; + } + set(key, value) { + const idx = asItemIndex(key); + if (typeof idx !== "number") throw new Error(`Expected a valid index, not ${key}.`); + this.items[idx] = value; + } + toJSON(_2, ctx) { + const seq = []; + if (ctx && ctx.onCreate) ctx.onCreate(seq); + let i = 0; + for (const item of this.items) seq.push(toJSON(item, String(i++), ctx)); + return seq; + } + toString(ctx, onComment, onChompKeep) { + if (!ctx) return JSON.stringify(this); + return super.toString(ctx, { + blockItem: (n) => n.type === "comment" ? n.str : `- ${n.str}`, + flowChars: { + start: "[", + end: "]" + }, + isMap: false, + itemIndent: (ctx.indent || "") + " " + }, onComment, onChompKeep); + } + }; + var stringifyKey = (key, jsKey, ctx) => { + if (jsKey === null) return ""; + if (typeof jsKey !== "object") return String(jsKey); + if (key instanceof Node && ctx && ctx.doc) return key.toString({ + anchors: /* @__PURE__ */ Object.create(null), + doc: ctx.doc, + indent: "", + indentStep: ctx.indentStep, + inFlow: true, + inStringifyKey: true, + stringify: ctx.stringify + }); + return JSON.stringify(jsKey); + }; + var Pair = class _Pair extends Node { + constructor(key, value = null) { + super(); + this.key = key; + this.value = value; + this.type = _Pair.Type.PAIR; + } + get commentBefore() { + return this.key instanceof Node ? this.key.commentBefore : void 0; + } + set commentBefore(cb) { + if (this.key == null) this.key = new Scalar(null); + if (this.key instanceof Node) this.key.commentBefore = cb; + else { + const msg = "Pair.commentBefore is an alias for Pair.key.commentBefore. To set it, the key must be a Node."; + throw new Error(msg); + } + } + addToJSMap(ctx, map) { + const key = toJSON(this.key, "", ctx); + if (map instanceof Map) { + const value = toJSON(this.value, key, ctx); + map.set(key, value); + } else if (map instanceof Set) { + map.add(key); + } else { + const stringKey = stringifyKey(this.key, key, ctx); + const value = toJSON(this.value, stringKey, ctx); + if (stringKey in map) Object.defineProperty(map, stringKey, { + value, + writable: true, + enumerable: true, + configurable: true + }); + else map[stringKey] = value; + } + return map; + } + toJSON(_2, ctx) { + const pair = ctx && ctx.mapAsMap ? /* @__PURE__ */ new Map() : {}; + return this.addToJSMap(ctx, pair); + } + toString(ctx, onComment, onChompKeep) { + if (!ctx || !ctx.doc) return JSON.stringify(this); + const { + indent: indentSize, + indentSeq, + simpleKeys + } = ctx.doc.options; + let { + key, + value + } = this; + let keyComment = key instanceof Node && key.comment; + if (simpleKeys) { + if (keyComment) { + throw new Error("With simple keys, key nodes cannot have comments"); + } + if (key instanceof Collection) { + const msg = "With simple keys, collection cannot be used as a key value"; + throw new Error(msg); + } + } + let explicitKey = !simpleKeys && (!key || keyComment || (key instanceof Node ? key instanceof Collection || key.type === PlainValue.Type.BLOCK_FOLDED || key.type === PlainValue.Type.BLOCK_LITERAL : typeof key === "object")); + const { + doc, + indent, + indentStep, + stringify: stringify2 + } = ctx; + ctx = Object.assign({}, ctx, { + implicitKey: !explicitKey, + indent: indent + indentStep + }); + let chompKeep = false; + let str = stringify2(key, ctx, () => keyComment = null, () => chompKeep = true); + str = addComment(str, ctx.indent, keyComment); + if (!explicitKey && str.length > 1024) { + if (simpleKeys) throw new Error("With simple keys, single line scalar must not span more than 1024 characters"); + explicitKey = true; + } + if (ctx.allNullValues && !simpleKeys) { + if (this.comment) { + str = addComment(str, ctx.indent, this.comment); + if (onComment) onComment(); + } else if (chompKeep && !keyComment && onChompKeep) onChompKeep(); + return ctx.inFlow && !explicitKey ? str : `? ${str}`; + } + str = explicitKey ? `? ${str} +${indent}:` : `${str}:`; + if (this.comment) { + str = addComment(str, ctx.indent, this.comment); + if (onComment) onComment(); + } + let vcb = ""; + let valueComment = null; + if (value instanceof Node) { + if (value.spaceBefore) vcb = "\n"; + if (value.commentBefore) { + const cs = value.commentBefore.replace(/^/gm, `${ctx.indent}#`); + vcb += ` +${cs}`; + } + valueComment = value.comment; + } else if (value && typeof value === "object") { + value = doc.schema.createNode(value, true); + } + ctx.implicitKey = false; + if (!explicitKey && !this.comment && value instanceof Scalar) ctx.indentAtStart = str.length + 1; + chompKeep = false; + if (!indentSeq && indentSize >= 2 && !ctx.inFlow && !explicitKey && value instanceof YAMLSeq && value.type !== PlainValue.Type.FLOW_SEQ && !value.tag && !doc.anchors.getName(value)) { + ctx.indent = ctx.indent.substr(2); + } + const valueStr = stringify2(value, ctx, () => valueComment = null, () => chompKeep = true); + let ws = " "; + if (vcb || this.comment) { + ws = `${vcb} +${ctx.indent}`; + } else if (!explicitKey && value instanceof Collection) { + const flow = valueStr[0] === "[" || valueStr[0] === "{"; + if (!flow || valueStr.includes("\n")) ws = ` +${ctx.indent}`; + } else if (valueStr[0] === "\n") ws = ""; + if (chompKeep && !valueComment && onChompKeep) onChompKeep(); + return addComment(str + ws + valueStr, ctx.indent, valueComment); + } + }; + PlainValue._defineProperty(Pair, "Type", { + PAIR: "PAIR", + MERGE_PAIR: "MERGE_PAIR" + }); + var getAliasCount = (node, anchors) => { + if (node instanceof Alias) { + const anchor = anchors.get(node.source); + return anchor.count * anchor.aliasCount; + } else if (node instanceof Collection) { + let count = 0; + for (const item of node.items) { + const c = getAliasCount(item, anchors); + if (c > count) count = c; + } + return count; + } else if (node instanceof Pair) { + const kc = getAliasCount(node.key, anchors); + const vc = getAliasCount(node.value, anchors); + return Math.max(kc, vc); + } + return 1; + }; + var Alias = class _Alias extends Node { + static stringify({ + range, + source + }, { + anchors, + doc, + implicitKey, + inStringifyKey + }) { + let anchor = Object.keys(anchors).find((a) => anchors[a] === source); + if (!anchor && inStringifyKey) anchor = doc.anchors.getName(source) || doc.anchors.newName(); + if (anchor) return `*${anchor}${implicitKey ? " " : ""}`; + const msg = doc.anchors.getName(source) ? "Alias node must be after source node" : "Source node not found for alias node"; + throw new Error(`${msg} [${range}]`); + } + constructor(source) { + super(); + this.source = source; + this.type = PlainValue.Type.ALIAS; + } + set tag(t) { + throw new Error("Alias nodes cannot have tags"); + } + toJSON(arg, ctx) { + if (!ctx) return toJSON(this.source, arg, ctx); + const { + anchors, + maxAliasCount + } = ctx; + const anchor = anchors.get(this.source); + if (!anchor || anchor.res === void 0) { + const msg = "This should not happen: Alias anchor was not resolved?"; + if (this.cstNode) throw new PlainValue.YAMLReferenceError(this.cstNode, msg); + else throw new ReferenceError(msg); + } + if (maxAliasCount >= 0) { + anchor.count += 1; + if (anchor.aliasCount === 0) anchor.aliasCount = getAliasCount(this.source, anchors); + if (anchor.count * anchor.aliasCount > maxAliasCount) { + const msg = "Excessive alias count indicates a resource exhaustion attack"; + if (this.cstNode) throw new PlainValue.YAMLReferenceError(this.cstNode, msg); + else throw new ReferenceError(msg); + } + } + return anchor.res; + } + // Only called when stringifying an alias mapping key while constructing + // Object output. + toString(ctx) { + return _Alias.stringify(this, ctx); + } + }; + PlainValue._defineProperty(Alias, "default", true); + function findPair(items, key) { + const k = key instanceof Scalar ? key.value : key; + for (const it of items) { + if (it instanceof Pair) { + if (it.key === key || it.key === k) return it; + if (it.key && it.key.value === k) return it; + } + } + return void 0; + } + var YAMLMap = class extends Collection { + add(pair, overwrite) { + if (!pair) pair = new Pair(pair); + else if (!(pair instanceof Pair)) pair = new Pair(pair.key || pair, pair.value); + const prev = findPair(this.items, pair.key); + const sortEntries = this.schema && this.schema.sortMapEntries; + if (prev) { + if (overwrite) prev.value = pair.value; + else throw new Error(`Key ${pair.key} already set`); + } else if (sortEntries) { + const i = this.items.findIndex((item) => sortEntries(pair, item) < 0); + if (i === -1) this.items.push(pair); + else this.items.splice(i, 0, pair); + } else { + this.items.push(pair); + } + } + delete(key) { + const it = findPair(this.items, key); + if (!it) return false; + const del = this.items.splice(this.items.indexOf(it), 1); + return del.length > 0; + } + get(key, keepScalar) { + const it = findPair(this.items, key); + const node = it && it.value; + return !keepScalar && node instanceof Scalar ? node.value : node; + } + has(key) { + return !!findPair(this.items, key); + } + set(key, value) { + this.add(new Pair(key, value), true); + } + /** + * @param {*} arg ignored + * @param {*} ctx Conversion context, originally set in Document#toJSON() + * @param {Class} Type If set, forces the returned collection type + * @returns {*} Instance of Type, Map, or Object + */ + toJSON(_2, ctx, Type) { + const map = Type ? new Type() : ctx && ctx.mapAsMap ? /* @__PURE__ */ new Map() : {}; + if (ctx && ctx.onCreate) ctx.onCreate(map); + for (const item of this.items) item.addToJSMap(ctx, map); + return map; + } + toString(ctx, onComment, onChompKeep) { + if (!ctx) return JSON.stringify(this); + for (const item of this.items) { + if (!(item instanceof Pair)) throw new Error(`Map items must all be pairs; found ${JSON.stringify(item)} instead`); + } + return super.toString(ctx, { + blockItem: (n) => n.str, + flowChars: { + start: "{", + end: "}" + }, + isMap: true, + itemIndent: ctx.indent || "" + }, onComment, onChompKeep); + } + }; + var MERGE_KEY = "<<"; + var Merge = class extends Pair { + constructor(pair) { + if (pair instanceof Pair) { + let seq = pair.value; + if (!(seq instanceof YAMLSeq)) { + seq = new YAMLSeq(); + seq.items.push(pair.value); + seq.range = pair.value.range; + } + super(pair.key, seq); + this.range = pair.range; + } else { + super(new Scalar(MERGE_KEY), new YAMLSeq()); + } + this.type = Pair.Type.MERGE_PAIR; + } + // If the value associated with a merge key is a single mapping node, each of + // its key/value pairs is inserted into the current mapping, unless the key + // already exists in it. If the value associated with the merge key is a + // sequence, then this sequence is expected to contain mapping nodes and each + // of these nodes is merged in turn according to its order in the sequence. + // Keys in mapping nodes earlier in the sequence override keys specified in + // later mapping nodes. -- http://yaml.org/type/merge.html + addToJSMap(ctx, map) { + for (const { + source + } of this.value.items) { + if (!(source instanceof YAMLMap)) throw new Error("Merge sources must be maps"); + const srcMap = source.toJSON(null, ctx, Map); + for (const [key, value] of srcMap) { + if (map instanceof Map) { + if (!map.has(key)) map.set(key, value); + } else if (map instanceof Set) { + map.add(key); + } else if (!Object.prototype.hasOwnProperty.call(map, key)) { + Object.defineProperty(map, key, { + value, + writable: true, + enumerable: true, + configurable: true + }); + } + } + } + return map; + } + toString(ctx, onComment) { + const seq = this.value; + if (seq.items.length > 1) return super.toString(ctx, onComment); + this.value = seq.items[0]; + const str = super.toString(ctx, onComment); + this.value = seq; + return str; + } + }; + var binaryOptions = { + defaultType: PlainValue.Type.BLOCK_LITERAL, + lineWidth: 76 + }; + var boolOptions = { + trueStr: "true", + falseStr: "false" + }; + var intOptions = { + asBigInt: false + }; + var nullOptions = { + nullStr: "null" + }; + var strOptions = { + defaultType: PlainValue.Type.PLAIN, + doubleQuoted: { + jsonEncoding: false, + minMultiLineLength: 40 + }, + fold: { + lineWidth: 80, + minContentWidth: 20 + } + }; + function resolveScalar(str, tags, scalarFallback) { + for (const { + format, + test, + resolve + } of tags) { + if (test) { + const match = str.match(test); + if (match) { + let res = resolve.apply(null, match); + if (!(res instanceof Scalar)) res = new Scalar(res); + if (format) res.format = format; + return res; + } + } + } + if (scalarFallback) str = scalarFallback(str); + return new Scalar(str); + } + var FOLD_FLOW = "flow"; + var FOLD_BLOCK = "block"; + var FOLD_QUOTED = "quoted"; + var consumeMoreIndentedLines = (text, i) => { + let ch = text[i + 1]; + while (ch === " " || ch === " ") { + do { + ch = text[i += 1]; + } while (ch && ch !== "\n"); + ch = text[i + 1]; + } + return i; + }; + function foldFlowLines(text, indent, mode, { + indentAtStart, + lineWidth = 80, + minContentWidth = 20, + onFold, + onOverflow + }) { + if (!lineWidth || lineWidth < 0) return text; + const endStep = Math.max(1 + minContentWidth, 1 + lineWidth - indent.length); + if (text.length <= endStep) return text; + const folds = []; + const escapedFolds = {}; + let end = lineWidth - indent.length; + if (typeof indentAtStart === "number") { + if (indentAtStart > lineWidth - Math.max(2, minContentWidth)) folds.push(0); + else end = lineWidth - indentAtStart; + } + let split = void 0; + let prev = void 0; + let overflow = false; + let i = -1; + let escStart = -1; + let escEnd = -1; + if (mode === FOLD_BLOCK) { + i = consumeMoreIndentedLines(text, i); + if (i !== -1) end = i + endStep; + } + for (let ch; ch = text[i += 1]; ) { + if (mode === FOLD_QUOTED && ch === "\\") { + escStart = i; + switch (text[i + 1]) { + case "x": + i += 3; + break; + case "u": + i += 5; + break; + case "U": + i += 9; + break; + default: + i += 1; + } + escEnd = i; + } + if (ch === "\n") { + if (mode === FOLD_BLOCK) i = consumeMoreIndentedLines(text, i); + end = i + endStep; + split = void 0; + } else { + if (ch === " " && prev && prev !== " " && prev !== "\n" && prev !== " ") { + const next = text[i + 1]; + if (next && next !== " " && next !== "\n" && next !== " ") split = i; + } + if (i >= end) { + if (split) { + folds.push(split); + end = split + endStep; + split = void 0; + } else if (mode === FOLD_QUOTED) { + while (prev === " " || prev === " ") { + prev = ch; + ch = text[i += 1]; + overflow = true; + } + const j = i > escEnd + 1 ? i - 2 : escStart - 1; + if (escapedFolds[j]) return text; + folds.push(j); + escapedFolds[j] = true; + end = j + endStep; + split = void 0; + } else { + overflow = true; + } + } + } + prev = ch; + } + if (overflow && onOverflow) onOverflow(); + if (folds.length === 0) return text; + if (onFold) onFold(); + let res = text.slice(0, folds[0]); + for (let i2 = 0; i2 < folds.length; ++i2) { + const fold = folds[i2]; + const end2 = folds[i2 + 1] || text.length; + if (fold === 0) res = ` +${indent}${text.slice(0, end2)}`; + else { + if (mode === FOLD_QUOTED && escapedFolds[fold]) res += `${text[fold]}\\`; + res += ` +${indent}${text.slice(fold + 1, end2)}`; + } + } + return res; + } + var getFoldOptions = ({ + indentAtStart + }) => indentAtStart ? Object.assign({ + indentAtStart + }, strOptions.fold) : strOptions.fold; + var containsDocumentMarker = (str) => /^(%|---|\.\.\.)/m.test(str); + function lineLengthOverLimit(str, lineWidth, indentLength) { + if (!lineWidth || lineWidth < 0) return false; + const limit = lineWidth - indentLength; + const strLen = str.length; + if (strLen <= limit) return false; + for (let i = 0, start = 0; i < strLen; ++i) { + if (str[i] === "\n") { + if (i - start > limit) return true; + start = i + 1; + if (strLen - start <= limit) return false; + } + } + return true; + } + function doubleQuotedString(value, ctx) { + const { + implicitKey + } = ctx; + const { + jsonEncoding, + minMultiLineLength + } = strOptions.doubleQuoted; + const json = JSON.stringify(value); + if (jsonEncoding) return json; + const indent = ctx.indent || (containsDocumentMarker(value) ? " " : ""); + let str = ""; + let start = 0; + for (let i = 0, ch = json[i]; ch; ch = json[++i]) { + if (ch === " " && json[i + 1] === "\\" && json[i + 2] === "n") { + str += json.slice(start, i) + "\\ "; + i += 1; + start = i; + ch = "\\"; + } + if (ch === "\\") switch (json[i + 1]) { + case "u": + { + str += json.slice(start, i); + const code = json.substr(i + 2, 4); + switch (code) { + case "0000": + str += "\\0"; + break; + case "0007": + str += "\\a"; + break; + case "000b": + str += "\\v"; + break; + case "001b": + str += "\\e"; + break; + case "0085": + str += "\\N"; + break; + case "00a0": + str += "\\_"; + break; + case "2028": + str += "\\L"; + break; + case "2029": + str += "\\P"; + break; + default: + if (code.substr(0, 2) === "00") str += "\\x" + code.substr(2); + else str += json.substr(i, 6); + } + i += 5; + start = i + 1; + } + break; + case "n": + if (implicitKey || json[i + 2] === '"' || json.length < minMultiLineLength) { + i += 1; + } else { + str += json.slice(start, i) + "\n\n"; + while (json[i + 2] === "\\" && json[i + 3] === "n" && json[i + 4] !== '"') { + str += "\n"; + i += 2; + } + str += indent; + if (json[i + 2] === " ") str += "\\"; + i += 1; + start = i + 1; + } + break; + default: + i += 1; + } + } + str = start ? str + json.slice(start) : json; + return implicitKey ? str : foldFlowLines(str, indent, FOLD_QUOTED, getFoldOptions(ctx)); + } + function singleQuotedString(value, ctx) { + if (ctx.implicitKey) { + if (/\n/.test(value)) return doubleQuotedString(value, ctx); + } else { + if (/[ \t]\n|\n[ \t]/.test(value)) return doubleQuotedString(value, ctx); + } + const indent = ctx.indent || (containsDocumentMarker(value) ? " " : ""); + const res = "'" + value.replace(/'/g, "''").replace(/\n+/g, `$& +${indent}`) + "'"; + return ctx.implicitKey ? res : foldFlowLines(res, indent, FOLD_FLOW, getFoldOptions(ctx)); + } + function blockString({ + comment, + type, + value + }, ctx, onComment, onChompKeep) { + if (/\n[\t ]+$/.test(value) || /^\s*$/.test(value)) { + return doubleQuotedString(value, ctx); + } + const indent = ctx.indent || (ctx.forceBlockIndent || containsDocumentMarker(value) ? " " : ""); + const indentSize = indent ? "2" : "1"; + const literal = type === PlainValue.Type.BLOCK_FOLDED ? false : type === PlainValue.Type.BLOCK_LITERAL ? true : !lineLengthOverLimit(value, strOptions.fold.lineWidth, indent.length); + let header = literal ? "|" : ">"; + if (!value) return header + "\n"; + let wsStart = ""; + let wsEnd = ""; + value = value.replace(/[\n\t ]*$/, (ws) => { + const n = ws.indexOf("\n"); + if (n === -1) { + header += "-"; + } else if (value === ws || n !== ws.length - 1) { + header += "+"; + if (onChompKeep) onChompKeep(); + } + wsEnd = ws.replace(/\n$/, ""); + return ""; + }).replace(/^[\n ]*/, (ws) => { + if (ws.indexOf(" ") !== -1) header += indentSize; + const m = ws.match(/ +$/); + if (m) { + wsStart = ws.slice(0, -m[0].length); + return m[0]; + } else { + wsStart = ws; + return ""; + } + }); + if (wsEnd) wsEnd = wsEnd.replace(/\n+(?!\n|$)/g, `$&${indent}`); + if (wsStart) wsStart = wsStart.replace(/\n+/g, `$&${indent}`); + if (comment) { + header += " #" + comment.replace(/ ?[\r\n]+/g, " "); + if (onComment) onComment(); + } + if (!value) return `${header}${indentSize} +${indent}${wsEnd}`; + if (literal) { + value = value.replace(/\n+/g, `$&${indent}`); + return `${header} +${indent}${wsStart}${value}${wsEnd}`; + } + value = value.replace(/\n+/g, "\n$&").replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g, "$1$2").replace(/\n+/g, `$&${indent}`); + const body = foldFlowLines(`${wsStart}${value}${wsEnd}`, indent, FOLD_BLOCK, strOptions.fold); + return `${header} +${indent}${body}`; + } + function plainString(item, ctx, onComment, onChompKeep) { + const { + comment, + type, + value + } = item; + const { + actualString, + implicitKey, + indent, + inFlow + } = ctx; + if (implicitKey && /[\n[\]{},]/.test(value) || inFlow && /[[\]{},]/.test(value)) { + return doubleQuotedString(value, ctx); + } + if (!value || /^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(value)) { + return implicitKey || inFlow || value.indexOf("\n") === -1 ? value.indexOf('"') !== -1 && value.indexOf("'") === -1 ? singleQuotedString(value, ctx) : doubleQuotedString(value, ctx) : blockString(item, ctx, onComment, onChompKeep); + } + if (!implicitKey && !inFlow && type !== PlainValue.Type.PLAIN && value.indexOf("\n") !== -1) { + return blockString(item, ctx, onComment, onChompKeep); + } + if (indent === "" && containsDocumentMarker(value)) { + ctx.forceBlockIndent = true; + return blockString(item, ctx, onComment, onChompKeep); + } + const str = value.replace(/\n+/g, `$& +${indent}`); + if (actualString) { + const { + tags + } = ctx.doc.schema; + const resolved = resolveScalar(str, tags, tags.scalarFallback).value; + if (typeof resolved !== "string") return doubleQuotedString(value, ctx); + } + const body = implicitKey ? str : foldFlowLines(str, indent, FOLD_FLOW, getFoldOptions(ctx)); + if (comment && !inFlow && (body.indexOf("\n") !== -1 || comment.indexOf("\n") !== -1)) { + if (onComment) onComment(); + return addCommentBefore(body, indent, comment); + } + return body; + } + function stringifyString(item, ctx, onComment, onChompKeep) { + const { + defaultType + } = strOptions; + const { + implicitKey, + inFlow + } = ctx; + let { + type, + value + } = item; + if (typeof value !== "string") { + value = String(value); + item = Object.assign({}, item, { + value + }); + } + const _stringify = (_type) => { + switch (_type) { + case PlainValue.Type.BLOCK_FOLDED: + case PlainValue.Type.BLOCK_LITERAL: + return blockString(item, ctx, onComment, onChompKeep); + case PlainValue.Type.QUOTE_DOUBLE: + return doubleQuotedString(value, ctx); + case PlainValue.Type.QUOTE_SINGLE: + return singleQuotedString(value, ctx); + case PlainValue.Type.PLAIN: + return plainString(item, ctx, onComment, onChompKeep); + default: + return null; + } + }; + if (type !== PlainValue.Type.QUOTE_DOUBLE && /[\x00-\x08\x0b-\x1f\x7f-\x9f]/.test(value)) { + type = PlainValue.Type.QUOTE_DOUBLE; + } else if ((implicitKey || inFlow) && (type === PlainValue.Type.BLOCK_FOLDED || type === PlainValue.Type.BLOCK_LITERAL)) { + type = PlainValue.Type.QUOTE_DOUBLE; + } + let res = _stringify(type); + if (res === null) { + res = _stringify(defaultType); + if (res === null) throw new Error(`Unsupported default string type ${defaultType}`); + } + return res; + } + function stringifyNumber({ + format, + minFractionDigits, + tag, + value + }) { + if (typeof value === "bigint") return String(value); + if (!isFinite(value)) return isNaN(value) ? ".nan" : value < 0 ? "-.inf" : ".inf"; + let n = JSON.stringify(value); + if (!format && minFractionDigits && (!tag || tag === "tag:yaml.org,2002:float") && /^\d/.test(n)) { + let i = n.indexOf("."); + if (i < 0) { + i = n.length; + n += "."; + } + let d = minFractionDigits - (n.length - i - 1); + while (d-- > 0) n += "0"; + } + return n; + } + function checkFlowCollectionEnd(errors, cst) { + let char, name; + switch (cst.type) { + case PlainValue.Type.FLOW_MAP: + char = "}"; + name = "flow map"; + break; + case PlainValue.Type.FLOW_SEQ: + char = "]"; + name = "flow sequence"; + break; + default: + errors.push(new PlainValue.YAMLSemanticError(cst, "Not a flow collection!?")); + return; + } + let lastItem; + for (let i = cst.items.length - 1; i >= 0; --i) { + const item = cst.items[i]; + if (!item || item.type !== PlainValue.Type.COMMENT) { + lastItem = item; + break; + } + } + if (lastItem && lastItem.char !== char) { + const msg = `Expected ${name} to end with ${char}`; + let err; + if (typeof lastItem.offset === "number") { + err = new PlainValue.YAMLSemanticError(cst, msg); + err.offset = lastItem.offset + 1; + } else { + err = new PlainValue.YAMLSemanticError(lastItem, msg); + if (lastItem.range && lastItem.range.end) err.offset = lastItem.range.end - lastItem.range.start; + } + errors.push(err); + } + } + function checkFlowCommentSpace(errors, comment) { + const prev = comment.context.src[comment.range.start - 1]; + if (prev !== "\n" && prev !== " " && prev !== " ") { + const msg = "Comments must be separated from other tokens by white space characters"; + errors.push(new PlainValue.YAMLSemanticError(comment, msg)); + } + } + function getLongKeyError(source, key) { + const sk = String(key); + const k = sk.substr(0, 8) + "..." + sk.substr(-8); + return new PlainValue.YAMLSemanticError(source, `The "${k}" key is too long`); + } + function resolveComments(collection, comments) { + for (const { + afterKey, + before, + comment + } of comments) { + let item = collection.items[before]; + if (!item) { + if (comment !== void 0) { + if (collection.comment) collection.comment += "\n" + comment; + else collection.comment = comment; + } + } else { + if (afterKey && item.value) item = item.value; + if (comment === void 0) { + if (afterKey || !item.commentBefore) item.spaceBefore = true; + } else { + if (item.commentBefore) item.commentBefore += "\n" + comment; + else item.commentBefore = comment; + } + } + } + } + function resolveString(doc, node) { + const res = node.strValue; + if (!res) return ""; + if (typeof res === "string") return res; + res.errors.forEach((error) => { + if (!error.source) error.source = node; + doc.errors.push(error); + }); + return res.str; + } + function resolveTagHandle(doc, node) { + const { + handle, + suffix + } = node.tag; + let prefix = doc.tagPrefixes.find((p) => p.handle === handle); + if (!prefix) { + const dtp = doc.getDefaults().tagPrefixes; + if (dtp) prefix = dtp.find((p) => p.handle === handle); + if (!prefix) throw new PlainValue.YAMLSemanticError(node, `The ${handle} tag handle is non-default and was not declared.`); + } + if (!suffix) throw new PlainValue.YAMLSemanticError(node, `The ${handle} tag has no suffix.`); + if (handle === "!" && (doc.version || doc.options.version) === "1.0") { + if (suffix[0] === "^") { + doc.warnings.push(new PlainValue.YAMLWarning(node, "YAML 1.0 ^ tag expansion is not supported")); + return suffix; + } + if (/[:/]/.test(suffix)) { + const vocab = suffix.match(/^([a-z0-9-]+)\/(.*)/i); + return vocab ? `tag:${vocab[1]}.yaml.org,2002:${vocab[2]}` : `tag:${suffix}`; + } + } + return prefix.prefix + decodeURIComponent(suffix); + } + function resolveTagName(doc, node) { + const { + tag, + type + } = node; + let nonSpecific = false; + if (tag) { + const { + handle, + suffix, + verbatim + } = tag; + if (verbatim) { + if (verbatim !== "!" && verbatim !== "!!") return verbatim; + const msg = `Verbatim tags aren't resolved, so ${verbatim} is invalid.`; + doc.errors.push(new PlainValue.YAMLSemanticError(node, msg)); + } else if (handle === "!" && !suffix) { + nonSpecific = true; + } else { + try { + return resolveTagHandle(doc, node); + } catch (error) { + doc.errors.push(error); + } + } + } + switch (type) { + case PlainValue.Type.BLOCK_FOLDED: + case PlainValue.Type.BLOCK_LITERAL: + case PlainValue.Type.QUOTE_DOUBLE: + case PlainValue.Type.QUOTE_SINGLE: + return PlainValue.defaultTags.STR; + case PlainValue.Type.FLOW_MAP: + case PlainValue.Type.MAP: + return PlainValue.defaultTags.MAP; + case PlainValue.Type.FLOW_SEQ: + case PlainValue.Type.SEQ: + return PlainValue.defaultTags.SEQ; + case PlainValue.Type.PLAIN: + return nonSpecific ? PlainValue.defaultTags.STR : null; + default: + return null; + } + } + function resolveByTagName(doc, node, tagName) { + const { + tags + } = doc.schema; + const matchWithTest = []; + for (const tag of tags) { + if (tag.tag === tagName) { + if (tag.test) matchWithTest.push(tag); + else { + const res = tag.resolve(doc, node); + return res instanceof Collection ? res : new Scalar(res); + } + } + } + const str = resolveString(doc, node); + if (typeof str === "string" && matchWithTest.length > 0) return resolveScalar(str, matchWithTest, tags.scalarFallback); + return null; + } + function getFallbackTagName({ + type + }) { + switch (type) { + case PlainValue.Type.FLOW_MAP: + case PlainValue.Type.MAP: + return PlainValue.defaultTags.MAP; + case PlainValue.Type.FLOW_SEQ: + case PlainValue.Type.SEQ: + return PlainValue.defaultTags.SEQ; + default: + return PlainValue.defaultTags.STR; + } + } + function resolveTag(doc, node, tagName) { + try { + const res = resolveByTagName(doc, node, tagName); + if (res) { + if (tagName && node.tag) res.tag = tagName; + return res; + } + } catch (error) { + if (!error.source) error.source = node; + doc.errors.push(error); + return null; + } + try { + const fallback = getFallbackTagName(node); + if (!fallback) throw new Error(`The tag ${tagName} is unavailable`); + const msg = `The tag ${tagName} is unavailable, falling back to ${fallback}`; + doc.warnings.push(new PlainValue.YAMLWarning(node, msg)); + const res = resolveByTagName(doc, node, fallback); + res.tag = tagName; + return res; + } catch (error) { + const refError = new PlainValue.YAMLReferenceError(node, error.message); + refError.stack = error.stack; + doc.errors.push(refError); + return null; + } + } + var isCollectionItem = (node) => { + if (!node) return false; + const { + type + } = node; + return type === PlainValue.Type.MAP_KEY || type === PlainValue.Type.MAP_VALUE || type === PlainValue.Type.SEQ_ITEM; + }; + function resolveNodeProps(errors, node) { + const comments = { + before: [], + after: [] + }; + let hasAnchor = false; + let hasTag = false; + const props = isCollectionItem(node.context.parent) ? node.context.parent.props.concat(node.props) : node.props; + for (const { + start, + end + } of props) { + switch (node.context.src[start]) { + case PlainValue.Char.COMMENT: { + if (!node.commentHasRequiredWhitespace(start)) { + const msg = "Comments must be separated from other tokens by white space characters"; + errors.push(new PlainValue.YAMLSemanticError(node, msg)); + } + const { + header, + valueRange + } = node; + const cc = valueRange && (start > valueRange.start || header && start > header.start) ? comments.after : comments.before; + cc.push(node.context.src.slice(start + 1, end)); + break; + } + case PlainValue.Char.ANCHOR: + if (hasAnchor) { + const msg = "A node can have at most one anchor"; + errors.push(new PlainValue.YAMLSemanticError(node, msg)); + } + hasAnchor = true; + break; + case PlainValue.Char.TAG: + if (hasTag) { + const msg = "A node can have at most one tag"; + errors.push(new PlainValue.YAMLSemanticError(node, msg)); + } + hasTag = true; + break; + } + } + return { + comments, + hasAnchor, + hasTag + }; + } + function resolveNodeValue(doc, node) { + const { + anchors, + errors, + schema: schema2 + } = doc; + if (node.type === PlainValue.Type.ALIAS) { + const name = node.rawValue; + const src = anchors.getNode(name); + if (!src) { + const msg = `Aliased anchor not found: ${name}`; + errors.push(new PlainValue.YAMLReferenceError(node, msg)); + return null; + } + const res = new Alias(src); + anchors._cstAliases.push(res); + return res; + } + const tagName = resolveTagName(doc, node); + if (tagName) return resolveTag(doc, node, tagName); + if (node.type !== PlainValue.Type.PLAIN) { + const msg = `Failed to resolve ${node.type} node here`; + errors.push(new PlainValue.YAMLSyntaxError(node, msg)); + return null; + } + try { + const str = resolveString(doc, node); + return resolveScalar(str, schema2.tags, schema2.tags.scalarFallback); + } catch (error) { + if (!error.source) error.source = node; + errors.push(error); + return null; + } + } + function resolveNode(doc, node) { + if (!node) return null; + if (node.error) doc.errors.push(node.error); + const { + comments, + hasAnchor, + hasTag + } = resolveNodeProps(doc.errors, node); + if (hasAnchor) { + const { + anchors + } = doc; + const name = node.anchor; + const prev = anchors.getNode(name); + if (prev) anchors.map[anchors.newName(name)] = prev; + anchors.map[name] = node; + } + if (node.type === PlainValue.Type.ALIAS && (hasAnchor || hasTag)) { + const msg = "An alias node must not specify any properties"; + doc.errors.push(new PlainValue.YAMLSemanticError(node, msg)); + } + const res = resolveNodeValue(doc, node); + if (res) { + res.range = [node.range.start, node.range.end]; + if (doc.options.keepCstNodes) res.cstNode = node; + if (doc.options.keepNodeTypes) res.type = node.type; + const cb = comments.before.join("\n"); + if (cb) { + res.commentBefore = res.commentBefore ? `${res.commentBefore} +${cb}` : cb; + } + const ca = comments.after.join("\n"); + if (ca) res.comment = res.comment ? `${res.comment} +${ca}` : ca; + } + return node.resolved = res; + } + function resolveMap(doc, cst) { + if (cst.type !== PlainValue.Type.MAP && cst.type !== PlainValue.Type.FLOW_MAP) { + const msg = `A ${cst.type} node cannot be resolved as a mapping`; + doc.errors.push(new PlainValue.YAMLSyntaxError(cst, msg)); + return null; + } + const { + comments, + items + } = cst.type === PlainValue.Type.FLOW_MAP ? resolveFlowMapItems(doc, cst) : resolveBlockMapItems(doc, cst); + const map = new YAMLMap(); + map.items = items; + resolveComments(map, comments); + let hasCollectionKey = false; + for (let i = 0; i < items.length; ++i) { + const { + key: iKey + } = items[i]; + if (iKey instanceof Collection) hasCollectionKey = true; + if (doc.schema.merge && iKey && iKey.value === MERGE_KEY) { + items[i] = new Merge(items[i]); + const sources = items[i].value.items; + let error = null; + sources.some((node) => { + if (node instanceof Alias) { + const { + type + } = node.source; + if (type === PlainValue.Type.MAP || type === PlainValue.Type.FLOW_MAP) return false; + return error = "Merge nodes aliases can only point to maps"; + } + return error = "Merge nodes can only have Alias nodes as values"; + }); + if (error) doc.errors.push(new PlainValue.YAMLSemanticError(cst, error)); + } else { + for (let j = i + 1; j < items.length; ++j) { + const { + key: jKey + } = items[j]; + if (iKey === jKey || iKey && jKey && Object.prototype.hasOwnProperty.call(iKey, "value") && iKey.value === jKey.value) { + const msg = `Map keys must be unique; "${iKey}" is repeated`; + doc.errors.push(new PlainValue.YAMLSemanticError(cst, msg)); + break; + } + } + } + } + if (hasCollectionKey && !doc.options.mapAsMap) { + const warn = "Keys with collection values will be stringified as YAML due to JS Object restrictions. Use mapAsMap: true to avoid this."; + doc.warnings.push(new PlainValue.YAMLWarning(cst, warn)); + } + cst.resolved = map; + return map; + } + var valueHasPairComment = ({ + context: { + lineStart, + node, + src + }, + props + }) => { + if (props.length === 0) return false; + const { + start + } = props[0]; + if (node && start > node.valueRange.start) return false; + if (src[start] !== PlainValue.Char.COMMENT) return false; + for (let i = lineStart; i < start; ++i) if (src[i] === "\n") return false; + return true; + }; + function resolvePairComment(item, pair) { + if (!valueHasPairComment(item)) return; + const comment = item.getPropValue(0, PlainValue.Char.COMMENT, true); + let found = false; + const cb = pair.value.commentBefore; + if (cb && cb.startsWith(comment)) { + pair.value.commentBefore = cb.substr(comment.length + 1); + found = true; + } else { + const cc = pair.value.comment; + if (!item.node && cc && cc.startsWith(comment)) { + pair.value.comment = cc.substr(comment.length + 1); + found = true; + } + } + if (found) pair.comment = comment; + } + function resolveBlockMapItems(doc, cst) { + const comments = []; + const items = []; + let key = void 0; + let keyStart = null; + for (let i = 0; i < cst.items.length; ++i) { + const item = cst.items[i]; + switch (item.type) { + case PlainValue.Type.BLANK_LINE: + comments.push({ + afterKey: !!key, + before: items.length + }); + break; + case PlainValue.Type.COMMENT: + comments.push({ + afterKey: !!key, + before: items.length, + comment: item.comment + }); + break; + case PlainValue.Type.MAP_KEY: + if (key !== void 0) items.push(new Pair(key)); + if (item.error) doc.errors.push(item.error); + key = resolveNode(doc, item.node); + keyStart = null; + break; + case PlainValue.Type.MAP_VALUE: + { + if (key === void 0) key = null; + if (item.error) doc.errors.push(item.error); + if (!item.context.atLineStart && item.node && item.node.type === PlainValue.Type.MAP && !item.node.context.atLineStart) { + const msg = "Nested mappings are not allowed in compact mappings"; + doc.errors.push(new PlainValue.YAMLSemanticError(item.node, msg)); + } + let valueNode = item.node; + if (!valueNode && item.props.length > 0) { + valueNode = new PlainValue.PlainValue(PlainValue.Type.PLAIN, []); + valueNode.context = { + parent: item, + src: item.context.src + }; + const pos = item.range.start + 1; + valueNode.range = { + start: pos, + end: pos + }; + valueNode.valueRange = { + start: pos, + end: pos + }; + if (typeof item.range.origStart === "number") { + const origPos = item.range.origStart + 1; + valueNode.range.origStart = valueNode.range.origEnd = origPos; + valueNode.valueRange.origStart = valueNode.valueRange.origEnd = origPos; + } + } + const pair = new Pair(key, resolveNode(doc, valueNode)); + resolvePairComment(item, pair); + items.push(pair); + if (key && typeof keyStart === "number") { + if (item.range.start > keyStart + 1024) doc.errors.push(getLongKeyError(cst, key)); + } + key = void 0; + keyStart = null; + } + break; + default: + if (key !== void 0) items.push(new Pair(key)); + key = resolveNode(doc, item); + keyStart = item.range.start; + if (item.error) doc.errors.push(item.error); + next: for (let j = i + 1; ; ++j) { + const nextItem = cst.items[j]; + switch (nextItem && nextItem.type) { + case PlainValue.Type.BLANK_LINE: + case PlainValue.Type.COMMENT: + continue next; + case PlainValue.Type.MAP_VALUE: + break next; + default: { + const msg = "Implicit map keys need to be followed by map values"; + doc.errors.push(new PlainValue.YAMLSemanticError(item, msg)); + break next; + } + } + } + if (item.valueRangeContainsNewline) { + const msg = "Implicit map keys need to be on a single line"; + doc.errors.push(new PlainValue.YAMLSemanticError(item, msg)); + } + } + } + if (key !== void 0) items.push(new Pair(key)); + return { + comments, + items + }; + } + function resolveFlowMapItems(doc, cst) { + const comments = []; + const items = []; + let key = void 0; + let explicitKey = false; + let next = "{"; + for (let i = 0; i < cst.items.length; ++i) { + const item = cst.items[i]; + if (typeof item.char === "string") { + const { + char, + offset + } = item; + if (char === "?" && key === void 0 && !explicitKey) { + explicitKey = true; + next = ":"; + continue; + } + if (char === ":") { + if (key === void 0) key = null; + if (next === ":") { + next = ","; + continue; + } + } else { + if (explicitKey) { + if (key === void 0 && char !== ",") key = null; + explicitKey = false; + } + if (key !== void 0) { + items.push(new Pair(key)); + key = void 0; + if (char === ",") { + next = ":"; + continue; + } + } + } + if (char === "}") { + if (i === cst.items.length - 1) continue; + } else if (char === next) { + next = ":"; + continue; + } + const msg = `Flow map contains an unexpected ${char}`; + const err = new PlainValue.YAMLSyntaxError(cst, msg); + err.offset = offset; + doc.errors.push(err); + } else if (item.type === PlainValue.Type.BLANK_LINE) { + comments.push({ + afterKey: !!key, + before: items.length + }); + } else if (item.type === PlainValue.Type.COMMENT) { + checkFlowCommentSpace(doc.errors, item); + comments.push({ + afterKey: !!key, + before: items.length, + comment: item.comment + }); + } else if (key === void 0) { + if (next === ",") doc.errors.push(new PlainValue.YAMLSemanticError(item, "Separator , missing in flow map")); + key = resolveNode(doc, item); + } else { + if (next !== ",") doc.errors.push(new PlainValue.YAMLSemanticError(item, "Indicator : missing in flow map entry")); + items.push(new Pair(key, resolveNode(doc, item))); + key = void 0; + explicitKey = false; + } + } + checkFlowCollectionEnd(doc.errors, cst); + if (key !== void 0) items.push(new Pair(key)); + return { + comments, + items + }; + } + function resolveSeq(doc, cst) { + if (cst.type !== PlainValue.Type.SEQ && cst.type !== PlainValue.Type.FLOW_SEQ) { + const msg = `A ${cst.type} node cannot be resolved as a sequence`; + doc.errors.push(new PlainValue.YAMLSyntaxError(cst, msg)); + return null; + } + const { + comments, + items + } = cst.type === PlainValue.Type.FLOW_SEQ ? resolveFlowSeqItems(doc, cst) : resolveBlockSeqItems(doc, cst); + const seq = new YAMLSeq(); + seq.items = items; + resolveComments(seq, comments); + if (!doc.options.mapAsMap && items.some((it) => it instanceof Pair && it.key instanceof Collection)) { + const warn = "Keys with collection values will be stringified as YAML due to JS Object restrictions. Use mapAsMap: true to avoid this."; + doc.warnings.push(new PlainValue.YAMLWarning(cst, warn)); + } + cst.resolved = seq; + return seq; + } + function resolveBlockSeqItems(doc, cst) { + const comments = []; + const items = []; + for (let i = 0; i < cst.items.length; ++i) { + const item = cst.items[i]; + switch (item.type) { + case PlainValue.Type.BLANK_LINE: + comments.push({ + before: items.length + }); + break; + case PlainValue.Type.COMMENT: + comments.push({ + comment: item.comment, + before: items.length + }); + break; + case PlainValue.Type.SEQ_ITEM: + if (item.error) doc.errors.push(item.error); + items.push(resolveNode(doc, item.node)); + if (item.hasProps) { + const msg = "Sequence items cannot have tags or anchors before the - indicator"; + doc.errors.push(new PlainValue.YAMLSemanticError(item, msg)); + } + break; + default: + if (item.error) doc.errors.push(item.error); + doc.errors.push(new PlainValue.YAMLSyntaxError(item, `Unexpected ${item.type} node in sequence`)); + } + } + return { + comments, + items + }; + } + function resolveFlowSeqItems(doc, cst) { + const comments = []; + const items = []; + let explicitKey = false; + let key = void 0; + let keyStart = null; + let next = "["; + let prevItem = null; + for (let i = 0; i < cst.items.length; ++i) { + const item = cst.items[i]; + if (typeof item.char === "string") { + const { + char, + offset + } = item; + if (char !== ":" && (explicitKey || key !== void 0)) { + if (explicitKey && key === void 0) key = next ? items.pop() : null; + items.push(new Pair(key)); + explicitKey = false; + key = void 0; + keyStart = null; + } + if (char === next) { + next = null; + } else if (!next && char === "?") { + explicitKey = true; + } else if (next !== "[" && char === ":" && key === void 0) { + if (next === ",") { + key = items.pop(); + if (key instanceof Pair) { + const msg = "Chaining flow sequence pairs is invalid"; + const err = new PlainValue.YAMLSemanticError(cst, msg); + err.offset = offset; + doc.errors.push(err); + } + if (!explicitKey && typeof keyStart === "number") { + const keyEnd = item.range ? item.range.start : item.offset; + if (keyEnd > keyStart + 1024) doc.errors.push(getLongKeyError(cst, key)); + const { + src + } = prevItem.context; + for (let i2 = keyStart; i2 < keyEnd; ++i2) if (src[i2] === "\n") { + const msg = "Implicit keys of flow sequence pairs need to be on a single line"; + doc.errors.push(new PlainValue.YAMLSemanticError(prevItem, msg)); + break; + } + } + } else { + key = null; + } + keyStart = null; + explicitKey = false; + next = null; + } else if (next === "[" || char !== "]" || i < cst.items.length - 1) { + const msg = `Flow sequence contains an unexpected ${char}`; + const err = new PlainValue.YAMLSyntaxError(cst, msg); + err.offset = offset; + doc.errors.push(err); + } + } else if (item.type === PlainValue.Type.BLANK_LINE) { + comments.push({ + before: items.length + }); + } else if (item.type === PlainValue.Type.COMMENT) { + checkFlowCommentSpace(doc.errors, item); + comments.push({ + comment: item.comment, + before: items.length + }); + } else { + if (next) { + const msg = `Expected a ${next} in flow sequence`; + doc.errors.push(new PlainValue.YAMLSemanticError(item, msg)); + } + const value = resolveNode(doc, item); + if (key === void 0) { + items.push(value); + prevItem = item; + } else { + items.push(new Pair(key, value)); + key = void 0; + } + keyStart = item.range.start; + next = ","; + } + } + checkFlowCollectionEnd(doc.errors, cst); + if (key !== void 0) items.push(new Pair(key)); + return { + comments, + items + }; + } + exports2.Alias = Alias; + exports2.Collection = Collection; + exports2.Merge = Merge; + exports2.Node = Node; + exports2.Pair = Pair; + exports2.Scalar = Scalar; + exports2.YAMLMap = YAMLMap; + exports2.YAMLSeq = YAMLSeq; + exports2.addComment = addComment; + exports2.binaryOptions = binaryOptions; + exports2.boolOptions = boolOptions; + exports2.findPair = findPair; + exports2.intOptions = intOptions; + exports2.isEmptyPath = isEmptyPath; + exports2.nullOptions = nullOptions; + exports2.resolveMap = resolveMap; + exports2.resolveNode = resolveNode; + exports2.resolveSeq = resolveSeq; + exports2.resolveString = resolveString; + exports2.strOptions = strOptions; + exports2.stringifyNumber = stringifyNumber; + exports2.stringifyString = stringifyString; + exports2.toJSON = toJSON; + } +}); + +// ../../node_modules/oas-resolver/node_modules/yaml/dist/warnings-1000a372.js +var require_warnings_1000a3724 = __commonJS({ + "../../node_modules/oas-resolver/node_modules/yaml/dist/warnings-1000a372.js"(exports2) { + "use strict"; + var PlainValue = require_PlainValue_ec8e588e4(); + var resolveSeq = require_resolveSeq_d03cb0374(); + var binary = { + identify: (value) => value instanceof Uint8Array, + // Buffer inherits from Uint8Array + default: false, + tag: "tag:yaml.org,2002:binary", + /** + * Returns a Buffer in node and an Uint8Array in browsers + * + * To use the resulting buffer as an image, you'll want to do something like: + * + * const blob = new Blob([buffer], { type: 'image/jpeg' }) + * document.querySelector('#photo').src = URL.createObjectURL(blob) + */ + resolve: (doc, node) => { + const src = resolveSeq.resolveString(doc, node); + if (typeof Buffer === "function") { + return Buffer.from(src, "base64"); + } else if (typeof atob === "function") { + const str = atob(src.replace(/[\n\r]/g, "")); + const buffer = new Uint8Array(str.length); + for (let i = 0; i < str.length; ++i) buffer[i] = str.charCodeAt(i); + return buffer; + } else { + const msg = "This environment does not support reading binary tags; either Buffer or atob is required"; + doc.errors.push(new PlainValue.YAMLReferenceError(node, msg)); + return null; + } + }, + options: resolveSeq.binaryOptions, + stringify: ({ + comment, + type, + value + }, ctx, onComment, onChompKeep) => { + let src; + if (typeof Buffer === "function") { + src = value instanceof Buffer ? value.toString("base64") : Buffer.from(value.buffer).toString("base64"); + } else if (typeof btoa === "function") { + let s = ""; + for (let i = 0; i < value.length; ++i) s += String.fromCharCode(value[i]); + src = btoa(s); + } else { + throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required"); + } + if (!type) type = resolveSeq.binaryOptions.defaultType; + if (type === PlainValue.Type.QUOTE_DOUBLE) { + value = src; + } else { + const { + lineWidth + } = resolveSeq.binaryOptions; + const n = Math.ceil(src.length / lineWidth); + const lines = new Array(n); + for (let i = 0, o = 0; i < n; ++i, o += lineWidth) { + lines[i] = src.substr(o, lineWidth); + } + value = lines.join(type === PlainValue.Type.BLOCK_LITERAL ? "\n" : " "); + } + return resolveSeq.stringifyString({ + comment, + type, + value + }, ctx, onComment, onChompKeep); + } + }; + function parsePairs(doc, cst) { + const seq = resolveSeq.resolveSeq(doc, cst); + for (let i = 0; i < seq.items.length; ++i) { + let item = seq.items[i]; + if (item instanceof resolveSeq.Pair) continue; + else if (item instanceof resolveSeq.YAMLMap) { + if (item.items.length > 1) { + const msg = "Each pair must have its own sequence indicator"; + throw new PlainValue.YAMLSemanticError(cst, msg); + } + const pair = item.items[0] || new resolveSeq.Pair(); + if (item.commentBefore) pair.commentBefore = pair.commentBefore ? `${item.commentBefore} +${pair.commentBefore}` : item.commentBefore; + if (item.comment) pair.comment = pair.comment ? `${item.comment} +${pair.comment}` : item.comment; + item = pair; + } + seq.items[i] = item instanceof resolveSeq.Pair ? item : new resolveSeq.Pair(item); + } + return seq; + } + function createPairs(schema2, iterable, ctx) { + const pairs2 = new resolveSeq.YAMLSeq(schema2); + pairs2.tag = "tag:yaml.org,2002:pairs"; + for (const it of iterable) { + let key, value; + if (Array.isArray(it)) { + if (it.length === 2) { + key = it[0]; + value = it[1]; + } else throw new TypeError(`Expected [key, value] tuple: ${it}`); + } else if (it && it instanceof Object) { + const keys = Object.keys(it); + if (keys.length === 1) { + key = keys[0]; + value = it[key]; + } else throw new TypeError(`Expected { key: value } tuple: ${it}`); + } else { + key = it; + } + const pair = schema2.createPair(key, value, ctx); + pairs2.items.push(pair); + } + return pairs2; + } + var pairs = { + default: false, + tag: "tag:yaml.org,2002:pairs", + resolve: parsePairs, + createNode: createPairs + }; + var YAMLOMap = class _YAMLOMap extends resolveSeq.YAMLSeq { + constructor() { + super(); + PlainValue._defineProperty(this, "add", resolveSeq.YAMLMap.prototype.add.bind(this)); + PlainValue._defineProperty(this, "delete", resolveSeq.YAMLMap.prototype.delete.bind(this)); + PlainValue._defineProperty(this, "get", resolveSeq.YAMLMap.prototype.get.bind(this)); + PlainValue._defineProperty(this, "has", resolveSeq.YAMLMap.prototype.has.bind(this)); + PlainValue._defineProperty(this, "set", resolveSeq.YAMLMap.prototype.set.bind(this)); + this.tag = _YAMLOMap.tag; + } + toJSON(_2, ctx) { + const map = /* @__PURE__ */ new Map(); + if (ctx && ctx.onCreate) ctx.onCreate(map); + for (const pair of this.items) { + let key, value; + if (pair instanceof resolveSeq.Pair) { + key = resolveSeq.toJSON(pair.key, "", ctx); + value = resolveSeq.toJSON(pair.value, key, ctx); + } else { + key = resolveSeq.toJSON(pair, "", ctx); + } + if (map.has(key)) throw new Error("Ordered maps must not include duplicate keys"); + map.set(key, value); + } + return map; + } + }; + PlainValue._defineProperty(YAMLOMap, "tag", "tag:yaml.org,2002:omap"); + function parseOMap(doc, cst) { + const pairs2 = parsePairs(doc, cst); + const seenKeys = []; + for (const { + key + } of pairs2.items) { + if (key instanceof resolveSeq.Scalar) { + if (seenKeys.includes(key.value)) { + const msg = "Ordered maps must not include duplicate keys"; + throw new PlainValue.YAMLSemanticError(cst, msg); + } else { + seenKeys.push(key.value); + } + } + } + return Object.assign(new YAMLOMap(), pairs2); + } + function createOMap(schema2, iterable, ctx) { + const pairs2 = createPairs(schema2, iterable, ctx); + const omap2 = new YAMLOMap(); + omap2.items = pairs2.items; + return omap2; + } + var omap = { + identify: (value) => value instanceof Map, + nodeClass: YAMLOMap, + default: false, + tag: "tag:yaml.org,2002:omap", + resolve: parseOMap, + createNode: createOMap + }; + var YAMLSet = class _YAMLSet extends resolveSeq.YAMLMap { + constructor() { + super(); + this.tag = _YAMLSet.tag; + } + add(key) { + const pair = key instanceof resolveSeq.Pair ? key : new resolveSeq.Pair(key); + const prev = resolveSeq.findPair(this.items, pair.key); + if (!prev) this.items.push(pair); + } + get(key, keepPair) { + const pair = resolveSeq.findPair(this.items, key); + return !keepPair && pair instanceof resolveSeq.Pair ? pair.key instanceof resolveSeq.Scalar ? pair.key.value : pair.key : pair; + } + set(key, value) { + if (typeof value !== "boolean") throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof value}`); + const prev = resolveSeq.findPair(this.items, key); + if (prev && !value) { + this.items.splice(this.items.indexOf(prev), 1); + } else if (!prev && value) { + this.items.push(new resolveSeq.Pair(key)); + } + } + toJSON(_2, ctx) { + return super.toJSON(_2, ctx, Set); + } + toString(ctx, onComment, onChompKeep) { + if (!ctx) return JSON.stringify(this); + if (this.hasAllNullValues()) return super.toString(ctx, onComment, onChompKeep); + else throw new Error("Set items must all have null values"); + } + }; + PlainValue._defineProperty(YAMLSet, "tag", "tag:yaml.org,2002:set"); + function parseSet(doc, cst) { + const map = resolveSeq.resolveMap(doc, cst); + if (!map.hasAllNullValues()) throw new PlainValue.YAMLSemanticError(cst, "Set items must all have null values"); + return Object.assign(new YAMLSet(), map); + } + function createSet(schema2, iterable, ctx) { + const set2 = new YAMLSet(); + for (const value of iterable) set2.items.push(schema2.createPair(value, null, ctx)); + return set2; + } + var set = { + identify: (value) => value instanceof Set, + nodeClass: YAMLSet, + default: false, + tag: "tag:yaml.org,2002:set", + resolve: parseSet, + createNode: createSet + }; + var parseSexagesimal = (sign, parts) => { + const n = parts.split(":").reduce((n2, p) => n2 * 60 + Number(p), 0); + return sign === "-" ? -n : n; + }; + var stringifySexagesimal = ({ + value + }) => { + if (isNaN(value) || !isFinite(value)) return resolveSeq.stringifyNumber(value); + let sign = ""; + if (value < 0) { + sign = "-"; + value = Math.abs(value); + } + const parts = [value % 60]; + if (value < 60) { + parts.unshift(0); + } else { + value = Math.round((value - parts[0]) / 60); + parts.unshift(value % 60); + if (value >= 60) { + value = Math.round((value - parts[0]) / 60); + parts.unshift(value); + } + } + return sign + parts.map((n) => n < 10 ? "0" + String(n) : String(n)).join(":").replace(/000000\d*$/, ""); + }; + var intTime = { + identify: (value) => typeof value === "number", + default: true, + tag: "tag:yaml.org,2002:int", + format: "TIME", + test: /^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+)$/, + resolve: (str, sign, parts) => parseSexagesimal(sign, parts.replace(/_/g, "")), + stringify: stringifySexagesimal + }; + var floatTime = { + identify: (value) => typeof value === "number", + default: true, + tag: "tag:yaml.org,2002:float", + format: "TIME", + test: /^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*)$/, + resolve: (str, sign, parts) => parseSexagesimal(sign, parts.replace(/_/g, "")), + stringify: stringifySexagesimal + }; + var timestamp = { + identify: (value) => value instanceof Date, + default: true, + tag: "tag:yaml.org,2002:timestamp", + // If the time zone is omitted, the timestamp is assumed to be specified in UTC. The time part + // may be omitted altogether, resulting in a date format. In such a case, the time part is + // assumed to be 00:00:00Z (start of day, UTC). + test: RegExp("^(?:([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?)$"), + resolve: (str, year, month, day, hour, minute, second, millisec, tz) => { + if (millisec) millisec = (millisec + "00").substr(1, 3); + let date = Date.UTC(year, month - 1, day, hour || 0, minute || 0, second || 0, millisec || 0); + if (tz && tz !== "Z") { + let d = parseSexagesimal(tz[0], tz.slice(1)); + if (Math.abs(d) < 30) d *= 60; + date -= 6e4 * d; + } + return new Date(date); + }, + stringify: ({ + value + }) => value.toISOString().replace(/((T00:00)?:00)?\.000Z$/, "") + }; + function shouldWarn(deprecation) { + const env = typeof process !== "undefined" && process.env || {}; + if (deprecation) { + if (typeof YAML_SILENCE_DEPRECATION_WARNINGS !== "undefined") return !YAML_SILENCE_DEPRECATION_WARNINGS; + return !env.YAML_SILENCE_DEPRECATION_WARNINGS; + } + if (typeof YAML_SILENCE_WARNINGS !== "undefined") return !YAML_SILENCE_WARNINGS; + return !env.YAML_SILENCE_WARNINGS; + } + function warn(warning, type) { + if (shouldWarn(false)) { + const emit = typeof process !== "undefined" && process.emitWarning; + if (emit) emit(warning, type); + else { + console.warn(type ? `${type}: ${warning}` : warning); + } + } + } + function warnFileDeprecation(filename) { + if (shouldWarn(true)) { + const path = filename.replace(/.*yaml[/\\]/i, "").replace(/\.js$/, "").replace(/\\/g, "/"); + warn(`The endpoint 'yaml/${path}' will be removed in a future release.`, "DeprecationWarning"); + } + } + var warned = {}; + function warnOptionDeprecation(name, alternative) { + if (!warned[name] && shouldWarn(true)) { + warned[name] = true; + let msg = `The option '${name}' will be removed in a future release`; + msg += alternative ? `, use '${alternative}' instead.` : "."; + warn(msg, "DeprecationWarning"); + } + } + exports2.binary = binary; + exports2.floatTime = floatTime; + exports2.intTime = intTime; + exports2.omap = omap; + exports2.pairs = pairs; + exports2.set = set; + exports2.timestamp = timestamp; + exports2.warn = warn; + exports2.warnFileDeprecation = warnFileDeprecation; + exports2.warnOptionDeprecation = warnOptionDeprecation; + } +}); + +// ../../node_modules/oas-resolver/node_modules/yaml/dist/Schema-88e323a7.js +var require_Schema_88e323a74 = __commonJS({ + "../../node_modules/oas-resolver/node_modules/yaml/dist/Schema-88e323a7.js"(exports2) { + "use strict"; + var PlainValue = require_PlainValue_ec8e588e4(); + var resolveSeq = require_resolveSeq_d03cb0374(); + var warnings = require_warnings_1000a3724(); + function createMap(schema2, obj, ctx) { + const map2 = new resolveSeq.YAMLMap(schema2); + if (obj instanceof Map) { + for (const [key, value] of obj) map2.items.push(schema2.createPair(key, value, ctx)); + } else if (obj && typeof obj === "object") { + for (const key of Object.keys(obj)) map2.items.push(schema2.createPair(key, obj[key], ctx)); + } + if (typeof schema2.sortMapEntries === "function") { + map2.items.sort(schema2.sortMapEntries); + } + return map2; + } + var map = { + createNode: createMap, + default: true, + nodeClass: resolveSeq.YAMLMap, + tag: "tag:yaml.org,2002:map", + resolve: resolveSeq.resolveMap + }; + function createSeq(schema2, obj, ctx) { + const seq2 = new resolveSeq.YAMLSeq(schema2); + if (obj && obj[Symbol.iterator]) { + for (const it of obj) { + const v = schema2.createNode(it, ctx.wrapScalars, null, ctx); + seq2.items.push(v); + } + } + return seq2; + } + var seq = { + createNode: createSeq, + default: true, + nodeClass: resolveSeq.YAMLSeq, + tag: "tag:yaml.org,2002:seq", + resolve: resolveSeq.resolveSeq + }; + var string = { + identify: (value) => typeof value === "string", + default: true, + tag: "tag:yaml.org,2002:str", + resolve: resolveSeq.resolveString, + stringify(item, ctx, onComment, onChompKeep) { + ctx = Object.assign({ + actualString: true + }, ctx); + return resolveSeq.stringifyString(item, ctx, onComment, onChompKeep); + }, + options: resolveSeq.strOptions + }; + var failsafe = [map, seq, string]; + var intIdentify$2 = (value) => typeof value === "bigint" || Number.isInteger(value); + var intResolve$1 = (src, part, radix) => resolveSeq.intOptions.asBigInt ? BigInt(src) : parseInt(part, radix); + function intStringify$1(node, radix, prefix) { + const { + value + } = node; + if (intIdentify$2(value) && value >= 0) return prefix + value.toString(radix); + return resolveSeq.stringifyNumber(node); + } + var nullObj = { + identify: (value) => value == null, + createNode: (schema2, value, ctx) => ctx.wrapScalars ? new resolveSeq.Scalar(null) : null, + default: true, + tag: "tag:yaml.org,2002:null", + test: /^(?:~|[Nn]ull|NULL)?$/, + resolve: () => null, + options: resolveSeq.nullOptions, + stringify: () => resolveSeq.nullOptions.nullStr + }; + var boolObj = { + identify: (value) => typeof value === "boolean", + default: true, + tag: "tag:yaml.org,2002:bool", + test: /^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/, + resolve: (str) => str[0] === "t" || str[0] === "T", + options: resolveSeq.boolOptions, + stringify: ({ + value + }) => value ? resolveSeq.boolOptions.trueStr : resolveSeq.boolOptions.falseStr + }; + var octObj = { + identify: (value) => intIdentify$2(value) && value >= 0, + default: true, + tag: "tag:yaml.org,2002:int", + format: "OCT", + test: /^0o([0-7]+)$/, + resolve: (str, oct) => intResolve$1(str, oct, 8), + options: resolveSeq.intOptions, + stringify: (node) => intStringify$1(node, 8, "0o") + }; + var intObj = { + identify: intIdentify$2, + default: true, + tag: "tag:yaml.org,2002:int", + test: /^[-+]?[0-9]+$/, + resolve: (str) => intResolve$1(str, str, 10), + options: resolveSeq.intOptions, + stringify: resolveSeq.stringifyNumber + }; + var hexObj = { + identify: (value) => intIdentify$2(value) && value >= 0, + default: true, + tag: "tag:yaml.org,2002:int", + format: "HEX", + test: /^0x([0-9a-fA-F]+)$/, + resolve: (str, hex) => intResolve$1(str, hex, 16), + options: resolveSeq.intOptions, + stringify: (node) => intStringify$1(node, 16, "0x") + }; + var nanObj = { + identify: (value) => typeof value === "number", + default: true, + tag: "tag:yaml.org,2002:float", + test: /^(?:[-+]?\.inf|(\.nan))$/i, + resolve: (str, nan) => nan ? NaN : str[0] === "-" ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY, + stringify: resolveSeq.stringifyNumber + }; + var expObj = { + identify: (value) => typeof value === "number", + default: true, + tag: "tag:yaml.org,2002:float", + format: "EXP", + test: /^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/, + resolve: (str) => parseFloat(str), + stringify: ({ + value + }) => Number(value).toExponential() + }; + var floatObj = { + identify: (value) => typeof value === "number", + default: true, + tag: "tag:yaml.org,2002:float", + test: /^[-+]?(?:\.([0-9]+)|[0-9]+\.([0-9]*))$/, + resolve(str, frac1, frac2) { + const frac = frac1 || frac2; + const node = new resolveSeq.Scalar(parseFloat(str)); + if (frac && frac[frac.length - 1] === "0") node.minFractionDigits = frac.length; + return node; + }, + stringify: resolveSeq.stringifyNumber + }; + var core = failsafe.concat([nullObj, boolObj, octObj, intObj, hexObj, nanObj, expObj, floatObj]); + var intIdentify$1 = (value) => typeof value === "bigint" || Number.isInteger(value); + var stringifyJSON = ({ + value + }) => JSON.stringify(value); + var json = [map, seq, { + identify: (value) => typeof value === "string", + default: true, + tag: "tag:yaml.org,2002:str", + resolve: resolveSeq.resolveString, + stringify: stringifyJSON + }, { + identify: (value) => value == null, + createNode: (schema2, value, ctx) => ctx.wrapScalars ? new resolveSeq.Scalar(null) : null, + default: true, + tag: "tag:yaml.org,2002:null", + test: /^null$/, + resolve: () => null, + stringify: stringifyJSON + }, { + identify: (value) => typeof value === "boolean", + default: true, + tag: "tag:yaml.org,2002:bool", + test: /^true|false$/, + resolve: (str) => str === "true", + stringify: stringifyJSON + }, { + identify: intIdentify$1, + default: true, + tag: "tag:yaml.org,2002:int", + test: /^-?(?:0|[1-9][0-9]*)$/, + resolve: (str) => resolveSeq.intOptions.asBigInt ? BigInt(str) : parseInt(str, 10), + stringify: ({ + value + }) => intIdentify$1(value) ? value.toString() : JSON.stringify(value) + }, { + identify: (value) => typeof value === "number", + default: true, + tag: "tag:yaml.org,2002:float", + test: /^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/, + resolve: (str) => parseFloat(str), + stringify: stringifyJSON + }]; + json.scalarFallback = (str) => { + throw new SyntaxError(`Unresolved plain scalar ${JSON.stringify(str)}`); + }; + var boolStringify = ({ + value + }) => value ? resolveSeq.boolOptions.trueStr : resolveSeq.boolOptions.falseStr; + var intIdentify = (value) => typeof value === "bigint" || Number.isInteger(value); + function intResolve(sign, src, radix) { + let str = src.replace(/_/g, ""); + if (resolveSeq.intOptions.asBigInt) { + switch (radix) { + case 2: + str = `0b${str}`; + break; + case 8: + str = `0o${str}`; + break; + case 16: + str = `0x${str}`; + break; + } + const n2 = BigInt(str); + return sign === "-" ? BigInt(-1) * n2 : n2; + } + const n = parseInt(str, radix); + return sign === "-" ? -1 * n : n; + } + function intStringify(node, radix, prefix) { + const { + value + } = node; + if (intIdentify(value)) { + const str = value.toString(radix); + return value < 0 ? "-" + prefix + str.substr(1) : prefix + str; + } + return resolveSeq.stringifyNumber(node); + } + var yaml11 = failsafe.concat([{ + identify: (value) => value == null, + createNode: (schema2, value, ctx) => ctx.wrapScalars ? new resolveSeq.Scalar(null) : null, + default: true, + tag: "tag:yaml.org,2002:null", + test: /^(?:~|[Nn]ull|NULL)?$/, + resolve: () => null, + options: resolveSeq.nullOptions, + stringify: () => resolveSeq.nullOptions.nullStr + }, { + identify: (value) => typeof value === "boolean", + default: true, + tag: "tag:yaml.org,2002:bool", + test: /^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/, + resolve: () => true, + options: resolveSeq.boolOptions, + stringify: boolStringify + }, { + identify: (value) => typeof value === "boolean", + default: true, + tag: "tag:yaml.org,2002:bool", + test: /^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/i, + resolve: () => false, + options: resolveSeq.boolOptions, + stringify: boolStringify + }, { + identify: intIdentify, + default: true, + tag: "tag:yaml.org,2002:int", + format: "BIN", + test: /^([-+]?)0b([0-1_]+)$/, + resolve: (str, sign, bin) => intResolve(sign, bin, 2), + stringify: (node) => intStringify(node, 2, "0b") + }, { + identify: intIdentify, + default: true, + tag: "tag:yaml.org,2002:int", + format: "OCT", + test: /^([-+]?)0([0-7_]+)$/, + resolve: (str, sign, oct) => intResolve(sign, oct, 8), + stringify: (node) => intStringify(node, 8, "0") + }, { + identify: intIdentify, + default: true, + tag: "tag:yaml.org,2002:int", + test: /^([-+]?)([0-9][0-9_]*)$/, + resolve: (str, sign, abs) => intResolve(sign, abs, 10), + stringify: resolveSeq.stringifyNumber + }, { + identify: intIdentify, + default: true, + tag: "tag:yaml.org,2002:int", + format: "HEX", + test: /^([-+]?)0x([0-9a-fA-F_]+)$/, + resolve: (str, sign, hex) => intResolve(sign, hex, 16), + stringify: (node) => intStringify(node, 16, "0x") + }, { + identify: (value) => typeof value === "number", + default: true, + tag: "tag:yaml.org,2002:float", + test: /^(?:[-+]?\.inf|(\.nan))$/i, + resolve: (str, nan) => nan ? NaN : str[0] === "-" ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY, + stringify: resolveSeq.stringifyNumber + }, { + identify: (value) => typeof value === "number", + default: true, + tag: "tag:yaml.org,2002:float", + format: "EXP", + test: /^[-+]?([0-9][0-9_]*)?(\.[0-9_]*)?[eE][-+]?[0-9]+$/, + resolve: (str) => parseFloat(str.replace(/_/g, "")), + stringify: ({ + value + }) => Number(value).toExponential() + }, { + identify: (value) => typeof value === "number", + default: true, + tag: "tag:yaml.org,2002:float", + test: /^[-+]?(?:[0-9][0-9_]*)?\.([0-9_]*)$/, + resolve(str, frac) { + const node = new resolveSeq.Scalar(parseFloat(str.replace(/_/g, ""))); + if (frac) { + const f = frac.replace(/_/g, ""); + if (f[f.length - 1] === "0") node.minFractionDigits = f.length; + } + return node; + }, + stringify: resolveSeq.stringifyNumber + }], warnings.binary, warnings.omap, warnings.pairs, warnings.set, warnings.intTime, warnings.floatTime, warnings.timestamp); + var schemas = { + core, + failsafe, + json, + yaml11 + }; + var tags = { + binary: warnings.binary, + bool: boolObj, + float: floatObj, + floatExp: expObj, + floatNaN: nanObj, + floatTime: warnings.floatTime, + int: intObj, + intHex: hexObj, + intOct: octObj, + intTime: warnings.intTime, + map, + null: nullObj, + omap: warnings.omap, + pairs: warnings.pairs, + seq, + set: warnings.set, + timestamp: warnings.timestamp + }; + function findTagObject(value, tagName, tags2) { + if (tagName) { + const match = tags2.filter((t) => t.tag === tagName); + const tagObj = match.find((t) => !t.format) || match[0]; + if (!tagObj) throw new Error(`Tag ${tagName} not found`); + return tagObj; + } + return tags2.find((t) => (t.identify && t.identify(value) || t.class && value instanceof t.class) && !t.format); + } + function createNode(value, tagName, ctx) { + if (value instanceof resolveSeq.Node) return value; + const { + defaultPrefix, + onTagObj, + prevObjects, + schema: schema2, + wrapScalars + } = ctx; + if (tagName && tagName.startsWith("!!")) tagName = defaultPrefix + tagName.slice(2); + let tagObj = findTagObject(value, tagName, schema2.tags); + if (!tagObj) { + if (typeof value.toJSON === "function") value = value.toJSON(); + if (!value || typeof value !== "object") return wrapScalars ? new resolveSeq.Scalar(value) : value; + tagObj = value instanceof Map ? map : value[Symbol.iterator] ? seq : map; + } + if (onTagObj) { + onTagObj(tagObj); + delete ctx.onTagObj; + } + const obj = { + value: void 0, + node: void 0 + }; + if (value && typeof value === "object" && prevObjects) { + const prev = prevObjects.get(value); + if (prev) { + const alias = new resolveSeq.Alias(prev); + ctx.aliasNodes.push(alias); + return alias; + } + obj.value = value; + prevObjects.set(value, obj); + } + obj.node = tagObj.createNode ? tagObj.createNode(ctx.schema, value, ctx) : wrapScalars ? new resolveSeq.Scalar(value) : value; + if (tagName && obj.node instanceof resolveSeq.Node) obj.node.tag = tagName; + return obj.node; + } + function getSchemaTags(schemas2, knownTags, customTags, schemaId) { + let tags2 = schemas2[schemaId.replace(/\W/g, "")]; + if (!tags2) { + const keys = Object.keys(schemas2).map((key) => JSON.stringify(key)).join(", "); + throw new Error(`Unknown schema "${schemaId}"; use one of ${keys}`); + } + if (Array.isArray(customTags)) { + for (const tag of customTags) tags2 = tags2.concat(tag); + } else if (typeof customTags === "function") { + tags2 = customTags(tags2.slice()); + } + for (let i = 0; i < tags2.length; ++i) { + const tag = tags2[i]; + if (typeof tag === "string") { + const tagObj = knownTags[tag]; + if (!tagObj) { + const keys = Object.keys(knownTags).map((key) => JSON.stringify(key)).join(", "); + throw new Error(`Unknown custom tag "${tag}"; use one of ${keys}`); + } + tags2[i] = tagObj; + } + } + return tags2; + } + var sortMapEntriesByKey = (a, b) => a.key < b.key ? -1 : a.key > b.key ? 1 : 0; + var Schema = class _Schema { + // TODO: remove in v2 + // TODO: remove in v2 + constructor({ + customTags, + merge, + schema: schema2, + sortMapEntries, + tags: deprecatedCustomTags + }) { + this.merge = !!merge; + this.name = schema2; + this.sortMapEntries = sortMapEntries === true ? sortMapEntriesByKey : sortMapEntries || null; + if (!customTags && deprecatedCustomTags) warnings.warnOptionDeprecation("tags", "customTags"); + this.tags = getSchemaTags(schemas, tags, customTags || deprecatedCustomTags, schema2); + } + createNode(value, wrapScalars, tagName, ctx) { + const baseCtx = { + defaultPrefix: _Schema.defaultPrefix, + schema: this, + wrapScalars + }; + const createCtx = ctx ? Object.assign(ctx, baseCtx) : baseCtx; + return createNode(value, tagName, createCtx); + } + createPair(key, value, ctx) { + if (!ctx) ctx = { + wrapScalars: true + }; + const k = this.createNode(key, ctx.wrapScalars, null, ctx); + const v = this.createNode(value, ctx.wrapScalars, null, ctx); + return new resolveSeq.Pair(k, v); + } + }; + PlainValue._defineProperty(Schema, "defaultPrefix", PlainValue.defaultTagPrefix); + PlainValue._defineProperty(Schema, "defaultTags", PlainValue.defaultTags); + exports2.Schema = Schema; + } +}); + +// ../../node_modules/oas-resolver/node_modules/yaml/dist/Document-9b4560a1.js +var require_Document_9b4560a14 = __commonJS({ + "../../node_modules/oas-resolver/node_modules/yaml/dist/Document-9b4560a1.js"(exports2) { + "use strict"; + var PlainValue = require_PlainValue_ec8e588e4(); + var resolveSeq = require_resolveSeq_d03cb0374(); + var Schema = require_Schema_88e323a74(); + var defaultOptions = { + anchorPrefix: "a", + customTags: null, + indent: 2, + indentSeq: true, + keepCstNodes: false, + keepNodeTypes: true, + keepBlobsInJSON: true, + mapAsMap: false, + maxAliasCount: 100, + prettyErrors: false, + // TODO Set true in v2 + simpleKeys: false, + version: "1.2" + }; + var scalarOptions = { + get binary() { + return resolveSeq.binaryOptions; + }, + set binary(opt) { + Object.assign(resolveSeq.binaryOptions, opt); + }, + get bool() { + return resolveSeq.boolOptions; + }, + set bool(opt) { + Object.assign(resolveSeq.boolOptions, opt); + }, + get int() { + return resolveSeq.intOptions; + }, + set int(opt) { + Object.assign(resolveSeq.intOptions, opt); + }, + get null() { + return resolveSeq.nullOptions; + }, + set null(opt) { + Object.assign(resolveSeq.nullOptions, opt); + }, + get str() { + return resolveSeq.strOptions; + }, + set str(opt) { + Object.assign(resolveSeq.strOptions, opt); + } + }; + var documentOptions = { + "1.0": { + schema: "yaml-1.1", + merge: true, + tagPrefixes: [{ + handle: "!", + prefix: PlainValue.defaultTagPrefix + }, { + handle: "!!", + prefix: "tag:private.yaml.org,2002:" + }] + }, + 1.1: { + schema: "yaml-1.1", + merge: true, + tagPrefixes: [{ + handle: "!", + prefix: "!" + }, { + handle: "!!", + prefix: PlainValue.defaultTagPrefix + }] + }, + 1.2: { + schema: "core", + merge: false, + tagPrefixes: [{ + handle: "!", + prefix: "!" + }, { + handle: "!!", + prefix: PlainValue.defaultTagPrefix + }] + } + }; + function stringifyTag(doc, tag) { + if ((doc.version || doc.options.version) === "1.0") { + const priv = tag.match(/^tag:private\.yaml\.org,2002:([^:/]+)$/); + if (priv) return "!" + priv[1]; + const vocab = tag.match(/^tag:([a-zA-Z0-9-]+)\.yaml\.org,2002:(.*)/); + return vocab ? `!${vocab[1]}/${vocab[2]}` : `!${tag.replace(/^tag:/, "")}`; + } + let p = doc.tagPrefixes.find((p2) => tag.indexOf(p2.prefix) === 0); + if (!p) { + const dtp = doc.getDefaults().tagPrefixes; + p = dtp && dtp.find((p2) => tag.indexOf(p2.prefix) === 0); + } + if (!p) return tag[0] === "!" ? tag : `!<${tag}>`; + const suffix = tag.substr(p.prefix.length).replace(/[!,[\]{}]/g, (ch) => ({ + "!": "%21", + ",": "%2C", + "[": "%5B", + "]": "%5D", + "{": "%7B", + "}": "%7D" + })[ch]); + return p.handle + suffix; + } + function getTagObject(tags, item) { + if (item instanceof resolveSeq.Alias) return resolveSeq.Alias; + if (item.tag) { + const match = tags.filter((t) => t.tag === item.tag); + if (match.length > 0) return match.find((t) => t.format === item.format) || match[0]; + } + let tagObj, obj; + if (item instanceof resolveSeq.Scalar) { + obj = item.value; + const match = tags.filter((t) => t.identify && t.identify(obj) || t.class && obj instanceof t.class); + tagObj = match.find((t) => t.format === item.format) || match.find((t) => !t.format); + } else { + obj = item; + tagObj = tags.find((t) => t.nodeClass && obj instanceof t.nodeClass); + } + if (!tagObj) { + const name = obj && obj.constructor ? obj.constructor.name : typeof obj; + throw new Error(`Tag not resolved for ${name} value`); + } + return tagObj; + } + function stringifyProps(node, tagObj, { + anchors, + doc + }) { + const props = []; + const anchor = doc.anchors.getName(node); + if (anchor) { + anchors[anchor] = node; + props.push(`&${anchor}`); + } + if (node.tag) { + props.push(stringifyTag(doc, node.tag)); + } else if (!tagObj.default) { + props.push(stringifyTag(doc, tagObj.tag)); + } + return props.join(" "); + } + function stringify2(item, ctx, onComment, onChompKeep) { + const { + anchors, + schema: schema2 + } = ctx.doc; + let tagObj; + if (!(item instanceof resolveSeq.Node)) { + const createCtx = { + aliasNodes: [], + onTagObj: (o) => tagObj = o, + prevObjects: /* @__PURE__ */ new Map() + }; + item = schema2.createNode(item, true, null, createCtx); + for (const alias of createCtx.aliasNodes) { + alias.source = alias.source.node; + let name = anchors.getName(alias.source); + if (!name) { + name = anchors.newName(); + anchors.map[name] = alias.source; + } + } + } + if (item instanceof resolveSeq.Pair) return item.toString(ctx, onComment, onChompKeep); + if (!tagObj) tagObj = getTagObject(schema2.tags, item); + const props = stringifyProps(item, tagObj, ctx); + if (props.length > 0) ctx.indentAtStart = (ctx.indentAtStart || 0) + props.length + 1; + const str = typeof tagObj.stringify === "function" ? tagObj.stringify(item, ctx, onComment, onChompKeep) : item instanceof resolveSeq.Scalar ? resolveSeq.stringifyString(item, ctx, onComment, onChompKeep) : item.toString(ctx, onComment, onChompKeep); + if (!props) return str; + return item instanceof resolveSeq.Scalar || str[0] === "{" || str[0] === "[" ? `${props} ${str}` : `${props} +${ctx.indent}${str}`; + } + var Anchors = class _Anchors { + static validAnchorNode(node) { + return node instanceof resolveSeq.Scalar || node instanceof resolveSeq.YAMLSeq || node instanceof resolveSeq.YAMLMap; + } + constructor(prefix) { + PlainValue._defineProperty(this, "map", /* @__PURE__ */ Object.create(null)); + this.prefix = prefix; + } + createAlias(node, name) { + this.setAnchor(node, name); + return new resolveSeq.Alias(node); + } + createMergePair(...sources) { + const merge = new resolveSeq.Merge(); + merge.value.items = sources.map((s) => { + if (s instanceof resolveSeq.Alias) { + if (s.source instanceof resolveSeq.YAMLMap) return s; + } else if (s instanceof resolveSeq.YAMLMap) { + return this.createAlias(s); + } + throw new Error("Merge sources must be Map nodes or their Aliases"); + }); + return merge; + } + getName(node) { + const { + map + } = this; + return Object.keys(map).find((a) => map[a] === node); + } + getNames() { + return Object.keys(this.map); + } + getNode(name) { + return this.map[name]; + } + newName(prefix) { + if (!prefix) prefix = this.prefix; + const names = Object.keys(this.map); + for (let i = 1; true; ++i) { + const name = `${prefix}${i}`; + if (!names.includes(name)) return name; + } + } + // During parsing, map & aliases contain CST nodes + resolveNodes() { + const { + map, + _cstAliases + } = this; + Object.keys(map).forEach((a) => { + map[a] = map[a].resolved; + }); + _cstAliases.forEach((a) => { + a.source = a.source.resolved; + }); + delete this._cstAliases; + } + setAnchor(node, name) { + if (node != null && !_Anchors.validAnchorNode(node)) { + throw new Error("Anchors may only be set for Scalar, Seq and Map nodes"); + } + if (name && /[\x00-\x19\s,[\]{}]/.test(name)) { + throw new Error("Anchor names must not contain whitespace or control characters"); + } + const { + map + } = this; + const prev = node && Object.keys(map).find((a) => map[a] === node); + if (prev) { + if (!name) { + return prev; + } else if (prev !== name) { + delete map[prev]; + map[name] = node; + } + } else { + if (!name) { + if (!node) return null; + name = this.newName(); + } + map[name] = node; + } + return name; + } + }; + var visit = (node, tags) => { + if (node && typeof node === "object") { + const { + tag + } = node; + if (node instanceof resolveSeq.Collection) { + if (tag) tags[tag] = true; + node.items.forEach((n) => visit(n, tags)); + } else if (node instanceof resolveSeq.Pair) { + visit(node.key, tags); + visit(node.value, tags); + } else if (node instanceof resolveSeq.Scalar) { + if (tag) tags[tag] = true; + } + } + return tags; + }; + var listTagNames = (node) => Object.keys(visit(node, {})); + function parseContents(doc, contents) { + const comments = { + before: [], + after: [] + }; + let body = void 0; + let spaceBefore = false; + for (const node of contents) { + if (node.valueRange) { + if (body !== void 0) { + const msg = "Document contains trailing content not separated by a ... or --- line"; + doc.errors.push(new PlainValue.YAMLSyntaxError(node, msg)); + break; + } + const res = resolveSeq.resolveNode(doc, node); + if (spaceBefore) { + res.spaceBefore = true; + spaceBefore = false; + } + body = res; + } else if (node.comment !== null) { + const cc = body === void 0 ? comments.before : comments.after; + cc.push(node.comment); + } else if (node.type === PlainValue.Type.BLANK_LINE) { + spaceBefore = true; + if (body === void 0 && comments.before.length > 0 && !doc.commentBefore) { + doc.commentBefore = comments.before.join("\n"); + comments.before = []; + } + } + } + doc.contents = body || null; + if (!body) { + doc.comment = comments.before.concat(comments.after).join("\n") || null; + } else { + const cb = comments.before.join("\n"); + if (cb) { + const cbNode = body instanceof resolveSeq.Collection && body.items[0] ? body.items[0] : body; + cbNode.commentBefore = cbNode.commentBefore ? `${cb} +${cbNode.commentBefore}` : cb; + } + doc.comment = comments.after.join("\n") || null; + } + } + function resolveTagDirective({ + tagPrefixes + }, directive) { + const [handle, prefix] = directive.parameters; + if (!handle || !prefix) { + const msg = "Insufficient parameters given for %TAG directive"; + throw new PlainValue.YAMLSemanticError(directive, msg); + } + if (tagPrefixes.some((p) => p.handle === handle)) { + const msg = "The %TAG directive must only be given at most once per handle in the same document."; + throw new PlainValue.YAMLSemanticError(directive, msg); + } + return { + handle, + prefix + }; + } + function resolveYamlDirective(doc, directive) { + let [version2] = directive.parameters; + if (directive.name === "YAML:1.0") version2 = "1.0"; + if (!version2) { + const msg = "Insufficient parameters given for %YAML directive"; + throw new PlainValue.YAMLSemanticError(directive, msg); + } + if (!documentOptions[version2]) { + const v0 = doc.version || doc.options.version; + const msg = `Document will be parsed as YAML ${v0} rather than YAML ${version2}`; + doc.warnings.push(new PlainValue.YAMLWarning(directive, msg)); + } + return version2; + } + function parseDirectives(doc, directives, prevDoc) { + const directiveComments = []; + let hasDirectives = false; + for (const directive of directives) { + const { + comment, + name + } = directive; + switch (name) { + case "TAG": + try { + doc.tagPrefixes.push(resolveTagDirective(doc, directive)); + } catch (error) { + doc.errors.push(error); + } + hasDirectives = true; + break; + case "YAML": + case "YAML:1.0": + if (doc.version) { + const msg = "The %YAML directive must only be given at most once per document."; + doc.errors.push(new PlainValue.YAMLSemanticError(directive, msg)); + } + try { + doc.version = resolveYamlDirective(doc, directive); + } catch (error) { + doc.errors.push(error); + } + hasDirectives = true; + break; + default: + if (name) { + const msg = `YAML only supports %TAG and %YAML directives, and not %${name}`; + doc.warnings.push(new PlainValue.YAMLWarning(directive, msg)); + } + } + if (comment) directiveComments.push(comment); + } + if (prevDoc && !hasDirectives && "1.1" === (doc.version || prevDoc.version || doc.options.version)) { + const copyTagPrefix = ({ + handle, + prefix + }) => ({ + handle, + prefix + }); + doc.tagPrefixes = prevDoc.tagPrefixes.map(copyTagPrefix); + doc.version = prevDoc.version; + } + doc.commentBefore = directiveComments.join("\n") || null; + } + function assertCollection(contents) { + if (contents instanceof resolveSeq.Collection) return true; + throw new Error("Expected a YAML collection as document contents"); + } + var Document = class _Document { + constructor(options) { + this.anchors = new Anchors(options.anchorPrefix); + this.commentBefore = null; + this.comment = null; + this.contents = null; + this.directivesEndMarker = null; + this.errors = []; + this.options = options; + this.schema = null; + this.tagPrefixes = []; + this.version = null; + this.warnings = []; + } + add(value) { + assertCollection(this.contents); + return this.contents.add(value); + } + addIn(path, value) { + assertCollection(this.contents); + this.contents.addIn(path, value); + } + delete(key) { + assertCollection(this.contents); + return this.contents.delete(key); + } + deleteIn(path) { + if (resolveSeq.isEmptyPath(path)) { + if (this.contents == null) return false; + this.contents = null; + return true; + } + assertCollection(this.contents); + return this.contents.deleteIn(path); + } + getDefaults() { + return _Document.defaults[this.version] || _Document.defaults[this.options.version] || {}; + } + get(key, keepScalar) { + return this.contents instanceof resolveSeq.Collection ? this.contents.get(key, keepScalar) : void 0; + } + getIn(path, keepScalar) { + if (resolveSeq.isEmptyPath(path)) return !keepScalar && this.contents instanceof resolveSeq.Scalar ? this.contents.value : this.contents; + return this.contents instanceof resolveSeq.Collection ? this.contents.getIn(path, keepScalar) : void 0; + } + has(key) { + return this.contents instanceof resolveSeq.Collection ? this.contents.has(key) : false; + } + hasIn(path) { + if (resolveSeq.isEmptyPath(path)) return this.contents !== void 0; + return this.contents instanceof resolveSeq.Collection ? this.contents.hasIn(path) : false; + } + set(key, value) { + assertCollection(this.contents); + this.contents.set(key, value); + } + setIn(path, value) { + if (resolveSeq.isEmptyPath(path)) this.contents = value; + else { + assertCollection(this.contents); + this.contents.setIn(path, value); + } + } + setSchema(id, customTags) { + if (!id && !customTags && this.schema) return; + if (typeof id === "number") id = id.toFixed(1); + if (id === "1.0" || id === "1.1" || id === "1.2") { + if (this.version) this.version = id; + else this.options.version = id; + delete this.options.schema; + } else if (id && typeof id === "string") { + this.options.schema = id; + } + if (Array.isArray(customTags)) this.options.customTags = customTags; + const opt = Object.assign({}, this.getDefaults(), this.options); + this.schema = new Schema.Schema(opt); + } + parse(node, prevDoc) { + if (this.options.keepCstNodes) this.cstNode = node; + if (this.options.keepNodeTypes) this.type = "DOCUMENT"; + const { + directives = [], + contents = [], + directivesEndMarker, + error, + valueRange + } = node; + if (error) { + if (!error.source) error.source = this; + this.errors.push(error); + } + parseDirectives(this, directives, prevDoc); + if (directivesEndMarker) this.directivesEndMarker = true; + this.range = valueRange ? [valueRange.start, valueRange.end] : null; + this.setSchema(); + this.anchors._cstAliases = []; + parseContents(this, contents); + this.anchors.resolveNodes(); + if (this.options.prettyErrors) { + for (const error2 of this.errors) if (error2 instanceof PlainValue.YAMLError) error2.makePretty(); + for (const warn of this.warnings) if (warn instanceof PlainValue.YAMLError) warn.makePretty(); + } + return this; + } + listNonDefaultTags() { + return listTagNames(this.contents).filter((t) => t.indexOf(Schema.Schema.defaultPrefix) !== 0); + } + setTagPrefix(handle, prefix) { + if (handle[0] !== "!" || handle[handle.length - 1] !== "!") throw new Error("Handle must start and end with !"); + if (prefix) { + const prev = this.tagPrefixes.find((p) => p.handle === handle); + if (prev) prev.prefix = prefix; + else this.tagPrefixes.push({ + handle, + prefix + }); + } else { + this.tagPrefixes = this.tagPrefixes.filter((p) => p.handle !== handle); + } + } + toJSON(arg, onAnchor) { + const { + keepBlobsInJSON, + mapAsMap, + maxAliasCount + } = this.options; + const keep = keepBlobsInJSON && (typeof arg !== "string" || !(this.contents instanceof resolveSeq.Scalar)); + const ctx = { + doc: this, + indentStep: " ", + keep, + mapAsMap: keep && !!mapAsMap, + maxAliasCount, + stringify: stringify2 + // Requiring directly in Pair would create circular dependencies + }; + const anchorNames = Object.keys(this.anchors.map); + if (anchorNames.length > 0) ctx.anchors = new Map(anchorNames.map((name) => [this.anchors.map[name], { + alias: [], + aliasCount: 0, + count: 1 + }])); + const res = resolveSeq.toJSON(this.contents, arg, ctx); + if (typeof onAnchor === "function" && ctx.anchors) for (const { + count, + res: res2 + } of ctx.anchors.values()) onAnchor(res2, count); + return res; + } + toString() { + if (this.errors.length > 0) throw new Error("Document with errors cannot be stringified"); + const indentSize = this.options.indent; + if (!Number.isInteger(indentSize) || indentSize <= 0) { + const s = JSON.stringify(indentSize); + throw new Error(`"indent" option must be a positive integer, not ${s}`); + } + this.setSchema(); + const lines = []; + let hasDirectives = false; + if (this.version) { + let vd = "%YAML 1.2"; + if (this.schema.name === "yaml-1.1") { + if (this.version === "1.0") vd = "%YAML:1.0"; + else if (this.version === "1.1") vd = "%YAML 1.1"; + } + lines.push(vd); + hasDirectives = true; + } + const tagNames = this.listNonDefaultTags(); + this.tagPrefixes.forEach(({ + handle, + prefix + }) => { + if (tagNames.some((t) => t.indexOf(prefix) === 0)) { + lines.push(`%TAG ${handle} ${prefix}`); + hasDirectives = true; + } + }); + if (hasDirectives || this.directivesEndMarker) lines.push("---"); + if (this.commentBefore) { + if (hasDirectives || !this.directivesEndMarker) lines.unshift(""); + lines.unshift(this.commentBefore.replace(/^/gm, "#")); + } + const ctx = { + anchors: /* @__PURE__ */ Object.create(null), + doc: this, + indent: "", + indentStep: " ".repeat(indentSize), + stringify: stringify2 + // Requiring directly in nodes would create circular dependencies + }; + let chompKeep = false; + let contentComment = null; + if (this.contents) { + if (this.contents instanceof resolveSeq.Node) { + if (this.contents.spaceBefore && (hasDirectives || this.directivesEndMarker)) lines.push(""); + if (this.contents.commentBefore) lines.push(this.contents.commentBefore.replace(/^/gm, "#")); + ctx.forceBlockIndent = !!this.comment; + contentComment = this.contents.comment; + } + const onChompKeep = contentComment ? null : () => chompKeep = true; + const body = stringify2(this.contents, ctx, () => contentComment = null, onChompKeep); + lines.push(resolveSeq.addComment(body, "", contentComment)); + } else if (this.contents !== void 0) { + lines.push(stringify2(this.contents, ctx)); + } + if (this.comment) { + if ((!chompKeep || contentComment) && lines[lines.length - 1] !== "") lines.push(""); + lines.push(this.comment.replace(/^/gm, "#")); + } + return lines.join("\n") + "\n"; + } + }; + PlainValue._defineProperty(Document, "defaults", documentOptions); + exports2.Document = Document; + exports2.defaultOptions = defaultOptions; + exports2.scalarOptions = scalarOptions; + } +}); + +// ../../node_modules/oas-resolver/node_modules/yaml/dist/index.js +var require_dist4 = __commonJS({ + "../../node_modules/oas-resolver/node_modules/yaml/dist/index.js"(exports2) { + "use strict"; + var parseCst = require_parse_cst4(); + var Document$1 = require_Document_9b4560a14(); + var Schema = require_Schema_88e323a74(); + var PlainValue = require_PlainValue_ec8e588e4(); + var warnings = require_warnings_1000a3724(); + require_resolveSeq_d03cb0374(); + function createNode(value, wrapScalars = true, tag) { + if (tag === void 0 && typeof wrapScalars === "string") { + tag = wrapScalars; + wrapScalars = true; + } + const options = Object.assign({}, Document$1.Document.defaults[Document$1.defaultOptions.version], Document$1.defaultOptions); + const schema2 = new Schema.Schema(options); + return schema2.createNode(value, wrapScalars, tag); + } + var Document = class extends Document$1.Document { + constructor(options) { + super(Object.assign({}, Document$1.defaultOptions, options)); + } + }; + function parseAllDocuments(src, options) { + const stream = []; + let prev; + for (const cstDoc of parseCst.parse(src)) { + const doc = new Document(options); + doc.parse(cstDoc, prev); + stream.push(doc); + prev = doc; + } + return stream; + } + function parseDocument(src, options) { + const cst = parseCst.parse(src); + const doc = new Document(options).parse(cst[0]); + if (cst.length > 1) { + const errMsg = "Source contains multiple documents; please use YAML.parseAllDocuments()"; + doc.errors.unshift(new PlainValue.YAMLSemanticError(cst[1], errMsg)); + } + return doc; + } + function parse2(src, options) { + const doc = parseDocument(src, options); + doc.warnings.forEach((warning) => warnings.warn(warning)); + if (doc.errors.length > 0) throw doc.errors[0]; + return doc.toJSON(); + } + function stringify2(value, options) { + const doc = new Document(options); + doc.contents = value; + return String(doc); + } + var YAML = { + createNode, + defaultOptions: Document$1.defaultOptions, + Document, + parse: parse2, + parseAllDocuments, + parseCST: parseCst.parse, + parseDocument, + scalarOptions: Document$1.scalarOptions, + stringify: stringify2 + }; + exports2.YAML = YAML; + } +}); + +// ../../node_modules/oas-resolver/node_modules/yaml/index.js +var require_yaml4 = __commonJS({ + "../../node_modules/oas-resolver/node_modules/yaml/index.js"(exports2, module2) { + module2.exports = require_dist4().YAML; + } +}); + +// ../../node_modules/oas-resolver/index.js +var require_oas_resolver = __commonJS({ + "../../node_modules/oas-resolver/index.js"(exports2, module2) { + "use strict"; + var fs = require("fs"); + var path = require("path"); + var url = require("url"); + var fetch = require_lib2(); + var yaml = require_yaml4(); + var jptr = require_jptr().jptr; + var recurse = require_recurse().recurse; + var clone = require_clone().clone; + var deRef = require_dereference().dereference; + var isRef = require_isref().isRef; + var common = require_oas_kit_common(); + function unique(arr) { + return [...new Set(arr)]; + } + function readFileAsync(filename, encoding, options, pointer, def) { + return new Promise(function(resolve2, reject) { + fs.readFile(filename, encoding, function(err, data) { + if (err) { + if (options.ignoreIOErrors && def) { + if (options.verbose) console.warn("FAILED", pointer); + options.externalRefs[pointer].failed = true; + resolve2(def); + } else { + reject(err); + } + } else { + resolve2(data); + } + }); + }); + } + function resolveAllFragment(obj, context, src, parentPath, base, options) { + let attachPoint = options.externalRefs[src + parentPath].paths[0]; + let baseUrl = url.parse(base); + let seen = {}; + let changes = 1; + while (changes) { + changes = 0; + recurse(obj, { identityDetection: true }, function(obj2, key, state) { + if (isRef(obj2, key)) { + if (obj2[key].startsWith("#")) { + if (!seen[obj2[key]] && !obj2.$fixed) { + let target = clone(jptr(context, obj2[key])); + if (options.verbose > 1) console.warn((target === false ? common.colour.red : common.colour.green) + "Fragment resolution", obj2[key], common.colour.normal); + if (target === false) { + state.parent[state.pkey] = {}; + if (options.fatal) { + let ex = new Error("Fragment $ref resolution failed " + obj2[key]); + if (options.promise) options.promise.reject(ex); + else throw ex; + } + } else { + changes++; + state.parent[state.pkey] = target; + seen[obj2[key]] = state.path.replace("/%24ref", ""); + } + } else { + if (!obj2.$fixed) { + let newRef = (attachPoint + "/" + seen[obj2[key]]).split("/#/").join("/"); + state.parent[state.pkey] = { $ref: newRef, "x-miro": obj2[key], $fixed: true }; + if (options.verbose > 1) console.warn("Replacing with", newRef); + changes++; + } + } + } else if (baseUrl.protocol) { + let newRef = url.resolve(base, obj2[key]).toString(); + if (options.verbose > 1) console.warn(common.colour.yellow + "Rewriting external url ref", obj2[key], "as", newRef, common.colour.normal); + obj2["x-miro"] = obj2[key]; + if (options.externalRefs[obj2[key]]) { + if (!options.externalRefs[newRef]) { + options.externalRefs[newRef] = options.externalRefs[obj2[key]]; + } + options.externalRefs[newRef].failed = options.externalRefs[obj2[key]].failed; + } + obj2[key] = newRef; + } else if (!obj2["x-miro"]) { + let newRef = url.resolve(base, obj2[key]).toString(); + let failed = false; + if (options.externalRefs[obj2[key]]) { + failed = options.externalRefs[obj2[key]].failed; + } + if (!failed) { + if (options.verbose > 1) console.warn(common.colour.yellow + "Rewriting external ref", obj2[key], "as", newRef, common.colour.normal); + obj2["x-miro"] = obj2[key]; + obj2[key] = newRef; + } + } + } + }); + } + recurse(obj, {}, function(obj2, key, state) { + if (isRef(obj2, key)) { + if (typeof obj2.$fixed !== "undefined") delete obj2.$fixed; + } + }); + if (options.verbose > 1) console.warn("Finished fragment resolution"); + return obj; + } + function filterData(data, options) { + if (!options.filters || !options.filters.length) return data; + for (let filter of options.filters) { + data = filter(data, options); + } + return data; + } + function testProtocol(input, backup) { + if (input && input.length > 2) return input; + if (backup && backup.length > 2) return backup; + return "file:"; + } + function resolveExternal(root, pointer, options, callback) { + var u = url.parse(options.source); + var base = options.source.split("\\").join("/").split("/"); + let doc = base.pop(); + if (!doc) base.pop(); + let fragment = ""; + let fnComponents = pointer.split("#"); + if (fnComponents.length > 1) { + fragment = "#" + fnComponents[1]; + pointer = fnComponents[0]; + } + base = base.join("/"); + let u2 = url.parse(pointer); + let effectiveProtocol = testProtocol(u2.protocol, u.protocol); + let target; + if (effectiveProtocol === "file:") { + target = path.resolve(base ? base + "/" : "", pointer); + } else { + target = url.resolve(base ? base + "/" : "", pointer); + } + if (options.cache[target]) { + if (options.verbose) console.warn("CACHED", target, fragment); + let context = clone(options.cache[target]); + let data = options.externalRef = context; + if (fragment) { + data = jptr(data, fragment); + if (data === false) { + data = {}; + if (options.fatal) { + let ex = new Error("Cached $ref resolution failed " + target + fragment); + if (options.promise) options.promise.reject(ex); + else throw ex; + } + } + } + data = resolveAllFragment(data, context, pointer, fragment, target, options); + data = filterData(data, options); + callback(clone(data), target, options); + return Promise.resolve(data); + } + if (options.verbose) console.warn("GET", target, fragment); + if (options.handlers && options.handlers[effectiveProtocol]) { + return options.handlers[effectiveProtocol](base, pointer, fragment, options).then(function(data) { + options.externalRef = data; + data = filterData(data, options); + options.cache[target] = data; + callback(data, target, options); + return data; + }).catch(function(ex) { + if (options.verbose) console.warn(ex); + throw ex; + }); + } else if (effectiveProtocol && effectiveProtocol.startsWith("http")) { + const fetchOptions = Object.assign({}, options.fetchOptions, { agent: options.agent }); + return options.fetch(target, fetchOptions).then(function(res) { + if (res.status !== 200) { + if (options.ignoreIOErrors) { + if (options.verbose) console.warn("FAILED", pointer); + options.externalRefs[pointer].failed = true; + return '{"$ref":"' + pointer + '"}'; + } else { + throw new Error(`Received status code ${res.status}: ${target}`); + } + } + return res.text(); + }).then(function(data) { + try { + let context = yaml.parse(data, { schema: "core", prettyErrors: true }); + data = options.externalRef = context; + options.cache[target] = clone(data); + if (fragment) { + data = jptr(data, fragment); + if (data === false) { + data = {}; + if (options.fatal) { + let ex = new Error("Remote $ref resolution failed " + target + fragment); + if (options.promise) options.promise.reject(ex); + else throw ex; + } + } + } + data = resolveAllFragment(data, context, pointer, fragment, target, options); + data = filterData(data, options); + } catch (ex) { + if (options.verbose) console.warn(ex); + if (options.promise && options.fatal) options.promise.reject(ex); + else throw ex; + } + callback(data, target, options); + return data; + }).catch(function(err) { + if (options.verbose) console.warn(err); + options.cache[target] = {}; + if (options.promise && options.fatal) options.promise.reject(err); + else throw err; + }); + } else { + const def = '{"$ref":"' + pointer + '"}'; + return readFileAsync(target, options.encoding || "utf8", options, pointer, def).then(function(data) { + try { + let context = yaml.parse(data, { schema: "core", prettyErrors: true }); + data = options.externalRef = context; + options.cache[target] = clone(data); + if (fragment) { + data = jptr(data, fragment); + if (data === false) { + data = {}; + if (options.fatal) { + let ex = new Error("File $ref resolution failed " + target + fragment); + if (options.promise) options.promise.reject(ex); + else throw ex; + } + } + } + data = resolveAllFragment(data, context, pointer, fragment, target, options); + data = filterData(data, options); + } catch (ex) { + if (options.verbose) console.warn(ex); + if (options.promise && options.fatal) options.promise.reject(ex); + else throw ex; + } + callback(data, target, options); + return data; + }).catch(function(err) { + if (options.verbose) console.warn(err); + if (options.promise && options.fatal) options.promise.reject(err); + else throw err; + }); + } + } + function scanExternalRefs(options) { + return new Promise(function(res, rej) { + function inner(obj, key, state) { + if (obj[key] && isRef(obj[key], "$ref")) { + let $ref = obj[key].$ref; + if (!$ref.startsWith("#")) { + let $extra = ""; + if (!refs[$ref]) { + let potential = Object.keys(refs).find(function(e, i, a) { + return $ref.startsWith(e + "/"); + }); + if (potential) { + if (options.verbose) console.warn("Found potential subschema at", potential); + $extra = "/" + ($ref.split("#")[1] || "").replace(potential.split("#")[1] || ""); + $extra = $extra.split("/undefined").join(""); + $ref = potential; + } + } + if (!refs[$ref]) { + refs[$ref] = { resolved: false, paths: [], extras: {}, description: obj[key].description }; + } + if (refs[$ref].resolved) { + if (refs[$ref].failed) { + } else if (options.rewriteRefs) { + let newRef = refs[$ref].resolvedAt; + if (options.verbose > 1) console.warn("Rewriting ref", $ref, newRef); + obj[key]["x-miro"] = $ref; + obj[key].$ref = newRef + $extra; + } else { + obj[key] = clone(refs[$ref].data); + } + } else { + refs[$ref].paths.push(state.path); + refs[$ref].extras[state.path] = $extra; + } + } + } + } + let refs = options.externalRefs; + if (options.resolver.depth > 0 && options.source === options.resolver.base) { + return res(refs); + } + recurse(options.openapi.definitions, { identityDetection: true, path: "#/definitions" }, inner); + recurse(options.openapi.components, { identityDetection: true, path: "#/components" }, inner); + recurse(options.openapi, { identityDetection: true }, inner); + res(refs); + }); + } + function findExternalRefs(options) { + return new Promise(function(res, rej) { + scanExternalRefs(options).then(function(refs) { + for (let ref in refs) { + if (!refs[ref].resolved) { + let depth = options.resolver.depth; + if (depth > 0) depth++; + options.resolver.actions[depth].push(function() { + return resolveExternal(options.openapi, ref, options, function(data, source, options2) { + if (!refs[ref].resolved) { + let external = {}; + external.context = refs[ref]; + external.$ref = ref; + external.original = clone(data); + external.updated = data; + external.source = source; + options2.externals.push(external); + refs[ref].resolved = true; + } + let localOptions = Object.assign({}, options2, { + source: "", + resolver: { + actions: options2.resolver.actions, + depth: options2.resolver.actions.length - 1, + base: options2.resolver.base + } + }); + if (options2.patch && refs[ref].description && !data.description && typeof data === "object") { + data.description = refs[ref].description; + } + refs[ref].data = data; + let pointers = unique(refs[ref].paths); + pointers = pointers.sort(function(a, b) { + const aComp = a.startsWith("#/components/") || a.startsWith("#/definitions/"); + const bComp = b.startsWith("#/components/") || b.startsWith("#/definitions/"); + if (aComp && !bComp) return -1; + if (bComp && !aComp) return 1; + return 0; + }); + for (let ptr of pointers) { + if (refs[ref].resolvedAt && ptr !== refs[ref].resolvedAt && ptr.indexOf("x-ms-examples/") < 0) { + if (options2.verbose > 1) console.warn("Creating pointer to data at", ptr); + jptr(options2.openapi, ptr, { $ref: refs[ref].resolvedAt + refs[ref].extras[ptr], "x-miro": ref + refs[ref].extras[ptr] }); + } else { + if (refs[ref].resolvedAt) { + if (options2.verbose > 1) console.warn("Avoiding circular reference"); + } else { + refs[ref].resolvedAt = ptr; + if (options2.verbose > 1) console.warn("Creating initial clone of data at", ptr); + } + let cdata = clone(data); + jptr(options2.openapi, ptr, cdata); + } + } + if (options2.resolver.actions[localOptions.resolver.depth].length === 0) { + options2.resolver.actions[localOptions.resolver.depth].push(function() { + return findExternalRefs(localOptions); + }); + } + }); + }); + } + } + }).catch(function(ex) { + if (options.verbose) console.warn(ex); + rej(ex); + }); + let result = { options }; + result.actions = options.resolver.actions[options.resolver.depth]; + res(result); + }); + } + var serial = (funcs) => funcs.reduce((promise, func) => promise.then((result) => func().then(Array.prototype.concat.bind(result))), Promise.resolve([])); + function loopReferences(options, res, rej) { + options.resolver.actions.push([]); + findExternalRefs(options).then(function(data) { + serial(data.actions).then(function() { + if (options.resolver.depth >= options.resolver.actions.length) { + console.warn("Ran off the end of resolver actions"); + return res(true); + } else { + options.resolver.depth++; + if (options.resolver.actions[options.resolver.depth].length) { + setTimeout(function() { + loopReferences(data.options, res, rej); + }, 0); + } else { + if (options.verbose > 1) console.warn(common.colour.yellow + "Finished external resolution!", common.colour.normal); + if (options.resolveInternal) { + if (options.verbose > 1) console.warn(common.colour.yellow + "Starting internal resolution!", common.colour.normal); + options.openapi = deRef(options.openapi, options.original, { verbose: options.verbose - 1 }); + if (options.verbose > 1) console.warn(common.colour.yellow + "Finished internal resolution!", common.colour.normal); + } + recurse(options.openapi, {}, function(obj, key, state) { + if (isRef(obj, key)) { + if (!options.preserveMiro) delete obj["x-miro"]; + } + }); + res(options); + } + } + }).catch(function(ex) { + if (options.verbose) console.warn(ex); + rej(ex); + }); + }).catch(function(ex) { + if (options.verbose) console.warn(ex); + rej(ex); + }); + } + function setupOptions(options) { + if (!options.cache) options.cache = {}; + if (!options.fetch) options.fetch = fetch; + if (options.source) { + let srcUrl = url.parse(options.source); + if (!srcUrl.protocol || srcUrl.protocol.length <= 2) { + options.source = path.resolve(options.source); + } + } + options.externals = []; + options.externalRefs = {}; + options.rewriteRefs = true; + options.resolver = {}; + options.resolver.depth = 0; + options.resolver.base = options.source; + options.resolver.actions = [[]]; + } + function optionalResolve(options) { + setupOptions(options); + return new Promise(function(res, rej) { + if (options.resolve) + loopReferences(options, res, rej); + else + res(options); + }); + } + function resolve(openapi, source, options) { + if (!options) options = {}; + options.openapi = openapi; + options.source = source; + options.resolve = true; + setupOptions(options); + return new Promise(function(res, rej) { + loopReferences(options, res, rej); + }); + } + module2.exports = { + optionalResolve, + resolve + }; + } +}); + +// ../../node_modules/oas-schema-walker/index.js +var require_oas_schema_walker = __commonJS({ + "../../node_modules/oas-schema-walker/index.js"(exports2, module2) { + "use strict"; + function getDefaultState() { + return { depth: 0, seen: /* @__PURE__ */ new WeakMap(), top: true, combine: false, allowRefSiblings: false }; + } + function walkSchema(schema2, parent, state, callback) { + if (typeof state.depth === "undefined") state = getDefaultState(); + if (schema2 === null || typeof schema2 === "undefined") return schema2; + if (typeof schema2.$ref !== "undefined") { + let temp = { $ref: schema2.$ref }; + if (state.allowRefSiblings && schema2.description) { + temp.description = schema2.description; + } + callback(temp, parent, state); + return temp; + } + if (state.combine) { + if (schema2.allOf && Array.isArray(schema2.allOf) && schema2.allOf.length === 1) { + schema2 = Object.assign({}, schema2.allOf[0], schema2); + delete schema2.allOf; + } + if (schema2.anyOf && Array.isArray(schema2.anyOf) && schema2.anyOf.length === 1) { + schema2 = Object.assign({}, schema2.anyOf[0], schema2); + delete schema2.anyOf; + } + if (schema2.oneOf && Array.isArray(schema2.oneOf) && schema2.oneOf.length === 1) { + schema2 = Object.assign({}, schema2.oneOf[0], schema2); + delete schema2.oneOf; + } + } + callback(schema2, parent, state); + if (state.seen.has(schema2)) { + return schema2; + } + if (typeof schema2 === "object" && schema2 !== null) state.seen.set(schema2, true); + state.top = false; + state.depth++; + if (typeof schema2.items !== "undefined") { + state.property = "items"; + walkSchema(schema2.items, schema2, state, callback); + } + if (schema2.additionalItems) { + if (typeof schema2.additionalItems === "object") { + state.property = "additionalItems"; + walkSchema(schema2.additionalItems, schema2, state, callback); + } + } + if (schema2.additionalProperties) { + if (typeof schema2.additionalProperties === "object") { + state.property = "additionalProperties"; + walkSchema(schema2.additionalProperties, schema2, state, callback); + } + } + if (schema2.properties) { + for (let prop in schema2.properties) { + let subSchema = schema2.properties[prop]; + state.property = "properties/" + prop; + walkSchema(subSchema, schema2, state, callback); + } + } + if (schema2.patternProperties) { + for (let prop in schema2.patternProperties) { + let subSchema = schema2.patternProperties[prop]; + state.property = "patternProperties/" + prop; + walkSchema(subSchema, schema2, state, callback); + } + } + if (schema2.allOf) { + for (let index in schema2.allOf) { + let subSchema = schema2.allOf[index]; + state.property = "allOf/" + index; + walkSchema(subSchema, schema2, state, callback); + } + } + if (schema2.anyOf) { + for (let index in schema2.anyOf) { + let subSchema = schema2.anyOf[index]; + state.property = "anyOf/" + index; + walkSchema(subSchema, schema2, state, callback); + } + } + if (schema2.oneOf) { + for (let index in schema2.oneOf) { + let subSchema = schema2.oneOf[index]; + state.property = "oneOf/" + index; + walkSchema(subSchema, schema2, state, callback); + } + } + if (schema2.not) { + state.property = "not"; + walkSchema(schema2.not, schema2, state, callback); + } + state.depth--; + return schema2; + } + module2.exports = { + getDefaultState, + walkSchema + }; + } +}); + +// ../../node_modules/swagger2openapi/lib/statusCodes.js +var require_statusCodes = __commonJS({ + "../../node_modules/swagger2openapi/lib/statusCodes.js"(exports2, module2) { + "use strict"; + var http = require("http"); + var ours = { + "default": "Default response", + "1XX": "Informational", + "103": "Early hints", + // not in Node < 10 + "2XX": "Successful", + "3XX": "Redirection", + "4XX": "Client Error", + "5XX": "Server Error", + "7XX": "Developer Error" + // April fools RFC + }; + module2.exports = { + statusCodes: Object.assign({}, ours, http.STATUS_CODES) + }; + } +}); + +// ../../node_modules/swagger2openapi/package.json +var require_package = __commonJS({ + "../../node_modules/swagger2openapi/package.json"(exports2, module2) { + module2.exports = { + name: "swagger2openapi", + version: "7.0.8", + description: "Convert Swagger 2.0 definitions to OpenApi 3.0 and validate", + main: "index.js", + bin: { + swagger2openapi: "./swagger2openapi.js", + "oas-validate": "./oas-validate.js", + boast: "./boast.js" + }, + funding: "https://github.com/Mermade/oas-kit?sponsor=1", + scripts: { + test: "mocha" + }, + browserify: { + transform: [ + [ + "babelify", + { + presets: [ + "es2015" + ] + } + ] + ] + }, + repository: { + url: "https://github.com/Mermade/oas-kit.git", + type: "git" + }, + bugs: { + url: "https://github.com/mermade/oas-kit/issues" + }, + author: "Mike Ralphson ", + license: "BSD-3-Clause", + dependencies: { + "call-me-maybe": "^1.0.1", + "node-fetch": "^2.6.1", + "node-fetch-h2": "^2.3.0", + "node-readfiles": "^0.2.0", + "oas-kit-common": "^1.0.8", + "oas-resolver": "^2.5.6", + "oas-schema-walker": "^1.1.5", + "oas-validator": "^5.0.8", + reftools: "^1.1.9", + yaml: "^1.10.0", + yargs: "^17.0.1" + }, + keywords: [ + "swagger", + "openapi", + "openapi2", + "openapi3", + "converter", + "conversion", + "validator", + "validation", + "resolver", + "lint", + "linter" + ], + gitHead: "b1bba3fc5007e96a991bf2a015cf0534ac36b88b" + }; + } +}); + +// ../../node_modules/swagger2openapi/index.js +var require_swagger2openapi = __commonJS({ + "../../node_modules/swagger2openapi/index.js"(exports2, module2) { + "use strict"; + var fs = require("fs"); + var url = require("url"); + var pathlib = require("path"); + var maybe = require_maybe(); + var fetch = require_lib2(); + var yaml = require_yaml3(); + var jptr = require_jptr(); + var resolveInternal = jptr.jptr; + var isRef = require_isref().isRef; + var clone = require_clone().clone; + var cclone = require_clone().circularClone; + var recurse = require_recurse().recurse; + var resolver = require_oas_resolver(); + var sw = require_oas_schema_walker(); + var common = require_oas_kit_common(); + var statusCodes = require_statusCodes().statusCodes; + var ourVersion = require_package().version; + var targetVersion = "3.0.0"; + var componentNames; + var S2OError = class extends Error { + constructor(message) { + super(message); + this.name = "S2OError"; + } + }; + function throwError(message, options) { + let err = new S2OError(message); + err.options = options; + if (options.promise) { + options.promise.reject(err); + } else { + throw err; + } + } + function throwOrWarn(message, container, options) { + if (options.warnOnly) { + container[options.warnProperty || "x-s2o-warning"] = message; + } else { + throwError(message, options); + } + } + function fixUpSubSchema(schema2, parent, options) { + if (schema2.nullable) options.patches++; + if (schema2.discriminator && typeof schema2.discriminator === "string") { + schema2.discriminator = { propertyName: schema2.discriminator }; + } + if (schema2.items && Array.isArray(schema2.items)) { + if (schema2.items.length === 0) { + schema2.items = {}; + } else if (schema2.items.length === 1) { + schema2.items = schema2.items[0]; + } else schema2.items = { anyOf: schema2.items }; + } + if (schema2.type && Array.isArray(schema2.type)) { + if (options.patch) { + options.patches++; + if (schema2.type.length === 0) { + delete schema2.type; + } else { + if (!schema2.oneOf) schema2.oneOf = []; + for (let type of schema2.type) { + let newSchema = {}; + if (type === "null") { + schema2.nullable = true; + } else { + newSchema.type = type; + for (let prop of common.arrayProperties) { + if (typeof schema2.prop !== "undefined") { + newSchema[prop] = schema2[prop]; + delete schema2[prop]; + } + } + } + if (newSchema.type) { + schema2.oneOf.push(newSchema); + } + } + delete schema2.type; + if (schema2.oneOf.length === 0) { + delete schema2.oneOf; + } else if (schema2.oneOf.length < 2) { + schema2.type = schema2.oneOf[0].type; + if (Object.keys(schema2.oneOf[0]).length > 1) { + throwOrWarn("Lost properties from oneOf", schema2, options); + } + delete schema2.oneOf; + } + } + if (schema2.type && Array.isArray(schema2.type) && schema2.type.length === 1) { + schema2.type = schema2.type[0]; + } + } else { + throwError("(Patchable) schema type must not be an array", options); + } + } + if (schema2.type && schema2.type === "null") { + delete schema2.type; + schema2.nullable = true; + } + if (schema2.type === "array" && !schema2.items) { + schema2.items = {}; + } + if (schema2.type === "file") { + schema2.type = "string"; + schema2.format = "binary"; + } + if (typeof schema2.required === "boolean") { + if (schema2.required && schema2.name) { + if (typeof parent.required === "undefined") { + parent.required = []; + } + if (Array.isArray(parent.required)) parent.required.push(schema2.name); + } + delete schema2.required; + } + if (schema2.xml && typeof schema2.xml.namespace === "string") { + if (!schema2.xml.namespace) delete schema2.xml.namespace; + } + if (typeof schema2.allowEmptyValue !== "undefined") { + options.patches++; + delete schema2.allowEmptyValue; + } + } + function fixUpSubSchemaExtensions(schema2, parent) { + if (schema2["x-required"] && Array.isArray(schema2["x-required"])) { + if (!schema2.required) schema2.required = []; + schema2.required = schema2.required.concat(schema2["x-required"]); + delete schema2["x-required"]; + } + if (schema2["x-anyOf"]) { + schema2.anyOf = schema2["x-anyOf"]; + delete schema2["x-anyOf"]; + } + if (schema2["x-oneOf"]) { + schema2.oneOf = schema2["x-oneOf"]; + delete schema2["x-oneOf"]; + } + if (schema2["x-not"]) { + schema2.not = schema2["x-not"]; + delete schema2["x-not"]; + } + if (typeof schema2["x-nullable"] === "boolean") { + schema2.nullable = schema2["x-nullable"]; + delete schema2["x-nullable"]; + } + if (typeof schema2["x-discriminator"] === "object" && typeof schema2["x-discriminator"].propertyName === "string") { + schema2.discriminator = schema2["x-discriminator"]; + delete schema2["x-discriminator"]; + for (let entry in schema2.discriminator.mapping) { + let schemaOrRef = schema2.discriminator.mapping[entry]; + if (schemaOrRef.startsWith("#/definitions/")) { + schema2.discriminator.mapping[entry] = schemaOrRef.replace("#/definitions/", "#/components/schemas/"); + } + } + } + } + function fixUpSchema(schema2, options) { + sw.walkSchema(schema2, {}, {}, function(schema3, parent, state) { + fixUpSubSchemaExtensions(schema3, parent); + fixUpSubSchema(schema3, parent, options); + }); + } + function getMiroComponentName(ref) { + if (ref.indexOf("#") >= 0) { + ref = ref.split("#")[1].split("/").pop(); + } else { + ref = ref.split("/").pop().split(".")[0]; + } + return encodeURIComponent(common.sanitise(ref)); + } + function fixupRefs(obj, key, state) { + let options = state.payload.options; + if (isRef(obj, key)) { + if (obj[key].startsWith("#/components/")) { + } else if (obj[key] === "#/consumes") { + delete obj[key]; + state.parent[state.pkey] = clone(options.openapi.consumes); + } else if (obj[key] === "#/produces") { + delete obj[key]; + state.parent[state.pkey] = clone(options.openapi.produces); + } else if (obj[key].startsWith("#/definitions/")) { + let keys = obj[key].replace("#/definitions/", "").split("/"); + const ref = jptr.jpunescape(keys[0]); + let newKey = componentNames.schemas[decodeURIComponent(ref)]; + if (newKey) { + keys[0] = newKey; + } else { + throwOrWarn("Could not resolve reference " + obj[key], obj, options); + } + obj[key] = "#/components/schemas/" + keys.join("/"); + } else if (obj[key].startsWith("#/parameters/")) { + obj[key] = "#/components/parameters/" + common.sanitise(obj[key].replace("#/parameters/", "")); + } else if (obj[key].startsWith("#/responses/")) { + obj[key] = "#/components/responses/" + common.sanitise(obj[key].replace("#/responses/", "")); + } else if (obj[key].startsWith("#")) { + let target = clone(jptr.jptr(options.openapi, obj[key])); + if (target === false) throwOrWarn("direct $ref not found " + obj[key], obj, options); + else if (options.refmap[obj[key]]) { + obj[key] = options.refmap[obj[key]]; + } else { + let oldRef = obj[key]; + oldRef = oldRef.replace("/properties/headers/", ""); + oldRef = oldRef.replace("/properties/responses/", ""); + oldRef = oldRef.replace("/properties/parameters/", ""); + oldRef = oldRef.replace("/properties/schemas/", ""); + let type = "schemas"; + let schemaIndex = oldRef.lastIndexOf("/schema"); + type = oldRef.indexOf("/headers/") > schemaIndex ? "headers" : oldRef.indexOf("/responses/") > schemaIndex ? "responses" : oldRef.indexOf("/example") > schemaIndex ? "examples" : oldRef.indexOf("/x-") > schemaIndex ? "extensions" : oldRef.indexOf("/parameters/") > schemaIndex ? "parameters" : "schemas"; + if (type === "schemas") { + fixUpSchema(target, options); + } + if (type !== "responses" && type !== "extensions") { + let prefix = type.substr(0, type.length - 1); + if (prefix === "parameter" && target.name && target.name === common.sanitise(target.name)) { + prefix = encodeURIComponent(target.name); + } + let suffix = 1; + if (obj["x-miro"]) { + prefix = getMiroComponentName(obj["x-miro"]); + suffix = ""; + } + while (jptr.jptr(options.openapi, "#/components/" + type + "/" + prefix + suffix)) { + suffix = suffix === "" ? 2 : ++suffix; + } + let newRef = "#/components/" + type + "/" + prefix + suffix; + let refSuffix = ""; + if (type === "examples") { + target = { value: target }; + refSuffix = "/value"; + } + jptr.jptr(options.openapi, newRef, target); + options.refmap[obj[key]] = newRef + refSuffix; + obj[key] = newRef + refSuffix; + } + } + } + delete obj["x-miro"]; + if (Object.keys(obj).length > 1) { + const tmpRef = obj[key]; + const inSchema = state.path.indexOf("/schema") >= 0; + if (options.refSiblings === "preserve") { + } else if (inSchema && options.refSiblings === "allOf") { + delete obj.$ref; + state.parent[state.pkey] = { allOf: [{ $ref: tmpRef }, obj] }; + } else { + state.parent[state.pkey] = { $ref: tmpRef }; + } + } + } + if (key === "x-ms-odata" && typeof obj[key] === "string" && obj[key].startsWith("#/")) { + let keys = obj[key].replace("#/definitions/", "").replace("#/components/schemas/", "").split("/"); + let newKey = componentNames.schemas[decodeURIComponent(keys[0])]; + if (newKey) { + keys[0] = newKey; + } else { + throwOrWarn("Could not resolve reference " + obj[key], obj, options); + } + obj[key] = "#/components/schemas/" + keys.join("/"); + } + } + function dedupeRefs(openapi, options) { + for (let ref in options.refmap) { + jptr.jptr(openapi, ref, { $ref: options.refmap[ref] }); + } + } + function processSecurity(securityObject) { + for (let s in securityObject) { + for (let k in securityObject[s]) { + let sname = common.sanitise(k); + if (k !== sname) { + securityObject[s][sname] = securityObject[s][k]; + delete securityObject[s][k]; + } + } + } + } + function processSecurityScheme(scheme, options) { + if (scheme.type === "basic") { + scheme.type = "http"; + scheme.scheme = "basic"; + } + if (scheme.type === "oauth2") { + let flow = {}; + let flowName = scheme.flow; + if (scheme.flow === "application") flowName = "clientCredentials"; + if (scheme.flow === "accessCode") flowName = "authorizationCode"; + if (typeof scheme.authorizationUrl !== "undefined") flow.authorizationUrl = scheme.authorizationUrl.split("?")[0].trim() || "/"; + if (typeof scheme.tokenUrl === "string") flow.tokenUrl = scheme.tokenUrl.split("?")[0].trim() || "/"; + flow.scopes = scheme.scopes || {}; + scheme.flows = {}; + scheme.flows[flowName] = flow; + delete scheme.flow; + delete scheme.authorizationUrl; + delete scheme.tokenUrl; + delete scheme.scopes; + if (typeof scheme.name !== "undefined") { + if (options.patch) { + options.patches++; + delete scheme.name; + } else { + throwError("(Patchable) oauth2 securitySchemes should not have name property", options); + } + } + } + } + function keepParameters(value) { + return value && !value["x-s2o-delete"]; + } + function processHeader(header, options) { + if (header.$ref) { + header.$ref = header.$ref.replace("#/responses/", "#/components/responses/"); + } else { + if (header.type && !header.schema) { + header.schema = {}; + } + if (header.type) header.schema.type = header.type; + if (header.items && header.items.type !== "array") { + if (header.items.collectionFormat !== header.collectionFormat) { + throwOrWarn("Nested collectionFormats are not supported", header, options); + } + delete header.items.collectionFormat; + } + if (header.type === "array") { + if (header.collectionFormat === "ssv") { + throwOrWarn("collectionFormat:ssv is no longer supported for headers", header, options); + } else if (header.collectionFormat === "pipes") { + throwOrWarn("collectionFormat:pipes is no longer supported for headers", header, options); + } else if (header.collectionFormat === "multi") { + header.explode = true; + } else if (header.collectionFormat === "tsv") { + throwOrWarn("collectionFormat:tsv is no longer supported", header, options); + header["x-collectionFormat"] = "tsv"; + } else { + header.style = "simple"; + } + delete header.collectionFormat; + } else if (header.collectionFormat) { + if (options.patch) { + options.patches++; + delete header.collectionFormat; + } else { + throwError("(Patchable) collectionFormat is only applicable to header.type array", options); + } + } + delete header.type; + for (let prop of common.parameterTypeProperties) { + if (typeof header[prop] !== "undefined") { + header.schema[prop] = header[prop]; + delete header[prop]; + } + } + for (let prop of common.arrayProperties) { + if (typeof header[prop] !== "undefined") { + header.schema[prop] = header[prop]; + delete header[prop]; + } + } + } + } + function fixParamRef(param, options) { + if (param.$ref.indexOf("#/parameters/") >= 0) { + let refComponents = param.$ref.split("#/parameters/"); + param.$ref = refComponents[0] + "#/components/parameters/" + common.sanitise(refComponents[1]); + } + if (param.$ref.indexOf("#/definitions/") >= 0) { + throwOrWarn("Definition used as parameter", param, options); + } + } + function attachRequestBody(op, options) { + let newOp = {}; + for (let key of Object.keys(op)) { + newOp[key] = op[key]; + if (key === "parameters") { + newOp.requestBody = {}; + if (options.rbname) newOp[options.rbname] = ""; + } + } + newOp.requestBody = {}; + return newOp; + } + function processParameter(param, op, path, method, index, openapi, options) { + let result = {}; + let singularRequestBody = true; + let originalType; + if (op && op.consumes && typeof op.consumes === "string") { + if (options.patch) { + options.patches++; + op.consumes = [op.consumes]; + } else { + return throwError("(Patchable) operation.consumes must be an array", options); + } + } + if (!Array.isArray(openapi.consumes)) delete openapi.consumes; + let consumes = ((op ? op.consumes : null) || (openapi.consumes || [])).filter(common.uniqueOnly); + if (param && param.$ref && typeof param.$ref === "string") { + fixParamRef(param, options); + let ptr = decodeURIComponent(param.$ref.replace("#/components/parameters/", "")); + let rbody = false; + let target = openapi.components.parameters[ptr]; + if ((!target || target["x-s2o-delete"]) && param.$ref.startsWith("#/")) { + param["x-s2o-delete"] = true; + rbody = true; + } + if (rbody) { + let ref = param.$ref; + let newParam = resolveInternal(openapi, param.$ref); + if (!newParam && ref.startsWith("#/")) { + throwOrWarn("Could not resolve reference " + ref, param, options); + } else { + if (newParam) param = newParam; + } + } + } + if (param && (param.name || param.in)) { + if (typeof param["x-deprecated"] === "boolean") { + param.deprecated = param["x-deprecated"]; + delete param["x-deprecated"]; + } + if (typeof param["x-example"] !== "undefined") { + param.example = param["x-example"]; + delete param["x-example"]; + } + if (param.in !== "body" && !param.type) { + if (options.patch) { + options.patches++; + param.type = "string"; + } else { + throwError("(Patchable) parameter.type is mandatory for non-body parameters", options); + } + } + if (param.type && typeof param.type === "object" && param.type.$ref) { + param.type = resolveInternal(openapi, param.type.$ref); + } + if (param.type === "file") { + param["x-s2o-originalType"] = param.type; + originalType = param.type; + } + if (param.description && typeof param.description === "object" && param.description.$ref) { + param.description = resolveInternal(openapi, param.description.$ref); + } + if (param.description === null) delete param.description; + let oldCollectionFormat = param.collectionFormat; + if (param.type === "array" && !oldCollectionFormat) { + oldCollectionFormat = "csv"; + } + if (oldCollectionFormat) { + if (param.type !== "array") { + if (options.patch) { + options.patches++; + delete param.collectionFormat; + } else { + throwError("(Patchable) collectionFormat is only applicable to param.type array", options); + } + } + if (oldCollectionFormat === "csv" && (param.in === "query" || param.in === "cookie")) { + param.style = "form"; + param.explode = false; + } + if (oldCollectionFormat === "csv" && (param.in === "path" || param.in === "header")) { + param.style = "simple"; + } + if (oldCollectionFormat === "ssv") { + if (param.in === "query") { + param.style = "spaceDelimited"; + } else { + throwOrWarn("collectionFormat:ssv is no longer supported except for in:query parameters", param, options); + } + } + if (oldCollectionFormat === "pipes") { + if (param.in === "query") { + param.style = "pipeDelimited"; + } else { + throwOrWarn("collectionFormat:pipes is no longer supported except for in:query parameters", param, options); + } + } + if (oldCollectionFormat === "multi") { + param.explode = true; + } + if (oldCollectionFormat === "tsv") { + throwOrWarn("collectionFormat:tsv is no longer supported", param, options); + param["x-collectionFormat"] = "tsv"; + } + delete param.collectionFormat; + } + if (param.type && param.type !== "body" && param.in !== "formData") { + if (param.items && param.schema) { + throwOrWarn("parameter has array,items and schema", param, options); + } else { + if (param.schema) options.patches++; + if (!param.schema || typeof param.schema !== "object") param.schema = {}; + param.schema.type = param.type; + if (param.items) { + param.schema.items = param.items; + delete param.items; + recurse(param.schema.items, null, function(obj, key, state) { + if (key === "collectionFormat" && typeof obj[key] === "string") { + if (oldCollectionFormat && obj[key] !== oldCollectionFormat) { + throwOrWarn("Nested collectionFormats are not supported", param, options); + } + delete obj[key]; + } + }); + } + for (let prop of common.parameterTypeProperties) { + if (typeof param[prop] !== "undefined") param.schema[prop] = param[prop]; + delete param[prop]; + } + } + } + if (param.schema) { + fixUpSchema(param.schema, options); + } + if (param["x-ms-skip-url-encoding"]) { + if (param.in === "query") { + param.allowReserved = true; + delete param["x-ms-skip-url-encoding"]; + } + } + } + if (param && param.in === "formData") { + singularRequestBody = false; + result.content = {}; + let contentType = "application/x-www-form-urlencoded"; + if (consumes.length && consumes.indexOf("multipart/form-data") >= 0) { + contentType = "multipart/form-data"; + } + result.content[contentType] = {}; + if (param.schema) { + result.content[contentType].schema = param.schema; + if (param.schema.$ref) { + result["x-s2o-name"] = decodeURIComponent(param.schema.$ref.replace("#/components/schemas/", "")); + } + } else { + result.content[contentType].schema = {}; + result.content[contentType].schema.type = "object"; + result.content[contentType].schema.properties = {}; + result.content[contentType].schema.properties[param.name] = {}; + let schema2 = result.content[contentType].schema; + let target = result.content[contentType].schema.properties[param.name]; + if (param.description) target.description = param.description; + if (param.example) target.example = param.example; + if (param.type) target.type = param.type; + for (let prop of common.parameterTypeProperties) { + if (typeof param[prop] !== "undefined") target[prop] = param[prop]; + } + if (param.required === true) { + if (!schema2.required) schema2.required = []; + schema2.required.push(param.name); + result.required = true; + } + if (typeof param.default !== "undefined") target.default = param.default; + if (target.properties) target.properties = param.properties; + if (param.allOf) target.allOf = param.allOf; + if (param.type === "array" && param.items) { + target.items = param.items; + if (target.items.collectionFormat) delete target.items.collectionFormat; + } + if (originalType === "file" || param["x-s2o-originalType"] === "file") { + target.type = "string"; + target.format = "binary"; + } + copyExtensions(param, target); + } + } else if (param && param.type === "file") { + if (param.required) result.required = param.required; + result.content = {}; + result.content["application/octet-stream"] = {}; + result.content["application/octet-stream"].schema = {}; + result.content["application/octet-stream"].schema.type = "string"; + result.content["application/octet-stream"].schema.format = "binary"; + copyExtensions(param, result); + } + if (param && param.in === "body") { + result.content = {}; + if (param.name) result["x-s2o-name"] = (op && op.operationId ? common.sanitiseAll(op.operationId) : "") + ("_" + param.name).toCamelCase(); + if (param.description) result.description = param.description; + if (param.required) result.required = param.required; + if (op && options.rbname && param.name) { + op[options.rbname] = param.name; + } + if (param.schema && param.schema.$ref) { + result["x-s2o-name"] = decodeURIComponent(param.schema.$ref.replace("#/components/schemas/", "")); + } else if (param.schema && param.schema.type === "array" && param.schema.items && param.schema.items.$ref) { + result["x-s2o-name"] = decodeURIComponent(param.schema.items.$ref.replace("#/components/schemas/", "")) + "Array"; + } + if (!consumes.length) { + consumes.push("application/json"); + } + for (let mimetype of consumes) { + result.content[mimetype] = {}; + result.content[mimetype].schema = clone(param.schema || {}); + fixUpSchema(result.content[mimetype].schema, options); + } + copyExtensions(param, result); + } + if (Object.keys(result).length > 0) { + param["x-s2o-delete"] = true; + if (op) { + if (op.requestBody && singularRequestBody) { + op.requestBody["x-s2o-overloaded"] = true; + let opId = op.operationId || index; + throwOrWarn("Operation " + opId + " has multiple requestBodies", op, options); + } else { + if (!op.requestBody) { + op = path[method] = attachRequestBody(op, options); + } + if (op.requestBody.content && op.requestBody.content["multipart/form-data"] && op.requestBody.content["multipart/form-data"].schema && op.requestBody.content["multipart/form-data"].schema.properties && result.content["multipart/form-data"] && result.content["multipart/form-data"].schema && result.content["multipart/form-data"].schema.properties) { + op.requestBody.content["multipart/form-data"].schema.properties = Object.assign(op.requestBody.content["multipart/form-data"].schema.properties, result.content["multipart/form-data"].schema.properties); + op.requestBody.content["multipart/form-data"].schema.required = (op.requestBody.content["multipart/form-data"].schema.required || []).concat(result.content["multipart/form-data"].schema.required || []); + if (!op.requestBody.content["multipart/form-data"].schema.required.length) { + delete op.requestBody.content["multipart/form-data"].schema.required; + } + } else if (op.requestBody.content && op.requestBody.content["application/x-www-form-urlencoded"] && op.requestBody.content["application/x-www-form-urlencoded"].schema && op.requestBody.content["application/x-www-form-urlencoded"].schema.properties && result.content["application/x-www-form-urlencoded"] && result.content["application/x-www-form-urlencoded"].schema && result.content["application/x-www-form-urlencoded"].schema.properties) { + op.requestBody.content["application/x-www-form-urlencoded"].schema.properties = Object.assign(op.requestBody.content["application/x-www-form-urlencoded"].schema.properties, result.content["application/x-www-form-urlencoded"].schema.properties); + op.requestBody.content["application/x-www-form-urlencoded"].schema.required = (op.requestBody.content["application/x-www-form-urlencoded"].schema.required || []).concat(result.content["application/x-www-form-urlencoded"].schema.required || []); + if (!op.requestBody.content["application/x-www-form-urlencoded"].schema.required.length) { + delete op.requestBody.content["application/x-www-form-urlencoded"].schema.required; + } + } else { + op.requestBody = Object.assign(op.requestBody, result); + if (!op.requestBody["x-s2o-name"]) { + if (op.requestBody.schema && op.requestBody.schema.$ref) { + op.requestBody["x-s2o-name"] = decodeURIComponent(op.requestBody.schema.$ref.replace("#/components/schemas/", "")).split("/").join(""); + } else if (op.operationId) { + op.requestBody["x-s2o-name"] = common.sanitiseAll(op.operationId); + } + } + } + } + } + } + if (param && !param["x-s2o-delete"]) { + delete param.type; + for (let prop of common.parameterTypeProperties) { + delete param[prop]; + } + if (param.in === "path" && (typeof param.required === "undefined" || param.required !== true)) { + if (options.patch) { + options.patches++; + param.required = true; + } else { + throwError("(Patchable) path parameters must be required:true [" + param.name + " in " + index + "]", options); + } + } + } + return op; + } + function copyExtensions(src, tgt) { + for (let prop in src) { + if (prop.startsWith("x-") && !prop.startsWith("x-s2o")) { + tgt[prop] = src[prop]; + } + } + } + function processResponse(response, name, op, openapi, options) { + if (!response) return false; + if (response.$ref && typeof response.$ref === "string") { + if (response.$ref.indexOf("#/definitions/") >= 0) { + throwOrWarn("definition used as response: " + response.$ref, response, options); + } else { + if (response.$ref.startsWith("#/responses/")) { + response.$ref = "#/components/responses/" + common.sanitise(decodeURIComponent(response.$ref.replace("#/responses/", ""))); + } + } + } else { + if (typeof response.description === "undefined" || response.description === null || response.description === "" && options.patch) { + if (options.patch) { + if (typeof response === "object" && !Array.isArray(response)) { + options.patches++; + response.description = statusCodes[response] || ""; + } + } else { + throwError("(Patchable) response.description is mandatory", options); + } + } + if (typeof response.schema !== "undefined") { + fixUpSchema(response.schema, options); + if (response.schema.$ref && typeof response.schema.$ref === "string" && response.schema.$ref.startsWith("#/responses/")) { + response.schema.$ref = "#/components/responses/" + common.sanitise(decodeURIComponent(response.schema.$ref.replace("#/responses/", ""))); + } + if (op && op.produces && typeof op.produces === "string") { + if (options.patch) { + options.patches++; + op.produces = [op.produces]; + } else { + return throwError("(Patchable) operation.produces must be an array", options); + } + } + if (openapi.produces && !Array.isArray(openapi.produces)) delete openapi.produces; + let produces = ((op ? op.produces : null) || (openapi.produces || [])).filter(common.uniqueOnly); + if (!produces.length) produces.push("*/*"); + response.content = {}; + for (let mimetype of produces) { + response.content[mimetype] = {}; + response.content[mimetype].schema = clone(response.schema); + if (response.examples && response.examples[mimetype]) { + let example = {}; + example.value = response.examples[mimetype]; + response.content[mimetype].examples = {}; + response.content[mimetype].examples.response = example; + delete response.examples[mimetype]; + } + if (response.content[mimetype].schema.type === "file") { + response.content[mimetype].schema = { type: "string", format: "binary" }; + } + } + delete response.schema; + } + for (let mimetype in response.examples) { + if (!response.content) response.content = {}; + if (!response.content[mimetype]) response.content[mimetype] = {}; + response.content[mimetype].examples = {}; + response.content[mimetype].examples.response = {}; + response.content[mimetype].examples.response.value = response.examples[mimetype]; + } + delete response.examples; + if (response.headers) { + for (let h in response.headers) { + if (h.toLowerCase() === "status code") { + if (options.patch) { + options.patches++; + delete response.headers[h]; + } else { + throwError('(Patchable) "Status Code" is not a valid header', options); + } + } else { + processHeader(response.headers[h], options); + } + } + } + } + } + function processPaths(container, containerName, options, requestBodyCache, openapi) { + for (let p in container) { + let path = container[p]; + if (path && path["x-trace"] && typeof path["x-trace"] === "object") { + path.trace = path["x-trace"]; + delete path["x-trace"]; + } + if (path && path["x-summary"] && typeof path["x-summary"] === "string") { + path.summary = path["x-summary"]; + delete path["x-summary"]; + } + if (path && path["x-description"] && typeof path["x-description"] === "string") { + path.description = path["x-description"]; + delete path["x-description"]; + } + if (path && path["x-servers"] && Array.isArray(path["x-servers"])) { + path.servers = path["x-servers"]; + delete path["x-servers"]; + } + for (let method in path) { + if (common.httpMethods.indexOf(method) >= 0 || method === "x-amazon-apigateway-any-method") { + let op = path[method]; + if (op && op.parameters && Array.isArray(op.parameters)) { + if (path.parameters) { + for (let param of path.parameters) { + if (typeof param.$ref === "string") { + fixParamRef(param, options); + param = resolveInternal(openapi, param.$ref); + } + let match = op.parameters.find(function(e, i, a) { + return e.name === param.name && e.in === param.in; + }); + if (!match && (param.in === "formData" || param.in === "body" || param.type === "file")) { + op = processParameter(param, op, path, method, p, openapi, options); + if (options.rbname && op[options.rbname] === "") { + delete op[options.rbname]; + } + } + } + } + for (let param of op.parameters) { + op = processParameter(param, op, path, method, method + ":" + p, openapi, options); + } + if (options.rbname && op[options.rbname] === "") { + delete op[options.rbname]; + } + if (!options.debug) { + if (op.parameters) op.parameters = op.parameters.filter(keepParameters); + } + } + if (op && op.security) processSecurity(op.security); + if (typeof op === "object") { + if (!op.responses) { + let defaultResp = {}; + defaultResp.description = "Default response"; + op.responses = { default: defaultResp }; + } + for (let r in op.responses) { + let response = op.responses[r]; + processResponse(response, r, op, openapi, options); + } + } + if (op && op["x-servers"] && Array.isArray(op["x-servers"])) { + op.servers = op["x-servers"]; + delete op["x-servers"]; + } else if (op && op.schemes && op.schemes.length) { + for (let scheme of op.schemes) { + if (!openapi.schemes || openapi.schemes.indexOf(scheme) < 0) { + if (!op.servers) { + op.servers = []; + } + if (Array.isArray(openapi.servers)) { + for (let server of openapi.servers) { + let newServer = clone(server); + let serverUrl = url.parse(newServer.url); + serverUrl.protocol = scheme; + newServer.url = serverUrl.format(); + op.servers.push(newServer); + } + } + } + } + } + if (options.debug) { + op["x-s2o-consumes"] = op.consumes || []; + op["x-s2o-produces"] = op.produces || []; + } + if (op) { + delete op.consumes; + delete op.produces; + delete op.schemes; + if (op["x-ms-examples"]) { + for (let e in op["x-ms-examples"]) { + let example = op["x-ms-examples"][e]; + let se = common.sanitiseAll(e); + if (example.parameters) { + for (let p2 in example.parameters) { + let value = example.parameters[p2]; + for (let param of (op.parameters || []).concat(path.parameters || [])) { + if (param.$ref) { + param = jptr.jptr(openapi, param.$ref); + } + if (param.name === p2 && !param.example) { + if (!param.examples) { + param.examples = {}; + } + param.examples[e] = { value }; + } + } + } + } + if (example.responses) { + for (let r in example.responses) { + if (example.responses[r].headers) { + for (let h in example.responses[r].headers) { + let value = example.responses[r].headers[h]; + for (let rh in op.responses[r].headers) { + if (rh === h) { + let header = op.responses[r].headers[rh]; + header.example = value; + } + } + } + } + if (example.responses[r].body) { + openapi.components.examples[se] = { value: clone(example.responses[r].body) }; + if (op.responses[r] && op.responses[r].content) { + for (let ct in op.responses[r].content) { + let contentType = op.responses[r].content[ct]; + if (!contentType.examples) { + contentType.examples = {}; + } + contentType.examples[e] = { $ref: "#/components/examples/" + se }; + } + } + } + } + } + } + delete op["x-ms-examples"]; + } + if (op.parameters && op.parameters.length === 0) delete op.parameters; + if (op.requestBody) { + let effectiveOperationId = op.operationId ? common.sanitiseAll(op.operationId) : common.sanitiseAll(method + p).toCamelCase(); + let rbName = common.sanitise(op.requestBody["x-s2o-name"] || effectiveOperationId || ""); + delete op.requestBody["x-s2o-name"]; + let rbStr = JSON.stringify(op.requestBody); + let rbHash = common.hash(rbStr); + if (!requestBodyCache[rbHash]) { + let entry = {}; + entry.name = rbName; + entry.body = op.requestBody; + entry.refs = []; + requestBodyCache[rbHash] = entry; + } + let ptr = "#/" + containerName + "/" + encodeURIComponent(jptr.jpescape(p)) + "/" + method + "/requestBody"; + requestBodyCache[rbHash].refs.push(ptr); + } + } + } + } + if (path && path.parameters) { + for (let p2 in path.parameters) { + let param = path.parameters[p2]; + processParameter(param, null, path, null, p, openapi, options); + } + if (!options.debug && Array.isArray(path.parameters)) { + path.parameters = path.parameters.filter(keepParameters); + } + } + } + } + function main(openapi, options) { + let requestBodyCache = {}; + componentNames = { schemas: {} }; + if (openapi.security) processSecurity(openapi.security); + for (let s in openapi.components.securitySchemes) { + let sname = common.sanitise(s); + if (s !== sname) { + if (openapi.components.securitySchemes[sname]) { + throwError("Duplicate sanitised securityScheme name " + sname, options); + } + openapi.components.securitySchemes[sname] = openapi.components.securitySchemes[s]; + delete openapi.components.securitySchemes[s]; + } + processSecurityScheme(openapi.components.securitySchemes[sname], options); + } + for (let s in openapi.components.schemas) { + let sname = common.sanitiseAll(s); + let suffix = ""; + if (s !== sname) { + while (openapi.components.schemas[sname + suffix]) { + suffix = suffix ? ++suffix : 2; + } + openapi.components.schemas[sname + suffix] = openapi.components.schemas[s]; + delete openapi.components.schemas[s]; + } + componentNames.schemas[s] = sname + suffix; + fixUpSchema(openapi.components.schemas[sname + suffix], options); + } + options.refmap = {}; + recurse(openapi, { payload: { options } }, fixupRefs); + dedupeRefs(openapi, options); + for (let p in openapi.components.parameters) { + let sname = common.sanitise(p); + if (p !== sname) { + if (openapi.components.parameters[sname]) { + throwError("Duplicate sanitised parameter name " + sname, options); + } + openapi.components.parameters[sname] = openapi.components.parameters[p]; + delete openapi.components.parameters[p]; + } + let param = openapi.components.parameters[sname]; + processParameter(param, null, null, null, sname, openapi, options); + } + for (let r in openapi.components.responses) { + let sname = common.sanitise(r); + if (r !== sname) { + if (openapi.components.responses[sname]) { + throwError("Duplicate sanitised response name " + sname, options); + } + openapi.components.responses[sname] = openapi.components.responses[r]; + delete openapi.components.responses[r]; + } + let response = openapi.components.responses[sname]; + processResponse(response, sname, null, openapi, options); + if (response.headers) { + for (let h in response.headers) { + if (h.toLowerCase() === "status code") { + if (options.patch) { + options.patches++; + delete response.headers[h]; + } else { + throwError('(Patchable) "Status Code" is not a valid header', options); + } + } else { + processHeader(response.headers[h], options); + } + } + } + } + for (let r in openapi.components.requestBodies) { + let rb = openapi.components.requestBodies[r]; + let rbStr = JSON.stringify(rb); + let rbHash = common.hash(rbStr); + let entry = {}; + entry.name = r; + entry.body = rb; + entry.refs = []; + requestBodyCache[rbHash] = entry; + } + processPaths(openapi.paths, "paths", options, requestBodyCache, openapi); + if (openapi["x-ms-paths"]) { + processPaths(openapi["x-ms-paths"], "x-ms-paths", options, requestBodyCache, openapi); + } + if (!options.debug) { + for (let p in openapi.components.parameters) { + let param = openapi.components.parameters[p]; + if (param["x-s2o-delete"]) { + delete openapi.components.parameters[p]; + } + } + } + if (options.debug) { + openapi["x-s2o-consumes"] = openapi.consumes || []; + openapi["x-s2o-produces"] = openapi.produces || []; + } + delete openapi.consumes; + delete openapi.produces; + delete openapi.schemes; + let rbNamesGenerated = []; + openapi.components.requestBodies = {}; + if (!options.resolveInternal) { + let counter = 1; + for (let e in requestBodyCache) { + let entry = requestBodyCache[e]; + if (entry.refs.length > 1) { + let suffix = ""; + if (!entry.name) { + entry.name = "requestBody"; + suffix = counter++; + } + while (rbNamesGenerated.indexOf(entry.name + suffix) >= 0) { + suffix = suffix ? ++suffix : 2; + } + entry.name = entry.name + suffix; + rbNamesGenerated.push(entry.name); + openapi.components.requestBodies[entry.name] = clone(entry.body); + for (let r in entry.refs) { + let ref = {}; + ref.$ref = "#/components/requestBodies/" + entry.name; + jptr.jptr(openapi, entry.refs[r], ref); + } + } + } + } + if (openapi.components.responses && Object.keys(openapi.components.responses).length === 0) { + delete openapi.components.responses; + } + if (openapi.components.parameters && Object.keys(openapi.components.parameters).length === 0) { + delete openapi.components.parameters; + } + if (openapi.components.examples && Object.keys(openapi.components.examples).length === 0) { + delete openapi.components.examples; + } + if (openapi.components.requestBodies && Object.keys(openapi.components.requestBodies).length === 0) { + delete openapi.components.requestBodies; + } + if (openapi.components.securitySchemes && Object.keys(openapi.components.securitySchemes).length === 0) { + delete openapi.components.securitySchemes; + } + if (openapi.components.headers && Object.keys(openapi.components.headers).length === 0) { + delete openapi.components.headers; + } + if (openapi.components.schemas && Object.keys(openapi.components.schemas).length === 0) { + delete openapi.components.schemas; + } + if (openapi.components && Object.keys(openapi.components).length === 0) { + delete openapi.components; + } + return openapi; + } + function extractServerParameters(server) { + if (!server || !server.url || typeof server.url !== "string") return server; + server.url = server.url.split("{{").join("{"); + server.url = server.url.split("}}").join("}"); + server.url.replace(/\{(.+?)\}/g, function(match, group1) { + if (!server.variables) { + server.variables = {}; + } + server.variables[group1] = { default: "unknown" }; + }); + return server; + } + function fixInfo(openapi, options, reject) { + if (typeof openapi.info === "undefined" || openapi.info === null) { + if (options.patch) { + options.patches++; + openapi.info = { version: "", title: "" }; + } else { + return reject(new S2OError("(Patchable) info object is mandatory")); + } + } + if (typeof openapi.info !== "object" || Array.isArray(openapi.info)) { + return reject(new S2OError("info must be an object")); + } + if (typeof openapi.info.title === "undefined" || openapi.info.title === null) { + if (options.patch) { + options.patches++; + openapi.info.title = ""; + } else { + return reject(new S2OError("(Patchable) info.title cannot be null")); + } + } + if (typeof openapi.info.version === "undefined" || openapi.info.version === null) { + if (options.patch) { + options.patches++; + openapi.info.version = ""; + } else { + return reject(new S2OError("(Patchable) info.version cannot be null")); + } + } + if (typeof openapi.info.version !== "string") { + if (options.patch) { + options.patches++; + openapi.info.version = openapi.info.version.toString(); + } else { + return reject(new S2OError("(Patchable) info.version must be a string")); + } + } + if (typeof openapi.info.logo !== "undefined") { + if (options.patch) { + options.patches++; + openapi.info["x-logo"] = openapi.info.logo; + delete openapi.info.logo; + } else return reject(new S2OError("(Patchable) info should not have logo property")); + } + if (typeof openapi.info.termsOfService !== "undefined") { + if (openapi.info.termsOfService === null) { + if (options.patch) { + options.patches++; + openapi.info.termsOfService = ""; + } else { + return reject(new S2OError("(Patchable) info.termsOfService cannot be null")); + } + } + try { + let u = new URL(openapi.info.termsOfService); + } catch (ex) { + if (options.patch) { + options.patches++; + delete openapi.info.termsOfService; + } else return reject(new S2OError("(Patchable) info.termsOfService must be a URL")); + } + } + } + function fixPaths(openapi, options, reject) { + if (typeof openapi.paths === "undefined") { + if (options.patch) { + options.patches++; + openapi.paths = {}; + } else { + return reject(new S2OError("(Patchable) paths object is mandatory")); + } + } + } + function detectObjectReferences(obj, options) { + const seen = /* @__PURE__ */ new WeakSet(); + recurse(obj, { identityDetection: true }, function(obj2, key, state) { + if (typeof obj2[key] === "object" && obj2[key] !== null) { + if (seen.has(obj2[key])) { + if (options.anchors) { + obj2[key] = clone(obj2[key]); + } else { + throwError("YAML anchor or merge key at " + state.path, options); + } + } else { + seen.add(obj2[key]); + } + } + }); + } + function convertObj(swagger, options, callback) { + return maybe(callback, new Promise(function(resolve, reject) { + if (!swagger) swagger = {}; + options.original = swagger; + if (!options.text) options.text = yaml.stringify(swagger); + options.externals = []; + options.externalRefs = {}; + options.rewriteRefs = true; + options.preserveMiro = true; + options.promise = {}; + options.promise.resolve = resolve; + options.promise.reject = reject; + options.patches = 0; + if (!options.cache) options.cache = {}; + if (options.source) options.cache[options.source] = options.original; + detectObjectReferences(swagger, options); + if (swagger.openapi && typeof swagger.openapi === "string" && swagger.openapi.startsWith("3.")) { + options.openapi = cclone(swagger); + fixInfo(options.openapi, options, reject); + fixPaths(options.openapi, options, reject); + resolver.optionalResolve(options).then(function() { + if (options.direct) { + return resolve(options.openapi); + } else { + return resolve(options); + } + }).catch(function(ex) { + console.warn(ex); + reject(ex); + }); + return; + } + if (!swagger.swagger || swagger.swagger != "2.0") { + return reject(new S2OError("Unsupported swagger/OpenAPI version: " + (swagger.openapi ? swagger.openapi : swagger.swagger))); + } + let openapi = options.openapi = {}; + openapi.openapi = typeof options.targetVersion === "string" && options.targetVersion.startsWith("3.") ? options.targetVersion : targetVersion; + if (options.origin) { + if (!openapi["x-origin"]) { + openapi["x-origin"] = []; + } + let origin = {}; + origin.url = options.source || options.origin; + origin.format = "swagger"; + origin.version = swagger.swagger; + origin.converter = {}; + origin.converter.url = "https://github.com/mermade/oas-kit"; + origin.converter.version = ourVersion; + openapi["x-origin"].push(origin); + } + openapi = Object.assign(openapi, cclone(swagger)); + delete openapi.swagger; + recurse(openapi, {}, function(obj, key, state) { + if (obj[key] === null && !key.startsWith("x-") && key !== "default" && state.path.indexOf("/example") < 0) delete obj[key]; + }); + if (swagger.host) { + for (let s of Array.isArray(swagger.schemes) ? swagger.schemes : [""]) { + let server = {}; + let basePath = (swagger.basePath || "").replace(/\/$/, ""); + server.url = (s ? s + ":" : "") + "//" + swagger.host + basePath; + extractServerParameters(server); + if (!openapi.servers) openapi.servers = []; + openapi.servers.push(server); + } + } else if (swagger.basePath) { + let server = {}; + server.url = swagger.basePath; + extractServerParameters(server); + if (!openapi.servers) openapi.servers = []; + openapi.servers.push(server); + } + delete openapi.host; + delete openapi.basePath; + if (openapi["x-servers"] && Array.isArray(openapi["x-servers"])) { + openapi.servers = openapi["x-servers"]; + delete openapi["x-servers"]; + } + if (swagger["x-ms-parameterized-host"]) { + let xMsPHost = swagger["x-ms-parameterized-host"]; + let server = {}; + server.url = xMsPHost.hostTemplate + (swagger.basePath ? swagger.basePath : ""); + server.variables = {}; + const paramNames = server.url.match(/\{\w+\}/g); + for (let msp in xMsPHost.parameters) { + let param = xMsPHost.parameters[msp]; + if (param.$ref) { + param = clone(resolveInternal(openapi, param.$ref)); + } + if (!msp.startsWith("x-")) { + delete param.required; + delete param.type; + delete param.in; + if (typeof param.default === "undefined") { + if (param.enum) { + param.default = param.enum[0]; + } else { + param.default = "none"; + } + } + if (!param.name) { + param.name = paramNames[msp].replace("{", "").replace("}", ""); + } + server.variables[param.name] = param; + delete param.name; + } + } + if (!openapi.servers) openapi.servers = []; + if (xMsPHost.useSchemePrefix === false) { + openapi.servers.push(server); + } else { + swagger.schemes.forEach((scheme) => { + openapi.servers.push( + Object.assign({}, server, { url: scheme + "://" + server.url }) + ); + }); + } + delete openapi["x-ms-parameterized-host"]; + } + fixInfo(openapi, options, reject); + fixPaths(openapi, options, reject); + if (typeof openapi.consumes === "string") { + openapi.consumes = [openapi.consumes]; + } + if (typeof openapi.produces === "string") { + openapi.produces = [openapi.produces]; + } + openapi.components = {}; + if (openapi["x-callbacks"]) { + openapi.components.callbacks = openapi["x-callbacks"]; + delete openapi["x-callbacks"]; + } + openapi.components.examples = {}; + openapi.components.headers = {}; + if (openapi["x-links"]) { + openapi.components.links = openapi["x-links"]; + delete openapi["x-links"]; + } + openapi.components.parameters = openapi.parameters || {}; + openapi.components.responses = openapi.responses || {}; + openapi.components.requestBodies = {}; + openapi.components.securitySchemes = openapi.securityDefinitions || {}; + openapi.components.schemas = openapi.definitions || {}; + delete openapi.definitions; + delete openapi.responses; + delete openapi.parameters; + delete openapi.securityDefinitions; + resolver.optionalResolve(options).then(function() { + main(options.openapi, options); + if (options.direct) { + resolve(options.openapi); + } else { + resolve(options); + } + }).catch(function(ex) { + console.warn(ex); + reject(ex); + }); + })); + } + function convertStr(str, options, callback) { + return maybe(callback, new Promise(function(resolve, reject) { + let obj = null; + let error = null; + try { + obj = JSON.parse(str); + options.text = JSON.stringify(obj, null, 2); + } catch (ex) { + error = ex; + try { + obj = yaml.parse(str, { schema: "core", prettyErrors: true }); + options.sourceYaml = true; + options.text = str; + } catch (ex2) { + error = ex2; + } + } + if (obj) { + convertObj(obj, options).then((options2) => resolve(options2)).catch((ex) => reject(ex)); + } else { + reject(new S2OError(error ? error.message : "Could not parse string")); + } + })); + } + function convertUrl2(url2, options, callback) { + return maybe(callback, new Promise(function(resolve, reject) { + options.origin = true; + if (!options.source) { + options.source = url2; + } + if (options.verbose) { + console.warn("GET " + url2); + } + if (!options.fetch) { + options.fetch = fetch; + } + const fetchOptions = Object.assign({}, options.fetchOptions, { agent: options.agent }); + options.fetch(url2, fetchOptions).then(function(res) { + if (res.status !== 200) throw new S2OError(`Received status code ${res.status}: ${url2}`); + return res.text(); + }).then(function(body) { + convertStr(body, options).then((options2) => resolve(options2)).catch((ex) => reject(ex)); + }).catch(function(err) { + reject(err); + }); + })); + } + function convertFile(filename, options, callback) { + return maybe(callback, new Promise(function(resolve, reject) { + fs.readFile(filename, options.encoding || "utf8", function(err, s) { + if (err) { + reject(err); + } else { + options.sourceFile = filename; + convertStr(s, options).then((options2) => resolve(options2)).catch((ex) => reject(ex)); + } + }); + })); + } + function convertStream(readable, options, callback) { + return maybe(callback, new Promise(function(resolve, reject) { + let data = ""; + readable.on("data", function(chunk) { + data += chunk; + }).on("end", function() { + convertStr(data, options).then((options2) => resolve(options2)).catch((ex) => reject(ex)); + }); + })); + } + module2.exports = { + S2OError, + targetVersion, + convert: convertObj, + convertObj, + convertUrl: convertUrl2, + convertStr, + convertFile, + convertStream + }; + } +}); + +// ../../node_modules/openapi-to-postmanv2/lib/swaggerUtils/swaggerToOpenapi.js +var require_swaggerToOpenapi = __commonJS({ + "../../node_modules/openapi-to-postmanv2/lib/swaggerUtils/swaggerToOpenapi.js"(exports2, module2) { + var Swagger2OpenAPI = require_swagger2openapi(); + var { isSwagger } = require_versionUtils(); + module2.exports = { + /** + * Converts a Swagger 2.0 API definition into an OpenAPI 3.0 specification + * @param {Object} concreteUtils Concrete schema utils according to the specification version + * @param {object} parsedSwagger Parsed Swagger spec + * @param {function} convertExecution Function to perform the OAS-PM convertion after the Spec convertion + * @return {Object} {error, newOpenapi} The new open api spec or error if there was an error in the process + */ + convertToOAS30IfSwagger: function(concreteUtils, parsedSwagger, convertExecution) { + if (isSwagger(concreteUtils.version)) { + Swagger2OpenAPI.convertObj( + parsedSwagger, + { + fatal: false, + patch: true, + anchors: true, + warnOnly: true + }, + (error, newOpenapi) => { + if (error) { + return convertExecution(error); + } + return convertExecution(null, newOpenapi.openapi); + } + ); + } else { + return convertExecution(null, parsedSwagger); + } + } + }; + } +}); + +// ../../node_modules/ajv/dist/compile/codegen/code.js +var require_code = __commonJS({ + "../../node_modules/ajv/dist/compile/codegen/code.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.regexpCode = exports2.getEsmExportName = exports2.getProperty = exports2.safeStringify = exports2.stringify = exports2.strConcat = exports2.addCodeArg = exports2.str = exports2._ = exports2.nil = exports2._Code = exports2.Name = exports2.IDENTIFIER = exports2._CodeOrName = void 0; + var _CodeOrName = class { + }; + exports2._CodeOrName = _CodeOrName; + exports2.IDENTIFIER = /^[a-z$_][a-z$_0-9]*$/i; + var Name = class extends _CodeOrName { + constructor(s) { + super(); + if (!exports2.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 }; + } + }; + exports2.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((s, c) => `${s}${c}`, ""); + } + 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; + }, {}); + } + }; + exports2._Code = _Code; + exports2.nil = new _Code(""); + function _2(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); + } + exports2._ = _2; + var 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])); + } + optimize(expr); + return new _Code(expr); + } + exports2.str = str; + 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)); + } + exports2.addCodeArg = addCodeArg; + 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 !== void 0) { + expr.splice(i - 1, 3, res); + continue; + } + expr[i++] = "+"; + } + i++; + } + } + 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); + return; + } + 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}`; + } + exports2.strConcat = strConcat; + function interpolate(x) { + return typeof x == "number" || typeof x == "boolean" || x === null ? x : safeStringify(Array.isArray(x) ? x.join(",") : x); + } + function stringify2(x) { + return new _Code(safeStringify(x)); + } + exports2.stringify = stringify2; + function safeStringify(x) { + return JSON.stringify(x).replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029"); + } + exports2.safeStringify = safeStringify; + function getProperty(key) { + return typeof key == "string" && exports2.IDENTIFIER.test(key) ? new _Code(`.${key}`) : _2`[${key}]`; + } + exports2.getProperty = getProperty; + function getEsmExportName(key) { + if (typeof key == "string" && exports2.IDENTIFIER.test(key)) { + return new _Code(`${key}`); + } + throw new Error(`CodeGen: invalid export name: ${key}, use explicit $id name mapping`); + } + exports2.getEsmExportName = getEsmExportName; + function regexpCode(rx) { + return new _Code(rx.toString()); + } + exports2.regexpCode = regexpCode; + } +}); + +// ../../node_modules/ajv/dist/compile/codegen/scope.js +var require_scope = __commonJS({ + "../../node_modules/ajv/dist/compile/codegen/scope.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ValueScope = exports2.ValueScopeName = exports2.Scope = exports2.varKinds = exports2.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; + } + }; + var UsedValueState; + (function(UsedValueState2) { + UsedValueState2[UsedValueState2["Started"] = 0] = "Started"; + UsedValueState2[UsedValueState2["Completed"] = 1] = "Completed"; + })(UsedValueState = exports2.UsedValueState || (exports2.UsedValueState = {})); + exports2.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 }; + } + }; + exports2.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}]`; + } + }; + exports2.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 vs = this._values[prefix]; + if (vs) { + const _name = vs.get(valueKey); + if (_name) + return _name; + } else { + vs = this._values[prefix] = /* @__PURE__ */ new Map(); + } + 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); + } + 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 vs = values[prefix]; + if (!vs) + continue; + const nameSet = usedValues[prefix] = usedValues[prefix] || /* @__PURE__ */ 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 ? exports2.varKinds.var : exports2.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 code; + } + }; + exports2.ValueScope = ValueScope; + } +}); + +// ../../node_modules/ajv/dist/compile/codegen/index.js +var require_codegen = __commonJS({ + "../../node_modules/ajv/dist/compile/codegen/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.or = exports2.and = exports2.not = exports2.CodeGen = exports2.operators = exports2.varKinds = exports2.ValueScopeName = exports2.ValueScope = exports2.Scope = exports2.Name = exports2.regexpCode = exports2.stringify = exports2.getProperty = exports2.nil = exports2.strConcat = exports2.str = exports2._ = void 0; + var code_1 = require_code(); + var scope_1 = require_scope(); + var code_2 = require_code(); + Object.defineProperty(exports2, "_", { enumerable: true, get: function() { + return code_2._; + } }); + Object.defineProperty(exports2, "str", { enumerable: true, get: function() { + return code_2.str; + } }); + Object.defineProperty(exports2, "strConcat", { enumerable: true, get: function() { + return code_2.strConcat; + } }); + Object.defineProperty(exports2, "nil", { enumerable: true, get: function() { + return code_2.nil; + } }); + Object.defineProperty(exports2, "getProperty", { enumerable: true, get: function() { + return code_2.getProperty; + } }); + Object.defineProperty(exports2, "stringify", { enumerable: true, get: function() { + return code_2.stringify; + } }); + Object.defineProperty(exports2, "regexpCode", { enumerable: true, get: function() { + return code_2.regexpCode; + } }); + Object.defineProperty(exports2, "Name", { enumerable: true, get: function() { + return code_2.Name; + } }); + var scope_2 = require_scope(); + Object.defineProperty(exports2, "Scope", { enumerable: true, get: function() { + return scope_2.Scope; + } }); + Object.defineProperty(exports2, "ValueScope", { enumerable: true, get: function() { + return scope_2.ValueScope; + } }); + Object.defineProperty(exports2, "ValueScopeName", { enumerable: true, get: function() { + return scope_2.ValueScopeName; + } }); + Object.defineProperty(exports2, "varKinds", { enumerable: true, get: function() { + return scope_2.varKinds; + } }); + exports2.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(error) { + super(); + this.error = error; + } + 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, 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); + } + return nodes.length > 0 ? this : void 0; + } + optimizeNames(names, constants) { + const { nodes } = this; + let i = nodes.length; + while (i--) { + const n = nodes[i]; + if (n.optimizeNames(names, constants)) + continue; + subtractNames(names, n.names); + nodes.splice(i, 1); + } + return nodes.length > 0 ? this : void 0; + } + get names() { + return this.nodes.reduce((names, n) => addNames(names, n.names), {}); + } + }; + var BlockNode = class extends ParentNode { + render(opts) { + return "{" + opts._n + super.render(opts) + "}" + opts._n; + } + }; + var Root = 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 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); + } + 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, 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); + } + }; + 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; + } + get names() { + return addNames(super.names, this.iterable.names); + } + }; + var Func = class 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); + } + }; + Func.kind = "func"; + var Return = class extends ParentNode { + render(opts) { + return "return " + super.render(opts); + } + }; + 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; + } + 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(error) { + super(); + this.error = error; + } + 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 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] = /* @__PURE__ */ 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 !== 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, exports2.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)); + 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); + } + } + 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(); + } else if (thenBody) { + this.code(thenBody).endIf(); + } else if (elseBody) { + throw new Error('CodeGen: "else" body without "then" body'); + } + 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); + }); + } + 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 error = this.name("e"); + this._currNode = node.catch = new Catch(error); + catchCode(error); + } + if (finallyCode) { + this._currNode = node.finally = new Finally(); + this.code(finallyCode); + } + 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 === 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(n = 1) { + while (n-- > 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, 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"'); + } + this._currNode = n.else = node; + 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; + } + }; + exports2.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 === void 0 || 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] !== void 0); + } + } + 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)}`; + } + exports2.not = not; + var andCode = mappend(exports2.operators.AND); + function and(...args) { + return args.reduce(andCode); + } + exports2.and = and; + var orCode = mappend(exports2.operators.OR); + function or(...args) { + return args.reduce(orCode); + } + exports2.or = or; + 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})`; + } + } +}); + +// ../../node_modules/ajv/dist/compile/util.js +var require_util = __commonJS({ + "../../node_modules/ajv/dist/compile/util.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.checkStrictMode = exports2.getErrorPath = exports2.Type = exports2.useFunc = exports2.setEvaluated = exports2.evaluatedPropsToName = exports2.mergeEvaluated = exports2.eachItem = exports2.unescapeJsonPointer = exports2.escapeJsonPointer = exports2.escapeFragment = exports2.unescapeFragment = exports2.schemaRefOrVal = exports2.schemaHasRulesButRef = exports2.schemaHasRules = exports2.checkUnknownRules = exports2.alwaysValidSchema = exports2.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; + } + exports2.toHash = toHash; + function alwaysValidSchema(it, schema2) { + if (typeof schema2 == "boolean") + return schema2; + if (Object.keys(schema2).length === 0) + return true; + checkUnknownRules(it, schema2); + return !schemaHasRules(schema2, it.self.RULES.all); + } + exports2.alwaysValidSchema = alwaysValidSchema; + function checkUnknownRules(it, schema2 = it.schema) { + const { opts, self: self2 } = it; + if (!opts.strictSchema) + return; + if (typeof schema2 === "boolean") + return; + const rules = self2.RULES.keywords; + for (const key in schema2) { + if (!rules[key]) + checkStrictMode(it, `unknown keyword: "${key}"`); + } + } + exports2.checkUnknownRules = checkUnknownRules; + function schemaHasRules(schema2, rules) { + if (typeof schema2 == "boolean") + return !schema2; + for (const key in schema2) + if (rules[key]) + return true; + return false; + } + exports2.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; + } + exports2.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)}`; + } + exports2.schemaRefOrVal = schemaRefOrVal; + function unescapeFragment(str) { + return unescapeJsonPointer(decodeURIComponent(str)); + } + exports2.unescapeFragment = unescapeFragment; + function escapeFragment(str) { + return encodeURIComponent(escapeJsonPointer(str)); + } + exports2.escapeFragment = escapeFragment; + function escapeJsonPointer(str) { + if (typeof str == "number") + return `${str}`; + return str.replace(/~/g, "~0").replace(/\//g, "~1"); + } + exports2.escapeJsonPointer = escapeJsonPointer; + function unescapeJsonPointer(str) { + return str.replace(/~1/g, "/").replace(/~0/g, "~"); + } + exports2.unescapeJsonPointer = unescapeJsonPointer; + function eachItem(xs, f) { + if (Array.isArray(xs)) { + for (const x of xs) + f(x); + } else { + f(xs); + } + } + exports2.eachItem = eachItem; + function makeMergeEvaluated({ mergeNames, mergeToName, mergeValues, resultToName }) { + return (gen, from, to, toName) => { + const res = to === void 0 ? 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; + }; + } + exports2.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); + } else { + gen.assign(to, (0, codegen_1._)`${to} || {}`); + setEvaluated(gen, to, from); + } + }), + 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 !== void 0) + setEvaluated(gen, props, ps); + return props; + } + exports2.evaluatedPropsToName = evaluatedPropsToName; + function setEvaluated(gen, props, ps) { + Object.keys(ps).forEach((p) => gen.assign((0, codegen_1._)`${props}${(0, codegen_1.getProperty)(p)}`, true)); + } + exports2.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)) + }); + } + exports2.useFunc = useFunc; + var Type; + (function(Type2) { + Type2[Type2["Num"] = 0] = "Num"; + Type2[Type2["Str"] = 1] = "Str"; + })(Type = exports2.Type || (exports2.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); + } + exports2.getErrorPath = getErrorPath; + 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); + } + exports2.checkStrictMode = checkStrictMode; + } +}); + +// ../../node_modules/ajv/dist/compile/names.js +var require_names = __commonJS({ + "../../node_modules/ajv/dist/compile/names.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var codegen_1 = require_codegen(); + var names = { + // validation function arguments + data: new codegen_1.Name("data"), + // args passed from referencing schema + valCxt: new codegen_1.Name("valCxt"), + instancePath: new codegen_1.Name("instancePath"), + parentData: new codegen_1.Name("parentData"), + parentDataProperty: new codegen_1.Name("parentDataProperty"), + rootData: new codegen_1.Name("rootData"), + dynamicAnchors: new codegen_1.Name("dynamicAnchors"), + // function scoped variables + vErrors: new codegen_1.Name("vErrors"), + errors: new codegen_1.Name("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") + }; + exports2.default = names; + } +}); + +// ../../node_modules/ajv/dist/compile/errors.js +var require_errors = __commonJS({ + "../../node_modules/ajv/dist/compile/errors.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.extendErrors = exports2.resetErrorsCount = exports2.reportExtraError = exports2.reportError = exports2.keyword$DataError = exports2.keywordError = void 0; + var codegen_1 = require_codegen(); + var util_1 = require_util(); + var names_1 = require_names(); + exports2.keywordError = { + message: ({ keyword }) => (0, codegen_1.str)`must pass "${keyword}" keyword validation` + }; + exports2.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 = exports2.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}]`); + } + } + exports2.reportError = reportError; + function reportExtraError(cxt, error = exports2.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); + } + } + exports2.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))); + } + exports2.resetErrorsCount = resetErrorsCount; + function extendErrors({ gen, keyword, schemaValue, data, errsCount, it }) { + if (errsCount === void 0) + 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); + } + }); + } + exports2.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(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); + } + } + var E = { + keyword: new codegen_1.Name("keyword"), + schemaPath: new codegen_1.Name("schemaPath"), + 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]); + } + } +}); + +// ../../node_modules/ajv/dist/compile/validate/boolSchema.js +var require_boolSchema = __commonJS({ + "../../node_modules/ajv/dist/compile/validate/boolSchema.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.boolOrEmptySchema = exports2.topBoolOrEmptySchema = void 0; + var errors_1 = require_errors(); + var codegen_1 = require_codegen(); + var names_1 = require_names(); + var boolError = { + message: "boolean schema is false" + }; + function topBoolOrEmptySchema(it) { + const { gen, schema: schema2, validateName } = it; + if (schema2 === false) { + falseSchemaError(it, 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); + } + } + exports2.topBoolOrEmptySchema = topBoolOrEmptySchema; + function boolOrEmptySchema(it, valid) { + const { gen, schema: schema2 } = it; + if (schema2 === false) { + gen.var(valid, false); + falseSchemaError(it); + } else { + gen.var(valid, true); + } + } + exports2.boolOrEmptySchema = boolOrEmptySchema; + function falseSchemaError(it, overrideAllErrors) { + const { gen, data } = it; + const cxt = { + gen, + keyword: "false schema", + data, + schema: false, + schemaCode: false, + schemaValue: false, + params: {}, + it + }; + (0, errors_1.reportError)(cxt, boolError, void 0, overrideAllErrors); + } + } +}); + +// ../../node_modules/ajv/dist/compile/rules.js +var require_rules = __commonJS({ + "../../node_modules/ajv/dist/compile/rules.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getRules = exports2.isJSONType = void 0; + var _jsonTypes = ["string", "number", "integer", "boolean", "null", "object", "array"]; + var jsonTypes = new Set(_jsonTypes); + function isJSONType(x) { + return typeof x == "string" && jsonTypes.has(x); + } + exports2.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: {} + }; + } + exports2.getRules = getRules; + } +}); + +// ../../node_modules/ajv/dist/compile/validate/applicability.js +var require_applicability = __commonJS({ + "../../node_modules/ajv/dist/compile/validate/applicability.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.shouldUseRule = exports2.shouldUseGroup = exports2.schemaHasRulesForType = void 0; + function schemaHasRulesForType({ schema: schema2, self: self2 }, type) { + const group = self2.RULES.types[type]; + return group && group !== true && shouldUseGroup(schema2, group); + } + exports2.schemaHasRulesForType = schemaHasRulesForType; + function shouldUseGroup(schema2, group) { + return group.rules.some((rule) => shouldUseRule(schema2, rule)); + } + exports2.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)); + } + exports2.shouldUseRule = shouldUseRule; + } +}); + +// ../../node_modules/ajv/dist/compile/validate/dataType.js +var require_dataType = __commonJS({ + "../../node_modules/ajv/dist/compile/validate/dataType.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.reportTypeError = exports2.checkDataTypes = exports2.checkDataType = exports2.coerceAndCheckDataType = exports2.getJSONTypes = exports2.getSchemaTypes = exports2.DataType = void 0; + var rules_1 = require_rules(); + var applicability_1 = require_applicability(); + var errors_1 = require_errors(); + var codegen_1 = require_codegen(); + var util_1 = require_util(); + var DataType; + (function(DataType2) { + DataType2[DataType2["Correct"] = 0] = "Correct"; + DataType2[DataType2["Wrong"] = 1] = "Wrong"; + })(DataType = exports2.DataType || (exports2.DataType = {})); + function getSchemaTypes(schema2) { + const types = getJSONTypes(schema2.type); + const hasNull = types.includes("null"); + if (hasNull) { + if (schema2.nullable === false) + throw new Error("type: null contradicts nullable: false"); + } else { + if (!types.length && schema2.nullable !== void 0) { + throw new Error('"nullable" cannot be used without "type"'); + } + if (schema2.nullable === true) + types.push("null"); + } + return types; + } + exports2.getSchemaTypes = getSchemaTypes; + 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(",")); + } + exports2.getJSONTypes = getJSONTypes; + 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; + } + exports2.coerceAndCheckDataType = coerceAndCheckDataType; + var COERCIBLE = /* @__PURE__ */ 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) { + 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); + } + } + exports2.checkDataType = checkDataType; + 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; + } + exports2.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(it) { + const cxt = getTypeErrorContext(it); + (0, errors_1.reportError)(cxt, typeError); + } + exports2.reportTypeError = reportTypeError; + function getTypeErrorContext(it) { + const { gen, data, schema: schema2 } = it; + const schemaCode = (0, util_1.schemaRefOrVal)(it, schema2, "type"); + return { + gen, + keyword: "type", + data, + schema: schema2.type, + schemaCode, + schemaValue: schemaCode, + parentSchema: schema2, + params: {}, + it + }; + } + } +}); + +// ../../node_modules/ajv/dist/compile/validate/defaults.js +var require_defaults = __commonJS({ + "../../node_modules/ajv/dist/compile/validate/defaults.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.assignDefaults = void 0; + var codegen_1 = require_codegen(); + var util_1 = require_util(); + function assignDefaults(it, ty) { + const { properties, items } = it.schema; + if (ty === "object" && properties) { + for (const key in properties) { + assignDefault(it, key, properties[key].default); + } + } else if (ty === "array" && Array.isArray(items)) { + items.forEach((sch, i) => assignDefault(it, i, sch.default)); + } + } + exports2.assignDefaults = assignDefaults; + function assignDefault(it, prop, defaultValue) { + const { gen, compositeRule, data, opts } = it; + if (defaultValue === void 0) + 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} === ""`; + } + gen.if(condition, (0, codegen_1._)`${childData} = ${(0, codegen_1.stringify)(defaultValue)}`); + } + } +}); + +// ../../node_modules/ajv/dist/vocabularies/code.js +var require_code2 = __commonJS({ + "../../node_modules/ajv/dist/vocabularies/code.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.validateUnion = exports2.validateArray = exports2.usePattern = exports2.callValidateCode = exports2.schemaProperties = exports2.allSchemaProperties = exports2.noPropertyInData = exports2.propertyInData = exports2.isOwnProperty = exports2.hasPropFunc = exports2.reportMissingProp = exports2.checkMissingProp = exports2.checkReportMissingProp = void 0; + var codegen_1 = require_codegen(); + var util_1 = require_util(); + var names_1 = require_names(); + var util_2 = require_util(); + 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(); + }); + } + exports2.checkReportMissingProp = checkReportMissingProp; + 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}`))); + } + exports2.checkMissingProp = checkMissingProp; + function reportMissingProp(cxt, missing) { + cxt.setParams({ missingProperty: missing }, true); + cxt.error(); + } + exports2.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` + }); + } + exports2.hasPropFunc = hasPropFunc; + function isOwnProperty(gen, data, property) { + return (0, codegen_1._)`${hasPropFunc(gen)}.call(${data}, ${property})`; + } + exports2.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; + } + exports2.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; + } + exports2.noPropertyInData = noPropertyInData; + function allSchemaProperties(schemaMap) { + return schemaMap ? Object.keys(schemaMap).filter((p) => p !== "__proto__") : []; + } + exports2.allSchemaProperties = allSchemaProperties; + function schemaProperties(it, schemaMap) { + return allSchemaProperties(schemaMap).filter((p) => !(0, util_1.alwaysValidSchema)(it, schemaMap[p])); + } + exports2.schemaProperties = schemaProperties; + 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] + ]; + 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})`; + } + exports2.callValidateCode = callValidateCode; + var 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})` + }); + } + exports2.usePattern = usePattern; + 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); + }); + } + } + exports2.validateArray = validateArray; + function validateUnion(cxt) { + const { gen, schema: schema2, keyword, it } = cxt; + if (!Array.isArray(schema2)) + throw new Error("ajv implementation error"); + const alwaysValid = schema2.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(() => schema2.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); + if (!merged) + gen.if((0, codegen_1.not)(valid)); + })); + cxt.result(valid, () => cxt.reset(), () => cxt.error(true)); + } + exports2.validateUnion = validateUnion; + } +}); + +// ../../node_modules/ajv/dist/compile/validate/keyword.js +var require_keyword = __commonJS({ + "../../node_modules/ajv/dist/compile/validate/keyword.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.validateKeywordUsage = exports2.validSchemaType = exports2.funcKeywordCode = exports2.macroKeywordCode = void 0; + var codegen_1 = require_codegen(); + var names_1 = require_names(); + var code_1 = require_code2(); + var errors_1 = require_errors(); + function macroKeywordCode(cxt, def) { + const { gen, keyword, schema: schema2, parentSchema, it } = cxt; + const macroSchema = def.macro.call(it.self, schema2, 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)); + } + exports2.macroKeywordCode = macroKeywordCode; + function funcKeywordCode(cxt, def) { + var _a; + const { gen, keyword, schema: schema2, parentSchema, $data, it } = cxt; + checkAsyncKeyword(it, def); + const validate2 = !$data && def.compile ? def.compile.call(it.self, schema2, parentSchema, it) : def.validate; + const validateRef = useKeyword(gen, keyword, validate2); + 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 `), (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 _a2; + gen.if((0, codegen_1.not)((_a2 = def.valid) !== null && _a2 !== void 0 ? _a2 : valid), errors); + } + } + exports2.funcKeywordCode = funcKeywordCode; + 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 === 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((st) => st === "array" ? Array.isArray(schema2) : st === "object" ? schema2 && typeof schema2 == "object" && !Array.isArray(schema2) : typeof schema2 == st || allowUndefined && typeof schema2 == "undefined"); + } + exports2.validSchemaType = validSchemaType; + function validateKeywordUsage({ schema: schema2, opts, self: self2, 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}": ` + self2.errorsText(def.validateSchema.errors); + if (opts.validateSchema === "log") + self2.logger.error(msg); + else + throw new Error(msg); + } + } + } + exports2.validateKeywordUsage = validateKeywordUsage; + } +}); + +// ../../node_modules/ajv/dist/compile/validate/subschema.js +var require_subschema = __commonJS({ + "../../node_modules/ajv/dist/compile/validate/subschema.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.extendSubschemaMode = exports2.extendSubschemaData = exports2.getSubschema = void 0; + var codegen_1 = require_codegen(); + var util_1 = require_util(); + function getSubschema(it, { 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 = it.schema[keyword]; + return schemaProp === void 0 ? { + 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)}` + }; + } + 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'); + } + exports2.getSubschema = getSubschema; + function extendSubschemaData(subschema, it, { 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 } = it; + if (dataProp !== void 0) { + 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 !== 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 = it.dataLevel + 1; + subschema.dataTypes = []; + it.definedProperties = /* @__PURE__ */ new Set(); + subschema.parentData = it.data; + subschema.dataNames = [...it.dataNames, _nextData]; + } + } + exports2.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; + } + exports2.extendSubschemaMode = extendSubschemaMode; + } +}); + +// ../../node_modules/fast-deep-equal/index.js +var require_fast_deep_equal = __commonJS({ + "../../node_modules/fast-deep-equal/index.js"(exports2, module2) { + "use strict"; + module2.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; + } + return a !== a && b !== b; + }; + } +}); + +// ../../node_modules/json-schema-traverse/index.js +var require_json_schema_traverse = __commonJS({ + "../../node_modules/json-schema-traverse/index.js"(exports2, module2) { + "use strict"; + var traverse = module2.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 i = 0; i < sch.length; i++) + _traverse(opts, pre, post, sch[i], jsonPtr + "/" + key + "/" + i, rootSchema, jsonPtr, key, schema2, i); + } + } 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); + } + } + function escapeJsonPtr(str) { + return str.replace(/~/g, "~0").replace(/\//g, "~1"); + } + } +}); + +// ../../node_modules/ajv/dist/compile/resolve.js +var require_resolve = __commonJS({ + "../../node_modules/ajv/dist/compile/resolve.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getSchemaRefs = exports2.resolveUrl = exports2.normalizeId = exports2._getFullPath = exports2.getFullPath = exports2.inlineRef = void 0; + var util_1 = require_util(); + 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 !hasRef(schema2); + if (!limit) + return false; + return countKeys(schema2) <= limit; + } + exports2.inlineRef = inlineRef; + var REF_KEYWORDS = /* @__PURE__ */ new Set([ + "$ref", + "$recursiveRef", + "$recursiveAnchor", + "$dynamicRef", + "$dynamicAnchor" + ]); + function hasRef(schema2) { + for (const key in schema2) { + if (REF_KEYWORDS.has(key)) + return true; + const sch = schema2[key]; + if (Array.isArray(sch) && sch.some(hasRef)) + return true; + if (typeof sch == "object" && hasRef(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)); + } + 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); + } + exports2.getFullPath = getFullPath; + function _getFullPath(resolver, p) { + const serialized = resolver.serialize(p); + return serialized.split("#")[0] + "#"; + } + exports2._getFullPath = _getFullPath; + var TRAILING_SLASH_HASH = /#\/?$/; + function normalizeId(id) { + return id ? id.replace(TRAILING_SLASH_HASH, "") : ""; + } + exports2.normalizeId = normalizeId; + function resolveUrl(resolver, baseId, id) { + id = normalizeId(id); + return resolver.resolve(baseId, id); + } + exports2.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, _2, parentJsonPtr) => { + if (parentJsonPtr === void 0) + return; + const fullPath = pathPrefix + jsonPtr; + let baseId2 = baseIds[parentJsonPtr]; + if (typeof sch[schemaId] == "string") + baseId2 = addRef.call(this, sch[schemaId]); + addAnchor.call(this, sch.$anchor); + addAnchor.call(this, sch.$dynamicAnchor); + baseIds[jsonPtr] = baseId2; + function addRef(ref) { + const _resolve = this.opts.uriResolver.resolve; + ref = normalizeId(baseId2 ? _resolve(baseId2, 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`); + } + } + exports2.getSchemaRefs = getSchemaRefs; + } +}); + +// ../../node_modules/ajv/dist/compile/validate/index.js +var require_validate = __commonJS({ + "../../node_modules/ajv/dist/compile/validate/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getData = exports2.KeywordCxt = exports2.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_util(); + var errors_1 = require_errors(); + function validateFunctionCode(it) { + if (isSchemaObj(it)) { + checkKeywords(it); + if (schemaCxtHasRules(it)) { + topSchemaObjCode(it); + return; + } + } + validateFunction(it, () => (0, boolSchema_1.topBoolOrEmptySchema)(it)); + } + exports2.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}}={}`; + } + 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}`); + 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); + if (opts.dynamicRef) + gen.var(names_1.default.dynamicAnchors, (0, codegen_1._)`{}`); + }); + } + function topSchemaObjCode(it) { + const { schema: schema2, opts, gen } = it; + validateFunction(it, () => { + if (opts.$comment && schema2.$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) { + 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(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(it, valid) { + if (isSchemaObj(it)) { + checkKeywords(it); + if (schemaCxtHasRules(it)) { + subSchemaObjCode(it, valid); + return; + } + } + (0, boolSchema_1.boolOrEmptySchema)(it, valid); + } + function schemaCxtHasRules({ schema: schema2, self: self2 }) { + if (typeof schema2 == "boolean") + return !schema2; + for (const key in schema2) + if (self2.RULES.all[key]) + return true; + return false; + } + function isSchemaObj(it) { + return typeof it.schema != "boolean"; + } + function subSchemaObjCode(it, valid) { + const { schema: schema2, gen, opts } = it; + if (opts.$comment && schema2.$comment) + commentKeyword(it); + updateContext(it); + checkAsyncSchema(it); + const errsCount = gen.const("_errs", names_1.default.errors); + typeAndKeywords(it, errsCount); + 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: schema2, errSchemaPath, opts, self: self2 } = it; + if (schema2.$ref && opts.ignoreKeywordsWithRef && (0, util_1.schemaHasRulesButRef)(schema2, self2.RULES)) { + self2.logger.warn(`$ref: keywords ignored in schema at path "${errSchemaPath}"`); + } + } + function checkNoDefault(it) { + const { schema: schema2, opts } = it; + if (schema2.default !== void 0 && 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: 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)`); + } + } + function returnResults(it) { + const { gen, schemaEnv, validateName, ValidationError, opts } = it; + 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(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: schema2, data, allErrors, opts, self: self2 } = it; + const { RULES } = self2; + if (schema2.$ref && (opts.ignoreKeywordsWithRef || !(0, util_1.schemaHasRulesButRef)(schema2, RULES))) { + gen.block(() => keywordCode(it, "$ref", RULES.all.$ref.definition)); + 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)(schema2, 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(); + } else { + iterateKeywords(it, group); + } + if (!allErrors) + gen.if((0, codegen_1._)`${names_1.default.errors} === ${errsCount || 0}`); + } + } + function iterateKeywords(it, group) { + const { gen, schema: schema2, 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)(schema2, rule)) { + keywordCode(it, rule.keyword, rule.definition, group.type); + } + } + }); + } + 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(",")}"`); + } + }); + 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}"`); + } + } + } + } + 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); + } + var KeywordCxt = class { + 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)); + } 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 = it.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 } = 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 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; + } + 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) { + 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 }; + subschemaCode(nextContext, valid); + return nextContext; + } + mergeEvaluated(schemaCxt, toName) { + const { it, gen } = this; + if (!it.opts.unevaluated) + return; + if (it.props !== true && schemaCxt.props !== void 0) { + it.props = util_1.mergeEvaluated.props(gen, schemaCxt.props, it.props, toName); + } + if (it.items !== true && schemaCxt.items !== void 0) { + it.items = util_1.mergeEvaluated.items(gen, schemaCxt.items, it.items, toName); + } + } + 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; + } + } + }; + exports2.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); + } + } + 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}`; + } + } + exports2.getData = getData; + } +}); + +// ../../node_modules/ajv/dist/runtime/validation_error.js +var require_validation_error = __commonJS({ + "../../node_modules/ajv/dist/runtime/validation_error.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var ValidationError = class extends Error { + constructor(errors) { + super("validation failed"); + this.errors = errors; + this.ajv = this.validation = true; + } + }; + exports2.default = ValidationError; + } +}); + +// ../../node_modules/ajv/dist/compile/ref_error.js +var require_ref_error = __commonJS({ + "../../node_modules/ajv/dist/compile/ref_error.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__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)); + } + }; + exports2.default = MissingRefError; + } +}); + +// ../../node_modules/ajv/dist/compile/index.js +var require_compile = __commonJS({ + "../../node_modules/ajv/dist/compile/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.resolveSchema = exports2.getCompilingSchema = exports2.resolveRef = exports2.compileSchema = exports2.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_util(); + var validate_1 = require_validate(); + var SchemaEnv = class { + constructor(env) { + var _a; + this.refs = {}; + this.dynamicAnchors = {}; + let schema2; + if (typeof env.schema == "object") + schema2 = 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)(schema2 === null || schema2 === void 0 ? void 0 : schema2[env.schemaId || "$id"]); + this.schemaPath = env.schemaPath; + this.localRefs = env.localRefs; + this.meta = env.meta; + this.$async = schema2 === null || schema2 === void 0 ? void 0 : schema2.$async; + this.refs = {}; + } + }; + exports2.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], + 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 = `${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 validate2 = makeValidate(this, this.scope.get()); + this.scope.value(validateName, { ref: validate2 }); + validate2.errors = null; + validate2.schema = sch.schema; + validate2.schemaEnv = sch; + if (sch.$async) + validate2.$async = true; + if (this.opts.code.source === true) { + validate2.source = { validateName, validateCode, scopeValues: gen._values }; + } + if (this.opts.unevaluated) { + const { props, items } = schemaCxt; + validate2.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 (validate2.source) + validate2.source.evaluated = (0, codegen_1.stringify)(validate2.evaluated); + } + sch.validate = validate2; + return sch; + } catch (e) { + delete sch.validate; + delete sch.validateName; + if (sourceCode) + this.logger.error("Error compiling schema, function code:", sourceCode); + throw e; + } finally { + this._compilations.delete(sch); + } + } + exports2.compileSchema = compileSchema; + function resolveRef(root, baseId, ref) { + var _a; + ref = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, ref); + const schOrFunc = root.refs[ref]; + if (schOrFunc) + return schOrFunc; + let _sch = resolve.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) + return; + return root.refs[ref] = inlineOrCompile.call(this, _sch); + } + exports2.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); + } + function getCompilingSchema(schEnv) { + for (const sch of this._compilations) { + if (sameSchemaEnv(sch, schEnv)) + return sch; + } + } + exports2.getCompilingSchema = getCompilingSchema; + function sameSchemaEnv(s1, s2) { + return s1.schema === s2.schema && s1.root === s2.root && s1.baseId === s2.baseId; + } + function resolve(root, ref) { + let sch; + while (typeof (sch = this.refs[ref]) == "string") + ref = sch; + return sch || this.schemas[ref] || resolveSchema.call(this, root, ref); + } + function resolveSchema(root, ref) { + 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, void 0); + 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: 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, p, schOrRef); + } + exports2.resolveSchema = resolveSchema; + 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 env; + 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); + env = resolveSchema.call(this, root, $ref); + } + const { schemaId } = this.opts; + env = env || new SchemaEnv({ schema: schema2, schemaId, root, baseId }); + if (env.schema !== env.root.schema) + return env; + return void 0; + } + } +}); + +// ../../node_modules/ajv/dist/refs/data.json +var require_data = __commonJS({ + "../../node_modules/ajv/dist/refs/data.json"(exports2, module2) { + module2.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 + }; + } +}); + +// ../../node_modules/uri-js/dist/es5/uri.all.js +var require_uri_all = __commonJS({ + "../../node_modules/uri-js/dist/es5/uri.all.js"(exports2, module2) { + (function(global2, factory) { + typeof exports2 === "object" && typeof module2 !== "undefined" ? factory(exports2) : typeof define === "function" && define.amd ? define(["exports"], factory) : factory(global2.URI = global2.URI || {}); + })(exports2, function(exports3) { + "use strict"; + function merge() { + for (var _len = arguments.length, sets = Array(_len), _key = 0; _key < _len; _key++) { + sets[_key] = arguments[_key]; + } + if (sets.length > 1) { + sets[0] = sets[0].slice(0, -1); + var xl = sets.length - 1; + for (var x = 1; x < xl; ++x) { + sets[x] = sets[x].slice(1, -1); + } + sets[xl] = sets[xl].slice(1); + return sets.join(""); + } else { + return sets[0]; + } + } + function subexp(str) { + return "(?:" + str + ")"; + } + function typeOf(o) { + return o === void 0 ? "undefined" : o === null ? "null" : Object.prototype.toString.call(o).split(" ").pop().split("]").shift().toLowerCase(); + } + function toUpperCase(str) { + return str.toUpperCase(); + } + function toArray2(obj) { + return obj !== void 0 && obj !== null ? obj instanceof Array ? obj : typeof obj.length !== "number" || obj.split || obj.setInterval || obj.call ? [obj] : Array.prototype.slice.call(obj) : []; + } + function assign(target, source) { + var obj = target; + if (source) { + for (var key in source) { + obj[key] = source[key]; + } + } + return obj; + } + function buildExps(isIRI2) { + var ALPHA$$ = "[A-Za-z]", CR$ = "[\\x0D]", DIGIT$$ = "[0-9]", DQUOTE$$ = "[\\x22]", HEXDIG$$2 = merge(DIGIT$$, "[A-Fa-f]"), LF$$ = "[\\x0A]", SP$$ = "[\\x20]", PCT_ENCODED$2 = subexp(subexp("%[EFef]" + HEXDIG$$2 + "%" + HEXDIG$$2 + HEXDIG$$2 + "%" + HEXDIG$$2 + HEXDIG$$2) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$2 + "%" + HEXDIG$$2 + HEXDIG$$2) + "|" + subexp("%" + HEXDIG$$2 + HEXDIG$$2)), GEN_DELIMS$$ = "[\\:\\/\\?\\#\\[\\]\\@]", SUB_DELIMS$$ = "[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]", RESERVED$$ = merge(GEN_DELIMS$$, SUB_DELIMS$$), UCSCHAR$$ = isIRI2 ? "[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]" : "[]", IPRIVATE$$ = isIRI2 ? "[\\uE000-\\uF8FF]" : "[]", UNRESERVED$$2 = merge(ALPHA$$, DIGIT$$, "[\\-\\.\\_\\~]", UCSCHAR$$), SCHEME$ = subexp(ALPHA$$ + merge(ALPHA$$, DIGIT$$, "[\\+\\-\\.]") + "*"), USERINFO$ = subexp(subexp(PCT_ENCODED$2 + "|" + merge(UNRESERVED$$2, SUB_DELIMS$$, "[\\:]")) + "*"), DEC_OCTET$ = subexp(subexp("25[0-5]") + "|" + subexp("2[0-4]" + DIGIT$$) + "|" + subexp("1" + DIGIT$$ + DIGIT$$) + "|" + subexp("[1-9]" + DIGIT$$) + "|" + DIGIT$$), DEC_OCTET_RELAXED$ = subexp(subexp("25[0-5]") + "|" + subexp("2[0-4]" + DIGIT$$) + "|" + subexp("1" + DIGIT$$ + DIGIT$$) + "|" + subexp("0?[1-9]" + DIGIT$$) + "|0?0?" + DIGIT$$), IPV4ADDRESS$ = subexp(DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$), H16$ = subexp(HEXDIG$$2 + "{1,4}"), LS32$ = subexp(subexp(H16$ + "\\:" + H16$) + "|" + IPV4ADDRESS$), IPV6ADDRESS1$ = subexp(subexp(H16$ + "\\:") + "{6}" + LS32$), IPV6ADDRESS2$ = subexp("\\:\\:" + subexp(H16$ + "\\:") + "{5}" + LS32$), IPV6ADDRESS3$ = subexp(subexp(H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{4}" + LS32$), IPV6ADDRESS4$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,1}" + H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{3}" + LS32$), IPV6ADDRESS5$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,2}" + H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{2}" + LS32$), IPV6ADDRESS6$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,3}" + H16$) + "?\\:\\:" + H16$ + "\\:" + LS32$), IPV6ADDRESS7$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,4}" + H16$) + "?\\:\\:" + LS32$), IPV6ADDRESS8$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,5}" + H16$) + "?\\:\\:" + H16$), IPV6ADDRESS9$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,6}" + H16$) + "?\\:\\:"), IPV6ADDRESS$ = subexp([IPV6ADDRESS1$, IPV6ADDRESS2$, IPV6ADDRESS3$, IPV6ADDRESS4$, IPV6ADDRESS5$, IPV6ADDRESS6$, IPV6ADDRESS7$, IPV6ADDRESS8$, IPV6ADDRESS9$].join("|")), ZONEID$ = subexp(subexp(UNRESERVED$$2 + "|" + PCT_ENCODED$2) + "+"), IPV6ADDRZ$ = subexp(IPV6ADDRESS$ + "\\%25" + ZONEID$), IPV6ADDRZ_RELAXED$ = subexp(IPV6ADDRESS$ + subexp("\\%25|\\%(?!" + HEXDIG$$2 + "{2})") + ZONEID$), IPVFUTURE$ = subexp("[vV]" + HEXDIG$$2 + "+\\." + merge(UNRESERVED$$2, SUB_DELIMS$$, "[\\:]") + "+"), IP_LITERAL$ = subexp("\\[" + subexp(IPV6ADDRZ_RELAXED$ + "|" + IPV6ADDRESS$ + "|" + IPVFUTURE$) + "\\]"), REG_NAME$ = subexp(subexp(PCT_ENCODED$2 + "|" + merge(UNRESERVED$$2, SUB_DELIMS$$)) + "*"), HOST$ = subexp(IP_LITERAL$ + "|" + IPV4ADDRESS$ + "(?!" + REG_NAME$ + ")|" + REG_NAME$), PORT$ = subexp(DIGIT$$ + "*"), AUTHORITY$ = subexp(subexp(USERINFO$ + "@") + "?" + HOST$ + subexp("\\:" + PORT$) + "?"), PCHAR$ = subexp(PCT_ENCODED$2 + "|" + merge(UNRESERVED$$2, SUB_DELIMS$$, "[\\:\\@]")), SEGMENT$ = subexp(PCHAR$ + "*"), SEGMENT_NZ$ = subexp(PCHAR$ + "+"), SEGMENT_NZ_NC$ = subexp(subexp(PCT_ENCODED$2 + "|" + merge(UNRESERVED$$2, SUB_DELIMS$$, "[\\@]")) + "+"), PATH_ABEMPTY$ = subexp(subexp("\\/" + SEGMENT$) + "*"), PATH_ABSOLUTE$ = subexp("\\/" + subexp(SEGMENT_NZ$ + PATH_ABEMPTY$) + "?"), PATH_NOSCHEME$ = subexp(SEGMENT_NZ_NC$ + PATH_ABEMPTY$), PATH_ROOTLESS$ = subexp(SEGMENT_NZ$ + PATH_ABEMPTY$), PATH_EMPTY$ = "(?!" + PCHAR$ + ")", PATH$ = subexp(PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$), QUERY$ = subexp(subexp(PCHAR$ + "|" + merge("[\\/\\?]", IPRIVATE$$)) + "*"), FRAGMENT$ = subexp(subexp(PCHAR$ + "|[\\/\\?]") + "*"), HIER_PART$ = subexp(subexp("\\/\\/" + AUTHORITY$ + PATH_ABEMPTY$) + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$), URI$ = subexp(SCHEME$ + "\\:" + HIER_PART$ + subexp("\\?" + QUERY$) + "?" + subexp("\\#" + FRAGMENT$) + "?"), RELATIVE_PART$ = subexp(subexp("\\/\\/" + AUTHORITY$ + PATH_ABEMPTY$) + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_EMPTY$), RELATIVE$ = subexp(RELATIVE_PART$ + subexp("\\?" + QUERY$) + "?" + subexp("\\#" + FRAGMENT$) + "?"), URI_REFERENCE$ = subexp(URI$ + "|" + RELATIVE$), ABSOLUTE_URI$ = subexp(SCHEME$ + "\\:" + HIER_PART$ + subexp("\\?" + QUERY$) + "?"), GENERIC_REF$ = "^(" + SCHEME$ + ")\\:" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", RELATIVE_REF$ = "^(){0}" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", ABSOLUTE_REF$ = "^(" + SCHEME$ + ")\\:" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?$", SAMEDOC_REF$ = "^" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", AUTHORITY_REF$ = "^" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?$"; + return { + NOT_SCHEME: new RegExp(merge("[^]", ALPHA$$, DIGIT$$, "[\\+\\-\\.]"), "g"), + NOT_USERINFO: new RegExp(merge("[^\\%\\:]", UNRESERVED$$2, SUB_DELIMS$$), "g"), + NOT_HOST: new RegExp(merge("[^\\%\\[\\]\\:]", UNRESERVED$$2, SUB_DELIMS$$), "g"), + NOT_PATH: new RegExp(merge("[^\\%\\/\\:\\@]", UNRESERVED$$2, SUB_DELIMS$$), "g"), + NOT_PATH_NOSCHEME: new RegExp(merge("[^\\%\\/\\@]", UNRESERVED$$2, SUB_DELIMS$$), "g"), + NOT_QUERY: new RegExp(merge("[^\\%]", UNRESERVED$$2, SUB_DELIMS$$, "[\\:\\@\\/\\?]", IPRIVATE$$), "g"), + NOT_FRAGMENT: new RegExp(merge("[^\\%]", UNRESERVED$$2, SUB_DELIMS$$, "[\\:\\@\\/\\?]"), "g"), + ESCAPE: new RegExp(merge("[^]", UNRESERVED$$2, SUB_DELIMS$$), "g"), + UNRESERVED: new RegExp(UNRESERVED$$2, "g"), + OTHER_CHARS: new RegExp(merge("[^\\%]", UNRESERVED$$2, RESERVED$$), "g"), + PCT_ENCODED: new RegExp(PCT_ENCODED$2, "g"), + IPV4ADDRESS: new RegExp("^(" + IPV4ADDRESS$ + ")$"), + IPV6ADDRESS: new RegExp("^\\[?(" + IPV6ADDRESS$ + ")" + subexp(subexp("\\%25|\\%(?!" + HEXDIG$$2 + "{2})") + "(" + ZONEID$ + ")") + "?\\]?$") + //RFC 6874, with relaxed parsing rules + }; + } + var URI_PROTOCOL = buildExps(false); + var IRI_PROTOCOL = buildExps(true); + var slicedToArray = /* @__PURE__ */ function() { + function sliceIterator(arr, i) { + var _arr = []; + var _n = true; + var _d = false; + var _e = void 0; + try { + for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { + _arr.push(_s.value); + if (i && _arr.length === i) break; + } + } catch (err) { + _d = true; + _e = err; + } finally { + try { + if (!_n && _i["return"]) _i["return"](); + } finally { + if (_d) throw _e; + } + } + return _arr; + } + return function(arr, i) { + if (Array.isArray(arr)) { + return arr; + } else if (Symbol.iterator in Object(arr)) { + return sliceIterator(arr, i); + } else { + throw new TypeError("Invalid attempt to destructure non-iterable instance"); + } + }; + }(); + var toConsumableArray = function(arr) { + if (Array.isArray(arr)) { + for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i]; + return arr2; + } else { + return Array.from(arr); + } + }; + var maxInt = 2147483647; + var base = 36; + var tMin = 1; + var tMax = 26; + var skew = 38; + var damp = 700; + var initialBias = 72; + var initialN = 128; + var delimiter = "-"; + var regexPunycode = /^xn--/; + var regexNonASCII = /[^\0-\x7E]/; + var regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g; + var errors = { + "overflow": "Overflow: input needs wider integers to process", + "not-basic": "Illegal input >= 0x80 (not a basic code point)", + "invalid-input": "Invalid input" + }; + var baseMinusTMin = base - tMin; + var floor = Math.floor; + var stringFromCharCode = String.fromCharCode; + function error$1(type) { + throw new RangeError(errors[type]); + } + function map(array, fn) { + var result = []; + var length = array.length; + while (length--) { + result[length] = fn(array[length]); + } + return result; + } + function mapDomain(string, fn) { + var parts = string.split("@"); + var result = ""; + if (parts.length > 1) { + result = parts[0] + "@"; + string = parts[1]; + } + string = string.replace(regexSeparators, "."); + var labels = string.split("."); + var encoded = map(labels, fn).join("."); + return result + encoded; + } + function ucs2decode(string) { + var output = []; + var counter = 0; + var length = string.length; + while (counter < length) { + var value = string.charCodeAt(counter++); + if (value >= 55296 && value <= 56319 && counter < length) { + var extra = string.charCodeAt(counter++); + if ((extra & 64512) == 56320) { + output.push(((value & 1023) << 10) + (extra & 1023) + 65536); + } else { + output.push(value); + counter--; + } + } else { + output.push(value); + } + } + return output; + } + var ucs2encode = function ucs2encode2(array) { + return String.fromCodePoint.apply(String, toConsumableArray(array)); + }; + var basicToDigit = function basicToDigit2(codePoint) { + if (codePoint - 48 < 10) { + return codePoint - 22; + } + if (codePoint - 65 < 26) { + return codePoint - 65; + } + if (codePoint - 97 < 26) { + return codePoint - 97; + } + return base; + }; + var digitToBasic = function digitToBasic2(digit, flag) { + return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5); + }; + var adapt = function adapt2(delta, numPoints, firstTime) { + var k = 0; + delta = firstTime ? floor(delta / damp) : delta >> 1; + delta += floor(delta / numPoints); + for ( + ; + /* no initialization */ + delta > baseMinusTMin * tMax >> 1; + k += base + ) { + delta = floor(delta / baseMinusTMin); + } + return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); + }; + var decode = function decode2(input) { + var output = []; + var inputLength = input.length; + var i = 0; + var n = initialN; + var bias = initialBias; + var basic = input.lastIndexOf(delimiter); + if (basic < 0) { + basic = 0; + } + for (var j = 0; j < basic; ++j) { + if (input.charCodeAt(j) >= 128) { + error$1("not-basic"); + } + output.push(input.charCodeAt(j)); + } + for (var index = basic > 0 ? basic + 1 : 0; index < inputLength; ) { + var oldi = i; + for ( + var w = 1, k = base; + ; + /* no condition */ + k += base + ) { + if (index >= inputLength) { + error$1("invalid-input"); + } + var digit = basicToDigit(input.charCodeAt(index++)); + if (digit >= base || digit > floor((maxInt - i) / w)) { + error$1("overflow"); + } + i += digit * w; + var t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias; + if (digit < t) { + break; + } + var baseMinusT = base - t; + if (w > floor(maxInt / baseMinusT)) { + error$1("overflow"); + } + w *= baseMinusT; + } + var out = output.length + 1; + bias = adapt(i - oldi, out, oldi == 0); + if (floor(i / out) > maxInt - n) { + error$1("overflow"); + } + n += floor(i / out); + i %= out; + output.splice(i++, 0, n); + } + return String.fromCodePoint.apply(String, output); + }; + var encode = function encode2(input) { + var output = []; + input = ucs2decode(input); + var inputLength = input.length; + var n = initialN; + var delta = 0; + var bias = initialBias; + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = void 0; + try { + for (var _iterator = input[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var _currentValue2 = _step.value; + if (_currentValue2 < 128) { + output.push(stringFromCharCode(_currentValue2)); + } + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + var basicLength = output.length; + var handledCPCount = basicLength; + if (basicLength) { + output.push(delimiter); + } + while (handledCPCount < inputLength) { + var m = maxInt; + var _iteratorNormalCompletion2 = true; + var _didIteratorError2 = false; + var _iteratorError2 = void 0; + try { + for (var _iterator2 = input[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { + var currentValue = _step2.value; + if (currentValue >= n && currentValue < m) { + m = currentValue; + } + } + } catch (err) { + _didIteratorError2 = true; + _iteratorError2 = err; + } finally { + try { + if (!_iteratorNormalCompletion2 && _iterator2.return) { + _iterator2.return(); + } + } finally { + if (_didIteratorError2) { + throw _iteratorError2; + } + } + } + var handledCPCountPlusOne = handledCPCount + 1; + if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) { + error$1("overflow"); + } + delta += (m - n) * handledCPCountPlusOne; + n = m; + var _iteratorNormalCompletion3 = true; + var _didIteratorError3 = false; + var _iteratorError3 = void 0; + try { + for (var _iterator3 = input[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) { + var _currentValue = _step3.value; + if (_currentValue < n && ++delta > maxInt) { + error$1("overflow"); + } + if (_currentValue == n) { + var q = delta; + for ( + var k = base; + ; + /* no condition */ + k += base + ) { + var t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias; + if (q < t) { + break; + } + var qMinusT = q - t; + var baseMinusT = base - t; + output.push(stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))); + q = floor(qMinusT / baseMinusT); + } + output.push(stringFromCharCode(digitToBasic(q, 0))); + bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength); + delta = 0; + ++handledCPCount; + } + } + } catch (err) { + _didIteratorError3 = true; + _iteratorError3 = err; + } finally { + try { + if (!_iteratorNormalCompletion3 && _iterator3.return) { + _iterator3.return(); + } + } finally { + if (_didIteratorError3) { + throw _iteratorError3; + } + } + } + ++delta; + ++n; + } + return output.join(""); + }; + var toUnicode = function toUnicode2(input) { + return mapDomain(input, function(string) { + return regexPunycode.test(string) ? decode(string.slice(4).toLowerCase()) : string; + }); + }; + var toASCII = function toASCII2(input) { + return mapDomain(input, function(string) { + return regexNonASCII.test(string) ? "xn--" + encode(string) : string; + }); + }; + var punycode = { + /** + * A string representing the current Punycode.js version number. + * @memberOf punycode + * @type String + */ + "version": "2.1.0", + /** + * An object of methods to convert from JavaScript's internal character + * representation (UCS-2) to Unicode code points, and back. + * @see + * @memberOf punycode + * @type Object + */ + "ucs2": { + "decode": ucs2decode, + "encode": ucs2encode + }, + "decode": decode, + "encode": encode, + "toASCII": toASCII, + "toUnicode": toUnicode + }; + var SCHEMES = {}; + function pctEncChar(chr) { + var c = chr.charCodeAt(0); + var e = void 0; + if (c < 16) e = "%0" + c.toString(16).toUpperCase(); + else if (c < 128) e = "%" + c.toString(16).toUpperCase(); + else if (c < 2048) e = "%" + (c >> 6 | 192).toString(16).toUpperCase() + "%" + (c & 63 | 128).toString(16).toUpperCase(); + else e = "%" + (c >> 12 | 224).toString(16).toUpperCase() + "%" + (c >> 6 & 63 | 128).toString(16).toUpperCase() + "%" + (c & 63 | 128).toString(16).toUpperCase(); + return e; + } + function pctDecChars(str) { + var newStr = ""; + var i = 0; + var il = str.length; + while (i < il) { + var c = parseInt(str.substr(i + 1, 2), 16); + if (c < 128) { + newStr += String.fromCharCode(c); + i += 3; + } else if (c >= 194 && c < 224) { + if (il - i >= 6) { + var c2 = parseInt(str.substr(i + 4, 2), 16); + newStr += String.fromCharCode((c & 31) << 6 | c2 & 63); + } else { + newStr += str.substr(i, 6); + } + i += 6; + } else if (c >= 224) { + if (il - i >= 9) { + var _c = parseInt(str.substr(i + 4, 2), 16); + var c3 = parseInt(str.substr(i + 7, 2), 16); + newStr += String.fromCharCode((c & 15) << 12 | (_c & 63) << 6 | c3 & 63); + } else { + newStr += str.substr(i, 9); + } + i += 9; + } else { + newStr += str.substr(i, 3); + i += 3; + } + } + return newStr; + } + function _normalizeComponentEncoding(components, protocol) { + function decodeUnreserved2(str) { + var decStr = pctDecChars(str); + return !decStr.match(protocol.UNRESERVED) ? str : decStr; + } + if (components.scheme) components.scheme = String(components.scheme).replace(protocol.PCT_ENCODED, decodeUnreserved2).toLowerCase().replace(protocol.NOT_SCHEME, ""); + if (components.userinfo !== void 0) components.userinfo = String(components.userinfo).replace(protocol.PCT_ENCODED, decodeUnreserved2).replace(protocol.NOT_USERINFO, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); + if (components.host !== void 0) components.host = String(components.host).replace(protocol.PCT_ENCODED, decodeUnreserved2).toLowerCase().replace(protocol.NOT_HOST, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); + if (components.path !== void 0) components.path = String(components.path).replace(protocol.PCT_ENCODED, decodeUnreserved2).replace(components.scheme ? protocol.NOT_PATH : protocol.NOT_PATH_NOSCHEME, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); + if (components.query !== void 0) components.query = String(components.query).replace(protocol.PCT_ENCODED, decodeUnreserved2).replace(protocol.NOT_QUERY, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); + if (components.fragment !== void 0) components.fragment = String(components.fragment).replace(protocol.PCT_ENCODED, decodeUnreserved2).replace(protocol.NOT_FRAGMENT, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); + return components; + } + function _stripLeadingZeros(str) { + return str.replace(/^0*(.*)/, "$1") || "0"; + } + function _normalizeIPv4(host, protocol) { + var matches = host.match(protocol.IPV4ADDRESS) || []; + var _matches = slicedToArray(matches, 2), address = _matches[1]; + if (address) { + return address.split(".").map(_stripLeadingZeros).join("."); + } else { + return host; + } + } + function _normalizeIPv6(host, protocol) { + var matches = host.match(protocol.IPV6ADDRESS) || []; + var _matches2 = slicedToArray(matches, 3), address = _matches2[1], zone = _matches2[2]; + if (address) { + var _address$toLowerCase$ = address.toLowerCase().split("::").reverse(), _address$toLowerCase$2 = slicedToArray(_address$toLowerCase$, 2), last = _address$toLowerCase$2[0], first = _address$toLowerCase$2[1]; + var firstFields = first ? first.split(":").map(_stripLeadingZeros) : []; + var lastFields = last.split(":").map(_stripLeadingZeros); + var isLastFieldIPv4Address = protocol.IPV4ADDRESS.test(lastFields[lastFields.length - 1]); + var fieldCount = isLastFieldIPv4Address ? 7 : 8; + var lastFieldsStart = lastFields.length - fieldCount; + var fields = Array(fieldCount); + for (var x = 0; x < fieldCount; ++x) { + fields[x] = firstFields[x] || lastFields[lastFieldsStart + x] || ""; + } + if (isLastFieldIPv4Address) { + fields[fieldCount - 1] = _normalizeIPv4(fields[fieldCount - 1], protocol); + } + var allZeroFields = fields.reduce(function(acc, field, index) { + if (!field || field === "0") { + var lastLongest = acc[acc.length - 1]; + if (lastLongest && lastLongest.index + lastLongest.length === index) { + lastLongest.length++; + } else { + acc.push({ index, length: 1 }); + } + } + return acc; + }, []); + var longestZeroFields = allZeroFields.sort(function(a, b) { + return b.length - a.length; + })[0]; + var newHost = void 0; + if (longestZeroFields && longestZeroFields.length > 1) { + var newFirst = fields.slice(0, longestZeroFields.index); + var newLast = fields.slice(longestZeroFields.index + longestZeroFields.length); + newHost = newFirst.join(":") + "::" + newLast.join(":"); + } else { + newHost = fields.join(":"); + } + if (zone) { + newHost += "%" + zone; + } + return newHost; + } else { + return host; + } + } + var URI_PARSE = /^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i; + var NO_MATCH_IS_UNDEFINED = "".match(/(){0}/)[1] === void 0; + function parse2(uriString) { + var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; + var components = {}; + var protocol = options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL; + if (options.reference === "suffix") uriString = (options.scheme ? options.scheme + ":" : "") + "//" + uriString; + var matches = uriString.match(URI_PARSE); + if (matches) { + if (NO_MATCH_IS_UNDEFINED) { + components.scheme = matches[1]; + components.userinfo = matches[3]; + components.host = matches[4]; + components.port = parseInt(matches[5], 10); + components.path = matches[6] || ""; + components.query = matches[7]; + components.fragment = matches[8]; + if (isNaN(components.port)) { + components.port = matches[5]; + } + } else { + components.scheme = matches[1] || void 0; + components.userinfo = uriString.indexOf("@") !== -1 ? matches[3] : void 0; + components.host = uriString.indexOf("//") !== -1 ? matches[4] : void 0; + components.port = parseInt(matches[5], 10); + components.path = matches[6] || ""; + components.query = uriString.indexOf("?") !== -1 ? matches[7] : void 0; + components.fragment = uriString.indexOf("#") !== -1 ? matches[8] : void 0; + if (isNaN(components.port)) { + components.port = uriString.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/) ? matches[4] : void 0; + } + } + if (components.host) { + components.host = _normalizeIPv6(_normalizeIPv4(components.host, protocol), protocol); + } + if (components.scheme === void 0 && components.userinfo === void 0 && components.host === void 0 && components.port === void 0 && !components.path && components.query === void 0) { + components.reference = "same-document"; + } else if (components.scheme === void 0) { + components.reference = "relative"; + } else if (components.fragment === void 0) { + components.reference = "absolute"; + } else { + components.reference = "uri"; + } + if (options.reference && options.reference !== "suffix" && options.reference !== components.reference) { + components.error = components.error || "URI is not a " + options.reference + " reference."; + } + var schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()]; + if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) { + if (components.host && (options.domainHost || schemeHandler && schemeHandler.domainHost)) { + try { + components.host = punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase()); + } catch (e) { + components.error = components.error || "Host's domain name can not be converted to ASCII via punycode: " + e; + } + } + _normalizeComponentEncoding(components, URI_PROTOCOL); + } else { + _normalizeComponentEncoding(components, protocol); + } + if (schemeHandler && schemeHandler.parse) { + schemeHandler.parse(components, options); + } + } else { + components.error = components.error || "URI can not be parsed."; + } + return components; + } + function _recomposeAuthority(components, options) { + var protocol = options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL; + var uriTokens = []; + if (components.userinfo !== void 0) { + uriTokens.push(components.userinfo); + uriTokens.push("@"); + } + if (components.host !== void 0) { + uriTokens.push(_normalizeIPv6(_normalizeIPv4(String(components.host), protocol), protocol).replace(protocol.IPV6ADDRESS, function(_2, $1, $2) { + return "[" + $1 + ($2 ? "%25" + $2 : "") + "]"; + })); + } + if (typeof components.port === "number" || typeof components.port === "string") { + uriTokens.push(":"); + uriTokens.push(String(components.port)); + } + return uriTokens.length ? uriTokens.join("") : void 0; + } + var RDS1 = /^\.\.?\//; + var RDS2 = /^\/\.(\/|$)/; + var RDS3 = /^\/\.\.(\/|$)/; + var RDS5 = /^\/?(?:.|\n)*?(?=\/|$)/; + function removeDotSegments(input) { + var 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 = ""; + } else { + var im = input.match(RDS5); + if (im) { + var s = im[0]; + input = input.slice(s.length); + output.push(s); + } else { + throw new Error("Unexpected dot segment condition"); + } + } + } + return output.join(""); + } + function serialize(components) { + var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; + var protocol = options.iri ? IRI_PROTOCOL : URI_PROTOCOL; + var uriTokens = []; + var schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()]; + if (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(components, options); + if (components.host) { + if (protocol.IPV6ADDRESS.test(components.host)) { + } else if (options.domainHost || schemeHandler && schemeHandler.domainHost) { + try { + components.host = !options.iri ? punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase()) : punycode.toUnicode(components.host); + } catch (e) { + components.error = components.error || "Host's domain name can not be converted to " + (!options.iri ? "ASCII" : "Unicode") + " via punycode: " + e; + } + } + } + _normalizeComponentEncoding(components, protocol); + if (options.reference !== "suffix" && components.scheme) { + uriTokens.push(components.scheme); + uriTokens.push(":"); + } + var authority = _recomposeAuthority(components, options); + if (authority !== void 0) { + if (options.reference !== "suffix") { + uriTokens.push("//"); + } + uriTokens.push(authority); + if (components.path && components.path.charAt(0) !== "/") { + uriTokens.push("/"); + } + } + if (components.path !== void 0) { + var s = components.path; + if (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) { + s = removeDotSegments(s); + } + if (authority === void 0) { + s = s.replace(/^\/\//, "/%2F"); + } + uriTokens.push(s); + } + if (components.query !== void 0) { + uriTokens.push("?"); + uriTokens.push(components.query); + } + if (components.fragment !== void 0) { + uriTokens.push("#"); + uriTokens.push(components.fragment); + } + return uriTokens.join(""); + } + function resolveComponents(base2, relative) { + var options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}; + var skipNormalization = arguments[3]; + var target = {}; + if (!skipNormalization) { + base2 = parse2(serialize(base2, options), options); + relative = parse2(serialize(relative, options), options); + } + 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 !== void 0 || relative.host !== void 0 || relative.port !== void 0) { + target.userinfo = relative.userinfo; + target.host = relative.host; + target.port = relative.port; + target.path = removeDotSegments(relative.path || ""); + target.query = relative.query; + } else { + if (!relative.path) { + target.path = base2.path; + if (relative.query !== void 0) { + target.query = relative.query; + } else { + target.query = base2.query; + } + } else { + if (relative.path.charAt(0) === "/") { + target.path = removeDotSegments(relative.path); + } else { + if ((base2.userinfo !== void 0 || base2.host !== void 0 || base2.port !== void 0) && !base2.path) { + target.path = "/" + relative.path; + } else if (!base2.path) { + target.path = relative.path; + } else { + target.path = base2.path.slice(0, base2.path.lastIndexOf("/") + 1) + relative.path; + } + target.path = removeDotSegments(target.path); + } + target.query = relative.query; + } + target.userinfo = base2.userinfo; + target.host = base2.host; + target.port = base2.port; + } + target.scheme = base2.scheme; + } + target.fragment = relative.fragment; + return target; + } + function resolve(baseURI, relativeURI, options) { + var schemelessOptions = assign({ scheme: "null" }, options); + return serialize(resolveComponents(parse2(baseURI, schemelessOptions), parse2(relativeURI, schemelessOptions), schemelessOptions, true), schemelessOptions); + } + function normalize(uri, options) { + if (typeof uri === "string") { + uri = serialize(parse2(uri, options), options); + } else if (typeOf(uri) === "object") { + uri = parse2(serialize(uri, options), options); + } + return uri; + } + function equal(uriA, uriB, options) { + if (typeof uriA === "string") { + uriA = serialize(parse2(uriA, options), options); + } else if (typeOf(uriA) === "object") { + uriA = serialize(uriA, options); + } + if (typeof uriB === "string") { + uriB = serialize(parse2(uriB, options), options); + } else if (typeOf(uriB) === "object") { + uriB = serialize(uriB, options); + } + return uriA === uriB; + } + function escapeComponent(str, options) { + return str && str.toString().replace(!options || !options.iri ? URI_PROTOCOL.ESCAPE : IRI_PROTOCOL.ESCAPE, pctEncChar); + } + function unescapeComponent(str, options) { + return str && str.toString().replace(!options || !options.iri ? URI_PROTOCOL.PCT_ENCODED : IRI_PROTOCOL.PCT_ENCODED, pctDecChars); + } + var handler = { + scheme: "http", + domainHost: true, + parse: function parse3(components, options) { + if (!components.host) { + components.error = components.error || "HTTP URIs must have a host."; + } + return components; + }, + serialize: function serialize2(components, options) { + var secure = String(components.scheme).toLowerCase() === "https"; + if (components.port === (secure ? 443 : 80) || components.port === "") { + components.port = void 0; + } + if (!components.path) { + components.path = "/"; + } + return components; + } + }; + var handler$1 = { + scheme: "https", + domainHost: handler.domainHost, + parse: handler.parse, + serialize: handler.serialize + }; + function isSecure(wsComponents) { + return typeof wsComponents.secure === "boolean" ? wsComponents.secure : String(wsComponents.scheme).toLowerCase() === "wss"; + } + var handler$2 = { + scheme: "ws", + domainHost: true, + parse: function parse3(components, options) { + var wsComponents = components; + wsComponents.secure = isSecure(wsComponents); + wsComponents.resourceName = (wsComponents.path || "/") + (wsComponents.query ? "?" + wsComponents.query : ""); + wsComponents.path = void 0; + wsComponents.query = void 0; + return wsComponents; + }, + serialize: function serialize2(wsComponents, options) { + if (wsComponents.port === (isSecure(wsComponents) ? 443 : 80) || wsComponents.port === "") { + wsComponents.port = void 0; + } + if (typeof wsComponents.secure === "boolean") { + wsComponents.scheme = wsComponents.secure ? "wss" : "ws"; + wsComponents.secure = void 0; + } + if (wsComponents.resourceName) { + var _wsComponents$resourc = wsComponents.resourceName.split("?"), _wsComponents$resourc2 = slicedToArray(_wsComponents$resourc, 2), path = _wsComponents$resourc2[0], query = _wsComponents$resourc2[1]; + wsComponents.path = path && path !== "/" ? path : void 0; + wsComponents.query = query; + wsComponents.resourceName = void 0; + } + wsComponents.fragment = void 0; + return wsComponents; + } + }; + var handler$3 = { + scheme: "wss", + domainHost: handler$2.domainHost, + parse: handler$2.parse, + serialize: handler$2.serialize + }; + var O = {}; + var isIRI = true; + var UNRESERVED$$ = "[A-Za-z0-9\\-\\.\\_\\~" + (isIRI ? "\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF" : "") + "]"; + var HEXDIG$$ = "[0-9A-Fa-f]"; + var PCT_ENCODED$ = subexp(subexp("%[EFef]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%" + HEXDIG$$ + HEXDIG$$)); + var ATEXT$$ = "[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]"; + var QTEXT$$ = "[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]"; + var VCHAR$$ = merge(QTEXT$$, '[\\"\\\\]'); + var SOME_DELIMS$$ = "[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"; + var UNRESERVED = new RegExp(UNRESERVED$$, "g"); + var PCT_ENCODED = new RegExp(PCT_ENCODED$, "g"); + var NOT_LOCAL_PART = new RegExp(merge("[^]", ATEXT$$, "[\\.]", '[\\"]', VCHAR$$), "g"); + var NOT_HFNAME = new RegExp(merge("[^]", UNRESERVED$$, SOME_DELIMS$$), "g"); + var NOT_HFVALUE = NOT_HFNAME; + function decodeUnreserved(str) { + var decStr = pctDecChars(str); + return !decStr.match(UNRESERVED) ? str : decStr; + } + var handler$4 = { + scheme: "mailto", + parse: function parse$$1(components, options) { + var mailtoComponents = components; + var to = mailtoComponents.to = mailtoComponents.path ? mailtoComponents.path.split(",") : []; + mailtoComponents.path = void 0; + if (mailtoComponents.query) { + var unknownHeaders = false; + var headers = {}; + var hfields = mailtoComponents.query.split("&"); + for (var x = 0, xl = hfields.length; x < xl; ++x) { + var hfield = hfields[x].split("="); + switch (hfield[0]) { + case "to": + var toAddrs = hfield[1].split(","); + for (var _x = 0, _xl = toAddrs.length; _x < _xl; ++_x) { + to.push(toAddrs[_x]); + } + break; + case "subject": + mailtoComponents.subject = unescapeComponent(hfield[1], options); + break; + case "body": + mailtoComponents.body = unescapeComponent(hfield[1], options); + break; + default: + unknownHeaders = true; + headers[unescapeComponent(hfield[0], options)] = unescapeComponent(hfield[1], options); + break; + } + } + if (unknownHeaders) mailtoComponents.headers = headers; + } + mailtoComponents.query = void 0; + for (var _x2 = 0, _xl2 = to.length; _x2 < _xl2; ++_x2) { + var addr = to[_x2].split("@"); + addr[0] = unescapeComponent(addr[0]); + if (!options.unicodeSupport) { + try { + addr[1] = punycode.toASCII(unescapeComponent(addr[1], options).toLowerCase()); + } catch (e) { + mailtoComponents.error = mailtoComponents.error || "Email address's domain name can not be converted to ASCII via punycode: " + e; + } + } else { + addr[1] = unescapeComponent(addr[1], options).toLowerCase(); + } + to[_x2] = addr.join("@"); + } + return mailtoComponents; + }, + serialize: function serialize$$1(mailtoComponents, options) { + var components = mailtoComponents; + var to = toArray2(mailtoComponents.to); + if (to) { + for (var x = 0, xl = to.length; x < xl; ++x) { + var toAddr = String(to[x]); + var atIdx = toAddr.lastIndexOf("@"); + var localPart = toAddr.slice(0, atIdx).replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_LOCAL_PART, pctEncChar); + var domain = toAddr.slice(atIdx + 1); + try { + domain = !options.iri ? punycode.toASCII(unescapeComponent(domain, options).toLowerCase()) : punycode.toUnicode(domain); + } catch (e) { + components.error = components.error || "Email address's domain name can not be converted to " + (!options.iri ? "ASCII" : "Unicode") + " via punycode: " + e; + } + to[x] = localPart + "@" + domain; + } + components.path = to.join(","); + } + var headers = mailtoComponents.headers = mailtoComponents.headers || {}; + if (mailtoComponents.subject) headers["subject"] = mailtoComponents.subject; + if (mailtoComponents.body) headers["body"] = mailtoComponents.body; + var fields = []; + for (var name in headers) { + if (headers[name] !== O[name]) { + fields.push(name.replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFNAME, pctEncChar) + "=" + headers[name].replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFVALUE, pctEncChar)); + } + } + if (fields.length) { + components.query = fields.join("&"); + } + return components; + } + }; + var URN_PARSE = /^([^\:]+)\:(.*)/; + var handler$5 = { + scheme: "urn", + parse: function parse$$1(components, options) { + var matches = components.path && components.path.match(URN_PARSE); + var urnComponents = components; + if (matches) { + var scheme = options.scheme || urnComponents.scheme || "urn"; + var nid = matches[1].toLowerCase(); + var nss = matches[2]; + var urnScheme = scheme + ":" + (options.nid || nid); + var schemeHandler = SCHEMES[urnScheme]; + urnComponents.nid = nid; + urnComponents.nss = nss; + urnComponents.path = void 0; + if (schemeHandler) { + urnComponents = schemeHandler.parse(urnComponents, options); + } + } else { + urnComponents.error = urnComponents.error || "URN can not be parsed."; + } + return urnComponents; + }, + serialize: function serialize$$1(urnComponents, options) { + var scheme = options.scheme || urnComponents.scheme || "urn"; + var nid = urnComponents.nid; + var urnScheme = scheme + ":" + (options.nid || nid); + var schemeHandler = SCHEMES[urnScheme]; + if (schemeHandler) { + urnComponents = schemeHandler.serialize(urnComponents, options); + } + var uriComponents = urnComponents; + var nss = urnComponents.nss; + uriComponents.path = (nid || options.nid) + ":" + nss; + return uriComponents; + } + }; + var UUID = /^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/; + var handler$6 = { + scheme: "urn:uuid", + parse: function parse3(urnComponents, options) { + var uuidComponents = urnComponents; + uuidComponents.uuid = uuidComponents.nss; + uuidComponents.nss = void 0; + if (!options.tolerant && (!uuidComponents.uuid || !uuidComponents.uuid.match(UUID))) { + uuidComponents.error = uuidComponents.error || "UUID is not valid."; + } + return uuidComponents; + }, + serialize: function serialize2(uuidComponents, options) { + var urnComponents = uuidComponents; + urnComponents.nss = (uuidComponents.uuid || "").toLowerCase(); + return urnComponents; + } + }; + SCHEMES[handler.scheme] = handler; + SCHEMES[handler$1.scheme] = handler$1; + SCHEMES[handler$2.scheme] = handler$2; + SCHEMES[handler$3.scheme] = handler$3; + SCHEMES[handler$4.scheme] = handler$4; + SCHEMES[handler$5.scheme] = handler$5; + SCHEMES[handler$6.scheme] = handler$6; + exports3.SCHEMES = SCHEMES; + exports3.pctEncChar = pctEncChar; + exports3.pctDecChars = pctDecChars; + exports3.parse = parse2; + exports3.removeDotSegments = removeDotSegments; + exports3.serialize = serialize; + exports3.resolveComponents = resolveComponents; + exports3.resolve = resolve; + exports3.normalize = normalize; + exports3.equal = equal; + exports3.escapeComponent = escapeComponent; + exports3.unescapeComponent = unescapeComponent; + Object.defineProperty(exports3, "__esModule", { value: true }); + }); + } +}); + +// ../../node_modules/ajv/dist/runtime/uri.js +var require_uri = __commonJS({ + "../../node_modules/ajv/dist/runtime/uri.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var uri = require_uri_all(); + uri.code = 'require("ajv/dist/runtime/uri").default'; + exports2.default = uri; + } +}); + +// ../../node_modules/ajv/dist/core.js +var require_core2 = __commonJS({ + "../../node_modules/ajv/dist/core.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.CodeGen = exports2.Name = exports2.nil = exports2.stringify = exports2.str = exports2._ = exports2.KeywordCxt = void 0; + var validate_1 = require_validate(); + Object.defineProperty(exports2, "KeywordCxt", { enumerable: true, get: function() { + return validate_1.KeywordCxt; + } }); + var codegen_1 = require_codegen(); + Object.defineProperty(exports2, "_", { enumerable: true, get: function() { + return codegen_1._; + } }); + Object.defineProperty(exports2, "str", { enumerable: true, get: function() { + return codegen_1.str; + } }); + Object.defineProperty(exports2, "stringify", { enumerable: true, get: function() { + return codegen_1.stringify; + } }); + Object.defineProperty(exports2, "nil", { enumerable: true, get: function() { + return codegen_1.nil; + } }); + Object.defineProperty(exports2, "Name", { enumerable: true, get: function() { + return codegen_1.Name; + } }); + Object.defineProperty(exports2, "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_util(); + var $dataRefSchema = require_data(); + var uri_1 = require_uri(); + var defaultRegExp = (str, flags) => new RegExp(str, flags); + defaultRegExp.code = "new RegExp"; + var META_IGNORE_OPTIONS = ["removeAdditional", "useDefaults", "coerceTypes"]; + 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, _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 === 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 = (_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 + }; + } + var Ajv = 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; + } + validate(schemaKeyRef, data) { + let v; + if (typeof schemaKeyRef == "string") { + v = this.getSchema(schemaKeyRef); + if (!v) + throw new Error(`no schema with key or ref "${schemaKeyRef}"`); + } else { + v = this.compile(schemaKeyRef); + } + const valid = v(data); + if (!("$async" in v)) + this.errors = v.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 (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); + } + } + 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 p = this._loading[ref]; + if (p) + return p; + 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 ? (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) { + 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); + } + 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((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); + 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 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; + } + } + }; + exports2.default = Ajv; + Ajv.ValidationError = validation_error_1.default; + Ajv.MissingRefError = ref_error_1.default; + 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); + 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; + } + var noLogs = { log() { + }, warn() { + }, error() { + } }; + function getLogger(logger) { + if (logger === false) + return noLogs; + if (logger === void 0) + return console; + if (logger.log && logger.warn && logger.error) + return logger; + 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'); + } + } + 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); + } + 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); + } 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] }; + } + } +}); + +// ../../node_modules/ajv/dist/vocabularies/core/id.js +var require_id = __commonJS({ + "../../node_modules/ajv/dist/vocabularies/core/id.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var def = { + keyword: "id", + code() { + throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID'); + } + }; + exports2.default = def; + } +}); + +// ../../node_modules/ajv/dist/vocabularies/core/ref.js +var require_ref = __commonJS({ + "../../node_modules/ajv/dist/vocabularies/core/ref.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.callRef = exports2.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_util(); + var def = { + keyword: "$ref", + schemaType: "string", + code(cxt) { + const { gen, schema: $ref, it } = cxt; + const { baseId, schemaEnv: env, validateName, opts, self: self2 } = it; + const { root } = env; + if (($ref === "#" || $ref === "#/") && baseId === root.baseId) + return callRootRef(); + const schOrEnv = compile_1.resolveRef.call(self2, root, baseId, $ref); + if (schOrEnv === void 0) + 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); + } + function callValidate(sch) { + const v = getValidate(cxt, sch); + callRef(cxt, v, 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); + 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`; + } + exports2.getValidate = getValidate; + 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); + 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() { + cxt.result((0, code_1.callValidateCode)(cxt, v, passCxt), () => addEvaluatedFrom(v), () => addErrorsFrom(v)); + } + 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 (!it.opts.unevaluated) + return; + const schEvaluated = (_a = sch === null || sch === void 0 ? void 0 : sch.validate) === null || _a === void 0 ? void 0 : _a.evaluated; + if (it.props !== true) { + if (schEvaluated && !schEvaluated.dynamicProps) { + if (schEvaluated.props !== void 0) { + 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); + } + } + if (it.items !== true) { + if (schEvaluated && !schEvaluated.dynamicItems) { + if (schEvaluated.items !== void 0) { + it.items = util_1.mergeEvaluated.items(gen, schEvaluated.items, it.items); + } + } 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); + } + } + } + } + exports2.callRef = callRef; + exports2.default = def; + } +}); + +// ../../node_modules/ajv/dist/vocabularies/core/index.js +var require_core3 = __commonJS({ + "../../node_modules/ajv/dist/vocabularies/core/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var id_1 = require_id(); + var ref_1 = require_ref(); + var core = [ + "$schema", + "$id", + "$defs", + "$vocabulary", + { keyword: "$comment" }, + "definitions", + id_1.default, + ref_1.default + ]; + exports2.default = core; + } +}); + +// ../../node_modules/ajv/dist/vocabularies/validation/limitNumber.js +var require_limitNumber = __commonJS({ + "../../node_modules/ajv/dist/vocabularies/validation/limitNumber.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__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 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}}` + }; + var 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})`); + } + }; + exports2.default = def; + } +}); + +// ../../node_modules/ajv/dist/vocabularies/validation/multipleOf.js +var require_multipleOf = __commonJS({ + "../../node_modules/ajv/dist/vocabularies/validation/multipleOf.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var codegen_1 = require_codegen(); + var error = { + 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, + code(cxt) { + const { gen, data, schemaCode, it } = cxt; + 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}))`); + } + }; + exports2.default = def; + } +}); + +// ../../node_modules/ajv/dist/runtime/ucs2length.js +var require_ucs2length = __commonJS({ + "../../node_modules/ajv/dist/runtime/ucs2length.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + 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 >= 55296 && value <= 56319 && pos < len) { + value = str.charCodeAt(pos); + if ((value & 64512) === 56320) + pos++; + } + } + return length; + } + exports2.default = ucs2length; + ucs2length.code = 'require("ajv/dist/runtime/ucs2length").default'; + } +}); + +// ../../node_modules/ajv/dist/vocabularies/validation/limitLength.js +var require_limitLength = __commonJS({ + "../../node_modules/ajv/dist/vocabularies/validation/limitLength.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var codegen_1 = require_codegen(); + var util_1 = require_util(); + var ucs2length_1 = require_ucs2length(); + var 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}}` + }; + var 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}`); + } + }; + exports2.default = def; + } +}); + +// ../../node_modules/ajv/dist/vocabularies/validation/pattern.js +var require_pattern = __commonJS({ + "../../node_modules/ajv/dist/vocabularies/validation/pattern.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var code_1 = require_code2(); + var codegen_1 = require_codegen(); + var error = { + 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, + code(cxt) { + const { data, $data, schema: schema2, schemaCode, it } = cxt; + const u = it.opts.unicodeRegExp ? "u" : ""; + const regExp = $data ? (0, codegen_1._)`(new RegExp(${schemaCode}, ${u}))` : (0, code_1.usePattern)(cxt, schema2); + cxt.fail$data((0, codegen_1._)`!${regExp}.test(${data})`); + } + }; + exports2.default = def; + } +}); + +// ../../node_modules/ajv/dist/vocabularies/validation/limitProperties.js +var require_limitProperties = __commonJS({ + "../../node_modules/ajv/dist/vocabularies/validation/limitProperties.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var codegen_1 = require_codegen(); + var 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}}` + }; + var 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}`); + } + }; + exports2.default = def; + } +}); + +// ../../node_modules/ajv/dist/vocabularies/validation/required.js +var require_required = __commonJS({ + "../../node_modules/ajv/dist/vocabularies/validation/required.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var code_1 = require_code2(); + var codegen_1 = require_codegen(); + var util_1 = require_util(); + var error = { + 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, + code(cxt) { + const { gen, schema: schema2, schemaCode, data, $data, it } = cxt; + const { opts } = it; + if (!$data && schema2.length === 0) + return; + const useLoop = schema2.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 schema2) { + if ((props === null || props === void 0 ? void 0 : props[requiredKey]) === void 0 && !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); + } + } + } + function allErrorsMode() { + if (useLoop || $data) { + cxt.block$data(codegen_1.nil, loopAllRequired); + } else { + for (const prop of schema2) { + (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); + } + } + }; + exports2.default = def; + } +}); + +// ../../node_modules/ajv/dist/vocabularies/validation/limitItems.js +var require_limitItems = __commonJS({ + "../../node_modules/ajv/dist/vocabularies/validation/limitItems.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var codegen_1 = require_codegen(); + var 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}}` + }; + var 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}`); + } + }; + exports2.default = def; + } +}); + +// ../../node_modules/ajv/dist/runtime/equal.js +var require_equal = __commonJS({ + "../../node_modules/ajv/dist/runtime/equal.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var equal = require_fast_deep_equal(); + equal.code = 'require("ajv/dist/runtime/equal").default'; + exports2.default = equal; + } +}); + +// ../../node_modules/ajv/dist/vocabularies/validation/uniqueItems.js +var require_uniqueItems = __commonJS({ + "../../node_modules/ajv/dist/vocabularies/validation/uniqueItems.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var dataType_1 = require_dataType(); + var codegen_1 = require_codegen(); + var util_1 = require_util(); + var equal_1 = require_equal(); + var 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}}` + }; + var def = { + keyword: "uniqueItems", + type: "array", + schemaType: "boolean", + $data: true, + error, + code(cxt) { + const { gen, data, $data, schema: schema2, parentSchema, schemaCode, it } = 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 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); + }))); + } + } + }; + exports2.default = def; + } +}); + +// ../../node_modules/ajv/dist/vocabularies/validation/const.js +var require_const = __commonJS({ + "../../node_modules/ajv/dist/vocabularies/validation/const.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var codegen_1 = require_codegen(); + var util_1 = require_util(); + var equal_1 = require_equal(); + var error = { + message: "must be equal to constant", + params: ({ schemaCode }) => (0, codegen_1._)`{allowedValue: ${schemaCode}}` + }; + var def = { + keyword: "const", + $data: true, + error, + 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}`); + } + } + }; + exports2.default = def; + } +}); + +// ../../node_modules/ajv/dist/vocabularies/validation/enum.js +var require_enum = __commonJS({ + "../../node_modules/ajv/dist/vocabularies/validation/enum.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var codegen_1 = require_codegen(); + var util_1 = require_util(); + var equal_1 = require_equal(); + var error = { + 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, + code(cxt) { + const { gen, data, $data, schema: schema2, schemaCode, it } = cxt; + if (!$data && schema2.length === 0) + throw new Error("enum must have non-empty array"); + const useLoop = schema2.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); + } 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, i) => equalCode(vSchema, i))); + } + 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())); + } + function equalCode(vSchema, i) { + const sch = schema2[i]; + return typeof sch === "object" && sch !== null ? (0, codegen_1._)`${getEql()}(${data}, ${vSchema}[${i}])` : (0, codegen_1._)`${data} === ${sch}`; + } + } + }; + exports2.default = def; + } +}); + +// ../../node_modules/ajv/dist/vocabularies/validation/index.js +var require_validation = __commonJS({ + "../../node_modules/ajv/dist/vocabularies/validation/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__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 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, + // array + limitItems_1.default, + uniqueItems_1.default, + // any + { keyword: "type", schemaType: ["string", "array"] }, + { keyword: "nullable", schemaType: "boolean" }, + const_1.default, + enum_1.default + ]; + exports2.default = validation; + } +}); + +// ../../node_modules/ajv/dist/vocabularies/applicator/additionalItems.js +var require_additionalItems = __commonJS({ + "../../node_modules/ajv/dist/vocabularies/applicator/additionalItems.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.validateAdditionalItems = void 0; + var codegen_1 = require_codegen(); + var util_1 = require_util(); + var error = { + 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, + 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; + } + validateAdditionalItems(cxt, items); + } + }; + function validateAdditionalItems(cxt, items) { + const { gen, schema: schema2, data, keyword, it } = cxt; + it.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)(it, 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, (i) => { + cxt.subschema({ keyword, dataProp: i, dataPropType: util_1.Type.Num }, valid); + if (!it.allErrors) + gen.if((0, codegen_1.not)(valid), () => gen.break()); + }); + } + } + exports2.validateAdditionalItems = validateAdditionalItems; + exports2.default = def; + } +}); + +// ../../node_modules/ajv/dist/vocabularies/applicator/items.js +var require_items = __commonJS({ + "../../node_modules/ajv/dist/vocabularies/applicator/items.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.validateTuple = void 0; + var codegen_1 = require_codegen(); + var util_1 = require_util(); + var code_1 = require_code2(); + var def = { + keyword: "items", + type: "array", + schemaType: ["object", "array", "boolean"], + before: "uniqueItems", + code(cxt) { + const { schema: schema2, it } = cxt; + if (Array.isArray(schema2)) + return validateTuple(cxt, "additionalItems", schema2); + it.items = true; + if ((0, util_1.alwaysValidSchema)(it, schema2)) + 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); + } + } + } + exports2.validateTuple = validateTuple; + exports2.default = def; + } +}); + +// ../../node_modules/ajv/dist/vocabularies/applicator/prefixItems.js +var require_prefixItems = __commonJS({ + "../../node_modules/ajv/dist/vocabularies/applicator/prefixItems.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__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") + }; + exports2.default = def; + } +}); + +// ../../node_modules/ajv/dist/vocabularies/applicator/items2020.js +var require_items2020 = __commonJS({ + "../../node_modules/ajv/dist/vocabularies/applicator/items2020.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var codegen_1 = require_codegen(); + var util_1 = require_util(); + var code_1 = require_code2(); + var additionalItems_1 = require_additionalItems(); + var error = { + 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, + code(cxt) { + const { schema: schema2, parentSchema, it } = cxt; + const { prefixItems } = parentSchema; + it.items = true; + if ((0, util_1.alwaysValidSchema)(it, schema2)) + return; + if (prefixItems) + (0, additionalItems_1.validateAdditionalItems)(cxt, prefixItems); + else + cxt.ok((0, code_1.validateArray)(cxt)); + } + }; + exports2.default = def; + } +}); + +// ../../node_modules/ajv/dist/vocabularies/applicator/contains.js +var require_contains = __commonJS({ + "../../node_modules/ajv/dist/vocabularies/applicator/contains.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var codegen_1 = require_codegen(); + var util_1 = require_util(); + var error = { + 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, + code(cxt) { + const { gen, schema: schema2, parentSchema, data, it } = cxt; + let min; + let max; + const { minContains, maxContains } = parentSchema; + if (it.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)(it, `"minContains" == 0 without "maxContains": "contains" keyword ignored`); + return; + } + if (max !== void 0 && min > max) { + (0, util_1.checkStrictMode)(it, `"minContains" > "maxContains" is always invalid`); + cxt.fail(); + return; + } + if ((0, util_1.alwaysValidSchema)(it, schema2)) { + let cond = (0, codegen_1._)`${len} >= ${min}`; + if (max !== void 0) + cond = (0, codegen_1._)`${cond} && ${len} <= ${max}`; + cxt.pass(cond); + return; + } + it.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, (i) => { + cxt.subschema({ + keyword: "contains", + dataProp: i, + 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)); + } + } + } + }; + exports2.default = def; + } +}); + +// ../../node_modules/ajv/dist/vocabularies/applicator/dependencies.js +var require_dependencies = __commonJS({ + "../../node_modules/ajv/dist/vocabularies/applicator/dependencies.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.validateSchemaDeps = exports2.validatePropertyDeps = exports2.error = void 0; + var codegen_1 = require_codegen(); + var util_1 = require_util(); + var code_1 = require_code2(); + exports2.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: exports2.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]; + } + 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); + } + }); + } else { + gen.if((0, codegen_1._)`${hasProperty} && (${(0, code_1.checkMissingProp)(cxt, deps, missing)})`); + (0, code_1.reportMissingProp)(cxt, missing); + gen.else(); + } + } + } + exports2.validatePropertyDeps = validatePropertyDeps; + 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); + } + } + exports2.validateSchemaDeps = validateSchemaDeps; + exports2.default = def; + } +}); + +// ../../node_modules/ajv/dist/vocabularies/applicator/propertyNames.js +var require_propertyNames = __commonJS({ + "../../node_modules/ajv/dist/vocabularies/applicator/propertyNames.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var codegen_1 = require_codegen(); + var util_1 = require_util(); + var error = { + message: "property name must be valid", + params: ({ params }) => (0, codegen_1._)`{propertyName: ${params.propertyName}}` + }; + var def = { + keyword: "propertyNames", + type: "object", + schemaType: ["object", "boolean"], + error, + code(cxt) { + const { gen, schema: schema2, data, it } = cxt; + if ((0, util_1.alwaysValidSchema)(it, 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 (!it.allErrors) + gen.break(); + }); + }); + cxt.ok(valid); + } + }; + exports2.default = def; + } +}); + +// ../../node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js +var require_additionalProperties = __commonJS({ + "../../node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var code_1 = require_code2(); + var codegen_1 = require_codegen(); + var names_1 = require_names(); + var util_1 = require_util(); + var error = { + 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, + code(cxt) { + const { gen, schema: schema2, parentSchema, data, errsCount, it } = cxt; + if (!errsCount) + throw new Error("ajv implementation error"); + const { allErrors, opts } = it; + it.props = true; + if (opts.removeAdditional !== "all" && (0, util_1.alwaysValidSchema)(it, 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)(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); + } + 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)(it, 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); + } + } + }; + exports2.default = def; + } +}); + +// ../../node_modules/ajv/dist/vocabularies/applicator/properties.js +var require_properties = __commonJS({ + "../../node_modules/ajv/dist/vocabularies/applicator/properties.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var validate_1 = require_validate(); + var code_1 = require_code2(); + var util_1 = require_util(); + var additionalProperties_1 = require_additionalProperties(); + var def = { + keyword: "properties", + type: "object", + schemaType: "object", + code(cxt) { + const { gen, schema: schema2, parentSchema, data, it } = cxt; + if (it.opts.removeAdditional === "all" && parentSchema.additionalProperties === void 0) { + additionalProperties_1.default.code(new validate_1.KeywordCxt(it, additionalProperties_1.default, "additionalProperties")); + } + const allProps = (0, code_1.allSchemaProperties)(schema2); + for (const prop of allProps) { + it.definedProperties.add(prop); + } + if (it.opts.unevaluated && allProps.length && it.props !== true) { + it.props = util_1.mergeEvaluated.props(gen, (0, util_1.toHash)(allProps), it.props); + } + const properties = allProps.filter((p) => !(0, util_1.alwaysValidSchema)(it, schema2[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); + } + function hasDefault(prop) { + return it.opts.useDefaults && !it.compositeRule && schema2[prop].default !== void 0; + } + function applyPropertySchema(prop) { + cxt.subschema({ + keyword: "properties", + schemaProp: prop, + dataProp: prop + }, valid); + } + } + }; + exports2.default = def; + } +}); + +// ../../node_modules/ajv/dist/vocabularies/applicator/patternProperties.js +var require_patternProperties = __commonJS({ + "../../node_modules/ajv/dist/vocabularies/applicator/patternProperties.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var code_1 = require_code2(); + var codegen_1 = require_codegen(); + var util_1 = require_util(); + var util_2 = require_util(); + var def = { + keyword: "patternProperties", + type: "object", + schemaType: "object", + code(cxt) { + const { gen, schema: schema2, data, parentSchema, it } = cxt; + const { opts } = it; + const patterns = (0, code_1.allSchemaProperties)(schema2); + const alwaysValidPatterns = patterns.filter((p) => (0, util_1.alwaysValidSchema)(it, schema2[p])); + if (patterns.length === 0 || alwaysValidPatterns.length === patterns.length && (!it.opts.unevaluated || it.props === true)) { + return; + } + 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); + } + 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); + validateProperties(pat); + gen.if(valid); + } + } + } + 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)`); + } + } + } + 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) { + gen.if((0, codegen_1.not)(valid), () => gen.break()); + } + }); + }); + } + } + }; + exports2.default = def; + } +}); + +// ../../node_modules/ajv/dist/vocabularies/applicator/not.js +var require_not = __commonJS({ + "../../node_modules/ajv/dist/vocabularies/applicator/not.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var util_1 = require_util(); + var def = { + keyword: "not", + schemaType: ["object", "boolean"], + trackErrors: true, + code(cxt) { + const { gen, schema: schema2, it } = cxt; + if ((0, util_1.alwaysValidSchema)(it, 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" } + }; + exports2.default = def; + } +}); + +// ../../node_modules/ajv/dist/vocabularies/applicator/anyOf.js +var require_anyOf = __commonJS({ + "../../node_modules/ajv/dist/vocabularies/applicator/anyOf.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__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" } + }; + exports2.default = def; + } +}); + +// ../../node_modules/ajv/dist/vocabularies/applicator/oneOf.js +var require_oneOf = __commonJS({ + "../../node_modules/ajv/dist/vocabularies/applicator/oneOf.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var codegen_1 = require_codegen(); + var util_1 = require_util(); + var error = { + 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, + code(cxt) { + const { gen, schema: schema2, parentSchema, it } = cxt; + if (!Array.isArray(schema2)) + throw new Error("ajv implementation error"); + if (it.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, 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); + }); + }); + } + } + }; + exports2.default = def; + } +}); + +// ../../node_modules/ajv/dist/vocabularies/applicator/allOf.js +var require_allOf = __commonJS({ + "../../node_modules/ajv/dist/vocabularies/applicator/allOf.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var util_1 = require_util(); + var def = { + keyword: "allOf", + schemaType: "array", + code(cxt) { + const { gen, schema: schema2, it } = cxt; + if (!Array.isArray(schema2)) + throw new Error("ajv implementation error"); + const valid = gen.name("valid"); + schema2.forEach((sch, i) => { + if ((0, util_1.alwaysValidSchema)(it, sch)) + return; + const schCxt = cxt.subschema({ keyword: "allOf", schemaProp: i }, valid); + cxt.ok(valid); + cxt.mergeEvaluated(schCxt); + }); + } + }; + exports2.default = def; + } +}); + +// ../../node_modules/ajv/dist/vocabularies/applicator/if.js +var require_if = __commonJS({ + "../../node_modules/ajv/dist/vocabularies/applicator/if.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var codegen_1 = require_codegen(); + var util_1 = require_util(); + var error = { + 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, + code(cxt) { + const { gen, parentSchema, it } = cxt; + if (parentSchema.then === void 0 && parentSchema.else === void 0) { + (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)); + } 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(it, keyword) { + const schema2 = it.schema[keyword]; + return schema2 !== void 0 && !(0, util_1.alwaysValidSchema)(it, schema2); + } + exports2.default = def; + } +}); + +// ../../node_modules/ajv/dist/vocabularies/applicator/thenElse.js +var require_thenElse = __commonJS({ + "../../node_modules/ajv/dist/vocabularies/applicator/thenElse.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var util_1 = require_util(); + var def = { + keyword: ["then", "else"], + schemaType: ["object", "boolean"], + code({ keyword, parentSchema, it }) { + if (parentSchema.if === void 0) + (0, util_1.checkStrictMode)(it, `"${keyword}" without "if" is ignored`); + } + }; + exports2.default = def; + } +}); + +// ../../node_modules/ajv/dist/vocabularies/applicator/index.js +var require_applicator = __commonJS({ + "../../node_modules/ajv/dist/vocabularies/applicator/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__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; + } + exports2.default = getApplicator; + } +}); + +// ../../node_modules/ajv/dist/vocabularies/format/format.js +var require_format = __commonJS({ + "../../node_modules/ajv/dist/vocabularies/format/format.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var codegen_1 = require_codegen(); + var error = { + 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, + code(cxt, ruleType) { + const { gen, data, $data, schema: schema2, schemaCode, it } = cxt; + const { opts, errSchemaPath, schemaEnv, self: self2 } = it; + if (!opts.validateFormats) + return; + if ($data) + validate$DataFormat(); + else + validateFormat(); + function validate$DataFormat() { + const fmts = gen.scopeValue("formats", { + ref: self2.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 = self2.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) { + self2.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})`; + } + } + } + }; + exports2.default = def; + } +}); + +// ../../node_modules/ajv/dist/vocabularies/format/index.js +var require_format2 = __commonJS({ + "../../node_modules/ajv/dist/vocabularies/format/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var format_1 = require_format(); + var format = [format_1.default]; + exports2.default = format; + } +}); + +// ../../node_modules/ajv/dist/vocabularies/metadata.js +var require_metadata = __commonJS({ + "../../node_modules/ajv/dist/vocabularies/metadata.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.contentVocabulary = exports2.metadataVocabulary = void 0; + exports2.metadataVocabulary = [ + "title", + "description", + "default", + "deprecated", + "readOnly", + "writeOnly", + "examples" + ]; + exports2.contentVocabulary = [ + "contentMediaType", + "contentEncoding", + "contentSchema" + ]; + } +}); + +// ../../node_modules/ajv/dist/vocabularies/draft7.js +var require_draft7 = __commonJS({ + "../../node_modules/ajv/dist/vocabularies/draft7.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var core_1 = require_core3(); + var validation_1 = require_validation(); + var applicator_1 = require_applicator(); + var format_1 = require_format2(); + var metadata_1 = require_metadata(); + var draft7Vocabularies = [ + core_1.default, + validation_1.default, + (0, applicator_1.default)(), + format_1.default, + metadata_1.metadataVocabulary, + metadata_1.contentVocabulary + ]; + exports2.default = draft7Vocabularies; + } +}); + +// ../../node_modules/ajv/dist/vocabularies/discriminator/types.js +var require_types = __commonJS({ + "../../node_modules/ajv/dist/vocabularies/discriminator/types.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.DiscrError = void 0; + var DiscrError; + (function(DiscrError2) { + DiscrError2["Tag"] = "tag"; + DiscrError2["Mapping"] = "mapping"; + })(DiscrError = exports2.DiscrError || (exports2.DiscrError = {})); + } +}); + +// ../../node_modules/ajv/dist/vocabularies/discriminator/index.js +var require_discriminator = __commonJS({ + "../../node_modules/ajv/dist/vocabularies/discriminator/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var codegen_1 = require_codegen(); + var types_1 = require_types(); + var compile_1 = require_compile(); + var util_1 = require_util(); + var error = { + message: ({ params: { discrError, tagName } }) => discrError === types_1.DiscrError.Tag ? `tag "${tagName}" must be string` : `value of tag "${tagName}" must be in oneOf`, + params: ({ params: { discrError, tag, tagName } }) => (0, codegen_1._)`{error: ${discrError}, tag: ${tagName}, tagValue: ${tag}}` + }; + var def = { + keyword: "discriminator", + type: "object", + schemaType: "object", + error, + code(cxt) { + const { gen, data, schema: schema2, parentSchema, it } = cxt; + const { oneOf } = parentSchema; + if (!it.opts.discriminator) { + throw new Error("discriminator: requires discriminator option"); + } + const tagName = schema2.propertyName; + if (typeof tagName != "string") + throw new Error("discriminator: requires propertyName"); + if (schema2.mapping) + throw new Error("discriminator: mapping is not supported"); + if (!oneOf) + throw new Error("discriminator: requires oneOf 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: "oneOf", schemaProp }, _valid); + cxt.mergeEvaluated(schCxt, codegen_1.Name); + return _valid; + } + function getMapping() { + var _a; + const oneOfMapping = {}; + const topRequired = hasRequired(parentSchema); + let tagRequired = true; + for (let i = 0; i < oneOf.length; i++) { + let sch = oneOf[i]; + if ((sch === null || sch === void 0 ? void 0 : sch.$ref) && !(0, util_1.schemaHasRulesButRef)(sch, it.self.RULES)) { + sch = compile_1.resolveRef.call(it.self, it.schemaEnv.root, it.baseId, sch === null || sch === void 0 ? void 0 : sch.$ref); + 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: oneOf subschemas (or referenced schemas) must have "properties/${tagName}"`); + } + tagRequired = tagRequired && (topRequired || hasRequired(sch)); + addMappings(propSch, i); + } + if (!tagRequired) + throw new Error(`discriminator: "${tagName}" must be required`); + return oneOfMapping; + 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 oneOfMapping) { + throw new Error(`discriminator: "${tagName}" values must be unique strings`); + } + oneOfMapping[tagValue] = i; + } + } + } + }; + exports2.default = def; + } +}); + +// ../../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"(exports2, module2) { + module2.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 + }; + } +}); + +// ../../node_modules/ajv/dist/ajv.js +var require_ajv = __commonJS({ + "../../node_modules/ajv/dist/ajv.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.CodeGen = exports2.Name = exports2.nil = exports2.stringify = exports2.str = exports2._ = exports2.KeywordCxt = void 0; + var core_1 = require_core2(); + var draft7_1 = require_draft7(); + var discriminator_1 = require_discriminator(); + var draft7MetaSchema = require_json_schema_draft_07(); + var META_SUPPORT_DATA = ["/properties"]; + var META_SCHEMA_ID = "http://json-schema.org/draft-07/schema"; + var Ajv = class extends core_1.default { + _addVocabularies() { + super._addVocabularies(); + draft7_1.default.forEach((v) => this.addVocabulary(v)); + 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); + } + }; + module2.exports = exports2 = Ajv; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.default = Ajv; + var validate_1 = require_validate(); + Object.defineProperty(exports2, "KeywordCxt", { enumerable: true, get: function() { + return validate_1.KeywordCxt; + } }); + var codegen_1 = require_codegen(); + Object.defineProperty(exports2, "_", { enumerable: true, get: function() { + return codegen_1._; + } }); + Object.defineProperty(exports2, "str", { enumerable: true, get: function() { + return codegen_1.str; + } }); + Object.defineProperty(exports2, "stringify", { enumerable: true, get: function() { + return codegen_1.stringify; + } }); + Object.defineProperty(exports2, "nil", { enumerable: true, get: function() { + return codegen_1.nil; + } }); + Object.defineProperty(exports2, "Name", { enumerable: true, get: function() { + return codegen_1.Name; + } }); + Object.defineProperty(exports2, "CodeGen", { enumerable: true, get: function() { + return codegen_1.CodeGen; + } }); + } +}); + +// ../../node_modules/ajv-formats/dist/formats.js +var require_formats = __commonJS({ + "../../node_modules/ajv-formats/dist/formats.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.formatNames = exports2.fastFormats = exports2.fullFormats = void 0; + function fmtDef(validate2, compare) { + return { validate: validate2, compare }; + } + exports2.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(time, compareTime), + "date-time": fmtDef(date_time, compareDateTime), + // 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|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\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 + }; + exports2.fastFormats = { + ...exports2.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]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i, compareDateTime), + // 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 + }; + exports2.formatNames = Object.keys(exports2.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(str) { + const matches = DATE.exec(str); + 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 time(str, withTimeZone) { + const matches = TIME.exec(str); + if (!matches) + return false; + const hour = +matches[1]; + const minute = +matches[2]; + const second = +matches[3]; + const timeZone = matches[5]; + return (hour <= 23 && minute <= 59 && second <= 59 || hour === 23 && minute === 59 && second === 60) && (!withTimeZone || timeZone !== ""); + } + function compareTime(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] + (a1[4] || ""); + t2 = a2[1] + a2[2] + a2[3] + (a2[4] || ""); + if (t1 > t2) + return 1; + if (t1 < t2) + return -1; + return 0; + } + var DATE_TIME_SEPARATOR = /t|\s/i; + function date_time(str) { + const dateTime = str.split(DATE_TIME_SEPARATOR); + return dateTime.length === 2 && date(dateTime[0]) && time(dateTime[1], true); + } + function compareDateTime(dt1, dt2) { + if (!(dt1 && dt2)) + return void 0; + const [d1, t1] = dt1.split(DATE_TIME_SEPARATOR); + const [d2, t2] = dt2.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(str) { + return NOT_URI_FRAGMENT.test(str) && URI.test(str); + } + var BYTE = /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm; + function byte(str) { + BYTE.lastIndex = 0; + return BYTE.test(str); + } + 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(str) { + if (Z_ANCHOR.test(str)) + return false; + try { + new RegExp(str); + return true; + } catch (e) { + return false; + } + } + } +}); + +// ../../node_modules/ajv-formats/dist/limit.js +var require_limit = __commonJS({ + "../../node_modules/ajv-formats/dist/limit.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.formatLimitDefinition = void 0; + var ajv_1 = require_ajv(); + var codegen_1 = require_codegen(); + 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 error = { + message: ({ keyword, schemaCode }) => codegen_1.str`should be ${KWDs[keyword].okStr} ${schemaCode}`, + params: ({ keyword, schemaCode }) => codegen_1._`{comparison: ${KWDs[keyword].okStr}, limit: ${schemaCode}}` + }; + exports2.formatLimitDefinition = { + keyword: Object.keys(KWDs), + type: "string", + schemaType: "string", + $data: true, + error, + code(cxt) { + const { gen, data, schemaCode, keyword, it } = cxt; + const { opts, self: self2 } = it; + if (!opts.validateFormats) + return; + const fCxt = new ajv_1.KeywordCxt(it, self2.RULES.all.format.definition, "format"); + if (fCxt.$data) + validate$DataFormat(); + else + validateFormat(); + function validate$DataFormat() { + const fmts = gen.scopeValue("formats", { + ref: self2.formats, + code: opts.code.formats + }); + const fmt = gen.const("fmt", codegen_1._`${fmts}[${fCxt.schemaCode}]`); + cxt.fail$data(codegen_1.or(codegen_1._`typeof ${fmt} != "object"`, codegen_1._`${fmt} instanceof RegExp`, codegen_1._`typeof ${fmt}.compare != "function"`, compareCode(fmt))); + } + function validateFormat() { + const format = fCxt.schema; + const fmtDef = self2.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 ? codegen_1._`${opts.code.formats}${codegen_1.getProperty(format)}` : void 0 + }); + cxt.fail$data(compareCode(fmt)); + } + function compareCode(fmt) { + return codegen_1._`${fmt}.compare(${data}, ${schemaCode}) ${KWDs[keyword].fail} 0`; + } + }, + dependencies: ["format"] + }; + var formatLimitPlugin = (ajv) => { + ajv.addKeyword(exports2.formatLimitDefinition); + return ajv; + }; + exports2.default = formatLimitPlugin; + } +}); + +// ../../node_modules/ajv-formats/dist/index.js +var require_dist5 = __commonJS({ + "../../node_modules/ajv-formats/dist/index.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var formats_1 = require_formats(); + var limit_1 = require_limit(); + var codegen_1 = require_codegen(); + var fullName = new codegen_1.Name("fullFormats"); + var fastName = new codegen_1.Name("fastFormats"); + var formatsPlugin = (ajv, opts = { keywords: true }) => { + if (Array.isArray(opts)) { + addFormats(ajv, opts, formats_1.fullFormats, fullName); + return ajv; + } + const [formats, exportName] = opts.mode === "fast" ? [formats_1.fastFormats, fastName] : [formats_1.fullFormats, fullName]; + const list = opts.formats || formats_1.formatNames; + addFormats(ajv, list, formats, exportName); + if (opts.keywords) + limit_1.default(ajv); + return ajv; + }; + 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 addFormats(ajv, list, fs, exportName) { + var _a; + var _b; + (_a = (_b = ajv.opts.code).formats) !== null && _a !== void 0 ? _a : _b.formats = codegen_1._`require("ajv-formats/dist/formats").${exportName}`; + for (const f of list) + ajv.addFormat(f, fs[f]); + } + module2.exports = exports2 = formatsPlugin; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.default = formatsPlugin; + } +}); + +// ../../node_modules/async/dist/async.js +var require_async = __commonJS({ + "../../node_modules/async/dist/async.js"(exports2, module2) { + (function(global2, factory) { + typeof exports2 === "object" && typeof module2 !== "undefined" ? factory(exports2) : typeof define === "function" && define.amd ? define(["exports"], factory) : factory(global2.async = {}); + })(exports2, function(exports3) { + "use strict"; + function apply(fn, ...args) { + return (...callArgs) => fn(...args, ...callArgs); + } + function initialParams(fn) { + return function(...args) { + var callback = args.pop(); + return fn.call(this, args, callback); + }; + } + var hasQueueMicrotask = typeof queueMicrotask === "function" && queueMicrotask; + var hasSetImmediate = typeof setImmediate === "function" && setImmediate; + var hasNextTick = typeof process === "object" && typeof process.nextTick === "function"; + function fallback(fn) { + setTimeout(fn, 0); + } + function wrap(defer) { + return (fn, ...args) => defer(() => fn(...args)); + } + var _defer; + if (hasQueueMicrotask) { + _defer = queueMicrotask; + } else if (hasSetImmediate) { + _defer = setImmediate; + } else if (hasNextTick) { + _defer = process.nextTick; + } else { + _defer = fallback; + } + var setImmediate$1 = wrap(_defer); + function asyncify(func) { + if (isAsync(func)) { + return function(...args) { + const callback = args.pop(); + const promise = func.apply(this, args); + return handlePromise(promise, callback); + }; + } + return initialParams(function(args, callback) { + var result; + try { + result = func.apply(this, args); + } catch (e) { + return callback(e); + } + if (result && typeof result.then === "function") { + return handlePromise(result, callback); + } else { + callback(null, result); + } + }); + } + function handlePromise(promise, callback) { + return promise.then((value) => { + invokeCallback(callback, null, value); + }, (err) => { + invokeCallback(callback, err && err.message ? err : new Error(err)); + }); + } + function invokeCallback(callback, error, value) { + try { + callback(error, value); + } catch (err) { + setImmediate$1((e) => { + throw e; + }, err); + } + } + function isAsync(fn) { + return fn[Symbol.toStringTag] === "AsyncFunction"; + } + function isAsyncGenerator(fn) { + return fn[Symbol.toStringTag] === "AsyncGenerator"; + } + function isAsyncIterable(obj) { + return typeof obj[Symbol.asyncIterator] === "function"; + } + function wrapAsync(asyncFn) { + if (typeof asyncFn !== "function") throw new Error("expected a function"); + return isAsync(asyncFn) ? asyncify(asyncFn) : asyncFn; + } + function awaitify(asyncFn, arity = asyncFn.length) { + if (!arity) throw new Error("arity is undefined"); + function awaitable(...args) { + if (typeof args[arity - 1] === "function") { + return asyncFn.apply(this, args); + } + return new Promise((resolve, reject2) => { + args[arity - 1] = (err, ...cbArgs) => { + if (err) return reject2(err); + resolve(cbArgs.length > 1 ? cbArgs : cbArgs[0]); + }; + asyncFn.apply(this, args); + }); + } + return awaitable; + } + function applyEach(eachfn) { + return function applyEach2(fns, ...callArgs) { + const go = awaitify(function(callback) { + var that = this; + return eachfn(fns, (fn, cb) => { + wrapAsync(fn).apply(that, callArgs.concat(cb)); + }, callback); + }); + return go; + }; + } + function _asyncMap(eachfn, arr, iteratee, callback) { + arr = arr || []; + var results = []; + var counter = 0; + var _iteratee = wrapAsync(iteratee); + return eachfn(arr, (value, _2, iterCb) => { + var index2 = counter++; + _iteratee(value, (err, v) => { + results[index2] = v; + iterCb(err); + }); + }, (err) => { + callback(err, results); + }); + } + function isArrayLike(value) { + return value && typeof value.length === "number" && value.length >= 0 && value.length % 1 === 0; + } + const breakLoop = {}; + function once(fn) { + function wrapper(...args) { + if (fn === null) return; + var callFn = fn; + fn = null; + callFn.apply(this, args); + } + Object.assign(wrapper, fn); + return wrapper; + } + function getIterator(coll) { + return coll[Symbol.iterator] && coll[Symbol.iterator](); + } + function createArrayIterator(coll) { + var i = -1; + var len = coll.length; + return function next() { + return ++i < len ? { value: coll[i], key: i } : null; + }; + } + function createES2015Iterator(iterator) { + var i = -1; + return function next() { + var item = iterator.next(); + if (item.done) + return null; + i++; + return { value: item.value, key: i }; + }; + } + function createObjectIterator(obj) { + var okeys = obj ? Object.keys(obj) : []; + var i = -1; + var len = okeys.length; + return function next() { + var key = okeys[++i]; + if (key === "__proto__") { + return next(); + } + return i < len ? { value: obj[key], key } : null; + }; + } + function createIterator(coll) { + if (isArrayLike(coll)) { + return createArrayIterator(coll); + } + var iterator = getIterator(coll); + return iterator ? createES2015Iterator(iterator) : createObjectIterator(coll); + } + function onlyOnce(fn) { + return function(...args) { + if (fn === null) throw new Error("Callback was already called."); + var callFn = fn; + fn = null; + callFn.apply(this, args); + }; + } + function asyncEachOfLimit(generator, limit, iteratee, callback) { + let done = false; + let canceled = false; + let awaiting = false; + let running = 0; + let idx = 0; + function replenish() { + if (running >= limit || awaiting || done) return; + awaiting = true; + generator.next().then(({ value, done: iterDone }) => { + if (canceled || done) return; + awaiting = false; + if (iterDone) { + done = true; + if (running <= 0) { + callback(null); + } + return; + } + running++; + iteratee(value, idx, iterateeCallback); + idx++; + replenish(); + }).catch(handleError); + } + function iterateeCallback(err, result) { + running -= 1; + if (canceled) return; + if (err) return handleError(err); + if (err === false) { + done = true; + canceled = true; + return; + } + if (result === breakLoop || done && running <= 0) { + done = true; + return callback(null); + } + replenish(); + } + function handleError(err) { + if (canceled) return; + awaiting = false; + done = true; + callback(err); + } + replenish(); + } + var eachOfLimit = (limit) => { + return (obj, iteratee, callback) => { + callback = once(callback); + if (limit <= 0) { + throw new RangeError("concurrency limit cannot be less than 1"); + } + if (!obj) { + return callback(null); + } + if (isAsyncGenerator(obj)) { + return asyncEachOfLimit(obj, limit, iteratee, callback); + } + if (isAsyncIterable(obj)) { + return asyncEachOfLimit(obj[Symbol.asyncIterator](), limit, iteratee, callback); + } + var nextElem = createIterator(obj); + var done = false; + var canceled = false; + var running = 0; + var looping = false; + function iterateeCallback(err, value) { + if (canceled) return; + running -= 1; + if (err) { + done = true; + callback(err); + } else if (err === false) { + done = true; + canceled = true; + } else if (value === breakLoop || done && running <= 0) { + done = true; + return callback(null); + } else if (!looping) { + replenish(); + } + } + function replenish() { + looping = true; + while (running < limit && !done) { + var elem = nextElem(); + if (elem === null) { + done = true; + if (running <= 0) { + callback(null); + } + return; + } + running += 1; + iteratee(elem.value, elem.key, onlyOnce(iterateeCallback)); + } + looping = false; + } + replenish(); + }; + }; + function eachOfLimit$1(coll, limit, iteratee, callback) { + return eachOfLimit(limit)(coll, wrapAsync(iteratee), callback); + } + var eachOfLimit$2 = awaitify(eachOfLimit$1, 4); + function eachOfArrayLike(coll, iteratee, callback) { + callback = once(callback); + var index2 = 0, completed = 0, { length } = coll, canceled = false; + if (length === 0) { + callback(null); + } + function iteratorCallback(err, value) { + if (err === false) { + canceled = true; + } + if (canceled === true) return; + if (err) { + callback(err); + } else if (++completed === length || value === breakLoop) { + callback(null); + } + } + for (; index2 < length; index2++) { + iteratee(coll[index2], index2, onlyOnce(iteratorCallback)); + } + } + function eachOfGeneric(coll, iteratee, callback) { + return eachOfLimit$2(coll, Infinity, iteratee, callback); + } + function eachOf(coll, iteratee, callback) { + var eachOfImplementation = isArrayLike(coll) ? eachOfArrayLike : eachOfGeneric; + return eachOfImplementation(coll, wrapAsync(iteratee), callback); + } + var eachOf$1 = awaitify(eachOf, 3); + function map(coll, iteratee, callback) { + return _asyncMap(eachOf$1, coll, iteratee, callback); + } + var map$1 = awaitify(map, 3); + var applyEach$1 = applyEach(map$1); + function eachOfSeries(coll, iteratee, callback) { + return eachOfLimit$2(coll, 1, iteratee, callback); + } + var eachOfSeries$1 = awaitify(eachOfSeries, 3); + function mapSeries(coll, iteratee, callback) { + return _asyncMap(eachOfSeries$1, coll, iteratee, callback); + } + var mapSeries$1 = awaitify(mapSeries, 3); + var applyEachSeries = applyEach(mapSeries$1); + const PROMISE_SYMBOL = Symbol("promiseCallback"); + function promiseCallback() { + let resolve, reject2; + function callback(err, ...args) { + if (err) return reject2(err); + resolve(args.length > 1 ? args : args[0]); + } + callback[PROMISE_SYMBOL] = new Promise((res, rej) => { + resolve = res, reject2 = rej; + }); + return callback; + } + function auto(tasks, concurrency, callback) { + if (typeof concurrency !== "number") { + callback = concurrency; + concurrency = null; + } + callback = once(callback || promiseCallback()); + var numTasks = Object.keys(tasks).length; + if (!numTasks) { + return callback(null); + } + if (!concurrency) { + concurrency = numTasks; + } + var results = {}; + var runningTasks = 0; + var canceled = false; + var hasError = false; + var listeners = /* @__PURE__ */ Object.create(null); + var readyTasks = []; + var readyToCheck = []; + var uncheckedDependencies = {}; + Object.keys(tasks).forEach((key) => { + var task = tasks[key]; + if (!Array.isArray(task)) { + enqueueTask(key, [task]); + readyToCheck.push(key); + return; + } + var dependencies = task.slice(0, task.length - 1); + var remainingDependencies = dependencies.length; + if (remainingDependencies === 0) { + enqueueTask(key, task); + readyToCheck.push(key); + return; + } + uncheckedDependencies[key] = remainingDependencies; + dependencies.forEach((dependencyName) => { + if (!tasks[dependencyName]) { + throw new Error("async.auto task `" + key + "` has a non-existent dependency `" + dependencyName + "` in " + dependencies.join(", ")); + } + addListener(dependencyName, () => { + remainingDependencies--; + if (remainingDependencies === 0) { + enqueueTask(key, task); + } + }); + }); + }); + checkForDeadlocks(); + processQueue(); + function enqueueTask(key, task) { + readyTasks.push(() => runTask(key, task)); + } + function processQueue() { + if (canceled) return; + if (readyTasks.length === 0 && runningTasks === 0) { + return callback(null, results); + } + while (readyTasks.length && runningTasks < concurrency) { + var run = readyTasks.shift(); + run(); + } + } + function addListener(taskName, fn) { + var taskListeners = listeners[taskName]; + if (!taskListeners) { + taskListeners = listeners[taskName] = []; + } + taskListeners.push(fn); + } + function taskComplete(taskName) { + var taskListeners = listeners[taskName] || []; + taskListeners.forEach((fn) => fn()); + processQueue(); + } + function runTask(key, task) { + if (hasError) return; + var taskCallback = onlyOnce((err, ...result) => { + runningTasks--; + if (err === false) { + canceled = true; + return; + } + if (result.length < 2) { + [result] = result; + } + if (err) { + var safeResults = {}; + Object.keys(results).forEach((rkey) => { + safeResults[rkey] = results[rkey]; + }); + safeResults[key] = result; + hasError = true; + listeners = /* @__PURE__ */ Object.create(null); + if (canceled) return; + callback(err, safeResults); + } else { + results[key] = result; + taskComplete(key); + } + }); + runningTasks++; + var taskFn = wrapAsync(task[task.length - 1]); + if (task.length > 1) { + taskFn(results, taskCallback); + } else { + taskFn(taskCallback); + } + } + function checkForDeadlocks() { + var currentTask; + var counter = 0; + while (readyToCheck.length) { + currentTask = readyToCheck.pop(); + counter++; + getDependents(currentTask).forEach((dependent) => { + if (--uncheckedDependencies[dependent] === 0) { + readyToCheck.push(dependent); + } + }); + } + if (counter !== numTasks) { + throw new Error( + "async.auto cannot execute tasks due to a recursive dependency" + ); + } + } + function getDependents(taskName) { + var result = []; + Object.keys(tasks).forEach((key) => { + const task = tasks[key]; + if (Array.isArray(task) && task.indexOf(taskName) >= 0) { + result.push(key); + } + }); + return result; + } + return callback[PROMISE_SYMBOL]; + } + var FN_ARGS = /^(?:async\s+)?(?:function)?\s*\w*\s*\(\s*([^)]+)\s*\)(?:\s*{)/; + var ARROW_FN_ARGS = /^(?:async\s+)?\(?\s*([^)=]+)\s*\)?(?:\s*=>)/; + var FN_ARG_SPLIT = /,/; + var FN_ARG = /(=.+)?(\s*)$/; + function stripComments(string) { + let stripped = ""; + let index2 = 0; + let endBlockComment = string.indexOf("*/"); + while (index2 < string.length) { + if (string[index2] === "/" && string[index2 + 1] === "/") { + let endIndex = string.indexOf("\n", index2); + index2 = endIndex === -1 ? string.length : endIndex; + } else if (endBlockComment !== -1 && string[index2] === "/" && string[index2 + 1] === "*") { + let endIndex = string.indexOf("*/", index2); + if (endIndex !== -1) { + index2 = endIndex + 2; + endBlockComment = string.indexOf("*/", index2); + } else { + stripped += string[index2]; + index2++; + } + } else { + stripped += string[index2]; + index2++; + } + } + return stripped; + } + function parseParams(func) { + const src = stripComments(func.toString()); + let match = src.match(FN_ARGS); + if (!match) { + match = src.match(ARROW_FN_ARGS); + } + if (!match) throw new Error("could not parse args in autoInject\nSource:\n" + src); + let [, args] = match; + return args.replace(/\s/g, "").split(FN_ARG_SPLIT).map((arg) => arg.replace(FN_ARG, "").trim()); + } + function autoInject(tasks, callback) { + var newTasks = {}; + Object.keys(tasks).forEach((key) => { + var taskFn = tasks[key]; + var params; + var fnIsAsync = isAsync(taskFn); + var hasNoDeps = !fnIsAsync && taskFn.length === 1 || fnIsAsync && taskFn.length === 0; + if (Array.isArray(taskFn)) { + params = [...taskFn]; + taskFn = params.pop(); + newTasks[key] = params.concat(params.length > 0 ? newTask : taskFn); + } else if (hasNoDeps) { + newTasks[key] = taskFn; + } else { + params = parseParams(taskFn); + if (taskFn.length === 0 && !fnIsAsync && params.length === 0) { + throw new Error("autoInject task functions require explicit parameters."); + } + if (!fnIsAsync) params.pop(); + newTasks[key] = params.concat(newTask); + } + function newTask(results, taskCb) { + var newArgs = params.map((name) => results[name]); + newArgs.push(taskCb); + wrapAsync(taskFn)(...newArgs); + } + }); + return auto(newTasks, callback); + } + class DLL { + constructor() { + this.head = this.tail = null; + this.length = 0; + } + removeLink(node) { + if (node.prev) node.prev.next = node.next; + else this.head = node.next; + if (node.next) node.next.prev = node.prev; + else this.tail = node.prev; + node.prev = node.next = null; + this.length -= 1; + return node; + } + empty() { + while (this.head) this.shift(); + return this; + } + insertAfter(node, newNode) { + newNode.prev = node; + newNode.next = node.next; + if (node.next) node.next.prev = newNode; + else this.tail = newNode; + node.next = newNode; + this.length += 1; + } + insertBefore(node, newNode) { + newNode.prev = node.prev; + newNode.next = node; + if (node.prev) node.prev.next = newNode; + else this.head = newNode; + node.prev = newNode; + this.length += 1; + } + unshift(node) { + if (this.head) this.insertBefore(this.head, node); + else setInitial(this, node); + } + push(node) { + if (this.tail) this.insertAfter(this.tail, node); + else setInitial(this, node); + } + shift() { + return this.head && this.removeLink(this.head); + } + pop() { + return this.tail && this.removeLink(this.tail); + } + toArray() { + return [...this]; + } + *[Symbol.iterator]() { + var cur = this.head; + while (cur) { + yield cur.data; + cur = cur.next; + } + } + remove(testFn) { + var curr = this.head; + while (curr) { + var { next } = curr; + if (testFn(curr)) { + this.removeLink(curr); + } + curr = next; + } + return this; + } + } + function setInitial(dll, node) { + dll.length = 1; + dll.head = dll.tail = node; + } + function queue(worker, concurrency, payload) { + if (concurrency == null) { + concurrency = 1; + } else if (concurrency === 0) { + throw new RangeError("Concurrency must not be zero"); + } + var _worker = wrapAsync(worker); + var numRunning = 0; + var workersList = []; + const events = { + error: [], + drain: [], + saturated: [], + unsaturated: [], + empty: [] + }; + function on(event, handler) { + events[event].push(handler); + } + function once2(event, handler) { + const handleAndRemove = (...args) => { + off(event, handleAndRemove); + handler(...args); + }; + events[event].push(handleAndRemove); + } + function off(event, handler) { + if (!event) return Object.keys(events).forEach((ev) => events[ev] = []); + if (!handler) return events[event] = []; + events[event] = events[event].filter((ev) => ev !== handler); + } + function trigger(event, ...args) { + events[event].forEach((handler) => handler(...args)); + } + var processingScheduled = false; + function _insert(data, insertAtFront, rejectOnError, callback) { + if (callback != null && typeof callback !== "function") { + throw new Error("task callback must be a function"); + } + q.started = true; + var res, rej; + function promiseCallback2(err, ...args) { + if (err) return rejectOnError ? rej(err) : res(); + if (args.length <= 1) return res(args[0]); + res(args); + } + var item = q._createTaskItem( + data, + rejectOnError ? promiseCallback2 : callback || promiseCallback2 + ); + if (insertAtFront) { + q._tasks.unshift(item); + } else { + q._tasks.push(item); + } + if (!processingScheduled) { + processingScheduled = true; + setImmediate$1(() => { + processingScheduled = false; + q.process(); + }); + } + if (rejectOnError || !callback) { + return new Promise((resolve, reject2) => { + res = resolve; + rej = reject2; + }); + } + } + function _createCB(tasks) { + return function(err, ...args) { + numRunning -= 1; + for (var i = 0, l = tasks.length; i < l; i++) { + var task = tasks[i]; + var index2 = workersList.indexOf(task); + if (index2 === 0) { + workersList.shift(); + } else if (index2 > 0) { + workersList.splice(index2, 1); + } + task.callback(err, ...args); + if (err != null) { + trigger("error", err, task.data); + } + } + if (numRunning <= q.concurrency - q.buffer) { + trigger("unsaturated"); + } + if (q.idle()) { + trigger("drain"); + } + q.process(); + }; + } + function _maybeDrain(data) { + if (data.length === 0 && q.idle()) { + setImmediate$1(() => trigger("drain")); + return true; + } + return false; + } + const eventMethod = (name) => (handler) => { + if (!handler) { + return new Promise((resolve, reject2) => { + once2(name, (err, data) => { + if (err) return reject2(err); + resolve(data); + }); + }); + } + off(name); + on(name, handler); + }; + var isProcessing = false; + var q = { + _tasks: new DLL(), + _createTaskItem(data, callback) { + return { + data, + callback + }; + }, + *[Symbol.iterator]() { + yield* q._tasks[Symbol.iterator](); + }, + concurrency, + payload, + buffer: concurrency / 4, + started: false, + paused: false, + push(data, callback) { + if (Array.isArray(data)) { + if (_maybeDrain(data)) return; + return data.map((datum) => _insert(datum, false, false, callback)); + } + return _insert(data, false, false, callback); + }, + pushAsync(data, callback) { + if (Array.isArray(data)) { + if (_maybeDrain(data)) return; + return data.map((datum) => _insert(datum, false, true, callback)); + } + return _insert(data, false, true, callback); + }, + kill() { + off(); + q._tasks.empty(); + }, + unshift(data, callback) { + if (Array.isArray(data)) { + if (_maybeDrain(data)) return; + return data.map((datum) => _insert(datum, true, false, callback)); + } + return _insert(data, true, false, callback); + }, + unshiftAsync(data, callback) { + if (Array.isArray(data)) { + if (_maybeDrain(data)) return; + return data.map((datum) => _insert(datum, true, true, callback)); + } + return _insert(data, true, true, callback); + }, + remove(testFn) { + q._tasks.remove(testFn); + }, + process() { + if (isProcessing) { + return; + } + isProcessing = true; + while (!q.paused && numRunning < q.concurrency && q._tasks.length) { + var tasks = [], data = []; + var l = q._tasks.length; + if (q.payload) l = Math.min(l, q.payload); + for (var i = 0; i < l; i++) { + var node = q._tasks.shift(); + tasks.push(node); + workersList.push(node); + data.push(node.data); + } + numRunning += 1; + if (q._tasks.length === 0) { + trigger("empty"); + } + if (numRunning === q.concurrency) { + trigger("saturated"); + } + var cb = onlyOnce(_createCB(tasks)); + _worker(data, cb); + } + isProcessing = false; + }, + length() { + return q._tasks.length; + }, + running() { + return numRunning; + }, + workersList() { + return workersList; + }, + idle() { + return q._tasks.length + numRunning === 0; + }, + pause() { + q.paused = true; + }, + resume() { + if (q.paused === false) { + return; + } + q.paused = false; + setImmediate$1(q.process); + } + }; + Object.defineProperties(q, { + saturated: { + writable: false, + value: eventMethod("saturated") + }, + unsaturated: { + writable: false, + value: eventMethod("unsaturated") + }, + empty: { + writable: false, + value: eventMethod("empty") + }, + drain: { + writable: false, + value: eventMethod("drain") + }, + error: { + writable: false, + value: eventMethod("error") + } + }); + return q; + } + function cargo(worker, payload) { + return queue(worker, 1, payload); + } + function cargo$1(worker, concurrency, payload) { + return queue(worker, concurrency, payload); + } + function reduce(coll, memo, iteratee, callback) { + callback = once(callback); + var _iteratee = wrapAsync(iteratee); + return eachOfSeries$1(coll, (x, i, iterCb) => { + _iteratee(memo, x, (err, v) => { + memo = v; + iterCb(err); + }); + }, (err) => callback(err, memo)); + } + var reduce$1 = awaitify(reduce, 4); + function seq(...functions) { + var _functions = functions.map(wrapAsync); + return function(...args) { + var that = this; + var cb = args[args.length - 1]; + if (typeof cb == "function") { + args.pop(); + } else { + cb = promiseCallback(); + } + reduce$1( + _functions, + args, + (newargs, fn, iterCb) => { + fn.apply(that, newargs.concat((err, ...nextargs) => { + iterCb(err, nextargs); + })); + }, + (err, results) => cb(err, ...results) + ); + return cb[PROMISE_SYMBOL]; + }; + } + function compose(...args) { + return seq(...args.reverse()); + } + function mapLimit(coll, limit, iteratee, callback) { + return _asyncMap(eachOfLimit(limit), coll, iteratee, callback); + } + var mapLimit$1 = awaitify(mapLimit, 4); + function concatLimit(coll, limit, iteratee, callback) { + var _iteratee = wrapAsync(iteratee); + return mapLimit$1(coll, limit, (val, iterCb) => { + _iteratee(val, (err, ...args) => { + if (err) return iterCb(err); + return iterCb(err, args); + }); + }, (err, mapResults) => { + var result = []; + for (var i = 0; i < mapResults.length; i++) { + if (mapResults[i]) { + result = result.concat(...mapResults[i]); + } + } + return callback(err, result); + }); + } + var concatLimit$1 = awaitify(concatLimit, 4); + function concat(coll, iteratee, callback) { + return concatLimit$1(coll, Infinity, iteratee, callback); + } + var concat$1 = awaitify(concat, 3); + function concatSeries(coll, iteratee, callback) { + return concatLimit$1(coll, 1, iteratee, callback); + } + var concatSeries$1 = awaitify(concatSeries, 3); + function constant(...args) { + return function(...ignoredArgs) { + var callback = ignoredArgs.pop(); + return callback(null, ...args); + }; + } + function _createTester(check, getResult) { + return (eachfn, arr, _iteratee, cb) => { + var testPassed = false; + var testResult; + const iteratee = wrapAsync(_iteratee); + eachfn(arr, (value, _2, callback) => { + iteratee(value, (err, result) => { + if (err || err === false) return callback(err); + if (check(result) && !testResult) { + testPassed = true; + testResult = getResult(true, value); + return callback(null, breakLoop); + } + callback(); + }); + }, (err) => { + if (err) return cb(err); + cb(null, testPassed ? testResult : getResult(false)); + }); + }; + } + function detect(coll, iteratee, callback) { + return _createTester((bool) => bool, (res, item) => item)(eachOf$1, coll, iteratee, callback); + } + var detect$1 = awaitify(detect, 3); + function detectLimit(coll, limit, iteratee, callback) { + return _createTester((bool) => bool, (res, item) => item)(eachOfLimit(limit), coll, iteratee, callback); + } + var detectLimit$1 = awaitify(detectLimit, 4); + function detectSeries(coll, iteratee, callback) { + return _createTester((bool) => bool, (res, item) => item)(eachOfLimit(1), coll, iteratee, callback); + } + var detectSeries$1 = awaitify(detectSeries, 3); + function consoleFunc(name) { + return (fn, ...args) => wrapAsync(fn)(...args, (err, ...resultArgs) => { + if (typeof console === "object") { + if (err) { + if (console.error) { + console.error(err); + } + } else if (console[name]) { + resultArgs.forEach((x) => console[name](x)); + } + } + }); + } + var dir = consoleFunc("dir"); + function doWhilst(iteratee, test, callback) { + callback = onlyOnce(callback); + var _fn = wrapAsync(iteratee); + var _test = wrapAsync(test); + var results; + function next(err, ...args) { + if (err) return callback(err); + if (err === false) return; + results = args; + _test(...args, check); + } + function check(err, truth) { + if (err) return callback(err); + if (err === false) return; + if (!truth) return callback(null, ...results); + _fn(next); + } + return check(null, true); + } + var doWhilst$1 = awaitify(doWhilst, 3); + function doUntil(iteratee, test, callback) { + const _test = wrapAsync(test); + return doWhilst$1(iteratee, (...args) => { + const cb = args.pop(); + _test(...args, (err, truth) => cb(err, !truth)); + }, callback); + } + function _withoutIndex(iteratee) { + return (value, index2, callback) => iteratee(value, callback); + } + function eachLimit(coll, iteratee, callback) { + return eachOf$1(coll, _withoutIndex(wrapAsync(iteratee)), callback); + } + var each = awaitify(eachLimit, 3); + function eachLimit$1(coll, limit, iteratee, callback) { + return eachOfLimit(limit)(coll, _withoutIndex(wrapAsync(iteratee)), callback); + } + var eachLimit$2 = awaitify(eachLimit$1, 4); + function eachSeries(coll, iteratee, callback) { + return eachLimit$2(coll, 1, iteratee, callback); + } + var eachSeries$1 = awaitify(eachSeries, 3); + function ensureAsync(fn) { + if (isAsync(fn)) return fn; + return function(...args) { + var callback = args.pop(); + var sync = true; + args.push((...innerArgs) => { + if (sync) { + setImmediate$1(() => callback(...innerArgs)); + } else { + callback(...innerArgs); + } + }); + fn.apply(this, args); + sync = false; + }; + } + function every(coll, iteratee, callback) { + return _createTester((bool) => !bool, (res) => !res)(eachOf$1, coll, iteratee, callback); + } + var every$1 = awaitify(every, 3); + function everyLimit(coll, limit, iteratee, callback) { + return _createTester((bool) => !bool, (res) => !res)(eachOfLimit(limit), coll, iteratee, callback); + } + var everyLimit$1 = awaitify(everyLimit, 4); + function everySeries(coll, iteratee, callback) { + return _createTester((bool) => !bool, (res) => !res)(eachOfSeries$1, coll, iteratee, callback); + } + var everySeries$1 = awaitify(everySeries, 3); + function filterArray(eachfn, arr, iteratee, callback) { + var truthValues = new Array(arr.length); + eachfn(arr, (x, index2, iterCb) => { + iteratee(x, (err, v) => { + truthValues[index2] = !!v; + iterCb(err); + }); + }, (err) => { + if (err) return callback(err); + var results = []; + for (var i = 0; i < arr.length; i++) { + if (truthValues[i]) results.push(arr[i]); + } + callback(null, results); + }); + } + function filterGeneric(eachfn, coll, iteratee, callback) { + var results = []; + eachfn(coll, (x, index2, iterCb) => { + iteratee(x, (err, v) => { + if (err) return iterCb(err); + if (v) { + results.push({ index: index2, value: x }); + } + iterCb(err); + }); + }, (err) => { + if (err) return callback(err); + callback(null, results.sort((a, b) => a.index - b.index).map((v) => v.value)); + }); + } + function _filter(eachfn, coll, iteratee, callback) { + var filter2 = isArrayLike(coll) ? filterArray : filterGeneric; + return filter2(eachfn, coll, wrapAsync(iteratee), callback); + } + function filter(coll, iteratee, callback) { + return _filter(eachOf$1, coll, iteratee, callback); + } + var filter$1 = awaitify(filter, 3); + function filterLimit(coll, limit, iteratee, callback) { + return _filter(eachOfLimit(limit), coll, iteratee, callback); + } + var filterLimit$1 = awaitify(filterLimit, 4); + function filterSeries(coll, iteratee, callback) { + return _filter(eachOfSeries$1, coll, iteratee, callback); + } + var filterSeries$1 = awaitify(filterSeries, 3); + function forever(fn, errback) { + var done = onlyOnce(errback); + var task = wrapAsync(ensureAsync(fn)); + function next(err) { + if (err) return done(err); + if (err === false) return; + task(next); + } + return next(); + } + var forever$1 = awaitify(forever, 2); + function groupByLimit(coll, limit, iteratee, callback) { + var _iteratee = wrapAsync(iteratee); + return mapLimit$1(coll, limit, (val, iterCb) => { + _iteratee(val, (err, key) => { + if (err) return iterCb(err); + return iterCb(err, { key, val }); + }); + }, (err, mapResults) => { + var result = {}; + var { hasOwnProperty } = Object.prototype; + for (var i = 0; i < mapResults.length; i++) { + if (mapResults[i]) { + var { key } = mapResults[i]; + var { val } = mapResults[i]; + if (hasOwnProperty.call(result, key)) { + result[key].push(val); + } else { + result[key] = [val]; + } + } + } + return callback(err, result); + }); + } + var groupByLimit$1 = awaitify(groupByLimit, 4); + function groupBy(coll, iteratee, callback) { + return groupByLimit$1(coll, Infinity, iteratee, callback); + } + function groupBySeries(coll, iteratee, callback) { + return groupByLimit$1(coll, 1, iteratee, callback); + } + var log = consoleFunc("log"); + function mapValuesLimit(obj, limit, iteratee, callback) { + callback = once(callback); + var newObj = {}; + var _iteratee = wrapAsync(iteratee); + return eachOfLimit(limit)(obj, (val, key, next) => { + _iteratee(val, key, (err, result) => { + if (err) return next(err); + newObj[key] = result; + next(err); + }); + }, (err) => callback(err, newObj)); + } + var mapValuesLimit$1 = awaitify(mapValuesLimit, 4); + function mapValues(obj, iteratee, callback) { + return mapValuesLimit$1(obj, Infinity, iteratee, callback); + } + function mapValuesSeries(obj, iteratee, callback) { + return mapValuesLimit$1(obj, 1, iteratee, callback); + } + function memoize(fn, hasher = (v) => v) { + var memo = /* @__PURE__ */ Object.create(null); + var queues = /* @__PURE__ */ Object.create(null); + var _fn = wrapAsync(fn); + var memoized = initialParams((args, callback) => { + var key = hasher(...args); + if (key in memo) { + setImmediate$1(() => callback(null, ...memo[key])); + } else if (key in queues) { + queues[key].push(callback); + } else { + queues[key] = [callback]; + _fn(...args, (err, ...resultArgs) => { + if (!err) { + memo[key] = resultArgs; + } + var q = queues[key]; + delete queues[key]; + for (var i = 0, l = q.length; i < l; i++) { + q[i](err, ...resultArgs); + } + }); + } + }); + memoized.memo = memo; + memoized.unmemoized = fn; + return memoized; + } + var _defer$1; + if (hasNextTick) { + _defer$1 = process.nextTick; + } else if (hasSetImmediate) { + _defer$1 = setImmediate; + } else { + _defer$1 = fallback; + } + var nextTick = wrap(_defer$1); + var parallel = awaitify((eachfn, tasks, callback) => { + var results = isArrayLike(tasks) ? [] : {}; + eachfn(tasks, (task, key, taskCb) => { + wrapAsync(task)((err, ...result) => { + if (result.length < 2) { + [result] = result; + } + results[key] = result; + taskCb(err); + }); + }, (err) => callback(err, results)); + }, 3); + function parallel$1(tasks, callback) { + return parallel(eachOf$1, tasks, callback); + } + function parallelLimit(tasks, limit, callback) { + return parallel(eachOfLimit(limit), tasks, callback); + } + function queue$1(worker, concurrency) { + var _worker = wrapAsync(worker); + return queue((items, cb) => { + _worker(items[0], cb); + }, concurrency, 1); + } + class Heap { + constructor() { + this.heap = []; + this.pushCount = Number.MIN_SAFE_INTEGER; + } + get length() { + return this.heap.length; + } + empty() { + this.heap = []; + return this; + } + percUp(index2) { + let p; + while (index2 > 0 && smaller(this.heap[index2], this.heap[p = parent(index2)])) { + let t = this.heap[index2]; + this.heap[index2] = this.heap[p]; + this.heap[p] = t; + index2 = p; + } + } + percDown(index2) { + let l; + while ((l = leftChi(index2)) < this.heap.length) { + if (l + 1 < this.heap.length && smaller(this.heap[l + 1], this.heap[l])) { + l = l + 1; + } + if (smaller(this.heap[index2], this.heap[l])) { + break; + } + let t = this.heap[index2]; + this.heap[index2] = this.heap[l]; + this.heap[l] = t; + index2 = l; + } + } + push(node) { + node.pushCount = ++this.pushCount; + this.heap.push(node); + this.percUp(this.heap.length - 1); + } + unshift(node) { + return this.heap.push(node); + } + shift() { + let [top] = this.heap; + this.heap[0] = this.heap[this.heap.length - 1]; + this.heap.pop(); + this.percDown(0); + return top; + } + toArray() { + return [...this]; + } + *[Symbol.iterator]() { + for (let i = 0; i < this.heap.length; i++) { + yield this.heap[i].data; + } + } + remove(testFn) { + let j = 0; + for (let i = 0; i < this.heap.length; i++) { + if (!testFn(this.heap[i])) { + this.heap[j] = this.heap[i]; + j++; + } + } + this.heap.splice(j); + for (let i = parent(this.heap.length - 1); i >= 0; i--) { + this.percDown(i); + } + return this; + } + } + function leftChi(i) { + return (i << 1) + 1; + } + function parent(i) { + return (i + 1 >> 1) - 1; + } + function smaller(x, y) { + if (x.priority !== y.priority) { + return x.priority < y.priority; + } else { + return x.pushCount < y.pushCount; + } + } + function priorityQueue(worker, concurrency) { + var q = queue$1(worker, concurrency); + var { + push, + pushAsync + } = q; + q._tasks = new Heap(); + q._createTaskItem = ({ data, priority }, callback) => { + return { + data, + priority, + callback + }; + }; + function createDataItems(tasks, priority) { + if (!Array.isArray(tasks)) { + return { data: tasks, priority }; + } + return tasks.map((data) => { + return { data, priority }; + }); + } + q.push = function(data, priority = 0, callback) { + return push(createDataItems(data, priority), callback); + }; + q.pushAsync = function(data, priority = 0, callback) { + return pushAsync(createDataItems(data, priority), callback); + }; + delete q.unshift; + delete q.unshiftAsync; + return q; + } + function race(tasks, callback) { + callback = once(callback); + if (!Array.isArray(tasks)) return callback(new TypeError("First argument to race must be an array of functions")); + if (!tasks.length) return callback(); + for (var i = 0, l = tasks.length; i < l; i++) { + wrapAsync(tasks[i])(callback); + } + } + var race$1 = awaitify(race, 2); + function reduceRight(array, memo, iteratee, callback) { + var reversed = [...array].reverse(); + return reduce$1(reversed, memo, iteratee, callback); + } + function reflect(fn) { + var _fn = wrapAsync(fn); + return initialParams(function reflectOn(args, reflectCallback) { + args.push((error, ...cbArgs) => { + let retVal = {}; + if (error) { + retVal.error = error; + } + if (cbArgs.length > 0) { + var value = cbArgs; + if (cbArgs.length <= 1) { + [value] = cbArgs; + } + retVal.value = value; + } + reflectCallback(null, retVal); + }); + return _fn.apply(this, args); + }); + } + function reflectAll(tasks) { + var results; + if (Array.isArray(tasks)) { + results = tasks.map(reflect); + } else { + results = {}; + Object.keys(tasks).forEach((key) => { + results[key] = reflect.call(this, tasks[key]); + }); + } + return results; + } + function reject(eachfn, arr, _iteratee, callback) { + const iteratee = wrapAsync(_iteratee); + return _filter(eachfn, arr, (value, cb) => { + iteratee(value, (err, v) => { + cb(err, !v); + }); + }, callback); + } + function reject$1(coll, iteratee, callback) { + return reject(eachOf$1, coll, iteratee, callback); + } + var reject$2 = awaitify(reject$1, 3); + function rejectLimit(coll, limit, iteratee, callback) { + return reject(eachOfLimit(limit), coll, iteratee, callback); + } + var rejectLimit$1 = awaitify(rejectLimit, 4); + function rejectSeries(coll, iteratee, callback) { + return reject(eachOfSeries$1, coll, iteratee, callback); + } + var rejectSeries$1 = awaitify(rejectSeries, 3); + function constant$1(value) { + return function() { + return value; + }; + } + const DEFAULT_TIMES = 5; + const DEFAULT_INTERVAL = 0; + function retry(opts, task, callback) { + var options = { + times: DEFAULT_TIMES, + intervalFunc: constant$1(DEFAULT_INTERVAL) + }; + if (arguments.length < 3 && typeof opts === "function") { + callback = task || promiseCallback(); + task = opts; + } else { + parseTimes(options, opts); + callback = callback || promiseCallback(); + } + if (typeof task !== "function") { + throw new Error("Invalid arguments for async.retry"); + } + var _task = wrapAsync(task); + var attempt = 1; + function retryAttempt() { + _task((err, ...args) => { + if (err === false) return; + if (err && attempt++ < options.times && (typeof options.errorFilter != "function" || options.errorFilter(err))) { + setTimeout(retryAttempt, options.intervalFunc(attempt - 1)); + } else { + callback(err, ...args); + } + }); + } + retryAttempt(); + return callback[PROMISE_SYMBOL]; + } + function parseTimes(acc, t) { + if (typeof t === "object") { + acc.times = +t.times || DEFAULT_TIMES; + acc.intervalFunc = typeof t.interval === "function" ? t.interval : constant$1(+t.interval || DEFAULT_INTERVAL); + acc.errorFilter = t.errorFilter; + } else if (typeof t === "number" || typeof t === "string") { + acc.times = +t || DEFAULT_TIMES; + } else { + throw new Error("Invalid arguments for async.retry"); + } + } + function retryable(opts, task) { + if (!task) { + task = opts; + opts = null; + } + let arity = opts && opts.arity || task.length; + if (isAsync(task)) { + arity += 1; + } + var _task = wrapAsync(task); + return initialParams((args, callback) => { + if (args.length < arity - 1 || callback == null) { + args.push(callback); + callback = promiseCallback(); + } + function taskFn(cb) { + _task(...args, cb); + } + if (opts) retry(opts, taskFn, callback); + else retry(taskFn, callback); + return callback[PROMISE_SYMBOL]; + }); + } + function series(tasks, callback) { + return parallel(eachOfSeries$1, tasks, callback); + } + function some(coll, iteratee, callback) { + return _createTester(Boolean, (res) => res)(eachOf$1, coll, iteratee, callback); + } + var some$1 = awaitify(some, 3); + function someLimit(coll, limit, iteratee, callback) { + return _createTester(Boolean, (res) => res)(eachOfLimit(limit), coll, iteratee, callback); + } + var someLimit$1 = awaitify(someLimit, 4); + function someSeries(coll, iteratee, callback) { + return _createTester(Boolean, (res) => res)(eachOfSeries$1, coll, iteratee, callback); + } + var someSeries$1 = awaitify(someSeries, 3); + function sortBy(coll, iteratee, callback) { + var _iteratee = wrapAsync(iteratee); + return map$1(coll, (x, iterCb) => { + _iteratee(x, (err, criteria) => { + if (err) return iterCb(err); + iterCb(err, { value: x, criteria }); + }); + }, (err, results) => { + if (err) return callback(err); + callback(null, results.sort(comparator).map((v) => v.value)); + }); + function comparator(left, right) { + var a = left.criteria, b = right.criteria; + return a < b ? -1 : a > b ? 1 : 0; + } + } + var sortBy$1 = awaitify(sortBy, 3); + function timeout(asyncFn, milliseconds, info) { + var fn = wrapAsync(asyncFn); + return initialParams((args, callback) => { + var timedOut = false; + var timer; + function timeoutCallback() { + var name = asyncFn.name || "anonymous"; + var error = new Error('Callback function "' + name + '" timed out.'); + error.code = "ETIMEDOUT"; + if (info) { + error.info = info; + } + timedOut = true; + callback(error); + } + args.push((...cbArgs) => { + if (!timedOut) { + callback(...cbArgs); + clearTimeout(timer); + } + }); + timer = setTimeout(timeoutCallback, milliseconds); + fn(...args); + }); + } + function range(size) { + var result = Array(size); + while (size--) { + result[size] = size; + } + return result; + } + function timesLimit(count, limit, iteratee, callback) { + var _iteratee = wrapAsync(iteratee); + return mapLimit$1(range(count), limit, _iteratee, callback); + } + function times(n, iteratee, callback) { + return timesLimit(n, Infinity, iteratee, callback); + } + function timesSeries(n, iteratee, callback) { + return timesLimit(n, 1, iteratee, callback); + } + function transform(coll, accumulator, iteratee, callback) { + if (arguments.length <= 3 && typeof accumulator === "function") { + callback = iteratee; + iteratee = accumulator; + accumulator = Array.isArray(coll) ? [] : {}; + } + callback = once(callback || promiseCallback()); + var _iteratee = wrapAsync(iteratee); + eachOf$1(coll, (v, k, cb) => { + _iteratee(accumulator, v, k, cb); + }, (err) => callback(err, accumulator)); + return callback[PROMISE_SYMBOL]; + } + function tryEach(tasks, callback) { + var error = null; + var result; + return eachSeries$1(tasks, (task, taskCb) => { + wrapAsync(task)((err, ...args) => { + if (err === false) return taskCb(err); + if (args.length < 2) { + [result] = args; + } else { + result = args; + } + error = err; + taskCb(err ? null : {}); + }); + }, () => callback(error, result)); + } + var tryEach$1 = awaitify(tryEach); + function unmemoize(fn) { + return (...args) => { + return (fn.unmemoized || fn)(...args); + }; + } + function whilst(test, iteratee, callback) { + callback = onlyOnce(callback); + var _fn = wrapAsync(iteratee); + var _test = wrapAsync(test); + var results = []; + function next(err, ...rest) { + if (err) return callback(err); + results = rest; + if (err === false) return; + _test(check); + } + function check(err, truth) { + if (err) return callback(err); + if (err === false) return; + if (!truth) return callback(null, ...results); + _fn(next); + } + return _test(check); + } + var whilst$1 = awaitify(whilst, 3); + function until(test, iteratee, callback) { + const _test = wrapAsync(test); + return whilst$1((cb) => _test((err, truth) => cb(err, !truth)), iteratee, callback); + } + function waterfall(tasks, callback) { + callback = once(callback); + if (!Array.isArray(tasks)) return callback(new Error("First argument to waterfall must be an array of functions")); + if (!tasks.length) return callback(); + var taskIndex = 0; + function nextTask(args) { + var task = wrapAsync(tasks[taskIndex++]); + task(...args, onlyOnce(next)); + } + function next(err, ...args) { + if (err === false) return; + if (err || taskIndex === tasks.length) { + return callback(err, ...args); + } + nextTask(args); + } + nextTask([]); + } + var waterfall$1 = awaitify(waterfall); + var index = { + apply, + applyEach: applyEach$1, + applyEachSeries, + asyncify, + auto, + autoInject, + cargo, + cargoQueue: cargo$1, + compose, + concat: concat$1, + concatLimit: concatLimit$1, + concatSeries: concatSeries$1, + constant, + detect: detect$1, + detectLimit: detectLimit$1, + detectSeries: detectSeries$1, + dir, + doUntil, + doWhilst: doWhilst$1, + each, + eachLimit: eachLimit$2, + eachOf: eachOf$1, + eachOfLimit: eachOfLimit$2, + eachOfSeries: eachOfSeries$1, + eachSeries: eachSeries$1, + ensureAsync, + every: every$1, + everyLimit: everyLimit$1, + everySeries: everySeries$1, + filter: filter$1, + filterLimit: filterLimit$1, + filterSeries: filterSeries$1, + forever: forever$1, + groupBy, + groupByLimit: groupByLimit$1, + groupBySeries, + log, + map: map$1, + mapLimit: mapLimit$1, + mapSeries: mapSeries$1, + mapValues, + mapValuesLimit: mapValuesLimit$1, + mapValuesSeries, + memoize, + nextTick, + parallel: parallel$1, + parallelLimit, + priorityQueue, + queue: queue$1, + race: race$1, + reduce: reduce$1, + reduceRight, + reflect, + reflectAll, + reject: reject$2, + rejectLimit: rejectLimit$1, + rejectSeries: rejectSeries$1, + retry, + retryable, + seq, + series, + setImmediate: setImmediate$1, + some: some$1, + someLimit: someLimit$1, + someSeries: someSeries$1, + sortBy: sortBy$1, + timeout, + times, + timesLimit, + timesSeries, + transform, + tryEach: tryEach$1, + unmemoize, + until, + waterfall: waterfall$1, + whilst: whilst$1, + // aliases + all: every$1, + allLimit: everyLimit$1, + allSeries: everySeries$1, + any: some$1, + anyLimit: someLimit$1, + anySeries: someSeries$1, + find: detect$1, + findLimit: detectLimit$1, + findSeries: detectSeries$1, + flatMap: concat$1, + flatMapLimit: concatLimit$1, + flatMapSeries: concatSeries$1, + forEach: each, + forEachSeries: eachSeries$1, + forEachLimit: eachLimit$2, + forEachOf: eachOf$1, + forEachOfSeries: eachOfSeries$1, + forEachOfLimit: eachOfLimit$2, + inject: reduce$1, + foldl: reduce$1, + foldr: reduceRight, + select: filter$1, + selectLimit: filterLimit$1, + selectSeries: filterSeries$1, + wrapSync: asyncify, + during: whilst$1, + doDuring: doWhilst$1 + }; + exports3.default = index; + exports3.apply = apply; + exports3.applyEach = applyEach$1; + exports3.applyEachSeries = applyEachSeries; + exports3.asyncify = asyncify; + exports3.auto = auto; + exports3.autoInject = autoInject; + exports3.cargo = cargo; + exports3.cargoQueue = cargo$1; + exports3.compose = compose; + exports3.concat = concat$1; + exports3.concatLimit = concatLimit$1; + exports3.concatSeries = concatSeries$1; + exports3.constant = constant; + exports3.detect = detect$1; + exports3.detectLimit = detectLimit$1; + exports3.detectSeries = detectSeries$1; + exports3.dir = dir; + exports3.doUntil = doUntil; + exports3.doWhilst = doWhilst$1; + exports3.each = each; + exports3.eachLimit = eachLimit$2; + exports3.eachOf = eachOf$1; + exports3.eachOfLimit = eachOfLimit$2; + exports3.eachOfSeries = eachOfSeries$1; + exports3.eachSeries = eachSeries$1; + exports3.ensureAsync = ensureAsync; + exports3.every = every$1; + exports3.everyLimit = everyLimit$1; + exports3.everySeries = everySeries$1; + exports3.filter = filter$1; + exports3.filterLimit = filterLimit$1; + exports3.filterSeries = filterSeries$1; + exports3.forever = forever$1; + exports3.groupBy = groupBy; + exports3.groupByLimit = groupByLimit$1; + exports3.groupBySeries = groupBySeries; + exports3.log = log; + exports3.map = map$1; + exports3.mapLimit = mapLimit$1; + exports3.mapSeries = mapSeries$1; + exports3.mapValues = mapValues; + exports3.mapValuesLimit = mapValuesLimit$1; + exports3.mapValuesSeries = mapValuesSeries; + exports3.memoize = memoize; + exports3.nextTick = nextTick; + exports3.parallel = parallel$1; + exports3.parallelLimit = parallelLimit; + exports3.priorityQueue = priorityQueue; + exports3.queue = queue$1; + exports3.race = race$1; + exports3.reduce = reduce$1; + exports3.reduceRight = reduceRight; + exports3.reflect = reflect; + exports3.reflectAll = reflectAll; + exports3.reject = reject$2; + exports3.rejectLimit = rejectLimit$1; + exports3.rejectSeries = rejectSeries$1; + exports3.retry = retry; + exports3.retryable = retryable; + exports3.seq = seq; + exports3.series = series; + exports3.setImmediate = setImmediate$1; + exports3.some = some$1; + exports3.someLimit = someLimit$1; + exports3.someSeries = someSeries$1; + exports3.sortBy = sortBy$1; + exports3.timeout = timeout; + exports3.times = times; + exports3.timesLimit = timesLimit; + exports3.timesSeries = timesSeries; + exports3.transform = transform; + exports3.tryEach = tryEach$1; + exports3.unmemoize = unmemoize; + exports3.until = until; + exports3.waterfall = waterfall$1; + exports3.whilst = whilst$1; + exports3.all = every$1; + exports3.allLimit = everyLimit$1; + exports3.allSeries = everySeries$1; + exports3.any = some$1; + exports3.anyLimit = someLimit$1; + exports3.anySeries = someSeries$1; + exports3.find = detect$1; + exports3.findLimit = detectLimit$1; + exports3.findSeries = detectSeries$1; + exports3.flatMap = concat$1; + exports3.flatMapLimit = concatLimit$1; + exports3.flatMapSeries = concatSeries$1; + exports3.forEach = each; + exports3.forEachSeries = eachSeries$1; + exports3.forEachLimit = eachLimit$2; + exports3.forEachOf = eachOf$1; + exports3.forEachOfSeries = eachOfSeries$1; + exports3.forEachOfLimit = eachOfLimit$2; + exports3.inject = reduce$1; + exports3.foldl = reduce$1; + exports3.foldr = reduceRight; + exports3.select = filter$1; + exports3.selectLimit = filterLimit$1; + exports3.selectSeries = filterSeries$1; + exports3.wrapSync = asyncify; + exports3.during = whilst$1; + exports3.doDuring = doWhilst$1; + Object.defineProperty(exports3, "__esModule", { value: true }); + }); + } +}); + +// ../../node_modules/safer-buffer/safer.js +var require_safer = __commonJS({ + "../../node_modules/safer-buffer/safer.js"(exports2, module2) { + "use strict"; + var buffer = require("buffer"); + var Buffer2 = buffer.Buffer; + var safer = {}; + var key; + for (key in buffer) { + if (!buffer.hasOwnProperty(key)) continue; + if (key === "SlowBuffer" || key === "Buffer") continue; + safer[key] = buffer[key]; + } + var Safer = safer.Buffer = {}; + for (key in Buffer2) { + if (!Buffer2.hasOwnProperty(key)) continue; + if (key === "allocUnsafe" || key === "allocUnsafeSlow") continue; + Safer[key] = Buffer2[key]; + } + safer.Buffer.prototype = Buffer2.prototype; + if (!Safer.from || Safer.from === Uint8Array.from) { + Safer.from = function(value, encodingOrOffset, length) { + if (typeof value === "number") { + throw new TypeError('The "value" argument must not be of type number. Received type ' + typeof value); + } + if (value && typeof value.length === "undefined") { + throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof value); + } + return Buffer2(value, encodingOrOffset, length); + }; + } + if (!Safer.alloc) { + Safer.alloc = function(size, fill, encoding) { + if (typeof size !== "number") { + throw new TypeError('The "size" argument must be of type number. Received type ' + typeof size); + } + if (size < 0 || size >= 2 * (1 << 30)) { + throw new RangeError('The value "' + size + '" is invalid for option "size"'); + } + var buf = Buffer2(size); + if (!fill || fill.length === 0) { + buf.fill(0); + } else if (typeof encoding === "string") { + buf.fill(fill, encoding); + } else { + buf.fill(fill); + } + return buf; + }; + } + if (!safer.kStringMaxLength) { + try { + safer.kStringMaxLength = process.binding("buffer").kStringMaxLength; + } catch (e) { + } + } + if (!safer.constants) { + safer.constants = { + MAX_LENGTH: safer.kMaxLength + }; + if (safer.kStringMaxLength) { + safer.constants.MAX_STRING_LENGTH = safer.kStringMaxLength; + } + } + module2.exports = safer; + } +}); + +// ../../node_modules/iconv-lite/lib/bom-handling.js +var require_bom_handling = __commonJS({ + "../../node_modules/iconv-lite/lib/bom-handling.js"(exports2) { + "use strict"; + var BOMChar = "\uFEFF"; + exports2.PrependBOM = PrependBOMWrapper; + function PrependBOMWrapper(encoder, options) { + this.encoder = encoder; + this.addBOM = true; + } + PrependBOMWrapper.prototype.write = function(str) { + if (this.addBOM) { + str = BOMChar + str; + this.addBOM = false; + } + return this.encoder.write(str); + }; + PrependBOMWrapper.prototype.end = function() { + return this.encoder.end(); + }; + exports2.StripBOM = StripBOMWrapper; + function StripBOMWrapper(decoder, options) { + this.decoder = decoder; + this.pass = false; + this.options = options || {}; + } + StripBOMWrapper.prototype.write = function(buf) { + var res = this.decoder.write(buf); + if (this.pass || !res) + return res; + if (res[0] === BOMChar) { + res = res.slice(1); + if (typeof this.options.stripBOM === "function") + this.options.stripBOM(); + } + this.pass = true; + return res; + }; + StripBOMWrapper.prototype.end = function() { + return this.decoder.end(); + }; + } +}); + +// ../../node_modules/iconv-lite/encodings/internal.js +var require_internal = __commonJS({ + "../../node_modules/iconv-lite/encodings/internal.js"(exports2, module2) { + "use strict"; + var Buffer2 = require_safer().Buffer; + module2.exports = { + // Encodings + utf8: { type: "_internal", bomAware: true }, + cesu8: { type: "_internal", bomAware: true }, + unicode11utf8: "utf8", + ucs2: { type: "_internal", bomAware: true }, + utf16le: "ucs2", + binary: { type: "_internal" }, + base64: { type: "_internal" }, + hex: { type: "_internal" }, + // Codec. + _internal: InternalCodec + }; + function InternalCodec(codecOptions, iconv) { + this.enc = codecOptions.encodingName; + this.bomAware = codecOptions.bomAware; + if (this.enc === "base64") + this.encoder = InternalEncoderBase64; + else if (this.enc === "cesu8") { + this.enc = "utf8"; + this.encoder = InternalEncoderCesu8; + if (Buffer2.from("eda0bdedb2a9", "hex").toString() !== "\u{1F4A9}") { + this.decoder = InternalDecoderCesu8; + this.defaultCharUnicode = iconv.defaultCharUnicode; + } + } + } + InternalCodec.prototype.encoder = InternalEncoder; + InternalCodec.prototype.decoder = InternalDecoder; + var StringDecoder = require("string_decoder").StringDecoder; + if (!StringDecoder.prototype.end) + StringDecoder.prototype.end = function() { + }; + function InternalDecoder(options, codec) { + this.decoder = new StringDecoder(codec.enc); + } + InternalDecoder.prototype.write = function(buf) { + if (!Buffer2.isBuffer(buf)) { + buf = Buffer2.from(buf); + } + return this.decoder.write(buf); + }; + InternalDecoder.prototype.end = function() { + return this.decoder.end(); + }; + function InternalEncoder(options, codec) { + this.enc = codec.enc; + } + InternalEncoder.prototype.write = function(str) { + return Buffer2.from(str, this.enc); + }; + InternalEncoder.prototype.end = function() { + }; + function InternalEncoderBase64(options, codec) { + this.prevStr = ""; + } + InternalEncoderBase64.prototype.write = function(str) { + str = this.prevStr + str; + var completeQuads = str.length - str.length % 4; + this.prevStr = str.slice(completeQuads); + str = str.slice(0, completeQuads); + return Buffer2.from(str, "base64"); + }; + InternalEncoderBase64.prototype.end = function() { + return Buffer2.from(this.prevStr, "base64"); + }; + function InternalEncoderCesu8(options, codec) { + } + InternalEncoderCesu8.prototype.write = function(str) { + var buf = Buffer2.alloc(str.length * 3), bufIdx = 0; + for (var i = 0; i < str.length; i++) { + var charCode = str.charCodeAt(i); + if (charCode < 128) + buf[bufIdx++] = charCode; + else if (charCode < 2048) { + buf[bufIdx++] = 192 + (charCode >>> 6); + buf[bufIdx++] = 128 + (charCode & 63); + } else { + buf[bufIdx++] = 224 + (charCode >>> 12); + buf[bufIdx++] = 128 + (charCode >>> 6 & 63); + buf[bufIdx++] = 128 + (charCode & 63); + } + } + return buf.slice(0, bufIdx); + }; + InternalEncoderCesu8.prototype.end = function() { + }; + function InternalDecoderCesu8(options, codec) { + this.acc = 0; + this.contBytes = 0; + this.accBytes = 0; + this.defaultCharUnicode = codec.defaultCharUnicode; + } + InternalDecoderCesu8.prototype.write = function(buf) { + var acc = this.acc, contBytes = this.contBytes, accBytes = this.accBytes, res = ""; + for (var i = 0; i < buf.length; i++) { + var curByte = buf[i]; + if ((curByte & 192) !== 128) { + if (contBytes > 0) { + res += this.defaultCharUnicode; + contBytes = 0; + } + if (curByte < 128) { + res += String.fromCharCode(curByte); + } else if (curByte < 224) { + acc = curByte & 31; + contBytes = 1; + accBytes = 1; + } else if (curByte < 240) { + acc = curByte & 15; + contBytes = 2; + accBytes = 1; + } else { + res += this.defaultCharUnicode; + } + } else { + if (contBytes > 0) { + acc = acc << 6 | curByte & 63; + contBytes--; + accBytes++; + if (contBytes === 0) { + if (accBytes === 2 && acc < 128 && acc > 0) + res += this.defaultCharUnicode; + else if (accBytes === 3 && acc < 2048) + res += this.defaultCharUnicode; + else + res += String.fromCharCode(acc); + } + } else { + res += this.defaultCharUnicode; + } + } + } + this.acc = acc; + this.contBytes = contBytes; + this.accBytes = accBytes; + return res; + }; + InternalDecoderCesu8.prototype.end = function() { + var res = 0; + if (this.contBytes > 0) + res += this.defaultCharUnicode; + return res; + }; + } +}); + +// ../../node_modules/iconv-lite/encodings/utf32.js +var require_utf32 = __commonJS({ + "../../node_modules/iconv-lite/encodings/utf32.js"(exports2) { + "use strict"; + var Buffer2 = require_safer().Buffer; + exports2._utf32 = Utf32Codec; + function Utf32Codec(codecOptions, iconv) { + this.iconv = iconv; + this.bomAware = true; + this.isLE = codecOptions.isLE; + } + exports2.utf32le = { type: "_utf32", isLE: true }; + exports2.utf32be = { type: "_utf32", isLE: false }; + exports2.ucs4le = "utf32le"; + exports2.ucs4be = "utf32be"; + Utf32Codec.prototype.encoder = Utf32Encoder; + Utf32Codec.prototype.decoder = Utf32Decoder; + function Utf32Encoder(options, codec) { + this.isLE = codec.isLE; + this.highSurrogate = 0; + } + Utf32Encoder.prototype.write = function(str) { + var src = Buffer2.from(str, "ucs2"); + var dst = Buffer2.alloc(src.length * 2); + var write32 = this.isLE ? dst.writeUInt32LE : dst.writeUInt32BE; + var offset = 0; + for (var i = 0; i < src.length; i += 2) { + var code = src.readUInt16LE(i); + var isHighSurrogate = 55296 <= code && code < 56320; + var isLowSurrogate = 56320 <= code && code < 57344; + if (this.highSurrogate) { + if (isHighSurrogate || !isLowSurrogate) { + write32.call(dst, this.highSurrogate, offset); + offset += 4; + } else { + var codepoint = (this.highSurrogate - 55296 << 10 | code - 56320) + 65536; + write32.call(dst, codepoint, offset); + offset += 4; + this.highSurrogate = 0; + continue; + } + } + if (isHighSurrogate) + this.highSurrogate = code; + else { + write32.call(dst, code, offset); + offset += 4; + this.highSurrogate = 0; + } + } + if (offset < dst.length) + dst = dst.slice(0, offset); + return dst; + }; + Utf32Encoder.prototype.end = function() { + if (!this.highSurrogate) + return; + var buf = Buffer2.alloc(4); + if (this.isLE) + buf.writeUInt32LE(this.highSurrogate, 0); + else + buf.writeUInt32BE(this.highSurrogate, 0); + this.highSurrogate = 0; + return buf; + }; + function Utf32Decoder(options, codec) { + this.isLE = codec.isLE; + this.badChar = codec.iconv.defaultCharUnicode.charCodeAt(0); + this.overflow = []; + } + Utf32Decoder.prototype.write = function(src) { + if (src.length === 0) + return ""; + var i = 0; + var codepoint = 0; + var dst = Buffer2.alloc(src.length + 4); + var offset = 0; + var isLE = this.isLE; + var overflow = this.overflow; + var badChar = this.badChar; + if (overflow.length > 0) { + for (; i < src.length && overflow.length < 4; i++) + overflow.push(src[i]); + if (overflow.length === 4) { + if (isLE) { + codepoint = overflow[i] | overflow[i + 1] << 8 | overflow[i + 2] << 16 | overflow[i + 3] << 24; + } else { + codepoint = overflow[i + 3] | overflow[i + 2] << 8 | overflow[i + 1] << 16 | overflow[i] << 24; + } + overflow.length = 0; + offset = _writeCodepoint(dst, offset, codepoint, badChar); + } + } + for (; i < src.length - 3; i += 4) { + if (isLE) { + codepoint = src[i] | src[i + 1] << 8 | src[i + 2] << 16 | src[i + 3] << 24; + } else { + codepoint = src[i + 3] | src[i + 2] << 8 | src[i + 1] << 16 | src[i] << 24; + } + offset = _writeCodepoint(dst, offset, codepoint, badChar); + } + for (; i < src.length; i++) { + overflow.push(src[i]); + } + return dst.slice(0, offset).toString("ucs2"); + }; + function _writeCodepoint(dst, offset, codepoint, badChar) { + if (codepoint < 0 || codepoint > 1114111) { + codepoint = badChar; + } + if (codepoint >= 65536) { + codepoint -= 65536; + var high = 55296 | codepoint >> 10; + dst[offset++] = high & 255; + dst[offset++] = high >> 8; + var codepoint = 56320 | codepoint & 1023; + } + dst[offset++] = codepoint & 255; + dst[offset++] = codepoint >> 8; + return offset; + } + Utf32Decoder.prototype.end = function() { + this.overflow.length = 0; + }; + exports2.utf32 = Utf32AutoCodec; + exports2.ucs4 = "utf32"; + function Utf32AutoCodec(options, iconv) { + this.iconv = iconv; + } + Utf32AutoCodec.prototype.encoder = Utf32AutoEncoder; + Utf32AutoCodec.prototype.decoder = Utf32AutoDecoder; + function Utf32AutoEncoder(options, codec) { + options = options || {}; + if (options.addBOM === void 0) + options.addBOM = true; + this.encoder = codec.iconv.getEncoder(options.defaultEncoding || "utf-32le", options); + } + Utf32AutoEncoder.prototype.write = function(str) { + return this.encoder.write(str); + }; + Utf32AutoEncoder.prototype.end = function() { + return this.encoder.end(); + }; + function Utf32AutoDecoder(options, codec) { + this.decoder = null; + this.initialBufs = []; + this.initialBufsLen = 0; + this.options = options || {}; + this.iconv = codec.iconv; + } + Utf32AutoDecoder.prototype.write = function(buf) { + if (!this.decoder) { + this.initialBufs.push(buf); + this.initialBufsLen += buf.length; + if (this.initialBufsLen < 32) + return ""; + var encoding = detectEncoding(this.initialBufs, this.options.defaultEncoding); + this.decoder = this.iconv.getDecoder(encoding, this.options); + var resStr = ""; + for (var i = 0; i < this.initialBufs.length; i++) + resStr += this.decoder.write(this.initialBufs[i]); + this.initialBufs.length = this.initialBufsLen = 0; + return resStr; + } + return this.decoder.write(buf); + }; + Utf32AutoDecoder.prototype.end = function() { + if (!this.decoder) { + var encoding = detectEncoding(this.initialBufs, this.options.defaultEncoding); + this.decoder = this.iconv.getDecoder(encoding, this.options); + var resStr = ""; + for (var i = 0; i < this.initialBufs.length; i++) + resStr += this.decoder.write(this.initialBufs[i]); + var trail = this.decoder.end(); + if (trail) + resStr += trail; + this.initialBufs.length = this.initialBufsLen = 0; + return resStr; + } + return this.decoder.end(); + }; + function detectEncoding(bufs, defaultEncoding) { + var b = []; + var charsProcessed = 0; + var invalidLE = 0, invalidBE = 0; + var bmpCharsLE = 0, bmpCharsBE = 0; + outer_loop: + for (var i = 0; i < bufs.length; i++) { + var buf = bufs[i]; + for (var j = 0; j < buf.length; j++) { + b.push(buf[j]); + if (b.length === 4) { + if (charsProcessed === 0) { + if (b[0] === 255 && b[1] === 254 && b[2] === 0 && b[3] === 0) { + return "utf-32le"; + } + if (b[0] === 0 && b[1] === 0 && b[2] === 254 && b[3] === 255) { + return "utf-32be"; + } + } + if (b[0] !== 0 || b[1] > 16) invalidBE++; + if (b[3] !== 0 || b[2] > 16) invalidLE++; + if (b[0] === 0 && b[1] === 0 && (b[2] !== 0 || b[3] !== 0)) bmpCharsBE++; + if ((b[0] !== 0 || b[1] !== 0) && b[2] === 0 && b[3] === 0) bmpCharsLE++; + b.length = 0; + charsProcessed++; + if (charsProcessed >= 100) { + break outer_loop; + } + } + } + } + if (bmpCharsBE - invalidBE > bmpCharsLE - invalidLE) return "utf-32be"; + if (bmpCharsBE - invalidBE < bmpCharsLE - invalidLE) return "utf-32le"; + return defaultEncoding || "utf-32le"; + } + } +}); + +// ../../node_modules/iconv-lite/encodings/utf16.js +var require_utf16 = __commonJS({ + "../../node_modules/iconv-lite/encodings/utf16.js"(exports2) { + "use strict"; + var Buffer2 = require_safer().Buffer; + exports2.utf16be = Utf16BECodec; + function Utf16BECodec() { + } + Utf16BECodec.prototype.encoder = Utf16BEEncoder; + Utf16BECodec.prototype.decoder = Utf16BEDecoder; + Utf16BECodec.prototype.bomAware = true; + function Utf16BEEncoder() { + } + Utf16BEEncoder.prototype.write = function(str) { + var buf = Buffer2.from(str, "ucs2"); + for (var i = 0; i < buf.length; i += 2) { + var tmp = buf[i]; + buf[i] = buf[i + 1]; + buf[i + 1] = tmp; + } + return buf; + }; + Utf16BEEncoder.prototype.end = function() { + }; + function Utf16BEDecoder() { + this.overflowByte = -1; + } + Utf16BEDecoder.prototype.write = function(buf) { + if (buf.length == 0) + return ""; + var buf2 = Buffer2.alloc(buf.length + 1), i = 0, j = 0; + if (this.overflowByte !== -1) { + buf2[0] = buf[0]; + buf2[1] = this.overflowByte; + i = 1; + j = 2; + } + for (; i < buf.length - 1; i += 2, j += 2) { + buf2[j] = buf[i + 1]; + buf2[j + 1] = buf[i]; + } + this.overflowByte = i == buf.length - 1 ? buf[buf.length - 1] : -1; + return buf2.slice(0, j).toString("ucs2"); + }; + Utf16BEDecoder.prototype.end = function() { + this.overflowByte = -1; + }; + exports2.utf16 = Utf16Codec; + function Utf16Codec(codecOptions, iconv) { + this.iconv = iconv; + } + Utf16Codec.prototype.encoder = Utf16Encoder; + Utf16Codec.prototype.decoder = Utf16Decoder; + function Utf16Encoder(options, codec) { + options = options || {}; + if (options.addBOM === void 0) + options.addBOM = true; + this.encoder = codec.iconv.getEncoder("utf-16le", options); + } + Utf16Encoder.prototype.write = function(str) { + return this.encoder.write(str); + }; + Utf16Encoder.prototype.end = function() { + return this.encoder.end(); + }; + function Utf16Decoder(options, codec) { + this.decoder = null; + this.initialBufs = []; + this.initialBufsLen = 0; + this.options = options || {}; + this.iconv = codec.iconv; + } + Utf16Decoder.prototype.write = function(buf) { + if (!this.decoder) { + this.initialBufs.push(buf); + this.initialBufsLen += buf.length; + if (this.initialBufsLen < 16) + return ""; + var encoding = detectEncoding(this.initialBufs, this.options.defaultEncoding); + this.decoder = this.iconv.getDecoder(encoding, this.options); + var resStr = ""; + for (var i = 0; i < this.initialBufs.length; i++) + resStr += this.decoder.write(this.initialBufs[i]); + this.initialBufs.length = this.initialBufsLen = 0; + return resStr; + } + return this.decoder.write(buf); + }; + Utf16Decoder.prototype.end = function() { + if (!this.decoder) { + var encoding = detectEncoding(this.initialBufs, this.options.defaultEncoding); + this.decoder = this.iconv.getDecoder(encoding, this.options); + var resStr = ""; + for (var i = 0; i < this.initialBufs.length; i++) + resStr += this.decoder.write(this.initialBufs[i]); + var trail = this.decoder.end(); + if (trail) + resStr += trail; + this.initialBufs.length = this.initialBufsLen = 0; + return resStr; + } + return this.decoder.end(); + }; + function detectEncoding(bufs, defaultEncoding) { + var b = []; + var charsProcessed = 0; + var asciiCharsLE = 0, asciiCharsBE = 0; + outer_loop: + for (var i = 0; i < bufs.length; i++) { + var buf = bufs[i]; + for (var j = 0; j < buf.length; j++) { + b.push(buf[j]); + if (b.length === 2) { + if (charsProcessed === 0) { + if (b[0] === 255 && b[1] === 254) return "utf-16le"; + if (b[0] === 254 && b[1] === 255) return "utf-16be"; + } + if (b[0] === 0 && b[1] !== 0) asciiCharsBE++; + if (b[0] !== 0 && b[1] === 0) asciiCharsLE++; + b.length = 0; + charsProcessed++; + if (charsProcessed >= 100) { + break outer_loop; + } + } + } + } + if (asciiCharsBE > asciiCharsLE) return "utf-16be"; + if (asciiCharsBE < asciiCharsLE) return "utf-16le"; + return defaultEncoding || "utf-16le"; + } + } +}); + +// ../../node_modules/iconv-lite/encodings/utf7.js +var require_utf7 = __commonJS({ + "../../node_modules/iconv-lite/encodings/utf7.js"(exports2) { + "use strict"; + var Buffer2 = require_safer().Buffer; + exports2.utf7 = Utf7Codec; + exports2.unicode11utf7 = "utf7"; + function Utf7Codec(codecOptions, iconv) { + this.iconv = iconv; + } + Utf7Codec.prototype.encoder = Utf7Encoder; + Utf7Codec.prototype.decoder = Utf7Decoder; + Utf7Codec.prototype.bomAware = true; + var nonDirectChars = /[^A-Za-z0-9'\(\),-\.\/:\? \n\r\t]+/g; + function Utf7Encoder(options, codec) { + this.iconv = codec.iconv; + } + Utf7Encoder.prototype.write = function(str) { + return Buffer2.from(str.replace(nonDirectChars, function(chunk) { + return "+" + (chunk === "+" ? "" : this.iconv.encode(chunk, "utf16-be").toString("base64").replace(/=+$/, "")) + "-"; + }.bind(this))); + }; + Utf7Encoder.prototype.end = function() { + }; + function Utf7Decoder(options, codec) { + this.iconv = codec.iconv; + this.inBase64 = false; + this.base64Accum = ""; + } + var base64Regex = /[A-Za-z0-9\/+]/; + var base64Chars = []; + for (i = 0; i < 256; i++) + base64Chars[i] = base64Regex.test(String.fromCharCode(i)); + var i; + var plusChar = "+".charCodeAt(0); + var minusChar = "-".charCodeAt(0); + var andChar = "&".charCodeAt(0); + Utf7Decoder.prototype.write = function(buf) { + var res = "", lastI = 0, inBase64 = this.inBase64, base64Accum = this.base64Accum; + for (var i2 = 0; i2 < buf.length; i2++) { + if (!inBase64) { + if (buf[i2] == plusChar) { + res += this.iconv.decode(buf.slice(lastI, i2), "ascii"); + lastI = i2 + 1; + inBase64 = true; + } + } else { + if (!base64Chars[buf[i2]]) { + if (i2 == lastI && buf[i2] == minusChar) { + res += "+"; + } else { + var b64str = base64Accum + this.iconv.decode(buf.slice(lastI, i2), "ascii"); + res += this.iconv.decode(Buffer2.from(b64str, "base64"), "utf16-be"); + } + if (buf[i2] != minusChar) + i2--; + lastI = i2 + 1; + inBase64 = false; + base64Accum = ""; + } + } + } + if (!inBase64) { + res += this.iconv.decode(buf.slice(lastI), "ascii"); + } else { + var b64str = base64Accum + this.iconv.decode(buf.slice(lastI), "ascii"); + var canBeDecoded = b64str.length - b64str.length % 8; + base64Accum = b64str.slice(canBeDecoded); + b64str = b64str.slice(0, canBeDecoded); + res += this.iconv.decode(Buffer2.from(b64str, "base64"), "utf16-be"); + } + this.inBase64 = inBase64; + this.base64Accum = base64Accum; + return res; + }; + Utf7Decoder.prototype.end = function() { + var res = ""; + if (this.inBase64 && this.base64Accum.length > 0) + res = this.iconv.decode(Buffer2.from(this.base64Accum, "base64"), "utf16-be"); + this.inBase64 = false; + this.base64Accum = ""; + return res; + }; + exports2.utf7imap = Utf7IMAPCodec; + function Utf7IMAPCodec(codecOptions, iconv) { + this.iconv = iconv; + } + Utf7IMAPCodec.prototype.encoder = Utf7IMAPEncoder; + Utf7IMAPCodec.prototype.decoder = Utf7IMAPDecoder; + Utf7IMAPCodec.prototype.bomAware = true; + function Utf7IMAPEncoder(options, codec) { + this.iconv = codec.iconv; + this.inBase64 = false; + this.base64Accum = Buffer2.alloc(6); + this.base64AccumIdx = 0; + } + Utf7IMAPEncoder.prototype.write = function(str) { + var inBase64 = this.inBase64, base64Accum = this.base64Accum, base64AccumIdx = this.base64AccumIdx, buf = Buffer2.alloc(str.length * 5 + 10), bufIdx = 0; + for (var i2 = 0; i2 < str.length; i2++) { + var uChar = str.charCodeAt(i2); + if (32 <= uChar && uChar <= 126) { + if (inBase64) { + if (base64AccumIdx > 0) { + bufIdx += buf.write(base64Accum.slice(0, base64AccumIdx).toString("base64").replace(/\//g, ",").replace(/=+$/, ""), bufIdx); + base64AccumIdx = 0; + } + buf[bufIdx++] = minusChar; + inBase64 = false; + } + if (!inBase64) { + buf[bufIdx++] = uChar; + if (uChar === andChar) + buf[bufIdx++] = minusChar; + } + } else { + if (!inBase64) { + buf[bufIdx++] = andChar; + inBase64 = true; + } + if (inBase64) { + base64Accum[base64AccumIdx++] = uChar >> 8; + base64Accum[base64AccumIdx++] = uChar & 255; + if (base64AccumIdx == base64Accum.length) { + bufIdx += buf.write(base64Accum.toString("base64").replace(/\//g, ","), bufIdx); + base64AccumIdx = 0; + } + } + } + } + this.inBase64 = inBase64; + this.base64AccumIdx = base64AccumIdx; + return buf.slice(0, bufIdx); + }; + Utf7IMAPEncoder.prototype.end = function() { + var buf = Buffer2.alloc(10), bufIdx = 0; + if (this.inBase64) { + if (this.base64AccumIdx > 0) { + bufIdx += buf.write(this.base64Accum.slice(0, this.base64AccumIdx).toString("base64").replace(/\//g, ",").replace(/=+$/, ""), bufIdx); + this.base64AccumIdx = 0; + } + buf[bufIdx++] = minusChar; + this.inBase64 = false; + } + return buf.slice(0, bufIdx); + }; + function Utf7IMAPDecoder(options, codec) { + this.iconv = codec.iconv; + this.inBase64 = false; + this.base64Accum = ""; + } + var base64IMAPChars = base64Chars.slice(); + base64IMAPChars[",".charCodeAt(0)] = true; + Utf7IMAPDecoder.prototype.write = function(buf) { + var res = "", lastI = 0, inBase64 = this.inBase64, base64Accum = this.base64Accum; + for (var i2 = 0; i2 < buf.length; i2++) { + if (!inBase64) { + if (buf[i2] == andChar) { + res += this.iconv.decode(buf.slice(lastI, i2), "ascii"); + lastI = i2 + 1; + inBase64 = true; + } + } else { + if (!base64IMAPChars[buf[i2]]) { + if (i2 == lastI && buf[i2] == minusChar) { + res += "&"; + } else { + var b64str = base64Accum + this.iconv.decode(buf.slice(lastI, i2), "ascii").replace(/,/g, "/"); + res += this.iconv.decode(Buffer2.from(b64str, "base64"), "utf16-be"); + } + if (buf[i2] != minusChar) + i2--; + lastI = i2 + 1; + inBase64 = false; + base64Accum = ""; + } + } + } + if (!inBase64) { + res += this.iconv.decode(buf.slice(lastI), "ascii"); + } else { + var b64str = base64Accum + this.iconv.decode(buf.slice(lastI), "ascii").replace(/,/g, "/"); + var canBeDecoded = b64str.length - b64str.length % 8; + base64Accum = b64str.slice(canBeDecoded); + b64str = b64str.slice(0, canBeDecoded); + res += this.iconv.decode(Buffer2.from(b64str, "base64"), "utf16-be"); + } + this.inBase64 = inBase64; + this.base64Accum = base64Accum; + return res; + }; + Utf7IMAPDecoder.prototype.end = function() { + var res = ""; + if (this.inBase64 && this.base64Accum.length > 0) + res = this.iconv.decode(Buffer2.from(this.base64Accum, "base64"), "utf16-be"); + this.inBase64 = false; + this.base64Accum = ""; + return res; + }; + } +}); + +// ../../node_modules/iconv-lite/encodings/sbcs-codec.js +var require_sbcs_codec = __commonJS({ + "../../node_modules/iconv-lite/encodings/sbcs-codec.js"(exports2) { + "use strict"; + var Buffer2 = require_safer().Buffer; + exports2._sbcs = SBCSCodec; + function SBCSCodec(codecOptions, iconv) { + if (!codecOptions) + throw new Error("SBCS codec is called without the data."); + if (!codecOptions.chars || codecOptions.chars.length !== 128 && codecOptions.chars.length !== 256) + throw new Error("Encoding '" + codecOptions.type + "' has incorrect 'chars' (must be of len 128 or 256)"); + if (codecOptions.chars.length === 128) { + var asciiString = ""; + for (var i = 0; i < 128; i++) + asciiString += String.fromCharCode(i); + codecOptions.chars = asciiString + codecOptions.chars; + } + this.decodeBuf = Buffer2.from(codecOptions.chars, "ucs2"); + var encodeBuf = Buffer2.alloc(65536, iconv.defaultCharSingleByte.charCodeAt(0)); + for (var i = 0; i < codecOptions.chars.length; i++) + encodeBuf[codecOptions.chars.charCodeAt(i)] = i; + this.encodeBuf = encodeBuf; + } + SBCSCodec.prototype.encoder = SBCSEncoder; + SBCSCodec.prototype.decoder = SBCSDecoder; + function SBCSEncoder(options, codec) { + this.encodeBuf = codec.encodeBuf; + } + SBCSEncoder.prototype.write = function(str) { + var buf = Buffer2.alloc(str.length); + for (var i = 0; i < str.length; i++) + buf[i] = this.encodeBuf[str.charCodeAt(i)]; + return buf; + }; + SBCSEncoder.prototype.end = function() { + }; + function SBCSDecoder(options, codec) { + this.decodeBuf = codec.decodeBuf; + } + SBCSDecoder.prototype.write = function(buf) { + var decodeBuf = this.decodeBuf; + var newBuf = Buffer2.alloc(buf.length * 2); + var idx1 = 0, idx2 = 0; + for (var i = 0; i < buf.length; i++) { + idx1 = buf[i] * 2; + idx2 = i * 2; + newBuf[idx2] = decodeBuf[idx1]; + newBuf[idx2 + 1] = decodeBuf[idx1 + 1]; + } + return newBuf.toString("ucs2"); + }; + SBCSDecoder.prototype.end = function() { + }; + } +}); + +// ../../node_modules/iconv-lite/encodings/sbcs-data.js +var require_sbcs_data = __commonJS({ + "../../node_modules/iconv-lite/encodings/sbcs-data.js"(exports2, module2) { + "use strict"; + module2.exports = { + // Not supported by iconv, not sure why. + "10029": "maccenteuro", + "maccenteuro": { + "type": "_sbcs", + "chars": "\xC4\u0100\u0101\xC9\u0104\xD6\xDC\xE1\u0105\u010C\xE4\u010D\u0106\u0107\xE9\u0179\u017A\u010E\xED\u010F\u0112\u0113\u0116\xF3\u0117\xF4\xF6\xF5\xFA\u011A\u011B\xFC\u2020\xB0\u0118\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\u0119\xA8\u2260\u0123\u012E\u012F\u012A\u2264\u2265\u012B\u0136\u2202\u2211\u0142\u013B\u013C\u013D\u013E\u0139\u013A\u0145\u0146\u0143\xAC\u221A\u0144\u0147\u2206\xAB\xBB\u2026\xA0\u0148\u0150\xD5\u0151\u014C\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\u014D\u0154\u0155\u0158\u2039\u203A\u0159\u0156\u0157\u0160\u201A\u201E\u0161\u015A\u015B\xC1\u0164\u0165\xCD\u017D\u017E\u016A\xD3\xD4\u016B\u016E\xDA\u016F\u0170\u0171\u0172\u0173\xDD\xFD\u0137\u017B\u0141\u017C\u0122\u02C7" + }, + "808": "cp808", + "ibm808": "cp808", + "cp808": { + "type": "_sbcs", + "chars": "\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E\u044F\u0401\u0451\u0404\u0454\u0407\u0457\u040E\u045E\xB0\u2219\xB7\u221A\u2116\u20AC\u25A0\xA0" + }, + "mik": { + "type": "_sbcs", + "chars": "\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E\u044F\u2514\u2534\u252C\u251C\u2500\u253C\u2563\u2551\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2510\u2591\u2592\u2593\u2502\u2524\u2116\xA7\u2557\u255D\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03B1\xDF\u0393\u03C0\u03A3\u03C3\xB5\u03C4\u03A6\u0398\u03A9\u03B4\u221E\u03C6\u03B5\u2229\u2261\xB1\u2265\u2264\u2320\u2321\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0\xA0" + }, + "cp720": { + "type": "_sbcs", + "chars": "\x80\x81\xE9\xE2\x84\xE0\x86\xE7\xEA\xEB\xE8\xEF\xEE\x8D\x8E\x8F\x90\u0651\u0652\xF4\xA4\u0640\xFB\xF9\u0621\u0622\u0623\u0624\xA3\u0625\u0626\u0627\u0628\u0629\u062A\u062B\u062C\u062D\u062E\u062F\u0630\u0631\u0632\u0633\u0634\u0635\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u0636\u0637\u0638\u0639\u063A\u0641\xB5\u0642\u0643\u0644\u0645\u0646\u0647\u0648\u0649\u064A\u2261\u064B\u064C\u064D\u064E\u064F\u0650\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0\xA0" + }, + // Aliases of generated encodings. + "ascii8bit": "ascii", + "usascii": "ascii", + "ansix34": "ascii", + "ansix341968": "ascii", + "ansix341986": "ascii", + "csascii": "ascii", + "cp367": "ascii", + "ibm367": "ascii", + "isoir6": "ascii", + "iso646us": "ascii", + "iso646irv": "ascii", + "us": "ascii", + "latin1": "iso88591", + "latin2": "iso88592", + "latin3": "iso88593", + "latin4": "iso88594", + "latin5": "iso88599", + "latin6": "iso885910", + "latin7": "iso885913", + "latin8": "iso885914", + "latin9": "iso885915", + "latin10": "iso885916", + "csisolatin1": "iso88591", + "csisolatin2": "iso88592", + "csisolatin3": "iso88593", + "csisolatin4": "iso88594", + "csisolatincyrillic": "iso88595", + "csisolatinarabic": "iso88596", + "csisolatingreek": "iso88597", + "csisolatinhebrew": "iso88598", + "csisolatin5": "iso88599", + "csisolatin6": "iso885910", + "l1": "iso88591", + "l2": "iso88592", + "l3": "iso88593", + "l4": "iso88594", + "l5": "iso88599", + "l6": "iso885910", + "l7": "iso885913", + "l8": "iso885914", + "l9": "iso885915", + "l10": "iso885916", + "isoir14": "iso646jp", + "isoir57": "iso646cn", + "isoir100": "iso88591", + "isoir101": "iso88592", + "isoir109": "iso88593", + "isoir110": "iso88594", + "isoir144": "iso88595", + "isoir127": "iso88596", + "isoir126": "iso88597", + "isoir138": "iso88598", + "isoir148": "iso88599", + "isoir157": "iso885910", + "isoir166": "tis620", + "isoir179": "iso885913", + "isoir199": "iso885914", + "isoir203": "iso885915", + "isoir226": "iso885916", + "cp819": "iso88591", + "ibm819": "iso88591", + "cyrillic": "iso88595", + "arabic": "iso88596", + "arabic8": "iso88596", + "ecma114": "iso88596", + "asmo708": "iso88596", + "greek": "iso88597", + "greek8": "iso88597", + "ecma118": "iso88597", + "elot928": "iso88597", + "hebrew": "iso88598", + "hebrew8": "iso88598", + "turkish": "iso88599", + "turkish8": "iso88599", + "thai": "iso885911", + "thai8": "iso885911", + "celtic": "iso885914", + "celtic8": "iso885914", + "isoceltic": "iso885914", + "tis6200": "tis620", + "tis62025291": "tis620", + "tis62025330": "tis620", + "10000": "macroman", + "10006": "macgreek", + "10007": "maccyrillic", + "10079": "maciceland", + "10081": "macturkish", + "cspc8codepage437": "cp437", + "cspc775baltic": "cp775", + "cspc850multilingual": "cp850", + "cspcp852": "cp852", + "cspc862latinhebrew": "cp862", + "cpgr": "cp869", + "msee": "cp1250", + "mscyrl": "cp1251", + "msansi": "cp1252", + "msgreek": "cp1253", + "msturk": "cp1254", + "mshebr": "cp1255", + "msarab": "cp1256", + "winbaltrim": "cp1257", + "cp20866": "koi8r", + "20866": "koi8r", + "ibm878": "koi8r", + "cskoi8r": "koi8r", + "cp21866": "koi8u", + "21866": "koi8u", + "ibm1168": "koi8u", + "strk10482002": "rk1048", + "tcvn5712": "tcvn", + "tcvn57121": "tcvn", + "gb198880": "iso646cn", + "cn": "iso646cn", + "csiso14jisc6220ro": "iso646jp", + "jisc62201969ro": "iso646jp", + "jp": "iso646jp", + "cshproman8": "hproman8", + "r8": "hproman8", + "roman8": "hproman8", + "xroman8": "hproman8", + "ibm1051": "hproman8", + "mac": "macintosh", + "csmacintosh": "macintosh" + }; + } +}); + +// ../../node_modules/iconv-lite/encodings/sbcs-data-generated.js +var require_sbcs_data_generated = __commonJS({ + "../../node_modules/iconv-lite/encodings/sbcs-data-generated.js"(exports2, module2) { + "use strict"; + module2.exports = { + "437": "cp437", + "737": "cp737", + "775": "cp775", + "850": "cp850", + "852": "cp852", + "855": "cp855", + "856": "cp856", + "857": "cp857", + "858": "cp858", + "860": "cp860", + "861": "cp861", + "862": "cp862", + "863": "cp863", + "864": "cp864", + "865": "cp865", + "866": "cp866", + "869": "cp869", + "874": "windows874", + "922": "cp922", + "1046": "cp1046", + "1124": "cp1124", + "1125": "cp1125", + "1129": "cp1129", + "1133": "cp1133", + "1161": "cp1161", + "1162": "cp1162", + "1163": "cp1163", + "1250": "windows1250", + "1251": "windows1251", + "1252": "windows1252", + "1253": "windows1253", + "1254": "windows1254", + "1255": "windows1255", + "1256": "windows1256", + "1257": "windows1257", + "1258": "windows1258", + "28591": "iso88591", + "28592": "iso88592", + "28593": "iso88593", + "28594": "iso88594", + "28595": "iso88595", + "28596": "iso88596", + "28597": "iso88597", + "28598": "iso88598", + "28599": "iso88599", + "28600": "iso885910", + "28601": "iso885911", + "28603": "iso885913", + "28604": "iso885914", + "28605": "iso885915", + "28606": "iso885916", + "windows874": { + "type": "_sbcs", + "chars": "\u20AC\uFFFD\uFFFD\uFFFD\uFFFD\u2026\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u2018\u2019\u201C\u201D\u2022\u2013\u2014\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\xA0\u0E01\u0E02\u0E03\u0E04\u0E05\u0E06\u0E07\u0E08\u0E09\u0E0A\u0E0B\u0E0C\u0E0D\u0E0E\u0E0F\u0E10\u0E11\u0E12\u0E13\u0E14\u0E15\u0E16\u0E17\u0E18\u0E19\u0E1A\u0E1B\u0E1C\u0E1D\u0E1E\u0E1F\u0E20\u0E21\u0E22\u0E23\u0E24\u0E25\u0E26\u0E27\u0E28\u0E29\u0E2A\u0E2B\u0E2C\u0E2D\u0E2E\u0E2F\u0E30\u0E31\u0E32\u0E33\u0E34\u0E35\u0E36\u0E37\u0E38\u0E39\u0E3A\uFFFD\uFFFD\uFFFD\uFFFD\u0E3F\u0E40\u0E41\u0E42\u0E43\u0E44\u0E45\u0E46\u0E47\u0E48\u0E49\u0E4A\u0E4B\u0E4C\u0E4D\u0E4E\u0E4F\u0E50\u0E51\u0E52\u0E53\u0E54\u0E55\u0E56\u0E57\u0E58\u0E59\u0E5A\u0E5B\uFFFD\uFFFD\uFFFD\uFFFD" + }, + "win874": "windows874", + "cp874": "windows874", + "windows1250": { + "type": "_sbcs", + "chars": "\u20AC\uFFFD\u201A\uFFFD\u201E\u2026\u2020\u2021\uFFFD\u2030\u0160\u2039\u015A\u0164\u017D\u0179\uFFFD\u2018\u2019\u201C\u201D\u2022\u2013\u2014\uFFFD\u2122\u0161\u203A\u015B\u0165\u017E\u017A\xA0\u02C7\u02D8\u0141\xA4\u0104\xA6\xA7\xA8\xA9\u015E\xAB\xAC\xAD\xAE\u017B\xB0\xB1\u02DB\u0142\xB4\xB5\xB6\xB7\xB8\u0105\u015F\xBB\u013D\u02DD\u013E\u017C\u0154\xC1\xC2\u0102\xC4\u0139\u0106\xC7\u010C\xC9\u0118\xCB\u011A\xCD\xCE\u010E\u0110\u0143\u0147\xD3\xD4\u0150\xD6\xD7\u0158\u016E\xDA\u0170\xDC\xDD\u0162\xDF\u0155\xE1\xE2\u0103\xE4\u013A\u0107\xE7\u010D\xE9\u0119\xEB\u011B\xED\xEE\u010F\u0111\u0144\u0148\xF3\xF4\u0151\xF6\xF7\u0159\u016F\xFA\u0171\xFC\xFD\u0163\u02D9" + }, + "win1250": "windows1250", + "cp1250": "windows1250", + "windows1251": { + "type": "_sbcs", + "chars": "\u0402\u0403\u201A\u0453\u201E\u2026\u2020\u2021\u20AC\u2030\u0409\u2039\u040A\u040C\u040B\u040F\u0452\u2018\u2019\u201C\u201D\u2022\u2013\u2014\uFFFD\u2122\u0459\u203A\u045A\u045C\u045B\u045F\xA0\u040E\u045E\u0408\xA4\u0490\xA6\xA7\u0401\xA9\u0404\xAB\xAC\xAD\xAE\u0407\xB0\xB1\u0406\u0456\u0491\xB5\xB6\xB7\u0451\u2116\u0454\xBB\u0458\u0405\u0455\u0457\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E\u044F" + }, + "win1251": "windows1251", + "cp1251": "windows1251", + "windows1252": { + "type": "_sbcs", + "chars": "\u20AC\uFFFD\u201A\u0192\u201E\u2026\u2020\u2021\u02C6\u2030\u0160\u2039\u0152\uFFFD\u017D\uFFFD\uFFFD\u2018\u2019\u201C\u201D\u2022\u2013\u2014\u02DC\u2122\u0161\u203A\u0153\uFFFD\u017E\u0178\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDB\xDC\xDD\xDE\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xFF" + }, + "win1252": "windows1252", + "cp1252": "windows1252", + "windows1253": { + "type": "_sbcs", + "chars": "\u20AC\uFFFD\u201A\u0192\u201E\u2026\u2020\u2021\uFFFD\u2030\uFFFD\u2039\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u2018\u2019\u201C\u201D\u2022\u2013\u2014\uFFFD\u2122\uFFFD\u203A\uFFFD\uFFFD\uFFFD\uFFFD\xA0\u0385\u0386\xA3\xA4\xA5\xA6\xA7\xA8\xA9\uFFFD\xAB\xAC\xAD\xAE\u2015\xB0\xB1\xB2\xB3\u0384\xB5\xB6\xB7\u0388\u0389\u038A\xBB\u038C\xBD\u038E\u038F\u0390\u0391\u0392\u0393\u0394\u0395\u0396\u0397\u0398\u0399\u039A\u039B\u039C\u039D\u039E\u039F\u03A0\u03A1\uFFFD\u03A3\u03A4\u03A5\u03A6\u03A7\u03A8\u03A9\u03AA\u03AB\u03AC\u03AD\u03AE\u03AF\u03B0\u03B1\u03B2\u03B3\u03B4\u03B5\u03B6\u03B7\u03B8\u03B9\u03BA\u03BB\u03BC\u03BD\u03BE\u03BF\u03C0\u03C1\u03C2\u03C3\u03C4\u03C5\u03C6\u03C7\u03C8\u03C9\u03CA\u03CB\u03CC\u03CD\u03CE\uFFFD" + }, + "win1253": "windows1253", + "cp1253": "windows1253", + "windows1254": { + "type": "_sbcs", + "chars": "\u20AC\uFFFD\u201A\u0192\u201E\u2026\u2020\u2021\u02C6\u2030\u0160\u2039\u0152\uFFFD\uFFFD\uFFFD\uFFFD\u2018\u2019\u201C\u201D\u2022\u2013\u2014\u02DC\u2122\u0161\u203A\u0153\uFFFD\uFFFD\u0178\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\u011E\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDB\xDC\u0130\u015E\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\u011F\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\u0131\u015F\xFF" + }, + "win1254": "windows1254", + "cp1254": "windows1254", + "windows1255": { + "type": "_sbcs", + "chars": "\u20AC\uFFFD\u201A\u0192\u201E\u2026\u2020\u2021\u02C6\u2030\uFFFD\u2039\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u2018\u2019\u201C\u201D\u2022\u2013\u2014\u02DC\u2122\uFFFD\u203A\uFFFD\uFFFD\uFFFD\uFFFD\xA0\xA1\xA2\xA3\u20AA\xA5\xA6\xA7\xA8\xA9\xD7\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xF7\xBB\xBC\xBD\xBE\xBF\u05B0\u05B1\u05B2\u05B3\u05B4\u05B5\u05B6\u05B7\u05B8\u05B9\u05BA\u05BB\u05BC\u05BD\u05BE\u05BF\u05C0\u05C1\u05C2\u05C3\u05F0\u05F1\u05F2\u05F3\u05F4\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u05D0\u05D1\u05D2\u05D3\u05D4\u05D5\u05D6\u05D7\u05D8\u05D9\u05DA\u05DB\u05DC\u05DD\u05DE\u05DF\u05E0\u05E1\u05E2\u05E3\u05E4\u05E5\u05E6\u05E7\u05E8\u05E9\u05EA\uFFFD\uFFFD\u200E\u200F\uFFFD" + }, + "win1255": "windows1255", + "cp1255": "windows1255", + "windows1256": { + "type": "_sbcs", + "chars": "\u20AC\u067E\u201A\u0192\u201E\u2026\u2020\u2021\u02C6\u2030\u0679\u2039\u0152\u0686\u0698\u0688\u06AF\u2018\u2019\u201C\u201D\u2022\u2013\u2014\u06A9\u2122\u0691\u203A\u0153\u200C\u200D\u06BA\xA0\u060C\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\u06BE\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\u061B\xBB\xBC\xBD\xBE\u061F\u06C1\u0621\u0622\u0623\u0624\u0625\u0626\u0627\u0628\u0629\u062A\u062B\u062C\u062D\u062E\u062F\u0630\u0631\u0632\u0633\u0634\u0635\u0636\xD7\u0637\u0638\u0639\u063A\u0640\u0641\u0642\u0643\xE0\u0644\xE2\u0645\u0646\u0647\u0648\xE7\xE8\xE9\xEA\xEB\u0649\u064A\xEE\xEF\u064B\u064C\u064D\u064E\xF4\u064F\u0650\xF7\u0651\xF9\u0652\xFB\xFC\u200E\u200F\u06D2" + }, + "win1256": "windows1256", + "cp1256": "windows1256", + "windows1257": { + "type": "_sbcs", + "chars": "\u20AC\uFFFD\u201A\uFFFD\u201E\u2026\u2020\u2021\uFFFD\u2030\uFFFD\u2039\uFFFD\xA8\u02C7\xB8\uFFFD\u2018\u2019\u201C\u201D\u2022\u2013\u2014\uFFFD\u2122\uFFFD\u203A\uFFFD\xAF\u02DB\uFFFD\xA0\uFFFD\xA2\xA3\xA4\uFFFD\xA6\xA7\xD8\xA9\u0156\xAB\xAC\xAD\xAE\xC6\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xF8\xB9\u0157\xBB\xBC\xBD\xBE\xE6\u0104\u012E\u0100\u0106\xC4\xC5\u0118\u0112\u010C\xC9\u0179\u0116\u0122\u0136\u012A\u013B\u0160\u0143\u0145\xD3\u014C\xD5\xD6\xD7\u0172\u0141\u015A\u016A\xDC\u017B\u017D\xDF\u0105\u012F\u0101\u0107\xE4\xE5\u0119\u0113\u010D\xE9\u017A\u0117\u0123\u0137\u012B\u013C\u0161\u0144\u0146\xF3\u014D\xF5\xF6\xF7\u0173\u0142\u015B\u016B\xFC\u017C\u017E\u02D9" + }, + "win1257": "windows1257", + "cp1257": "windows1257", + "windows1258": { + "type": "_sbcs", + "chars": "\u20AC\uFFFD\u201A\u0192\u201E\u2026\u2020\u2021\u02C6\u2030\uFFFD\u2039\u0152\uFFFD\uFFFD\uFFFD\uFFFD\u2018\u2019\u201C\u201D\u2022\u2013\u2014\u02DC\u2122\uFFFD\u203A\u0153\uFFFD\uFFFD\u0178\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\u0102\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\u0300\xCD\xCE\xCF\u0110\xD1\u0309\xD3\xD4\u01A0\xD6\xD7\xD8\xD9\xDA\xDB\xDC\u01AF\u0303\xDF\xE0\xE1\xE2\u0103\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\u0301\xED\xEE\xEF\u0111\xF1\u0323\xF3\xF4\u01A1\xF6\xF7\xF8\xF9\xFA\xFB\xFC\u01B0\u20AB\xFF" + }, + "win1258": "windows1258", + "cp1258": "windows1258", + "iso88591": { + "type": "_sbcs", + "chars": "\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDB\xDC\xDD\xDE\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xFF" + }, + "cp28591": "iso88591", + "iso88592": { + "type": "_sbcs", + "chars": "\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u0104\u02D8\u0141\xA4\u013D\u015A\xA7\xA8\u0160\u015E\u0164\u0179\xAD\u017D\u017B\xB0\u0105\u02DB\u0142\xB4\u013E\u015B\u02C7\xB8\u0161\u015F\u0165\u017A\u02DD\u017E\u017C\u0154\xC1\xC2\u0102\xC4\u0139\u0106\xC7\u010C\xC9\u0118\xCB\u011A\xCD\xCE\u010E\u0110\u0143\u0147\xD3\xD4\u0150\xD6\xD7\u0158\u016E\xDA\u0170\xDC\xDD\u0162\xDF\u0155\xE1\xE2\u0103\xE4\u013A\u0107\xE7\u010D\xE9\u0119\xEB\u011B\xED\xEE\u010F\u0111\u0144\u0148\xF3\xF4\u0151\xF6\xF7\u0159\u016F\xFA\u0171\xFC\xFD\u0163\u02D9" + }, + "cp28592": "iso88592", + "iso88593": { + "type": "_sbcs", + "chars": "\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u0126\u02D8\xA3\xA4\uFFFD\u0124\xA7\xA8\u0130\u015E\u011E\u0134\xAD\uFFFD\u017B\xB0\u0127\xB2\xB3\xB4\xB5\u0125\xB7\xB8\u0131\u015F\u011F\u0135\xBD\uFFFD\u017C\xC0\xC1\xC2\uFFFD\xC4\u010A\u0108\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\uFFFD\xD1\xD2\xD3\xD4\u0120\xD6\xD7\u011C\xD9\xDA\xDB\xDC\u016C\u015C\xDF\xE0\xE1\xE2\uFFFD\xE4\u010B\u0109\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\uFFFD\xF1\xF2\xF3\xF4\u0121\xF6\xF7\u011D\xF9\xFA\xFB\xFC\u016D\u015D\u02D9" + }, + "cp28593": "iso88593", + "iso88594": { + "type": "_sbcs", + "chars": "\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u0104\u0138\u0156\xA4\u0128\u013B\xA7\xA8\u0160\u0112\u0122\u0166\xAD\u017D\xAF\xB0\u0105\u02DB\u0157\xB4\u0129\u013C\u02C7\xB8\u0161\u0113\u0123\u0167\u014A\u017E\u014B\u0100\xC1\xC2\xC3\xC4\xC5\xC6\u012E\u010C\xC9\u0118\xCB\u0116\xCD\xCE\u012A\u0110\u0145\u014C\u0136\xD4\xD5\xD6\xD7\xD8\u0172\xDA\xDB\xDC\u0168\u016A\xDF\u0101\xE1\xE2\xE3\xE4\xE5\xE6\u012F\u010D\xE9\u0119\xEB\u0117\xED\xEE\u012B\u0111\u0146\u014D\u0137\xF4\xF5\xF6\xF7\xF8\u0173\xFA\xFB\xFC\u0169\u016B\u02D9" + }, + "cp28594": "iso88594", + "iso88595": { + "type": "_sbcs", + "chars": "\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u0401\u0402\u0403\u0404\u0405\u0406\u0407\u0408\u0409\u040A\u040B\u040C\xAD\u040E\u040F\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E\u044F\u2116\u0451\u0452\u0453\u0454\u0455\u0456\u0457\u0458\u0459\u045A\u045B\u045C\xA7\u045E\u045F" + }, + "cp28595": "iso88595", + "iso88596": { + "type": "_sbcs", + "chars": "\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\uFFFD\uFFFD\uFFFD\xA4\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u060C\xAD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u061B\uFFFD\uFFFD\uFFFD\u061F\uFFFD\u0621\u0622\u0623\u0624\u0625\u0626\u0627\u0628\u0629\u062A\u062B\u062C\u062D\u062E\u062F\u0630\u0631\u0632\u0633\u0634\u0635\u0636\u0637\u0638\u0639\u063A\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u0640\u0641\u0642\u0643\u0644\u0645\u0646\u0647\u0648\u0649\u064A\u064B\u064C\u064D\u064E\u064F\u0650\u0651\u0652\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD" + }, + "cp28596": "iso88596", + "iso88597": { + "type": "_sbcs", + "chars": "\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u2018\u2019\xA3\u20AC\u20AF\xA6\xA7\xA8\xA9\u037A\xAB\xAC\xAD\uFFFD\u2015\xB0\xB1\xB2\xB3\u0384\u0385\u0386\xB7\u0388\u0389\u038A\xBB\u038C\xBD\u038E\u038F\u0390\u0391\u0392\u0393\u0394\u0395\u0396\u0397\u0398\u0399\u039A\u039B\u039C\u039D\u039E\u039F\u03A0\u03A1\uFFFD\u03A3\u03A4\u03A5\u03A6\u03A7\u03A8\u03A9\u03AA\u03AB\u03AC\u03AD\u03AE\u03AF\u03B0\u03B1\u03B2\u03B3\u03B4\u03B5\u03B6\u03B7\u03B8\u03B9\u03BA\u03BB\u03BC\u03BD\u03BE\u03BF\u03C0\u03C1\u03C2\u03C3\u03C4\u03C5\u03C6\u03C7\u03C8\u03C9\u03CA\u03CB\u03CC\u03CD\u03CE\uFFFD" + }, + "cp28597": "iso88597", + "iso88598": { + "type": "_sbcs", + "chars": "\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\uFFFD\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xD7\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xF7\xBB\xBC\xBD\xBE\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u2017\u05D0\u05D1\u05D2\u05D3\u05D4\u05D5\u05D6\u05D7\u05D8\u05D9\u05DA\u05DB\u05DC\u05DD\u05DE\u05DF\u05E0\u05E1\u05E2\u05E3\u05E4\u05E5\u05E6\u05E7\u05E8\u05E9\u05EA\uFFFD\uFFFD\u200E\u200F\uFFFD" + }, + "cp28598": "iso88598", + "iso88599": { + "type": "_sbcs", + "chars": "\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\u011E\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDB\xDC\u0130\u015E\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\u011F\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\u0131\u015F\xFF" + }, + "cp28599": "iso88599", + "iso885910": { + "type": "_sbcs", + "chars": "\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u0104\u0112\u0122\u012A\u0128\u0136\xA7\u013B\u0110\u0160\u0166\u017D\xAD\u016A\u014A\xB0\u0105\u0113\u0123\u012B\u0129\u0137\xB7\u013C\u0111\u0161\u0167\u017E\u2015\u016B\u014B\u0100\xC1\xC2\xC3\xC4\xC5\xC6\u012E\u010C\xC9\u0118\xCB\u0116\xCD\xCE\xCF\xD0\u0145\u014C\xD3\xD4\xD5\xD6\u0168\xD8\u0172\xDA\xDB\xDC\xDD\xDE\xDF\u0101\xE1\xE2\xE3\xE4\xE5\xE6\u012F\u010D\xE9\u0119\xEB\u0117\xED\xEE\xEF\xF0\u0146\u014D\xF3\xF4\xF5\xF6\u0169\xF8\u0173\xFA\xFB\xFC\xFD\xFE\u0138" + }, + "cp28600": "iso885910", + "iso885911": { + "type": "_sbcs", + "chars": "\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u0E01\u0E02\u0E03\u0E04\u0E05\u0E06\u0E07\u0E08\u0E09\u0E0A\u0E0B\u0E0C\u0E0D\u0E0E\u0E0F\u0E10\u0E11\u0E12\u0E13\u0E14\u0E15\u0E16\u0E17\u0E18\u0E19\u0E1A\u0E1B\u0E1C\u0E1D\u0E1E\u0E1F\u0E20\u0E21\u0E22\u0E23\u0E24\u0E25\u0E26\u0E27\u0E28\u0E29\u0E2A\u0E2B\u0E2C\u0E2D\u0E2E\u0E2F\u0E30\u0E31\u0E32\u0E33\u0E34\u0E35\u0E36\u0E37\u0E38\u0E39\u0E3A\uFFFD\uFFFD\uFFFD\uFFFD\u0E3F\u0E40\u0E41\u0E42\u0E43\u0E44\u0E45\u0E46\u0E47\u0E48\u0E49\u0E4A\u0E4B\u0E4C\u0E4D\u0E4E\u0E4F\u0E50\u0E51\u0E52\u0E53\u0E54\u0E55\u0E56\u0E57\u0E58\u0E59\u0E5A\u0E5B\uFFFD\uFFFD\uFFFD\uFFFD" + }, + "cp28601": "iso885911", + "iso885913": { + "type": "_sbcs", + "chars": "\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u201D\xA2\xA3\xA4\u201E\xA6\xA7\xD8\xA9\u0156\xAB\xAC\xAD\xAE\xC6\xB0\xB1\xB2\xB3\u201C\xB5\xB6\xB7\xF8\xB9\u0157\xBB\xBC\xBD\xBE\xE6\u0104\u012E\u0100\u0106\xC4\xC5\u0118\u0112\u010C\xC9\u0179\u0116\u0122\u0136\u012A\u013B\u0160\u0143\u0145\xD3\u014C\xD5\xD6\xD7\u0172\u0141\u015A\u016A\xDC\u017B\u017D\xDF\u0105\u012F\u0101\u0107\xE4\xE5\u0119\u0113\u010D\xE9\u017A\u0117\u0123\u0137\u012B\u013C\u0161\u0144\u0146\xF3\u014D\xF5\xF6\xF7\u0173\u0142\u015B\u016B\xFC\u017C\u017E\u2019" + }, + "cp28603": "iso885913", + "iso885914": { + "type": "_sbcs", + "chars": "\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u1E02\u1E03\xA3\u010A\u010B\u1E0A\xA7\u1E80\xA9\u1E82\u1E0B\u1EF2\xAD\xAE\u0178\u1E1E\u1E1F\u0120\u0121\u1E40\u1E41\xB6\u1E56\u1E81\u1E57\u1E83\u1E60\u1EF3\u1E84\u1E85\u1E61\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\u0174\xD1\xD2\xD3\xD4\xD5\xD6\u1E6A\xD8\xD9\xDA\xDB\xDC\xDD\u0176\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\u0175\xF1\xF2\xF3\xF4\xF5\xF6\u1E6B\xF8\xF9\xFA\xFB\xFC\xFD\u0177\xFF" + }, + "cp28604": "iso885914", + "iso885915": { + "type": "_sbcs", + "chars": "\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\xA1\xA2\xA3\u20AC\xA5\u0160\xA7\u0161\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\u017D\xB5\xB6\xB7\u017E\xB9\xBA\xBB\u0152\u0153\u0178\xBF\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDB\xDC\xDD\xDE\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xFF" + }, + "cp28605": "iso885915", + "iso885916": { + "type": "_sbcs", + "chars": "\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u0104\u0105\u0141\u20AC\u201E\u0160\xA7\u0161\xA9\u0218\xAB\u0179\xAD\u017A\u017B\xB0\xB1\u010C\u0142\u017D\u201D\xB6\xB7\u017E\u010D\u0219\xBB\u0152\u0153\u0178\u017C\xC0\xC1\xC2\u0102\xC4\u0106\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\u0110\u0143\xD2\xD3\xD4\u0150\xD6\u015A\u0170\xD9\xDA\xDB\xDC\u0118\u021A\xDF\xE0\xE1\xE2\u0103\xE4\u0107\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\u0111\u0144\xF2\xF3\xF4\u0151\xF6\u015B\u0171\xF9\xFA\xFB\xFC\u0119\u021B\xFF" + }, + "cp28606": "iso885916", + "cp437": { + "type": "_sbcs", + "chars": "\xC7\xFC\xE9\xE2\xE4\xE0\xE5\xE7\xEA\xEB\xE8\xEF\xEE\xEC\xC4\xC5\xC9\xE6\xC6\xF4\xF6\xF2\xFB\xF9\xFF\xD6\xDC\xA2\xA3\xA5\u20A7\u0192\xE1\xED\xF3\xFA\xF1\xD1\xAA\xBA\xBF\u2310\xAC\xBD\xBC\xA1\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03B1\xDF\u0393\u03C0\u03A3\u03C3\xB5\u03C4\u03A6\u0398\u03A9\u03B4\u221E\u03C6\u03B5\u2229\u2261\xB1\u2265\u2264\u2320\u2321\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0\xA0" + }, + "ibm437": "cp437", + "csibm437": "cp437", + "cp737": { + "type": "_sbcs", + "chars": "\u0391\u0392\u0393\u0394\u0395\u0396\u0397\u0398\u0399\u039A\u039B\u039C\u039D\u039E\u039F\u03A0\u03A1\u03A3\u03A4\u03A5\u03A6\u03A7\u03A8\u03A9\u03B1\u03B2\u03B3\u03B4\u03B5\u03B6\u03B7\u03B8\u03B9\u03BA\u03BB\u03BC\u03BD\u03BE\u03BF\u03C0\u03C1\u03C3\u03C2\u03C4\u03C5\u03C6\u03C7\u03C8\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03C9\u03AC\u03AD\u03AE\u03CA\u03AF\u03CC\u03CD\u03CB\u03CE\u0386\u0388\u0389\u038A\u038C\u038E\u038F\xB1\u2265\u2264\u03AA\u03AB\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0\xA0" + }, + "ibm737": "cp737", + "csibm737": "cp737", + "cp775": { + "type": "_sbcs", + "chars": "\u0106\xFC\xE9\u0101\xE4\u0123\xE5\u0107\u0142\u0113\u0156\u0157\u012B\u0179\xC4\xC5\xC9\xE6\xC6\u014D\xF6\u0122\xA2\u015A\u015B\xD6\xDC\xF8\xA3\xD8\xD7\xA4\u0100\u012A\xF3\u017B\u017C\u017A\u201D\xA6\xA9\xAE\xAC\xBD\xBC\u0141\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u0104\u010C\u0118\u0116\u2563\u2551\u2557\u255D\u012E\u0160\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u0172\u016A\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u017D\u0105\u010D\u0119\u0117\u012F\u0161\u0173\u016B\u017E\u2518\u250C\u2588\u2584\u258C\u2590\u2580\xD3\xDF\u014C\u0143\xF5\xD5\xB5\u0144\u0136\u0137\u013B\u013C\u0146\u0112\u0145\u2019\xAD\xB1\u201C\xBE\xB6\xA7\xF7\u201E\xB0\u2219\xB7\xB9\xB3\xB2\u25A0\xA0" + }, + "ibm775": "cp775", + "csibm775": "cp775", + "cp850": { + "type": "_sbcs", + "chars": "\xC7\xFC\xE9\xE2\xE4\xE0\xE5\xE7\xEA\xEB\xE8\xEF\xEE\xEC\xC4\xC5\xC9\xE6\xC6\xF4\xF6\xF2\xFB\xF9\xFF\xD6\xDC\xF8\xA3\xD8\xD7\u0192\xE1\xED\xF3\xFA\xF1\xD1\xAA\xBA\xBF\xAE\xAC\xBD\xBC\xA1\xAB\xBB\u2591\u2592\u2593\u2502\u2524\xC1\xC2\xC0\xA9\u2563\u2551\u2557\u255D\xA2\xA5\u2510\u2514\u2534\u252C\u251C\u2500\u253C\xE3\xC3\u255A\u2554\u2569\u2566\u2560\u2550\u256C\xA4\xF0\xD0\xCA\xCB\xC8\u0131\xCD\xCE\xCF\u2518\u250C\u2588\u2584\xA6\xCC\u2580\xD3\xDF\xD4\xD2\xF5\xD5\xB5\xFE\xDE\xDA\xDB\xD9\xFD\xDD\xAF\xB4\xAD\xB1\u2017\xBE\xB6\xA7\xF7\xB8\xB0\xA8\xB7\xB9\xB3\xB2\u25A0\xA0" + }, + "ibm850": "cp850", + "csibm850": "cp850", + "cp852": { + "type": "_sbcs", + "chars": "\xC7\xFC\xE9\xE2\xE4\u016F\u0107\xE7\u0142\xEB\u0150\u0151\xEE\u0179\xC4\u0106\xC9\u0139\u013A\xF4\xF6\u013D\u013E\u015A\u015B\xD6\xDC\u0164\u0165\u0141\xD7\u010D\xE1\xED\xF3\xFA\u0104\u0105\u017D\u017E\u0118\u0119\xAC\u017A\u010C\u015F\xAB\xBB\u2591\u2592\u2593\u2502\u2524\xC1\xC2\u011A\u015E\u2563\u2551\u2557\u255D\u017B\u017C\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u0102\u0103\u255A\u2554\u2569\u2566\u2560\u2550\u256C\xA4\u0111\u0110\u010E\xCB\u010F\u0147\xCD\xCE\u011B\u2518\u250C\u2588\u2584\u0162\u016E\u2580\xD3\xDF\xD4\u0143\u0144\u0148\u0160\u0161\u0154\xDA\u0155\u0170\xFD\xDD\u0163\xB4\xAD\u02DD\u02DB\u02C7\u02D8\xA7\xF7\xB8\xB0\xA8\u02D9\u0171\u0158\u0159\u25A0\xA0" + }, + "ibm852": "cp852", + "csibm852": "cp852", + "cp855": { + "type": "_sbcs", + "chars": "\u0452\u0402\u0453\u0403\u0451\u0401\u0454\u0404\u0455\u0405\u0456\u0406\u0457\u0407\u0458\u0408\u0459\u0409\u045A\u040A\u045B\u040B\u045C\u040C\u045E\u040E\u045F\u040F\u044E\u042E\u044A\u042A\u0430\u0410\u0431\u0411\u0446\u0426\u0434\u0414\u0435\u0415\u0444\u0424\u0433\u0413\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u0445\u0425\u0438\u0418\u2563\u2551\u2557\u255D\u0439\u0419\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u043A\u041A\u255A\u2554\u2569\u2566\u2560\u2550\u256C\xA4\u043B\u041B\u043C\u041C\u043D\u041D\u043E\u041E\u043F\u2518\u250C\u2588\u2584\u041F\u044F\u2580\u042F\u0440\u0420\u0441\u0421\u0442\u0422\u0443\u0423\u0436\u0416\u0432\u0412\u044C\u042C\u2116\xAD\u044B\u042B\u0437\u0417\u0448\u0428\u044D\u042D\u0449\u0429\u0447\u0427\xA7\u25A0\xA0" + }, + "ibm855": "cp855", + "csibm855": "cp855", + "cp856": { + "type": "_sbcs", + "chars": "\u05D0\u05D1\u05D2\u05D3\u05D4\u05D5\u05D6\u05D7\u05D8\u05D9\u05DA\u05DB\u05DC\u05DD\u05DE\u05DF\u05E0\u05E1\u05E2\u05E3\u05E4\u05E5\u05E6\u05E7\u05E8\u05E9\u05EA\uFFFD\xA3\uFFFD\xD7\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\xAE\xAC\xBD\xBC\uFFFD\xAB\xBB\u2591\u2592\u2593\u2502\u2524\uFFFD\uFFFD\uFFFD\xA9\u2563\u2551\u2557\u255D\xA2\xA5\u2510\u2514\u2534\u252C\u251C\u2500\u253C\uFFFD\uFFFD\u255A\u2554\u2569\u2566\u2560\u2550\u256C\xA4\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u2518\u250C\u2588\u2584\xA6\uFFFD\u2580\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\xB5\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\xAF\xB4\xAD\xB1\u2017\xBE\xB6\xA7\xF7\xB8\xB0\xA8\xB7\xB9\xB3\xB2\u25A0\xA0" + }, + "ibm856": "cp856", + "csibm856": "cp856", + "cp857": { + "type": "_sbcs", + "chars": "\xC7\xFC\xE9\xE2\xE4\xE0\xE5\xE7\xEA\xEB\xE8\xEF\xEE\u0131\xC4\xC5\xC9\xE6\xC6\xF4\xF6\xF2\xFB\xF9\u0130\xD6\xDC\xF8\xA3\xD8\u015E\u015F\xE1\xED\xF3\xFA\xF1\xD1\u011E\u011F\xBF\xAE\xAC\xBD\xBC\xA1\xAB\xBB\u2591\u2592\u2593\u2502\u2524\xC1\xC2\xC0\xA9\u2563\u2551\u2557\u255D\xA2\xA5\u2510\u2514\u2534\u252C\u251C\u2500\u253C\xE3\xC3\u255A\u2554\u2569\u2566\u2560\u2550\u256C\xA4\xBA\xAA\xCA\xCB\xC8\uFFFD\xCD\xCE\xCF\u2518\u250C\u2588\u2584\xA6\xCC\u2580\xD3\xDF\xD4\xD2\xF5\xD5\xB5\uFFFD\xD7\xDA\xDB\xD9\xEC\xFF\xAF\xB4\xAD\xB1\uFFFD\xBE\xB6\xA7\xF7\xB8\xB0\xA8\xB7\xB9\xB3\xB2\u25A0\xA0" + }, + "ibm857": "cp857", + "csibm857": "cp857", + "cp858": { + "type": "_sbcs", + "chars": "\xC7\xFC\xE9\xE2\xE4\xE0\xE5\xE7\xEA\xEB\xE8\xEF\xEE\xEC\xC4\xC5\xC9\xE6\xC6\xF4\xF6\xF2\xFB\xF9\xFF\xD6\xDC\xF8\xA3\xD8\xD7\u0192\xE1\xED\xF3\xFA\xF1\xD1\xAA\xBA\xBF\xAE\xAC\xBD\xBC\xA1\xAB\xBB\u2591\u2592\u2593\u2502\u2524\xC1\xC2\xC0\xA9\u2563\u2551\u2557\u255D\xA2\xA5\u2510\u2514\u2534\u252C\u251C\u2500\u253C\xE3\xC3\u255A\u2554\u2569\u2566\u2560\u2550\u256C\xA4\xF0\xD0\xCA\xCB\xC8\u20AC\xCD\xCE\xCF\u2518\u250C\u2588\u2584\xA6\xCC\u2580\xD3\xDF\xD4\xD2\xF5\xD5\xB5\xFE\xDE\xDA\xDB\xD9\xFD\xDD\xAF\xB4\xAD\xB1\u2017\xBE\xB6\xA7\xF7\xB8\xB0\xA8\xB7\xB9\xB3\xB2\u25A0\xA0" + }, + "ibm858": "cp858", + "csibm858": "cp858", + "cp860": { + "type": "_sbcs", + "chars": "\xC7\xFC\xE9\xE2\xE3\xE0\xC1\xE7\xEA\xCA\xE8\xCD\xD4\xEC\xC3\xC2\xC9\xC0\xC8\xF4\xF5\xF2\xDA\xF9\xCC\xD5\xDC\xA2\xA3\xD9\u20A7\xD3\xE1\xED\xF3\xFA\xF1\xD1\xAA\xBA\xBF\xD2\xAC\xBD\xBC\xA1\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03B1\xDF\u0393\u03C0\u03A3\u03C3\xB5\u03C4\u03A6\u0398\u03A9\u03B4\u221E\u03C6\u03B5\u2229\u2261\xB1\u2265\u2264\u2320\u2321\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0\xA0" + }, + "ibm860": "cp860", + "csibm860": "cp860", + "cp861": { + "type": "_sbcs", + "chars": "\xC7\xFC\xE9\xE2\xE4\xE0\xE5\xE7\xEA\xEB\xE8\xD0\xF0\xDE\xC4\xC5\xC9\xE6\xC6\xF4\xF6\xFE\xFB\xDD\xFD\xD6\xDC\xF8\xA3\xD8\u20A7\u0192\xE1\xED\xF3\xFA\xC1\xCD\xD3\xDA\xBF\u2310\xAC\xBD\xBC\xA1\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03B1\xDF\u0393\u03C0\u03A3\u03C3\xB5\u03C4\u03A6\u0398\u03A9\u03B4\u221E\u03C6\u03B5\u2229\u2261\xB1\u2265\u2264\u2320\u2321\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0\xA0" + }, + "ibm861": "cp861", + "csibm861": "cp861", + "cp862": { + "type": "_sbcs", + "chars": "\u05D0\u05D1\u05D2\u05D3\u05D4\u05D5\u05D6\u05D7\u05D8\u05D9\u05DA\u05DB\u05DC\u05DD\u05DE\u05DF\u05E0\u05E1\u05E2\u05E3\u05E4\u05E5\u05E6\u05E7\u05E8\u05E9\u05EA\xA2\xA3\xA5\u20A7\u0192\xE1\xED\xF3\xFA\xF1\xD1\xAA\xBA\xBF\u2310\xAC\xBD\xBC\xA1\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03B1\xDF\u0393\u03C0\u03A3\u03C3\xB5\u03C4\u03A6\u0398\u03A9\u03B4\u221E\u03C6\u03B5\u2229\u2261\xB1\u2265\u2264\u2320\u2321\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0\xA0" + }, + "ibm862": "cp862", + "csibm862": "cp862", + "cp863": { + "type": "_sbcs", + "chars": "\xC7\xFC\xE9\xE2\xC2\xE0\xB6\xE7\xEA\xEB\xE8\xEF\xEE\u2017\xC0\xA7\xC9\xC8\xCA\xF4\xCB\xCF\xFB\xF9\xA4\xD4\xDC\xA2\xA3\xD9\xDB\u0192\xA6\xB4\xF3\xFA\xA8\xB8\xB3\xAF\xCE\u2310\xAC\xBD\xBC\xBE\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03B1\xDF\u0393\u03C0\u03A3\u03C3\xB5\u03C4\u03A6\u0398\u03A9\u03B4\u221E\u03C6\u03B5\u2229\u2261\xB1\u2265\u2264\u2320\u2321\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0\xA0" + }, + "ibm863": "cp863", + "csibm863": "cp863", + "cp864": { + "type": "_sbcs", + "chars": "\0\x07\b \n\v\f\r\x1B !\"#$\u066A&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x7F\xB0\xB7\u2219\u221A\u2592\u2500\u2502\u253C\u2524\u252C\u251C\u2534\u2510\u250C\u2514\u2518\u03B2\u221E\u03C6\xB1\xBD\xBC\u2248\xAB\xBB\uFEF7\uFEF8\uFFFD\uFFFD\uFEFB\uFEFC\uFFFD\xA0\xAD\uFE82\xA3\xA4\uFE84\uFFFD\uFFFD\uFE8E\uFE8F\uFE95\uFE99\u060C\uFE9D\uFEA1\uFEA5\u0660\u0661\u0662\u0663\u0664\u0665\u0666\u0667\u0668\u0669\uFED1\u061B\uFEB1\uFEB5\uFEB9\u061F\xA2\uFE80\uFE81\uFE83\uFE85\uFECA\uFE8B\uFE8D\uFE91\uFE93\uFE97\uFE9B\uFE9F\uFEA3\uFEA7\uFEA9\uFEAB\uFEAD\uFEAF\uFEB3\uFEB7\uFEBB\uFEBF\uFEC1\uFEC5\uFECB\uFECF\xA6\xAC\xF7\xD7\uFEC9\u0640\uFED3\uFED7\uFEDB\uFEDF\uFEE3\uFEE7\uFEEB\uFEED\uFEEF\uFEF3\uFEBD\uFECC\uFECE\uFECD\uFEE1\uFE7D\u0651\uFEE5\uFEE9\uFEEC\uFEF0\uFEF2\uFED0\uFED5\uFEF5\uFEF6\uFEDD\uFED9\uFEF1\u25A0\uFFFD" + }, + "ibm864": "cp864", + "csibm864": "cp864", + "cp865": { + "type": "_sbcs", + "chars": "\xC7\xFC\xE9\xE2\xE4\xE0\xE5\xE7\xEA\xEB\xE8\xEF\xEE\xEC\xC4\xC5\xC9\xE6\xC6\xF4\xF6\xF2\xFB\xF9\xFF\xD6\xDC\xF8\xA3\xD8\u20A7\u0192\xE1\xED\xF3\xFA\xF1\xD1\xAA\xBA\xBF\u2310\xAC\xBD\xBC\xA1\xAB\xA4\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03B1\xDF\u0393\u03C0\u03A3\u03C3\xB5\u03C4\u03A6\u0398\u03A9\u03B4\u221E\u03C6\u03B5\u2229\u2261\xB1\u2265\u2264\u2320\u2321\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0\xA0" + }, + "ibm865": "cp865", + "csibm865": "cp865", + "cp866": { + "type": "_sbcs", + "chars": "\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E\u044F\u0401\u0451\u0404\u0454\u0407\u0457\u040E\u045E\xB0\u2219\xB7\u221A\u2116\xA4\u25A0\xA0" + }, + "ibm866": "cp866", + "csibm866": "cp866", + "cp869": { + "type": "_sbcs", + "chars": "\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u0386\uFFFD\xB7\xAC\xA6\u2018\u2019\u0388\u2015\u0389\u038A\u03AA\u038C\uFFFD\uFFFD\u038E\u03AB\xA9\u038F\xB2\xB3\u03AC\xA3\u03AD\u03AE\u03AF\u03CA\u0390\u03CC\u03CD\u0391\u0392\u0393\u0394\u0395\u0396\u0397\xBD\u0398\u0399\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u039A\u039B\u039C\u039D\u2563\u2551\u2557\u255D\u039E\u039F\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u03A0\u03A1\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u03A3\u03A4\u03A5\u03A6\u03A7\u03A8\u03A9\u03B1\u03B2\u03B3\u2518\u250C\u2588\u2584\u03B4\u03B5\u2580\u03B6\u03B7\u03B8\u03B9\u03BA\u03BB\u03BC\u03BD\u03BE\u03BF\u03C0\u03C1\u03C3\u03C2\u03C4\u0384\xAD\xB1\u03C5\u03C6\u03C7\xA7\u03C8\u0385\xB0\xA8\u03C9\u03CB\u03B0\u03CE\u25A0\xA0" + }, + "ibm869": "cp869", + "csibm869": "cp869", + "cp922": { + "type": "_sbcs", + "chars": "\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\u203E\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\u0160\xD1\xD2\xD3\xD4\xD5\xD6\xD7\xD8\xD9\xDA\xDB\xDC\xDD\u017D\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\u0161\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\xFD\u017E\xFF" + }, + "ibm922": "cp922", + "csibm922": "cp922", + "cp1046": { + "type": "_sbcs", + "chars": "\uFE88\xD7\xF7\uF8F6\uF8F5\uF8F4\uF8F7\uFE71\x88\u25A0\u2502\u2500\u2510\u250C\u2514\u2518\uFE79\uFE7B\uFE7D\uFE7F\uFE77\uFE8A\uFEF0\uFEF3\uFEF2\uFECE\uFECF\uFED0\uFEF6\uFEF8\uFEFA\uFEFC\xA0\uF8FA\uF8F9\uF8F8\xA4\uF8FB\uFE8B\uFE91\uFE97\uFE9B\uFE9F\uFEA3\u060C\xAD\uFEA7\uFEB3\u0660\u0661\u0662\u0663\u0664\u0665\u0666\u0667\u0668\u0669\uFEB7\u061B\uFEBB\uFEBF\uFECA\u061F\uFECB\u0621\u0622\u0623\u0624\u0625\u0626\u0627\u0628\u0629\u062A\u062B\u062C\u062D\u062E\u062F\u0630\u0631\u0632\u0633\u0634\u0635\u0636\u0637\uFEC7\u0639\u063A\uFECC\uFE82\uFE84\uFE8E\uFED3\u0640\u0641\u0642\u0643\u0644\u0645\u0646\u0647\u0648\u0649\u064A\u064B\u064C\u064D\u064E\u064F\u0650\u0651\u0652\uFED7\uFEDB\uFEDF\uF8FC\uFEF5\uFEF7\uFEF9\uFEFB\uFEE3\uFEE7\uFEEC\uFEE9\uFFFD" + }, + "ibm1046": "cp1046", + "csibm1046": "cp1046", + "cp1124": { + "type": "_sbcs", + "chars": "\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u0401\u0402\u0490\u0404\u0405\u0406\u0407\u0408\u0409\u040A\u040B\u040C\xAD\u040E\u040F\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E\u044F\u2116\u0451\u0452\u0491\u0454\u0455\u0456\u0457\u0458\u0459\u045A\u045B\u045C\xA7\u045E\u045F" + }, + "ibm1124": "cp1124", + "csibm1124": "cp1124", + "cp1125": { + "type": "_sbcs", + "chars": "\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E\u044F\u0401\u0451\u0490\u0491\u0404\u0454\u0406\u0456\u0407\u0457\xB7\u221A\u2116\xA4\u25A0\xA0" + }, + "ibm1125": "cp1125", + "csibm1125": "cp1125", + "cp1129": { + "type": "_sbcs", + "chars": "\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\u0153\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\u0178\xB5\xB6\xB7\u0152\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\u0102\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\u0300\xCD\xCE\xCF\u0110\xD1\u0309\xD3\xD4\u01A0\xD6\xD7\xD8\xD9\xDA\xDB\xDC\u01AF\u0303\xDF\xE0\xE1\xE2\u0103\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\u0301\xED\xEE\xEF\u0111\xF1\u0323\xF3\xF4\u01A1\xF6\xF7\xF8\xF9\xFA\xFB\xFC\u01B0\u20AB\xFF" + }, + "ibm1129": "cp1129", + "csibm1129": "cp1129", + "cp1133": { + "type": "_sbcs", + "chars": "\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u0E81\u0E82\u0E84\u0E87\u0E88\u0EAA\u0E8A\u0E8D\u0E94\u0E95\u0E96\u0E97\u0E99\u0E9A\u0E9B\u0E9C\u0E9D\u0E9E\u0E9F\u0EA1\u0EA2\u0EA3\u0EA5\u0EA7\u0EAB\u0EAD\u0EAE\uFFFD\uFFFD\uFFFD\u0EAF\u0EB0\u0EB2\u0EB3\u0EB4\u0EB5\u0EB6\u0EB7\u0EB8\u0EB9\u0EBC\u0EB1\u0EBB\u0EBD\uFFFD\uFFFD\uFFFD\u0EC0\u0EC1\u0EC2\u0EC3\u0EC4\u0EC8\u0EC9\u0ECA\u0ECB\u0ECC\u0ECD\u0EC6\uFFFD\u0EDC\u0EDD\u20AD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u0ED0\u0ED1\u0ED2\u0ED3\u0ED4\u0ED5\u0ED6\u0ED7\u0ED8\u0ED9\uFFFD\uFFFD\xA2\xAC\xA6\uFFFD" + }, + "ibm1133": "cp1133", + "csibm1133": "cp1133", + "cp1161": { + "type": "_sbcs", + "chars": "\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u0E48\u0E01\u0E02\u0E03\u0E04\u0E05\u0E06\u0E07\u0E08\u0E09\u0E0A\u0E0B\u0E0C\u0E0D\u0E0E\u0E0F\u0E10\u0E11\u0E12\u0E13\u0E14\u0E15\u0E16\u0E17\u0E18\u0E19\u0E1A\u0E1B\u0E1C\u0E1D\u0E1E\u0E1F\u0E20\u0E21\u0E22\u0E23\u0E24\u0E25\u0E26\u0E27\u0E28\u0E29\u0E2A\u0E2B\u0E2C\u0E2D\u0E2E\u0E2F\u0E30\u0E31\u0E32\u0E33\u0E34\u0E35\u0E36\u0E37\u0E38\u0E39\u0E3A\u0E49\u0E4A\u0E4B\u20AC\u0E3F\u0E40\u0E41\u0E42\u0E43\u0E44\u0E45\u0E46\u0E47\u0E48\u0E49\u0E4A\u0E4B\u0E4C\u0E4D\u0E4E\u0E4F\u0E50\u0E51\u0E52\u0E53\u0E54\u0E55\u0E56\u0E57\u0E58\u0E59\u0E5A\u0E5B\xA2\xAC\xA6\xA0" + }, + "ibm1161": "cp1161", + "csibm1161": "cp1161", + "cp1162": { + "type": "_sbcs", + "chars": "\u20AC\x81\x82\x83\x84\u2026\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\u2018\u2019\u201C\u201D\u2022\u2013\u2014\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\u0E01\u0E02\u0E03\u0E04\u0E05\u0E06\u0E07\u0E08\u0E09\u0E0A\u0E0B\u0E0C\u0E0D\u0E0E\u0E0F\u0E10\u0E11\u0E12\u0E13\u0E14\u0E15\u0E16\u0E17\u0E18\u0E19\u0E1A\u0E1B\u0E1C\u0E1D\u0E1E\u0E1F\u0E20\u0E21\u0E22\u0E23\u0E24\u0E25\u0E26\u0E27\u0E28\u0E29\u0E2A\u0E2B\u0E2C\u0E2D\u0E2E\u0E2F\u0E30\u0E31\u0E32\u0E33\u0E34\u0E35\u0E36\u0E37\u0E38\u0E39\u0E3A\uFFFD\uFFFD\uFFFD\uFFFD\u0E3F\u0E40\u0E41\u0E42\u0E43\u0E44\u0E45\u0E46\u0E47\u0E48\u0E49\u0E4A\u0E4B\u0E4C\u0E4D\u0E4E\u0E4F\u0E50\u0E51\u0E52\u0E53\u0E54\u0E55\u0E56\u0E57\u0E58\u0E59\u0E5A\u0E5B\uFFFD\uFFFD\uFFFD\uFFFD" + }, + "ibm1162": "cp1162", + "csibm1162": "cp1162", + "cp1163": { + "type": "_sbcs", + "chars": "\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\xA1\xA2\xA3\u20AC\xA5\xA6\xA7\u0153\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\u0178\xB5\xB6\xB7\u0152\xB9\xBA\xBB\xBC\xBD\xBE\xBF\xC0\xC1\xC2\u0102\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\u0300\xCD\xCE\xCF\u0110\xD1\u0309\xD3\xD4\u01A0\xD6\xD7\xD8\xD9\xDA\xDB\xDC\u01AF\u0303\xDF\xE0\xE1\xE2\u0103\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\u0301\xED\xEE\xEF\u0111\xF1\u0323\xF3\xF4\u01A1\xF6\xF7\xF8\xF9\xFA\xFB\xFC\u01B0\u20AB\xFF" + }, + "ibm1163": "cp1163", + "csibm1163": "cp1163", + "maccroatian": { + "type": "_sbcs", + "chars": "\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\u2020\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\u0160\u2122\xB4\xA8\u2260\u017D\xD8\u221E\xB1\u2264\u2265\u2206\xB5\u2202\u2211\u220F\u0161\u222B\xAA\xBA\u2126\u017E\xF8\xBF\xA1\xAC\u221A\u0192\u2248\u0106\xAB\u010C\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u0110\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\uFFFD\xA9\u2044\xA4\u2039\u203A\xC6\xBB\u2013\xB7\u201A\u201E\u2030\xC2\u0107\xC1\u010D\xC8\xCD\xCE\xCF\xCC\xD3\xD4\u0111\xD2\xDA\xDB\xD9\u0131\u02C6\u02DC\xAF\u03C0\xCB\u02DA\xB8\xCA\xE6\u02C7" + }, + "maccyrillic": { + "type": "_sbcs", + "chars": "\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u2020\xB0\xA2\xA3\xA7\u2022\xB6\u0406\xAE\xA9\u2122\u0402\u0452\u2260\u0403\u0453\u221E\xB1\u2264\u2265\u0456\xB5\u2202\u0408\u0404\u0454\u0407\u0457\u0409\u0459\u040A\u045A\u0458\u0405\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\u040B\u045B\u040C\u045C\u0455\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u201E\u040E\u045E\u040F\u045F\u2116\u0401\u0451\u044F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E\xA4" + }, + "macgreek": { + "type": "_sbcs", + "chars": "\xC4\xB9\xB2\xC9\xB3\xD6\xDC\u0385\xE0\xE2\xE4\u0384\xA8\xE7\xE9\xE8\xEA\xEB\xA3\u2122\xEE\xEF\u2022\xBD\u2030\xF4\xF6\xA6\xAD\xF9\xFB\xFC\u2020\u0393\u0394\u0398\u039B\u039E\u03A0\xDF\xAE\xA9\u03A3\u03AA\xA7\u2260\xB0\u0387\u0391\xB1\u2264\u2265\xA5\u0392\u0395\u0396\u0397\u0399\u039A\u039C\u03A6\u03AB\u03A8\u03A9\u03AC\u039D\xAC\u039F\u03A1\u2248\u03A4\xAB\xBB\u2026\xA0\u03A5\u03A7\u0386\u0388\u0153\u2013\u2015\u201C\u201D\u2018\u2019\xF7\u0389\u038A\u038C\u038E\u03AD\u03AE\u03AF\u03CC\u038F\u03CD\u03B1\u03B2\u03C8\u03B4\u03B5\u03C6\u03B3\u03B7\u03B9\u03BE\u03BA\u03BB\u03BC\u03BD\u03BF\u03C0\u03CE\u03C1\u03C3\u03C4\u03B8\u03C9\u03C2\u03C7\u03C5\u03B6\u03CA\u03CB\u0390\u03B0\uFFFD" + }, + "maciceland": { + "type": "_sbcs", + "chars": "\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\xDD\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\xB4\xA8\u2260\xC6\xD8\u221E\xB1\u2264\u2265\xA5\xB5\u2202\u2211\u220F\u03C0\u222B\xAA\xBA\u2126\xE6\xF8\xBF\xA1\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\xFF\u0178\u2044\xA4\xD0\xF0\xDE\xFE\xFD\xB7\u201A\u201E\u2030\xC2\xCA\xC1\xCB\xC8\xCD\xCE\xCF\xCC\xD3\xD4\uFFFD\xD2\xDA\xDB\xD9\u0131\u02C6\u02DC\xAF\u02D8\u02D9\u02DA\xB8\u02DD\u02DB\u02C7" + }, + "macroman": { + "type": "_sbcs", + "chars": "\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\u2020\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\xB4\xA8\u2260\xC6\xD8\u221E\xB1\u2264\u2265\xA5\xB5\u2202\u2211\u220F\u03C0\u222B\xAA\xBA\u2126\xE6\xF8\xBF\xA1\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\xFF\u0178\u2044\xA4\u2039\u203A\uFB01\uFB02\u2021\xB7\u201A\u201E\u2030\xC2\xCA\xC1\xCB\xC8\xCD\xCE\xCF\xCC\xD3\xD4\uFFFD\xD2\xDA\xDB\xD9\u0131\u02C6\u02DC\xAF\u02D8\u02D9\u02DA\xB8\u02DD\u02DB\u02C7" + }, + "macromania": { + "type": "_sbcs", + "chars": "\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\u2020\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\xB4\xA8\u2260\u0102\u015E\u221E\xB1\u2264\u2265\xA5\xB5\u2202\u2211\u220F\u03C0\u222B\xAA\xBA\u2126\u0103\u015F\xBF\xA1\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\xFF\u0178\u2044\xA4\u2039\u203A\u0162\u0163\u2021\xB7\u201A\u201E\u2030\xC2\xCA\xC1\xCB\xC8\xCD\xCE\xCF\xCC\xD3\xD4\uFFFD\xD2\xDA\xDB\xD9\u0131\u02C6\u02DC\xAF\u02D8\u02D9\u02DA\xB8\u02DD\u02DB\u02C7" + }, + "macthai": { + "type": "_sbcs", + "chars": "\xAB\xBB\u2026\uF88C\uF88F\uF892\uF895\uF898\uF88B\uF88E\uF891\uF894\uF897\u201C\u201D\uF899\uFFFD\u2022\uF884\uF889\uF885\uF886\uF887\uF888\uF88A\uF88D\uF890\uF893\uF896\u2018\u2019\uFFFD\xA0\u0E01\u0E02\u0E03\u0E04\u0E05\u0E06\u0E07\u0E08\u0E09\u0E0A\u0E0B\u0E0C\u0E0D\u0E0E\u0E0F\u0E10\u0E11\u0E12\u0E13\u0E14\u0E15\u0E16\u0E17\u0E18\u0E19\u0E1A\u0E1B\u0E1C\u0E1D\u0E1E\u0E1F\u0E20\u0E21\u0E22\u0E23\u0E24\u0E25\u0E26\u0E27\u0E28\u0E29\u0E2A\u0E2B\u0E2C\u0E2D\u0E2E\u0E2F\u0E30\u0E31\u0E32\u0E33\u0E34\u0E35\u0E36\u0E37\u0E38\u0E39\u0E3A\uFEFF\u200B\u2013\u2014\u0E3F\u0E40\u0E41\u0E42\u0E43\u0E44\u0E45\u0E46\u0E47\u0E48\u0E49\u0E4A\u0E4B\u0E4C\u0E4D\u2122\u0E4F\u0E50\u0E51\u0E52\u0E53\u0E54\u0E55\u0E56\u0E57\u0E58\u0E59\xAE\xA9\uFFFD\uFFFD\uFFFD\uFFFD" + }, + "macturkish": { + "type": "_sbcs", + "chars": "\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\u2020\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\xB4\xA8\u2260\xC6\xD8\u221E\xB1\u2264\u2265\xA5\xB5\u2202\u2211\u220F\u03C0\u222B\xAA\xBA\u2126\xE6\xF8\xBF\xA1\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\xFF\u0178\u011E\u011F\u0130\u0131\u015E\u015F\u2021\xB7\u201A\u201E\u2030\xC2\xCA\xC1\xCB\xC8\xCD\xCE\xCF\xCC\xD3\xD4\uFFFD\xD2\xDA\xDB\xD9\uFFFD\u02C6\u02DC\xAF\u02D8\u02D9\u02DA\xB8\u02DD\u02DB\u02C7" + }, + "macukraine": { + "type": "_sbcs", + "chars": "\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u2020\xB0\u0490\xA3\xA7\u2022\xB6\u0406\xAE\xA9\u2122\u0402\u0452\u2260\u0403\u0453\u221E\xB1\u2264\u2265\u0456\xB5\u0491\u0408\u0404\u0454\u0407\u0457\u0409\u0459\u040A\u045A\u0458\u0405\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\u040B\u045B\u040C\u045C\u0455\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u201E\u040E\u045E\u040F\u045F\u2116\u0401\u0451\u044F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E\xA4" + }, + "koi8r": { + "type": "_sbcs", + "chars": "\u2500\u2502\u250C\u2510\u2514\u2518\u251C\u2524\u252C\u2534\u253C\u2580\u2584\u2588\u258C\u2590\u2591\u2592\u2593\u2320\u25A0\u2219\u221A\u2248\u2264\u2265\xA0\u2321\xB0\xB2\xB7\xF7\u2550\u2551\u2552\u0451\u2553\u2554\u2555\u2556\u2557\u2558\u2559\u255A\u255B\u255C\u255D\u255E\u255F\u2560\u2561\u0401\u2562\u2563\u2564\u2565\u2566\u2567\u2568\u2569\u256A\u256B\u256C\xA9\u044E\u0430\u0431\u0446\u0434\u0435\u0444\u0433\u0445\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u044F\u0440\u0441\u0442\u0443\u0436\u0432\u044C\u044B\u0437\u0448\u044D\u0449\u0447\u044A\u042E\u0410\u0411\u0426\u0414\u0415\u0424\u0413\u0425\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u042F\u0420\u0421\u0422\u0423\u0416\u0412\u042C\u042B\u0417\u0428\u042D\u0429\u0427\u042A" + }, + "koi8u": { + "type": "_sbcs", + "chars": "\u2500\u2502\u250C\u2510\u2514\u2518\u251C\u2524\u252C\u2534\u253C\u2580\u2584\u2588\u258C\u2590\u2591\u2592\u2593\u2320\u25A0\u2219\u221A\u2248\u2264\u2265\xA0\u2321\xB0\xB2\xB7\xF7\u2550\u2551\u2552\u0451\u0454\u2554\u0456\u0457\u2557\u2558\u2559\u255A\u255B\u0491\u255D\u255E\u255F\u2560\u2561\u0401\u0404\u2563\u0406\u0407\u2566\u2567\u2568\u2569\u256A\u0490\u256C\xA9\u044E\u0430\u0431\u0446\u0434\u0435\u0444\u0433\u0445\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u044F\u0440\u0441\u0442\u0443\u0436\u0432\u044C\u044B\u0437\u0448\u044D\u0449\u0447\u044A\u042E\u0410\u0411\u0426\u0414\u0415\u0424\u0413\u0425\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u042F\u0420\u0421\u0422\u0423\u0416\u0412\u042C\u042B\u0417\u0428\u042D\u0429\u0427\u042A" + }, + "koi8ru": { + "type": "_sbcs", + "chars": "\u2500\u2502\u250C\u2510\u2514\u2518\u251C\u2524\u252C\u2534\u253C\u2580\u2584\u2588\u258C\u2590\u2591\u2592\u2593\u2320\u25A0\u2219\u221A\u2248\u2264\u2265\xA0\u2321\xB0\xB2\xB7\xF7\u2550\u2551\u2552\u0451\u0454\u2554\u0456\u0457\u2557\u2558\u2559\u255A\u255B\u0491\u045E\u255E\u255F\u2560\u2561\u0401\u0404\u2563\u0406\u0407\u2566\u2567\u2568\u2569\u256A\u0490\u040E\xA9\u044E\u0430\u0431\u0446\u0434\u0435\u0444\u0433\u0445\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u044F\u0440\u0441\u0442\u0443\u0436\u0432\u044C\u044B\u0437\u0448\u044D\u0449\u0447\u044A\u042E\u0410\u0411\u0426\u0414\u0415\u0424\u0413\u0425\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u042F\u0420\u0421\u0422\u0423\u0416\u0412\u042C\u042B\u0417\u0428\u042D\u0429\u0427\u042A" + }, + "koi8t": { + "type": "_sbcs", + "chars": "\u049B\u0493\u201A\u0492\u201E\u2026\u2020\u2021\uFFFD\u2030\u04B3\u2039\u04B2\u04B7\u04B6\uFFFD\u049A\u2018\u2019\u201C\u201D\u2022\u2013\u2014\uFFFD\u2122\uFFFD\u203A\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u04EF\u04EE\u0451\xA4\u04E3\xA6\xA7\uFFFD\uFFFD\uFFFD\xAB\xAC\xAD\xAE\uFFFD\xB0\xB1\xB2\u0401\uFFFD\u04E2\xB6\xB7\uFFFD\u2116\uFFFD\xBB\uFFFD\uFFFD\uFFFD\xA9\u044E\u0430\u0431\u0446\u0434\u0435\u0444\u0433\u0445\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u044F\u0440\u0441\u0442\u0443\u0436\u0432\u044C\u044B\u0437\u0448\u044D\u0449\u0447\u044A\u042E\u0410\u0411\u0426\u0414\u0415\u0424\u0413\u0425\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u042F\u0420\u0421\u0422\u0423\u0416\u0412\u042C\u042B\u0417\u0428\u042D\u0429\u0427\u042A" + }, + "armscii8": { + "type": "_sbcs", + "chars": "\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\uFFFD\u0587\u0589)(\xBB\xAB\u2014.\u055D,-\u058A\u2026\u055C\u055B\u055E\u0531\u0561\u0532\u0562\u0533\u0563\u0534\u0564\u0535\u0565\u0536\u0566\u0537\u0567\u0538\u0568\u0539\u0569\u053A\u056A\u053B\u056B\u053C\u056C\u053D\u056D\u053E\u056E\u053F\u056F\u0540\u0570\u0541\u0571\u0542\u0572\u0543\u0573\u0544\u0574\u0545\u0575\u0546\u0576\u0547\u0577\u0548\u0578\u0549\u0579\u054A\u057A\u054B\u057B\u054C\u057C\u054D\u057D\u054E\u057E\u054F\u057F\u0550\u0580\u0551\u0581\u0552\u0582\u0553\u0583\u0554\u0584\u0555\u0585\u0556\u0586\u055A\uFFFD" + }, + "rk1048": { + "type": "_sbcs", + "chars": "\u0402\u0403\u201A\u0453\u201E\u2026\u2020\u2021\u20AC\u2030\u0409\u2039\u040A\u049A\u04BA\u040F\u0452\u2018\u2019\u201C\u201D\u2022\u2013\u2014\uFFFD\u2122\u0459\u203A\u045A\u049B\u04BB\u045F\xA0\u04B0\u04B1\u04D8\xA4\u04E8\xA6\xA7\u0401\xA9\u0492\xAB\xAC\xAD\xAE\u04AE\xB0\xB1\u0406\u0456\u04E9\xB5\xB6\xB7\u0451\u2116\u0493\xBB\u04D9\u04A2\u04A3\u04AF\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E\u044F" + }, + "tcvn": { + "type": "_sbcs", + "chars": "\0\xDA\u1EE4\u1EEA\u1EEC\u1EEE\x07\b \n\v\f\r\u1EE8\u1EF0\u1EF2\u1EF6\u1EF8\xDD\u1EF4\x1B !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x7F\xC0\u1EA2\xC3\xC1\u1EA0\u1EB6\u1EAC\xC8\u1EBA\u1EBC\xC9\u1EB8\u1EC6\xCC\u1EC8\u0128\xCD\u1ECA\xD2\u1ECE\xD5\xD3\u1ECC\u1ED8\u1EDC\u1EDE\u1EE0\u1EDA\u1EE2\xD9\u1EE6\u0168\xA0\u0102\xC2\xCA\xD4\u01A0\u01AF\u0110\u0103\xE2\xEA\xF4\u01A1\u01B0\u0111\u1EB0\u0300\u0309\u0303\u0301\u0323\xE0\u1EA3\xE3\xE1\u1EA1\u1EB2\u1EB1\u1EB3\u1EB5\u1EAF\u1EB4\u1EAE\u1EA6\u1EA8\u1EAA\u1EA4\u1EC0\u1EB7\u1EA7\u1EA9\u1EAB\u1EA5\u1EAD\xE8\u1EC2\u1EBB\u1EBD\xE9\u1EB9\u1EC1\u1EC3\u1EC5\u1EBF\u1EC7\xEC\u1EC9\u1EC4\u1EBE\u1ED2\u0129\xED\u1ECB\xF2\u1ED4\u1ECF\xF5\xF3\u1ECD\u1ED3\u1ED5\u1ED7\u1ED1\u1ED9\u1EDD\u1EDF\u1EE1\u1EDB\u1EE3\xF9\u1ED6\u1EE7\u0169\xFA\u1EE5\u1EEB\u1EED\u1EEF\u1EE9\u1EF1\u1EF3\u1EF7\u1EF9\xFD\u1EF5\u1ED0" + }, + "georgianacademy": { + "type": "_sbcs", + "chars": "\x80\x81\u201A\u0192\u201E\u2026\u2020\u2021\u02C6\u2030\u0160\u2039\u0152\x8D\x8E\x8F\x90\u2018\u2019\u201C\u201D\u2022\u2013\u2014\u02DC\u2122\u0161\u203A\u0153\x9D\x9E\u0178\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\u10D0\u10D1\u10D2\u10D3\u10D4\u10D5\u10D6\u10D7\u10D8\u10D9\u10DA\u10DB\u10DC\u10DD\u10DE\u10DF\u10E0\u10E1\u10E2\u10E3\u10E4\u10E5\u10E6\u10E7\u10E8\u10E9\u10EA\u10EB\u10EC\u10ED\u10EE\u10EF\u10F0\u10F1\u10F2\u10F3\u10F4\u10F5\u10F6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xFF" + }, + "georgianps": { + "type": "_sbcs", + "chars": "\x80\x81\u201A\u0192\u201E\u2026\u2020\u2021\u02C6\u2030\u0160\u2039\u0152\x8D\x8E\x8F\x90\u2018\u2019\u201C\u201D\u2022\u2013\u2014\u02DC\u2122\u0161\u203A\u0153\x9D\x9E\u0178\xA0\xA1\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xAA\xAB\xAC\xAD\xAE\xAF\xB0\xB1\xB2\xB3\xB4\xB5\xB6\xB7\xB8\xB9\xBA\xBB\xBC\xBD\xBE\xBF\u10D0\u10D1\u10D2\u10D3\u10D4\u10D5\u10D6\u10F1\u10D7\u10D8\u10D9\u10DA\u10DB\u10DC\u10F2\u10DD\u10DE\u10DF\u10E0\u10E1\u10E2\u10F3\u10E3\u10E4\u10E5\u10E6\u10E7\u10E8\u10E9\u10EA\u10EB\u10EC\u10ED\u10EE\u10F4\u10EF\u10F0\u10F5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xFF" + }, + "pt154": { + "type": "_sbcs", + "chars": "\u0496\u0492\u04EE\u0493\u201E\u2026\u04B6\u04AE\u04B2\u04AF\u04A0\u04E2\u04A2\u049A\u04BA\u04B8\u0497\u2018\u2019\u201C\u201D\u2022\u2013\u2014\u04B3\u04B7\u04A1\u04E3\u04A3\u049B\u04BB\u04B9\xA0\u040E\u045E\u0408\u04E8\u0498\u04B0\xA7\u0401\xA9\u04D8\xAB\xAC\u04EF\xAE\u049C\xB0\u04B1\u0406\u0456\u0499\u04E9\xB6\xB7\u0451\u2116\u04D9\xBB\u0458\u04AA\u04AB\u049D\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E\u044F" + }, + "viscii": { + "type": "_sbcs", + "chars": "\0\u1EB2\u1EB4\u1EAA\x07\b \n\v\f\r\u1EF6\u1EF8\x1B\u1EF4 !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x7F\u1EA0\u1EAE\u1EB0\u1EB6\u1EA4\u1EA6\u1EA8\u1EAC\u1EBC\u1EB8\u1EBE\u1EC0\u1EC2\u1EC4\u1EC6\u1ED0\u1ED2\u1ED4\u1ED6\u1ED8\u1EE2\u1EDA\u1EDC\u1EDE\u1ECA\u1ECE\u1ECC\u1EC8\u1EE6\u0168\u1EE4\u1EF2\xD5\u1EAF\u1EB1\u1EB7\u1EA5\u1EA7\u1EA9\u1EAD\u1EBD\u1EB9\u1EBF\u1EC1\u1EC3\u1EC5\u1EC7\u1ED1\u1ED3\u1ED5\u1ED7\u1EE0\u01A0\u1ED9\u1EDD\u1EDF\u1ECB\u1EF0\u1EE8\u1EEA\u1EEC\u01A1\u1EDB\u01AF\xC0\xC1\xC2\xC3\u1EA2\u0102\u1EB3\u1EB5\xC8\xC9\xCA\u1EBA\xCC\xCD\u0128\u1EF3\u0110\u1EE9\xD2\xD3\xD4\u1EA1\u1EF7\u1EEB\u1EED\xD9\xDA\u1EF9\u1EF5\xDD\u1EE1\u01B0\xE0\xE1\xE2\xE3\u1EA3\u0103\u1EEF\u1EAB\xE8\xE9\xEA\u1EBB\xEC\xED\u0129\u1EC9\u0111\u1EF1\xF2\xF3\xF4\xF5\u1ECF\u1ECD\u1EE5\xF9\xFA\u0169\u1EE7\xFD\u1EE3\u1EEE" + }, + "iso646cn": { + "type": "_sbcs", + "chars": "\0\x07\b \n\v\f\r\x1B !\"#\xA5%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}\u203E\x7F\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD" + }, + "iso646jp": { + "type": "_sbcs", + "chars": "\0\x07\b \n\v\f\r\x1B !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\xA5]^_`abcdefghijklmnopqrstuvwxyz{|}\u203E\x7F\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD" + }, + "hproman8": { + "type": "_sbcs", + "chars": "\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8A\x8B\x8C\x8D\x8E\x8F\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9A\x9B\x9C\x9D\x9E\x9F\xA0\xC0\xC2\xC8\xCA\xCB\xCE\xCF\xB4\u02CB\u02C6\xA8\u02DC\xD9\xDB\u20A4\xAF\xDD\xFD\xB0\xC7\xE7\xD1\xF1\xA1\xBF\xA4\xA3\xA5\xA7\u0192\xA2\xE2\xEA\xF4\xFB\xE1\xE9\xF3\xFA\xE0\xE8\xF2\xF9\xE4\xEB\xF6\xFC\xC5\xEE\xD8\xC6\xE5\xED\xF8\xE6\xC4\xEC\xD6\xDC\xC9\xEF\xDF\xD4\xC1\xC3\xE3\xD0\xF0\xCD\xCC\xD3\xD2\xD5\xF5\u0160\u0161\xDA\u0178\xFF\xDE\xFE\xB7\xB5\xB6\xBE\u2014\xBC\xBD\xAA\xBA\xAB\u25A0\xBB\xB1\uFFFD" + }, + "macintosh": { + "type": "_sbcs", + "chars": "\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\u2020\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\xB4\xA8\u2260\xC6\xD8\u221E\xB1\u2264\u2265\xA5\xB5\u2202\u2211\u220F\u03C0\u222B\xAA\xBA\u2126\xE6\xF8\xBF\xA1\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\xFF\u0178\u2044\xA4\u2039\u203A\uFB01\uFB02\u2021\xB7\u201A\u201E\u2030\xC2\xCA\xC1\xCB\xC8\xCD\xCE\xCF\xCC\xD3\xD4\uFFFD\xD2\xDA\xDB\xD9\u0131\u02C6\u02DC\xAF\u02D8\u02D9\u02DA\xB8\u02DD\u02DB\u02C7" + }, + "ascii": { + "type": "_sbcs", + "chars": "\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD" + }, + "tis620": { + "type": "_sbcs", + "chars": "\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u0E01\u0E02\u0E03\u0E04\u0E05\u0E06\u0E07\u0E08\u0E09\u0E0A\u0E0B\u0E0C\u0E0D\u0E0E\u0E0F\u0E10\u0E11\u0E12\u0E13\u0E14\u0E15\u0E16\u0E17\u0E18\u0E19\u0E1A\u0E1B\u0E1C\u0E1D\u0E1E\u0E1F\u0E20\u0E21\u0E22\u0E23\u0E24\u0E25\u0E26\u0E27\u0E28\u0E29\u0E2A\u0E2B\u0E2C\u0E2D\u0E2E\u0E2F\u0E30\u0E31\u0E32\u0E33\u0E34\u0E35\u0E36\u0E37\u0E38\u0E39\u0E3A\uFFFD\uFFFD\uFFFD\uFFFD\u0E3F\u0E40\u0E41\u0E42\u0E43\u0E44\u0E45\u0E46\u0E47\u0E48\u0E49\u0E4A\u0E4B\u0E4C\u0E4D\u0E4E\u0E4F\u0E50\u0E51\u0E52\u0E53\u0E54\u0E55\u0E56\u0E57\u0E58\u0E59\u0E5A\u0E5B\uFFFD\uFFFD\uFFFD\uFFFD" + } + }; + } +}); + +// ../../node_modules/iconv-lite/encodings/dbcs-codec.js +var require_dbcs_codec = __commonJS({ + "../../node_modules/iconv-lite/encodings/dbcs-codec.js"(exports2) { + "use strict"; + var Buffer2 = require_safer().Buffer; + exports2._dbcs = DBCSCodec; + var UNASSIGNED = -1; + var GB18030_CODE = -2; + var SEQ_START = -10; + var NODE_START = -1e3; + var UNASSIGNED_NODE = new Array(256); + var DEF_CHAR = -1; + for (i = 0; i < 256; i++) + UNASSIGNED_NODE[i] = UNASSIGNED; + var i; + function DBCSCodec(codecOptions, iconv) { + this.encodingName = codecOptions.encodingName; + if (!codecOptions) + throw new Error("DBCS codec is called without the data."); + if (!codecOptions.table) + throw new Error("Encoding '" + this.encodingName + "' has no data."); + var mappingTable = codecOptions.table(); + this.decodeTables = []; + this.decodeTables[0] = UNASSIGNED_NODE.slice(0); + this.decodeTableSeq = []; + for (var i2 = 0; i2 < mappingTable.length; i2++) + this._addDecodeChunk(mappingTable[i2]); + if (typeof codecOptions.gb18030 === "function") { + this.gb18030 = codecOptions.gb18030(); + var commonThirdByteNodeIdx = this.decodeTables.length; + this.decodeTables.push(UNASSIGNED_NODE.slice(0)); + var commonFourthByteNodeIdx = this.decodeTables.length; + this.decodeTables.push(UNASSIGNED_NODE.slice(0)); + var firstByteNode = this.decodeTables[0]; + for (var i2 = 129; i2 <= 254; i2++) { + var secondByteNode = this.decodeTables[NODE_START - firstByteNode[i2]]; + for (var j = 48; j <= 57; j++) { + if (secondByteNode[j] === UNASSIGNED) { + secondByteNode[j] = NODE_START - commonThirdByteNodeIdx; + } else if (secondByteNode[j] > NODE_START) { + throw new Error("gb18030 decode tables conflict at byte 2"); + } + var thirdByteNode = this.decodeTables[NODE_START - secondByteNode[j]]; + for (var k = 129; k <= 254; k++) { + if (thirdByteNode[k] === UNASSIGNED) { + thirdByteNode[k] = NODE_START - commonFourthByteNodeIdx; + } else if (thirdByteNode[k] === NODE_START - commonFourthByteNodeIdx) { + continue; + } else if (thirdByteNode[k] > NODE_START) { + throw new Error("gb18030 decode tables conflict at byte 3"); + } + var fourthByteNode = this.decodeTables[NODE_START - thirdByteNode[k]]; + for (var l = 48; l <= 57; l++) { + if (fourthByteNode[l] === UNASSIGNED) + fourthByteNode[l] = GB18030_CODE; + } + } + } + } + } + this.defaultCharUnicode = iconv.defaultCharUnicode; + this.encodeTable = []; + this.encodeTableSeq = []; + var skipEncodeChars = {}; + if (codecOptions.encodeSkipVals) + for (var i2 = 0; i2 < codecOptions.encodeSkipVals.length; i2++) { + var val = codecOptions.encodeSkipVals[i2]; + if (typeof val === "number") + skipEncodeChars[val] = true; + else + for (var j = val.from; j <= val.to; j++) + skipEncodeChars[j] = true; + } + this._fillEncodeTable(0, 0, skipEncodeChars); + if (codecOptions.encodeAdd) { + for (var uChar in codecOptions.encodeAdd) + if (Object.prototype.hasOwnProperty.call(codecOptions.encodeAdd, uChar)) + this._setEncodeChar(uChar.charCodeAt(0), codecOptions.encodeAdd[uChar]); + } + this.defCharSB = this.encodeTable[0][iconv.defaultCharSingleByte.charCodeAt(0)]; + if (this.defCharSB === UNASSIGNED) this.defCharSB = this.encodeTable[0]["?"]; + if (this.defCharSB === UNASSIGNED) this.defCharSB = "?".charCodeAt(0); + } + DBCSCodec.prototype.encoder = DBCSEncoder; + DBCSCodec.prototype.decoder = DBCSDecoder; + DBCSCodec.prototype._getDecodeTrieNode = function(addr) { + var bytes = []; + for (; addr > 0; addr >>>= 8) + bytes.push(addr & 255); + if (bytes.length == 0) + bytes.push(0); + var node = this.decodeTables[0]; + for (var i2 = bytes.length - 1; i2 > 0; i2--) { + var val = node[bytes[i2]]; + if (val == UNASSIGNED) { + node[bytes[i2]] = NODE_START - this.decodeTables.length; + this.decodeTables.push(node = UNASSIGNED_NODE.slice(0)); + } else if (val <= NODE_START) { + node = this.decodeTables[NODE_START - val]; + } else + throw new Error("Overwrite byte in " + this.encodingName + ", addr: " + addr.toString(16)); + } + return node; + }; + DBCSCodec.prototype._addDecodeChunk = function(chunk) { + var curAddr = parseInt(chunk[0], 16); + var writeTable = this._getDecodeTrieNode(curAddr); + curAddr = curAddr & 255; + for (var k = 1; k < chunk.length; k++) { + var part = chunk[k]; + if (typeof part === "string") { + for (var l = 0; l < part.length; ) { + var code = part.charCodeAt(l++); + if (55296 <= code && code < 56320) { + var codeTrail = part.charCodeAt(l++); + if (56320 <= codeTrail && codeTrail < 57344) + writeTable[curAddr++] = 65536 + (code - 55296) * 1024 + (codeTrail - 56320); + else + throw new Error("Incorrect surrogate pair in " + this.encodingName + " at chunk " + chunk[0]); + } else if (4080 < code && code <= 4095) { + var len = 4095 - code + 2; + var seq = []; + for (var m = 0; m < len; m++) + seq.push(part.charCodeAt(l++)); + writeTable[curAddr++] = SEQ_START - this.decodeTableSeq.length; + this.decodeTableSeq.push(seq); + } else + writeTable[curAddr++] = code; + } + } else if (typeof part === "number") { + var charCode = writeTable[curAddr - 1] + 1; + for (var l = 0; l < part; l++) + writeTable[curAddr++] = charCode++; + } else + throw new Error("Incorrect type '" + typeof part + "' given in " + this.encodingName + " at chunk " + chunk[0]); + } + if (curAddr > 255) + throw new Error("Incorrect chunk in " + this.encodingName + " at addr " + chunk[0] + ": too long" + curAddr); + }; + DBCSCodec.prototype._getEncodeBucket = function(uCode) { + var high = uCode >> 8; + if (this.encodeTable[high] === void 0) + this.encodeTable[high] = UNASSIGNED_NODE.slice(0); + return this.encodeTable[high]; + }; + DBCSCodec.prototype._setEncodeChar = function(uCode, dbcsCode) { + var bucket = this._getEncodeBucket(uCode); + var low = uCode & 255; + if (bucket[low] <= SEQ_START) + this.encodeTableSeq[SEQ_START - bucket[low]][DEF_CHAR] = dbcsCode; + else if (bucket[low] == UNASSIGNED) + bucket[low] = dbcsCode; + }; + DBCSCodec.prototype._setEncodeSequence = function(seq, dbcsCode) { + var uCode = seq[0]; + var bucket = this._getEncodeBucket(uCode); + var low = uCode & 255; + var node; + if (bucket[low] <= SEQ_START) { + node = this.encodeTableSeq[SEQ_START - bucket[low]]; + } else { + node = {}; + if (bucket[low] !== UNASSIGNED) node[DEF_CHAR] = bucket[low]; + bucket[low] = SEQ_START - this.encodeTableSeq.length; + this.encodeTableSeq.push(node); + } + for (var j = 1; j < seq.length - 1; j++) { + var oldVal = node[uCode]; + if (typeof oldVal === "object") + node = oldVal; + else { + node = node[uCode] = {}; + if (oldVal !== void 0) + node[DEF_CHAR] = oldVal; + } + } + uCode = seq[seq.length - 1]; + node[uCode] = dbcsCode; + }; + DBCSCodec.prototype._fillEncodeTable = function(nodeIdx, prefix, skipEncodeChars) { + var node = this.decodeTables[nodeIdx]; + var hasValues = false; + var subNodeEmpty = {}; + for (var i2 = 0; i2 < 256; i2++) { + var uCode = node[i2]; + var mbCode = prefix + i2; + if (skipEncodeChars[mbCode]) + continue; + if (uCode >= 0) { + this._setEncodeChar(uCode, mbCode); + hasValues = true; + } else if (uCode <= NODE_START) { + var subNodeIdx = NODE_START - uCode; + if (!subNodeEmpty[subNodeIdx]) { + var newPrefix = mbCode << 8 >>> 0; + if (this._fillEncodeTable(subNodeIdx, newPrefix, skipEncodeChars)) + hasValues = true; + else + subNodeEmpty[subNodeIdx] = true; + } + } else if (uCode <= SEQ_START) { + this._setEncodeSequence(this.decodeTableSeq[SEQ_START - uCode], mbCode); + hasValues = true; + } + } + return hasValues; + }; + function DBCSEncoder(options, codec) { + this.leadSurrogate = -1; + this.seqObj = void 0; + this.encodeTable = codec.encodeTable; + this.encodeTableSeq = codec.encodeTableSeq; + this.defaultCharSingleByte = codec.defCharSB; + this.gb18030 = codec.gb18030; + } + DBCSEncoder.prototype.write = function(str) { + var newBuf = Buffer2.alloc(str.length * (this.gb18030 ? 4 : 3)), leadSurrogate = this.leadSurrogate, seqObj = this.seqObj, nextChar = -1, i2 = 0, j = 0; + while (true) { + if (nextChar === -1) { + if (i2 == str.length) break; + var uCode = str.charCodeAt(i2++); + } else { + var uCode = nextChar; + nextChar = -1; + } + if (55296 <= uCode && uCode < 57344) { + if (uCode < 56320) { + if (leadSurrogate === -1) { + leadSurrogate = uCode; + continue; + } else { + leadSurrogate = uCode; + uCode = UNASSIGNED; + } + } else { + if (leadSurrogate !== -1) { + uCode = 65536 + (leadSurrogate - 55296) * 1024 + (uCode - 56320); + leadSurrogate = -1; + } else { + uCode = UNASSIGNED; + } + } + } else if (leadSurrogate !== -1) { + nextChar = uCode; + uCode = UNASSIGNED; + leadSurrogate = -1; + } + var dbcsCode = UNASSIGNED; + if (seqObj !== void 0 && uCode != UNASSIGNED) { + var resCode = seqObj[uCode]; + if (typeof resCode === "object") { + seqObj = resCode; + continue; + } else if (typeof resCode == "number") { + dbcsCode = resCode; + } else if (resCode == void 0) { + resCode = seqObj[DEF_CHAR]; + if (resCode !== void 0) { + dbcsCode = resCode; + nextChar = uCode; + } else { + } + } + seqObj = void 0; + } else if (uCode >= 0) { + var subtable = this.encodeTable[uCode >> 8]; + if (subtable !== void 0) + dbcsCode = subtable[uCode & 255]; + if (dbcsCode <= SEQ_START) { + seqObj = this.encodeTableSeq[SEQ_START - dbcsCode]; + continue; + } + if (dbcsCode == UNASSIGNED && this.gb18030) { + var idx = findIdx(this.gb18030.uChars, uCode); + if (idx != -1) { + var dbcsCode = this.gb18030.gbChars[idx] + (uCode - this.gb18030.uChars[idx]); + newBuf[j++] = 129 + Math.floor(dbcsCode / 12600); + dbcsCode = dbcsCode % 12600; + newBuf[j++] = 48 + Math.floor(dbcsCode / 1260); + dbcsCode = dbcsCode % 1260; + newBuf[j++] = 129 + Math.floor(dbcsCode / 10); + dbcsCode = dbcsCode % 10; + newBuf[j++] = 48 + dbcsCode; + continue; + } + } + } + if (dbcsCode === UNASSIGNED) + dbcsCode = this.defaultCharSingleByte; + if (dbcsCode < 256) { + newBuf[j++] = dbcsCode; + } else if (dbcsCode < 65536) { + newBuf[j++] = dbcsCode >> 8; + newBuf[j++] = dbcsCode & 255; + } else if (dbcsCode < 16777216) { + newBuf[j++] = dbcsCode >> 16; + newBuf[j++] = dbcsCode >> 8 & 255; + newBuf[j++] = dbcsCode & 255; + } else { + newBuf[j++] = dbcsCode >>> 24; + newBuf[j++] = dbcsCode >>> 16 & 255; + newBuf[j++] = dbcsCode >>> 8 & 255; + newBuf[j++] = dbcsCode & 255; + } + } + this.seqObj = seqObj; + this.leadSurrogate = leadSurrogate; + return newBuf.slice(0, j); + }; + DBCSEncoder.prototype.end = function() { + if (this.leadSurrogate === -1 && this.seqObj === void 0) + return; + var newBuf = Buffer2.alloc(10), j = 0; + if (this.seqObj) { + var dbcsCode = this.seqObj[DEF_CHAR]; + if (dbcsCode !== void 0) { + if (dbcsCode < 256) { + newBuf[j++] = dbcsCode; + } else { + newBuf[j++] = dbcsCode >> 8; + newBuf[j++] = dbcsCode & 255; + } + } else { + } + this.seqObj = void 0; + } + if (this.leadSurrogate !== -1) { + newBuf[j++] = this.defaultCharSingleByte; + this.leadSurrogate = -1; + } + return newBuf.slice(0, j); + }; + DBCSEncoder.prototype.findIdx = findIdx; + function DBCSDecoder(options, codec) { + this.nodeIdx = 0; + this.prevBytes = []; + this.decodeTables = codec.decodeTables; + this.decodeTableSeq = codec.decodeTableSeq; + this.defaultCharUnicode = codec.defaultCharUnicode; + this.gb18030 = codec.gb18030; + } + DBCSDecoder.prototype.write = function(buf) { + var newBuf = Buffer2.alloc(buf.length * 2), nodeIdx = this.nodeIdx, prevBytes = this.prevBytes, prevOffset = this.prevBytes.length, seqStart = -this.prevBytes.length, uCode; + for (var i2 = 0, j = 0; i2 < buf.length; i2++) { + var curByte = i2 >= 0 ? buf[i2] : prevBytes[i2 + prevOffset]; + var uCode = this.decodeTables[nodeIdx][curByte]; + if (uCode >= 0) { + } else if (uCode === UNASSIGNED) { + uCode = this.defaultCharUnicode.charCodeAt(0); + i2 = seqStart; + } else if (uCode === GB18030_CODE) { + if (i2 >= 3) { + var ptr = (buf[i2 - 3] - 129) * 12600 + (buf[i2 - 2] - 48) * 1260 + (buf[i2 - 1] - 129) * 10 + (curByte - 48); + } else { + var ptr = (prevBytes[i2 - 3 + prevOffset] - 129) * 12600 + ((i2 - 2 >= 0 ? buf[i2 - 2] : prevBytes[i2 - 2 + prevOffset]) - 48) * 1260 + ((i2 - 1 >= 0 ? buf[i2 - 1] : prevBytes[i2 - 1 + prevOffset]) - 129) * 10 + (curByte - 48); + } + var idx = findIdx(this.gb18030.gbChars, ptr); + uCode = this.gb18030.uChars[idx] + ptr - this.gb18030.gbChars[idx]; + } else if (uCode <= NODE_START) { + nodeIdx = NODE_START - uCode; + continue; + } else if (uCode <= SEQ_START) { + var seq = this.decodeTableSeq[SEQ_START - uCode]; + for (var k = 0; k < seq.length - 1; k++) { + uCode = seq[k]; + newBuf[j++] = uCode & 255; + newBuf[j++] = uCode >> 8; + } + uCode = seq[seq.length - 1]; + } else + throw new Error("iconv-lite internal error: invalid decoding table value " + uCode + " at " + nodeIdx + "/" + curByte); + if (uCode >= 65536) { + uCode -= 65536; + var uCodeLead = 55296 | uCode >> 10; + newBuf[j++] = uCodeLead & 255; + newBuf[j++] = uCodeLead >> 8; + uCode = 56320 | uCode & 1023; + } + newBuf[j++] = uCode & 255; + newBuf[j++] = uCode >> 8; + nodeIdx = 0; + seqStart = i2 + 1; + } + this.nodeIdx = nodeIdx; + this.prevBytes = seqStart >= 0 ? Array.prototype.slice.call(buf, seqStart) : prevBytes.slice(seqStart + prevOffset).concat(Array.prototype.slice.call(buf)); + return newBuf.slice(0, j).toString("ucs2"); + }; + DBCSDecoder.prototype.end = function() { + var ret = ""; + while (this.prevBytes.length > 0) { + ret += this.defaultCharUnicode; + var bytesArr = this.prevBytes.slice(1); + this.prevBytes = []; + this.nodeIdx = 0; + if (bytesArr.length > 0) + ret += this.write(bytesArr); + } + this.prevBytes = []; + this.nodeIdx = 0; + return ret; + }; + function findIdx(table, val) { + if (table[0] > val) + return -1; + var l = 0, r = table.length; + while (l < r - 1) { + var mid = l + (r - l + 1 >> 1); + if (table[mid] <= val) + l = mid; + else + r = mid; + } + return l; + } + } +}); + +// ../../node_modules/iconv-lite/encodings/tables/shiftjis.json +var require_shiftjis = __commonJS({ + "../../node_modules/iconv-lite/encodings/tables/shiftjis.json"(exports2, module2) { + module2.exports = [ + ["0", "\0", 128], + ["a1", "\uFF61", 62], + ["8140", "\u3000\u3001\u3002\uFF0C\uFF0E\u30FB\uFF1A\uFF1B\uFF1F\uFF01\u309B\u309C\xB4\uFF40\xA8\uFF3E\uFFE3\uFF3F\u30FD\u30FE\u309D\u309E\u3003\u4EDD\u3005\u3006\u3007\u30FC\u2015\u2010\uFF0F\uFF3C\uFF5E\u2225\uFF5C\u2026\u2025\u2018\u2019\u201C\u201D\uFF08\uFF09\u3014\u3015\uFF3B\uFF3D\uFF5B\uFF5D\u3008", 9, "\uFF0B\uFF0D\xB1\xD7"], + ["8180", "\xF7\uFF1D\u2260\uFF1C\uFF1E\u2266\u2267\u221E\u2234\u2642\u2640\xB0\u2032\u2033\u2103\uFFE5\uFF04\uFFE0\uFFE1\uFF05\uFF03\uFF06\uFF0A\uFF20\xA7\u2606\u2605\u25CB\u25CF\u25CE\u25C7\u25C6\u25A1\u25A0\u25B3\u25B2\u25BD\u25BC\u203B\u3012\u2192\u2190\u2191\u2193\u3013"], + ["81b8", "\u2208\u220B\u2286\u2287\u2282\u2283\u222A\u2229"], + ["81c8", "\u2227\u2228\uFFE2\u21D2\u21D4\u2200\u2203"], + ["81da", "\u2220\u22A5\u2312\u2202\u2207\u2261\u2252\u226A\u226B\u221A\u223D\u221D\u2235\u222B\u222C"], + ["81f0", "\u212B\u2030\u266F\u266D\u266A\u2020\u2021\xB6"], + ["81fc", "\u25EF"], + ["824f", "\uFF10", 9], + ["8260", "\uFF21", 25], + ["8281", "\uFF41", 25], + ["829f", "\u3041", 82], + ["8340", "\u30A1", 62], + ["8380", "\u30E0", 22], + ["839f", "\u0391", 16, "\u03A3", 6], + ["83bf", "\u03B1", 16, "\u03C3", 6], + ["8440", "\u0410", 5, "\u0401\u0416", 25], + ["8470", "\u0430", 5, "\u0451\u0436", 7], + ["8480", "\u043E", 17], + ["849f", "\u2500\u2502\u250C\u2510\u2518\u2514\u251C\u252C\u2524\u2534\u253C\u2501\u2503\u250F\u2513\u251B\u2517\u2523\u2533\u252B\u253B\u254B\u2520\u252F\u2528\u2537\u253F\u251D\u2530\u2525\u2538\u2542"], + ["8740", "\u2460", 19, "\u2160", 9], + ["875f", "\u3349\u3314\u3322\u334D\u3318\u3327\u3303\u3336\u3351\u3357\u330D\u3326\u3323\u332B\u334A\u333B\u339C\u339D\u339E\u338E\u338F\u33C4\u33A1"], + ["877e", "\u337B"], + ["8780", "\u301D\u301F\u2116\u33CD\u2121\u32A4", 4, "\u3231\u3232\u3239\u337E\u337D\u337C\u2252\u2261\u222B\u222E\u2211\u221A\u22A5\u2220\u221F\u22BF\u2235\u2229\u222A"], + ["889f", "\u4E9C\u5516\u5A03\u963F\u54C0\u611B\u6328\u59F6\u9022\u8475\u831C\u7A50\u60AA\u63E1\u6E25\u65ED\u8466\u82A6\u9BF5\u6893\u5727\u65A1\u6271\u5B9B\u59D0\u867B\u98F4\u7D62\u7DBE\u9B8E\u6216\u7C9F\u88B7\u5B89\u5EB5\u6309\u6697\u6848\u95C7\u978D\u674F\u4EE5\u4F0A\u4F4D\u4F9D\u5049\u56F2\u5937\u59D4\u5A01\u5C09\u60DF\u610F\u6170\u6613\u6905\u70BA\u754F\u7570\u79FB\u7DAD\u7DEF\u80C3\u840E\u8863\u8B02\u9055\u907A\u533B\u4E95\u4EA5\u57DF\u80B2\u90C1\u78EF\u4E00\u58F1\u6EA2\u9038\u7A32\u8328\u828B\u9C2F\u5141\u5370\u54BD\u54E1\u56E0\u59FB\u5F15\u98F2\u6DEB\u80E4\u852D"], + ["8940", "\u9662\u9670\u96A0\u97FB\u540B\u53F3\u5B87\u70CF\u7FBD\u8FC2\u96E8\u536F\u9D5C\u7ABA\u4E11\u7893\u81FC\u6E26\u5618\u5504\u6B1D\u851A\u9C3B\u59E5\u53A9\u6D66\u74DC\u958F\u5642\u4E91\u904B\u96F2\u834F\u990C\u53E1\u55B6\u5B30\u5F71\u6620\u66F3\u6804\u6C38\u6CF3\u6D29\u745B\u76C8\u7A4E\u9834\u82F1\u885B\u8A60\u92ED\u6DB2\u75AB\u76CA\u99C5\u60A6\u8B01\u8D8A\u95B2\u698E\u53AD\u5186"], + ["8980", "\u5712\u5830\u5944\u5BB4\u5EF6\u6028\u63A9\u63F4\u6CBF\u6F14\u708E\u7114\u7159\u71D5\u733F\u7E01\u8276\u82D1\u8597\u9060\u925B\u9D1B\u5869\u65BC\u6C5A\u7525\u51F9\u592E\u5965\u5F80\u5FDC\u62BC\u65FA\u6A2A\u6B27\u6BB4\u738B\u7FC1\u8956\u9D2C\u9D0E\u9EC4\u5CA1\u6C96\u837B\u5104\u5C4B\u61B6\u81C6\u6876\u7261\u4E59\u4FFA\u5378\u6069\u6E29\u7A4F\u97F3\u4E0B\u5316\u4EEE\u4F55\u4F3D\u4FA1\u4F73\u52A0\u53EF\u5609\u590F\u5AC1\u5BB6\u5BE1\u79D1\u6687\u679C\u67B6\u6B4C\u6CB3\u706B\u73C2\u798D\u79BE\u7A3C\u7B87\u82B1\u82DB\u8304\u8377\u83EF\u83D3\u8766\u8AB2\u5629\u8CA8\u8FE6\u904E\u971E\u868A\u4FC4\u5CE8\u6211\u7259\u753B\u81E5\u82BD\u86FE\u8CC0\u96C5\u9913\u99D5\u4ECB\u4F1A\u89E3\u56DE\u584A\u58CA\u5EFB\u5FEB\u602A\u6094\u6062\u61D0\u6212\u62D0\u6539"], + ["8a40", "\u9B41\u6666\u68B0\u6D77\u7070\u754C\u7686\u7D75\u82A5\u87F9\u958B\u968E\u8C9D\u51F1\u52BE\u5916\u54B3\u5BB3\u5D16\u6168\u6982\u6DAF\u788D\u84CB\u8857\u8A72\u93A7\u9AB8\u6D6C\u99A8\u86D9\u57A3\u67FF\u86CE\u920E\u5283\u5687\u5404\u5ED3\u62E1\u64B9\u683C\u6838\u6BBB\u7372\u78BA\u7A6B\u899A\u89D2\u8D6B\u8F03\u90ED\u95A3\u9694\u9769\u5B66\u5CB3\u697D\u984D\u984E\u639B\u7B20\u6A2B"], + ["8a80", "\u6A7F\u68B6\u9C0D\u6F5F\u5272\u559D\u6070\u62EC\u6D3B\u6E07\u6ED1\u845B\u8910\u8F44\u4E14\u9C39\u53F6\u691B\u6A3A\u9784\u682A\u515C\u7AC3\u84B2\u91DC\u938C\u565B\u9D28\u6822\u8305\u8431\u7CA5\u5208\u82C5\u74E6\u4E7E\u4F83\u51A0\u5BD2\u520A\u52D8\u52E7\u5DFB\u559A\u582A\u59E6\u5B8C\u5B98\u5BDB\u5E72\u5E79\u60A3\u611F\u6163\u61BE\u63DB\u6562\u67D1\u6853\u68FA\u6B3E\u6B53\u6C57\u6F22\u6F97\u6F45\u74B0\u7518\u76E3\u770B\u7AFF\u7BA1\u7C21\u7DE9\u7F36\u7FF0\u809D\u8266\u839E\u89B3\u8ACC\u8CAB\u9084\u9451\u9593\u9591\u95A2\u9665\u97D3\u9928\u8218\u4E38\u542B\u5CB8\u5DCC\u73A9\u764C\u773C\u5CA9\u7FEB\u8D0B\u96C1\u9811\u9854\u9858\u4F01\u4F0E\u5371\u559C\u5668\u57FA\u5947\u5B09\u5BC4\u5C90\u5E0C\u5E7E\u5FCC\u63EE\u673A\u65D7\u65E2\u671F\u68CB\u68C4"], + ["8b40", "\u6A5F\u5E30\u6BC5\u6C17\u6C7D\u757F\u7948\u5B63\u7A00\u7D00\u5FBD\u898F\u8A18\u8CB4\u8D77\u8ECC\u8F1D\u98E2\u9A0E\u9B3C\u4E80\u507D\u5100\u5993\u5B9C\u622F\u6280\u64EC\u6B3A\u72A0\u7591\u7947\u7FA9\u87FB\u8ABC\u8B70\u63AC\u83CA\u97A0\u5409\u5403\u55AB\u6854\u6A58\u8A70\u7827\u6775\u9ECD\u5374\u5BA2\u811A\u8650\u9006\u4E18\u4E45\u4EC7\u4F11\u53CA\u5438\u5BAE\u5F13\u6025\u6551"], + ["8b80", "\u673D\u6C42\u6C72\u6CE3\u7078\u7403\u7A76\u7AAE\u7B08\u7D1A\u7CFE\u7D66\u65E7\u725B\u53BB\u5C45\u5DE8\u62D2\u62E0\u6319\u6E20\u865A\u8A31\u8DDD\u92F8\u6F01\u79A6\u9B5A\u4EA8\u4EAB\u4EAC\u4F9B\u4FA0\u50D1\u5147\u7AF6\u5171\u51F6\u5354\u5321\u537F\u53EB\u55AC\u5883\u5CE1\u5F37\u5F4A\u602F\u6050\u606D\u631F\u6559\u6A4B\u6CC1\u72C2\u72ED\u77EF\u80F8\u8105\u8208\u854E\u90F7\u93E1\u97FF\u9957\u9A5A\u4EF0\u51DD\u5C2D\u6681\u696D\u5C40\u66F2\u6975\u7389\u6850\u7C81\u50C5\u52E4\u5747\u5DFE\u9326\u65A4\u6B23\u6B3D\u7434\u7981\u79BD\u7B4B\u7DCA\u82B9\u83CC\u887F\u895F\u8B39\u8FD1\u91D1\u541F\u9280\u4E5D\u5036\u53E5\u533A\u72D7\u7396\u77E9\u82E6\u8EAF\u99C6\u99C8\u99D2\u5177\u611A\u865E\u55B0\u7A7A\u5076\u5BD3\u9047\u9685\u4E32\u6ADB\u91E7\u5C51\u5C48"], + ["8c40", "\u6398\u7A9F\u6C93\u9774\u8F61\u7AAA\u718A\u9688\u7C82\u6817\u7E70\u6851\u936C\u52F2\u541B\u85AB\u8A13\u7FA4\u8ECD\u90E1\u5366\u8888\u7941\u4FC2\u50BE\u5211\u5144\u5553\u572D\u73EA\u578B\u5951\u5F62\u5F84\u6075\u6176\u6167\u61A9\u63B2\u643A\u656C\u666F\u6842\u6E13\u7566\u7A3D\u7CFB\u7D4C\u7D99\u7E4B\u7F6B\u830E\u834A\u86CD\u8A08\u8A63\u8B66\u8EFD\u981A\u9D8F\u82B8\u8FCE\u9BE8"], + ["8c80", "\u5287\u621F\u6483\u6FC0\u9699\u6841\u5091\u6B20\u6C7A\u6F54\u7A74\u7D50\u8840\u8A23\u6708\u4EF6\u5039\u5026\u5065\u517C\u5238\u5263\u55A7\u570F\u5805\u5ACC\u5EFA\u61B2\u61F8\u62F3\u6372\u691C\u6A29\u727D\u72AC\u732E\u7814\u786F\u7D79\u770C\u80A9\u898B\u8B19\u8CE2\u8ED2\u9063\u9375\u967A\u9855\u9A13\u9E78\u5143\u539F\u53B3\u5E7B\u5F26\u6E1B\u6E90\u7384\u73FE\u7D43\u8237\u8A00\u8AFA\u9650\u4E4E\u500B\u53E4\u547C\u56FA\u59D1\u5B64\u5DF1\u5EAB\u5F27\u6238\u6545\u67AF\u6E56\u72D0\u7CCA\u88B4\u80A1\u80E1\u83F0\u864E\u8A87\u8DE8\u9237\u96C7\u9867\u9F13\u4E94\u4E92\u4F0D\u5348\u5449\u543E\u5A2F\u5F8C\u5FA1\u609F\u68A7\u6A8E\u745A\u7881\u8A9E\u8AA4\u8B77\u9190\u4E5E\u9BC9\u4EA4\u4F7C\u4FAF\u5019\u5016\u5149\u516C\u529F\u52B9\u52FE\u539A\u53E3\u5411"], + ["8d40", "\u540E\u5589\u5751\u57A2\u597D\u5B54\u5B5D\u5B8F\u5DE5\u5DE7\u5DF7\u5E78\u5E83\u5E9A\u5EB7\u5F18\u6052\u614C\u6297\u62D8\u63A7\u653B\u6602\u6643\u66F4\u676D\u6821\u6897\u69CB\u6C5F\u6D2A\u6D69\u6E2F\u6E9D\u7532\u7687\u786C\u7A3F\u7CE0\u7D05\u7D18\u7D5E\u7DB1\u8015\u8003\u80AF\u80B1\u8154\u818F\u822A\u8352\u884C\u8861\u8B1B\u8CA2\u8CFC\u90CA\u9175\u9271\u783F\u92FC\u95A4\u964D"], + ["8d80", "\u9805\u9999\u9AD8\u9D3B\u525B\u52AB\u53F7\u5408\u58D5\u62F7\u6FE0\u8C6A\u8F5F\u9EB9\u514B\u523B\u544A\u56FD\u7A40\u9177\u9D60\u9ED2\u7344\u6F09\u8170\u7511\u5FFD\u60DA\u9AA8\u72DB\u8FBC\u6B64\u9803\u4ECA\u56F0\u5764\u58BE\u5A5A\u6068\u61C7\u660F\u6606\u6839\u68B1\u6DF7\u75D5\u7D3A\u826E\u9B42\u4E9B\u4F50\u53C9\u5506\u5D6F\u5DE6\u5DEE\u67FB\u6C99\u7473\u7802\u8A50\u9396\u88DF\u5750\u5EA7\u632B\u50B5\u50AC\u518D\u6700\u54C9\u585E\u59BB\u5BB0\u5F69\u624D\u63A1\u683D\u6B73\u6E08\u707D\u91C7\u7280\u7815\u7826\u796D\u658E\u7D30\u83DC\u88C1\u8F09\u969B\u5264\u5728\u6750\u7F6A\u8CA1\u51B4\u5742\u962A\u583A\u698A\u80B4\u54B2\u5D0E\u57FC\u7895\u9DFA\u4F5C\u524A\u548B\u643E\u6628\u6714\u67F5\u7A84\u7B56\u7D22\u932F\u685C\u9BAD\u7B39\u5319\u518A\u5237"], + ["8e40", "\u5BDF\u62F6\u64AE\u64E6\u672D\u6BBA\u85A9\u96D1\u7690\u9BD6\u634C\u9306\u9BAB\u76BF\u6652\u4E09\u5098\u53C2\u5C71\u60E8\u6492\u6563\u685F\u71E6\u73CA\u7523\u7B97\u7E82\u8695\u8B83\u8CDB\u9178\u9910\u65AC\u66AB\u6B8B\u4ED5\u4ED4\u4F3A\u4F7F\u523A\u53F8\u53F2\u55E3\u56DB\u58EB\u59CB\u59C9\u59FF\u5B50\u5C4D\u5E02\u5E2B\u5FD7\u601D\u6307\u652F\u5B5C\u65AF\u65BD\u65E8\u679D\u6B62"], + ["8e80", "\u6B7B\u6C0F\u7345\u7949\u79C1\u7CF8\u7D19\u7D2B\u80A2\u8102\u81F3\u8996\u8A5E\u8A69\u8A66\u8A8C\u8AEE\u8CC7\u8CDC\u96CC\u98FC\u6B6F\u4E8B\u4F3C\u4F8D\u5150\u5B57\u5BFA\u6148\u6301\u6642\u6B21\u6ECB\u6CBB\u723E\u74BD\u75D4\u78C1\u793A\u800C\u8033\u81EA\u8494\u8F9E\u6C50\u9E7F\u5F0F\u8B58\u9D2B\u7AFA\u8EF8\u5B8D\u96EB\u4E03\u53F1\u57F7\u5931\u5AC9\u5BA4\u6089\u6E7F\u6F06\u75BE\u8CEA\u5B9F\u8500\u7BE0\u5072\u67F4\u829D\u5C61\u854A\u7E1E\u820E\u5199\u5C04\u6368\u8D66\u659C\u716E\u793E\u7D17\u8005\u8B1D\u8ECA\u906E\u86C7\u90AA\u501F\u52FA\u5C3A\u6753\u707C\u7235\u914C\u91C8\u932B\u82E5\u5BC2\u5F31\u60F9\u4E3B\u53D6\u5B88\u624B\u6731\u6B8A\u72E9\u73E0\u7A2E\u816B\u8DA3\u9152\u9996\u5112\u53D7\u546A\u5BFF\u6388\u6A39\u7DAC\u9700\u56DA\u53CE\u5468"], + ["8f40", "\u5B97\u5C31\u5DDE\u4FEE\u6101\u62FE\u6D32\u79C0\u79CB\u7D42\u7E4D\u7FD2\u81ED\u821F\u8490\u8846\u8972\u8B90\u8E74\u8F2F\u9031\u914B\u916C\u96C6\u919C\u4EC0\u4F4F\u5145\u5341\u5F93\u620E\u67D4\u6C41\u6E0B\u7363\u7E26\u91CD\u9283\u53D4\u5919\u5BBF\u6DD1\u795D\u7E2E\u7C9B\u587E\u719F\u51FA\u8853\u8FF0\u4FCA\u5CFB\u6625\u77AC\u7AE3\u821C\u99FF\u51C6\u5FAA\u65EC\u696F\u6B89\u6DF3"], + ["8f80", "\u6E96\u6F64\u76FE\u7D14\u5DE1\u9075\u9187\u9806\u51E6\u521D\u6240\u6691\u66D9\u6E1A\u5EB6\u7DD2\u7F72\u66F8\u85AF\u85F7\u8AF8\u52A9\u53D9\u5973\u5E8F\u5F90\u6055\u92E4\u9664\u50B7\u511F\u52DD\u5320\u5347\u53EC\u54E8\u5546\u5531\u5617\u5968\u59BE\u5A3C\u5BB5\u5C06\u5C0F\u5C11\u5C1A\u5E84\u5E8A\u5EE0\u5F70\u627F\u6284\u62DB\u638C\u6377\u6607\u660C\u662D\u6676\u677E\u68A2\u6A1F\u6A35\u6CBC\u6D88\u6E09\u6E58\u713C\u7126\u7167\u75C7\u7701\u785D\u7901\u7965\u79F0\u7AE0\u7B11\u7CA7\u7D39\u8096\u83D6\u848B\u8549\u885D\u88F3\u8A1F\u8A3C\u8A54\u8A73\u8C61\u8CDE\u91A4\u9266\u937E\u9418\u969C\u9798\u4E0A\u4E08\u4E1E\u4E57\u5197\u5270\u57CE\u5834\u58CC\u5B22\u5E38\u60C5\u64FE\u6761\u6756\u6D44\u72B6\u7573\u7A63\u84B8\u8B72\u91B8\u9320\u5631\u57F4\u98FE"], + ["9040", "\u62ED\u690D\u6B96\u71ED\u7E54\u8077\u8272\u89E6\u98DF\u8755\u8FB1\u5C3B\u4F38\u4FE1\u4FB5\u5507\u5A20\u5BDD\u5BE9\u5FC3\u614E\u632F\u65B0\u664B\u68EE\u699B\u6D78\u6DF1\u7533\u75B9\u771F\u795E\u79E6\u7D33\u81E3\u82AF\u85AA\u89AA\u8A3A\u8EAB\u8F9B\u9032\u91DD\u9707\u4EBA\u4EC1\u5203\u5875\u58EC\u5C0B\u751A\u5C3D\u814E\u8A0A\u8FC5\u9663\u976D\u7B25\u8ACF\u9808\u9162\u56F3\u53A8"], + ["9080", "\u9017\u5439\u5782\u5E25\u63A8\u6C34\u708A\u7761\u7C8B\u7FE0\u8870\u9042\u9154\u9310\u9318\u968F\u745E\u9AC4\u5D07\u5D69\u6570\u67A2\u8DA8\u96DB\u636E\u6749\u6919\u83C5\u9817\u96C0\u88FE\u6F84\u647A\u5BF8\u4E16\u702C\u755D\u662F\u51C4\u5236\u52E2\u59D3\u5F81\u6027\u6210\u653F\u6574\u661F\u6674\u68F2\u6816\u6B63\u6E05\u7272\u751F\u76DB\u7CBE\u8056\u58F0\u88FD\u897F\u8AA0\u8A93\u8ACB\u901D\u9192\u9752\u9759\u6589\u7A0E\u8106\u96BB\u5E2D\u60DC\u621A\u65A5\u6614\u6790\u77F3\u7A4D\u7C4D\u7E3E\u810A\u8CAC\u8D64\u8DE1\u8E5F\u78A9\u5207\u62D9\u63A5\u6442\u6298\u8A2D\u7A83\u7BC0\u8AAC\u96EA\u7D76\u820C\u8749\u4ED9\u5148\u5343\u5360\u5BA3\u5C02\u5C16\u5DDD\u6226\u6247\u64B0\u6813\u6834\u6CC9\u6D45\u6D17\u67D3\u6F5C\u714E\u717D\u65CB\u7A7F\u7BAD\u7DDA"], + ["9140", "\u7E4A\u7FA8\u817A\u821B\u8239\u85A6\u8A6E\u8CCE\u8DF5\u9078\u9077\u92AD\u9291\u9583\u9BAE\u524D\u5584\u6F38\u7136\u5168\u7985\u7E55\u81B3\u7CCE\u564C\u5851\u5CA8\u63AA\u66FE\u66FD\u695A\u72D9\u758F\u758E\u790E\u7956\u79DF\u7C97\u7D20\u7D44\u8607\u8A34\u963B\u9061\u9F20\u50E7\u5275\u53CC\u53E2\u5009\u55AA\u58EE\u594F\u723D\u5B8B\u5C64\u531D\u60E3\u60F3\u635C\u6383\u633F\u63BB"], + ["9180", "\u64CD\u65E9\u66F9\u5DE3\u69CD\u69FD\u6F15\u71E5\u4E89\u75E9\u76F8\u7A93\u7CDF\u7DCF\u7D9C\u8061\u8349\u8358\u846C\u84BC\u85FB\u88C5\u8D70\u9001\u906D\u9397\u971C\u9A12\u50CF\u5897\u618E\u81D3\u8535\u8D08\u9020\u4FC3\u5074\u5247\u5373\u606F\u6349\u675F\u6E2C\u8DB3\u901F\u4FD7\u5C5E\u8CCA\u65CF\u7D9A\u5352\u8896\u5176\u63C3\u5B58\u5B6B\u5C0A\u640D\u6751\u905C\u4ED6\u591A\u592A\u6C70\u8A51\u553E\u5815\u59A5\u60F0\u6253\u67C1\u8235\u6955\u9640\u99C4\u9A28\u4F53\u5806\u5BFE\u8010\u5CB1\u5E2F\u5F85\u6020\u614B\u6234\u66FF\u6CF0\u6EDE\u80CE\u817F\u82D4\u888B\u8CB8\u9000\u902E\u968A\u9EDB\u9BDB\u4EE3\u53F0\u5927\u7B2C\u918D\u984C\u9DF9\u6EDD\u7027\u5353\u5544\u5B85\u6258\u629E\u62D3\u6CA2\u6FEF\u7422\u8A17\u9438\u6FC1\u8AFE\u8338\u51E7\u86F8\u53EA"], + ["9240", "\u53E9\u4F46\u9054\u8FB0\u596A\u8131\u5DFD\u7AEA\u8FBF\u68DA\u8C37\u72F8\u9C48\u6A3D\u8AB0\u4E39\u5358\u5606\u5766\u62C5\u63A2\u65E6\u6B4E\u6DE1\u6E5B\u70AD\u77ED\u7AEF\u7BAA\u7DBB\u803D\u80C6\u86CB\u8A95\u935B\u56E3\u58C7\u5F3E\u65AD\u6696\u6A80\u6BB5\u7537\u8AC7\u5024\u77E5\u5730\u5F1B\u6065\u667A\u6C60\u75F4\u7A1A\u7F6E\u81F4\u8718\u9045\u99B3\u7BC9\u755C\u7AF9\u7B51\u84C4"], + ["9280", "\u9010\u79E9\u7A92\u8336\u5AE1\u7740\u4E2D\u4EF2\u5B99\u5FE0\u62BD\u663C\u67F1\u6CE8\u866B\u8877\u8A3B\u914E\u92F3\u99D0\u6A17\u7026\u732A\u82E7\u8457\u8CAF\u4E01\u5146\u51CB\u558B\u5BF5\u5E16\u5E33\u5E81\u5F14\u5F35\u5F6B\u5FB4\u61F2\u6311\u66A2\u671D\u6F6E\u7252\u753A\u773A\u8074\u8139\u8178\u8776\u8ABF\u8ADC\u8D85\u8DF3\u929A\u9577\u9802\u9CE5\u52C5\u6357\u76F4\u6715\u6C88\u73CD\u8CC3\u93AE\u9673\u6D25\u589C\u690E\u69CC\u8FFD\u939A\u75DB\u901A\u585A\u6802\u63B4\u69FB\u4F43\u6F2C\u67D8\u8FBB\u8526\u7DB4\u9354\u693F\u6F70\u576A\u58F7\u5B2C\u7D2C\u722A\u540A\u91E3\u9DB4\u4EAD\u4F4E\u505C\u5075\u5243\u8C9E\u5448\u5824\u5B9A\u5E1D\u5E95\u5EAD\u5EF7\u5F1F\u608C\u62B5\u633A\u63D0\u68AF\u6C40\u7887\u798E\u7A0B\u7DE0\u8247\u8A02\u8AE6\u8E44\u9013"], + ["9340", "\u90B8\u912D\u91D8\u9F0E\u6CE5\u6458\u64E2\u6575\u6EF4\u7684\u7B1B\u9069\u93D1\u6EBA\u54F2\u5FB9\u64A4\u8F4D\u8FED\u9244\u5178\u586B\u5929\u5C55\u5E97\u6DFB\u7E8F\u751C\u8CBC\u8EE2\u985B\u70B9\u4F1D\u6BBF\u6FB1\u7530\u96FB\u514E\u5410\u5835\u5857\u59AC\u5C60\u5F92\u6597\u675C\u6E21\u767B\u83DF\u8CED\u9014\u90FD\u934D\u7825\u783A\u52AA\u5EA6\u571F\u5974\u6012\u5012\u515A\u51AC"], + ["9380", "\u51CD\u5200\u5510\u5854\u5858\u5957\u5B95\u5CF6\u5D8B\u60BC\u6295\u642D\u6771\u6843\u68BC\u68DF\u76D7\u6DD8\u6E6F\u6D9B\u706F\u71C8\u5F53\u75D8\u7977\u7B49\u7B54\u7B52\u7CD6\u7D71\u5230\u8463\u8569\u85E4\u8A0E\u8B04\u8C46\u8E0F\u9003\u900F\u9419\u9676\u982D\u9A30\u95D8\u50CD\u52D5\u540C\u5802\u5C0E\u61A7\u649E\u6D1E\u77B3\u7AE5\u80F4\u8404\u9053\u9285\u5CE0\u9D07\u533F\u5F97\u5FB3\u6D9C\u7279\u7763\u79BF\u7BE4\u6BD2\u72EC\u8AAD\u6803\u6A61\u51F8\u7A81\u6934\u5C4A\u9CF6\u82EB\u5BC5\u9149\u701E\u5678\u5C6F\u60C7\u6566\u6C8C\u8C5A\u9041\u9813\u5451\u66C7\u920D\u5948\u90A3\u5185\u4E4D\u51EA\u8599\u8B0E\u7058\u637A\u934B\u6962\u99B4\u7E04\u7577\u5357\u6960\u8EDF\u96E3\u6C5D\u4E8C\u5C3C\u5F10\u8FE9\u5302\u8CD1\u8089\u8679\u5EFF\u65E5\u4E73\u5165"], + ["9440", "\u5982\u5C3F\u97EE\u4EFB\u598A\u5FCD\u8A8D\u6FE1\u79B0\u7962\u5BE7\u8471\u732B\u71B1\u5E74\u5FF5\u637B\u649A\u71C3\u7C98\u4E43\u5EFC\u4E4B\u57DC\u56A2\u60A9\u6FC3\u7D0D\u80FD\u8133\u81BF\u8FB2\u8997\u86A4\u5DF4\u628A\u64AD\u8987\u6777\u6CE2\u6D3E\u7436\u7834\u5A46\u7F75\u82AD\u99AC\u4FF3\u5EC3\u62DD\u6392\u6557\u676F\u76C3\u724C\u80CC\u80BA\u8F29\u914D\u500D\u57F9\u5A92\u6885"], + ["9480", "\u6973\u7164\u72FD\u8CB7\u58F2\u8CE0\u966A\u9019\u877F\u79E4\u77E7\u8429\u4F2F\u5265\u535A\u62CD\u67CF\u6CCA\u767D\u7B94\u7C95\u8236\u8584\u8FEB\u66DD\u6F20\u7206\u7E1B\u83AB\u99C1\u9EA6\u51FD\u7BB1\u7872\u7BB8\u8087\u7B48\u6AE8\u5E61\u808C\u7551\u7560\u516B\u9262\u6E8C\u767A\u9197\u9AEA\u4F10\u7F70\u629C\u7B4F\u95A5\u9CE9\u567A\u5859\u86E4\u96BC\u4F34\u5224\u534A\u53CD\u53DB\u5E06\u642C\u6591\u677F\u6C3E\u6C4E\u7248\u72AF\u73ED\u7554\u7E41\u822C\u85E9\u8CA9\u7BC4\u91C6\u7169\u9812\u98EF\u633D\u6669\u756A\u76E4\u78D0\u8543\u86EE\u532A\u5351\u5426\u5983\u5E87\u5F7C\u60B2\u6249\u6279\u62AB\u6590\u6BD4\u6CCC\u75B2\u76AE\u7891\u79D8\u7DCB\u7F77\u80A5\u88AB\u8AB9\u8CBB\u907F\u975E\u98DB\u6A0B\u7C38\u5099\u5C3E\u5FAE\u6787\u6BD8\u7435\u7709\u7F8E"], + ["9540", "\u9F3B\u67CA\u7A17\u5339\u758B\u9AED\u5F66\u819D\u83F1\u8098\u5F3C\u5FC5\u7562\u7B46\u903C\u6867\u59EB\u5A9B\u7D10\u767E\u8B2C\u4FF5\u5F6A\u6A19\u6C37\u6F02\u74E2\u7968\u8868\u8A55\u8C79\u5EDF\u63CF\u75C5\u79D2\u82D7\u9328\u92F2\u849C\u86ED\u9C2D\u54C1\u5F6C\u658C\u6D5C\u7015\u8CA7\u8CD3\u983B\u654F\u74F6\u4E0D\u4ED8\u57E0\u592B\u5A66\u5BCC\u51A8\u5E03\u5E9C\u6016\u6276\u6577"], + ["9580", "\u65A7\u666E\u6D6E\u7236\u7B26\u8150\u819A\u8299\u8B5C\u8CA0\u8CE6\u8D74\u961C\u9644\u4FAE\u64AB\u6B66\u821E\u8461\u856A\u90E8\u5C01\u6953\u98A8\u847A\u8557\u4F0F\u526F\u5FA9\u5E45\u670D\u798F\u8179\u8907\u8986\u6DF5\u5F17\u6255\u6CB8\u4ECF\u7269\u9B92\u5206\u543B\u5674\u58B3\u61A4\u626E\u711A\u596E\u7C89\u7CDE\u7D1B\u96F0\u6587\u805E\u4E19\u4F75\u5175\u5840\u5E63\u5E73\u5F0A\u67C4\u4E26\u853D\u9589\u965B\u7C73\u9801\u50FB\u58C1\u7656\u78A7\u5225\u77A5\u8511\u7B86\u504F\u5909\u7247\u7BC7\u7DE8\u8FBA\u8FD4\u904D\u4FBF\u52C9\u5A29\u5F01\u97AD\u4FDD\u8217\u92EA\u5703\u6355\u6B69\u752B\u88DC\u8F14\u7A42\u52DF\u5893\u6155\u620A\u66AE\u6BCD\u7C3F\u83E9\u5023\u4FF8\u5305\u5446\u5831\u5949\u5B9D\u5CF0\u5CEF\u5D29\u5E96\u62B1\u6367\u653E\u65B9\u670B"], + ["9640", "\u6CD5\u6CE1\u70F9\u7832\u7E2B\u80DE\u82B3\u840C\u84EC\u8702\u8912\u8A2A\u8C4A\u90A6\u92D2\u98FD\u9CF3\u9D6C\u4E4F\u4EA1\u508D\u5256\u574A\u59A8\u5E3D\u5FD8\u5FD9\u623F\u66B4\u671B\u67D0\u68D2\u5192\u7D21\u80AA\u81A8\u8B00\u8C8C\u8CBF\u927E\u9632\u5420\u982C\u5317\u50D5\u535C\u58A8\u64B2\u6734\u7267\u7766\u7A46\u91E6\u52C3\u6CA1\u6B86\u5800\u5E4C\u5954\u672C\u7FFB\u51E1\u76C6"], + ["9680", "\u6469\u78E8\u9B54\u9EBB\u57CB\u59B9\u6627\u679A\u6BCE\u54E9\u69D9\u5E55\u819C\u6795\u9BAA\u67FE\u9C52\u685D\u4EA6\u4FE3\u53C8\u62B9\u672B\u6CAB\u8FC4\u4FAD\u7E6D\u9EBF\u4E07\u6162\u6E80\u6F2B\u8513\u5473\u672A\u9B45\u5DF3\u7B95\u5CAC\u5BC6\u871C\u6E4A\u84D1\u7A14\u8108\u5999\u7C8D\u6C11\u7720\u52D9\u5922\u7121\u725F\u77DB\u9727\u9D61\u690B\u5A7F\u5A18\u51A5\u540D\u547D\u660E\u76DF\u8FF7\u9298\u9CF4\u59EA\u725D\u6EC5\u514D\u68C9\u7DBF\u7DEC\u9762\u9EBA\u6478\u6A21\u8302\u5984\u5B5F\u6BDB\u731B\u76F2\u7DB2\u8017\u8499\u5132\u6728\u9ED9\u76EE\u6762\u52FF\u9905\u5C24\u623B\u7C7E\u8CB0\u554F\u60B6\u7D0B\u9580\u5301\u4E5F\u51B6\u591C\u723A\u8036\u91CE\u5F25\u77E2\u5384\u5F79\u7D04\u85AC\u8A33\u8E8D\u9756\u67F3\u85AE\u9453\u6109\u6108\u6CB9\u7652"], + ["9740", "\u8AED\u8F38\u552F\u4F51\u512A\u52C7\u53CB\u5BA5\u5E7D\u60A0\u6182\u63D6\u6709\u67DA\u6E67\u6D8C\u7336\u7337\u7531\u7950\u88D5\u8A98\u904A\u9091\u90F5\u96C4\u878D\u5915\u4E88\u4F59\u4E0E\u8A89\u8F3F\u9810\u50AD\u5E7C\u5996\u5BB9\u5EB8\u63DA\u63FA\u64C1\u66DC\u694A\u69D8\u6D0B\u6EB6\u7194\u7528\u7AAF\u7F8A\u8000\u8449\u84C9\u8981\u8B21\u8E0A\u9065\u967D\u990A\u617E\u6291\u6B32"], + ["9780", "\u6C83\u6D74\u7FCC\u7FFC\u6DC0\u7F85\u87BA\u88F8\u6765\u83B1\u983C\u96F7\u6D1B\u7D61\u843D\u916A\u4E71\u5375\u5D50\u6B04\u6FEB\u85CD\u862D\u89A7\u5229\u540F\u5C65\u674E\u68A8\u7406\u7483\u75E2\u88CF\u88E1\u91CC\u96E2\u9678\u5F8B\u7387\u7ACB\u844E\u63A0\u7565\u5289\u6D41\u6E9C\u7409\u7559\u786B\u7C92\u9686\u7ADC\u9F8D\u4FB6\u616E\u65C5\u865C\u4E86\u4EAE\u50DA\u4E21\u51CC\u5BEE\u6599\u6881\u6DBC\u731F\u7642\u77AD\u7A1C\u7CE7\u826F\u8AD2\u907C\u91CF\u9675\u9818\u529B\u7DD1\u502B\u5398\u6797\u6DCB\u71D0\u7433\u81E8\u8F2A\u96A3\u9C57\u9E9F\u7460\u5841\u6D99\u7D2F\u985E\u4EE4\u4F36\u4F8B\u51B7\u52B1\u5DBA\u601C\u73B2\u793C\u82D3\u9234\u96B7\u96F6\u970A\u9E97\u9F62\u66A6\u6B74\u5217\u52A3\u70C8\u88C2\u5EC9\u604B\u6190\u6F23\u7149\u7C3E\u7DF4\u806F"], + ["9840", "\u84EE\u9023\u932C\u5442\u9B6F\u6AD3\u7089\u8CC2\u8DEF\u9732\u52B4\u5A41\u5ECA\u5F04\u6717\u697C\u6994\u6D6A\u6F0F\u7262\u72FC\u7BED\u8001\u807E\u874B\u90CE\u516D\u9E93\u7984\u808B\u9332\u8AD6\u502D\u548C\u8A71\u6B6A\u8CC4\u8107\u60D1\u67A0\u9DF2\u4E99\u4E98\u9C10\u8A6B\u85C1\u8568\u6900\u6E7E\u7897\u8155"], + ["989f", "\u5F0C\u4E10\u4E15\u4E2A\u4E31\u4E36\u4E3C\u4E3F\u4E42\u4E56\u4E58\u4E82\u4E85\u8C6B\u4E8A\u8212\u5F0D\u4E8E\u4E9E\u4E9F\u4EA0\u4EA2\u4EB0\u4EB3\u4EB6\u4ECE\u4ECD\u4EC4\u4EC6\u4EC2\u4ED7\u4EDE\u4EED\u4EDF\u4EF7\u4F09\u4F5A\u4F30\u4F5B\u4F5D\u4F57\u4F47\u4F76\u4F88\u4F8F\u4F98\u4F7B\u4F69\u4F70\u4F91\u4F6F\u4F86\u4F96\u5118\u4FD4\u4FDF\u4FCE\u4FD8\u4FDB\u4FD1\u4FDA\u4FD0\u4FE4\u4FE5\u501A\u5028\u5014\u502A\u5025\u5005\u4F1C\u4FF6\u5021\u5029\u502C\u4FFE\u4FEF\u5011\u5006\u5043\u5047\u6703\u5055\u5050\u5048\u505A\u5056\u506C\u5078\u5080\u509A\u5085\u50B4\u50B2"], + ["9940", "\u50C9\u50CA\u50B3\u50C2\u50D6\u50DE\u50E5\u50ED\u50E3\u50EE\u50F9\u50F5\u5109\u5101\u5102\u5116\u5115\u5114\u511A\u5121\u513A\u5137\u513C\u513B\u513F\u5140\u5152\u514C\u5154\u5162\u7AF8\u5169\u516A\u516E\u5180\u5182\u56D8\u518C\u5189\u518F\u5191\u5193\u5195\u5196\u51A4\u51A6\u51A2\u51A9\u51AA\u51AB\u51B3\u51B1\u51B2\u51B0\u51B5\u51BD\u51C5\u51C9\u51DB\u51E0\u8655\u51E9\u51ED"], + ["9980", "\u51F0\u51F5\u51FE\u5204\u520B\u5214\u520E\u5227\u522A\u522E\u5233\u5239\u524F\u5244\u524B\u524C\u525E\u5254\u526A\u5274\u5269\u5273\u527F\u527D\u528D\u5294\u5292\u5271\u5288\u5291\u8FA8\u8FA7\u52AC\u52AD\u52BC\u52B5\u52C1\u52CD\u52D7\u52DE\u52E3\u52E6\u98ED\u52E0\u52F3\u52F5\u52F8\u52F9\u5306\u5308\u7538\u530D\u5310\u530F\u5315\u531A\u5323\u532F\u5331\u5333\u5338\u5340\u5346\u5345\u4E17\u5349\u534D\u51D6\u535E\u5369\u536E\u5918\u537B\u5377\u5382\u5396\u53A0\u53A6\u53A5\u53AE\u53B0\u53B6\u53C3\u7C12\u96D9\u53DF\u66FC\u71EE\u53EE\u53E8\u53ED\u53FA\u5401\u543D\u5440\u542C\u542D\u543C\u542E\u5436\u5429\u541D\u544E\u548F\u5475\u548E\u545F\u5471\u5477\u5470\u5492\u547B\u5480\u5476\u5484\u5490\u5486\u54C7\u54A2\u54B8\u54A5\u54AC\u54C4\u54C8\u54A8"], + ["9a40", "\u54AB\u54C2\u54A4\u54BE\u54BC\u54D8\u54E5\u54E6\u550F\u5514\u54FD\u54EE\u54ED\u54FA\u54E2\u5539\u5540\u5563\u554C\u552E\u555C\u5545\u5556\u5557\u5538\u5533\u555D\u5599\u5580\u54AF\u558A\u559F\u557B\u557E\u5598\u559E\u55AE\u557C\u5583\u55A9\u5587\u55A8\u55DA\u55C5\u55DF\u55C4\u55DC\u55E4\u55D4\u5614\u55F7\u5616\u55FE\u55FD\u561B\u55F9\u564E\u5650\u71DF\u5634\u5636\u5632\u5638"], + ["9a80", "\u566B\u5664\u562F\u566C\u566A\u5686\u5680\u568A\u56A0\u5694\u568F\u56A5\u56AE\u56B6\u56B4\u56C2\u56BC\u56C1\u56C3\u56C0\u56C8\u56CE\u56D1\u56D3\u56D7\u56EE\u56F9\u5700\u56FF\u5704\u5709\u5708\u570B\u570D\u5713\u5718\u5716\u55C7\u571C\u5726\u5737\u5738\u574E\u573B\u5740\u574F\u5769\u57C0\u5788\u5761\u577F\u5789\u5793\u57A0\u57B3\u57A4\u57AA\u57B0\u57C3\u57C6\u57D4\u57D2\u57D3\u580A\u57D6\u57E3\u580B\u5819\u581D\u5872\u5821\u5862\u584B\u5870\u6BC0\u5852\u583D\u5879\u5885\u58B9\u589F\u58AB\u58BA\u58DE\u58BB\u58B8\u58AE\u58C5\u58D3\u58D1\u58D7\u58D9\u58D8\u58E5\u58DC\u58E4\u58DF\u58EF\u58FA\u58F9\u58FB\u58FC\u58FD\u5902\u590A\u5910\u591B\u68A6\u5925\u592C\u592D\u5932\u5938\u593E\u7AD2\u5955\u5950\u594E\u595A\u5958\u5962\u5960\u5967\u596C\u5969"], + ["9b40", "\u5978\u5981\u599D\u4F5E\u4FAB\u59A3\u59B2\u59C6\u59E8\u59DC\u598D\u59D9\u59DA\u5A25\u5A1F\u5A11\u5A1C\u5A09\u5A1A\u5A40\u5A6C\u5A49\u5A35\u5A36\u5A62\u5A6A\u5A9A\u5ABC\u5ABE\u5ACB\u5AC2\u5ABD\u5AE3\u5AD7\u5AE6\u5AE9\u5AD6\u5AFA\u5AFB\u5B0C\u5B0B\u5B16\u5B32\u5AD0\u5B2A\u5B36\u5B3E\u5B43\u5B45\u5B40\u5B51\u5B55\u5B5A\u5B5B\u5B65\u5B69\u5B70\u5B73\u5B75\u5B78\u6588\u5B7A\u5B80"], + ["9b80", "\u5B83\u5BA6\u5BB8\u5BC3\u5BC7\u5BC9\u5BD4\u5BD0\u5BE4\u5BE6\u5BE2\u5BDE\u5BE5\u5BEB\u5BF0\u5BF6\u5BF3\u5C05\u5C07\u5C08\u5C0D\u5C13\u5C20\u5C22\u5C28\u5C38\u5C39\u5C41\u5C46\u5C4E\u5C53\u5C50\u5C4F\u5B71\u5C6C\u5C6E\u4E62\u5C76\u5C79\u5C8C\u5C91\u5C94\u599B\u5CAB\u5CBB\u5CB6\u5CBC\u5CB7\u5CC5\u5CBE\u5CC7\u5CD9\u5CE9\u5CFD\u5CFA\u5CED\u5D8C\u5CEA\u5D0B\u5D15\u5D17\u5D5C\u5D1F\u5D1B\u5D11\u5D14\u5D22\u5D1A\u5D19\u5D18\u5D4C\u5D52\u5D4E\u5D4B\u5D6C\u5D73\u5D76\u5D87\u5D84\u5D82\u5DA2\u5D9D\u5DAC\u5DAE\u5DBD\u5D90\u5DB7\u5DBC\u5DC9\u5DCD\u5DD3\u5DD2\u5DD6\u5DDB\u5DEB\u5DF2\u5DF5\u5E0B\u5E1A\u5E19\u5E11\u5E1B\u5E36\u5E37\u5E44\u5E43\u5E40\u5E4E\u5E57\u5E54\u5E5F\u5E62\u5E64\u5E47\u5E75\u5E76\u5E7A\u9EBC\u5E7F\u5EA0\u5EC1\u5EC2\u5EC8\u5ED0\u5ECF"], + ["9c40", "\u5ED6\u5EE3\u5EDD\u5EDA\u5EDB\u5EE2\u5EE1\u5EE8\u5EE9\u5EEC\u5EF1\u5EF3\u5EF0\u5EF4\u5EF8\u5EFE\u5F03\u5F09\u5F5D\u5F5C\u5F0B\u5F11\u5F16\u5F29\u5F2D\u5F38\u5F41\u5F48\u5F4C\u5F4E\u5F2F\u5F51\u5F56\u5F57\u5F59\u5F61\u5F6D\u5F73\u5F77\u5F83\u5F82\u5F7F\u5F8A\u5F88\u5F91\u5F87\u5F9E\u5F99\u5F98\u5FA0\u5FA8\u5FAD\u5FBC\u5FD6\u5FFB\u5FE4\u5FF8\u5FF1\u5FDD\u60B3\u5FFF\u6021\u6060"], + ["9c80", "\u6019\u6010\u6029\u600E\u6031\u601B\u6015\u602B\u6026\u600F\u603A\u605A\u6041\u606A\u6077\u605F\u604A\u6046\u604D\u6063\u6043\u6064\u6042\u606C\u606B\u6059\u6081\u608D\u60E7\u6083\u609A\u6084\u609B\u6096\u6097\u6092\u60A7\u608B\u60E1\u60B8\u60E0\u60D3\u60B4\u5FF0\u60BD\u60C6\u60B5\u60D8\u614D\u6115\u6106\u60F6\u60F7\u6100\u60F4\u60FA\u6103\u6121\u60FB\u60F1\u610D\u610E\u6147\u613E\u6128\u6127\u614A\u613F\u613C\u612C\u6134\u613D\u6142\u6144\u6173\u6177\u6158\u6159\u615A\u616B\u6174\u616F\u6165\u6171\u615F\u615D\u6153\u6175\u6199\u6196\u6187\u61AC\u6194\u619A\u618A\u6191\u61AB\u61AE\u61CC\u61CA\u61C9\u61F7\u61C8\u61C3\u61C6\u61BA\u61CB\u7F79\u61CD\u61E6\u61E3\u61F6\u61FA\u61F4\u61FF\u61FD\u61FC\u61FE\u6200\u6208\u6209\u620D\u620C\u6214\u621B"], + ["9d40", "\u621E\u6221\u622A\u622E\u6230\u6232\u6233\u6241\u624E\u625E\u6263\u625B\u6260\u6268\u627C\u6282\u6289\u627E\u6292\u6293\u6296\u62D4\u6283\u6294\u62D7\u62D1\u62BB\u62CF\u62FF\u62C6\u64D4\u62C8\u62DC\u62CC\u62CA\u62C2\u62C7\u629B\u62C9\u630C\u62EE\u62F1\u6327\u6302\u6308\u62EF\u62F5\u6350\u633E\u634D\u641C\u634F\u6396\u638E\u6380\u63AB\u6376\u63A3\u638F\u6389\u639F\u63B5\u636B"], + ["9d80", "\u6369\u63BE\u63E9\u63C0\u63C6\u63E3\u63C9\u63D2\u63F6\u63C4\u6416\u6434\u6406\u6413\u6426\u6436\u651D\u6417\u6428\u640F\u6467\u646F\u6476\u644E\u652A\u6495\u6493\u64A5\u64A9\u6488\u64BC\u64DA\u64D2\u64C5\u64C7\u64BB\u64D8\u64C2\u64F1\u64E7\u8209\u64E0\u64E1\u62AC\u64E3\u64EF\u652C\u64F6\u64F4\u64F2\u64FA\u6500\u64FD\u6518\u651C\u6505\u6524\u6523\u652B\u6534\u6535\u6537\u6536\u6538\u754B\u6548\u6556\u6555\u654D\u6558\u655E\u655D\u6572\u6578\u6582\u6583\u8B8A\u659B\u659F\u65AB\u65B7\u65C3\u65C6\u65C1\u65C4\u65CC\u65D2\u65DB\u65D9\u65E0\u65E1\u65F1\u6772\u660A\u6603\u65FB\u6773\u6635\u6636\u6634\u661C\u664F\u6644\u6649\u6641\u665E\u665D\u6664\u6667\u6668\u665F\u6662\u6670\u6683\u6688\u668E\u6689\u6684\u6698\u669D\u66C1\u66B9\u66C9\u66BE\u66BC"], + ["9e40", "\u66C4\u66B8\u66D6\u66DA\u66E0\u663F\u66E6\u66E9\u66F0\u66F5\u66F7\u670F\u6716\u671E\u6726\u6727\u9738\u672E\u673F\u6736\u6741\u6738\u6737\u6746\u675E\u6760\u6759\u6763\u6764\u6789\u6770\u67A9\u677C\u676A\u678C\u678B\u67A6\u67A1\u6785\u67B7\u67EF\u67B4\u67EC\u67B3\u67E9\u67B8\u67E4\u67DE\u67DD\u67E2\u67EE\u67B9\u67CE\u67C6\u67E7\u6A9C\u681E\u6846\u6829\u6840\u684D\u6832\u684E"], + ["9e80", "\u68B3\u682B\u6859\u6863\u6877\u687F\u689F\u688F\u68AD\u6894\u689D\u689B\u6883\u6AAE\u68B9\u6874\u68B5\u68A0\u68BA\u690F\u688D\u687E\u6901\u68CA\u6908\u68D8\u6922\u6926\u68E1\u690C\u68CD\u68D4\u68E7\u68D5\u6936\u6912\u6904\u68D7\u68E3\u6925\u68F9\u68E0\u68EF\u6928\u692A\u691A\u6923\u6921\u68C6\u6979\u6977\u695C\u6978\u696B\u6954\u697E\u696E\u6939\u6974\u693D\u6959\u6930\u6961\u695E\u695D\u6981\u696A\u69B2\u69AE\u69D0\u69BF\u69C1\u69D3\u69BE\u69CE\u5BE8\u69CA\u69DD\u69BB\u69C3\u69A7\u6A2E\u6991\u69A0\u699C\u6995\u69B4\u69DE\u69E8\u6A02\u6A1B\u69FF\u6B0A\u69F9\u69F2\u69E7\u6A05\u69B1\u6A1E\u69ED\u6A14\u69EB\u6A0A\u6A12\u6AC1\u6A23\u6A13\u6A44\u6A0C\u6A72\u6A36\u6A78\u6A47\u6A62\u6A59\u6A66\u6A48\u6A38\u6A22\u6A90\u6A8D\u6AA0\u6A84\u6AA2\u6AA3"], + ["9f40", "\u6A97\u8617\u6ABB\u6AC3\u6AC2\u6AB8\u6AB3\u6AAC\u6ADE\u6AD1\u6ADF\u6AAA\u6ADA\u6AEA\u6AFB\u6B05\u8616\u6AFA\u6B12\u6B16\u9B31\u6B1F\u6B38\u6B37\u76DC\u6B39\u98EE\u6B47\u6B43\u6B49\u6B50\u6B59\u6B54\u6B5B\u6B5F\u6B61\u6B78\u6B79\u6B7F\u6B80\u6B84\u6B83\u6B8D\u6B98\u6B95\u6B9E\u6BA4\u6BAA\u6BAB\u6BAF\u6BB2\u6BB1\u6BB3\u6BB7\u6BBC\u6BC6\u6BCB\u6BD3\u6BDF\u6BEC\u6BEB\u6BF3\u6BEF"], + ["9f80", "\u9EBE\u6C08\u6C13\u6C14\u6C1B\u6C24\u6C23\u6C5E\u6C55\u6C62\u6C6A\u6C82\u6C8D\u6C9A\u6C81\u6C9B\u6C7E\u6C68\u6C73\u6C92\u6C90\u6CC4\u6CF1\u6CD3\u6CBD\u6CD7\u6CC5\u6CDD\u6CAE\u6CB1\u6CBE\u6CBA\u6CDB\u6CEF\u6CD9\u6CEA\u6D1F\u884D\u6D36\u6D2B\u6D3D\u6D38\u6D19\u6D35\u6D33\u6D12\u6D0C\u6D63\u6D93\u6D64\u6D5A\u6D79\u6D59\u6D8E\u6D95\u6FE4\u6D85\u6DF9\u6E15\u6E0A\u6DB5\u6DC7\u6DE6\u6DB8\u6DC6\u6DEC\u6DDE\u6DCC\u6DE8\u6DD2\u6DC5\u6DFA\u6DD9\u6DE4\u6DD5\u6DEA\u6DEE\u6E2D\u6E6E\u6E2E\u6E19\u6E72\u6E5F\u6E3E\u6E23\u6E6B\u6E2B\u6E76\u6E4D\u6E1F\u6E43\u6E3A\u6E4E\u6E24\u6EFF\u6E1D\u6E38\u6E82\u6EAA\u6E98\u6EC9\u6EB7\u6ED3\u6EBD\u6EAF\u6EC4\u6EB2\u6ED4\u6ED5\u6E8F\u6EA5\u6EC2\u6E9F\u6F41\u6F11\u704C\u6EEC\u6EF8\u6EFE\u6F3F\u6EF2\u6F31\u6EEF\u6F32\u6ECC"], + ["e040", "\u6F3E\u6F13\u6EF7\u6F86\u6F7A\u6F78\u6F81\u6F80\u6F6F\u6F5B\u6FF3\u6F6D\u6F82\u6F7C\u6F58\u6F8E\u6F91\u6FC2\u6F66\u6FB3\u6FA3\u6FA1\u6FA4\u6FB9\u6FC6\u6FAA\u6FDF\u6FD5\u6FEC\u6FD4\u6FD8\u6FF1\u6FEE\u6FDB\u7009\u700B\u6FFA\u7011\u7001\u700F\u6FFE\u701B\u701A\u6F74\u701D\u7018\u701F\u7030\u703E\u7032\u7051\u7063\u7099\u7092\u70AF\u70F1\u70AC\u70B8\u70B3\u70AE\u70DF\u70CB\u70DD"], + ["e080", "\u70D9\u7109\u70FD\u711C\u7119\u7165\u7155\u7188\u7166\u7162\u714C\u7156\u716C\u718F\u71FB\u7184\u7195\u71A8\u71AC\u71D7\u71B9\u71BE\u71D2\u71C9\u71D4\u71CE\u71E0\u71EC\u71E7\u71F5\u71FC\u71F9\u71FF\u720D\u7210\u721B\u7228\u722D\u722C\u7230\u7232\u723B\u723C\u723F\u7240\u7246\u724B\u7258\u7274\u727E\u7282\u7281\u7287\u7292\u7296\u72A2\u72A7\u72B9\u72B2\u72C3\u72C6\u72C4\u72CE\u72D2\u72E2\u72E0\u72E1\u72F9\u72F7\u500F\u7317\u730A\u731C\u7316\u731D\u7334\u732F\u7329\u7325\u733E\u734E\u734F\u9ED8\u7357\u736A\u7368\u7370\u7378\u7375\u737B\u737A\u73C8\u73B3\u73CE\u73BB\u73C0\u73E5\u73EE\u73DE\u74A2\u7405\u746F\u7425\u73F8\u7432\u743A\u7455\u743F\u745F\u7459\u7441\u745C\u7469\u7470\u7463\u746A\u7476\u747E\u748B\u749E\u74A7\u74CA\u74CF\u74D4\u73F1"], + ["e140", "\u74E0\u74E3\u74E7\u74E9\u74EE\u74F2\u74F0\u74F1\u74F8\u74F7\u7504\u7503\u7505\u750C\u750E\u750D\u7515\u7513\u751E\u7526\u752C\u753C\u7544\u754D\u754A\u7549\u755B\u7546\u755A\u7569\u7564\u7567\u756B\u756D\u7578\u7576\u7586\u7587\u7574\u758A\u7589\u7582\u7594\u759A\u759D\u75A5\u75A3\u75C2\u75B3\u75C3\u75B5\u75BD\u75B8\u75BC\u75B1\u75CD\u75CA\u75D2\u75D9\u75E3\u75DE\u75FE\u75FF"], + ["e180", "\u75FC\u7601\u75F0\u75FA\u75F2\u75F3\u760B\u760D\u7609\u761F\u7627\u7620\u7621\u7622\u7624\u7634\u7630\u763B\u7647\u7648\u7646\u765C\u7658\u7661\u7662\u7668\u7669\u766A\u7667\u766C\u7670\u7672\u7676\u7678\u767C\u7680\u7683\u7688\u768B\u768E\u7696\u7693\u7699\u769A\u76B0\u76B4\u76B8\u76B9\u76BA\u76C2\u76CD\u76D6\u76D2\u76DE\u76E1\u76E5\u76E7\u76EA\u862F\u76FB\u7708\u7707\u7704\u7729\u7724\u771E\u7725\u7726\u771B\u7737\u7738\u7747\u775A\u7768\u776B\u775B\u7765\u777F\u777E\u7779\u778E\u778B\u7791\u77A0\u779E\u77B0\u77B6\u77B9\u77BF\u77BC\u77BD\u77BB\u77C7\u77CD\u77D7\u77DA\u77DC\u77E3\u77EE\u77FC\u780C\u7812\u7926\u7820\u792A\u7845\u788E\u7874\u7886\u787C\u789A\u788C\u78A3\u78B5\u78AA\u78AF\u78D1\u78C6\u78CB\u78D4\u78BE\u78BC\u78C5\u78CA\u78EC"], + ["e240", "\u78E7\u78DA\u78FD\u78F4\u7907\u7912\u7911\u7919\u792C\u792B\u7940\u7960\u7957\u795F\u795A\u7955\u7953\u797A\u797F\u798A\u799D\u79A7\u9F4B\u79AA\u79AE\u79B3\u79B9\u79BA\u79C9\u79D5\u79E7\u79EC\u79E1\u79E3\u7A08\u7A0D\u7A18\u7A19\u7A20\u7A1F\u7980\u7A31\u7A3B\u7A3E\u7A37\u7A43\u7A57\u7A49\u7A61\u7A62\u7A69\u9F9D\u7A70\u7A79\u7A7D\u7A88\u7A97\u7A95\u7A98\u7A96\u7AA9\u7AC8\u7AB0"], + ["e280", "\u7AB6\u7AC5\u7AC4\u7ABF\u9083\u7AC7\u7ACA\u7ACD\u7ACF\u7AD5\u7AD3\u7AD9\u7ADA\u7ADD\u7AE1\u7AE2\u7AE6\u7AED\u7AF0\u7B02\u7B0F\u7B0A\u7B06\u7B33\u7B18\u7B19\u7B1E\u7B35\u7B28\u7B36\u7B50\u7B7A\u7B04\u7B4D\u7B0B\u7B4C\u7B45\u7B75\u7B65\u7B74\u7B67\u7B70\u7B71\u7B6C\u7B6E\u7B9D\u7B98\u7B9F\u7B8D\u7B9C\u7B9A\u7B8B\u7B92\u7B8F\u7B5D\u7B99\u7BCB\u7BC1\u7BCC\u7BCF\u7BB4\u7BC6\u7BDD\u7BE9\u7C11\u7C14\u7BE6\u7BE5\u7C60\u7C00\u7C07\u7C13\u7BF3\u7BF7\u7C17\u7C0D\u7BF6\u7C23\u7C27\u7C2A\u7C1F\u7C37\u7C2B\u7C3D\u7C4C\u7C43\u7C54\u7C4F\u7C40\u7C50\u7C58\u7C5F\u7C64\u7C56\u7C65\u7C6C\u7C75\u7C83\u7C90\u7CA4\u7CAD\u7CA2\u7CAB\u7CA1\u7CA8\u7CB3\u7CB2\u7CB1\u7CAE\u7CB9\u7CBD\u7CC0\u7CC5\u7CC2\u7CD8\u7CD2\u7CDC\u7CE2\u9B3B\u7CEF\u7CF2\u7CF4\u7CF6\u7CFA\u7D06"], + ["e340", "\u7D02\u7D1C\u7D15\u7D0A\u7D45\u7D4B\u7D2E\u7D32\u7D3F\u7D35\u7D46\u7D73\u7D56\u7D4E\u7D72\u7D68\u7D6E\u7D4F\u7D63\u7D93\u7D89\u7D5B\u7D8F\u7D7D\u7D9B\u7DBA\u7DAE\u7DA3\u7DB5\u7DC7\u7DBD\u7DAB\u7E3D\u7DA2\u7DAF\u7DDC\u7DB8\u7D9F\u7DB0\u7DD8\u7DDD\u7DE4\u7DDE\u7DFB\u7DF2\u7DE1\u7E05\u7E0A\u7E23\u7E21\u7E12\u7E31\u7E1F\u7E09\u7E0B\u7E22\u7E46\u7E66\u7E3B\u7E35\u7E39\u7E43\u7E37"], + ["e380", "\u7E32\u7E3A\u7E67\u7E5D\u7E56\u7E5E\u7E59\u7E5A\u7E79\u7E6A\u7E69\u7E7C\u7E7B\u7E83\u7DD5\u7E7D\u8FAE\u7E7F\u7E88\u7E89\u7E8C\u7E92\u7E90\u7E93\u7E94\u7E96\u7E8E\u7E9B\u7E9C\u7F38\u7F3A\u7F45\u7F4C\u7F4D\u7F4E\u7F50\u7F51\u7F55\u7F54\u7F58\u7F5F\u7F60\u7F68\u7F69\u7F67\u7F78\u7F82\u7F86\u7F83\u7F88\u7F87\u7F8C\u7F94\u7F9E\u7F9D\u7F9A\u7FA3\u7FAF\u7FB2\u7FB9\u7FAE\u7FB6\u7FB8\u8B71\u7FC5\u7FC6\u7FCA\u7FD5\u7FD4\u7FE1\u7FE6\u7FE9\u7FF3\u7FF9\u98DC\u8006\u8004\u800B\u8012\u8018\u8019\u801C\u8021\u8028\u803F\u803B\u804A\u8046\u8052\u8058\u805A\u805F\u8062\u8068\u8073\u8072\u8070\u8076\u8079\u807D\u807F\u8084\u8086\u8085\u809B\u8093\u809A\u80AD\u5190\u80AC\u80DB\u80E5\u80D9\u80DD\u80C4\u80DA\u80D6\u8109\u80EF\u80F1\u811B\u8129\u8123\u812F\u814B"], + ["e440", "\u968B\u8146\u813E\u8153\u8151\u80FC\u8171\u816E\u8165\u8166\u8174\u8183\u8188\u818A\u8180\u8182\u81A0\u8195\u81A4\u81A3\u815F\u8193\u81A9\u81B0\u81B5\u81BE\u81B8\u81BD\u81C0\u81C2\u81BA\u81C9\u81CD\u81D1\u81D9\u81D8\u81C8\u81DA\u81DF\u81E0\u81E7\u81FA\u81FB\u81FE\u8201\u8202\u8205\u8207\u820A\u820D\u8210\u8216\u8229\u822B\u8238\u8233\u8240\u8259\u8258\u825D\u825A\u825F\u8264"], + ["e480", "\u8262\u8268\u826A\u826B\u822E\u8271\u8277\u8278\u827E\u828D\u8292\u82AB\u829F\u82BB\u82AC\u82E1\u82E3\u82DF\u82D2\u82F4\u82F3\u82FA\u8393\u8303\u82FB\u82F9\u82DE\u8306\u82DC\u8309\u82D9\u8335\u8334\u8316\u8332\u8331\u8340\u8339\u8350\u8345\u832F\u832B\u8317\u8318\u8385\u839A\u83AA\u839F\u83A2\u8396\u8323\u838E\u8387\u838A\u837C\u83B5\u8373\u8375\u83A0\u8389\u83A8\u83F4\u8413\u83EB\u83CE\u83FD\u8403\u83D8\u840B\u83C1\u83F7\u8407\u83E0\u83F2\u840D\u8422\u8420\u83BD\u8438\u8506\u83FB\u846D\u842A\u843C\u855A\u8484\u8477\u846B\u84AD\u846E\u8482\u8469\u8446\u842C\u846F\u8479\u8435\u84CA\u8462\u84B9\u84BF\u849F\u84D9\u84CD\u84BB\u84DA\u84D0\u84C1\u84C6\u84D6\u84A1\u8521\u84FF\u84F4\u8517\u8518\u852C\u851F\u8515\u8514\u84FC\u8540\u8563\u8558\u8548"], + ["e540", "\u8541\u8602\u854B\u8555\u8580\u85A4\u8588\u8591\u858A\u85A8\u856D\u8594\u859B\u85EA\u8587\u859C\u8577\u857E\u8590\u85C9\u85BA\u85CF\u85B9\u85D0\u85D5\u85DD\u85E5\u85DC\u85F9\u860A\u8613\u860B\u85FE\u85FA\u8606\u8622\u861A\u8630\u863F\u864D\u4E55\u8654\u865F\u8667\u8671\u8693\u86A3\u86A9\u86AA\u868B\u868C\u86B6\u86AF\u86C4\u86C6\u86B0\u86C9\u8823\u86AB\u86D4\u86DE\u86E9\u86EC"], + ["e580", "\u86DF\u86DB\u86EF\u8712\u8706\u8708\u8700\u8703\u86FB\u8711\u8709\u870D\u86F9\u870A\u8734\u873F\u8737\u873B\u8725\u8729\u871A\u8760\u875F\u8778\u874C\u874E\u8774\u8757\u8768\u876E\u8759\u8753\u8763\u876A\u8805\u87A2\u879F\u8782\u87AF\u87CB\u87BD\u87C0\u87D0\u96D6\u87AB\u87C4\u87B3\u87C7\u87C6\u87BB\u87EF\u87F2\u87E0\u880F\u880D\u87FE\u87F6\u87F7\u880E\u87D2\u8811\u8816\u8815\u8822\u8821\u8831\u8836\u8839\u8827\u883B\u8844\u8842\u8852\u8859\u885E\u8862\u886B\u8881\u887E\u889E\u8875\u887D\u88B5\u8872\u8882\u8897\u8892\u88AE\u8899\u88A2\u888D\u88A4\u88B0\u88BF\u88B1\u88C3\u88C4\u88D4\u88D8\u88D9\u88DD\u88F9\u8902\u88FC\u88F4\u88E8\u88F2\u8904\u890C\u890A\u8913\u8943\u891E\u8925\u892A\u892B\u8941\u8944\u893B\u8936\u8938\u894C\u891D\u8960\u895E"], + ["e640", "\u8966\u8964\u896D\u896A\u896F\u8974\u8977\u897E\u8983\u8988\u898A\u8993\u8998\u89A1\u89A9\u89A6\u89AC\u89AF\u89B2\u89BA\u89BD\u89BF\u89C0\u89DA\u89DC\u89DD\u89E7\u89F4\u89F8\u8A03\u8A16\u8A10\u8A0C\u8A1B\u8A1D\u8A25\u8A36\u8A41\u8A5B\u8A52\u8A46\u8A48\u8A7C\u8A6D\u8A6C\u8A62\u8A85\u8A82\u8A84\u8AA8\u8AA1\u8A91\u8AA5\u8AA6\u8A9A\u8AA3\u8AC4\u8ACD\u8AC2\u8ADA\u8AEB\u8AF3\u8AE7"], + ["e680", "\u8AE4\u8AF1\u8B14\u8AE0\u8AE2\u8AF7\u8ADE\u8ADB\u8B0C\u8B07\u8B1A\u8AE1\u8B16\u8B10\u8B17\u8B20\u8B33\u97AB\u8B26\u8B2B\u8B3E\u8B28\u8B41\u8B4C\u8B4F\u8B4E\u8B49\u8B56\u8B5B\u8B5A\u8B6B\u8B5F\u8B6C\u8B6F\u8B74\u8B7D\u8B80\u8B8C\u8B8E\u8B92\u8B93\u8B96\u8B99\u8B9A\u8C3A\u8C41\u8C3F\u8C48\u8C4C\u8C4E\u8C50\u8C55\u8C62\u8C6C\u8C78\u8C7A\u8C82\u8C89\u8C85\u8C8A\u8C8D\u8C8E\u8C94\u8C7C\u8C98\u621D\u8CAD\u8CAA\u8CBD\u8CB2\u8CB3\u8CAE\u8CB6\u8CC8\u8CC1\u8CE4\u8CE3\u8CDA\u8CFD\u8CFA\u8CFB\u8D04\u8D05\u8D0A\u8D07\u8D0F\u8D0D\u8D10\u9F4E\u8D13\u8CCD\u8D14\u8D16\u8D67\u8D6D\u8D71\u8D73\u8D81\u8D99\u8DC2\u8DBE\u8DBA\u8DCF\u8DDA\u8DD6\u8DCC\u8DDB\u8DCB\u8DEA\u8DEB\u8DDF\u8DE3\u8DFC\u8E08\u8E09\u8DFF\u8E1D\u8E1E\u8E10\u8E1F\u8E42\u8E35\u8E30\u8E34\u8E4A"], + ["e740", "\u8E47\u8E49\u8E4C\u8E50\u8E48\u8E59\u8E64\u8E60\u8E2A\u8E63\u8E55\u8E76\u8E72\u8E7C\u8E81\u8E87\u8E85\u8E84\u8E8B\u8E8A\u8E93\u8E91\u8E94\u8E99\u8EAA\u8EA1\u8EAC\u8EB0\u8EC6\u8EB1\u8EBE\u8EC5\u8EC8\u8ECB\u8EDB\u8EE3\u8EFC\u8EFB\u8EEB\u8EFE\u8F0A\u8F05\u8F15\u8F12\u8F19\u8F13\u8F1C\u8F1F\u8F1B\u8F0C\u8F26\u8F33\u8F3B\u8F39\u8F45\u8F42\u8F3E\u8F4C\u8F49\u8F46\u8F4E\u8F57\u8F5C"], + ["e780", "\u8F62\u8F63\u8F64\u8F9C\u8F9F\u8FA3\u8FAD\u8FAF\u8FB7\u8FDA\u8FE5\u8FE2\u8FEA\u8FEF\u9087\u8FF4\u9005\u8FF9\u8FFA\u9011\u9015\u9021\u900D\u901E\u9016\u900B\u9027\u9036\u9035\u9039\u8FF8\u904F\u9050\u9051\u9052\u900E\u9049\u903E\u9056\u9058\u905E\u9068\u906F\u9076\u96A8\u9072\u9082\u907D\u9081\u9080\u908A\u9089\u908F\u90A8\u90AF\u90B1\u90B5\u90E2\u90E4\u6248\u90DB\u9102\u9112\u9119\u9132\u9130\u914A\u9156\u9158\u9163\u9165\u9169\u9173\u9172\u918B\u9189\u9182\u91A2\u91AB\u91AF\u91AA\u91B5\u91B4\u91BA\u91C0\u91C1\u91C9\u91CB\u91D0\u91D6\u91DF\u91E1\u91DB\u91FC\u91F5\u91F6\u921E\u91FF\u9214\u922C\u9215\u9211\u925E\u9257\u9245\u9249\u9264\u9248\u9295\u923F\u924B\u9250\u929C\u9296\u9293\u929B\u925A\u92CF\u92B9\u92B7\u92E9\u930F\u92FA\u9344\u932E"], + ["e840", "\u9319\u9322\u931A\u9323\u933A\u9335\u933B\u935C\u9360\u937C\u936E\u9356\u93B0\u93AC\u93AD\u9394\u93B9\u93D6\u93D7\u93E8\u93E5\u93D8\u93C3\u93DD\u93D0\u93C8\u93E4\u941A\u9414\u9413\u9403\u9407\u9410\u9436\u942B\u9435\u9421\u943A\u9441\u9452\u9444\u945B\u9460\u9462\u945E\u946A\u9229\u9470\u9475\u9477\u947D\u945A\u947C\u947E\u9481\u947F\u9582\u9587\u958A\u9594\u9596\u9598\u9599"], + ["e880", "\u95A0\u95A8\u95A7\u95AD\u95BC\u95BB\u95B9\u95BE\u95CA\u6FF6\u95C3\u95CD\u95CC\u95D5\u95D4\u95D6\u95DC\u95E1\u95E5\u95E2\u9621\u9628\u962E\u962F\u9642\u964C\u964F\u964B\u9677\u965C\u965E\u965D\u965F\u9666\u9672\u966C\u968D\u9698\u9695\u9697\u96AA\u96A7\u96B1\u96B2\u96B0\u96B4\u96B6\u96B8\u96B9\u96CE\u96CB\u96C9\u96CD\u894D\u96DC\u970D\u96D5\u96F9\u9704\u9706\u9708\u9713\u970E\u9711\u970F\u9716\u9719\u9724\u972A\u9730\u9739\u973D\u973E\u9744\u9746\u9748\u9742\u9749\u975C\u9760\u9764\u9766\u9768\u52D2\u976B\u9771\u9779\u9785\u977C\u9781\u977A\u9786\u978B\u978F\u9790\u979C\u97A8\u97A6\u97A3\u97B3\u97B4\u97C3\u97C6\u97C8\u97CB\u97DC\u97ED\u9F4F\u97F2\u7ADF\u97F6\u97F5\u980F\u980C\u9838\u9824\u9821\u9837\u983D\u9846\u984F\u984B\u986B\u986F\u9870"], + ["e940", "\u9871\u9874\u9873\u98AA\u98AF\u98B1\u98B6\u98C4\u98C3\u98C6\u98E9\u98EB\u9903\u9909\u9912\u9914\u9918\u9921\u991D\u991E\u9924\u9920\u992C\u992E\u993D\u993E\u9942\u9949\u9945\u9950\u994B\u9951\u9952\u994C\u9955\u9997\u9998\u99A5\u99AD\u99AE\u99BC\u99DF\u99DB\u99DD\u99D8\u99D1\u99ED\u99EE\u99F1\u99F2\u99FB\u99F8\u9A01\u9A0F\u9A05\u99E2\u9A19\u9A2B\u9A37\u9A45\u9A42\u9A40\u9A43"], + ["e980", "\u9A3E\u9A55\u9A4D\u9A5B\u9A57\u9A5F\u9A62\u9A65\u9A64\u9A69\u9A6B\u9A6A\u9AAD\u9AB0\u9ABC\u9AC0\u9ACF\u9AD1\u9AD3\u9AD4\u9ADE\u9ADF\u9AE2\u9AE3\u9AE6\u9AEF\u9AEB\u9AEE\u9AF4\u9AF1\u9AF7\u9AFB\u9B06\u9B18\u9B1A\u9B1F\u9B22\u9B23\u9B25\u9B27\u9B28\u9B29\u9B2A\u9B2E\u9B2F\u9B32\u9B44\u9B43\u9B4F\u9B4D\u9B4E\u9B51\u9B58\u9B74\u9B93\u9B83\u9B91\u9B96\u9B97\u9B9F\u9BA0\u9BA8\u9BB4\u9BC0\u9BCA\u9BB9\u9BC6\u9BCF\u9BD1\u9BD2\u9BE3\u9BE2\u9BE4\u9BD4\u9BE1\u9C3A\u9BF2\u9BF1\u9BF0\u9C15\u9C14\u9C09\u9C13\u9C0C\u9C06\u9C08\u9C12\u9C0A\u9C04\u9C2E\u9C1B\u9C25\u9C24\u9C21\u9C30\u9C47\u9C32\u9C46\u9C3E\u9C5A\u9C60\u9C67\u9C76\u9C78\u9CE7\u9CEC\u9CF0\u9D09\u9D08\u9CEB\u9D03\u9D06\u9D2A\u9D26\u9DAF\u9D23\u9D1F\u9D44\u9D15\u9D12\u9D41\u9D3F\u9D3E\u9D46\u9D48"], + ["ea40", "\u9D5D\u9D5E\u9D64\u9D51\u9D50\u9D59\u9D72\u9D89\u9D87\u9DAB\u9D6F\u9D7A\u9D9A\u9DA4\u9DA9\u9DB2\u9DC4\u9DC1\u9DBB\u9DB8\u9DBA\u9DC6\u9DCF\u9DC2\u9DD9\u9DD3\u9DF8\u9DE6\u9DED\u9DEF\u9DFD\u9E1A\u9E1B\u9E1E\u9E75\u9E79\u9E7D\u9E81\u9E88\u9E8B\u9E8C\u9E92\u9E95\u9E91\u9E9D\u9EA5\u9EA9\u9EB8\u9EAA\u9EAD\u9761\u9ECC\u9ECE\u9ECF\u9ED0\u9ED4\u9EDC\u9EDE\u9EDD\u9EE0\u9EE5\u9EE8\u9EEF"], + ["ea80", "\u9EF4\u9EF6\u9EF7\u9EF9\u9EFB\u9EFC\u9EFD\u9F07\u9F08\u76B7\u9F15\u9F21\u9F2C\u9F3E\u9F4A\u9F52\u9F54\u9F63\u9F5F\u9F60\u9F61\u9F66\u9F67\u9F6C\u9F6A\u9F77\u9F72\u9F76\u9F95\u9F9C\u9FA0\u582F\u69C7\u9059\u7464\u51DC\u7199"], + ["ed40", "\u7E8A\u891C\u9348\u9288\u84DC\u4FC9\u70BB\u6631\u68C8\u92F9\u66FB\u5F45\u4E28\u4EE1\u4EFC\u4F00\u4F03\u4F39\u4F56\u4F92\u4F8A\u4F9A\u4F94\u4FCD\u5040\u5022\u4FFF\u501E\u5046\u5070\u5042\u5094\u50F4\u50D8\u514A\u5164\u519D\u51BE\u51EC\u5215\u529C\u52A6\u52C0\u52DB\u5300\u5307\u5324\u5372\u5393\u53B2\u53DD\uFA0E\u549C\u548A\u54A9\u54FF\u5586\u5759\u5765\u57AC\u57C8\u57C7\uFA0F"], + ["ed80", "\uFA10\u589E\u58B2\u590B\u5953\u595B\u595D\u5963\u59A4\u59BA\u5B56\u5BC0\u752F\u5BD8\u5BEC\u5C1E\u5CA6\u5CBA\u5CF5\u5D27\u5D53\uFA11\u5D42\u5D6D\u5DB8\u5DB9\u5DD0\u5F21\u5F34\u5F67\u5FB7\u5FDE\u605D\u6085\u608A\u60DE\u60D5\u6120\u60F2\u6111\u6137\u6130\u6198\u6213\u62A6\u63F5\u6460\u649D\u64CE\u654E\u6600\u6615\u663B\u6609\u662E\u661E\u6624\u6665\u6657\u6659\uFA12\u6673\u6699\u66A0\u66B2\u66BF\u66FA\u670E\uF929\u6766\u67BB\u6852\u67C0\u6801\u6844\u68CF\uFA13\u6968\uFA14\u6998\u69E2\u6A30\u6A6B\u6A46\u6A73\u6A7E\u6AE2\u6AE4\u6BD6\u6C3F\u6C5C\u6C86\u6C6F\u6CDA\u6D04\u6D87\u6D6F\u6D96\u6DAC\u6DCF\u6DF8\u6DF2\u6DFC\u6E39\u6E5C\u6E27\u6E3C\u6EBF\u6F88\u6FB5\u6FF5\u7005\u7007\u7028\u7085\u70AB\u710F\u7104\u715C\u7146\u7147\uFA15\u71C1\u71FE\u72B1"], + ["ee40", "\u72BE\u7324\uFA16\u7377\u73BD\u73C9\u73D6\u73E3\u73D2\u7407\u73F5\u7426\u742A\u7429\u742E\u7462\u7489\u749F\u7501\u756F\u7682\u769C\u769E\u769B\u76A6\uFA17\u7746\u52AF\u7821\u784E\u7864\u787A\u7930\uFA18\uFA19\uFA1A\u7994\uFA1B\u799B\u7AD1\u7AE7\uFA1C\u7AEB\u7B9E\uFA1D\u7D48\u7D5C\u7DB7\u7DA0\u7DD6\u7E52\u7F47\u7FA1\uFA1E\u8301\u8362\u837F\u83C7\u83F6\u8448\u84B4\u8553\u8559"], + ["ee80", "\u856B\uFA1F\u85B0\uFA20\uFA21\u8807\u88F5\u8A12\u8A37\u8A79\u8AA7\u8ABE\u8ADF\uFA22\u8AF6\u8B53\u8B7F\u8CF0\u8CF4\u8D12\u8D76\uFA23\u8ECF\uFA24\uFA25\u9067\u90DE\uFA26\u9115\u9127\u91DA\u91D7\u91DE\u91ED\u91EE\u91E4\u91E5\u9206\u9210\u920A\u923A\u9240\u923C\u924E\u9259\u9251\u9239\u9267\u92A7\u9277\u9278\u92E7\u92D7\u92D9\u92D0\uFA27\u92D5\u92E0\u92D3\u9325\u9321\u92FB\uFA28\u931E\u92FF\u931D\u9302\u9370\u9357\u93A4\u93C6\u93DE\u93F8\u9431\u9445\u9448\u9592\uF9DC\uFA29\u969D\u96AF\u9733\u973B\u9743\u974D\u974F\u9751\u9755\u9857\u9865\uFA2A\uFA2B\u9927\uFA2C\u999E\u9A4E\u9AD9\u9ADC\u9B75\u9B72\u9B8F\u9BB1\u9BBB\u9C00\u9D70\u9D6B\uFA2D\u9E19\u9ED1"], + ["eeef", "\u2170", 9, "\uFFE2\uFFE4\uFF07\uFF02"], + ["f040", "\uE000", 62], + ["f080", "\uE03F", 124], + ["f140", "\uE0BC", 62], + ["f180", "\uE0FB", 124], + ["f240", "\uE178", 62], + ["f280", "\uE1B7", 124], + ["f340", "\uE234", 62], + ["f380", "\uE273", 124], + ["f440", "\uE2F0", 62], + ["f480", "\uE32F", 124], + ["f540", "\uE3AC", 62], + ["f580", "\uE3EB", 124], + ["f640", "\uE468", 62], + ["f680", "\uE4A7", 124], + ["f740", "\uE524", 62], + ["f780", "\uE563", 124], + ["f840", "\uE5E0", 62], + ["f880", "\uE61F", 124], + ["f940", "\uE69C"], + ["fa40", "\u2170", 9, "\u2160", 9, "\uFFE2\uFFE4\uFF07\uFF02\u3231\u2116\u2121\u2235\u7E8A\u891C\u9348\u9288\u84DC\u4FC9\u70BB\u6631\u68C8\u92F9\u66FB\u5F45\u4E28\u4EE1\u4EFC\u4F00\u4F03\u4F39\u4F56\u4F92\u4F8A\u4F9A\u4F94\u4FCD\u5040\u5022\u4FFF\u501E\u5046\u5070\u5042\u5094\u50F4\u50D8\u514A"], + ["fa80", "\u5164\u519D\u51BE\u51EC\u5215\u529C\u52A6\u52C0\u52DB\u5300\u5307\u5324\u5372\u5393\u53B2\u53DD\uFA0E\u549C\u548A\u54A9\u54FF\u5586\u5759\u5765\u57AC\u57C8\u57C7\uFA0F\uFA10\u589E\u58B2\u590B\u5953\u595B\u595D\u5963\u59A4\u59BA\u5B56\u5BC0\u752F\u5BD8\u5BEC\u5C1E\u5CA6\u5CBA\u5CF5\u5D27\u5D53\uFA11\u5D42\u5D6D\u5DB8\u5DB9\u5DD0\u5F21\u5F34\u5F67\u5FB7\u5FDE\u605D\u6085\u608A\u60DE\u60D5\u6120\u60F2\u6111\u6137\u6130\u6198\u6213\u62A6\u63F5\u6460\u649D\u64CE\u654E\u6600\u6615\u663B\u6609\u662E\u661E\u6624\u6665\u6657\u6659\uFA12\u6673\u6699\u66A0\u66B2\u66BF\u66FA\u670E\uF929\u6766\u67BB\u6852\u67C0\u6801\u6844\u68CF\uFA13\u6968\uFA14\u6998\u69E2\u6A30\u6A6B\u6A46\u6A73\u6A7E\u6AE2\u6AE4\u6BD6\u6C3F\u6C5C\u6C86\u6C6F\u6CDA\u6D04\u6D87\u6D6F"], + ["fb40", "\u6D96\u6DAC\u6DCF\u6DF8\u6DF2\u6DFC\u6E39\u6E5C\u6E27\u6E3C\u6EBF\u6F88\u6FB5\u6FF5\u7005\u7007\u7028\u7085\u70AB\u710F\u7104\u715C\u7146\u7147\uFA15\u71C1\u71FE\u72B1\u72BE\u7324\uFA16\u7377\u73BD\u73C9\u73D6\u73E3\u73D2\u7407\u73F5\u7426\u742A\u7429\u742E\u7462\u7489\u749F\u7501\u756F\u7682\u769C\u769E\u769B\u76A6\uFA17\u7746\u52AF\u7821\u784E\u7864\u787A\u7930\uFA18\uFA19"], + ["fb80", "\uFA1A\u7994\uFA1B\u799B\u7AD1\u7AE7\uFA1C\u7AEB\u7B9E\uFA1D\u7D48\u7D5C\u7DB7\u7DA0\u7DD6\u7E52\u7F47\u7FA1\uFA1E\u8301\u8362\u837F\u83C7\u83F6\u8448\u84B4\u8553\u8559\u856B\uFA1F\u85B0\uFA20\uFA21\u8807\u88F5\u8A12\u8A37\u8A79\u8AA7\u8ABE\u8ADF\uFA22\u8AF6\u8B53\u8B7F\u8CF0\u8CF4\u8D12\u8D76\uFA23\u8ECF\uFA24\uFA25\u9067\u90DE\uFA26\u9115\u9127\u91DA\u91D7\u91DE\u91ED\u91EE\u91E4\u91E5\u9206\u9210\u920A\u923A\u9240\u923C\u924E\u9259\u9251\u9239\u9267\u92A7\u9277\u9278\u92E7\u92D7\u92D9\u92D0\uFA27\u92D5\u92E0\u92D3\u9325\u9321\u92FB\uFA28\u931E\u92FF\u931D\u9302\u9370\u9357\u93A4\u93C6\u93DE\u93F8\u9431\u9445\u9448\u9592\uF9DC\uFA29\u969D\u96AF\u9733\u973B\u9743\u974D\u974F\u9751\u9755\u9857\u9865\uFA2A\uFA2B\u9927\uFA2C\u999E\u9A4E\u9AD9"], + ["fc40", "\u9ADC\u9B75\u9B72\u9B8F\u9BB1\u9BBB\u9C00\u9D70\u9D6B\uFA2D\u9E19\u9ED1"] + ]; + } +}); + +// ../../node_modules/iconv-lite/encodings/tables/eucjp.json +var require_eucjp = __commonJS({ + "../../node_modules/iconv-lite/encodings/tables/eucjp.json"(exports2, module2) { + module2.exports = [ + ["0", "\0", 127], + ["8ea1", "\uFF61", 62], + ["a1a1", "\u3000\u3001\u3002\uFF0C\uFF0E\u30FB\uFF1A\uFF1B\uFF1F\uFF01\u309B\u309C\xB4\uFF40\xA8\uFF3E\uFFE3\uFF3F\u30FD\u30FE\u309D\u309E\u3003\u4EDD\u3005\u3006\u3007\u30FC\u2015\u2010\uFF0F\uFF3C\uFF5E\u2225\uFF5C\u2026\u2025\u2018\u2019\u201C\u201D\uFF08\uFF09\u3014\u3015\uFF3B\uFF3D\uFF5B\uFF5D\u3008", 9, "\uFF0B\uFF0D\xB1\xD7\xF7\uFF1D\u2260\uFF1C\uFF1E\u2266\u2267\u221E\u2234\u2642\u2640\xB0\u2032\u2033\u2103\uFFE5\uFF04\uFFE0\uFFE1\uFF05\uFF03\uFF06\uFF0A\uFF20\xA7\u2606\u2605\u25CB\u25CF\u25CE\u25C7"], + ["a2a1", "\u25C6\u25A1\u25A0\u25B3\u25B2\u25BD\u25BC\u203B\u3012\u2192\u2190\u2191\u2193\u3013"], + ["a2ba", "\u2208\u220B\u2286\u2287\u2282\u2283\u222A\u2229"], + ["a2ca", "\u2227\u2228\uFFE2\u21D2\u21D4\u2200\u2203"], + ["a2dc", "\u2220\u22A5\u2312\u2202\u2207\u2261\u2252\u226A\u226B\u221A\u223D\u221D\u2235\u222B\u222C"], + ["a2f2", "\u212B\u2030\u266F\u266D\u266A\u2020\u2021\xB6"], + ["a2fe", "\u25EF"], + ["a3b0", "\uFF10", 9], + ["a3c1", "\uFF21", 25], + ["a3e1", "\uFF41", 25], + ["a4a1", "\u3041", 82], + ["a5a1", "\u30A1", 85], + ["a6a1", "\u0391", 16, "\u03A3", 6], + ["a6c1", "\u03B1", 16, "\u03C3", 6], + ["a7a1", "\u0410", 5, "\u0401\u0416", 25], + ["a7d1", "\u0430", 5, "\u0451\u0436", 25], + ["a8a1", "\u2500\u2502\u250C\u2510\u2518\u2514\u251C\u252C\u2524\u2534\u253C\u2501\u2503\u250F\u2513\u251B\u2517\u2523\u2533\u252B\u253B\u254B\u2520\u252F\u2528\u2537\u253F\u251D\u2530\u2525\u2538\u2542"], + ["ada1", "\u2460", 19, "\u2160", 9], + ["adc0", "\u3349\u3314\u3322\u334D\u3318\u3327\u3303\u3336\u3351\u3357\u330D\u3326\u3323\u332B\u334A\u333B\u339C\u339D\u339E\u338E\u338F\u33C4\u33A1"], + ["addf", "\u337B\u301D\u301F\u2116\u33CD\u2121\u32A4", 4, "\u3231\u3232\u3239\u337E\u337D\u337C\u2252\u2261\u222B\u222E\u2211\u221A\u22A5\u2220\u221F\u22BF\u2235\u2229\u222A"], + ["b0a1", "\u4E9C\u5516\u5A03\u963F\u54C0\u611B\u6328\u59F6\u9022\u8475\u831C\u7A50\u60AA\u63E1\u6E25\u65ED\u8466\u82A6\u9BF5\u6893\u5727\u65A1\u6271\u5B9B\u59D0\u867B\u98F4\u7D62\u7DBE\u9B8E\u6216\u7C9F\u88B7\u5B89\u5EB5\u6309\u6697\u6848\u95C7\u978D\u674F\u4EE5\u4F0A\u4F4D\u4F9D\u5049\u56F2\u5937\u59D4\u5A01\u5C09\u60DF\u610F\u6170\u6613\u6905\u70BA\u754F\u7570\u79FB\u7DAD\u7DEF\u80C3\u840E\u8863\u8B02\u9055\u907A\u533B\u4E95\u4EA5\u57DF\u80B2\u90C1\u78EF\u4E00\u58F1\u6EA2\u9038\u7A32\u8328\u828B\u9C2F\u5141\u5370\u54BD\u54E1\u56E0\u59FB\u5F15\u98F2\u6DEB\u80E4\u852D"], + ["b1a1", "\u9662\u9670\u96A0\u97FB\u540B\u53F3\u5B87\u70CF\u7FBD\u8FC2\u96E8\u536F\u9D5C\u7ABA\u4E11\u7893\u81FC\u6E26\u5618\u5504\u6B1D\u851A\u9C3B\u59E5\u53A9\u6D66\u74DC\u958F\u5642\u4E91\u904B\u96F2\u834F\u990C\u53E1\u55B6\u5B30\u5F71\u6620\u66F3\u6804\u6C38\u6CF3\u6D29\u745B\u76C8\u7A4E\u9834\u82F1\u885B\u8A60\u92ED\u6DB2\u75AB\u76CA\u99C5\u60A6\u8B01\u8D8A\u95B2\u698E\u53AD\u5186\u5712\u5830\u5944\u5BB4\u5EF6\u6028\u63A9\u63F4\u6CBF\u6F14\u708E\u7114\u7159\u71D5\u733F\u7E01\u8276\u82D1\u8597\u9060\u925B\u9D1B\u5869\u65BC\u6C5A\u7525\u51F9\u592E\u5965\u5F80\u5FDC"], + ["b2a1", "\u62BC\u65FA\u6A2A\u6B27\u6BB4\u738B\u7FC1\u8956\u9D2C\u9D0E\u9EC4\u5CA1\u6C96\u837B\u5104\u5C4B\u61B6\u81C6\u6876\u7261\u4E59\u4FFA\u5378\u6069\u6E29\u7A4F\u97F3\u4E0B\u5316\u4EEE\u4F55\u4F3D\u4FA1\u4F73\u52A0\u53EF\u5609\u590F\u5AC1\u5BB6\u5BE1\u79D1\u6687\u679C\u67B6\u6B4C\u6CB3\u706B\u73C2\u798D\u79BE\u7A3C\u7B87\u82B1\u82DB\u8304\u8377\u83EF\u83D3\u8766\u8AB2\u5629\u8CA8\u8FE6\u904E\u971E\u868A\u4FC4\u5CE8\u6211\u7259\u753B\u81E5\u82BD\u86FE\u8CC0\u96C5\u9913\u99D5\u4ECB\u4F1A\u89E3\u56DE\u584A\u58CA\u5EFB\u5FEB\u602A\u6094\u6062\u61D0\u6212\u62D0\u6539"], + ["b3a1", "\u9B41\u6666\u68B0\u6D77\u7070\u754C\u7686\u7D75\u82A5\u87F9\u958B\u968E\u8C9D\u51F1\u52BE\u5916\u54B3\u5BB3\u5D16\u6168\u6982\u6DAF\u788D\u84CB\u8857\u8A72\u93A7\u9AB8\u6D6C\u99A8\u86D9\u57A3\u67FF\u86CE\u920E\u5283\u5687\u5404\u5ED3\u62E1\u64B9\u683C\u6838\u6BBB\u7372\u78BA\u7A6B\u899A\u89D2\u8D6B\u8F03\u90ED\u95A3\u9694\u9769\u5B66\u5CB3\u697D\u984D\u984E\u639B\u7B20\u6A2B\u6A7F\u68B6\u9C0D\u6F5F\u5272\u559D\u6070\u62EC\u6D3B\u6E07\u6ED1\u845B\u8910\u8F44\u4E14\u9C39\u53F6\u691B\u6A3A\u9784\u682A\u515C\u7AC3\u84B2\u91DC\u938C\u565B\u9D28\u6822\u8305\u8431"], + ["b4a1", "\u7CA5\u5208\u82C5\u74E6\u4E7E\u4F83\u51A0\u5BD2\u520A\u52D8\u52E7\u5DFB\u559A\u582A\u59E6\u5B8C\u5B98\u5BDB\u5E72\u5E79\u60A3\u611F\u6163\u61BE\u63DB\u6562\u67D1\u6853\u68FA\u6B3E\u6B53\u6C57\u6F22\u6F97\u6F45\u74B0\u7518\u76E3\u770B\u7AFF\u7BA1\u7C21\u7DE9\u7F36\u7FF0\u809D\u8266\u839E\u89B3\u8ACC\u8CAB\u9084\u9451\u9593\u9591\u95A2\u9665\u97D3\u9928\u8218\u4E38\u542B\u5CB8\u5DCC\u73A9\u764C\u773C\u5CA9\u7FEB\u8D0B\u96C1\u9811\u9854\u9858\u4F01\u4F0E\u5371\u559C\u5668\u57FA\u5947\u5B09\u5BC4\u5C90\u5E0C\u5E7E\u5FCC\u63EE\u673A\u65D7\u65E2\u671F\u68CB\u68C4"], + ["b5a1", "\u6A5F\u5E30\u6BC5\u6C17\u6C7D\u757F\u7948\u5B63\u7A00\u7D00\u5FBD\u898F\u8A18\u8CB4\u8D77\u8ECC\u8F1D\u98E2\u9A0E\u9B3C\u4E80\u507D\u5100\u5993\u5B9C\u622F\u6280\u64EC\u6B3A\u72A0\u7591\u7947\u7FA9\u87FB\u8ABC\u8B70\u63AC\u83CA\u97A0\u5409\u5403\u55AB\u6854\u6A58\u8A70\u7827\u6775\u9ECD\u5374\u5BA2\u811A\u8650\u9006\u4E18\u4E45\u4EC7\u4F11\u53CA\u5438\u5BAE\u5F13\u6025\u6551\u673D\u6C42\u6C72\u6CE3\u7078\u7403\u7A76\u7AAE\u7B08\u7D1A\u7CFE\u7D66\u65E7\u725B\u53BB\u5C45\u5DE8\u62D2\u62E0\u6319\u6E20\u865A\u8A31\u8DDD\u92F8\u6F01\u79A6\u9B5A\u4EA8\u4EAB\u4EAC"], + ["b6a1", "\u4F9B\u4FA0\u50D1\u5147\u7AF6\u5171\u51F6\u5354\u5321\u537F\u53EB\u55AC\u5883\u5CE1\u5F37\u5F4A\u602F\u6050\u606D\u631F\u6559\u6A4B\u6CC1\u72C2\u72ED\u77EF\u80F8\u8105\u8208\u854E\u90F7\u93E1\u97FF\u9957\u9A5A\u4EF0\u51DD\u5C2D\u6681\u696D\u5C40\u66F2\u6975\u7389\u6850\u7C81\u50C5\u52E4\u5747\u5DFE\u9326\u65A4\u6B23\u6B3D\u7434\u7981\u79BD\u7B4B\u7DCA\u82B9\u83CC\u887F\u895F\u8B39\u8FD1\u91D1\u541F\u9280\u4E5D\u5036\u53E5\u533A\u72D7\u7396\u77E9\u82E6\u8EAF\u99C6\u99C8\u99D2\u5177\u611A\u865E\u55B0\u7A7A\u5076\u5BD3\u9047\u9685\u4E32\u6ADB\u91E7\u5C51\u5C48"], + ["b7a1", "\u6398\u7A9F\u6C93\u9774\u8F61\u7AAA\u718A\u9688\u7C82\u6817\u7E70\u6851\u936C\u52F2\u541B\u85AB\u8A13\u7FA4\u8ECD\u90E1\u5366\u8888\u7941\u4FC2\u50BE\u5211\u5144\u5553\u572D\u73EA\u578B\u5951\u5F62\u5F84\u6075\u6176\u6167\u61A9\u63B2\u643A\u656C\u666F\u6842\u6E13\u7566\u7A3D\u7CFB\u7D4C\u7D99\u7E4B\u7F6B\u830E\u834A\u86CD\u8A08\u8A63\u8B66\u8EFD\u981A\u9D8F\u82B8\u8FCE\u9BE8\u5287\u621F\u6483\u6FC0\u9699\u6841\u5091\u6B20\u6C7A\u6F54\u7A74\u7D50\u8840\u8A23\u6708\u4EF6\u5039\u5026\u5065\u517C\u5238\u5263\u55A7\u570F\u5805\u5ACC\u5EFA\u61B2\u61F8\u62F3\u6372"], + ["b8a1", "\u691C\u6A29\u727D\u72AC\u732E\u7814\u786F\u7D79\u770C\u80A9\u898B\u8B19\u8CE2\u8ED2\u9063\u9375\u967A\u9855\u9A13\u9E78\u5143\u539F\u53B3\u5E7B\u5F26\u6E1B\u6E90\u7384\u73FE\u7D43\u8237\u8A00\u8AFA\u9650\u4E4E\u500B\u53E4\u547C\u56FA\u59D1\u5B64\u5DF1\u5EAB\u5F27\u6238\u6545\u67AF\u6E56\u72D0\u7CCA\u88B4\u80A1\u80E1\u83F0\u864E\u8A87\u8DE8\u9237\u96C7\u9867\u9F13\u4E94\u4E92\u4F0D\u5348\u5449\u543E\u5A2F\u5F8C\u5FA1\u609F\u68A7\u6A8E\u745A\u7881\u8A9E\u8AA4\u8B77\u9190\u4E5E\u9BC9\u4EA4\u4F7C\u4FAF\u5019\u5016\u5149\u516C\u529F\u52B9\u52FE\u539A\u53E3\u5411"], + ["b9a1", "\u540E\u5589\u5751\u57A2\u597D\u5B54\u5B5D\u5B8F\u5DE5\u5DE7\u5DF7\u5E78\u5E83\u5E9A\u5EB7\u5F18\u6052\u614C\u6297\u62D8\u63A7\u653B\u6602\u6643\u66F4\u676D\u6821\u6897\u69CB\u6C5F\u6D2A\u6D69\u6E2F\u6E9D\u7532\u7687\u786C\u7A3F\u7CE0\u7D05\u7D18\u7D5E\u7DB1\u8015\u8003\u80AF\u80B1\u8154\u818F\u822A\u8352\u884C\u8861\u8B1B\u8CA2\u8CFC\u90CA\u9175\u9271\u783F\u92FC\u95A4\u964D\u9805\u9999\u9AD8\u9D3B\u525B\u52AB\u53F7\u5408\u58D5\u62F7\u6FE0\u8C6A\u8F5F\u9EB9\u514B\u523B\u544A\u56FD\u7A40\u9177\u9D60\u9ED2\u7344\u6F09\u8170\u7511\u5FFD\u60DA\u9AA8\u72DB\u8FBC"], + ["baa1", "\u6B64\u9803\u4ECA\u56F0\u5764\u58BE\u5A5A\u6068\u61C7\u660F\u6606\u6839\u68B1\u6DF7\u75D5\u7D3A\u826E\u9B42\u4E9B\u4F50\u53C9\u5506\u5D6F\u5DE6\u5DEE\u67FB\u6C99\u7473\u7802\u8A50\u9396\u88DF\u5750\u5EA7\u632B\u50B5\u50AC\u518D\u6700\u54C9\u585E\u59BB\u5BB0\u5F69\u624D\u63A1\u683D\u6B73\u6E08\u707D\u91C7\u7280\u7815\u7826\u796D\u658E\u7D30\u83DC\u88C1\u8F09\u969B\u5264\u5728\u6750\u7F6A\u8CA1\u51B4\u5742\u962A\u583A\u698A\u80B4\u54B2\u5D0E\u57FC\u7895\u9DFA\u4F5C\u524A\u548B\u643E\u6628\u6714\u67F5\u7A84\u7B56\u7D22\u932F\u685C\u9BAD\u7B39\u5319\u518A\u5237"], + ["bba1", "\u5BDF\u62F6\u64AE\u64E6\u672D\u6BBA\u85A9\u96D1\u7690\u9BD6\u634C\u9306\u9BAB\u76BF\u6652\u4E09\u5098\u53C2\u5C71\u60E8\u6492\u6563\u685F\u71E6\u73CA\u7523\u7B97\u7E82\u8695\u8B83\u8CDB\u9178\u9910\u65AC\u66AB\u6B8B\u4ED5\u4ED4\u4F3A\u4F7F\u523A\u53F8\u53F2\u55E3\u56DB\u58EB\u59CB\u59C9\u59FF\u5B50\u5C4D\u5E02\u5E2B\u5FD7\u601D\u6307\u652F\u5B5C\u65AF\u65BD\u65E8\u679D\u6B62\u6B7B\u6C0F\u7345\u7949\u79C1\u7CF8\u7D19\u7D2B\u80A2\u8102\u81F3\u8996\u8A5E\u8A69\u8A66\u8A8C\u8AEE\u8CC7\u8CDC\u96CC\u98FC\u6B6F\u4E8B\u4F3C\u4F8D\u5150\u5B57\u5BFA\u6148\u6301\u6642"], + ["bca1", "\u6B21\u6ECB\u6CBB\u723E\u74BD\u75D4\u78C1\u793A\u800C\u8033\u81EA\u8494\u8F9E\u6C50\u9E7F\u5F0F\u8B58\u9D2B\u7AFA\u8EF8\u5B8D\u96EB\u4E03\u53F1\u57F7\u5931\u5AC9\u5BA4\u6089\u6E7F\u6F06\u75BE\u8CEA\u5B9F\u8500\u7BE0\u5072\u67F4\u829D\u5C61\u854A\u7E1E\u820E\u5199\u5C04\u6368\u8D66\u659C\u716E\u793E\u7D17\u8005\u8B1D\u8ECA\u906E\u86C7\u90AA\u501F\u52FA\u5C3A\u6753\u707C\u7235\u914C\u91C8\u932B\u82E5\u5BC2\u5F31\u60F9\u4E3B\u53D6\u5B88\u624B\u6731\u6B8A\u72E9\u73E0\u7A2E\u816B\u8DA3\u9152\u9996\u5112\u53D7\u546A\u5BFF\u6388\u6A39\u7DAC\u9700\u56DA\u53CE\u5468"], + ["bda1", "\u5B97\u5C31\u5DDE\u4FEE\u6101\u62FE\u6D32\u79C0\u79CB\u7D42\u7E4D\u7FD2\u81ED\u821F\u8490\u8846\u8972\u8B90\u8E74\u8F2F\u9031\u914B\u916C\u96C6\u919C\u4EC0\u4F4F\u5145\u5341\u5F93\u620E\u67D4\u6C41\u6E0B\u7363\u7E26\u91CD\u9283\u53D4\u5919\u5BBF\u6DD1\u795D\u7E2E\u7C9B\u587E\u719F\u51FA\u8853\u8FF0\u4FCA\u5CFB\u6625\u77AC\u7AE3\u821C\u99FF\u51C6\u5FAA\u65EC\u696F\u6B89\u6DF3\u6E96\u6F64\u76FE\u7D14\u5DE1\u9075\u9187\u9806\u51E6\u521D\u6240\u6691\u66D9\u6E1A\u5EB6\u7DD2\u7F72\u66F8\u85AF\u85F7\u8AF8\u52A9\u53D9\u5973\u5E8F\u5F90\u6055\u92E4\u9664\u50B7\u511F"], + ["bea1", "\u52DD\u5320\u5347\u53EC\u54E8\u5546\u5531\u5617\u5968\u59BE\u5A3C\u5BB5\u5C06\u5C0F\u5C11\u5C1A\u5E84\u5E8A\u5EE0\u5F70\u627F\u6284\u62DB\u638C\u6377\u6607\u660C\u662D\u6676\u677E\u68A2\u6A1F\u6A35\u6CBC\u6D88\u6E09\u6E58\u713C\u7126\u7167\u75C7\u7701\u785D\u7901\u7965\u79F0\u7AE0\u7B11\u7CA7\u7D39\u8096\u83D6\u848B\u8549\u885D\u88F3\u8A1F\u8A3C\u8A54\u8A73\u8C61\u8CDE\u91A4\u9266\u937E\u9418\u969C\u9798\u4E0A\u4E08\u4E1E\u4E57\u5197\u5270\u57CE\u5834\u58CC\u5B22\u5E38\u60C5\u64FE\u6761\u6756\u6D44\u72B6\u7573\u7A63\u84B8\u8B72\u91B8\u9320\u5631\u57F4\u98FE"], + ["bfa1", "\u62ED\u690D\u6B96\u71ED\u7E54\u8077\u8272\u89E6\u98DF\u8755\u8FB1\u5C3B\u4F38\u4FE1\u4FB5\u5507\u5A20\u5BDD\u5BE9\u5FC3\u614E\u632F\u65B0\u664B\u68EE\u699B\u6D78\u6DF1\u7533\u75B9\u771F\u795E\u79E6\u7D33\u81E3\u82AF\u85AA\u89AA\u8A3A\u8EAB\u8F9B\u9032\u91DD\u9707\u4EBA\u4EC1\u5203\u5875\u58EC\u5C0B\u751A\u5C3D\u814E\u8A0A\u8FC5\u9663\u976D\u7B25\u8ACF\u9808\u9162\u56F3\u53A8\u9017\u5439\u5782\u5E25\u63A8\u6C34\u708A\u7761\u7C8B\u7FE0\u8870\u9042\u9154\u9310\u9318\u968F\u745E\u9AC4\u5D07\u5D69\u6570\u67A2\u8DA8\u96DB\u636E\u6749\u6919\u83C5\u9817\u96C0\u88FE"], + ["c0a1", "\u6F84\u647A\u5BF8\u4E16\u702C\u755D\u662F\u51C4\u5236\u52E2\u59D3\u5F81\u6027\u6210\u653F\u6574\u661F\u6674\u68F2\u6816\u6B63\u6E05\u7272\u751F\u76DB\u7CBE\u8056\u58F0\u88FD\u897F\u8AA0\u8A93\u8ACB\u901D\u9192\u9752\u9759\u6589\u7A0E\u8106\u96BB\u5E2D\u60DC\u621A\u65A5\u6614\u6790\u77F3\u7A4D\u7C4D\u7E3E\u810A\u8CAC\u8D64\u8DE1\u8E5F\u78A9\u5207\u62D9\u63A5\u6442\u6298\u8A2D\u7A83\u7BC0\u8AAC\u96EA\u7D76\u820C\u8749\u4ED9\u5148\u5343\u5360\u5BA3\u5C02\u5C16\u5DDD\u6226\u6247\u64B0\u6813\u6834\u6CC9\u6D45\u6D17\u67D3\u6F5C\u714E\u717D\u65CB\u7A7F\u7BAD\u7DDA"], + ["c1a1", "\u7E4A\u7FA8\u817A\u821B\u8239\u85A6\u8A6E\u8CCE\u8DF5\u9078\u9077\u92AD\u9291\u9583\u9BAE\u524D\u5584\u6F38\u7136\u5168\u7985\u7E55\u81B3\u7CCE\u564C\u5851\u5CA8\u63AA\u66FE\u66FD\u695A\u72D9\u758F\u758E\u790E\u7956\u79DF\u7C97\u7D20\u7D44\u8607\u8A34\u963B\u9061\u9F20\u50E7\u5275\u53CC\u53E2\u5009\u55AA\u58EE\u594F\u723D\u5B8B\u5C64\u531D\u60E3\u60F3\u635C\u6383\u633F\u63BB\u64CD\u65E9\u66F9\u5DE3\u69CD\u69FD\u6F15\u71E5\u4E89\u75E9\u76F8\u7A93\u7CDF\u7DCF\u7D9C\u8061\u8349\u8358\u846C\u84BC\u85FB\u88C5\u8D70\u9001\u906D\u9397\u971C\u9A12\u50CF\u5897\u618E"], + ["c2a1", "\u81D3\u8535\u8D08\u9020\u4FC3\u5074\u5247\u5373\u606F\u6349\u675F\u6E2C\u8DB3\u901F\u4FD7\u5C5E\u8CCA\u65CF\u7D9A\u5352\u8896\u5176\u63C3\u5B58\u5B6B\u5C0A\u640D\u6751\u905C\u4ED6\u591A\u592A\u6C70\u8A51\u553E\u5815\u59A5\u60F0\u6253\u67C1\u8235\u6955\u9640\u99C4\u9A28\u4F53\u5806\u5BFE\u8010\u5CB1\u5E2F\u5F85\u6020\u614B\u6234\u66FF\u6CF0\u6EDE\u80CE\u817F\u82D4\u888B\u8CB8\u9000\u902E\u968A\u9EDB\u9BDB\u4EE3\u53F0\u5927\u7B2C\u918D\u984C\u9DF9\u6EDD\u7027\u5353\u5544\u5B85\u6258\u629E\u62D3\u6CA2\u6FEF\u7422\u8A17\u9438\u6FC1\u8AFE\u8338\u51E7\u86F8\u53EA"], + ["c3a1", "\u53E9\u4F46\u9054\u8FB0\u596A\u8131\u5DFD\u7AEA\u8FBF\u68DA\u8C37\u72F8\u9C48\u6A3D\u8AB0\u4E39\u5358\u5606\u5766\u62C5\u63A2\u65E6\u6B4E\u6DE1\u6E5B\u70AD\u77ED\u7AEF\u7BAA\u7DBB\u803D\u80C6\u86CB\u8A95\u935B\u56E3\u58C7\u5F3E\u65AD\u6696\u6A80\u6BB5\u7537\u8AC7\u5024\u77E5\u5730\u5F1B\u6065\u667A\u6C60\u75F4\u7A1A\u7F6E\u81F4\u8718\u9045\u99B3\u7BC9\u755C\u7AF9\u7B51\u84C4\u9010\u79E9\u7A92\u8336\u5AE1\u7740\u4E2D\u4EF2\u5B99\u5FE0\u62BD\u663C\u67F1\u6CE8\u866B\u8877\u8A3B\u914E\u92F3\u99D0\u6A17\u7026\u732A\u82E7\u8457\u8CAF\u4E01\u5146\u51CB\u558B\u5BF5"], + ["c4a1", "\u5E16\u5E33\u5E81\u5F14\u5F35\u5F6B\u5FB4\u61F2\u6311\u66A2\u671D\u6F6E\u7252\u753A\u773A\u8074\u8139\u8178\u8776\u8ABF\u8ADC\u8D85\u8DF3\u929A\u9577\u9802\u9CE5\u52C5\u6357\u76F4\u6715\u6C88\u73CD\u8CC3\u93AE\u9673\u6D25\u589C\u690E\u69CC\u8FFD\u939A\u75DB\u901A\u585A\u6802\u63B4\u69FB\u4F43\u6F2C\u67D8\u8FBB\u8526\u7DB4\u9354\u693F\u6F70\u576A\u58F7\u5B2C\u7D2C\u722A\u540A\u91E3\u9DB4\u4EAD\u4F4E\u505C\u5075\u5243\u8C9E\u5448\u5824\u5B9A\u5E1D\u5E95\u5EAD\u5EF7\u5F1F\u608C\u62B5\u633A\u63D0\u68AF\u6C40\u7887\u798E\u7A0B\u7DE0\u8247\u8A02\u8AE6\u8E44\u9013"], + ["c5a1", "\u90B8\u912D\u91D8\u9F0E\u6CE5\u6458\u64E2\u6575\u6EF4\u7684\u7B1B\u9069\u93D1\u6EBA\u54F2\u5FB9\u64A4\u8F4D\u8FED\u9244\u5178\u586B\u5929\u5C55\u5E97\u6DFB\u7E8F\u751C\u8CBC\u8EE2\u985B\u70B9\u4F1D\u6BBF\u6FB1\u7530\u96FB\u514E\u5410\u5835\u5857\u59AC\u5C60\u5F92\u6597\u675C\u6E21\u767B\u83DF\u8CED\u9014\u90FD\u934D\u7825\u783A\u52AA\u5EA6\u571F\u5974\u6012\u5012\u515A\u51AC\u51CD\u5200\u5510\u5854\u5858\u5957\u5B95\u5CF6\u5D8B\u60BC\u6295\u642D\u6771\u6843\u68BC\u68DF\u76D7\u6DD8\u6E6F\u6D9B\u706F\u71C8\u5F53\u75D8\u7977\u7B49\u7B54\u7B52\u7CD6\u7D71\u5230"], + ["c6a1", "\u8463\u8569\u85E4\u8A0E\u8B04\u8C46\u8E0F\u9003\u900F\u9419\u9676\u982D\u9A30\u95D8\u50CD\u52D5\u540C\u5802\u5C0E\u61A7\u649E\u6D1E\u77B3\u7AE5\u80F4\u8404\u9053\u9285\u5CE0\u9D07\u533F\u5F97\u5FB3\u6D9C\u7279\u7763\u79BF\u7BE4\u6BD2\u72EC\u8AAD\u6803\u6A61\u51F8\u7A81\u6934\u5C4A\u9CF6\u82EB\u5BC5\u9149\u701E\u5678\u5C6F\u60C7\u6566\u6C8C\u8C5A\u9041\u9813\u5451\u66C7\u920D\u5948\u90A3\u5185\u4E4D\u51EA\u8599\u8B0E\u7058\u637A\u934B\u6962\u99B4\u7E04\u7577\u5357\u6960\u8EDF\u96E3\u6C5D\u4E8C\u5C3C\u5F10\u8FE9\u5302\u8CD1\u8089\u8679\u5EFF\u65E5\u4E73\u5165"], + ["c7a1", "\u5982\u5C3F\u97EE\u4EFB\u598A\u5FCD\u8A8D\u6FE1\u79B0\u7962\u5BE7\u8471\u732B\u71B1\u5E74\u5FF5\u637B\u649A\u71C3\u7C98\u4E43\u5EFC\u4E4B\u57DC\u56A2\u60A9\u6FC3\u7D0D\u80FD\u8133\u81BF\u8FB2\u8997\u86A4\u5DF4\u628A\u64AD\u8987\u6777\u6CE2\u6D3E\u7436\u7834\u5A46\u7F75\u82AD\u99AC\u4FF3\u5EC3\u62DD\u6392\u6557\u676F\u76C3\u724C\u80CC\u80BA\u8F29\u914D\u500D\u57F9\u5A92\u6885\u6973\u7164\u72FD\u8CB7\u58F2\u8CE0\u966A\u9019\u877F\u79E4\u77E7\u8429\u4F2F\u5265\u535A\u62CD\u67CF\u6CCA\u767D\u7B94\u7C95\u8236\u8584\u8FEB\u66DD\u6F20\u7206\u7E1B\u83AB\u99C1\u9EA6"], + ["c8a1", "\u51FD\u7BB1\u7872\u7BB8\u8087\u7B48\u6AE8\u5E61\u808C\u7551\u7560\u516B\u9262\u6E8C\u767A\u9197\u9AEA\u4F10\u7F70\u629C\u7B4F\u95A5\u9CE9\u567A\u5859\u86E4\u96BC\u4F34\u5224\u534A\u53CD\u53DB\u5E06\u642C\u6591\u677F\u6C3E\u6C4E\u7248\u72AF\u73ED\u7554\u7E41\u822C\u85E9\u8CA9\u7BC4\u91C6\u7169\u9812\u98EF\u633D\u6669\u756A\u76E4\u78D0\u8543\u86EE\u532A\u5351\u5426\u5983\u5E87\u5F7C\u60B2\u6249\u6279\u62AB\u6590\u6BD4\u6CCC\u75B2\u76AE\u7891\u79D8\u7DCB\u7F77\u80A5\u88AB\u8AB9\u8CBB\u907F\u975E\u98DB\u6A0B\u7C38\u5099\u5C3E\u5FAE\u6787\u6BD8\u7435\u7709\u7F8E"], + ["c9a1", "\u9F3B\u67CA\u7A17\u5339\u758B\u9AED\u5F66\u819D\u83F1\u8098\u5F3C\u5FC5\u7562\u7B46\u903C\u6867\u59EB\u5A9B\u7D10\u767E\u8B2C\u4FF5\u5F6A\u6A19\u6C37\u6F02\u74E2\u7968\u8868\u8A55\u8C79\u5EDF\u63CF\u75C5\u79D2\u82D7\u9328\u92F2\u849C\u86ED\u9C2D\u54C1\u5F6C\u658C\u6D5C\u7015\u8CA7\u8CD3\u983B\u654F\u74F6\u4E0D\u4ED8\u57E0\u592B\u5A66\u5BCC\u51A8\u5E03\u5E9C\u6016\u6276\u6577\u65A7\u666E\u6D6E\u7236\u7B26\u8150\u819A\u8299\u8B5C\u8CA0\u8CE6\u8D74\u961C\u9644\u4FAE\u64AB\u6B66\u821E\u8461\u856A\u90E8\u5C01\u6953\u98A8\u847A\u8557\u4F0F\u526F\u5FA9\u5E45\u670D"], + ["caa1", "\u798F\u8179\u8907\u8986\u6DF5\u5F17\u6255\u6CB8\u4ECF\u7269\u9B92\u5206\u543B\u5674\u58B3\u61A4\u626E\u711A\u596E\u7C89\u7CDE\u7D1B\u96F0\u6587\u805E\u4E19\u4F75\u5175\u5840\u5E63\u5E73\u5F0A\u67C4\u4E26\u853D\u9589\u965B\u7C73\u9801\u50FB\u58C1\u7656\u78A7\u5225\u77A5\u8511\u7B86\u504F\u5909\u7247\u7BC7\u7DE8\u8FBA\u8FD4\u904D\u4FBF\u52C9\u5A29\u5F01\u97AD\u4FDD\u8217\u92EA\u5703\u6355\u6B69\u752B\u88DC\u8F14\u7A42\u52DF\u5893\u6155\u620A\u66AE\u6BCD\u7C3F\u83E9\u5023\u4FF8\u5305\u5446\u5831\u5949\u5B9D\u5CF0\u5CEF\u5D29\u5E96\u62B1\u6367\u653E\u65B9\u670B"], + ["cba1", "\u6CD5\u6CE1\u70F9\u7832\u7E2B\u80DE\u82B3\u840C\u84EC\u8702\u8912\u8A2A\u8C4A\u90A6\u92D2\u98FD\u9CF3\u9D6C\u4E4F\u4EA1\u508D\u5256\u574A\u59A8\u5E3D\u5FD8\u5FD9\u623F\u66B4\u671B\u67D0\u68D2\u5192\u7D21\u80AA\u81A8\u8B00\u8C8C\u8CBF\u927E\u9632\u5420\u982C\u5317\u50D5\u535C\u58A8\u64B2\u6734\u7267\u7766\u7A46\u91E6\u52C3\u6CA1\u6B86\u5800\u5E4C\u5954\u672C\u7FFB\u51E1\u76C6\u6469\u78E8\u9B54\u9EBB\u57CB\u59B9\u6627\u679A\u6BCE\u54E9\u69D9\u5E55\u819C\u6795\u9BAA\u67FE\u9C52\u685D\u4EA6\u4FE3\u53C8\u62B9\u672B\u6CAB\u8FC4\u4FAD\u7E6D\u9EBF\u4E07\u6162\u6E80"], + ["cca1", "\u6F2B\u8513\u5473\u672A\u9B45\u5DF3\u7B95\u5CAC\u5BC6\u871C\u6E4A\u84D1\u7A14\u8108\u5999\u7C8D\u6C11\u7720\u52D9\u5922\u7121\u725F\u77DB\u9727\u9D61\u690B\u5A7F\u5A18\u51A5\u540D\u547D\u660E\u76DF\u8FF7\u9298\u9CF4\u59EA\u725D\u6EC5\u514D\u68C9\u7DBF\u7DEC\u9762\u9EBA\u6478\u6A21\u8302\u5984\u5B5F\u6BDB\u731B\u76F2\u7DB2\u8017\u8499\u5132\u6728\u9ED9\u76EE\u6762\u52FF\u9905\u5C24\u623B\u7C7E\u8CB0\u554F\u60B6\u7D0B\u9580\u5301\u4E5F\u51B6\u591C\u723A\u8036\u91CE\u5F25\u77E2\u5384\u5F79\u7D04\u85AC\u8A33\u8E8D\u9756\u67F3\u85AE\u9453\u6109\u6108\u6CB9\u7652"], + ["cda1", "\u8AED\u8F38\u552F\u4F51\u512A\u52C7\u53CB\u5BA5\u5E7D\u60A0\u6182\u63D6\u6709\u67DA\u6E67\u6D8C\u7336\u7337\u7531\u7950\u88D5\u8A98\u904A\u9091\u90F5\u96C4\u878D\u5915\u4E88\u4F59\u4E0E\u8A89\u8F3F\u9810\u50AD\u5E7C\u5996\u5BB9\u5EB8\u63DA\u63FA\u64C1\u66DC\u694A\u69D8\u6D0B\u6EB6\u7194\u7528\u7AAF\u7F8A\u8000\u8449\u84C9\u8981\u8B21\u8E0A\u9065\u967D\u990A\u617E\u6291\u6B32\u6C83\u6D74\u7FCC\u7FFC\u6DC0\u7F85\u87BA\u88F8\u6765\u83B1\u983C\u96F7\u6D1B\u7D61\u843D\u916A\u4E71\u5375\u5D50\u6B04\u6FEB\u85CD\u862D\u89A7\u5229\u540F\u5C65\u674E\u68A8\u7406\u7483"], + ["cea1", "\u75E2\u88CF\u88E1\u91CC\u96E2\u9678\u5F8B\u7387\u7ACB\u844E\u63A0\u7565\u5289\u6D41\u6E9C\u7409\u7559\u786B\u7C92\u9686\u7ADC\u9F8D\u4FB6\u616E\u65C5\u865C\u4E86\u4EAE\u50DA\u4E21\u51CC\u5BEE\u6599\u6881\u6DBC\u731F\u7642\u77AD\u7A1C\u7CE7\u826F\u8AD2\u907C\u91CF\u9675\u9818\u529B\u7DD1\u502B\u5398\u6797\u6DCB\u71D0\u7433\u81E8\u8F2A\u96A3\u9C57\u9E9F\u7460\u5841\u6D99\u7D2F\u985E\u4EE4\u4F36\u4F8B\u51B7\u52B1\u5DBA\u601C\u73B2\u793C\u82D3\u9234\u96B7\u96F6\u970A\u9E97\u9F62\u66A6\u6B74\u5217\u52A3\u70C8\u88C2\u5EC9\u604B\u6190\u6F23\u7149\u7C3E\u7DF4\u806F"], + ["cfa1", "\u84EE\u9023\u932C\u5442\u9B6F\u6AD3\u7089\u8CC2\u8DEF\u9732\u52B4\u5A41\u5ECA\u5F04\u6717\u697C\u6994\u6D6A\u6F0F\u7262\u72FC\u7BED\u8001\u807E\u874B\u90CE\u516D\u9E93\u7984\u808B\u9332\u8AD6\u502D\u548C\u8A71\u6B6A\u8CC4\u8107\u60D1\u67A0\u9DF2\u4E99\u4E98\u9C10\u8A6B\u85C1\u8568\u6900\u6E7E\u7897\u8155"], + ["d0a1", "\u5F0C\u4E10\u4E15\u4E2A\u4E31\u4E36\u4E3C\u4E3F\u4E42\u4E56\u4E58\u4E82\u4E85\u8C6B\u4E8A\u8212\u5F0D\u4E8E\u4E9E\u4E9F\u4EA0\u4EA2\u4EB0\u4EB3\u4EB6\u4ECE\u4ECD\u4EC4\u4EC6\u4EC2\u4ED7\u4EDE\u4EED\u4EDF\u4EF7\u4F09\u4F5A\u4F30\u4F5B\u4F5D\u4F57\u4F47\u4F76\u4F88\u4F8F\u4F98\u4F7B\u4F69\u4F70\u4F91\u4F6F\u4F86\u4F96\u5118\u4FD4\u4FDF\u4FCE\u4FD8\u4FDB\u4FD1\u4FDA\u4FD0\u4FE4\u4FE5\u501A\u5028\u5014\u502A\u5025\u5005\u4F1C\u4FF6\u5021\u5029\u502C\u4FFE\u4FEF\u5011\u5006\u5043\u5047\u6703\u5055\u5050\u5048\u505A\u5056\u506C\u5078\u5080\u509A\u5085\u50B4\u50B2"], + ["d1a1", "\u50C9\u50CA\u50B3\u50C2\u50D6\u50DE\u50E5\u50ED\u50E3\u50EE\u50F9\u50F5\u5109\u5101\u5102\u5116\u5115\u5114\u511A\u5121\u513A\u5137\u513C\u513B\u513F\u5140\u5152\u514C\u5154\u5162\u7AF8\u5169\u516A\u516E\u5180\u5182\u56D8\u518C\u5189\u518F\u5191\u5193\u5195\u5196\u51A4\u51A6\u51A2\u51A9\u51AA\u51AB\u51B3\u51B1\u51B2\u51B0\u51B5\u51BD\u51C5\u51C9\u51DB\u51E0\u8655\u51E9\u51ED\u51F0\u51F5\u51FE\u5204\u520B\u5214\u520E\u5227\u522A\u522E\u5233\u5239\u524F\u5244\u524B\u524C\u525E\u5254\u526A\u5274\u5269\u5273\u527F\u527D\u528D\u5294\u5292\u5271\u5288\u5291\u8FA8"], + ["d2a1", "\u8FA7\u52AC\u52AD\u52BC\u52B5\u52C1\u52CD\u52D7\u52DE\u52E3\u52E6\u98ED\u52E0\u52F3\u52F5\u52F8\u52F9\u5306\u5308\u7538\u530D\u5310\u530F\u5315\u531A\u5323\u532F\u5331\u5333\u5338\u5340\u5346\u5345\u4E17\u5349\u534D\u51D6\u535E\u5369\u536E\u5918\u537B\u5377\u5382\u5396\u53A0\u53A6\u53A5\u53AE\u53B0\u53B6\u53C3\u7C12\u96D9\u53DF\u66FC\u71EE\u53EE\u53E8\u53ED\u53FA\u5401\u543D\u5440\u542C\u542D\u543C\u542E\u5436\u5429\u541D\u544E\u548F\u5475\u548E\u545F\u5471\u5477\u5470\u5492\u547B\u5480\u5476\u5484\u5490\u5486\u54C7\u54A2\u54B8\u54A5\u54AC\u54C4\u54C8\u54A8"], + ["d3a1", "\u54AB\u54C2\u54A4\u54BE\u54BC\u54D8\u54E5\u54E6\u550F\u5514\u54FD\u54EE\u54ED\u54FA\u54E2\u5539\u5540\u5563\u554C\u552E\u555C\u5545\u5556\u5557\u5538\u5533\u555D\u5599\u5580\u54AF\u558A\u559F\u557B\u557E\u5598\u559E\u55AE\u557C\u5583\u55A9\u5587\u55A8\u55DA\u55C5\u55DF\u55C4\u55DC\u55E4\u55D4\u5614\u55F7\u5616\u55FE\u55FD\u561B\u55F9\u564E\u5650\u71DF\u5634\u5636\u5632\u5638\u566B\u5664\u562F\u566C\u566A\u5686\u5680\u568A\u56A0\u5694\u568F\u56A5\u56AE\u56B6\u56B4\u56C2\u56BC\u56C1\u56C3\u56C0\u56C8\u56CE\u56D1\u56D3\u56D7\u56EE\u56F9\u5700\u56FF\u5704\u5709"], + ["d4a1", "\u5708\u570B\u570D\u5713\u5718\u5716\u55C7\u571C\u5726\u5737\u5738\u574E\u573B\u5740\u574F\u5769\u57C0\u5788\u5761\u577F\u5789\u5793\u57A0\u57B3\u57A4\u57AA\u57B0\u57C3\u57C6\u57D4\u57D2\u57D3\u580A\u57D6\u57E3\u580B\u5819\u581D\u5872\u5821\u5862\u584B\u5870\u6BC0\u5852\u583D\u5879\u5885\u58B9\u589F\u58AB\u58BA\u58DE\u58BB\u58B8\u58AE\u58C5\u58D3\u58D1\u58D7\u58D9\u58D8\u58E5\u58DC\u58E4\u58DF\u58EF\u58FA\u58F9\u58FB\u58FC\u58FD\u5902\u590A\u5910\u591B\u68A6\u5925\u592C\u592D\u5932\u5938\u593E\u7AD2\u5955\u5950\u594E\u595A\u5958\u5962\u5960\u5967\u596C\u5969"], + ["d5a1", "\u5978\u5981\u599D\u4F5E\u4FAB\u59A3\u59B2\u59C6\u59E8\u59DC\u598D\u59D9\u59DA\u5A25\u5A1F\u5A11\u5A1C\u5A09\u5A1A\u5A40\u5A6C\u5A49\u5A35\u5A36\u5A62\u5A6A\u5A9A\u5ABC\u5ABE\u5ACB\u5AC2\u5ABD\u5AE3\u5AD7\u5AE6\u5AE9\u5AD6\u5AFA\u5AFB\u5B0C\u5B0B\u5B16\u5B32\u5AD0\u5B2A\u5B36\u5B3E\u5B43\u5B45\u5B40\u5B51\u5B55\u5B5A\u5B5B\u5B65\u5B69\u5B70\u5B73\u5B75\u5B78\u6588\u5B7A\u5B80\u5B83\u5BA6\u5BB8\u5BC3\u5BC7\u5BC9\u5BD4\u5BD0\u5BE4\u5BE6\u5BE2\u5BDE\u5BE5\u5BEB\u5BF0\u5BF6\u5BF3\u5C05\u5C07\u5C08\u5C0D\u5C13\u5C20\u5C22\u5C28\u5C38\u5C39\u5C41\u5C46\u5C4E\u5C53"], + ["d6a1", "\u5C50\u5C4F\u5B71\u5C6C\u5C6E\u4E62\u5C76\u5C79\u5C8C\u5C91\u5C94\u599B\u5CAB\u5CBB\u5CB6\u5CBC\u5CB7\u5CC5\u5CBE\u5CC7\u5CD9\u5CE9\u5CFD\u5CFA\u5CED\u5D8C\u5CEA\u5D0B\u5D15\u5D17\u5D5C\u5D1F\u5D1B\u5D11\u5D14\u5D22\u5D1A\u5D19\u5D18\u5D4C\u5D52\u5D4E\u5D4B\u5D6C\u5D73\u5D76\u5D87\u5D84\u5D82\u5DA2\u5D9D\u5DAC\u5DAE\u5DBD\u5D90\u5DB7\u5DBC\u5DC9\u5DCD\u5DD3\u5DD2\u5DD6\u5DDB\u5DEB\u5DF2\u5DF5\u5E0B\u5E1A\u5E19\u5E11\u5E1B\u5E36\u5E37\u5E44\u5E43\u5E40\u5E4E\u5E57\u5E54\u5E5F\u5E62\u5E64\u5E47\u5E75\u5E76\u5E7A\u9EBC\u5E7F\u5EA0\u5EC1\u5EC2\u5EC8\u5ED0\u5ECF"], + ["d7a1", "\u5ED6\u5EE3\u5EDD\u5EDA\u5EDB\u5EE2\u5EE1\u5EE8\u5EE9\u5EEC\u5EF1\u5EF3\u5EF0\u5EF4\u5EF8\u5EFE\u5F03\u5F09\u5F5D\u5F5C\u5F0B\u5F11\u5F16\u5F29\u5F2D\u5F38\u5F41\u5F48\u5F4C\u5F4E\u5F2F\u5F51\u5F56\u5F57\u5F59\u5F61\u5F6D\u5F73\u5F77\u5F83\u5F82\u5F7F\u5F8A\u5F88\u5F91\u5F87\u5F9E\u5F99\u5F98\u5FA0\u5FA8\u5FAD\u5FBC\u5FD6\u5FFB\u5FE4\u5FF8\u5FF1\u5FDD\u60B3\u5FFF\u6021\u6060\u6019\u6010\u6029\u600E\u6031\u601B\u6015\u602B\u6026\u600F\u603A\u605A\u6041\u606A\u6077\u605F\u604A\u6046\u604D\u6063\u6043\u6064\u6042\u606C\u606B\u6059\u6081\u608D\u60E7\u6083\u609A"], + ["d8a1", "\u6084\u609B\u6096\u6097\u6092\u60A7\u608B\u60E1\u60B8\u60E0\u60D3\u60B4\u5FF0\u60BD\u60C6\u60B5\u60D8\u614D\u6115\u6106\u60F6\u60F7\u6100\u60F4\u60FA\u6103\u6121\u60FB\u60F1\u610D\u610E\u6147\u613E\u6128\u6127\u614A\u613F\u613C\u612C\u6134\u613D\u6142\u6144\u6173\u6177\u6158\u6159\u615A\u616B\u6174\u616F\u6165\u6171\u615F\u615D\u6153\u6175\u6199\u6196\u6187\u61AC\u6194\u619A\u618A\u6191\u61AB\u61AE\u61CC\u61CA\u61C9\u61F7\u61C8\u61C3\u61C6\u61BA\u61CB\u7F79\u61CD\u61E6\u61E3\u61F6\u61FA\u61F4\u61FF\u61FD\u61FC\u61FE\u6200\u6208\u6209\u620D\u620C\u6214\u621B"], + ["d9a1", "\u621E\u6221\u622A\u622E\u6230\u6232\u6233\u6241\u624E\u625E\u6263\u625B\u6260\u6268\u627C\u6282\u6289\u627E\u6292\u6293\u6296\u62D4\u6283\u6294\u62D7\u62D1\u62BB\u62CF\u62FF\u62C6\u64D4\u62C8\u62DC\u62CC\u62CA\u62C2\u62C7\u629B\u62C9\u630C\u62EE\u62F1\u6327\u6302\u6308\u62EF\u62F5\u6350\u633E\u634D\u641C\u634F\u6396\u638E\u6380\u63AB\u6376\u63A3\u638F\u6389\u639F\u63B5\u636B\u6369\u63BE\u63E9\u63C0\u63C6\u63E3\u63C9\u63D2\u63F6\u63C4\u6416\u6434\u6406\u6413\u6426\u6436\u651D\u6417\u6428\u640F\u6467\u646F\u6476\u644E\u652A\u6495\u6493\u64A5\u64A9\u6488\u64BC"], + ["daa1", "\u64DA\u64D2\u64C5\u64C7\u64BB\u64D8\u64C2\u64F1\u64E7\u8209\u64E0\u64E1\u62AC\u64E3\u64EF\u652C\u64F6\u64F4\u64F2\u64FA\u6500\u64FD\u6518\u651C\u6505\u6524\u6523\u652B\u6534\u6535\u6537\u6536\u6538\u754B\u6548\u6556\u6555\u654D\u6558\u655E\u655D\u6572\u6578\u6582\u6583\u8B8A\u659B\u659F\u65AB\u65B7\u65C3\u65C6\u65C1\u65C4\u65CC\u65D2\u65DB\u65D9\u65E0\u65E1\u65F1\u6772\u660A\u6603\u65FB\u6773\u6635\u6636\u6634\u661C\u664F\u6644\u6649\u6641\u665E\u665D\u6664\u6667\u6668\u665F\u6662\u6670\u6683\u6688\u668E\u6689\u6684\u6698\u669D\u66C1\u66B9\u66C9\u66BE\u66BC"], + ["dba1", "\u66C4\u66B8\u66D6\u66DA\u66E0\u663F\u66E6\u66E9\u66F0\u66F5\u66F7\u670F\u6716\u671E\u6726\u6727\u9738\u672E\u673F\u6736\u6741\u6738\u6737\u6746\u675E\u6760\u6759\u6763\u6764\u6789\u6770\u67A9\u677C\u676A\u678C\u678B\u67A6\u67A1\u6785\u67B7\u67EF\u67B4\u67EC\u67B3\u67E9\u67B8\u67E4\u67DE\u67DD\u67E2\u67EE\u67B9\u67CE\u67C6\u67E7\u6A9C\u681E\u6846\u6829\u6840\u684D\u6832\u684E\u68B3\u682B\u6859\u6863\u6877\u687F\u689F\u688F\u68AD\u6894\u689D\u689B\u6883\u6AAE\u68B9\u6874\u68B5\u68A0\u68BA\u690F\u688D\u687E\u6901\u68CA\u6908\u68D8\u6922\u6926\u68E1\u690C\u68CD"], + ["dca1", "\u68D4\u68E7\u68D5\u6936\u6912\u6904\u68D7\u68E3\u6925\u68F9\u68E0\u68EF\u6928\u692A\u691A\u6923\u6921\u68C6\u6979\u6977\u695C\u6978\u696B\u6954\u697E\u696E\u6939\u6974\u693D\u6959\u6930\u6961\u695E\u695D\u6981\u696A\u69B2\u69AE\u69D0\u69BF\u69C1\u69D3\u69BE\u69CE\u5BE8\u69CA\u69DD\u69BB\u69C3\u69A7\u6A2E\u6991\u69A0\u699C\u6995\u69B4\u69DE\u69E8\u6A02\u6A1B\u69FF\u6B0A\u69F9\u69F2\u69E7\u6A05\u69B1\u6A1E\u69ED\u6A14\u69EB\u6A0A\u6A12\u6AC1\u6A23\u6A13\u6A44\u6A0C\u6A72\u6A36\u6A78\u6A47\u6A62\u6A59\u6A66\u6A48\u6A38\u6A22\u6A90\u6A8D\u6AA0\u6A84\u6AA2\u6AA3"], + ["dda1", "\u6A97\u8617\u6ABB\u6AC3\u6AC2\u6AB8\u6AB3\u6AAC\u6ADE\u6AD1\u6ADF\u6AAA\u6ADA\u6AEA\u6AFB\u6B05\u8616\u6AFA\u6B12\u6B16\u9B31\u6B1F\u6B38\u6B37\u76DC\u6B39\u98EE\u6B47\u6B43\u6B49\u6B50\u6B59\u6B54\u6B5B\u6B5F\u6B61\u6B78\u6B79\u6B7F\u6B80\u6B84\u6B83\u6B8D\u6B98\u6B95\u6B9E\u6BA4\u6BAA\u6BAB\u6BAF\u6BB2\u6BB1\u6BB3\u6BB7\u6BBC\u6BC6\u6BCB\u6BD3\u6BDF\u6BEC\u6BEB\u6BF3\u6BEF\u9EBE\u6C08\u6C13\u6C14\u6C1B\u6C24\u6C23\u6C5E\u6C55\u6C62\u6C6A\u6C82\u6C8D\u6C9A\u6C81\u6C9B\u6C7E\u6C68\u6C73\u6C92\u6C90\u6CC4\u6CF1\u6CD3\u6CBD\u6CD7\u6CC5\u6CDD\u6CAE\u6CB1\u6CBE"], + ["dea1", "\u6CBA\u6CDB\u6CEF\u6CD9\u6CEA\u6D1F\u884D\u6D36\u6D2B\u6D3D\u6D38\u6D19\u6D35\u6D33\u6D12\u6D0C\u6D63\u6D93\u6D64\u6D5A\u6D79\u6D59\u6D8E\u6D95\u6FE4\u6D85\u6DF9\u6E15\u6E0A\u6DB5\u6DC7\u6DE6\u6DB8\u6DC6\u6DEC\u6DDE\u6DCC\u6DE8\u6DD2\u6DC5\u6DFA\u6DD9\u6DE4\u6DD5\u6DEA\u6DEE\u6E2D\u6E6E\u6E2E\u6E19\u6E72\u6E5F\u6E3E\u6E23\u6E6B\u6E2B\u6E76\u6E4D\u6E1F\u6E43\u6E3A\u6E4E\u6E24\u6EFF\u6E1D\u6E38\u6E82\u6EAA\u6E98\u6EC9\u6EB7\u6ED3\u6EBD\u6EAF\u6EC4\u6EB2\u6ED4\u6ED5\u6E8F\u6EA5\u6EC2\u6E9F\u6F41\u6F11\u704C\u6EEC\u6EF8\u6EFE\u6F3F\u6EF2\u6F31\u6EEF\u6F32\u6ECC"], + ["dfa1", "\u6F3E\u6F13\u6EF7\u6F86\u6F7A\u6F78\u6F81\u6F80\u6F6F\u6F5B\u6FF3\u6F6D\u6F82\u6F7C\u6F58\u6F8E\u6F91\u6FC2\u6F66\u6FB3\u6FA3\u6FA1\u6FA4\u6FB9\u6FC6\u6FAA\u6FDF\u6FD5\u6FEC\u6FD4\u6FD8\u6FF1\u6FEE\u6FDB\u7009\u700B\u6FFA\u7011\u7001\u700F\u6FFE\u701B\u701A\u6F74\u701D\u7018\u701F\u7030\u703E\u7032\u7051\u7063\u7099\u7092\u70AF\u70F1\u70AC\u70B8\u70B3\u70AE\u70DF\u70CB\u70DD\u70D9\u7109\u70FD\u711C\u7119\u7165\u7155\u7188\u7166\u7162\u714C\u7156\u716C\u718F\u71FB\u7184\u7195\u71A8\u71AC\u71D7\u71B9\u71BE\u71D2\u71C9\u71D4\u71CE\u71E0\u71EC\u71E7\u71F5\u71FC"], + ["e0a1", "\u71F9\u71FF\u720D\u7210\u721B\u7228\u722D\u722C\u7230\u7232\u723B\u723C\u723F\u7240\u7246\u724B\u7258\u7274\u727E\u7282\u7281\u7287\u7292\u7296\u72A2\u72A7\u72B9\u72B2\u72C3\u72C6\u72C4\u72CE\u72D2\u72E2\u72E0\u72E1\u72F9\u72F7\u500F\u7317\u730A\u731C\u7316\u731D\u7334\u732F\u7329\u7325\u733E\u734E\u734F\u9ED8\u7357\u736A\u7368\u7370\u7378\u7375\u737B\u737A\u73C8\u73B3\u73CE\u73BB\u73C0\u73E5\u73EE\u73DE\u74A2\u7405\u746F\u7425\u73F8\u7432\u743A\u7455\u743F\u745F\u7459\u7441\u745C\u7469\u7470\u7463\u746A\u7476\u747E\u748B\u749E\u74A7\u74CA\u74CF\u74D4\u73F1"], + ["e1a1", "\u74E0\u74E3\u74E7\u74E9\u74EE\u74F2\u74F0\u74F1\u74F8\u74F7\u7504\u7503\u7505\u750C\u750E\u750D\u7515\u7513\u751E\u7526\u752C\u753C\u7544\u754D\u754A\u7549\u755B\u7546\u755A\u7569\u7564\u7567\u756B\u756D\u7578\u7576\u7586\u7587\u7574\u758A\u7589\u7582\u7594\u759A\u759D\u75A5\u75A3\u75C2\u75B3\u75C3\u75B5\u75BD\u75B8\u75BC\u75B1\u75CD\u75CA\u75D2\u75D9\u75E3\u75DE\u75FE\u75FF\u75FC\u7601\u75F0\u75FA\u75F2\u75F3\u760B\u760D\u7609\u761F\u7627\u7620\u7621\u7622\u7624\u7634\u7630\u763B\u7647\u7648\u7646\u765C\u7658\u7661\u7662\u7668\u7669\u766A\u7667\u766C\u7670"], + ["e2a1", "\u7672\u7676\u7678\u767C\u7680\u7683\u7688\u768B\u768E\u7696\u7693\u7699\u769A\u76B0\u76B4\u76B8\u76B9\u76BA\u76C2\u76CD\u76D6\u76D2\u76DE\u76E1\u76E5\u76E7\u76EA\u862F\u76FB\u7708\u7707\u7704\u7729\u7724\u771E\u7725\u7726\u771B\u7737\u7738\u7747\u775A\u7768\u776B\u775B\u7765\u777F\u777E\u7779\u778E\u778B\u7791\u77A0\u779E\u77B0\u77B6\u77B9\u77BF\u77BC\u77BD\u77BB\u77C7\u77CD\u77D7\u77DA\u77DC\u77E3\u77EE\u77FC\u780C\u7812\u7926\u7820\u792A\u7845\u788E\u7874\u7886\u787C\u789A\u788C\u78A3\u78B5\u78AA\u78AF\u78D1\u78C6\u78CB\u78D4\u78BE\u78BC\u78C5\u78CA\u78EC"], + ["e3a1", "\u78E7\u78DA\u78FD\u78F4\u7907\u7912\u7911\u7919\u792C\u792B\u7940\u7960\u7957\u795F\u795A\u7955\u7953\u797A\u797F\u798A\u799D\u79A7\u9F4B\u79AA\u79AE\u79B3\u79B9\u79BA\u79C9\u79D5\u79E7\u79EC\u79E1\u79E3\u7A08\u7A0D\u7A18\u7A19\u7A20\u7A1F\u7980\u7A31\u7A3B\u7A3E\u7A37\u7A43\u7A57\u7A49\u7A61\u7A62\u7A69\u9F9D\u7A70\u7A79\u7A7D\u7A88\u7A97\u7A95\u7A98\u7A96\u7AA9\u7AC8\u7AB0\u7AB6\u7AC5\u7AC4\u7ABF\u9083\u7AC7\u7ACA\u7ACD\u7ACF\u7AD5\u7AD3\u7AD9\u7ADA\u7ADD\u7AE1\u7AE2\u7AE6\u7AED\u7AF0\u7B02\u7B0F\u7B0A\u7B06\u7B33\u7B18\u7B19\u7B1E\u7B35\u7B28\u7B36\u7B50"], + ["e4a1", "\u7B7A\u7B04\u7B4D\u7B0B\u7B4C\u7B45\u7B75\u7B65\u7B74\u7B67\u7B70\u7B71\u7B6C\u7B6E\u7B9D\u7B98\u7B9F\u7B8D\u7B9C\u7B9A\u7B8B\u7B92\u7B8F\u7B5D\u7B99\u7BCB\u7BC1\u7BCC\u7BCF\u7BB4\u7BC6\u7BDD\u7BE9\u7C11\u7C14\u7BE6\u7BE5\u7C60\u7C00\u7C07\u7C13\u7BF3\u7BF7\u7C17\u7C0D\u7BF6\u7C23\u7C27\u7C2A\u7C1F\u7C37\u7C2B\u7C3D\u7C4C\u7C43\u7C54\u7C4F\u7C40\u7C50\u7C58\u7C5F\u7C64\u7C56\u7C65\u7C6C\u7C75\u7C83\u7C90\u7CA4\u7CAD\u7CA2\u7CAB\u7CA1\u7CA8\u7CB3\u7CB2\u7CB1\u7CAE\u7CB9\u7CBD\u7CC0\u7CC5\u7CC2\u7CD8\u7CD2\u7CDC\u7CE2\u9B3B\u7CEF\u7CF2\u7CF4\u7CF6\u7CFA\u7D06"], + ["e5a1", "\u7D02\u7D1C\u7D15\u7D0A\u7D45\u7D4B\u7D2E\u7D32\u7D3F\u7D35\u7D46\u7D73\u7D56\u7D4E\u7D72\u7D68\u7D6E\u7D4F\u7D63\u7D93\u7D89\u7D5B\u7D8F\u7D7D\u7D9B\u7DBA\u7DAE\u7DA3\u7DB5\u7DC7\u7DBD\u7DAB\u7E3D\u7DA2\u7DAF\u7DDC\u7DB8\u7D9F\u7DB0\u7DD8\u7DDD\u7DE4\u7DDE\u7DFB\u7DF2\u7DE1\u7E05\u7E0A\u7E23\u7E21\u7E12\u7E31\u7E1F\u7E09\u7E0B\u7E22\u7E46\u7E66\u7E3B\u7E35\u7E39\u7E43\u7E37\u7E32\u7E3A\u7E67\u7E5D\u7E56\u7E5E\u7E59\u7E5A\u7E79\u7E6A\u7E69\u7E7C\u7E7B\u7E83\u7DD5\u7E7D\u8FAE\u7E7F\u7E88\u7E89\u7E8C\u7E92\u7E90\u7E93\u7E94\u7E96\u7E8E\u7E9B\u7E9C\u7F38\u7F3A"], + ["e6a1", "\u7F45\u7F4C\u7F4D\u7F4E\u7F50\u7F51\u7F55\u7F54\u7F58\u7F5F\u7F60\u7F68\u7F69\u7F67\u7F78\u7F82\u7F86\u7F83\u7F88\u7F87\u7F8C\u7F94\u7F9E\u7F9D\u7F9A\u7FA3\u7FAF\u7FB2\u7FB9\u7FAE\u7FB6\u7FB8\u8B71\u7FC5\u7FC6\u7FCA\u7FD5\u7FD4\u7FE1\u7FE6\u7FE9\u7FF3\u7FF9\u98DC\u8006\u8004\u800B\u8012\u8018\u8019\u801C\u8021\u8028\u803F\u803B\u804A\u8046\u8052\u8058\u805A\u805F\u8062\u8068\u8073\u8072\u8070\u8076\u8079\u807D\u807F\u8084\u8086\u8085\u809B\u8093\u809A\u80AD\u5190\u80AC\u80DB\u80E5\u80D9\u80DD\u80C4\u80DA\u80D6\u8109\u80EF\u80F1\u811B\u8129\u8123\u812F\u814B"], + ["e7a1", "\u968B\u8146\u813E\u8153\u8151\u80FC\u8171\u816E\u8165\u8166\u8174\u8183\u8188\u818A\u8180\u8182\u81A0\u8195\u81A4\u81A3\u815F\u8193\u81A9\u81B0\u81B5\u81BE\u81B8\u81BD\u81C0\u81C2\u81BA\u81C9\u81CD\u81D1\u81D9\u81D8\u81C8\u81DA\u81DF\u81E0\u81E7\u81FA\u81FB\u81FE\u8201\u8202\u8205\u8207\u820A\u820D\u8210\u8216\u8229\u822B\u8238\u8233\u8240\u8259\u8258\u825D\u825A\u825F\u8264\u8262\u8268\u826A\u826B\u822E\u8271\u8277\u8278\u827E\u828D\u8292\u82AB\u829F\u82BB\u82AC\u82E1\u82E3\u82DF\u82D2\u82F4\u82F3\u82FA\u8393\u8303\u82FB\u82F9\u82DE\u8306\u82DC\u8309\u82D9"], + ["e8a1", "\u8335\u8334\u8316\u8332\u8331\u8340\u8339\u8350\u8345\u832F\u832B\u8317\u8318\u8385\u839A\u83AA\u839F\u83A2\u8396\u8323\u838E\u8387\u838A\u837C\u83B5\u8373\u8375\u83A0\u8389\u83A8\u83F4\u8413\u83EB\u83CE\u83FD\u8403\u83D8\u840B\u83C1\u83F7\u8407\u83E0\u83F2\u840D\u8422\u8420\u83BD\u8438\u8506\u83FB\u846D\u842A\u843C\u855A\u8484\u8477\u846B\u84AD\u846E\u8482\u8469\u8446\u842C\u846F\u8479\u8435\u84CA\u8462\u84B9\u84BF\u849F\u84D9\u84CD\u84BB\u84DA\u84D0\u84C1\u84C6\u84D6\u84A1\u8521\u84FF\u84F4\u8517\u8518\u852C\u851F\u8515\u8514\u84FC\u8540\u8563\u8558\u8548"], + ["e9a1", "\u8541\u8602\u854B\u8555\u8580\u85A4\u8588\u8591\u858A\u85A8\u856D\u8594\u859B\u85EA\u8587\u859C\u8577\u857E\u8590\u85C9\u85BA\u85CF\u85B9\u85D0\u85D5\u85DD\u85E5\u85DC\u85F9\u860A\u8613\u860B\u85FE\u85FA\u8606\u8622\u861A\u8630\u863F\u864D\u4E55\u8654\u865F\u8667\u8671\u8693\u86A3\u86A9\u86AA\u868B\u868C\u86B6\u86AF\u86C4\u86C6\u86B0\u86C9\u8823\u86AB\u86D4\u86DE\u86E9\u86EC\u86DF\u86DB\u86EF\u8712\u8706\u8708\u8700\u8703\u86FB\u8711\u8709\u870D\u86F9\u870A\u8734\u873F\u8737\u873B\u8725\u8729\u871A\u8760\u875F\u8778\u874C\u874E\u8774\u8757\u8768\u876E\u8759"], + ["eaa1", "\u8753\u8763\u876A\u8805\u87A2\u879F\u8782\u87AF\u87CB\u87BD\u87C0\u87D0\u96D6\u87AB\u87C4\u87B3\u87C7\u87C6\u87BB\u87EF\u87F2\u87E0\u880F\u880D\u87FE\u87F6\u87F7\u880E\u87D2\u8811\u8816\u8815\u8822\u8821\u8831\u8836\u8839\u8827\u883B\u8844\u8842\u8852\u8859\u885E\u8862\u886B\u8881\u887E\u889E\u8875\u887D\u88B5\u8872\u8882\u8897\u8892\u88AE\u8899\u88A2\u888D\u88A4\u88B0\u88BF\u88B1\u88C3\u88C4\u88D4\u88D8\u88D9\u88DD\u88F9\u8902\u88FC\u88F4\u88E8\u88F2\u8904\u890C\u890A\u8913\u8943\u891E\u8925\u892A\u892B\u8941\u8944\u893B\u8936\u8938\u894C\u891D\u8960\u895E"], + ["eba1", "\u8966\u8964\u896D\u896A\u896F\u8974\u8977\u897E\u8983\u8988\u898A\u8993\u8998\u89A1\u89A9\u89A6\u89AC\u89AF\u89B2\u89BA\u89BD\u89BF\u89C0\u89DA\u89DC\u89DD\u89E7\u89F4\u89F8\u8A03\u8A16\u8A10\u8A0C\u8A1B\u8A1D\u8A25\u8A36\u8A41\u8A5B\u8A52\u8A46\u8A48\u8A7C\u8A6D\u8A6C\u8A62\u8A85\u8A82\u8A84\u8AA8\u8AA1\u8A91\u8AA5\u8AA6\u8A9A\u8AA3\u8AC4\u8ACD\u8AC2\u8ADA\u8AEB\u8AF3\u8AE7\u8AE4\u8AF1\u8B14\u8AE0\u8AE2\u8AF7\u8ADE\u8ADB\u8B0C\u8B07\u8B1A\u8AE1\u8B16\u8B10\u8B17\u8B20\u8B33\u97AB\u8B26\u8B2B\u8B3E\u8B28\u8B41\u8B4C\u8B4F\u8B4E\u8B49\u8B56\u8B5B\u8B5A\u8B6B"], + ["eca1", "\u8B5F\u8B6C\u8B6F\u8B74\u8B7D\u8B80\u8B8C\u8B8E\u8B92\u8B93\u8B96\u8B99\u8B9A\u8C3A\u8C41\u8C3F\u8C48\u8C4C\u8C4E\u8C50\u8C55\u8C62\u8C6C\u8C78\u8C7A\u8C82\u8C89\u8C85\u8C8A\u8C8D\u8C8E\u8C94\u8C7C\u8C98\u621D\u8CAD\u8CAA\u8CBD\u8CB2\u8CB3\u8CAE\u8CB6\u8CC8\u8CC1\u8CE4\u8CE3\u8CDA\u8CFD\u8CFA\u8CFB\u8D04\u8D05\u8D0A\u8D07\u8D0F\u8D0D\u8D10\u9F4E\u8D13\u8CCD\u8D14\u8D16\u8D67\u8D6D\u8D71\u8D73\u8D81\u8D99\u8DC2\u8DBE\u8DBA\u8DCF\u8DDA\u8DD6\u8DCC\u8DDB\u8DCB\u8DEA\u8DEB\u8DDF\u8DE3\u8DFC\u8E08\u8E09\u8DFF\u8E1D\u8E1E\u8E10\u8E1F\u8E42\u8E35\u8E30\u8E34\u8E4A"], + ["eda1", "\u8E47\u8E49\u8E4C\u8E50\u8E48\u8E59\u8E64\u8E60\u8E2A\u8E63\u8E55\u8E76\u8E72\u8E7C\u8E81\u8E87\u8E85\u8E84\u8E8B\u8E8A\u8E93\u8E91\u8E94\u8E99\u8EAA\u8EA1\u8EAC\u8EB0\u8EC6\u8EB1\u8EBE\u8EC5\u8EC8\u8ECB\u8EDB\u8EE3\u8EFC\u8EFB\u8EEB\u8EFE\u8F0A\u8F05\u8F15\u8F12\u8F19\u8F13\u8F1C\u8F1F\u8F1B\u8F0C\u8F26\u8F33\u8F3B\u8F39\u8F45\u8F42\u8F3E\u8F4C\u8F49\u8F46\u8F4E\u8F57\u8F5C\u8F62\u8F63\u8F64\u8F9C\u8F9F\u8FA3\u8FAD\u8FAF\u8FB7\u8FDA\u8FE5\u8FE2\u8FEA\u8FEF\u9087\u8FF4\u9005\u8FF9\u8FFA\u9011\u9015\u9021\u900D\u901E\u9016\u900B\u9027\u9036\u9035\u9039\u8FF8"], + ["eea1", "\u904F\u9050\u9051\u9052\u900E\u9049\u903E\u9056\u9058\u905E\u9068\u906F\u9076\u96A8\u9072\u9082\u907D\u9081\u9080\u908A\u9089\u908F\u90A8\u90AF\u90B1\u90B5\u90E2\u90E4\u6248\u90DB\u9102\u9112\u9119\u9132\u9130\u914A\u9156\u9158\u9163\u9165\u9169\u9173\u9172\u918B\u9189\u9182\u91A2\u91AB\u91AF\u91AA\u91B5\u91B4\u91BA\u91C0\u91C1\u91C9\u91CB\u91D0\u91D6\u91DF\u91E1\u91DB\u91FC\u91F5\u91F6\u921E\u91FF\u9214\u922C\u9215\u9211\u925E\u9257\u9245\u9249\u9264\u9248\u9295\u923F\u924B\u9250\u929C\u9296\u9293\u929B\u925A\u92CF\u92B9\u92B7\u92E9\u930F\u92FA\u9344\u932E"], + ["efa1", "\u9319\u9322\u931A\u9323\u933A\u9335\u933B\u935C\u9360\u937C\u936E\u9356\u93B0\u93AC\u93AD\u9394\u93B9\u93D6\u93D7\u93E8\u93E5\u93D8\u93C3\u93DD\u93D0\u93C8\u93E4\u941A\u9414\u9413\u9403\u9407\u9410\u9436\u942B\u9435\u9421\u943A\u9441\u9452\u9444\u945B\u9460\u9462\u945E\u946A\u9229\u9470\u9475\u9477\u947D\u945A\u947C\u947E\u9481\u947F\u9582\u9587\u958A\u9594\u9596\u9598\u9599\u95A0\u95A8\u95A7\u95AD\u95BC\u95BB\u95B9\u95BE\u95CA\u6FF6\u95C3\u95CD\u95CC\u95D5\u95D4\u95D6\u95DC\u95E1\u95E5\u95E2\u9621\u9628\u962E\u962F\u9642\u964C\u964F\u964B\u9677\u965C\u965E"], + ["f0a1", "\u965D\u965F\u9666\u9672\u966C\u968D\u9698\u9695\u9697\u96AA\u96A7\u96B1\u96B2\u96B0\u96B4\u96B6\u96B8\u96B9\u96CE\u96CB\u96C9\u96CD\u894D\u96DC\u970D\u96D5\u96F9\u9704\u9706\u9708\u9713\u970E\u9711\u970F\u9716\u9719\u9724\u972A\u9730\u9739\u973D\u973E\u9744\u9746\u9748\u9742\u9749\u975C\u9760\u9764\u9766\u9768\u52D2\u976B\u9771\u9779\u9785\u977C\u9781\u977A\u9786\u978B\u978F\u9790\u979C\u97A8\u97A6\u97A3\u97B3\u97B4\u97C3\u97C6\u97C8\u97CB\u97DC\u97ED\u9F4F\u97F2\u7ADF\u97F6\u97F5\u980F\u980C\u9838\u9824\u9821\u9837\u983D\u9846\u984F\u984B\u986B\u986F\u9870"], + ["f1a1", "\u9871\u9874\u9873\u98AA\u98AF\u98B1\u98B6\u98C4\u98C3\u98C6\u98E9\u98EB\u9903\u9909\u9912\u9914\u9918\u9921\u991D\u991E\u9924\u9920\u992C\u992E\u993D\u993E\u9942\u9949\u9945\u9950\u994B\u9951\u9952\u994C\u9955\u9997\u9998\u99A5\u99AD\u99AE\u99BC\u99DF\u99DB\u99DD\u99D8\u99D1\u99ED\u99EE\u99F1\u99F2\u99FB\u99F8\u9A01\u9A0F\u9A05\u99E2\u9A19\u9A2B\u9A37\u9A45\u9A42\u9A40\u9A43\u9A3E\u9A55\u9A4D\u9A5B\u9A57\u9A5F\u9A62\u9A65\u9A64\u9A69\u9A6B\u9A6A\u9AAD\u9AB0\u9ABC\u9AC0\u9ACF\u9AD1\u9AD3\u9AD4\u9ADE\u9ADF\u9AE2\u9AE3\u9AE6\u9AEF\u9AEB\u9AEE\u9AF4\u9AF1\u9AF7"], + ["f2a1", "\u9AFB\u9B06\u9B18\u9B1A\u9B1F\u9B22\u9B23\u9B25\u9B27\u9B28\u9B29\u9B2A\u9B2E\u9B2F\u9B32\u9B44\u9B43\u9B4F\u9B4D\u9B4E\u9B51\u9B58\u9B74\u9B93\u9B83\u9B91\u9B96\u9B97\u9B9F\u9BA0\u9BA8\u9BB4\u9BC0\u9BCA\u9BB9\u9BC6\u9BCF\u9BD1\u9BD2\u9BE3\u9BE2\u9BE4\u9BD4\u9BE1\u9C3A\u9BF2\u9BF1\u9BF0\u9C15\u9C14\u9C09\u9C13\u9C0C\u9C06\u9C08\u9C12\u9C0A\u9C04\u9C2E\u9C1B\u9C25\u9C24\u9C21\u9C30\u9C47\u9C32\u9C46\u9C3E\u9C5A\u9C60\u9C67\u9C76\u9C78\u9CE7\u9CEC\u9CF0\u9D09\u9D08\u9CEB\u9D03\u9D06\u9D2A\u9D26\u9DAF\u9D23\u9D1F\u9D44\u9D15\u9D12\u9D41\u9D3F\u9D3E\u9D46\u9D48"], + ["f3a1", "\u9D5D\u9D5E\u9D64\u9D51\u9D50\u9D59\u9D72\u9D89\u9D87\u9DAB\u9D6F\u9D7A\u9D9A\u9DA4\u9DA9\u9DB2\u9DC4\u9DC1\u9DBB\u9DB8\u9DBA\u9DC6\u9DCF\u9DC2\u9DD9\u9DD3\u9DF8\u9DE6\u9DED\u9DEF\u9DFD\u9E1A\u9E1B\u9E1E\u9E75\u9E79\u9E7D\u9E81\u9E88\u9E8B\u9E8C\u9E92\u9E95\u9E91\u9E9D\u9EA5\u9EA9\u9EB8\u9EAA\u9EAD\u9761\u9ECC\u9ECE\u9ECF\u9ED0\u9ED4\u9EDC\u9EDE\u9EDD\u9EE0\u9EE5\u9EE8\u9EEF\u9EF4\u9EF6\u9EF7\u9EF9\u9EFB\u9EFC\u9EFD\u9F07\u9F08\u76B7\u9F15\u9F21\u9F2C\u9F3E\u9F4A\u9F52\u9F54\u9F63\u9F5F\u9F60\u9F61\u9F66\u9F67\u9F6C\u9F6A\u9F77\u9F72\u9F76\u9F95\u9F9C\u9FA0"], + ["f4a1", "\u582F\u69C7\u9059\u7464\u51DC\u7199"], + ["f9a1", "\u7E8A\u891C\u9348\u9288\u84DC\u4FC9\u70BB\u6631\u68C8\u92F9\u66FB\u5F45\u4E28\u4EE1\u4EFC\u4F00\u4F03\u4F39\u4F56\u4F92\u4F8A\u4F9A\u4F94\u4FCD\u5040\u5022\u4FFF\u501E\u5046\u5070\u5042\u5094\u50F4\u50D8\u514A\u5164\u519D\u51BE\u51EC\u5215\u529C\u52A6\u52C0\u52DB\u5300\u5307\u5324\u5372\u5393\u53B2\u53DD\uFA0E\u549C\u548A\u54A9\u54FF\u5586\u5759\u5765\u57AC\u57C8\u57C7\uFA0F\uFA10\u589E\u58B2\u590B\u5953\u595B\u595D\u5963\u59A4\u59BA\u5B56\u5BC0\u752F\u5BD8\u5BEC\u5C1E\u5CA6\u5CBA\u5CF5\u5D27\u5D53\uFA11\u5D42\u5D6D\u5DB8\u5DB9\u5DD0\u5F21\u5F34\u5F67\u5FB7"], + ["faa1", "\u5FDE\u605D\u6085\u608A\u60DE\u60D5\u6120\u60F2\u6111\u6137\u6130\u6198\u6213\u62A6\u63F5\u6460\u649D\u64CE\u654E\u6600\u6615\u663B\u6609\u662E\u661E\u6624\u6665\u6657\u6659\uFA12\u6673\u6699\u66A0\u66B2\u66BF\u66FA\u670E\uF929\u6766\u67BB\u6852\u67C0\u6801\u6844\u68CF\uFA13\u6968\uFA14\u6998\u69E2\u6A30\u6A6B\u6A46\u6A73\u6A7E\u6AE2\u6AE4\u6BD6\u6C3F\u6C5C\u6C86\u6C6F\u6CDA\u6D04\u6D87\u6D6F\u6D96\u6DAC\u6DCF\u6DF8\u6DF2\u6DFC\u6E39\u6E5C\u6E27\u6E3C\u6EBF\u6F88\u6FB5\u6FF5\u7005\u7007\u7028\u7085\u70AB\u710F\u7104\u715C\u7146\u7147\uFA15\u71C1\u71FE\u72B1"], + ["fba1", "\u72BE\u7324\uFA16\u7377\u73BD\u73C9\u73D6\u73E3\u73D2\u7407\u73F5\u7426\u742A\u7429\u742E\u7462\u7489\u749F\u7501\u756F\u7682\u769C\u769E\u769B\u76A6\uFA17\u7746\u52AF\u7821\u784E\u7864\u787A\u7930\uFA18\uFA19\uFA1A\u7994\uFA1B\u799B\u7AD1\u7AE7\uFA1C\u7AEB\u7B9E\uFA1D\u7D48\u7D5C\u7DB7\u7DA0\u7DD6\u7E52\u7F47\u7FA1\uFA1E\u8301\u8362\u837F\u83C7\u83F6\u8448\u84B4\u8553\u8559\u856B\uFA1F\u85B0\uFA20\uFA21\u8807\u88F5\u8A12\u8A37\u8A79\u8AA7\u8ABE\u8ADF\uFA22\u8AF6\u8B53\u8B7F\u8CF0\u8CF4\u8D12\u8D76\uFA23\u8ECF\uFA24\uFA25\u9067\u90DE\uFA26\u9115\u9127\u91DA"], + ["fca1", "\u91D7\u91DE\u91ED\u91EE\u91E4\u91E5\u9206\u9210\u920A\u923A\u9240\u923C\u924E\u9259\u9251\u9239\u9267\u92A7\u9277\u9278\u92E7\u92D7\u92D9\u92D0\uFA27\u92D5\u92E0\u92D3\u9325\u9321\u92FB\uFA28\u931E\u92FF\u931D\u9302\u9370\u9357\u93A4\u93C6\u93DE\u93F8\u9431\u9445\u9448\u9592\uF9DC\uFA29\u969D\u96AF\u9733\u973B\u9743\u974D\u974F\u9751\u9755\u9857\u9865\uFA2A\uFA2B\u9927\uFA2C\u999E\u9A4E\u9AD9\u9ADC\u9B75\u9B72\u9B8F\u9BB1\u9BBB\u9C00\u9D70\u9D6B\uFA2D\u9E19\u9ED1"], + ["fcf1", "\u2170", 9, "\uFFE2\uFFE4\uFF07\uFF02"], + ["8fa2af", "\u02D8\u02C7\xB8\u02D9\u02DD\xAF\u02DB\u02DA\uFF5E\u0384\u0385"], + ["8fa2c2", "\xA1\xA6\xBF"], + ["8fa2eb", "\xBA\xAA\xA9\xAE\u2122\xA4\u2116"], + ["8fa6e1", "\u0386\u0388\u0389\u038A\u03AA"], + ["8fa6e7", "\u038C"], + ["8fa6e9", "\u038E\u03AB"], + ["8fa6ec", "\u038F"], + ["8fa6f1", "\u03AC\u03AD\u03AE\u03AF\u03CA\u0390\u03CC\u03C2\u03CD\u03CB\u03B0\u03CE"], + ["8fa7c2", "\u0402", 10, "\u040E\u040F"], + ["8fa7f2", "\u0452", 10, "\u045E\u045F"], + ["8fa9a1", "\xC6\u0110"], + ["8fa9a4", "\u0126"], + ["8fa9a6", "\u0132"], + ["8fa9a8", "\u0141\u013F"], + ["8fa9ab", "\u014A\xD8\u0152"], + ["8fa9af", "\u0166\xDE"], + ["8fa9c1", "\xE6\u0111\xF0\u0127\u0131\u0133\u0138\u0142\u0140\u0149\u014B\xF8\u0153\xDF\u0167\xFE"], + ["8faaa1", "\xC1\xC0\xC4\xC2\u0102\u01CD\u0100\u0104\xC5\xC3\u0106\u0108\u010C\xC7\u010A\u010E\xC9\xC8\xCB\xCA\u011A\u0116\u0112\u0118"], + ["8faaba", "\u011C\u011E\u0122\u0120\u0124\xCD\xCC\xCF\xCE\u01CF\u0130\u012A\u012E\u0128\u0134\u0136\u0139\u013D\u013B\u0143\u0147\u0145\xD1\xD3\xD2\xD6\xD4\u01D1\u0150\u014C\xD5\u0154\u0158\u0156\u015A\u015C\u0160\u015E\u0164\u0162\xDA\xD9\xDC\xDB\u016C\u01D3\u0170\u016A\u0172\u016E\u0168\u01D7\u01DB\u01D9\u01D5\u0174\xDD\u0178\u0176\u0179\u017D\u017B"], + ["8faba1", "\xE1\xE0\xE4\xE2\u0103\u01CE\u0101\u0105\xE5\xE3\u0107\u0109\u010D\xE7\u010B\u010F\xE9\xE8\xEB\xEA\u011B\u0117\u0113\u0119\u01F5\u011D\u011F"], + ["8fabbd", "\u0121\u0125\xED\xEC\xEF\xEE\u01D0"], + ["8fabc5", "\u012B\u012F\u0129\u0135\u0137\u013A\u013E\u013C\u0144\u0148\u0146\xF1\xF3\xF2\xF6\xF4\u01D2\u0151\u014D\xF5\u0155\u0159\u0157\u015B\u015D\u0161\u015F\u0165\u0163\xFA\xF9\xFC\xFB\u016D\u01D4\u0171\u016B\u0173\u016F\u0169\u01D8\u01DC\u01DA\u01D6\u0175\xFD\xFF\u0177\u017A\u017E\u017C"], + ["8fb0a1", "\u4E02\u4E04\u4E05\u4E0C\u4E12\u4E1F\u4E23\u4E24\u4E28\u4E2B\u4E2E\u4E2F\u4E30\u4E35\u4E40\u4E41\u4E44\u4E47\u4E51\u4E5A\u4E5C\u4E63\u4E68\u4E69\u4E74\u4E75\u4E79\u4E7F\u4E8D\u4E96\u4E97\u4E9D\u4EAF\u4EB9\u4EC3\u4ED0\u4EDA\u4EDB\u4EE0\u4EE1\u4EE2\u4EE8\u4EEF\u4EF1\u4EF3\u4EF5\u4EFD\u4EFE\u4EFF\u4F00\u4F02\u4F03\u4F08\u4F0B\u4F0C\u4F12\u4F15\u4F16\u4F17\u4F19\u4F2E\u4F31\u4F60\u4F33\u4F35\u4F37\u4F39\u4F3B\u4F3E\u4F40\u4F42\u4F48\u4F49\u4F4B\u4F4C\u4F52\u4F54\u4F56\u4F58\u4F5F\u4F63\u4F6A\u4F6C\u4F6E\u4F71\u4F77\u4F78\u4F79\u4F7A\u4F7D\u4F7E\u4F81\u4F82\u4F84"], + ["8fb1a1", "\u4F85\u4F89\u4F8A\u4F8C\u4F8E\u4F90\u4F92\u4F93\u4F94\u4F97\u4F99\u4F9A\u4F9E\u4F9F\u4FB2\u4FB7\u4FB9\u4FBB\u4FBC\u4FBD\u4FBE\u4FC0\u4FC1\u4FC5\u4FC6\u4FC8\u4FC9\u4FCB\u4FCC\u4FCD\u4FCF\u4FD2\u4FDC\u4FE0\u4FE2\u4FF0\u4FF2\u4FFC\u4FFD\u4FFF\u5000\u5001\u5004\u5007\u500A\u500C\u500E\u5010\u5013\u5017\u5018\u501B\u501C\u501D\u501E\u5022\u5027\u502E\u5030\u5032\u5033\u5035\u5040\u5041\u5042\u5045\u5046\u504A\u504C\u504E\u5051\u5052\u5053\u5057\u5059\u505F\u5060\u5062\u5063\u5066\u5067\u506A\u506D\u5070\u5071\u503B\u5081\u5083\u5084\u5086\u508A\u508E\u508F\u5090"], + ["8fb2a1", "\u5092\u5093\u5094\u5096\u509B\u509C\u509E", 4, "\u50AA\u50AF\u50B0\u50B9\u50BA\u50BD\u50C0\u50C3\u50C4\u50C7\u50CC\u50CE\u50D0\u50D3\u50D4\u50D8\u50DC\u50DD\u50DF\u50E2\u50E4\u50E6\u50E8\u50E9\u50EF\u50F1\u50F6\u50FA\u50FE\u5103\u5106\u5107\u5108\u510B\u510C\u510D\u510E\u50F2\u5110\u5117\u5119\u511B\u511C\u511D\u511E\u5123\u5127\u5128\u512C\u512D\u512F\u5131\u5133\u5134\u5135\u5138\u5139\u5142\u514A\u514F\u5153\u5155\u5157\u5158\u515F\u5164\u5166\u517E\u5183\u5184\u518B\u518E\u5198\u519D\u51A1\u51A3\u51AD\u51B8\u51BA\u51BC\u51BE\u51BF\u51C2"], + ["8fb3a1", "\u51C8\u51CF\u51D1\u51D2\u51D3\u51D5\u51D8\u51DE\u51E2\u51E5\u51EE\u51F2\u51F3\u51F4\u51F7\u5201\u5202\u5205\u5212\u5213\u5215\u5216\u5218\u5222\u5228\u5231\u5232\u5235\u523C\u5245\u5249\u5255\u5257\u5258\u525A\u525C\u525F\u5260\u5261\u5266\u526E\u5277\u5278\u5279\u5280\u5282\u5285\u528A\u528C\u5293\u5295\u5296\u5297\u5298\u529A\u529C\u52A4\u52A5\u52A6\u52A7\u52AF\u52B0\u52B6\u52B7\u52B8\u52BA\u52BB\u52BD\u52C0\u52C4\u52C6\u52C8\u52CC\u52CF\u52D1\u52D4\u52D6\u52DB\u52DC\u52E1\u52E5\u52E8\u52E9\u52EA\u52EC\u52F0\u52F1\u52F4\u52F6\u52F7\u5300\u5303\u530A\u530B"], + ["8fb4a1", "\u530C\u5311\u5313\u5318\u531B\u531C\u531E\u531F\u5325\u5327\u5328\u5329\u532B\u532C\u532D\u5330\u5332\u5335\u533C\u533D\u533E\u5342\u534C\u534B\u5359\u535B\u5361\u5363\u5365\u536C\u536D\u5372\u5379\u537E\u5383\u5387\u5388\u538E\u5393\u5394\u5399\u539D\u53A1\u53A4\u53AA\u53AB\u53AF\u53B2\u53B4\u53B5\u53B7\u53B8\u53BA\u53BD\u53C0\u53C5\u53CF\u53D2\u53D3\u53D5\u53DA\u53DD\u53DE\u53E0\u53E6\u53E7\u53F5\u5402\u5413\u541A\u5421\u5427\u5428\u542A\u542F\u5431\u5434\u5435\u5443\u5444\u5447\u544D\u544F\u545E\u5462\u5464\u5466\u5467\u5469\u546B\u546D\u546E\u5474\u547F"], + ["8fb5a1", "\u5481\u5483\u5485\u5488\u5489\u548D\u5491\u5495\u5496\u549C\u549F\u54A1\u54A6\u54A7\u54A9\u54AA\u54AD\u54AE\u54B1\u54B7\u54B9\u54BA\u54BB\u54BF\u54C6\u54CA\u54CD\u54CE\u54E0\u54EA\u54EC\u54EF\u54F6\u54FC\u54FE\u54FF\u5500\u5501\u5505\u5508\u5509\u550C\u550D\u550E\u5515\u552A\u552B\u5532\u5535\u5536\u553B\u553C\u553D\u5541\u5547\u5549\u554A\u554D\u5550\u5551\u5558\u555A\u555B\u555E\u5560\u5561\u5564\u5566\u557F\u5581\u5582\u5586\u5588\u558E\u558F\u5591\u5592\u5593\u5594\u5597\u55A3\u55A4\u55AD\u55B2\u55BF\u55C1\u55C3\u55C6\u55C9\u55CB\u55CC\u55CE\u55D1\u55D2"], + ["8fb6a1", "\u55D3\u55D7\u55D8\u55DB\u55DE\u55E2\u55E9\u55F6\u55FF\u5605\u5608\u560A\u560D", 5, "\u5619\u562C\u5630\u5633\u5635\u5637\u5639\u563B\u563C\u563D\u563F\u5640\u5641\u5643\u5644\u5646\u5649\u564B\u564D\u564F\u5654\u565E\u5660\u5661\u5662\u5663\u5666\u5669\u566D\u566F\u5671\u5672\u5675\u5684\u5685\u5688\u568B\u568C\u5695\u5699\u569A\u569D\u569E\u569F\u56A6\u56A7\u56A8\u56A9\u56AB\u56AC\u56AD\u56B1\u56B3\u56B7\u56BE\u56C5\u56C9\u56CA\u56CB\u56CF\u56D0\u56CC\u56CD\u56D9\u56DC\u56DD\u56DF\u56E1\u56E4", 4, "\u56F1\u56EB\u56ED"], + ["8fb7a1", "\u56F6\u56F7\u5701\u5702\u5707\u570A\u570C\u5711\u5715\u571A\u571B\u571D\u5720\u5722\u5723\u5724\u5725\u5729\u572A\u572C\u572E\u572F\u5733\u5734\u573D\u573E\u573F\u5745\u5746\u574C\u574D\u5752\u5762\u5765\u5767\u5768\u576B\u576D", 4, "\u5773\u5774\u5775\u5777\u5779\u577A\u577B\u577C\u577E\u5781\u5783\u578C\u5794\u5797\u5799\u579A\u579C\u579D\u579E\u579F\u57A1\u5795\u57A7\u57A8\u57A9\u57AC\u57B8\u57BD\u57C7\u57C8\u57CC\u57CF\u57D5\u57DD\u57DE\u57E4\u57E6\u57E7\u57E9\u57ED\u57F0\u57F5\u57F6\u57F8\u57FD\u57FE\u57FF\u5803\u5804\u5808\u5809\u57E1"], + ["8fb8a1", "\u580C\u580D\u581B\u581E\u581F\u5820\u5826\u5827\u582D\u5832\u5839\u583F\u5849\u584C\u584D\u584F\u5850\u5855\u585F\u5861\u5864\u5867\u5868\u5878\u587C\u587F\u5880\u5881\u5887\u5888\u5889\u588A\u588C\u588D\u588F\u5890\u5894\u5896\u589D\u58A0\u58A1\u58A2\u58A6\u58A9\u58B1\u58B2\u58C4\u58BC\u58C2\u58C8\u58CD\u58CE\u58D0\u58D2\u58D4\u58D6\u58DA\u58DD\u58E1\u58E2\u58E9\u58F3\u5905\u5906\u590B\u590C\u5912\u5913\u5914\u8641\u591D\u5921\u5923\u5924\u5928\u592F\u5930\u5933\u5935\u5936\u593F\u5943\u5946\u5952\u5953\u5959\u595B\u595D\u595E\u595F\u5961\u5963\u596B\u596D"], + ["8fb9a1", "\u596F\u5972\u5975\u5976\u5979\u597B\u597C\u598B\u598C\u598E\u5992\u5995\u5997\u599F\u59A4\u59A7\u59AD\u59AE\u59AF\u59B0\u59B3\u59B7\u59BA\u59BC\u59C1\u59C3\u59C4\u59C8\u59CA\u59CD\u59D2\u59DD\u59DE\u59DF\u59E3\u59E4\u59E7\u59EE\u59EF\u59F1\u59F2\u59F4\u59F7\u5A00\u5A04\u5A0C\u5A0D\u5A0E\u5A12\u5A13\u5A1E\u5A23\u5A24\u5A27\u5A28\u5A2A\u5A2D\u5A30\u5A44\u5A45\u5A47\u5A48\u5A4C\u5A50\u5A55\u5A5E\u5A63\u5A65\u5A67\u5A6D\u5A77\u5A7A\u5A7B\u5A7E\u5A8B\u5A90\u5A93\u5A96\u5A99\u5A9C\u5A9E\u5A9F\u5AA0\u5AA2\u5AA7\u5AAC\u5AB1\u5AB2\u5AB3\u5AB5\u5AB8\u5ABA\u5ABB\u5ABF"], + ["8fbaa1", "\u5AC4\u5AC6\u5AC8\u5ACF\u5ADA\u5ADC\u5AE0\u5AE5\u5AEA\u5AEE\u5AF5\u5AF6\u5AFD\u5B00\u5B01\u5B08\u5B17\u5B34\u5B19\u5B1B\u5B1D\u5B21\u5B25\u5B2D\u5B38\u5B41\u5B4B\u5B4C\u5B52\u5B56\u5B5E\u5B68\u5B6E\u5B6F\u5B7C\u5B7D\u5B7E\u5B7F\u5B81\u5B84\u5B86\u5B8A\u5B8E\u5B90\u5B91\u5B93\u5B94\u5B96\u5BA8\u5BA9\u5BAC\u5BAD\u5BAF\u5BB1\u5BB2\u5BB7\u5BBA\u5BBC\u5BC0\u5BC1\u5BCD\u5BCF\u5BD6", 4, "\u5BE0\u5BEF\u5BF1\u5BF4\u5BFD\u5C0C\u5C17\u5C1E\u5C1F\u5C23\u5C26\u5C29\u5C2B\u5C2C\u5C2E\u5C30\u5C32\u5C35\u5C36\u5C59\u5C5A\u5C5C\u5C62\u5C63\u5C67\u5C68\u5C69"], + ["8fbba1", "\u5C6D\u5C70\u5C74\u5C75\u5C7A\u5C7B\u5C7C\u5C7D\u5C87\u5C88\u5C8A\u5C8F\u5C92\u5C9D\u5C9F\u5CA0\u5CA2\u5CA3\u5CA6\u5CAA\u5CB2\u5CB4\u5CB5\u5CBA\u5CC9\u5CCB\u5CD2\u5CDD\u5CD7\u5CEE\u5CF1\u5CF2\u5CF4\u5D01\u5D06\u5D0D\u5D12\u5D2B\u5D23\u5D24\u5D26\u5D27\u5D31\u5D34\u5D39\u5D3D\u5D3F\u5D42\u5D43\u5D46\u5D48\u5D55\u5D51\u5D59\u5D4A\u5D5F\u5D60\u5D61\u5D62\u5D64\u5D6A\u5D6D\u5D70\u5D79\u5D7A\u5D7E\u5D7F\u5D81\u5D83\u5D88\u5D8A\u5D92\u5D93\u5D94\u5D95\u5D99\u5D9B\u5D9F\u5DA0\u5DA7\u5DAB\u5DB0\u5DB4\u5DB8\u5DB9\u5DC3\u5DC7\u5DCB\u5DD0\u5DCE\u5DD8\u5DD9\u5DE0\u5DE4"], + ["8fbca1", "\u5DE9\u5DF8\u5DF9\u5E00\u5E07\u5E0D\u5E12\u5E14\u5E15\u5E18\u5E1F\u5E20\u5E2E\u5E28\u5E32\u5E35\u5E3E\u5E4B\u5E50\u5E49\u5E51\u5E56\u5E58\u5E5B\u5E5C\u5E5E\u5E68\u5E6A", 4, "\u5E70\u5E80\u5E8B\u5E8E\u5EA2\u5EA4\u5EA5\u5EA8\u5EAA\u5EAC\u5EB1\u5EB3\u5EBD\u5EBE\u5EBF\u5EC6\u5ECC\u5ECB\u5ECE\u5ED1\u5ED2\u5ED4\u5ED5\u5EDC\u5EDE\u5EE5\u5EEB\u5F02\u5F06\u5F07\u5F08\u5F0E\u5F19\u5F1C\u5F1D\u5F21\u5F22\u5F23\u5F24\u5F28\u5F2B\u5F2C\u5F2E\u5F30\u5F34\u5F36\u5F3B\u5F3D\u5F3F\u5F40\u5F44\u5F45\u5F47\u5F4D\u5F50\u5F54\u5F58\u5F5B\u5F60\u5F63\u5F64\u5F67"], + ["8fbda1", "\u5F6F\u5F72\u5F74\u5F75\u5F78\u5F7A\u5F7D\u5F7E\u5F89\u5F8D\u5F8F\u5F96\u5F9C\u5F9D\u5FA2\u5FA7\u5FAB\u5FA4\u5FAC\u5FAF\u5FB0\u5FB1\u5FB8\u5FC4\u5FC7\u5FC8\u5FC9\u5FCB\u5FD0", 4, "\u5FDE\u5FE1\u5FE2\u5FE8\u5FE9\u5FEA\u5FEC\u5FED\u5FEE\u5FEF\u5FF2\u5FF3\u5FF6\u5FFA\u5FFC\u6007\u600A\u600D\u6013\u6014\u6017\u6018\u601A\u601F\u6024\u602D\u6033\u6035\u6040\u6047\u6048\u6049\u604C\u6051\u6054\u6056\u6057\u605D\u6061\u6067\u6071\u607E\u607F\u6082\u6086\u6088\u608A\u608E\u6091\u6093\u6095\u6098\u609D\u609E\u60A2\u60A4\u60A5\u60A8\u60B0\u60B1\u60B7"], + ["8fbea1", "\u60BB\u60BE\u60C2\u60C4\u60C8\u60C9\u60CA\u60CB\u60CE\u60CF\u60D4\u60D5\u60D9\u60DB\u60DD\u60DE\u60E2\u60E5\u60F2\u60F5\u60F8\u60FC\u60FD\u6102\u6107\u610A\u610C\u6110", 4, "\u6116\u6117\u6119\u611C\u611E\u6122\u612A\u612B\u6130\u6131\u6135\u6136\u6137\u6139\u6141\u6145\u6146\u6149\u615E\u6160\u616C\u6172\u6178\u617B\u617C\u617F\u6180\u6181\u6183\u6184\u618B\u618D\u6192\u6193\u6197\u6198\u619C\u619D\u619F\u61A0\u61A5\u61A8\u61AA\u61AD\u61B8\u61B9\u61BC\u61C0\u61C1\u61C2\u61CE\u61CF\u61D5\u61DC\u61DD\u61DE\u61DF\u61E1\u61E2\u61E7\u61E9\u61E5"], + ["8fbfa1", "\u61EC\u61ED\u61EF\u6201\u6203\u6204\u6207\u6213\u6215\u621C\u6220\u6222\u6223\u6227\u6229\u622B\u6239\u623D\u6242\u6243\u6244\u6246\u624C\u6250\u6251\u6252\u6254\u6256\u625A\u625C\u6264\u626D\u626F\u6273\u627A\u627D\u628D\u628E\u628F\u6290\u62A6\u62A8\u62B3\u62B6\u62B7\u62BA\u62BE\u62BF\u62C4\u62CE\u62D5\u62D6\u62DA\u62EA\u62F2\u62F4\u62FC\u62FD\u6303\u6304\u630A\u630B\u630D\u6310\u6313\u6316\u6318\u6329\u632A\u632D\u6335\u6336\u6339\u633C\u6341\u6342\u6343\u6344\u6346\u634A\u634B\u634E\u6352\u6353\u6354\u6358\u635B\u6365\u6366\u636C\u636D\u6371\u6374\u6375"], + ["8fc0a1", "\u6378\u637C\u637D\u637F\u6382\u6384\u6387\u638A\u6390\u6394\u6395\u6399\u639A\u639E\u63A4\u63A6\u63AD\u63AE\u63AF\u63BD\u63C1\u63C5\u63C8\u63CE\u63D1\u63D3\u63D4\u63D5\u63DC\u63E0\u63E5\u63EA\u63EC\u63F2\u63F3\u63F5\u63F8\u63F9\u6409\u640A\u6410\u6412\u6414\u6418\u641E\u6420\u6422\u6424\u6425\u6429\u642A\u642F\u6430\u6435\u643D\u643F\u644B\u644F\u6451\u6452\u6453\u6454\u645A\u645B\u645C\u645D\u645F\u6460\u6461\u6463\u646D\u6473\u6474\u647B\u647D\u6485\u6487\u648F\u6490\u6491\u6498\u6499\u649B\u649D\u649F\u64A1\u64A3\u64A6\u64A8\u64AC\u64B3\u64BD\u64BE\u64BF"], + ["8fc1a1", "\u64C4\u64C9\u64CA\u64CB\u64CC\u64CE\u64D0\u64D1\u64D5\u64D7\u64E4\u64E5\u64E9\u64EA\u64ED\u64F0\u64F5\u64F7\u64FB\u64FF\u6501\u6504\u6508\u6509\u650A\u650F\u6513\u6514\u6516\u6519\u651B\u651E\u651F\u6522\u6526\u6529\u652E\u6531\u653A\u653C\u653D\u6543\u6547\u6549\u6550\u6552\u6554\u655F\u6560\u6567\u656B\u657A\u657D\u6581\u6585\u658A\u6592\u6595\u6598\u659D\u65A0\u65A3\u65A6\u65AE\u65B2\u65B3\u65B4\u65BF\u65C2\u65C8\u65C9\u65CE\u65D0\u65D4\u65D6\u65D8\u65DF\u65F0\u65F2\u65F4\u65F5\u65F9\u65FE\u65FF\u6600\u6604\u6608\u6609\u660D\u6611\u6612\u6615\u6616\u661D"], + ["8fc2a1", "\u661E\u6621\u6622\u6623\u6624\u6626\u6629\u662A\u662B\u662C\u662E\u6630\u6631\u6633\u6639\u6637\u6640\u6645\u6646\u664A\u664C\u6651\u664E\u6657\u6658\u6659\u665B\u665C\u6660\u6661\u66FB\u666A\u666B\u666C\u667E\u6673\u6675\u667F\u6677\u6678\u6679\u667B\u6680\u667C\u668B\u668C\u668D\u6690\u6692\u6699\u669A\u669B\u669C\u669F\u66A0\u66A4\u66AD\u66B1\u66B2\u66B5\u66BB\u66BF\u66C0\u66C2\u66C3\u66C8\u66CC\u66CE\u66CF\u66D4\u66DB\u66DF\u66E8\u66EB\u66EC\u66EE\u66FA\u6705\u6707\u670E\u6713\u6719\u671C\u6720\u6722\u6733\u673E\u6745\u6747\u6748\u674C\u6754\u6755\u675D"], + ["8fc3a1", "\u6766\u676C\u676E\u6774\u6776\u677B\u6781\u6784\u678E\u678F\u6791\u6793\u6796\u6798\u6799\u679B\u67B0\u67B1\u67B2\u67B5\u67BB\u67BC\u67BD\u67F9\u67C0\u67C2\u67C3\u67C5\u67C8\u67C9\u67D2\u67D7\u67D9\u67DC\u67E1\u67E6\u67F0\u67F2\u67F6\u67F7\u6852\u6814\u6819\u681D\u681F\u6828\u6827\u682C\u682D\u682F\u6830\u6831\u6833\u683B\u683F\u6844\u6845\u684A\u684C\u6855\u6857\u6858\u685B\u686B\u686E", 4, "\u6875\u6879\u687A\u687B\u687C\u6882\u6884\u6886\u6888\u6896\u6898\u689A\u689C\u68A1\u68A3\u68A5\u68A9\u68AA\u68AE\u68B2\u68BB\u68C5\u68C8\u68CC\u68CF"], + ["8fc4a1", "\u68D0\u68D1\u68D3\u68D6\u68D9\u68DC\u68DD\u68E5\u68E8\u68EA\u68EB\u68EC\u68ED\u68F0\u68F1\u68F5\u68F6\u68FB\u68FC\u68FD\u6906\u6909\u690A\u6910\u6911\u6913\u6916\u6917\u6931\u6933\u6935\u6938\u693B\u6942\u6945\u6949\u694E\u6957\u695B\u6963\u6964\u6965\u6966\u6968\u6969\u696C\u6970\u6971\u6972\u697A\u697B\u697F\u6980\u698D\u6992\u6996\u6998\u69A1\u69A5\u69A6\u69A8\u69AB\u69AD\u69AF\u69B7\u69B8\u69BA\u69BC\u69C5\u69C8\u69D1\u69D6\u69D7\u69E2\u69E5\u69EE\u69EF\u69F1\u69F3\u69F5\u69FE\u6A00\u6A01\u6A03\u6A0F\u6A11\u6A15\u6A1A\u6A1D\u6A20\u6A24\u6A28\u6A30\u6A32"], + ["8fc5a1", "\u6A34\u6A37\u6A3B\u6A3E\u6A3F\u6A45\u6A46\u6A49\u6A4A\u6A4E\u6A50\u6A51\u6A52\u6A55\u6A56\u6A5B\u6A64\u6A67\u6A6A\u6A71\u6A73\u6A7E\u6A81\u6A83\u6A86\u6A87\u6A89\u6A8B\u6A91\u6A9B\u6A9D\u6A9E\u6A9F\u6AA5\u6AAB\u6AAF\u6AB0\u6AB1\u6AB4\u6ABD\u6ABE\u6ABF\u6AC6\u6AC9\u6AC8\u6ACC\u6AD0\u6AD4\u6AD5\u6AD6\u6ADC\u6ADD\u6AE4\u6AE7\u6AEC\u6AF0\u6AF1\u6AF2\u6AFC\u6AFD\u6B02\u6B03\u6B06\u6B07\u6B09\u6B0F\u6B10\u6B11\u6B17\u6B1B\u6B1E\u6B24\u6B28\u6B2B\u6B2C\u6B2F\u6B35\u6B36\u6B3B\u6B3F\u6B46\u6B4A\u6B4D\u6B52\u6B56\u6B58\u6B5D\u6B60\u6B67\u6B6B\u6B6E\u6B70\u6B75\u6B7D"], + ["8fc6a1", "\u6B7E\u6B82\u6B85\u6B97\u6B9B\u6B9F\u6BA0\u6BA2\u6BA3\u6BA8\u6BA9\u6BAC\u6BAD\u6BAE\u6BB0\u6BB8\u6BB9\u6BBD\u6BBE\u6BC3\u6BC4\u6BC9\u6BCC\u6BD6\u6BDA\u6BE1\u6BE3\u6BE6\u6BE7\u6BEE\u6BF1\u6BF7\u6BF9\u6BFF\u6C02\u6C04\u6C05\u6C09\u6C0D\u6C0E\u6C10\u6C12\u6C19\u6C1F\u6C26\u6C27\u6C28\u6C2C\u6C2E\u6C33\u6C35\u6C36\u6C3A\u6C3B\u6C3F\u6C4A\u6C4B\u6C4D\u6C4F\u6C52\u6C54\u6C59\u6C5B\u6C5C\u6C6B\u6C6D\u6C6F\u6C74\u6C76\u6C78\u6C79\u6C7B\u6C85\u6C86\u6C87\u6C89\u6C94\u6C95\u6C97\u6C98\u6C9C\u6C9F\u6CB0\u6CB2\u6CB4\u6CC2\u6CC6\u6CCD\u6CCF\u6CD0\u6CD1\u6CD2\u6CD4\u6CD6"], + ["8fc7a1", "\u6CDA\u6CDC\u6CE0\u6CE7\u6CE9\u6CEB\u6CEC\u6CEE\u6CF2\u6CF4\u6D04\u6D07\u6D0A\u6D0E\u6D0F\u6D11\u6D13\u6D1A\u6D26\u6D27\u6D28\u6C67\u6D2E\u6D2F\u6D31\u6D39\u6D3C\u6D3F\u6D57\u6D5E\u6D5F\u6D61\u6D65\u6D67\u6D6F\u6D70\u6D7C\u6D82\u6D87\u6D91\u6D92\u6D94\u6D96\u6D97\u6D98\u6DAA\u6DAC\u6DB4\u6DB7\u6DB9\u6DBD\u6DBF\u6DC4\u6DC8\u6DCA\u6DCE\u6DCF\u6DD6\u6DDB\u6DDD\u6DDF\u6DE0\u6DE2\u6DE5\u6DE9\u6DEF\u6DF0\u6DF4\u6DF6\u6DFC\u6E00\u6E04\u6E1E\u6E22\u6E27\u6E32\u6E36\u6E39\u6E3B\u6E3C\u6E44\u6E45\u6E48\u6E49\u6E4B\u6E4F\u6E51\u6E52\u6E53\u6E54\u6E57\u6E5C\u6E5D\u6E5E"], + ["8fc8a1", "\u6E62\u6E63\u6E68\u6E73\u6E7B\u6E7D\u6E8D\u6E93\u6E99\u6EA0\u6EA7\u6EAD\u6EAE\u6EB1\u6EB3\u6EBB\u6EBF\u6EC0\u6EC1\u6EC3\u6EC7\u6EC8\u6ECA\u6ECD\u6ECE\u6ECF\u6EEB\u6EED\u6EEE\u6EF9\u6EFB\u6EFD\u6F04\u6F08\u6F0A\u6F0C\u6F0D\u6F16\u6F18\u6F1A\u6F1B\u6F26\u6F29\u6F2A\u6F2F\u6F30\u6F33\u6F36\u6F3B\u6F3C\u6F2D\u6F4F\u6F51\u6F52\u6F53\u6F57\u6F59\u6F5A\u6F5D\u6F5E\u6F61\u6F62\u6F68\u6F6C\u6F7D\u6F7E\u6F83\u6F87\u6F88\u6F8B\u6F8C\u6F8D\u6F90\u6F92\u6F93\u6F94\u6F96\u6F9A\u6F9F\u6FA0\u6FA5\u6FA6\u6FA7\u6FA8\u6FAE\u6FAF\u6FB0\u6FB5\u6FB6\u6FBC\u6FC5\u6FC7\u6FC8\u6FCA"], + ["8fc9a1", "\u6FDA\u6FDE\u6FE8\u6FE9\u6FF0\u6FF5\u6FF9\u6FFC\u6FFD\u7000\u7005\u7006\u7007\u700D\u7017\u7020\u7023\u702F\u7034\u7037\u7039\u703C\u7043\u7044\u7048\u7049\u704A\u704B\u7054\u7055\u705D\u705E\u704E\u7064\u7065\u706C\u706E\u7075\u7076\u707E\u7081\u7085\u7086\u7094", 4, "\u709B\u70A4\u70AB\u70B0\u70B1\u70B4\u70B7\u70CA\u70D1\u70D3\u70D4\u70D5\u70D6\u70D8\u70DC\u70E4\u70FA\u7103", 4, "\u710B\u710C\u710F\u711E\u7120\u712B\u712D\u712F\u7130\u7131\u7138\u7141\u7145\u7146\u7147\u714A\u714B\u7150\u7152\u7157\u715A\u715C\u715E\u7160"], + ["8fcaa1", "\u7168\u7179\u7180\u7185\u7187\u718C\u7192\u719A\u719B\u71A0\u71A2\u71AF\u71B0\u71B2\u71B3\u71BA\u71BF\u71C0\u71C1\u71C4\u71CB\u71CC\u71D3\u71D6\u71D9\u71DA\u71DC\u71F8\u71FE\u7200\u7207\u7208\u7209\u7213\u7217\u721A\u721D\u721F\u7224\u722B\u722F\u7234\u7238\u7239\u7241\u7242\u7243\u7245\u724E\u724F\u7250\u7253\u7255\u7256\u725A\u725C\u725E\u7260\u7263\u7268\u726B\u726E\u726F\u7271\u7277\u7278\u727B\u727C\u727F\u7284\u7289\u728D\u728E\u7293\u729B\u72A8\u72AD\u72AE\u72B1\u72B4\u72BE\u72C1\u72C7\u72C9\u72CC\u72D5\u72D6\u72D8\u72DF\u72E5\u72F3\u72F4\u72FA\u72FB"], + ["8fcba1", "\u72FE\u7302\u7304\u7305\u7307\u730B\u730D\u7312\u7313\u7318\u7319\u731E\u7322\u7324\u7327\u7328\u732C\u7331\u7332\u7335\u733A\u733B\u733D\u7343\u734D\u7350\u7352\u7356\u7358\u735D\u735E\u735F\u7360\u7366\u7367\u7369\u736B\u736C\u736E\u736F\u7371\u7377\u7379\u737C\u7380\u7381\u7383\u7385\u7386\u738E\u7390\u7393\u7395\u7397\u7398\u739C\u739E\u739F\u73A0\u73A2\u73A5\u73A6\u73AA\u73AB\u73AD\u73B5\u73B7\u73B9\u73BC\u73BD\u73BF\u73C5\u73C6\u73C9\u73CB\u73CC\u73CF\u73D2\u73D3\u73D6\u73D9\u73DD\u73E1\u73E3\u73E6\u73E7\u73E9\u73F4\u73F5\u73F7\u73F9\u73FA\u73FB\u73FD"], + ["8fcca1", "\u73FF\u7400\u7401\u7404\u7407\u740A\u7411\u741A\u741B\u7424\u7426\u7428", 9, "\u7439\u7440\u7443\u7444\u7446\u7447\u744B\u744D\u7451\u7452\u7457\u745D\u7462\u7466\u7467\u7468\u746B\u746D\u746E\u7471\u7472\u7480\u7481\u7485\u7486\u7487\u7489\u748F\u7490\u7491\u7492\u7498\u7499\u749A\u749C\u749F\u74A0\u74A1\u74A3\u74A6\u74A8\u74A9\u74AA\u74AB\u74AE\u74AF\u74B1\u74B2\u74B5\u74B9\u74BB\u74BF\u74C8\u74C9\u74CC\u74D0\u74D3\u74D8\u74DA\u74DB\u74DE\u74DF\u74E4\u74E8\u74EA\u74EB\u74EF\u74F4\u74FA\u74FB\u74FC\u74FF\u7506"], + ["8fcda1", "\u7512\u7516\u7517\u7520\u7521\u7524\u7527\u7529\u752A\u752F\u7536\u7539\u753D\u753E\u753F\u7540\u7543\u7547\u7548\u754E\u7550\u7552\u7557\u755E\u755F\u7561\u756F\u7571\u7579", 5, "\u7581\u7585\u7590\u7592\u7593\u7595\u7599\u759C\u75A2\u75A4\u75B4\u75BA\u75BF\u75C0\u75C1\u75C4\u75C6\u75CC\u75CE\u75CF\u75D7\u75DC\u75DF\u75E0\u75E1\u75E4\u75E7\u75EC\u75EE\u75EF\u75F1\u75F9\u7600\u7602\u7603\u7604\u7607\u7608\u760A\u760C\u760F\u7612\u7613\u7615\u7616\u7619\u761B\u761C\u761D\u761E\u7623\u7625\u7626\u7629\u762D\u7632\u7633\u7635\u7638\u7639"], + ["8fcea1", "\u763A\u763C\u764A\u7640\u7641\u7643\u7644\u7645\u7649\u764B\u7655\u7659\u765F\u7664\u7665\u766D\u766E\u766F\u7671\u7674\u7681\u7685\u768C\u768D\u7695\u769B\u769C\u769D\u769F\u76A0\u76A2", 6, "\u76AA\u76AD\u76BD\u76C1\u76C5\u76C9\u76CB\u76CC\u76CE\u76D4\u76D9\u76E0\u76E6\u76E8\u76EC\u76F0\u76F1\u76F6\u76F9\u76FC\u7700\u7706\u770A\u770E\u7712\u7714\u7715\u7717\u7719\u771A\u771C\u7722\u7728\u772D\u772E\u772F\u7734\u7735\u7736\u7739\u773D\u773E\u7742\u7745\u7746\u774A\u774D\u774E\u774F\u7752\u7756\u7757\u775C\u775E\u775F\u7760\u7762"], + ["8fcfa1", "\u7764\u7767\u776A\u776C\u7770\u7772\u7773\u7774\u777A\u777D\u7780\u7784\u778C\u778D\u7794\u7795\u7796\u779A\u779F\u77A2\u77A7\u77AA\u77AE\u77AF\u77B1\u77B5\u77BE\u77C3\u77C9\u77D1\u77D2\u77D5\u77D9\u77DE\u77DF\u77E0\u77E4\u77E6\u77EA\u77EC\u77F0\u77F1\u77F4\u77F8\u77FB\u7805\u7806\u7809\u780D\u780E\u7811\u781D\u7821\u7822\u7823\u782D\u782E\u7830\u7835\u7837\u7843\u7844\u7847\u7848\u784C\u784E\u7852\u785C\u785E\u7860\u7861\u7863\u7864\u7868\u786A\u786E\u787A\u787E\u788A\u788F\u7894\u7898\u78A1\u789D\u789E\u789F\u78A4\u78A8\u78AC\u78AD\u78B0\u78B1\u78B2\u78B3"], + ["8fd0a1", "\u78BB\u78BD\u78BF\u78C7\u78C8\u78C9\u78CC\u78CE\u78D2\u78D3\u78D5\u78D6\u78E4\u78DB\u78DF\u78E0\u78E1\u78E6\u78EA\u78F2\u78F3\u7900\u78F6\u78F7\u78FA\u78FB\u78FF\u7906\u790C\u7910\u791A\u791C\u791E\u791F\u7920\u7925\u7927\u7929\u792D\u7931\u7934\u7935\u793B\u793D\u793F\u7944\u7945\u7946\u794A\u794B\u794F\u7951\u7954\u7958\u795B\u795C\u7967\u7969\u796B\u7972\u7979\u797B\u797C\u797E\u798B\u798C\u7991\u7993\u7994\u7995\u7996\u7998\u799B\u799C\u79A1\u79A8\u79A9\u79AB\u79AF\u79B1\u79B4\u79B8\u79BB\u79C2\u79C4\u79C7\u79C8\u79CA\u79CF\u79D4\u79D6\u79DA\u79DD\u79DE"], + ["8fd1a1", "\u79E0\u79E2\u79E5\u79EA\u79EB\u79ED\u79F1\u79F8\u79FC\u7A02\u7A03\u7A07\u7A09\u7A0A\u7A0C\u7A11\u7A15\u7A1B\u7A1E\u7A21\u7A27\u7A2B\u7A2D\u7A2F\u7A30\u7A34\u7A35\u7A38\u7A39\u7A3A\u7A44\u7A45\u7A47\u7A48\u7A4C\u7A55\u7A56\u7A59\u7A5C\u7A5D\u7A5F\u7A60\u7A65\u7A67\u7A6A\u7A6D\u7A75\u7A78\u7A7E\u7A80\u7A82\u7A85\u7A86\u7A8A\u7A8B\u7A90\u7A91\u7A94\u7A9E\u7AA0\u7AA3\u7AAC\u7AB3\u7AB5\u7AB9\u7ABB\u7ABC\u7AC6\u7AC9\u7ACC\u7ACE\u7AD1\u7ADB\u7AE8\u7AE9\u7AEB\u7AEC\u7AF1\u7AF4\u7AFB\u7AFD\u7AFE\u7B07\u7B14\u7B1F\u7B23\u7B27\u7B29\u7B2A\u7B2B\u7B2D\u7B2E\u7B2F\u7B30"], + ["8fd2a1", "\u7B31\u7B34\u7B3D\u7B3F\u7B40\u7B41\u7B47\u7B4E\u7B55\u7B60\u7B64\u7B66\u7B69\u7B6A\u7B6D\u7B6F\u7B72\u7B73\u7B77\u7B84\u7B89\u7B8E\u7B90\u7B91\u7B96\u7B9B\u7B9E\u7BA0\u7BA5\u7BAC\u7BAF\u7BB0\u7BB2\u7BB5\u7BB6\u7BBA\u7BBB\u7BBC\u7BBD\u7BC2\u7BC5\u7BC8\u7BCA\u7BD4\u7BD6\u7BD7\u7BD9\u7BDA\u7BDB\u7BE8\u7BEA\u7BF2\u7BF4\u7BF5\u7BF8\u7BF9\u7BFA\u7BFC\u7BFE\u7C01\u7C02\u7C03\u7C04\u7C06\u7C09\u7C0B\u7C0C\u7C0E\u7C0F\u7C19\u7C1B\u7C20\u7C25\u7C26\u7C28\u7C2C\u7C31\u7C33\u7C34\u7C36\u7C39\u7C3A\u7C46\u7C4A\u7C55\u7C51\u7C52\u7C53\u7C59", 5], + ["8fd3a1", "\u7C61\u7C63\u7C67\u7C69\u7C6D\u7C6E\u7C70\u7C72\u7C79\u7C7C\u7C7D\u7C86\u7C87\u7C8F\u7C94\u7C9E\u7CA0\u7CA6\u7CB0\u7CB6\u7CB7\u7CBA\u7CBB\u7CBC\u7CBF\u7CC4\u7CC7\u7CC8\u7CC9\u7CCD\u7CCF\u7CD3\u7CD4\u7CD5\u7CD7\u7CD9\u7CDA\u7CDD\u7CE6\u7CE9\u7CEB\u7CF5\u7D03\u7D07\u7D08\u7D09\u7D0F\u7D11\u7D12\u7D13\u7D16\u7D1D\u7D1E\u7D23\u7D26\u7D2A\u7D2D\u7D31\u7D3C\u7D3D\u7D3E\u7D40\u7D41\u7D47\u7D48\u7D4D\u7D51\u7D53\u7D57\u7D59\u7D5A\u7D5C\u7D5D\u7D65\u7D67\u7D6A\u7D70\u7D78\u7D7A\u7D7B\u7D7F\u7D81\u7D82\u7D83\u7D85\u7D86\u7D88\u7D8B\u7D8C\u7D8D\u7D91\u7D96\u7D97\u7D9D"], + ["8fd4a1", "\u7D9E\u7DA6\u7DA7\u7DAA\u7DB3\u7DB6\u7DB7\u7DB9\u7DC2", 4, "\u7DCC\u7DCD\u7DCE\u7DD7\u7DD9\u7E00\u7DE2\u7DE5\u7DE6\u7DEA\u7DEB\u7DED\u7DF1\u7DF5\u7DF6\u7DF9\u7DFA\u7E08\u7E10\u7E11\u7E15\u7E17\u7E1C\u7E1D\u7E20\u7E27\u7E28\u7E2C\u7E2D\u7E2F\u7E33\u7E36\u7E3F\u7E44\u7E45\u7E47\u7E4E\u7E50\u7E52\u7E58\u7E5F\u7E61\u7E62\u7E65\u7E6B\u7E6E\u7E6F\u7E73\u7E78\u7E7E\u7E81\u7E86\u7E87\u7E8A\u7E8D\u7E91\u7E95\u7E98\u7E9A\u7E9D\u7E9E\u7F3C\u7F3B\u7F3D\u7F3E\u7F3F\u7F43\u7F44\u7F47\u7F4F\u7F52\u7F53\u7F5B\u7F5C\u7F5D\u7F61\u7F63\u7F64\u7F65\u7F66\u7F6D"], + ["8fd5a1", "\u7F71\u7F7D\u7F7E\u7F7F\u7F80\u7F8B\u7F8D\u7F8F\u7F90\u7F91\u7F96\u7F97\u7F9C\u7FA1\u7FA2\u7FA6\u7FAA\u7FAD\u7FB4\u7FBC\u7FBF\u7FC0\u7FC3\u7FC8\u7FCE\u7FCF\u7FDB\u7FDF\u7FE3\u7FE5\u7FE8\u7FEC\u7FEE\u7FEF\u7FF2\u7FFA\u7FFD\u7FFE\u7FFF\u8007\u8008\u800A\u800D\u800E\u800F\u8011\u8013\u8014\u8016\u801D\u801E\u801F\u8020\u8024\u8026\u802C\u802E\u8030\u8034\u8035\u8037\u8039\u803A\u803C\u803E\u8040\u8044\u8060\u8064\u8066\u806D\u8071\u8075\u8081\u8088\u808E\u809C\u809E\u80A6\u80A7\u80AB\u80B8\u80B9\u80C8\u80CD\u80CF\u80D2\u80D4\u80D5\u80D7\u80D8\u80E0\u80ED\u80EE"], + ["8fd6a1", "\u80F0\u80F2\u80F3\u80F6\u80F9\u80FA\u80FE\u8103\u810B\u8116\u8117\u8118\u811C\u811E\u8120\u8124\u8127\u812C\u8130\u8135\u813A\u813C\u8145\u8147\u814A\u814C\u8152\u8157\u8160\u8161\u8167\u8168\u8169\u816D\u816F\u8177\u8181\u8190\u8184\u8185\u8186\u818B\u818E\u8196\u8198\u819B\u819E\u81A2\u81AE\u81B2\u81B4\u81BB\u81CB\u81C3\u81C5\u81CA\u81CE\u81CF\u81D5\u81D7\u81DB\u81DD\u81DE\u81E1\u81E4\u81EB\u81EC\u81F0\u81F1\u81F2\u81F5\u81F6\u81F8\u81F9\u81FD\u81FF\u8200\u8203\u820F\u8213\u8214\u8219\u821A\u821D\u8221\u8222\u8228\u8232\u8234\u823A\u8243\u8244\u8245\u8246"], + ["8fd7a1", "\u824B\u824E\u824F\u8251\u8256\u825C\u8260\u8263\u8267\u826D\u8274\u827B\u827D\u827F\u8280\u8281\u8283\u8284\u8287\u8289\u828A\u828E\u8291\u8294\u8296\u8298\u829A\u829B\u82A0\u82A1\u82A3\u82A4\u82A7\u82A8\u82A9\u82AA\u82AE\u82B0\u82B2\u82B4\u82B7\u82BA\u82BC\u82BE\u82BF\u82C6\u82D0\u82D5\u82DA\u82E0\u82E2\u82E4\u82E8\u82EA\u82ED\u82EF\u82F6\u82F7\u82FD\u82FE\u8300\u8301\u8307\u8308\u830A\u830B\u8354\u831B\u831D\u831E\u831F\u8321\u8322\u832C\u832D\u832E\u8330\u8333\u8337\u833A\u833C\u833D\u8342\u8343\u8344\u8347\u834D\u834E\u8351\u8355\u8356\u8357\u8370\u8378"], + ["8fd8a1", "\u837D\u837F\u8380\u8382\u8384\u8386\u838D\u8392\u8394\u8395\u8398\u8399\u839B\u839C\u839D\u83A6\u83A7\u83A9\u83AC\u83BE\u83BF\u83C0\u83C7\u83C9\u83CF\u83D0\u83D1\u83D4\u83DD\u8353\u83E8\u83EA\u83F6\u83F8\u83F9\u83FC\u8401\u8406\u840A\u840F\u8411\u8415\u8419\u83AD\u842F\u8439\u8445\u8447\u8448\u844A\u844D\u844F\u8451\u8452\u8456\u8458\u8459\u845A\u845C\u8460\u8464\u8465\u8467\u846A\u8470\u8473\u8474\u8476\u8478\u847C\u847D\u8481\u8485\u8492\u8493\u8495\u849E\u84A6\u84A8\u84A9\u84AA\u84AF\u84B1\u84B4\u84BA\u84BD\u84BE\u84C0\u84C2\u84C7\u84C8\u84CC\u84CF\u84D3"], + ["8fd9a1", "\u84DC\u84E7\u84EA\u84EF\u84F0\u84F1\u84F2\u84F7\u8532\u84FA\u84FB\u84FD\u8502\u8503\u8507\u850C\u850E\u8510\u851C\u851E\u8522\u8523\u8524\u8525\u8527\u852A\u852B\u852F\u8533\u8534\u8536\u853F\u8546\u854F", 4, "\u8556\u8559\u855C", 6, "\u8564\u856B\u856F\u8579\u857A\u857B\u857D\u857F\u8581\u8585\u8586\u8589\u858B\u858C\u858F\u8593\u8598\u859D\u859F\u85A0\u85A2\u85A5\u85A7\u85B4\u85B6\u85B7\u85B8\u85BC\u85BD\u85BE\u85BF\u85C2\u85C7\u85CA\u85CB\u85CE\u85AD\u85D8\u85DA\u85DF\u85E0\u85E6\u85E8\u85ED\u85F3\u85F6\u85FC"], + ["8fdaa1", "\u85FF\u8600\u8604\u8605\u860D\u860E\u8610\u8611\u8612\u8618\u8619\u861B\u861E\u8621\u8627\u8629\u8636\u8638\u863A\u863C\u863D\u8640\u8642\u8646\u8652\u8653\u8656\u8657\u8658\u8659\u865D\u8660", 4, "\u8669\u866C\u866F\u8675\u8676\u8677\u867A\u868D\u8691\u8696\u8698\u869A\u869C\u86A1\u86A6\u86A7\u86A8\u86AD\u86B1\u86B3\u86B4\u86B5\u86B7\u86B8\u86B9\u86BF\u86C0\u86C1\u86C3\u86C5\u86D1\u86D2\u86D5\u86D7\u86DA\u86DC\u86E0\u86E3\u86E5\u86E7\u8688\u86FA\u86FC\u86FD\u8704\u8705\u8707\u870B\u870E\u870F\u8710\u8713\u8714\u8719\u871E\u871F\u8721\u8723"], + ["8fdba1", "\u8728\u872E\u872F\u8731\u8732\u8739\u873A\u873C\u873D\u873E\u8740\u8743\u8745\u874D\u8758\u875D\u8761\u8764\u8765\u876F\u8771\u8772\u877B\u8783", 6, "\u878B\u878C\u8790\u8793\u8795\u8797\u8798\u8799\u879E\u87A0\u87A3\u87A7\u87AC\u87AD\u87AE\u87B1\u87B5\u87BE\u87BF\u87C1\u87C8\u87C9\u87CA\u87CE\u87D5\u87D6\u87D9\u87DA\u87DC\u87DF\u87E2\u87E3\u87E4\u87EA\u87EB\u87ED\u87F1\u87F3\u87F8\u87FA\u87FF\u8801\u8803\u8806\u8809\u880A\u880B\u8810\u8819\u8812\u8813\u8814\u8818\u881A\u881B\u881C\u881E\u881F\u8828\u882D\u882E\u8830\u8832\u8835"], + ["8fdca1", "\u883A\u883C\u8841\u8843\u8845\u8848\u8849\u884A\u884B\u884E\u8851\u8855\u8856\u8858\u885A\u885C\u885F\u8860\u8864\u8869\u8871\u8879\u887B\u8880\u8898\u889A\u889B\u889C\u889F\u88A0\u88A8\u88AA\u88BA\u88BD\u88BE\u88C0\u88CA", 4, "\u88D1\u88D2\u88D3\u88DB\u88DE\u88E7\u88EF\u88F0\u88F1\u88F5\u88F7\u8901\u8906\u890D\u890E\u890F\u8915\u8916\u8918\u8919\u891A\u891C\u8920\u8926\u8927\u8928\u8930\u8931\u8932\u8935\u8939\u893A\u893E\u8940\u8942\u8945\u8946\u8949\u894F\u8952\u8957\u895A\u895B\u895C\u8961\u8962\u8963\u896B\u896E\u8970\u8973\u8975\u897A"], + ["8fdda1", "\u897B\u897C\u897D\u8989\u898D\u8990\u8994\u8995\u899B\u899C\u899F\u89A0\u89A5\u89B0\u89B4\u89B5\u89B6\u89B7\u89BC\u89D4", 4, "\u89E5\u89E9\u89EB\u89ED\u89F1\u89F3\u89F6\u89F9\u89FD\u89FF\u8A04\u8A05\u8A07\u8A0F\u8A11\u8A12\u8A14\u8A15\u8A1E\u8A20\u8A22\u8A24\u8A26\u8A2B\u8A2C\u8A2F\u8A35\u8A37\u8A3D\u8A3E\u8A40\u8A43\u8A45\u8A47\u8A49\u8A4D\u8A4E\u8A53\u8A56\u8A57\u8A58\u8A5C\u8A5D\u8A61\u8A65\u8A67\u8A75\u8A76\u8A77\u8A79\u8A7A\u8A7B\u8A7E\u8A7F\u8A80\u8A83\u8A86\u8A8B\u8A8F\u8A90\u8A92\u8A96\u8A97\u8A99\u8A9F\u8AA7\u8AA9\u8AAE\u8AAF\u8AB3"], + ["8fdea1", "\u8AB6\u8AB7\u8ABB\u8ABE\u8AC3\u8AC6\u8AC8\u8AC9\u8ACA\u8AD1\u8AD3\u8AD4\u8AD5\u8AD7\u8ADD\u8ADF\u8AEC\u8AF0\u8AF4\u8AF5\u8AF6\u8AFC\u8AFF\u8B05\u8B06\u8B0B\u8B11\u8B1C\u8B1E\u8B1F\u8B0A\u8B2D\u8B30\u8B37\u8B3C\u8B42", 4, "\u8B48\u8B52\u8B53\u8B54\u8B59\u8B4D\u8B5E\u8B63\u8B6D\u8B76\u8B78\u8B79\u8B7C\u8B7E\u8B81\u8B84\u8B85\u8B8B\u8B8D\u8B8F\u8B94\u8B95\u8B9C\u8B9E\u8B9F\u8C38\u8C39\u8C3D\u8C3E\u8C45\u8C47\u8C49\u8C4B\u8C4F\u8C51\u8C53\u8C54\u8C57\u8C58\u8C5B\u8C5D\u8C59\u8C63\u8C64\u8C66\u8C68\u8C69\u8C6D\u8C73\u8C75\u8C76\u8C7B\u8C7E\u8C86"], + ["8fdfa1", "\u8C87\u8C8B\u8C90\u8C92\u8C93\u8C99\u8C9B\u8C9C\u8CA4\u8CB9\u8CBA\u8CC5\u8CC6\u8CC9\u8CCB\u8CCF\u8CD6\u8CD5\u8CD9\u8CDD\u8CE1\u8CE8\u8CEC\u8CEF\u8CF0\u8CF2\u8CF5\u8CF7\u8CF8\u8CFE\u8CFF\u8D01\u8D03\u8D09\u8D12\u8D17\u8D1B\u8D65\u8D69\u8D6C\u8D6E\u8D7F\u8D82\u8D84\u8D88\u8D8D\u8D90\u8D91\u8D95\u8D9E\u8D9F\u8DA0\u8DA6\u8DAB\u8DAC\u8DAF\u8DB2\u8DB5\u8DB7\u8DB9\u8DBB\u8DC0\u8DC5\u8DC6\u8DC7\u8DC8\u8DCA\u8DCE\u8DD1\u8DD4\u8DD5\u8DD7\u8DD9\u8DE4\u8DE5\u8DE7\u8DEC\u8DF0\u8DBC\u8DF1\u8DF2\u8DF4\u8DFD\u8E01\u8E04\u8E05\u8E06\u8E0B\u8E11\u8E14\u8E16\u8E20\u8E21\u8E22"], + ["8fe0a1", "\u8E23\u8E26\u8E27\u8E31\u8E33\u8E36\u8E37\u8E38\u8E39\u8E3D\u8E40\u8E41\u8E4B\u8E4D\u8E4E\u8E4F\u8E54\u8E5B\u8E5C\u8E5D\u8E5E\u8E61\u8E62\u8E69\u8E6C\u8E6D\u8E6F\u8E70\u8E71\u8E79\u8E7A\u8E7B\u8E82\u8E83\u8E89\u8E90\u8E92\u8E95\u8E9A\u8E9B\u8E9D\u8E9E\u8EA2\u8EA7\u8EA9\u8EAD\u8EAE\u8EB3\u8EB5\u8EBA\u8EBB\u8EC0\u8EC1\u8EC3\u8EC4\u8EC7\u8ECF\u8ED1\u8ED4\u8EDC\u8EE8\u8EEE\u8EF0\u8EF1\u8EF7\u8EF9\u8EFA\u8EED\u8F00\u8F02\u8F07\u8F08\u8F0F\u8F10\u8F16\u8F17\u8F18\u8F1E\u8F20\u8F21\u8F23\u8F25\u8F27\u8F28\u8F2C\u8F2D\u8F2E\u8F34\u8F35\u8F36\u8F37\u8F3A\u8F40\u8F41"], + ["8fe1a1", "\u8F43\u8F47\u8F4F\u8F51", 4, "\u8F58\u8F5D\u8F5E\u8F65\u8F9D\u8FA0\u8FA1\u8FA4\u8FA5\u8FA6\u8FB5\u8FB6\u8FB8\u8FBE\u8FC0\u8FC1\u8FC6\u8FCA\u8FCB\u8FCD\u8FD0\u8FD2\u8FD3\u8FD5\u8FE0\u8FE3\u8FE4\u8FE8\u8FEE\u8FF1\u8FF5\u8FF6\u8FFB\u8FFE\u9002\u9004\u9008\u900C\u9018\u901B\u9028\u9029\u902F\u902A\u902C\u902D\u9033\u9034\u9037\u903F\u9043\u9044\u904C\u905B\u905D\u9062\u9066\u9067\u906C\u9070\u9074\u9079\u9085\u9088\u908B\u908C\u908E\u9090\u9095\u9097\u9098\u9099\u909B\u90A0\u90A1\u90A2\u90A5\u90B0\u90B2\u90B3\u90B4\u90B6\u90BD\u90CC\u90BE\u90C3"], + ["8fe2a1", "\u90C4\u90C5\u90C7\u90C8\u90D5\u90D7\u90D8\u90D9\u90DC\u90DD\u90DF\u90E5\u90D2\u90F6\u90EB\u90EF\u90F0\u90F4\u90FE\u90FF\u9100\u9104\u9105\u9106\u9108\u910D\u9110\u9114\u9116\u9117\u9118\u911A\u911C\u911E\u9120\u9125\u9122\u9123\u9127\u9129\u912E\u912F\u9131\u9134\u9136\u9137\u9139\u913A\u913C\u913D\u9143\u9147\u9148\u914F\u9153\u9157\u9159\u915A\u915B\u9161\u9164\u9167\u916D\u9174\u9179\u917A\u917B\u9181\u9183\u9185\u9186\u918A\u918E\u9191\u9193\u9194\u9195\u9198\u919E\u91A1\u91A6\u91A8\u91AC\u91AD\u91AE\u91B0\u91B1\u91B2\u91B3\u91B6\u91BB\u91BC\u91BD\u91BF"], + ["8fe3a1", "\u91C2\u91C3\u91C5\u91D3\u91D4\u91D7\u91D9\u91DA\u91DE\u91E4\u91E5\u91E9\u91EA\u91EC", 5, "\u91F7\u91F9\u91FB\u91FD\u9200\u9201\u9204\u9205\u9206\u9207\u9209\u920A\u920C\u9210\u9212\u9213\u9216\u9218\u921C\u921D\u9223\u9224\u9225\u9226\u9228\u922E\u922F\u9230\u9233\u9235\u9236\u9238\u9239\u923A\u923C\u923E\u9240\u9242\u9243\u9246\u9247\u924A\u924D\u924E\u924F\u9251\u9258\u9259\u925C\u925D\u9260\u9261\u9265\u9267\u9268\u9269\u926E\u926F\u9270\u9275", 4, "\u927B\u927C\u927D\u927F\u9288\u9289\u928A\u928D\u928E\u9292\u9297"], + ["8fe4a1", "\u9299\u929F\u92A0\u92A4\u92A5\u92A7\u92A8\u92AB\u92AF\u92B2\u92B6\u92B8\u92BA\u92BB\u92BC\u92BD\u92BF", 4, "\u92C5\u92C6\u92C7\u92C8\u92CB\u92CC\u92CD\u92CE\u92D0\u92D3\u92D5\u92D7\u92D8\u92D9\u92DC\u92DD\u92DF\u92E0\u92E1\u92E3\u92E5\u92E7\u92E8\u92EC\u92EE\u92F0\u92F9\u92FB\u92FF\u9300\u9302\u9308\u930D\u9311\u9314\u9315\u931C\u931D\u931E\u931F\u9321\u9324\u9325\u9327\u9329\u932A\u9333\u9334\u9336\u9337\u9347\u9348\u9349\u9350\u9351\u9352\u9355\u9357\u9358\u935A\u935E\u9364\u9365\u9367\u9369\u936A\u936D\u936F\u9370\u9371\u9373\u9374\u9376"], + ["8fe5a1", "\u937A\u937D\u937F\u9380\u9381\u9382\u9388\u938A\u938B\u938D\u938F\u9392\u9395\u9398\u939B\u939E\u93A1\u93A3\u93A4\u93A6\u93A8\u93AB\u93B4\u93B5\u93B6\u93BA\u93A9\u93C1\u93C4\u93C5\u93C6\u93C7\u93C9", 4, "\u93D3\u93D9\u93DC\u93DE\u93DF\u93E2\u93E6\u93E7\u93F9\u93F7\u93F8\u93FA\u93FB\u93FD\u9401\u9402\u9404\u9408\u9409\u940D\u940E\u940F\u9415\u9416\u9417\u941F\u942E\u942F\u9431\u9432\u9433\u9434\u943B\u943F\u943D\u9443\u9445\u9448\u944A\u944C\u9455\u9459\u945C\u945F\u9461\u9463\u9468\u946B\u946D\u946E\u946F\u9471\u9472\u9484\u9483\u9578\u9579"], + ["8fe6a1", "\u957E\u9584\u9588\u958C\u958D\u958E\u959D\u959E\u959F\u95A1\u95A6\u95A9\u95AB\u95AC\u95B4\u95B6\u95BA\u95BD\u95BF\u95C6\u95C8\u95C9\u95CB\u95D0\u95D1\u95D2\u95D3\u95D9\u95DA\u95DD\u95DE\u95DF\u95E0\u95E4\u95E6\u961D\u961E\u9622\u9624\u9625\u9626\u962C\u9631\u9633\u9637\u9638\u9639\u963A\u963C\u963D\u9641\u9652\u9654\u9656\u9657\u9658\u9661\u966E\u9674\u967B\u967C\u967E\u967F\u9681\u9682\u9683\u9684\u9689\u9691\u9696\u969A\u969D\u969F\u96A4\u96A5\u96A6\u96A9\u96AE\u96AF\u96B3\u96BA\u96CA\u96D2\u5DB2\u96D8\u96DA\u96DD\u96DE\u96DF\u96E9\u96EF\u96F1\u96FA\u9702"], + ["8fe7a1", "\u9703\u9705\u9709\u971A\u971B\u971D\u9721\u9722\u9723\u9728\u9731\u9733\u9741\u9743\u974A\u974E\u974F\u9755\u9757\u9758\u975A\u975B\u9763\u9767\u976A\u976E\u9773\u9776\u9777\u9778\u977B\u977D\u977F\u9780\u9789\u9795\u9796\u9797\u9799\u979A\u979E\u979F\u97A2\u97AC\u97AE\u97B1\u97B2\u97B5\u97B6\u97B8\u97B9\u97BA\u97BC\u97BE\u97BF\u97C1\u97C4\u97C5\u97C7\u97C9\u97CA\u97CC\u97CD\u97CE\u97D0\u97D1\u97D4\u97D7\u97D8\u97D9\u97DD\u97DE\u97E0\u97DB\u97E1\u97E4\u97EF\u97F1\u97F4\u97F7\u97F8\u97FA\u9807\u980A\u9819\u980D\u980E\u9814\u9816\u981C\u981E\u9820\u9823\u9826"], + ["8fe8a1", "\u982B\u982E\u982F\u9830\u9832\u9833\u9835\u9825\u983E\u9844\u9847\u984A\u9851\u9852\u9853\u9856\u9857\u9859\u985A\u9862\u9863\u9865\u9866\u986A\u986C\u98AB\u98AD\u98AE\u98B0\u98B4\u98B7\u98B8\u98BA\u98BB\u98BF\u98C2\u98C5\u98C8\u98CC\u98E1\u98E3\u98E5\u98E6\u98E7\u98EA\u98F3\u98F6\u9902\u9907\u9908\u9911\u9915\u9916\u9917\u991A\u991B\u991C\u991F\u9922\u9926\u9927\u992B\u9931", 4, "\u9939\u993A\u993B\u993C\u9940\u9941\u9946\u9947\u9948\u994D\u994E\u9954\u9958\u9959\u995B\u995C\u995E\u995F\u9960\u999B\u999D\u999F\u99A6\u99B0\u99B1\u99B2\u99B5"], + ["8fe9a1", "\u99B9\u99BA\u99BD\u99BF\u99C3\u99C9\u99D3\u99D4\u99D9\u99DA\u99DC\u99DE\u99E7\u99EA\u99EB\u99EC\u99F0\u99F4\u99F5\u99F9\u99FD\u99FE\u9A02\u9A03\u9A04\u9A0B\u9A0C\u9A10\u9A11\u9A16\u9A1E\u9A20\u9A22\u9A23\u9A24\u9A27\u9A2D\u9A2E\u9A33\u9A35\u9A36\u9A38\u9A47\u9A41\u9A44\u9A4A\u9A4B\u9A4C\u9A4E\u9A51\u9A54\u9A56\u9A5D\u9AAA\u9AAC\u9AAE\u9AAF\u9AB2\u9AB4\u9AB5\u9AB6\u9AB9\u9ABB\u9ABE\u9ABF\u9AC1\u9AC3\u9AC6\u9AC8\u9ACE\u9AD0\u9AD2\u9AD5\u9AD6\u9AD7\u9ADB\u9ADC\u9AE0\u9AE4\u9AE5\u9AE7\u9AE9\u9AEC\u9AF2\u9AF3\u9AF5\u9AF9\u9AFA\u9AFD\u9AFF", 4], + ["8feaa1", "\u9B04\u9B05\u9B08\u9B09\u9B0B\u9B0C\u9B0D\u9B0E\u9B10\u9B12\u9B16\u9B19\u9B1B\u9B1C\u9B20\u9B26\u9B2B\u9B2D\u9B33\u9B34\u9B35\u9B37\u9B39\u9B3A\u9B3D\u9B48\u9B4B\u9B4C\u9B55\u9B56\u9B57\u9B5B\u9B5E\u9B61\u9B63\u9B65\u9B66\u9B68\u9B6A", 4, "\u9B73\u9B75\u9B77\u9B78\u9B79\u9B7F\u9B80\u9B84\u9B85\u9B86\u9B87\u9B89\u9B8A\u9B8B\u9B8D\u9B8F\u9B90\u9B94\u9B9A\u9B9D\u9B9E\u9BA6\u9BA7\u9BA9\u9BAC\u9BB0\u9BB1\u9BB2\u9BB7\u9BB8\u9BBB\u9BBC\u9BBE\u9BBF\u9BC1\u9BC7\u9BC8\u9BCE\u9BD0\u9BD7\u9BD8\u9BDD\u9BDF\u9BE5\u9BE7\u9BEA\u9BEB\u9BEF\u9BF3\u9BF7\u9BF8"], + ["8feba1", "\u9BF9\u9BFA\u9BFD\u9BFF\u9C00\u9C02\u9C0B\u9C0F\u9C11\u9C16\u9C18\u9C19\u9C1A\u9C1C\u9C1E\u9C22\u9C23\u9C26", 4, "\u9C31\u9C35\u9C36\u9C37\u9C3D\u9C41\u9C43\u9C44\u9C45\u9C49\u9C4A\u9C4E\u9C4F\u9C50\u9C53\u9C54\u9C56\u9C58\u9C5B\u9C5D\u9C5E\u9C5F\u9C63\u9C69\u9C6A\u9C5C\u9C6B\u9C68\u9C6E\u9C70\u9C72\u9C75\u9C77\u9C7B\u9CE6\u9CF2\u9CF7\u9CF9\u9D0B\u9D02\u9D11\u9D17\u9D18\u9D1C\u9D1D\u9D1E\u9D2F\u9D30\u9D32\u9D33\u9D34\u9D3A\u9D3C\u9D45\u9D3D\u9D42\u9D43\u9D47\u9D4A\u9D53\u9D54\u9D5F\u9D63\u9D62\u9D65\u9D69\u9D6A\u9D6B\u9D70\u9D76\u9D77\u9D7B"], + ["8feca1", "\u9D7C\u9D7E\u9D83\u9D84\u9D86\u9D8A\u9D8D\u9D8E\u9D92\u9D93\u9D95\u9D96\u9D97\u9D98\u9DA1\u9DAA\u9DAC\u9DAE\u9DB1\u9DB5\u9DB9\u9DBC\u9DBF\u9DC3\u9DC7\u9DC9\u9DCA\u9DD4\u9DD5\u9DD6\u9DD7\u9DDA\u9DDE\u9DDF\u9DE0\u9DE5\u9DE7\u9DE9\u9DEB\u9DEE\u9DF0\u9DF3\u9DF4\u9DFE\u9E0A\u9E02\u9E07\u9E0E\u9E10\u9E11\u9E12\u9E15\u9E16\u9E19\u9E1C\u9E1D\u9E7A\u9E7B\u9E7C\u9E80\u9E82\u9E83\u9E84\u9E85\u9E87\u9E8E\u9E8F\u9E96\u9E98\u9E9B\u9E9E\u9EA4\u9EA8\u9EAC\u9EAE\u9EAF\u9EB0\u9EB3\u9EB4\u9EB5\u9EC6\u9EC8\u9ECB\u9ED5\u9EDF\u9EE4\u9EE7\u9EEC\u9EED\u9EEE\u9EF0\u9EF1\u9EF2\u9EF5"], + ["8feda1", "\u9EF8\u9EFF\u9F02\u9F03\u9F09\u9F0F\u9F10\u9F11\u9F12\u9F14\u9F16\u9F17\u9F19\u9F1A\u9F1B\u9F1F\u9F22\u9F26\u9F2A\u9F2B\u9F2F\u9F31\u9F32\u9F34\u9F37\u9F39\u9F3A\u9F3C\u9F3D\u9F3F\u9F41\u9F43", 4, "\u9F53\u9F55\u9F56\u9F57\u9F58\u9F5A\u9F5D\u9F5E\u9F68\u9F69\u9F6D", 4, "\u9F73\u9F75\u9F7A\u9F7D\u9F8F\u9F90\u9F91\u9F92\u9F94\u9F96\u9F97\u9F9E\u9FA1\u9FA2\u9FA3\u9FA5"] + ]; + } +}); + +// ../../node_modules/iconv-lite/encodings/tables/cp936.json +var require_cp936 = __commonJS({ + "../../node_modules/iconv-lite/encodings/tables/cp936.json"(exports2, module2) { + module2.exports = [ + ["0", "\0", 127, "\u20AC"], + ["8140", "\u4E02\u4E04\u4E05\u4E06\u4E0F\u4E12\u4E17\u4E1F\u4E20\u4E21\u4E23\u4E26\u4E29\u4E2E\u4E2F\u4E31\u4E33\u4E35\u4E37\u4E3C\u4E40\u4E41\u4E42\u4E44\u4E46\u4E4A\u4E51\u4E55\u4E57\u4E5A\u4E5B\u4E62\u4E63\u4E64\u4E65\u4E67\u4E68\u4E6A", 5, "\u4E72\u4E74", 9, "\u4E7F", 6, "\u4E87\u4E8A"], + ["8180", "\u4E90\u4E96\u4E97\u4E99\u4E9C\u4E9D\u4E9E\u4EA3\u4EAA\u4EAF\u4EB0\u4EB1\u4EB4\u4EB6\u4EB7\u4EB8\u4EB9\u4EBC\u4EBD\u4EBE\u4EC8\u4ECC\u4ECF\u4ED0\u4ED2\u4EDA\u4EDB\u4EDC\u4EE0\u4EE2\u4EE6\u4EE7\u4EE9\u4EED\u4EEE\u4EEF\u4EF1\u4EF4\u4EF8\u4EF9\u4EFA\u4EFC\u4EFE\u4F00\u4F02", 6, "\u4F0B\u4F0C\u4F12", 4, "\u4F1C\u4F1D\u4F21\u4F23\u4F28\u4F29\u4F2C\u4F2D\u4F2E\u4F31\u4F33\u4F35\u4F37\u4F39\u4F3B\u4F3E", 4, "\u4F44\u4F45\u4F47", 5, "\u4F52\u4F54\u4F56\u4F61\u4F62\u4F66\u4F68\u4F6A\u4F6B\u4F6D\u4F6E\u4F71\u4F72\u4F75\u4F77\u4F78\u4F79\u4F7A\u4F7D\u4F80\u4F81\u4F82\u4F85\u4F86\u4F87\u4F8A\u4F8C\u4F8E\u4F90\u4F92\u4F93\u4F95\u4F96\u4F98\u4F99\u4F9A\u4F9C\u4F9E\u4F9F\u4FA1\u4FA2"], + ["8240", "\u4FA4\u4FAB\u4FAD\u4FB0", 4, "\u4FB6", 8, "\u4FC0\u4FC1\u4FC2\u4FC6\u4FC7\u4FC8\u4FC9\u4FCB\u4FCC\u4FCD\u4FD2", 4, "\u4FD9\u4FDB\u4FE0\u4FE2\u4FE4\u4FE5\u4FE7\u4FEB\u4FEC\u4FF0\u4FF2\u4FF4\u4FF5\u4FF6\u4FF7\u4FF9\u4FFB\u4FFC\u4FFD\u4FFF", 11], + ["8280", "\u500B\u500E\u5010\u5011\u5013\u5015\u5016\u5017\u501B\u501D\u501E\u5020\u5022\u5023\u5024\u5027\u502B\u502F", 10, "\u503B\u503D\u503F\u5040\u5041\u5042\u5044\u5045\u5046\u5049\u504A\u504B\u504D\u5050", 4, "\u5056\u5057\u5058\u5059\u505B\u505D", 7, "\u5066", 5, "\u506D", 8, "\u5078\u5079\u507A\u507C\u507D\u5081\u5082\u5083\u5084\u5086\u5087\u5089\u508A\u508B\u508C\u508E", 20, "\u50A4\u50A6\u50AA\u50AB\u50AD", 4, "\u50B3", 6, "\u50BC"], + ["8340", "\u50BD", 17, "\u50D0", 5, "\u50D7\u50D8\u50D9\u50DB", 10, "\u50E8\u50E9\u50EA\u50EB\u50EF\u50F0\u50F1\u50F2\u50F4\u50F6", 4, "\u50FC", 9, "\u5108"], + ["8380", "\u5109\u510A\u510C", 5, "\u5113", 13, "\u5122", 28, "\u5142\u5147\u514A\u514C\u514E\u514F\u5150\u5152\u5153\u5157\u5158\u5159\u515B\u515D", 4, "\u5163\u5164\u5166\u5167\u5169\u516A\u516F\u5172\u517A\u517E\u517F\u5183\u5184\u5186\u5187\u518A\u518B\u518E\u518F\u5190\u5191\u5193\u5194\u5198\u519A\u519D\u519E\u519F\u51A1\u51A3\u51A6", 4, "\u51AD\u51AE\u51B4\u51B8\u51B9\u51BA\u51BE\u51BF\u51C1\u51C2\u51C3\u51C5\u51C8\u51CA\u51CD\u51CE\u51D0\u51D2", 5], + ["8440", "\u51D8\u51D9\u51DA\u51DC\u51DE\u51DF\u51E2\u51E3\u51E5", 5, "\u51EC\u51EE\u51F1\u51F2\u51F4\u51F7\u51FE\u5204\u5205\u5209\u520B\u520C\u520F\u5210\u5213\u5214\u5215\u521C\u521E\u521F\u5221\u5222\u5223\u5225\u5226\u5227\u522A\u522C\u522F\u5231\u5232\u5234\u5235\u523C\u523E\u5244", 5, "\u524B\u524E\u524F\u5252\u5253\u5255\u5257\u5258"], + ["8480", "\u5259\u525A\u525B\u525D\u525F\u5260\u5262\u5263\u5264\u5266\u5268\u526B\u526C\u526D\u526E\u5270\u5271\u5273", 9, "\u527E\u5280\u5283", 4, "\u5289", 6, "\u5291\u5292\u5294", 6, "\u529C\u52A4\u52A5\u52A6\u52A7\u52AE\u52AF\u52B0\u52B4", 9, "\u52C0\u52C1\u52C2\u52C4\u52C5\u52C6\u52C8\u52CA\u52CC\u52CD\u52CE\u52CF\u52D1\u52D3\u52D4\u52D5\u52D7\u52D9", 5, "\u52E0\u52E1\u52E2\u52E3\u52E5", 10, "\u52F1", 7, "\u52FB\u52FC\u52FD\u5301\u5302\u5303\u5304\u5307\u5309\u530A\u530B\u530C\u530E"], + ["8540", "\u5311\u5312\u5313\u5314\u5318\u531B\u531C\u531E\u531F\u5322\u5324\u5325\u5327\u5328\u5329\u532B\u532C\u532D\u532F", 9, "\u533C\u533D\u5340\u5342\u5344\u5346\u534B\u534C\u534D\u5350\u5354\u5358\u5359\u535B\u535D\u5365\u5368\u536A\u536C\u536D\u5372\u5376\u5379\u537B\u537C\u537D\u537E\u5380\u5381\u5383\u5387\u5388\u538A\u538E\u538F"], + ["8580", "\u5390", 4, "\u5396\u5397\u5399\u539B\u539C\u539E\u53A0\u53A1\u53A4\u53A7\u53AA\u53AB\u53AC\u53AD\u53AF", 6, "\u53B7\u53B8\u53B9\u53BA\u53BC\u53BD\u53BE\u53C0\u53C3", 4, "\u53CE\u53CF\u53D0\u53D2\u53D3\u53D5\u53DA\u53DC\u53DD\u53DE\u53E1\u53E2\u53E7\u53F4\u53FA\u53FE\u53FF\u5400\u5402\u5405\u5407\u540B\u5414\u5418\u5419\u541A\u541C\u5422\u5424\u5425\u542A\u5430\u5433\u5436\u5437\u543A\u543D\u543F\u5441\u5442\u5444\u5445\u5447\u5449\u544C\u544D\u544E\u544F\u5451\u545A\u545D", 4, "\u5463\u5465\u5467\u5469", 7, "\u5474\u5479\u547A\u547E\u547F\u5481\u5483\u5485\u5487\u5488\u5489\u548A\u548D\u5491\u5493\u5497\u5498\u549C\u549E\u549F\u54A0\u54A1"], + ["8640", "\u54A2\u54A5\u54AE\u54B0\u54B2\u54B5\u54B6\u54B7\u54B9\u54BA\u54BC\u54BE\u54C3\u54C5\u54CA\u54CB\u54D6\u54D8\u54DB\u54E0", 4, "\u54EB\u54EC\u54EF\u54F0\u54F1\u54F4", 5, "\u54FB\u54FE\u5500\u5502\u5503\u5504\u5505\u5508\u550A", 4, "\u5512\u5513\u5515", 5, "\u551C\u551D\u551E\u551F\u5521\u5525\u5526"], + ["8680", "\u5528\u5529\u552B\u552D\u5532\u5534\u5535\u5536\u5538\u5539\u553A\u553B\u553D\u5540\u5542\u5545\u5547\u5548\u554B", 4, "\u5551\u5552\u5553\u5554\u5557", 4, "\u555D\u555E\u555F\u5560\u5562\u5563\u5568\u5569\u556B\u556F", 5, "\u5579\u557A\u557D\u557F\u5585\u5586\u558C\u558D\u558E\u5590\u5592\u5593\u5595\u5596\u5597\u559A\u559B\u559E\u55A0", 6, "\u55A8", 8, "\u55B2\u55B4\u55B6\u55B8\u55BA\u55BC\u55BF", 4, "\u55C6\u55C7\u55C8\u55CA\u55CB\u55CE\u55CF\u55D0\u55D5\u55D7", 4, "\u55DE\u55E0\u55E2\u55E7\u55E9\u55ED\u55EE\u55F0\u55F1\u55F4\u55F6\u55F8", 4, "\u55FF\u5602\u5603\u5604\u5605"], + ["8740", "\u5606\u5607\u560A\u560B\u560D\u5610", 7, "\u5619\u561A\u561C\u561D\u5620\u5621\u5622\u5625\u5626\u5628\u5629\u562A\u562B\u562E\u562F\u5630\u5633\u5635\u5637\u5638\u563A\u563C\u563D\u563E\u5640", 11, "\u564F", 4, "\u5655\u5656\u565A\u565B\u565D", 4], + ["8780", "\u5663\u5665\u5666\u5667\u566D\u566E\u566F\u5670\u5672\u5673\u5674\u5675\u5677\u5678\u5679\u567A\u567D", 7, "\u5687", 6, "\u5690\u5691\u5692\u5694", 14, "\u56A4", 10, "\u56B0", 6, "\u56B8\u56B9\u56BA\u56BB\u56BD", 12, "\u56CB", 8, "\u56D5\u56D6\u56D8\u56D9\u56DC\u56E3\u56E5", 5, "\u56EC\u56EE\u56EF\u56F2\u56F3\u56F6\u56F7\u56F8\u56FB\u56FC\u5700\u5701\u5702\u5705\u5707\u570B", 6], + ["8840", "\u5712", 9, "\u571D\u571E\u5720\u5721\u5722\u5724\u5725\u5726\u5727\u572B\u5731\u5732\u5734", 4, "\u573C\u573D\u573F\u5741\u5743\u5744\u5745\u5746\u5748\u5749\u574B\u5752", 4, "\u5758\u5759\u5762\u5763\u5765\u5767\u576C\u576E\u5770\u5771\u5772\u5774\u5775\u5778\u5779\u577A\u577D\u577E\u577F\u5780"], + ["8880", "\u5781\u5787\u5788\u5789\u578A\u578D", 4, "\u5794", 6, "\u579C\u579D\u579E\u579F\u57A5\u57A8\u57AA\u57AC\u57AF\u57B0\u57B1\u57B3\u57B5\u57B6\u57B7\u57B9", 8, "\u57C4", 6, "\u57CC\u57CD\u57D0\u57D1\u57D3\u57D6\u57D7\u57DB\u57DC\u57DE\u57E1\u57E2\u57E3\u57E5", 7, "\u57EE\u57F0\u57F1\u57F2\u57F3\u57F5\u57F6\u57F7\u57FB\u57FC\u57FE\u57FF\u5801\u5803\u5804\u5805\u5808\u5809\u580A\u580C\u580E\u580F\u5810\u5812\u5813\u5814\u5816\u5817\u5818\u581A\u581B\u581C\u581D\u581F\u5822\u5823\u5825", 4, "\u582B", 4, "\u5831\u5832\u5833\u5834\u5836", 7], + ["8940", "\u583E", 5, "\u5845", 6, "\u584E\u584F\u5850\u5852\u5853\u5855\u5856\u5857\u5859", 4, "\u585F", 5, "\u5866", 4, "\u586D", 16, "\u587F\u5882\u5884\u5886\u5887\u5888\u588A\u588B\u588C"], + ["8980", "\u588D", 4, "\u5894", 4, "\u589B\u589C\u589D\u58A0", 7, "\u58AA", 17, "\u58BD\u58BE\u58BF\u58C0\u58C2\u58C3\u58C4\u58C6", 10, "\u58D2\u58D3\u58D4\u58D6", 13, "\u58E5", 5, "\u58ED\u58EF\u58F1\u58F2\u58F4\u58F5\u58F7\u58F8\u58FA", 7, "\u5903\u5905\u5906\u5908", 4, "\u590E\u5910\u5911\u5912\u5913\u5917\u5918\u591B\u591D\u591E\u5920\u5921\u5922\u5923\u5926\u5928\u592C\u5930\u5932\u5933\u5935\u5936\u593B"], + ["8a40", "\u593D\u593E\u593F\u5940\u5943\u5945\u5946\u594A\u594C\u594D\u5950\u5952\u5953\u5959\u595B", 4, "\u5961\u5963\u5964\u5966", 12, "\u5975\u5977\u597A\u597B\u597C\u597E\u597F\u5980\u5985\u5989\u598B\u598C\u598E\u598F\u5990\u5991\u5994\u5995\u5998\u599A\u599B\u599C\u599D\u599F\u59A0\u59A1\u59A2\u59A6"], + ["8a80", "\u59A7\u59AC\u59AD\u59B0\u59B1\u59B3", 5, "\u59BA\u59BC\u59BD\u59BF", 6, "\u59C7\u59C8\u59C9\u59CC\u59CD\u59CE\u59CF\u59D5\u59D6\u59D9\u59DB\u59DE", 4, "\u59E4\u59E6\u59E7\u59E9\u59EA\u59EB\u59ED", 11, "\u59FA\u59FC\u59FD\u59FE\u5A00\u5A02\u5A0A\u5A0B\u5A0D\u5A0E\u5A0F\u5A10\u5A12\u5A14\u5A15\u5A16\u5A17\u5A19\u5A1A\u5A1B\u5A1D\u5A1E\u5A21\u5A22\u5A24\u5A26\u5A27\u5A28\u5A2A", 6, "\u5A33\u5A35\u5A37", 4, "\u5A3D\u5A3E\u5A3F\u5A41", 4, "\u5A47\u5A48\u5A4B", 9, "\u5A56\u5A57\u5A58\u5A59\u5A5B", 5], + ["8b40", "\u5A61\u5A63\u5A64\u5A65\u5A66\u5A68\u5A69\u5A6B", 8, "\u5A78\u5A79\u5A7B\u5A7C\u5A7D\u5A7E\u5A80", 17, "\u5A93", 6, "\u5A9C", 13, "\u5AAB\u5AAC"], + ["8b80", "\u5AAD", 4, "\u5AB4\u5AB6\u5AB7\u5AB9", 4, "\u5ABF\u5AC0\u5AC3", 5, "\u5ACA\u5ACB\u5ACD", 4, "\u5AD3\u5AD5\u5AD7\u5AD9\u5ADA\u5ADB\u5ADD\u5ADE\u5ADF\u5AE2\u5AE4\u5AE5\u5AE7\u5AE8\u5AEA\u5AEC", 4, "\u5AF2", 22, "\u5B0A", 11, "\u5B18", 25, "\u5B33\u5B35\u5B36\u5B38", 7, "\u5B41", 6], + ["8c40", "\u5B48", 7, "\u5B52\u5B56\u5B5E\u5B60\u5B61\u5B67\u5B68\u5B6B\u5B6D\u5B6E\u5B6F\u5B72\u5B74\u5B76\u5B77\u5B78\u5B79\u5B7B\u5B7C\u5B7E\u5B7F\u5B82\u5B86\u5B8A\u5B8D\u5B8E\u5B90\u5B91\u5B92\u5B94\u5B96\u5B9F\u5BA7\u5BA8\u5BA9\u5BAC\u5BAD\u5BAE\u5BAF\u5BB1\u5BB2\u5BB7\u5BBA\u5BBB\u5BBC\u5BC0\u5BC1\u5BC3\u5BC8\u5BC9\u5BCA\u5BCB\u5BCD\u5BCE\u5BCF"], + ["8c80", "\u5BD1\u5BD4", 8, "\u5BE0\u5BE2\u5BE3\u5BE6\u5BE7\u5BE9", 4, "\u5BEF\u5BF1", 6, "\u5BFD\u5BFE\u5C00\u5C02\u5C03\u5C05\u5C07\u5C08\u5C0B\u5C0C\u5C0D\u5C0E\u5C10\u5C12\u5C13\u5C17\u5C19\u5C1B\u5C1E\u5C1F\u5C20\u5C21\u5C23\u5C26\u5C28\u5C29\u5C2A\u5C2B\u5C2D\u5C2E\u5C2F\u5C30\u5C32\u5C33\u5C35\u5C36\u5C37\u5C43\u5C44\u5C46\u5C47\u5C4C\u5C4D\u5C52\u5C53\u5C54\u5C56\u5C57\u5C58\u5C5A\u5C5B\u5C5C\u5C5D\u5C5F\u5C62\u5C64\u5C67", 6, "\u5C70\u5C72", 6, "\u5C7B\u5C7C\u5C7D\u5C7E\u5C80\u5C83", 4, "\u5C89\u5C8A\u5C8B\u5C8E\u5C8F\u5C92\u5C93\u5C95\u5C9D", 4, "\u5CA4", 4], + ["8d40", "\u5CAA\u5CAE\u5CAF\u5CB0\u5CB2\u5CB4\u5CB6\u5CB9\u5CBA\u5CBB\u5CBC\u5CBE\u5CC0\u5CC2\u5CC3\u5CC5", 5, "\u5CCC", 5, "\u5CD3", 5, "\u5CDA", 6, "\u5CE2\u5CE3\u5CE7\u5CE9\u5CEB\u5CEC\u5CEE\u5CEF\u5CF1", 9, "\u5CFC", 4], + ["8d80", "\u5D01\u5D04\u5D05\u5D08", 5, "\u5D0F", 4, "\u5D15\u5D17\u5D18\u5D19\u5D1A\u5D1C\u5D1D\u5D1F", 4, "\u5D25\u5D28\u5D2A\u5D2B\u5D2C\u5D2F", 4, "\u5D35", 7, "\u5D3F", 7, "\u5D48\u5D49\u5D4D", 10, "\u5D59\u5D5A\u5D5C\u5D5E", 10, "\u5D6A\u5D6D\u5D6E\u5D70\u5D71\u5D72\u5D73\u5D75", 12, "\u5D83", 21, "\u5D9A\u5D9B\u5D9C\u5D9E\u5D9F\u5DA0"], + ["8e40", "\u5DA1", 21, "\u5DB8", 12, "\u5DC6", 6, "\u5DCE", 12, "\u5DDC\u5DDF\u5DE0\u5DE3\u5DE4\u5DEA\u5DEC\u5DED"], + ["8e80", "\u5DF0\u5DF5\u5DF6\u5DF8", 4, "\u5DFF\u5E00\u5E04\u5E07\u5E09\u5E0A\u5E0B\u5E0D\u5E0E\u5E12\u5E13\u5E17\u5E1E", 7, "\u5E28", 4, "\u5E2F\u5E30\u5E32", 4, "\u5E39\u5E3A\u5E3E\u5E3F\u5E40\u5E41\u5E43\u5E46", 5, "\u5E4D", 6, "\u5E56", 4, "\u5E5C\u5E5D\u5E5F\u5E60\u5E63", 14, "\u5E75\u5E77\u5E79\u5E7E\u5E81\u5E82\u5E83\u5E85\u5E88\u5E89\u5E8C\u5E8D\u5E8E\u5E92\u5E98\u5E9B\u5E9D\u5EA1\u5EA2\u5EA3\u5EA4\u5EA8", 4, "\u5EAE", 4, "\u5EB4\u5EBA\u5EBB\u5EBC\u5EBD\u5EBF", 6], + ["8f40", "\u5EC6\u5EC7\u5EC8\u5ECB", 5, "\u5ED4\u5ED5\u5ED7\u5ED8\u5ED9\u5EDA\u5EDC", 11, "\u5EE9\u5EEB", 8, "\u5EF5\u5EF8\u5EF9\u5EFB\u5EFC\u5EFD\u5F05\u5F06\u5F07\u5F09\u5F0C\u5F0D\u5F0E\u5F10\u5F12\u5F14\u5F16\u5F19\u5F1A\u5F1C\u5F1D\u5F1E\u5F21\u5F22\u5F23\u5F24"], + ["8f80", "\u5F28\u5F2B\u5F2C\u5F2E\u5F30\u5F32", 6, "\u5F3B\u5F3D\u5F3E\u5F3F\u5F41", 14, "\u5F51\u5F54\u5F59\u5F5A\u5F5B\u5F5C\u5F5E\u5F5F\u5F60\u5F63\u5F65\u5F67\u5F68\u5F6B\u5F6E\u5F6F\u5F72\u5F74\u5F75\u5F76\u5F78\u5F7A\u5F7D\u5F7E\u5F7F\u5F83\u5F86\u5F8D\u5F8E\u5F8F\u5F91\u5F93\u5F94\u5F96\u5F9A\u5F9B\u5F9D\u5F9E\u5F9F\u5FA0\u5FA2", 5, "\u5FA9\u5FAB\u5FAC\u5FAF", 5, "\u5FB6\u5FB8\u5FB9\u5FBA\u5FBB\u5FBE", 4, "\u5FC7\u5FC8\u5FCA\u5FCB\u5FCE\u5FD3\u5FD4\u5FD5\u5FDA\u5FDB\u5FDC\u5FDE\u5FDF\u5FE2\u5FE3\u5FE5\u5FE6\u5FE8\u5FE9\u5FEC\u5FEF\u5FF0\u5FF2\u5FF3\u5FF4\u5FF6\u5FF7\u5FF9\u5FFA\u5FFC\u6007"], + ["9040", "\u6008\u6009\u600B\u600C\u6010\u6011\u6013\u6017\u6018\u601A\u601E\u601F\u6022\u6023\u6024\u602C\u602D\u602E\u6030", 4, "\u6036", 4, "\u603D\u603E\u6040\u6044", 6, "\u604C\u604E\u604F\u6051\u6053\u6054\u6056\u6057\u6058\u605B\u605C\u605E\u605F\u6060\u6061\u6065\u6066\u606E\u6071\u6072\u6074\u6075\u6077\u607E\u6080"], + ["9080", "\u6081\u6082\u6085\u6086\u6087\u6088\u608A\u608B\u608E\u608F\u6090\u6091\u6093\u6095\u6097\u6098\u6099\u609C\u609E\u60A1\u60A2\u60A4\u60A5\u60A7\u60A9\u60AA\u60AE\u60B0\u60B3\u60B5\u60B6\u60B7\u60B9\u60BA\u60BD", 7, "\u60C7\u60C8\u60C9\u60CC", 4, "\u60D2\u60D3\u60D4\u60D6\u60D7\u60D9\u60DB\u60DE\u60E1", 4, "\u60EA\u60F1\u60F2\u60F5\u60F7\u60F8\u60FB", 4, "\u6102\u6103\u6104\u6105\u6107\u610A\u610B\u610C\u6110", 4, "\u6116\u6117\u6118\u6119\u611B\u611C\u611D\u611E\u6121\u6122\u6125\u6128\u6129\u612A\u612C", 18, "\u6140", 6], + ["9140", "\u6147\u6149\u614B\u614D\u614F\u6150\u6152\u6153\u6154\u6156", 6, "\u615E\u615F\u6160\u6161\u6163\u6164\u6165\u6166\u6169", 6, "\u6171\u6172\u6173\u6174\u6176\u6178", 18, "\u618C\u618D\u618F", 4, "\u6195"], + ["9180", "\u6196", 6, "\u619E", 8, "\u61AA\u61AB\u61AD", 9, "\u61B8", 5, "\u61BF\u61C0\u61C1\u61C3", 4, "\u61C9\u61CC", 4, "\u61D3\u61D5", 16, "\u61E7", 13, "\u61F6", 8, "\u6200", 5, "\u6207\u6209\u6213\u6214\u6219\u621C\u621D\u621E\u6220\u6223\u6226\u6227\u6228\u6229\u622B\u622D\u622F\u6230\u6231\u6232\u6235\u6236\u6238", 4, "\u6242\u6244\u6245\u6246\u624A"], + ["9240", "\u624F\u6250\u6255\u6256\u6257\u6259\u625A\u625C", 6, "\u6264\u6265\u6268\u6271\u6272\u6274\u6275\u6277\u6278\u627A\u627B\u627D\u6281\u6282\u6283\u6285\u6286\u6287\u6288\u628B", 5, "\u6294\u6299\u629C\u629D\u629E\u62A3\u62A6\u62A7\u62A9\u62AA\u62AD\u62AE\u62AF\u62B0\u62B2\u62B3\u62B4\u62B6\u62B7\u62B8\u62BA\u62BE\u62C0\u62C1"], + ["9280", "\u62C3\u62CB\u62CF\u62D1\u62D5\u62DD\u62DE\u62E0\u62E1\u62E4\u62EA\u62EB\u62F0\u62F2\u62F5\u62F8\u62F9\u62FA\u62FB\u6300\u6303\u6304\u6305\u6306\u630A\u630B\u630C\u630D\u630F\u6310\u6312\u6313\u6314\u6315\u6317\u6318\u6319\u631C\u6326\u6327\u6329\u632C\u632D\u632E\u6330\u6331\u6333", 5, "\u633B\u633C\u633E\u633F\u6340\u6341\u6344\u6347\u6348\u634A\u6351\u6352\u6353\u6354\u6356", 7, "\u6360\u6364\u6365\u6366\u6368\u636A\u636B\u636C\u636F\u6370\u6372\u6373\u6374\u6375\u6378\u6379\u637C\u637D\u637E\u637F\u6381\u6383\u6384\u6385\u6386\u638B\u638D\u6391\u6393\u6394\u6395\u6397\u6399", 6, "\u63A1\u63A4\u63A6\u63AB\u63AF\u63B1\u63B2\u63B5\u63B6\u63B9\u63BB\u63BD\u63BF\u63C0"], + ["9340", "\u63C1\u63C2\u63C3\u63C5\u63C7\u63C8\u63CA\u63CB\u63CC\u63D1\u63D3\u63D4\u63D5\u63D7", 6, "\u63DF\u63E2\u63E4", 4, "\u63EB\u63EC\u63EE\u63EF\u63F0\u63F1\u63F3\u63F5\u63F7\u63F9\u63FA\u63FB\u63FC\u63FE\u6403\u6404\u6406", 4, "\u640D\u640E\u6411\u6412\u6415", 5, "\u641D\u641F\u6422\u6423\u6424"], + ["9380", "\u6425\u6427\u6428\u6429\u642B\u642E", 5, "\u6435", 4, "\u643B\u643C\u643E\u6440\u6442\u6443\u6449\u644B", 6, "\u6453\u6455\u6456\u6457\u6459", 4, "\u645F", 7, "\u6468\u646A\u646B\u646C\u646E", 9, "\u647B", 6, "\u6483\u6486\u6488", 8, "\u6493\u6494\u6497\u6498\u649A\u649B\u649C\u649D\u649F", 4, "\u64A5\u64A6\u64A7\u64A8\u64AA\u64AB\u64AF\u64B1\u64B2\u64B3\u64B4\u64B6\u64B9\u64BB\u64BD\u64BE\u64BF\u64C1\u64C3\u64C4\u64C6", 6, "\u64CF\u64D1\u64D3\u64D4\u64D5\u64D6\u64D9\u64DA"], + ["9440", "\u64DB\u64DC\u64DD\u64DF\u64E0\u64E1\u64E3\u64E5\u64E7", 24, "\u6501", 7, "\u650A", 7, "\u6513", 4, "\u6519", 8], + ["9480", "\u6522\u6523\u6524\u6526", 4, "\u652C\u652D\u6530\u6531\u6532\u6533\u6537\u653A\u653C\u653D\u6540", 4, "\u6546\u6547\u654A\u654B\u654D\u654E\u6550\u6552\u6553\u6554\u6557\u6558\u655A\u655C\u655F\u6560\u6561\u6564\u6565\u6567\u6568\u6569\u656A\u656D\u656E\u656F\u6571\u6573\u6575\u6576\u6578", 14, "\u6588\u6589\u658A\u658D\u658E\u658F\u6592\u6594\u6595\u6596\u6598\u659A\u659D\u659E\u65A0\u65A2\u65A3\u65A6\u65A8\u65AA\u65AC\u65AE\u65B1", 7, "\u65BA\u65BB\u65BE\u65BF\u65C0\u65C2\u65C7\u65C8\u65C9\u65CA\u65CD\u65D0\u65D1\u65D3\u65D4\u65D5\u65D8", 7, "\u65E1\u65E3\u65E4\u65EA\u65EB"], + ["9540", "\u65F2\u65F3\u65F4\u65F5\u65F8\u65F9\u65FB", 4, "\u6601\u6604\u6605\u6607\u6608\u6609\u660B\u660D\u6610\u6611\u6612\u6616\u6617\u6618\u661A\u661B\u661C\u661E\u6621\u6622\u6623\u6624\u6626\u6629\u662A\u662B\u662C\u662E\u6630\u6632\u6633\u6637", 4, "\u663D\u663F\u6640\u6642\u6644", 6, "\u664D\u664E\u6650\u6651\u6658"], + ["9580", "\u6659\u665B\u665C\u665D\u665E\u6660\u6662\u6663\u6665\u6667\u6669", 4, "\u6671\u6672\u6673\u6675\u6678\u6679\u667B\u667C\u667D\u667F\u6680\u6681\u6683\u6685\u6686\u6688\u6689\u668A\u668B\u668D\u668E\u668F\u6690\u6692\u6693\u6694\u6695\u6698", 4, "\u669E", 8, "\u66A9", 4, "\u66AF", 4, "\u66B5\u66B6\u66B7\u66B8\u66BA\u66BB\u66BC\u66BD\u66BF", 25, "\u66DA\u66DE", 7, "\u66E7\u66E8\u66EA", 5, "\u66F1\u66F5\u66F6\u66F8\u66FA\u66FB\u66FD\u6701\u6702\u6703"], + ["9640", "\u6704\u6705\u6706\u6707\u670C\u670E\u670F\u6711\u6712\u6713\u6716\u6718\u6719\u671A\u671C\u671E\u6720", 5, "\u6727\u6729\u672E\u6730\u6732\u6733\u6736\u6737\u6738\u6739\u673B\u673C\u673E\u673F\u6741\u6744\u6745\u6747\u674A\u674B\u674D\u6752\u6754\u6755\u6757", 4, "\u675D\u6762\u6763\u6764\u6766\u6767\u676B\u676C\u676E\u6771\u6774\u6776"], + ["9680", "\u6778\u6779\u677A\u677B\u677D\u6780\u6782\u6783\u6785\u6786\u6788\u678A\u678C\u678D\u678E\u678F\u6791\u6792\u6793\u6794\u6796\u6799\u679B\u679F\u67A0\u67A1\u67A4\u67A6\u67A9\u67AC\u67AE\u67B1\u67B2\u67B4\u67B9", 7, "\u67C2\u67C5", 9, "\u67D5\u67D6\u67D7\u67DB\u67DF\u67E1\u67E3\u67E4\u67E6\u67E7\u67E8\u67EA\u67EB\u67ED\u67EE\u67F2\u67F5", 7, "\u67FE\u6801\u6802\u6803\u6804\u6806\u680D\u6810\u6812\u6814\u6815\u6818", 4, "\u681E\u681F\u6820\u6822", 6, "\u682B", 6, "\u6834\u6835\u6836\u683A\u683B\u683F\u6847\u684B\u684D\u684F\u6852\u6856", 5], + ["9740", "\u685C\u685D\u685E\u685F\u686A\u686C", 7, "\u6875\u6878", 8, "\u6882\u6884\u6887", 7, "\u6890\u6891\u6892\u6894\u6895\u6896\u6898", 9, "\u68A3\u68A4\u68A5\u68A9\u68AA\u68AB\u68AC\u68AE\u68B1\u68B2\u68B4\u68B6\u68B7\u68B8"], + ["9780", "\u68B9", 6, "\u68C1\u68C3", 5, "\u68CA\u68CC\u68CE\u68CF\u68D0\u68D1\u68D3\u68D4\u68D6\u68D7\u68D9\u68DB", 4, "\u68E1\u68E2\u68E4", 9, "\u68EF\u68F2\u68F3\u68F4\u68F6\u68F7\u68F8\u68FB\u68FD\u68FE\u68FF\u6900\u6902\u6903\u6904\u6906", 4, "\u690C\u690F\u6911\u6913", 11, "\u6921\u6922\u6923\u6925", 7, "\u692E\u692F\u6931\u6932\u6933\u6935\u6936\u6937\u6938\u693A\u693B\u693C\u693E\u6940\u6941\u6943", 16, "\u6955\u6956\u6958\u6959\u695B\u695C\u695F"], + ["9840", "\u6961\u6962\u6964\u6965\u6967\u6968\u6969\u696A\u696C\u696D\u696F\u6970\u6972", 4, "\u697A\u697B\u697D\u697E\u697F\u6981\u6983\u6985\u698A\u698B\u698C\u698E", 5, "\u6996\u6997\u6999\u699A\u699D", 9, "\u69A9\u69AA\u69AC\u69AE\u69AF\u69B0\u69B2\u69B3\u69B5\u69B6\u69B8\u69B9\u69BA\u69BC\u69BD"], + ["9880", "\u69BE\u69BF\u69C0\u69C2", 7, "\u69CB\u69CD\u69CF\u69D1\u69D2\u69D3\u69D5", 5, "\u69DC\u69DD\u69DE\u69E1", 11, "\u69EE\u69EF\u69F0\u69F1\u69F3", 9, "\u69FE\u6A00", 9, "\u6A0B", 11, "\u6A19", 5, "\u6A20\u6A22", 5, "\u6A29\u6A2B\u6A2C\u6A2D\u6A2E\u6A30\u6A32\u6A33\u6A34\u6A36", 6, "\u6A3F", 4, "\u6A45\u6A46\u6A48", 7, "\u6A51", 6, "\u6A5A"], + ["9940", "\u6A5C", 4, "\u6A62\u6A63\u6A64\u6A66", 10, "\u6A72", 6, "\u6A7A\u6A7B\u6A7D\u6A7E\u6A7F\u6A81\u6A82\u6A83\u6A85", 8, "\u6A8F\u6A92", 4, "\u6A98", 7, "\u6AA1", 5], + ["9980", "\u6AA7\u6AA8\u6AAA\u6AAD", 114, "\u6B25\u6B26\u6B28", 6], + ["9a40", "\u6B2F\u6B30\u6B31\u6B33\u6B34\u6B35\u6B36\u6B38\u6B3B\u6B3C\u6B3D\u6B3F\u6B40\u6B41\u6B42\u6B44\u6B45\u6B48\u6B4A\u6B4B\u6B4D", 11, "\u6B5A", 7, "\u6B68\u6B69\u6B6B", 13, "\u6B7A\u6B7D\u6B7E\u6B7F\u6B80\u6B85\u6B88"], + ["9a80", "\u6B8C\u6B8E\u6B8F\u6B90\u6B91\u6B94\u6B95\u6B97\u6B98\u6B99\u6B9C", 4, "\u6BA2", 7, "\u6BAB", 7, "\u6BB6\u6BB8", 6, "\u6BC0\u6BC3\u6BC4\u6BC6", 4, "\u6BCC\u6BCE\u6BD0\u6BD1\u6BD8\u6BDA\u6BDC", 4, "\u6BE2", 7, "\u6BEC\u6BED\u6BEE\u6BF0\u6BF1\u6BF2\u6BF4\u6BF6\u6BF7\u6BF8\u6BFA\u6BFB\u6BFC\u6BFE", 6, "\u6C08", 4, "\u6C0E\u6C12\u6C17\u6C1C\u6C1D\u6C1E\u6C20\u6C23\u6C25\u6C2B\u6C2C\u6C2D\u6C31\u6C33\u6C36\u6C37\u6C39\u6C3A\u6C3B\u6C3C\u6C3E\u6C3F\u6C43\u6C44\u6C45\u6C48\u6C4B", 4, "\u6C51\u6C52\u6C53\u6C56\u6C58"], + ["9b40", "\u6C59\u6C5A\u6C62\u6C63\u6C65\u6C66\u6C67\u6C6B", 4, "\u6C71\u6C73\u6C75\u6C77\u6C78\u6C7A\u6C7B\u6C7C\u6C7F\u6C80\u6C84\u6C87\u6C8A\u6C8B\u6C8D\u6C8E\u6C91\u6C92\u6C95\u6C96\u6C97\u6C98\u6C9A\u6C9C\u6C9D\u6C9E\u6CA0\u6CA2\u6CA8\u6CAC\u6CAF\u6CB0\u6CB4\u6CB5\u6CB6\u6CB7\u6CBA\u6CC0\u6CC1\u6CC2\u6CC3\u6CC6\u6CC7\u6CC8\u6CCB\u6CCD\u6CCE\u6CCF\u6CD1\u6CD2\u6CD8"], + ["9b80", "\u6CD9\u6CDA\u6CDC\u6CDD\u6CDF\u6CE4\u6CE6\u6CE7\u6CE9\u6CEC\u6CED\u6CF2\u6CF4\u6CF9\u6CFF\u6D00\u6D02\u6D03\u6D05\u6D06\u6D08\u6D09\u6D0A\u6D0D\u6D0F\u6D10\u6D11\u6D13\u6D14\u6D15\u6D16\u6D18\u6D1C\u6D1D\u6D1F", 5, "\u6D26\u6D28\u6D29\u6D2C\u6D2D\u6D2F\u6D30\u6D34\u6D36\u6D37\u6D38\u6D3A\u6D3F\u6D40\u6D42\u6D44\u6D49\u6D4C\u6D50\u6D55\u6D56\u6D57\u6D58\u6D5B\u6D5D\u6D5F\u6D61\u6D62\u6D64\u6D65\u6D67\u6D68\u6D6B\u6D6C\u6D6D\u6D70\u6D71\u6D72\u6D73\u6D75\u6D76\u6D79\u6D7A\u6D7B\u6D7D", 4, "\u6D83\u6D84\u6D86\u6D87\u6D8A\u6D8B\u6D8D\u6D8F\u6D90\u6D92\u6D96", 4, "\u6D9C\u6DA2\u6DA5\u6DAC\u6DAD\u6DB0\u6DB1\u6DB3\u6DB4\u6DB6\u6DB7\u6DB9", 5, "\u6DC1\u6DC2\u6DC3\u6DC8\u6DC9\u6DCA"], + ["9c40", "\u6DCD\u6DCE\u6DCF\u6DD0\u6DD2\u6DD3\u6DD4\u6DD5\u6DD7\u6DDA\u6DDB\u6DDC\u6DDF\u6DE2\u6DE3\u6DE5\u6DE7\u6DE8\u6DE9\u6DEA\u6DED\u6DEF\u6DF0\u6DF2\u6DF4\u6DF5\u6DF6\u6DF8\u6DFA\u6DFD", 7, "\u6E06\u6E07\u6E08\u6E09\u6E0B\u6E0F\u6E12\u6E13\u6E15\u6E18\u6E19\u6E1B\u6E1C\u6E1E\u6E1F\u6E22\u6E26\u6E27\u6E28\u6E2A\u6E2C\u6E2E\u6E30\u6E31\u6E33\u6E35"], + ["9c80", "\u6E36\u6E37\u6E39\u6E3B", 7, "\u6E45", 7, "\u6E4F\u6E50\u6E51\u6E52\u6E55\u6E57\u6E59\u6E5A\u6E5C\u6E5D\u6E5E\u6E60", 10, "\u6E6C\u6E6D\u6E6F", 14, "\u6E80\u6E81\u6E82\u6E84\u6E87\u6E88\u6E8A", 4, "\u6E91", 6, "\u6E99\u6E9A\u6E9B\u6E9D\u6E9E\u6EA0\u6EA1\u6EA3\u6EA4\u6EA6\u6EA8\u6EA9\u6EAB\u6EAC\u6EAD\u6EAE\u6EB0\u6EB3\u6EB5\u6EB8\u6EB9\u6EBC\u6EBE\u6EBF\u6EC0\u6EC3\u6EC4\u6EC5\u6EC6\u6EC8\u6EC9\u6ECA\u6ECC\u6ECD\u6ECE\u6ED0\u6ED2\u6ED6\u6ED8\u6ED9\u6EDB\u6EDC\u6EDD\u6EE3\u6EE7\u6EEA", 5], + ["9d40", "\u6EF0\u6EF1\u6EF2\u6EF3\u6EF5\u6EF6\u6EF7\u6EF8\u6EFA", 7, "\u6F03\u6F04\u6F05\u6F07\u6F08\u6F0A", 4, "\u6F10\u6F11\u6F12\u6F16", 9, "\u6F21\u6F22\u6F23\u6F25\u6F26\u6F27\u6F28\u6F2C\u6F2E\u6F30\u6F32\u6F34\u6F35\u6F37", 6, "\u6F3F\u6F40\u6F41\u6F42"], + ["9d80", "\u6F43\u6F44\u6F45\u6F48\u6F49\u6F4A\u6F4C\u6F4E", 9, "\u6F59\u6F5A\u6F5B\u6F5D\u6F5F\u6F60\u6F61\u6F63\u6F64\u6F65\u6F67", 5, "\u6F6F\u6F70\u6F71\u6F73\u6F75\u6F76\u6F77\u6F79\u6F7B\u6F7D", 6, "\u6F85\u6F86\u6F87\u6F8A\u6F8B\u6F8F", 12, "\u6F9D\u6F9E\u6F9F\u6FA0\u6FA2", 4, "\u6FA8", 10, "\u6FB4\u6FB5\u6FB7\u6FB8\u6FBA", 5, "\u6FC1\u6FC3", 5, "\u6FCA", 6, "\u6FD3", 10, "\u6FDF\u6FE2\u6FE3\u6FE4\u6FE5"], + ["9e40", "\u6FE6", 7, "\u6FF0", 32, "\u7012", 7, "\u701C", 6, "\u7024", 6], + ["9e80", "\u702B", 9, "\u7036\u7037\u7038\u703A", 17, "\u704D\u704E\u7050", 13, "\u705F", 11, "\u706E\u7071\u7072\u7073\u7074\u7077\u7079\u707A\u707B\u707D\u7081\u7082\u7083\u7084\u7086\u7087\u7088\u708B\u708C\u708D\u708F\u7090\u7091\u7093\u7097\u7098\u709A\u709B\u709E", 12, "\u70B0\u70B2\u70B4\u70B5\u70B6\u70BA\u70BE\u70BF\u70C4\u70C5\u70C6\u70C7\u70C9\u70CB", 12, "\u70DA"], + ["9f40", "\u70DC\u70DD\u70DE\u70E0\u70E1\u70E2\u70E3\u70E5\u70EA\u70EE\u70F0", 6, "\u70F8\u70FA\u70FB\u70FC\u70FE", 10, "\u710B", 4, "\u7111\u7112\u7114\u7117\u711B", 10, "\u7127", 7, "\u7132\u7133\u7134"], + ["9f80", "\u7135\u7137", 13, "\u7146\u7147\u7148\u7149\u714B\u714D\u714F", 12, "\u715D\u715F", 4, "\u7165\u7169", 4, "\u716F\u7170\u7171\u7174\u7175\u7176\u7177\u7179\u717B\u717C\u717E", 5, "\u7185", 4, "\u718B\u718C\u718D\u718E\u7190\u7191\u7192\u7193\u7195\u7196\u7197\u719A", 4, "\u71A1", 6, "\u71A9\u71AA\u71AB\u71AD", 5, "\u71B4\u71B6\u71B7\u71B8\u71BA", 8, "\u71C4", 9, "\u71CF", 4], + ["a040", "\u71D6", 9, "\u71E1\u71E2\u71E3\u71E4\u71E6\u71E8", 5, "\u71EF", 9, "\u71FA", 11, "\u7207", 19], + ["a080", "\u721B\u721C\u721E", 9, "\u7229\u722B\u722D\u722E\u722F\u7232\u7233\u7234\u723A\u723C\u723E\u7240", 6, "\u7249\u724A\u724B\u724E\u724F\u7250\u7251\u7253\u7254\u7255\u7257\u7258\u725A\u725C\u725E\u7260\u7263\u7264\u7265\u7268\u726A\u726B\u726C\u726D\u7270\u7271\u7273\u7274\u7276\u7277\u7278\u727B\u727C\u727D\u7282\u7283\u7285", 4, "\u728C\u728E\u7290\u7291\u7293", 11, "\u72A0", 11, "\u72AE\u72B1\u72B2\u72B3\u72B5\u72BA", 6, "\u72C5\u72C6\u72C7\u72C9\u72CA\u72CB\u72CC\u72CF\u72D1\u72D3\u72D4\u72D5\u72D6\u72D8\u72DA\u72DB"], + ["a1a1", "\u3000\u3001\u3002\xB7\u02C9\u02C7\xA8\u3003\u3005\u2014\uFF5E\u2016\u2026\u2018\u2019\u201C\u201D\u3014\u3015\u3008", 7, "\u3016\u3017\u3010\u3011\xB1\xD7\xF7\u2236\u2227\u2228\u2211\u220F\u222A\u2229\u2208\u2237\u221A\u22A5\u2225\u2220\u2312\u2299\u222B\u222E\u2261\u224C\u2248\u223D\u221D\u2260\u226E\u226F\u2264\u2265\u221E\u2235\u2234\u2642\u2640\xB0\u2032\u2033\u2103\uFF04\xA4\uFFE0\uFFE1\u2030\xA7\u2116\u2606\u2605\u25CB\u25CF\u25CE\u25C7\u25C6\u25A1\u25A0\u25B3\u25B2\u203B\u2192\u2190\u2191\u2193\u3013"], + ["a2a1", "\u2170", 9], + ["a2b1", "\u2488", 19, "\u2474", 19, "\u2460", 9], + ["a2e5", "\u3220", 9], + ["a2f1", "\u2160", 11], + ["a3a1", "\uFF01\uFF02\uFF03\uFFE5\uFF05", 88, "\uFFE3"], + ["a4a1", "\u3041", 82], + ["a5a1", "\u30A1", 85], + ["a6a1", "\u0391", 16, "\u03A3", 6], + ["a6c1", "\u03B1", 16, "\u03C3", 6], + ["a6e0", "\uFE35\uFE36\uFE39\uFE3A\uFE3F\uFE40\uFE3D\uFE3E\uFE41\uFE42\uFE43\uFE44"], + ["a6ee", "\uFE3B\uFE3C\uFE37\uFE38\uFE31"], + ["a6f4", "\uFE33\uFE34"], + ["a7a1", "\u0410", 5, "\u0401\u0416", 25], + ["a7d1", "\u0430", 5, "\u0451\u0436", 25], + ["a840", "\u02CA\u02CB\u02D9\u2013\u2015\u2025\u2035\u2105\u2109\u2196\u2197\u2198\u2199\u2215\u221F\u2223\u2252\u2266\u2267\u22BF\u2550", 35, "\u2581", 6], + ["a880", "\u2588", 7, "\u2593\u2594\u2595\u25BC\u25BD\u25E2\u25E3\u25E4\u25E5\u2609\u2295\u3012\u301D\u301E"], + ["a8a1", "\u0101\xE1\u01CE\xE0\u0113\xE9\u011B\xE8\u012B\xED\u01D0\xEC\u014D\xF3\u01D2\xF2\u016B\xFA\u01D4\xF9\u01D6\u01D8\u01DA\u01DC\xFC\xEA\u0251"], + ["a8bd", "\u0144\u0148"], + ["a8c0", "\u0261"], + ["a8c5", "\u3105", 36], + ["a940", "\u3021", 8, "\u32A3\u338E\u338F\u339C\u339D\u339E\u33A1\u33C4\u33CE\u33D1\u33D2\u33D5\uFE30\uFFE2\uFFE4"], + ["a959", "\u2121\u3231"], + ["a95c", "\u2010"], + ["a960", "\u30FC\u309B\u309C\u30FD\u30FE\u3006\u309D\u309E\uFE49", 9, "\uFE54\uFE55\uFE56\uFE57\uFE59", 8], + ["a980", "\uFE62", 4, "\uFE68\uFE69\uFE6A\uFE6B"], + ["a996", "\u3007"], + ["a9a4", "\u2500", 75], + ["aa40", "\u72DC\u72DD\u72DF\u72E2", 5, "\u72EA\u72EB\u72F5\u72F6\u72F9\u72FD\u72FE\u72FF\u7300\u7302\u7304", 5, "\u730B\u730C\u730D\u730F\u7310\u7311\u7312\u7314\u7318\u7319\u731A\u731F\u7320\u7323\u7324\u7326\u7327\u7328\u732D\u732F\u7330\u7332\u7333\u7335\u7336\u733A\u733B\u733C\u733D\u7340", 8], + ["aa80", "\u7349\u734A\u734B\u734C\u734E\u734F\u7351\u7353\u7354\u7355\u7356\u7358", 7, "\u7361", 10, "\u736E\u7370\u7371"], + ["ab40", "\u7372", 11, "\u737F", 4, "\u7385\u7386\u7388\u738A\u738C\u738D\u738F\u7390\u7392\u7393\u7394\u7395\u7397\u7398\u7399\u739A\u739C\u739D\u739E\u73A0\u73A1\u73A3", 5, "\u73AA\u73AC\u73AD\u73B1\u73B4\u73B5\u73B6\u73B8\u73B9\u73BC\u73BD\u73BE\u73BF\u73C1\u73C3", 4], + ["ab80", "\u73CB\u73CC\u73CE\u73D2", 6, "\u73DA\u73DB\u73DC\u73DD\u73DF\u73E1\u73E2\u73E3\u73E4\u73E6\u73E8\u73EA\u73EB\u73EC\u73EE\u73EF\u73F0\u73F1\u73F3", 4], + ["ac40", "\u73F8", 10, "\u7404\u7407\u7408\u740B\u740C\u740D\u740E\u7411", 8, "\u741C", 5, "\u7423\u7424\u7427\u7429\u742B\u742D\u742F\u7431\u7432\u7437", 4, "\u743D\u743E\u743F\u7440\u7442", 11], + ["ac80", "\u744E", 6, "\u7456\u7458\u745D\u7460", 12, "\u746E\u746F\u7471", 4, "\u7478\u7479\u747A"], + ["ad40", "\u747B\u747C\u747D\u747F\u7482\u7484\u7485\u7486\u7488\u7489\u748A\u748C\u748D\u748F\u7491", 10, "\u749D\u749F", 7, "\u74AA", 15, "\u74BB", 12], + ["ad80", "\u74C8", 9, "\u74D3", 8, "\u74DD\u74DF\u74E1\u74E5\u74E7", 6, "\u74F0\u74F1\u74F2"], + ["ae40", "\u74F3\u74F5\u74F8", 6, "\u7500\u7501\u7502\u7503\u7505", 7, "\u750E\u7510\u7512\u7514\u7515\u7516\u7517\u751B\u751D\u751E\u7520", 4, "\u7526\u7527\u752A\u752E\u7534\u7536\u7539\u753C\u753D\u753F\u7541\u7542\u7543\u7544\u7546\u7547\u7549\u754A\u754D\u7550\u7551\u7552\u7553\u7555\u7556\u7557\u7558"], + ["ae80", "\u755D", 7, "\u7567\u7568\u7569\u756B", 6, "\u7573\u7575\u7576\u7577\u757A", 4, "\u7580\u7581\u7582\u7584\u7585\u7587"], + ["af40", "\u7588\u7589\u758A\u758C\u758D\u758E\u7590\u7593\u7595\u7598\u759B\u759C\u759E\u75A2\u75A6", 4, "\u75AD\u75B6\u75B7\u75BA\u75BB\u75BF\u75C0\u75C1\u75C6\u75CB\u75CC\u75CE\u75CF\u75D0\u75D1\u75D3\u75D7\u75D9\u75DA\u75DC\u75DD\u75DF\u75E0\u75E1\u75E5\u75E9\u75EC\u75ED\u75EE\u75EF\u75F2\u75F3\u75F5\u75F6\u75F7\u75F8\u75FA\u75FB\u75FD\u75FE\u7602\u7604\u7606\u7607"], + ["af80", "\u7608\u7609\u760B\u760D\u760E\u760F\u7611\u7612\u7613\u7614\u7616\u761A\u761C\u761D\u761E\u7621\u7623\u7627\u7628\u762C\u762E\u762F\u7631\u7632\u7636\u7637\u7639\u763A\u763B\u763D\u7641\u7642\u7644"], + ["b040", "\u7645", 6, "\u764E", 5, "\u7655\u7657", 4, "\u765D\u765F\u7660\u7661\u7662\u7664", 6, "\u766C\u766D\u766E\u7670", 7, "\u7679\u767A\u767C\u767F\u7680\u7681\u7683\u7685\u7689\u768A\u768C\u768D\u768F\u7690\u7692\u7694\u7695\u7697\u7698\u769A\u769B"], + ["b080", "\u769C", 7, "\u76A5", 8, "\u76AF\u76B0\u76B3\u76B5", 9, "\u76C0\u76C1\u76C3\u554A\u963F\u57C3\u6328\u54CE\u5509\u54C0\u7691\u764C\u853C\u77EE\u827E\u788D\u7231\u9698\u978D\u6C28\u5B89\u4FFA\u6309\u6697\u5CB8\u80FA\u6848\u80AE\u6602\u76CE\u51F9\u6556\u71AC\u7FF1\u8884\u50B2\u5965\u61CA\u6FB3\u82AD\u634C\u6252\u53ED\u5427\u7B06\u516B\u75A4\u5DF4\u62D4\u8DCB\u9776\u628A\u8019\u575D\u9738\u7F62\u7238\u767D\u67CF\u767E\u6446\u4F70\u8D25\u62DC\u7A17\u6591\u73ED\u642C\u6273\u822C\u9881\u677F\u7248\u626E\u62CC\u4F34\u74E3\u534A\u529E\u7ECA\u90A6\u5E2E\u6886\u699C\u8180\u7ED1\u68D2\u78C5\u868C\u9551\u508D\u8C24\u82DE\u80DE\u5305\u8912\u5265"], + ["b140", "\u76C4\u76C7\u76C9\u76CB\u76CC\u76D3\u76D5\u76D9\u76DA\u76DC\u76DD\u76DE\u76E0", 4, "\u76E6", 7, "\u76F0\u76F3\u76F5\u76F6\u76F7\u76FA\u76FB\u76FD\u76FF\u7700\u7702\u7703\u7705\u7706\u770A\u770C\u770E", 10, "\u771B\u771C\u771D\u771E\u7721\u7723\u7724\u7725\u7727\u772A\u772B"], + ["b180", "\u772C\u772E\u7730", 4, "\u7739\u773B\u773D\u773E\u773F\u7742\u7744\u7745\u7746\u7748", 7, "\u7752", 7, "\u775C\u8584\u96F9\u4FDD\u5821\u9971\u5B9D\u62B1\u62A5\u66B4\u8C79\u9C8D\u7206\u676F\u7891\u60B2\u5351\u5317\u8F88\u80CC\u8D1D\u94A1\u500D\u72C8\u5907\u60EB\u7119\u88AB\u5954\u82EF\u672C\u7B28\u5D29\u7EF7\u752D\u6CF5\u8E66\u8FF8\u903C\u9F3B\u6BD4\u9119\u7B14\u5F7C\u78A7\u84D6\u853D\u6BD5\u6BD9\u6BD6\u5E01\u5E87\u75F9\u95ED\u655D\u5F0A\u5FC5\u8F9F\u58C1\u81C2\u907F\u965B\u97AD\u8FB9\u7F16\u8D2C\u6241\u4FBF\u53D8\u535E\u8FA8\u8FA9\u8FAB\u904D\u6807\u5F6A\u8198\u8868\u9CD6\u618B\u522B\u762A\u5F6C\u658C\u6FD2\u6EE8\u5BBE\u6448\u5175\u51B0\u67C4\u4E19\u79C9\u997C\u70B3"], + ["b240", "\u775D\u775E\u775F\u7760\u7764\u7767\u7769\u776A\u776D", 11, "\u777A\u777B\u777C\u7781\u7782\u7783\u7786", 5, "\u778F\u7790\u7793", 11, "\u77A1\u77A3\u77A4\u77A6\u77A8\u77AB\u77AD\u77AE\u77AF\u77B1\u77B2\u77B4\u77B6", 4], + ["b280", "\u77BC\u77BE\u77C0", 12, "\u77CE", 8, "\u77D8\u77D9\u77DA\u77DD", 4, "\u77E4\u75C5\u5E76\u73BB\u83E0\u64AD\u62E8\u94B5\u6CE2\u535A\u52C3\u640F\u94C2\u7B94\u4F2F\u5E1B\u8236\u8116\u818A\u6E24\u6CCA\u9A73\u6355\u535C\u54FA\u8865\u57E0\u4E0D\u5E03\u6B65\u7C3F\u90E8\u6016\u64E6\u731C\u88C1\u6750\u624D\u8D22\u776C\u8E29\u91C7\u5F69\u83DC\u8521\u9910\u53C2\u8695\u6B8B\u60ED\u60E8\u707F\u82CD\u8231\u4ED3\u6CA7\u85CF\u64CD\u7CD9\u69FD\u66F9\u8349\u5395\u7B56\u4FA7\u518C\u6D4B\u5C42\u8E6D\u63D2\u53C9\u832C\u8336\u67E5\u78B4\u643D\u5BDF\u5C94\u5DEE\u8BE7\u62C6\u67F4\u8C7A\u6400\u63BA\u8749\u998B\u8C17\u7F20\u94F2\u4EA7\u9610\u98A4\u660C\u7316"], + ["b340", "\u77E6\u77E8\u77EA\u77EF\u77F0\u77F1\u77F2\u77F4\u77F5\u77F7\u77F9\u77FA\u77FB\u77FC\u7803", 5, "\u780A\u780B\u780E\u780F\u7810\u7813\u7815\u7819\u781B\u781E\u7820\u7821\u7822\u7824\u7828\u782A\u782B\u782E\u782F\u7831\u7832\u7833\u7835\u7836\u783D\u783F\u7841\u7842\u7843\u7844\u7846\u7848\u7849\u784A\u784B\u784D\u784F\u7851\u7853\u7854\u7858\u7859\u785A"], + ["b380", "\u785B\u785C\u785E", 11, "\u786F", 7, "\u7878\u7879\u787A\u787B\u787D", 6, "\u573A\u5C1D\u5E38\u957F\u507F\u80A0\u5382\u655E\u7545\u5531\u5021\u8D85\u6284\u949E\u671D\u5632\u6F6E\u5DE2\u5435\u7092\u8F66\u626F\u64A4\u63A3\u5F7B\u6F88\u90F4\u81E3\u8FB0\u5C18\u6668\u5FF1\u6C89\u9648\u8D81\u886C\u6491\u79F0\u57CE\u6A59\u6210\u5448\u4E58\u7A0B\u60E9\u6F84\u8BDA\u627F\u901E\u9A8B\u79E4\u5403\u75F4\u6301\u5319\u6C60\u8FDF\u5F1B\u9A70\u803B\u9F7F\u4F88\u5C3A\u8D64\u7FC5\u65A5\u70BD\u5145\u51B2\u866B\u5D07\u5BA0\u62BD\u916C\u7574\u8E0C\u7A20\u6101\u7B79\u4EC7\u7EF8\u7785\u4E11\u81ED\u521D\u51FA\u6A71\u53A8\u8E87\u9504\u96CF\u6EC1\u9664\u695A"], + ["b440", "\u7884\u7885\u7886\u7888\u788A\u788B\u788F\u7890\u7892\u7894\u7895\u7896\u7899\u789D\u789E\u78A0\u78A2\u78A4\u78A6\u78A8", 7, "\u78B5\u78B6\u78B7\u78B8\u78BA\u78BB\u78BC\u78BD\u78BF\u78C0\u78C2\u78C3\u78C4\u78C6\u78C7\u78C8\u78CC\u78CD\u78CE\u78CF\u78D1\u78D2\u78D3\u78D6\u78D7\u78D8\u78DA", 9], + ["b480", "\u78E4\u78E5\u78E6\u78E7\u78E9\u78EA\u78EB\u78ED", 4, "\u78F3\u78F5\u78F6\u78F8\u78F9\u78FB", 5, "\u7902\u7903\u7904\u7906", 6, "\u7840\u50A8\u77D7\u6410\u89E6\u5904\u63E3\u5DDD\u7A7F\u693D\u4F20\u8239\u5598\u4E32\u75AE\u7A97\u5E62\u5E8A\u95EF\u521B\u5439\u708A\u6376\u9524\u5782\u6625\u693F\u9187\u5507\u6DF3\u7EAF\u8822\u6233\u7EF0\u75B5\u8328\u78C1\u96CC\u8F9E\u6148\u74F7\u8BCD\u6B64\u523A\u8D50\u6B21\u806A\u8471\u56F1\u5306\u4ECE\u4E1B\u51D1\u7C97\u918B\u7C07\u4FC3\u8E7F\u7BE1\u7A9C\u6467\u5D14\u50AC\u8106\u7601\u7CB9\u6DEC\u7FE0\u6751\u5B58\u5BF8\u78CB\u64AE\u6413\u63AA\u632B\u9519\u642D\u8FBE\u7B54\u7629\u6253\u5927\u5446\u6B79\u50A3\u6234\u5E26\u6B86\u4EE3\u8D37\u888B\u5F85\u902E"], + ["b540", "\u790D", 5, "\u7914", 9, "\u791F", 4, "\u7925", 14, "\u7935", 4, "\u793D\u793F\u7942\u7943\u7944\u7945\u7947\u794A", 8, "\u7954\u7955\u7958\u7959\u7961\u7963"], + ["b580", "\u7964\u7966\u7969\u796A\u796B\u796C\u796E\u7970", 6, "\u7979\u797B", 4, "\u7982\u7983\u7986\u7987\u7988\u7989\u798B\u798C\u798D\u798E\u7990\u7991\u7992\u6020\u803D\u62C5\u4E39\u5355\u90F8\u63B8\u80C6\u65E6\u6C2E\u4F46\u60EE\u6DE1\u8BDE\u5F39\u86CB\u5F53\u6321\u515A\u8361\u6863\u5200\u6363\u8E48\u5012\u5C9B\u7977\u5BFC\u5230\u7A3B\u60BC\u9053\u76D7\u5FB7\u5F97\u7684\u8E6C\u706F\u767B\u7B49\u77AA\u51F3\u9093\u5824\u4F4E\u6EF4\u8FEA\u654C\u7B1B\u72C4\u6DA4\u7FDF\u5AE1\u62B5\u5E95\u5730\u8482\u7B2C\u5E1D\u5F1F\u9012\u7F14\u98A0\u6382\u6EC7\u7898\u70B9\u5178\u975B\u57AB\u7535\u4F43\u7538\u5E97\u60E6\u5960\u6DC0\u6BBF\u7889\u53FC\u96D5\u51CB\u5201\u6389\u540A\u9493\u8C03\u8DCC\u7239\u789F\u8776\u8FED\u8C0D\u53E0"], + ["b640", "\u7993", 6, "\u799B", 11, "\u79A8", 10, "\u79B4", 4, "\u79BC\u79BF\u79C2\u79C4\u79C5\u79C7\u79C8\u79CA\u79CC\u79CE\u79CF\u79D0\u79D3\u79D4\u79D6\u79D7\u79D9", 5, "\u79E0\u79E1\u79E2\u79E5\u79E8\u79EA"], + ["b680", "\u79EC\u79EE\u79F1", 6, "\u79F9\u79FA\u79FC\u79FE\u79FF\u7A01\u7A04\u7A05\u7A07\u7A08\u7A09\u7A0A\u7A0C\u7A0F", 4, "\u7A15\u7A16\u7A18\u7A19\u7A1B\u7A1C\u4E01\u76EF\u53EE\u9489\u9876\u9F0E\u952D\u5B9A\u8BA2\u4E22\u4E1C\u51AC\u8463\u61C2\u52A8\u680B\u4F97\u606B\u51BB\u6D1E\u515C\u6296\u6597\u9661\u8C46\u9017\u75D8\u90FD\u7763\u6BD2\u728A\u72EC\u8BFB\u5835\u7779\u8D4C\u675C\u9540\u809A\u5EA6\u6E21\u5992\u7AEF\u77ED\u953B\u6BB5\u65AD\u7F0E\u5806\u5151\u961F\u5BF9\u58A9\u5428\u8E72\u6566\u987F\u56E4\u949D\u76FE\u9041\u6387\u54C6\u591A\u593A\u579B\u8EB2\u6735\u8DFA\u8235\u5241\u60F0\u5815\u86FE\u5CE8\u9E45\u4FC4\u989D\u8BB9\u5A25\u6076\u5384\u627C\u904F\u9102\u997F\u6069\u800C\u513F\u8033\u5C14\u9975\u6D31\u4E8C"], + ["b740", "\u7A1D\u7A1F\u7A21\u7A22\u7A24", 14, "\u7A34\u7A35\u7A36\u7A38\u7A3A\u7A3E\u7A40", 5, "\u7A47", 9, "\u7A52", 4, "\u7A58", 16], + ["b780", "\u7A69", 6, "\u7A71\u7A72\u7A73\u7A75\u7A7B\u7A7C\u7A7D\u7A7E\u7A82\u7A85\u7A87\u7A89\u7A8A\u7A8B\u7A8C\u7A8E\u7A8F\u7A90\u7A93\u7A94\u7A99\u7A9A\u7A9B\u7A9E\u7AA1\u7AA2\u8D30\u53D1\u7F5A\u7B4F\u4F10\u4E4F\u9600\u6CD5\u73D0\u85E9\u5E06\u756A\u7FFB\u6A0A\u77FE\u9492\u7E41\u51E1\u70E6\u53CD\u8FD4\u8303\u8D29\u72AF\u996D\u6CDB\u574A\u82B3\u65B9\u80AA\u623F\u9632\u59A8\u4EFF\u8BBF\u7EBA\u653E\u83F2\u975E\u5561\u98DE\u80A5\u532A\u8BFD\u5420\u80BA\u5E9F\u6CB8\u8D39\u82AC\u915A\u5429\u6C1B\u5206\u7EB7\u575F\u711A\u6C7E\u7C89\u594B\u4EFD\u5FFF\u6124\u7CAA\u4E30\u5C01\u67AB\u8702\u5CF0\u950B\u98CE\u75AF\u70FD\u9022\u51AF\u7F1D\u8BBD\u5949\u51E4\u4F5B\u5426\u592B\u6577\u80A4\u5B75\u6276\u62C2\u8F90\u5E45\u6C1F\u7B26\u4F0F\u4FD8\u670D"], + ["b840", "\u7AA3\u7AA4\u7AA7\u7AA9\u7AAA\u7AAB\u7AAE", 4, "\u7AB4", 10, "\u7AC0", 10, "\u7ACC", 9, "\u7AD7\u7AD8\u7ADA\u7ADB\u7ADC\u7ADD\u7AE1\u7AE2\u7AE4\u7AE7", 5, "\u7AEE\u7AF0\u7AF1\u7AF2\u7AF3"], + ["b880", "\u7AF4", 4, "\u7AFB\u7AFC\u7AFE\u7B00\u7B01\u7B02\u7B05\u7B07\u7B09\u7B0C\u7B0D\u7B0E\u7B10\u7B12\u7B13\u7B16\u7B17\u7B18\u7B1A\u7B1C\u7B1D\u7B1F\u7B21\u7B22\u7B23\u7B27\u7B29\u7B2D\u6D6E\u6DAA\u798F\u88B1\u5F17\u752B\u629A\u8F85\u4FEF\u91DC\u65A7\u812F\u8151\u5E9C\u8150\u8D74\u526F\u8986\u8D4B\u590D\u5085\u4ED8\u961C\u7236\u8179\u8D1F\u5BCC\u8BA3\u9644\u5987\u7F1A\u5490\u5676\u560E\u8BE5\u6539\u6982\u9499\u76D6\u6E89\u5E72\u7518\u6746\u67D1\u7AFF\u809D\u8D76\u611F\u79C6\u6562\u8D63\u5188\u521A\u94A2\u7F38\u809B\u7EB2\u5C97\u6E2F\u6760\u7BD9\u768B\u9AD8\u818F\u7F94\u7CD5\u641E\u9550\u7A3F\u544A\u54E5\u6B4C\u6401\u6208\u9E3D\u80F3\u7599\u5272\u9769\u845B\u683C\u86E4\u9601\u9694\u94EC\u4E2A\u5404\u7ED9\u6839\u8DDF\u8015\u66F4\u5E9A\u7FB9"], + ["b940", "\u7B2F\u7B30\u7B32\u7B34\u7B35\u7B36\u7B37\u7B39\u7B3B\u7B3D\u7B3F", 5, "\u7B46\u7B48\u7B4A\u7B4D\u7B4E\u7B53\u7B55\u7B57\u7B59\u7B5C\u7B5E\u7B5F\u7B61\u7B63", 10, "\u7B6F\u7B70\u7B73\u7B74\u7B76\u7B78\u7B7A\u7B7C\u7B7D\u7B7F\u7B81\u7B82\u7B83\u7B84\u7B86", 6, "\u7B8E\u7B8F"], + ["b980", "\u7B91\u7B92\u7B93\u7B96\u7B98\u7B99\u7B9A\u7B9B\u7B9E\u7B9F\u7BA0\u7BA3\u7BA4\u7BA5\u7BAE\u7BAF\u7BB0\u7BB2\u7BB3\u7BB5\u7BB6\u7BB7\u7BB9", 7, "\u7BC2\u7BC3\u7BC4\u57C2\u803F\u6897\u5DE5\u653B\u529F\u606D\u9F9A\u4F9B\u8EAC\u516C\u5BAB\u5F13\u5DE9\u6C5E\u62F1\u8D21\u5171\u94A9\u52FE\u6C9F\u82DF\u72D7\u57A2\u6784\u8D2D\u591F\u8F9C\u83C7\u5495\u7B8D\u4F30\u6CBD\u5B64\u59D1\u9F13\u53E4\u86CA\u9AA8\u8C37\u80A1\u6545\u987E\u56FA\u96C7\u522E\u74DC\u5250\u5BE1\u6302\u8902\u4E56\u62D0\u602A\u68FA\u5173\u5B98\u51A0\u89C2\u7BA1\u9986\u7F50\u60EF\u704C\u8D2F\u5149\u5E7F\u901B\u7470\u89C4\u572D\u7845\u5F52\u9F9F\u95FA\u8F68\u9B3C\u8BE1\u7678\u6842\u67DC\u8DEA\u8D35\u523D\u8F8A\u6EDA\u68CD\u9505\u90ED\u56FD\u679C\u88F9\u8FC7\u54C8"], + ["ba40", "\u7BC5\u7BC8\u7BC9\u7BCA\u7BCB\u7BCD\u7BCE\u7BCF\u7BD0\u7BD2\u7BD4", 4, "\u7BDB\u7BDC\u7BDE\u7BDF\u7BE0\u7BE2\u7BE3\u7BE4\u7BE7\u7BE8\u7BE9\u7BEB\u7BEC\u7BED\u7BEF\u7BF0\u7BF2", 4, "\u7BF8\u7BF9\u7BFA\u7BFB\u7BFD\u7BFF", 7, "\u7C08\u7C09\u7C0A\u7C0D\u7C0E\u7C10", 5, "\u7C17\u7C18\u7C19"], + ["ba80", "\u7C1A", 4, "\u7C20", 5, "\u7C28\u7C29\u7C2B", 12, "\u7C39", 5, "\u7C42\u9AB8\u5B69\u6D77\u6C26\u4EA5\u5BB3\u9A87\u9163\u61A8\u90AF\u97E9\u542B\u6DB5\u5BD2\u51FD\u558A\u7F55\u7FF0\u64BC\u634D\u65F1\u61BE\u608D\u710A\u6C57\u6C49\u592F\u676D\u822A\u58D5\u568E\u8C6A\u6BEB\u90DD\u597D\u8017\u53F7\u6D69\u5475\u559D\u8377\u83CF\u6838\u79BE\u548C\u4F55\u5408\u76D2\u8C89\u9602\u6CB3\u6DB8\u8D6B\u8910\u9E64\u8D3A\u563F\u9ED1\u75D5\u5F88\u72E0\u6068\u54FC\u4EA8\u6A2A\u8861\u6052\u8F70\u54C4\u70D8\u8679\u9E3F\u6D2A\u5B8F\u5F18\u7EA2\u5589\u4FAF\u7334\u543C\u539A\u5019\u540E\u547C\u4E4E\u5FFD\u745A\u58F6\u846B\u80E1\u8774\u72D0\u7CCA\u6E56"], + ["bb40", "\u7C43", 9, "\u7C4E", 36, "\u7C75", 5, "\u7C7E", 9], + ["bb80", "\u7C88\u7C8A", 6, "\u7C93\u7C94\u7C96\u7C99\u7C9A\u7C9B\u7CA0\u7CA1\u7CA3\u7CA6\u7CA7\u7CA8\u7CA9\u7CAB\u7CAC\u7CAD\u7CAF\u7CB0\u7CB4", 4, "\u7CBA\u7CBB\u5F27\u864E\u552C\u62A4\u4E92\u6CAA\u6237\u82B1\u54D7\u534E\u733E\u6ED1\u753B\u5212\u5316\u8BDD\u69D0\u5F8A\u6000\u6DEE\u574F\u6B22\u73AF\u6853\u8FD8\u7F13\u6362\u60A3\u5524\u75EA\u8C62\u7115\u6DA3\u5BA6\u5E7B\u8352\u614C\u9EC4\u78FA\u8757\u7C27\u7687\u51F0\u60F6\u714C\u6643\u5E4C\u604D\u8C0E\u7070\u6325\u8F89\u5FBD\u6062\u86D4\u56DE\u6BC1\u6094\u6167\u5349\u60E0\u6666\u8D3F\u79FD\u4F1A\u70E9\u6C47\u8BB3\u8BF2\u7ED8\u8364\u660F\u5A5A\u9B42\u6D51\u6DF7\u8C41\u6D3B\u4F19\u706B\u83B7\u6216\u60D1\u970D\u8D27\u7978\u51FB\u573E\u57FA\u673A\u7578\u7A3D\u79EF\u7B95"], + ["bc40", "\u7CBF\u7CC0\u7CC2\u7CC3\u7CC4\u7CC6\u7CC9\u7CCB\u7CCE", 6, "\u7CD8\u7CDA\u7CDB\u7CDD\u7CDE\u7CE1", 6, "\u7CE9", 5, "\u7CF0", 7, "\u7CF9\u7CFA\u7CFC", 13, "\u7D0B", 5], + ["bc80", "\u7D11", 14, "\u7D21\u7D23\u7D24\u7D25\u7D26\u7D28\u7D29\u7D2A\u7D2C\u7D2D\u7D2E\u7D30", 6, "\u808C\u9965\u8FF9\u6FC0\u8BA5\u9E21\u59EC\u7EE9\u7F09\u5409\u6781\u68D8\u8F91\u7C4D\u96C6\u53CA\u6025\u75BE\u6C72\u5373\u5AC9\u7EA7\u6324\u51E0\u810A\u5DF1\u84DF\u6280\u5180\u5B63\u4F0E\u796D\u5242\u60B8\u6D4E\u5BC4\u5BC2\u8BA1\u8BB0\u65E2\u5FCC\u9645\u5993\u7EE7\u7EAA\u5609\u67B7\u5939\u4F73\u5BB6\u52A0\u835A\u988A\u8D3E\u7532\u94BE\u5047\u7A3C\u4EF7\u67B6\u9A7E\u5AC1\u6B7C\u76D1\u575A\u5C16\u7B3A\u95F4\u714E\u517C\u80A9\u8270\u5978\u7F04\u8327\u68C0\u67EC\u78B1\u7877\u62E3\u6361\u7B80\u4FED\u526A\u51CF\u8350\u69DB\u9274\u8DF5\u8D31\u89C1\u952E\u7BAD\u4EF6"], + ["bd40", "\u7D37", 54, "\u7D6F", 7], + ["bd80", "\u7D78", 32, "\u5065\u8230\u5251\u996F\u6E10\u6E85\u6DA7\u5EFA\u50F5\u59DC\u5C06\u6D46\u6C5F\u7586\u848B\u6868\u5956\u8BB2\u5320\u9171\u964D\u8549\u6912\u7901\u7126\u80F6\u4EA4\u90CA\u6D47\u9A84\u5A07\u56BC\u6405\u94F0\u77EB\u4FA5\u811A\u72E1\u89D2\u997A\u7F34\u7EDE\u527F\u6559\u9175\u8F7F\u8F83\u53EB\u7A96\u63ED\u63A5\u7686\u79F8\u8857\u9636\u622A\u52AB\u8282\u6854\u6770\u6377\u776B\u7AED\u6D01\u7ED3\u89E3\u59D0\u6212\u85C9\u82A5\u754C\u501F\u4ECB\u75A5\u8BEB\u5C4A\u5DFE\u7B4B\u65A4\u91D1\u4ECA\u6D25\u895F\u7D27\u9526\u4EC5\u8C28\u8FDB\u9773\u664B\u7981\u8FD1\u70EC\u6D78"], + ["be40", "\u7D99", 12, "\u7DA7", 6, "\u7DAF", 42], + ["be80", "\u7DDA", 32, "\u5C3D\u52B2\u8346\u5162\u830E\u775B\u6676\u9CB8\u4EAC\u60CA\u7CBE\u7CB3\u7ECF\u4E95\u8B66\u666F\u9888\u9759\u5883\u656C\u955C\u5F84\u75C9\u9756\u7ADF\u7ADE\u51C0\u70AF\u7A98\u63EA\u7A76\u7EA0\u7396\u97ED\u4E45\u7078\u4E5D\u9152\u53A9\u6551\u65E7\u81FC\u8205\u548E\u5C31\u759A\u97A0\u62D8\u72D9\u75BD\u5C45\u9A79\u83CA\u5C40\u5480\u77E9\u4E3E\u6CAE\u805A\u62D2\u636E\u5DE8\u5177\u8DDD\u8E1E\u952F\u4FF1\u53E5\u60E7\u70AC\u5267\u6350\u9E43\u5A1F\u5026\u7737\u5377\u7EE2\u6485\u652B\u6289\u6398\u5014\u7235\u89C9\u51B3\u8BC0\u7EDD\u5747\u83CC\u94A7\u519B\u541B\u5CFB"], + ["bf40", "\u7DFB", 62], + ["bf80", "\u7E3A\u7E3C", 4, "\u7E42", 4, "\u7E48", 21, "\u4FCA\u7AE3\u6D5A\u90E1\u9A8F\u5580\u5496\u5361\u54AF\u5F00\u63E9\u6977\u51EF\u6168\u520A\u582A\u52D8\u574E\u780D\u770B\u5EB7\u6177\u7CE0\u625B\u6297\u4EA2\u7095\u8003\u62F7\u70E4\u9760\u5777\u82DB\u67EF\u68F5\u78D5\u9897\u79D1\u58F3\u54B3\u53EF\u6E34\u514B\u523B\u5BA2\u8BFE\u80AF\u5543\u57A6\u6073\u5751\u542D\u7A7A\u6050\u5B54\u63A7\u62A0\u53E3\u6263\u5BC7\u67AF\u54ED\u7A9F\u82E6\u9177\u5E93\u88E4\u5938\u57AE\u630E\u8DE8\u80EF\u5757\u7B77\u4FA9\u5FEB\u5BBD\u6B3E\u5321\u7B50\u72C2\u6846\u77FF\u7736\u65F7\u51B5\u4E8F\u76D4\u5CBF\u7AA5\u8475\u594E\u9B41\u5080"], + ["c040", "\u7E5E", 35, "\u7E83", 23, "\u7E9C\u7E9D\u7E9E"], + ["c080", "\u7EAE\u7EB4\u7EBB\u7EBC\u7ED6\u7EE4\u7EEC\u7EF9\u7F0A\u7F10\u7F1E\u7F37\u7F39\u7F3B", 6, "\u7F43\u7F46", 9, "\u7F52\u7F53\u9988\u6127\u6E83\u5764\u6606\u6346\u56F0\u62EC\u6269\u5ED3\u9614\u5783\u62C9\u5587\u8721\u814A\u8FA3\u5566\u83B1\u6765\u8D56\u84DD\u5A6A\u680F\u62E6\u7BEE\u9611\u5170\u6F9C\u8C30\u63FD\u89C8\u61D2\u7F06\u70C2\u6EE5\u7405\u6994\u72FC\u5ECA\u90CE\u6717\u6D6A\u635E\u52B3\u7262\u8001\u4F6C\u59E5\u916A\u70D9\u6D9D\u52D2\u4E50\u96F7\u956D\u857E\u78CA\u7D2F\u5121\u5792\u64C2\u808B\u7C7B\u6CEA\u68F1\u695E\u51B7\u5398\u68A8\u7281\u9ECE\u7BF1\u72F8\u79BB\u6F13\u7406\u674E\u91CC\u9CA4\u793C\u8389\u8354\u540F\u6817\u4E3D\u5389\u52B1\u783E\u5386\u5229\u5088\u4F8B\u4FD0"], + ["c140", "\u7F56\u7F59\u7F5B\u7F5C\u7F5D\u7F5E\u7F60\u7F63", 4, "\u7F6B\u7F6C\u7F6D\u7F6F\u7F70\u7F73\u7F75\u7F76\u7F77\u7F78\u7F7A\u7F7B\u7F7C\u7F7D\u7F7F\u7F80\u7F82", 7, "\u7F8B\u7F8D\u7F8F", 4, "\u7F95", 4, "\u7F9B\u7F9C\u7FA0\u7FA2\u7FA3\u7FA5\u7FA6\u7FA8", 6, "\u7FB1"], + ["c180", "\u7FB3", 4, "\u7FBA\u7FBB\u7FBE\u7FC0\u7FC2\u7FC3\u7FC4\u7FC6\u7FC7\u7FC8\u7FC9\u7FCB\u7FCD\u7FCF", 4, "\u7FD6\u7FD7\u7FD9", 5, "\u7FE2\u7FE3\u75E2\u7ACB\u7C92\u6CA5\u96B6\u529B\u7483\u54E9\u4FE9\u8054\u83B2\u8FDE\u9570\u5EC9\u601C\u6D9F\u5E18\u655B\u8138\u94FE\u604B\u70BC\u7EC3\u7CAE\u51C9\u6881\u7CB1\u826F\u4E24\u8F86\u91CF\u667E\u4EAE\u8C05\u64A9\u804A\u50DA\u7597\u71CE\u5BE5\u8FBD\u6F66\u4E86\u6482\u9563\u5ED6\u6599\u5217\u88C2\u70C8\u52A3\u730E\u7433\u6797\u78F7\u9716\u4E34\u90BB\u9CDE\u6DCB\u51DB\u8D41\u541D\u62CE\u73B2\u83F1\u96F6\u9F84\u94C3\u4F36\u7F9A\u51CC\u7075\u9675\u5CAD\u9886\u53E6\u4EE4\u6E9C\u7409\u69B4\u786B\u998F\u7559\u5218\u7624\u6D41\u67F3\u516D\u9F99\u804B\u5499\u7B3C\u7ABF"], + ["c240", "\u7FE4\u7FE7\u7FE8\u7FEA\u7FEB\u7FEC\u7FED\u7FEF\u7FF2\u7FF4", 6, "\u7FFD\u7FFE\u7FFF\u8002\u8007\u8008\u8009\u800A\u800E\u800F\u8011\u8013\u801A\u801B\u801D\u801E\u801F\u8021\u8023\u8024\u802B", 5, "\u8032\u8034\u8039\u803A\u803C\u803E\u8040\u8041\u8044\u8045\u8047\u8048\u8049\u804E\u804F\u8050\u8051\u8053\u8055\u8056\u8057"], + ["c280", "\u8059\u805B", 13, "\u806B", 5, "\u8072", 11, "\u9686\u5784\u62E2\u9647\u697C\u5A04\u6402\u7BD3\u6F0F\u964B\u82A6\u5362\u9885\u5E90\u7089\u63B3\u5364\u864F\u9C81\u9E93\u788C\u9732\u8DEF\u8D42\u9E7F\u6F5E\u7984\u5F55\u9646\u622E\u9A74\u5415\u94DD\u4FA3\u65C5\u5C65\u5C61\u7F15\u8651\u6C2F\u5F8B\u7387\u6EE4\u7EFF\u5CE6\u631B\u5B6A\u6EE6\u5375\u4E71\u63A0\u7565\u62A1\u8F6E\u4F26\u4ED1\u6CA6\u7EB6\u8BBA\u841D\u87BA\u7F57\u903B\u9523\u7BA9\u9AA1\u88F8\u843D\u6D1B\u9A86\u7EDC\u5988\u9EBB\u739B\u7801\u8682\u9A6C\u9A82\u561B\u5417\u57CB\u4E70\u9EA6\u5356\u8FC8\u8109\u7792\u9992\u86EE\u6EE1\u8513\u66FC\u6162\u6F2B"], + ["c340", "\u807E\u8081\u8082\u8085\u8088\u808A\u808D", 5, "\u8094\u8095\u8097\u8099\u809E\u80A3\u80A6\u80A7\u80A8\u80AC\u80B0\u80B3\u80B5\u80B6\u80B8\u80B9\u80BB\u80C5\u80C7", 4, "\u80CF", 6, "\u80D8\u80DF\u80E0\u80E2\u80E3\u80E6\u80EE\u80F5\u80F7\u80F9\u80FB\u80FE\u80FF\u8100\u8101\u8103\u8104\u8105\u8107\u8108\u810B"], + ["c380", "\u810C\u8115\u8117\u8119\u811B\u811C\u811D\u811F", 12, "\u812D\u812E\u8130\u8133\u8134\u8135\u8137\u8139", 4, "\u813F\u8C29\u8292\u832B\u76F2\u6C13\u5FD9\u83BD\u732B\u8305\u951A\u6BDB\u77DB\u94C6\u536F\u8302\u5192\u5E3D\u8C8C\u8D38\u4E48\u73AB\u679A\u6885\u9176\u9709\u7164\u6CA1\u7709\u5A92\u9541\u6BCF\u7F8E\u6627\u5BD0\u59B9\u5A9A\u95E8\u95F7\u4EEC\u840C\u8499\u6AAC\u76DF\u9530\u731B\u68A6\u5B5F\u772F\u919A\u9761\u7CDC\u8FF7\u8C1C\u5F25\u7C73\u79D8\u89C5\u6CCC\u871C\u5BC6\u5E42\u68C9\u7720\u7EF5\u5195\u514D\u52C9\u5A29\u7F05\u9762\u82D7\u63CF\u7784\u85D0\u79D2\u6E3A\u5E99\u5999\u8511\u706D\u6C11\u62BF\u76BF\u654F\u60AF\u95FD\u660E\u879F\u9E23\u94ED\u540D\u547D\u8C2C\u6478"], + ["c440", "\u8140", 5, "\u8147\u8149\u814D\u814E\u814F\u8152\u8156\u8157\u8158\u815B", 4, "\u8161\u8162\u8163\u8164\u8166\u8168\u816A\u816B\u816C\u816F\u8172\u8173\u8175\u8176\u8177\u8178\u8181\u8183", 4, "\u8189\u818B\u818C\u818D\u818E\u8190\u8192", 5, "\u8199\u819A\u819E", 4, "\u81A4\u81A5"], + ["c480", "\u81A7\u81A9\u81AB", 7, "\u81B4", 5, "\u81BC\u81BD\u81BE\u81BF\u81C4\u81C5\u81C7\u81C8\u81C9\u81CB\u81CD", 6, "\u6479\u8611\u6A21\u819C\u78E8\u6469\u9B54\u62B9\u672B\u83AB\u58A8\u9ED8\u6CAB\u6F20\u5BDE\u964C\u8C0B\u725F\u67D0\u62C7\u7261\u4EA9\u59C6\u6BCD\u5893\u66AE\u5E55\u52DF\u6155\u6728\u76EE\u7766\u7267\u7A46\u62FF\u54EA\u5450\u94A0\u90A3\u5A1C\u7EB3\u6C16\u4E43\u5976\u8010\u5948\u5357\u7537\u96BE\u56CA\u6320\u8111\u607C\u95F9\u6DD6\u5462\u9981\u5185\u5AE9\u80FD\u59AE\u9713\u502A\u6CE5\u5C3C\u62DF\u4F60\u533F\u817B\u9006\u6EBA\u852B\u62C8\u5E74\u78BE\u64B5\u637B\u5FF5\u5A18\u917F\u9E1F\u5C3F\u634F\u8042\u5B7D\u556E\u954A\u954D\u6D85\u60A8\u67E0\u72DE\u51DD\u5B81"], + ["c540", "\u81D4", 14, "\u81E4\u81E5\u81E6\u81E8\u81E9\u81EB\u81EE", 4, "\u81F5", 5, "\u81FD\u81FF\u8203\u8207", 4, "\u820E\u820F\u8211\u8213\u8215", 5, "\u821D\u8220\u8224\u8225\u8226\u8227\u8229\u822E\u8232\u823A\u823C\u823D\u823F"], + ["c580", "\u8240\u8241\u8242\u8243\u8245\u8246\u8248\u824A\u824C\u824D\u824E\u8250", 7, "\u8259\u825B\u825C\u825D\u825E\u8260", 7, "\u8269\u62E7\u6CDE\u725B\u626D\u94AE\u7EBD\u8113\u6D53\u519C\u5F04\u5974\u52AA\u6012\u5973\u6696\u8650\u759F\u632A\u61E6\u7CEF\u8BFA\u54E6\u6B27\u9E25\u6BB4\u85D5\u5455\u5076\u6CA4\u556A\u8DB4\u722C\u5E15\u6015\u7436\u62CD\u6392\u724C\u5F98\u6E43\u6D3E\u6500\u6F58\u76D8\u78D0\u76FC\u7554\u5224\u53DB\u4E53\u5E9E\u65C1\u802A\u80D6\u629B\u5486\u5228\u70AE\u888D\u8DD1\u6CE1\u5478\u80DA\u57F9\u88F4\u8D54\u966A\u914D\u4F69\u6C9B\u55B7\u76C6\u7830\u62A8\u70F9\u6F8E\u5F6D\u84EC\u68DA\u787C\u7BF7\u81A8\u670B\u9E4F\u6367\u78B0\u576F\u7812\u9739\u6279\u62AB\u5288\u7435\u6BD7"], + ["c640", "\u826A\u826B\u826C\u826D\u8271\u8275\u8276\u8277\u8278\u827B\u827C\u8280\u8281\u8283\u8285\u8286\u8287\u8289\u828C\u8290\u8293\u8294\u8295\u8296\u829A\u829B\u829E\u82A0\u82A2\u82A3\u82A7\u82B2\u82B5\u82B6\u82BA\u82BB\u82BC\u82BF\u82C0\u82C2\u82C3\u82C5\u82C6\u82C9\u82D0\u82D6\u82D9\u82DA\u82DD\u82E2\u82E7\u82E8\u82E9\u82EA\u82EC\u82ED\u82EE\u82F0\u82F2\u82F3\u82F5\u82F6\u82F8"], + ["c680", "\u82FA\u82FC", 4, "\u830A\u830B\u830D\u8310\u8312\u8313\u8316\u8318\u8319\u831D", 9, "\u8329\u832A\u832E\u8330\u8332\u8337\u833B\u833D\u5564\u813E\u75B2\u76AE\u5339\u75DE\u50FB\u5C41\u8B6C\u7BC7\u504F\u7247\u9A97\u98D8\u6F02\u74E2\u7968\u6487\u77A5\u62FC\u9891\u8D2B\u54C1\u8058\u4E52\u576A\u82F9\u840D\u5E73\u51ED\u74F6\u8BC4\u5C4F\u5761\u6CFC\u9887\u5A46\u7834\u9B44\u8FEB\u7C95\u5256\u6251\u94FA\u4EC6\u8386\u8461\u83E9\u84B2\u57D4\u6734\u5703\u666E\u6D66\u8C31\u66DD\u7011\u671F\u6B3A\u6816\u621A\u59BB\u4E03\u51C4\u6F06\u67D2\u6C8F\u5176\u68CB\u5947\u6B67\u7566\u5D0E\u8110\u9F50\u65D7\u7948\u7941\u9A91\u8D77\u5C82\u4E5E\u4F01\u542F\u5951\u780C\u5668\u6C14\u8FC4\u5F03\u6C7D\u6CE3\u8BAB\u6390"], + ["c740", "\u833E\u833F\u8341\u8342\u8344\u8345\u8348\u834A", 4, "\u8353\u8355", 4, "\u835D\u8362\u8370", 6, "\u8379\u837A\u837E", 6, "\u8387\u8388\u838A\u838B\u838C\u838D\u838F\u8390\u8391\u8394\u8395\u8396\u8397\u8399\u839A\u839D\u839F\u83A1", 6, "\u83AC\u83AD\u83AE"], + ["c780", "\u83AF\u83B5\u83BB\u83BE\u83BF\u83C2\u83C3\u83C4\u83C6\u83C8\u83C9\u83CB\u83CD\u83CE\u83D0\u83D1\u83D2\u83D3\u83D5\u83D7\u83D9\u83DA\u83DB\u83DE\u83E2\u83E3\u83E4\u83E6\u83E7\u83E8\u83EB\u83EC\u83ED\u6070\u6D3D\u7275\u6266\u948E\u94C5\u5343\u8FC1\u7B7E\u4EDF\u8C26\u4E7E\u9ED4\u94B1\u94B3\u524D\u6F5C\u9063\u6D45\u8C34\u5811\u5D4C\u6B20\u6B49\u67AA\u545B\u8154\u7F8C\u5899\u8537\u5F3A\u62A2\u6A47\u9539\u6572\u6084\u6865\u77A7\u4E54\u4FA8\u5DE7\u9798\u64AC\u7FD8\u5CED\u4FCF\u7A8D\u5207\u8304\u4E14\u602F\u7A83\u94A6\u4FB5\u4EB2\u79E6\u7434\u52E4\u82B9\u64D2\u79BD\u5BDD\u6C81\u9752\u8F7B\u6C22\u503E\u537F\u6E05\u64CE\u6674\u6C30\u60C5\u9877\u8BF7\u5E86\u743C\u7A77\u79CB\u4E18\u90B1\u7403\u6C42\u56DA\u914B\u6CC5\u8D8B\u533A\u86C6\u66F2\u8EAF\u5C48\u9A71\u6E20"], + ["c840", "\u83EE\u83EF\u83F3", 4, "\u83FA\u83FB\u83FC\u83FE\u83FF\u8400\u8402\u8405\u8407\u8408\u8409\u840A\u8410\u8412", 5, "\u8419\u841A\u841B\u841E", 5, "\u8429", 7, "\u8432", 5, "\u8439\u843A\u843B\u843E", 7, "\u8447\u8448\u8449"], + ["c880", "\u844A", 6, "\u8452", 4, "\u8458\u845D\u845E\u845F\u8460\u8462\u8464", 4, "\u846A\u846E\u846F\u8470\u8472\u8474\u8477\u8479\u847B\u847C\u53D6\u5A36\u9F8B\u8DA3\u53BB\u5708\u98A7\u6743\u919B\u6CC9\u5168\u75CA\u62F3\u72AC\u5238\u529D\u7F3A\u7094\u7638\u5374\u9E4A\u69B7\u786E\u96C0\u88D9\u7FA4\u7136\u71C3\u5189\u67D3\u74E4\u58E4\u6518\u56B7\u8BA9\u9976\u6270\u7ED5\u60F9\u70ED\u58EC\u4EC1\u4EBA\u5FCD\u97E7\u4EFB\u8BA4\u5203\u598A\u7EAB\u6254\u4ECD\u65E5\u620E\u8338\u84C9\u8363\u878D\u7194\u6EB6\u5BB9\u7ED2\u5197\u63C9\u67D4\u8089\u8339\u8815\u5112\u5B7A\u5982\u8FB1\u4E73\u6C5D\u5165\u8925\u8F6F\u962E\u854A\u745E\u9510\u95F0\u6DA6\u82E5\u5F31\u6492\u6D12\u8428\u816E\u9CC3\u585E\u8D5B\u4E09\u53C1"], + ["c940", "\u847D", 4, "\u8483\u8484\u8485\u8486\u848A\u848D\u848F", 7, "\u8498\u849A\u849B\u849D\u849E\u849F\u84A0\u84A2", 12, "\u84B0\u84B1\u84B3\u84B5\u84B6\u84B7\u84BB\u84BC\u84BE\u84C0\u84C2\u84C3\u84C5\u84C6\u84C7\u84C8\u84CB\u84CC\u84CE\u84CF\u84D2\u84D4\u84D5\u84D7"], + ["c980", "\u84D8", 4, "\u84DE\u84E1\u84E2\u84E4\u84E7", 4, "\u84ED\u84EE\u84EF\u84F1", 10, "\u84FD\u84FE\u8500\u8501\u8502\u4F1E\u6563\u6851\u55D3\u4E27\u6414\u9A9A\u626B\u5AC2\u745F\u8272\u6DA9\u68EE\u50E7\u838E\u7802\u6740\u5239\u6C99\u7EB1\u50BB\u5565\u715E\u7B5B\u6652\u73CA\u82EB\u6749\u5C71\u5220\u717D\u886B\u95EA\u9655\u64C5\u8D61\u81B3\u5584\u6C55\u6247\u7F2E\u5892\u4F24\u5546\u8D4F\u664C\u4E0A\u5C1A\u88F3\u68A2\u634E\u7A0D\u70E7\u828D\u52FA\u97F6\u5C11\u54E8\u90B5\u7ECD\u5962\u8D4A\u86C7\u820C\u820D\u8D66\u6444\u5C04\u6151\u6D89\u793E\u8BBE\u7837\u7533\u547B\u4F38\u8EAB\u6DF1\u5A20\u7EC5\u795E\u6C88\u5BA1\u5A76\u751A\u80BE\u614E\u6E17\u58F0\u751F\u7525\u7272\u5347\u7EF3"], + ["ca40", "\u8503", 8, "\u850D\u850E\u850F\u8510\u8512\u8514\u8515\u8516\u8518\u8519\u851B\u851C\u851D\u851E\u8520\u8522", 8, "\u852D", 9, "\u853E", 4, "\u8544\u8545\u8546\u8547\u854B", 10], + ["ca80", "\u8557\u8558\u855A\u855B\u855C\u855D\u855F", 4, "\u8565\u8566\u8567\u8569", 8, "\u8573\u8575\u8576\u8577\u8578\u857C\u857D\u857F\u8580\u8581\u7701\u76DB\u5269\u80DC\u5723\u5E08\u5931\u72EE\u65BD\u6E7F\u8BD7\u5C38\u8671\u5341\u77F3\u62FE\u65F6\u4EC0\u98DF\u8680\u5B9E\u8BC6\u53F2\u77E2\u4F7F\u5C4E\u9A76\u59CB\u5F0F\u793A\u58EB\u4E16\u67FF\u4E8B\u62ED\u8A93\u901D\u52BF\u662F\u55DC\u566C\u9002\u4ED5\u4F8D\u91CA\u9970\u6C0F\u5E02\u6043\u5BA4\u89C6\u8BD5\u6536\u624B\u9996\u5B88\u5BFF\u6388\u552E\u53D7\u7626\u517D\u852C\u67A2\u68B3\u6B8A\u6292\u8F93\u53D4\u8212\u6DD1\u758F\u4E66\u8D4E\u5B70\u719F\u85AF\u6691\u66D9\u7F72\u8700\u9ECD\u9F20\u5C5E\u672F\u8FF0\u6811\u675F\u620D\u7AD6\u5885\u5EB6\u6570\u6F31"], + ["cb40", "\u8582\u8583\u8586\u8588", 6, "\u8590", 10, "\u859D", 6, "\u85A5\u85A6\u85A7\u85A9\u85AB\u85AC\u85AD\u85B1", 5, "\u85B8\u85BA", 6, "\u85C2", 6, "\u85CA", 4, "\u85D1\u85D2"], + ["cb80", "\u85D4\u85D6", 5, "\u85DD", 6, "\u85E5\u85E6\u85E7\u85E8\u85EA", 14, "\u6055\u5237\u800D\u6454\u8870\u7529\u5E05\u6813\u62F4\u971C\u53CC\u723D\u8C01\u6C34\u7761\u7A0E\u542E\u77AC\u987A\u821C\u8BF4\u7855\u6714\u70C1\u65AF\u6495\u5636\u601D\u79C1\u53F8\u4E1D\u6B7B\u8086\u5BFA\u55E3\u56DB\u4F3A\u4F3C\u9972\u5DF3\u677E\u8038\u6002\u9882\u9001\u5B8B\u8BBC\u8BF5\u641C\u8258\u64DE\u55FD\u82CF\u9165\u4FD7\u7D20\u901F\u7C9F\u50F3\u5851\u6EAF\u5BBF\u8BC9\u8083\u9178\u849C\u7B97\u867D\u968B\u968F\u7EE5\u9AD3\u788E\u5C81\u7A57\u9042\u96A7\u795F\u5B59\u635F\u7B0B\u84D1\u68AD\u5506\u7F29\u7410\u7D22\u9501\u6240\u584C\u4ED6\u5B83\u5979\u5854"], + ["cc40", "\u85F9\u85FA\u85FC\u85FD\u85FE\u8600", 4, "\u8606", 10, "\u8612\u8613\u8614\u8615\u8617", 15, "\u8628\u862A", 13, "\u8639\u863A\u863B\u863D\u863E\u863F\u8640"], + ["cc80", "\u8641", 11, "\u8652\u8653\u8655", 4, "\u865B\u865C\u865D\u865F\u8660\u8661\u8663", 7, "\u736D\u631E\u8E4B\u8E0F\u80CE\u82D4\u62AC\u53F0\u6CF0\u915E\u592A\u6001\u6C70\u574D\u644A\u8D2A\u762B\u6EE9\u575B\u6A80\u75F0\u6F6D\u8C2D\u8C08\u5766\u6BEF\u8892\u78B3\u63A2\u53F9\u70AD\u6C64\u5858\u642A\u5802\u68E0\u819B\u5510\u7CD6\u5018\u8EBA\u6DCC\u8D9F\u70EB\u638F\u6D9B\u6ED4\u7EE6\u8404\u6843\u9003\u6DD8\u9676\u8BA8\u5957\u7279\u85E4\u817E\u75BC\u8A8A\u68AF\u5254\u8E22\u9511\u63D0\u9898\u8E44\u557C\u4F53\u66FF\u568F\u60D5\u6D95\u5243\u5C49\u5929\u6DFB\u586B\u7530\u751C\u606C\u8214\u8146\u6311\u6761\u8FE2\u773A\u8DF3\u8D34\u94C1\u5E16\u5385\u542C\u70C3"], + ["cd40", "\u866D\u866F\u8670\u8672", 6, "\u8683", 6, "\u868E", 4, "\u8694\u8696", 5, "\u869E", 4, "\u86A5\u86A6\u86AB\u86AD\u86AE\u86B2\u86B3\u86B7\u86B8\u86B9\u86BB", 4, "\u86C1\u86C2\u86C3\u86C5\u86C8\u86CC\u86CD\u86D2\u86D3\u86D5\u86D6\u86D7\u86DA\u86DC"], + ["cd80", "\u86DD\u86E0\u86E1\u86E2\u86E3\u86E5\u86E6\u86E7\u86E8\u86EA\u86EB\u86EC\u86EF\u86F5\u86F6\u86F7\u86FA\u86FB\u86FC\u86FD\u86FF\u8701\u8704\u8705\u8706\u870B\u870C\u870E\u870F\u8710\u8711\u8714\u8716\u6C40\u5EF7\u505C\u4EAD\u5EAD\u633A\u8247\u901A\u6850\u916E\u77B3\u540C\u94DC\u5F64\u7AE5\u6876\u6345\u7B52\u7EDF\u75DB\u5077\u6295\u5934\u900F\u51F8\u79C3\u7A81\u56FE\u5F92\u9014\u6D82\u5C60\u571F\u5410\u5154\u6E4D\u56E2\u63A8\u9893\u817F\u8715\u892A\u9000\u541E\u5C6F\u81C0\u62D6\u6258\u8131\u9E35\u9640\u9A6E\u9A7C\u692D\u59A5\u62D3\u553E\u6316\u54C7\u86D9\u6D3C\u5A03\u74E6\u889C\u6B6A\u5916\u8C4C\u5F2F\u6E7E\u73A9\u987D\u4E38\u70F7\u5B8C\u7897\u633D\u665A\u7696\u60CB\u5B9B\u5A49\u4E07\u8155\u6C6A\u738B\u4EA1\u6789\u7F51\u5F80\u65FA\u671B\u5FD8\u5984\u5A01"], + ["ce40", "\u8719\u871B\u871D\u871F\u8720\u8724\u8726\u8727\u8728\u872A\u872B\u872C\u872D\u872F\u8730\u8732\u8733\u8735\u8736\u8738\u8739\u873A\u873C\u873D\u8740", 6, "\u874A\u874B\u874D\u874F\u8750\u8751\u8752\u8754\u8755\u8756\u8758\u875A", 5, "\u8761\u8762\u8766", 7, "\u876F\u8771\u8772\u8773\u8775"], + ["ce80", "\u8777\u8778\u8779\u877A\u877F\u8780\u8781\u8784\u8786\u8787\u8789\u878A\u878C\u878E", 4, "\u8794\u8795\u8796\u8798", 6, "\u87A0", 4, "\u5DCD\u5FAE\u5371\u97E6\u8FDD\u6845\u56F4\u552F\u60DF\u4E3A\u6F4D\u7EF4\u82C7\u840E\u59D4\u4F1F\u4F2A\u5C3E\u7EAC\u672A\u851A\u5473\u754F\u80C3\u5582\u9B4F\u4F4D\u6E2D\u8C13\u5C09\u6170\u536B\u761F\u6E29\u868A\u6587\u95FB\u7EB9\u543B\u7A33\u7D0A\u95EE\u55E1\u7FC1\u74EE\u631D\u8717\u6DA1\u7A9D\u6211\u65A1\u5367\u63E1\u6C83\u5DEB\u545C\u94A8\u4E4C\u6C61\u8BEC\u5C4B\u65E0\u829C\u68A7\u543E\u5434\u6BCB\u6B66\u4E94\u6342\u5348\u821E\u4F0D\u4FAE\u575E\u620A\u96FE\u6664\u7269\u52FF\u52A1\u609F\u8BEF\u6614\u7199\u6790\u897F\u7852\u77FD\u6670\u563B\u5438\u9521\u727A"], + ["cf40", "\u87A5\u87A6\u87A7\u87A9\u87AA\u87AE\u87B0\u87B1\u87B2\u87B4\u87B6\u87B7\u87B8\u87B9\u87BB\u87BC\u87BE\u87BF\u87C1", 4, "\u87C7\u87C8\u87C9\u87CC", 4, "\u87D4", 6, "\u87DC\u87DD\u87DE\u87DF\u87E1\u87E2\u87E3\u87E4\u87E6\u87E7\u87E8\u87E9\u87EB\u87EC\u87ED\u87EF", 9], + ["cf80", "\u87FA\u87FB\u87FC\u87FD\u87FF\u8800\u8801\u8802\u8804", 5, "\u880B", 7, "\u8814\u8817\u8818\u8819\u881A\u881C", 4, "\u8823\u7A00\u606F\u5E0C\u6089\u819D\u5915\u60DC\u7184\u70EF\u6EAA\u6C50\u7280\u6A84\u88AD\u5E2D\u4E60\u5AB3\u559C\u94E3\u6D17\u7CFB\u9699\u620F\u7EC6\u778E\u867E\u5323\u971E\u8F96\u6687\u5CE1\u4FA0\u72ED\u4E0B\u53A6\u590F\u5413\u6380\u9528\u5148\u4ED9\u9C9C\u7EA4\u54B8\u8D24\u8854\u8237\u95F2\u6D8E\u5F26\u5ACC\u663E\u9669\u73B0\u732E\u53BF\u817A\u9985\u7FA1\u5BAA\u9677\u9650\u7EBF\u76F8\u53A2\u9576\u9999\u7BB1\u8944\u6E58\u4E61\u7FD4\u7965\u8BE6\u60F3\u54CD\u4EAB\u9879\u5DF7\u6A61\u50CF\u5411\u8C61\u8427\u785D\u9704\u524A\u54EE\u56A3\u9500\u6D88\u5BB5\u6DC6\u6653"], + ["d040", "\u8824", 13, "\u8833", 5, "\u883A\u883B\u883D\u883E\u883F\u8841\u8842\u8843\u8846", 5, "\u884E", 5, "\u8855\u8856\u8858\u885A", 6, "\u8866\u8867\u886A\u886D\u886F\u8871\u8873\u8874\u8875\u8876\u8878\u8879\u887A"], + ["d080", "\u887B\u887C\u8880\u8883\u8886\u8887\u8889\u888A\u888C\u888E\u888F\u8890\u8891\u8893\u8894\u8895\u8897", 4, "\u889D", 4, "\u88A3\u88A5", 5, "\u5C0F\u5B5D\u6821\u8096\u5578\u7B11\u6548\u6954\u4E9B\u6B47\u874E\u978B\u534F\u631F\u643A\u90AA\u659C\u80C1\u8C10\u5199\u68B0\u5378\u87F9\u61C8\u6CC4\u6CFB\u8C22\u5C51\u85AA\u82AF\u950C\u6B23\u8F9B\u65B0\u5FFB\u5FC3\u4FE1\u8845\u661F\u8165\u7329\u60FA\u5174\u5211\u578B\u5F62\u90A2\u884C\u9192\u5E78\u674F\u6027\u59D3\u5144\u51F6\u80F8\u5308\u6C79\u96C4\u718A\u4F11\u4FEE\u7F9E\u673D\u55C5\u9508\u79C0\u8896\u7EE3\u589F\u620C\u9700\u865A\u5618\u987B\u5F90\u8BB8\u84C4\u9157\u53D9\u65ED\u5E8F\u755C\u6064\u7D6E\u5A7F\u7EEA\u7EED\u8F69\u55A7\u5BA3\u60AC\u65CB\u7384"], + ["d140", "\u88AC\u88AE\u88AF\u88B0\u88B2", 4, "\u88B8\u88B9\u88BA\u88BB\u88BD\u88BE\u88BF\u88C0\u88C3\u88C4\u88C7\u88C8\u88CA\u88CB\u88CC\u88CD\u88CF\u88D0\u88D1\u88D3\u88D6\u88D7\u88DA", 4, "\u88E0\u88E1\u88E6\u88E7\u88E9", 6, "\u88F2\u88F5\u88F6\u88F7\u88FA\u88FB\u88FD\u88FF\u8900\u8901\u8903", 5], + ["d180", "\u8909\u890B", 4, "\u8911\u8914", 4, "\u891C", 4, "\u8922\u8923\u8924\u8926\u8927\u8928\u8929\u892C\u892D\u892E\u892F\u8931\u8932\u8933\u8935\u8937\u9009\u7663\u7729\u7EDA\u9774\u859B\u5B66\u7A74\u96EA\u8840\u52CB\u718F\u5FAA\u65EC\u8BE2\u5BFB\u9A6F\u5DE1\u6B89\u6C5B\u8BAD\u8BAF\u900A\u8FC5\u538B\u62BC\u9E26\u9E2D\u5440\u4E2B\u82BD\u7259\u869C\u5D16\u8859\u6DAF\u96C5\u54D1\u4E9A\u8BB6\u7109\u54BD\u9609\u70DF\u6DF9\u76D0\u4E25\u7814\u8712\u5CA9\u5EF6\u8A00\u989C\u960E\u708E\u6CBF\u5944\u63A9\u773C\u884D\u6F14\u8273\u5830\u71D5\u538C\u781A\u96C1\u5501\u5F66\u7130\u5BB4\u8C1A\u9A8C\u6B83\u592E\u9E2F\u79E7\u6768\u626C\u4F6F\u75A1\u7F8A\u6D0B\u9633\u6C27\u4EF0\u75D2\u517B\u6837\u6F3E\u9080\u8170\u5996\u7476"], + ["d240", "\u8938", 8, "\u8942\u8943\u8945", 24, "\u8960", 5, "\u8967", 19, "\u897C"], + ["d280", "\u897D\u897E\u8980\u8982\u8984\u8985\u8987", 26, "\u6447\u5C27\u9065\u7A91\u8C23\u59DA\u54AC\u8200\u836F\u8981\u8000\u6930\u564E\u8036\u7237\u91CE\u51B6\u4E5F\u9875\u6396\u4E1A\u53F6\u66F3\u814B\u591C\u6DB2\u4E00\u58F9\u533B\u63D6\u94F1\u4F9D\u4F0A\u8863\u9890\u5937\u9057\u79FB\u4EEA\u80F0\u7591\u6C82\u5B9C\u59E8\u5F5D\u6905\u8681\u501A\u5DF2\u4E59\u77E3\u4EE5\u827A\u6291\u6613\u9091\u5C79\u4EBF\u5F79\u81C6\u9038\u8084\u75AB\u4EA6\u88D4\u610F\u6BC5\u5FC6\u4E49\u76CA\u6EA2\u8BE3\u8BAE\u8C0A\u8BD1\u5F02\u7FFC\u7FCC\u7ECE\u8335\u836B\u56E0\u6BB7\u97F3\u9634\u59FB\u541F\u94F6\u6DEB\u5BC5\u996E\u5C39\u5F15\u9690"], + ["d340", "\u89A2", 30, "\u89C3\u89CD\u89D3\u89D4\u89D5\u89D7\u89D8\u89D9\u89DB\u89DD\u89DF\u89E0\u89E1\u89E2\u89E4\u89E7\u89E8\u89E9\u89EA\u89EC\u89ED\u89EE\u89F0\u89F1\u89F2\u89F4", 6], + ["d380", "\u89FB", 4, "\u8A01", 5, "\u8A08", 21, "\u5370\u82F1\u6A31\u5A74\u9E70\u5E94\u7F28\u83B9\u8424\u8425\u8367\u8747\u8FCE\u8D62\u76C8\u5F71\u9896\u786C\u6620\u54DF\u62E5\u4F63\u81C3\u75C8\u5EB8\u96CD\u8E0A\u86F9\u548F\u6CF3\u6D8C\u6C38\u607F\u52C7\u7528\u5E7D\u4F18\u60A0\u5FE7\u5C24\u7531\u90AE\u94C0\u72B9\u6CB9\u6E38\u9149\u6709\u53CB\u53F3\u4F51\u91C9\u8BF1\u53C8\u5E7C\u8FC2\u6DE4\u4E8E\u76C2\u6986\u865E\u611A\u8206\u4F59\u4FDE\u903E\u9C7C\u6109\u6E1D\u6E14\u9685\u4E88\u5A31\u96E8\u4E0E\u5C7F\u79B9\u5B87\u8BED\u7FBD\u7389\u57DF\u828B\u90C1\u5401\u9047\u55BB\u5CEA\u5FA1\u6108\u6B32\u72F1\u80B2\u8A89"], + ["d440", "\u8A1E", 31, "\u8A3F", 8, "\u8A49", 21], + ["d480", "\u8A5F", 25, "\u8A7A", 6, "\u6D74\u5BD3\u88D5\u9884\u8C6B\u9A6D\u9E33\u6E0A\u51A4\u5143\u57A3\u8881\u539F\u63F4\u8F95\u56ED\u5458\u5706\u733F\u6E90\u7F18\u8FDC\u82D1\u613F\u6028\u9662\u66F0\u7EA6\u8D8A\u8DC3\u94A5\u5CB3\u7CA4\u6708\u60A6\u9605\u8018\u4E91\u90E7\u5300\u9668\u5141\u8FD0\u8574\u915D\u6655\u97F5\u5B55\u531D\u7838\u6742\u683D\u54C9\u707E\u5BB0\u8F7D\u518D\u5728\u54B1\u6512\u6682\u8D5E\u8D43\u810F\u846C\u906D\u7CDF\u51FF\u85FB\u67A3\u65E9\u6FA1\u86A4\u8E81\u566A\u9020\u7682\u7076\u71E5\u8D23\u62E9\u5219\u6CFD\u8D3C\u600E\u589E\u618E\u66FE\u8D60\u624E\u55B3\u6E23\u672D\u8F67"], + ["d540", "\u8A81", 7, "\u8A8B", 7, "\u8A94", 46], + ["d580", "\u8AC3", 32, "\u94E1\u95F8\u7728\u6805\u69A8\u548B\u4E4D\u70B8\u8BC8\u6458\u658B\u5B85\u7A84\u503A\u5BE8\u77BB\u6BE1\u8A79\u7C98\u6CBE\u76CF\u65A9\u8F97\u5D2D\u5C55\u8638\u6808\u5360\u6218\u7AD9\u6E5B\u7EFD\u6A1F\u7AE0\u5F70\u6F33\u5F20\u638C\u6DA8\u6756\u4E08\u5E10\u8D26\u4ED7\u80C0\u7634\u969C\u62DB\u662D\u627E\u6CBC\u8D75\u7167\u7F69\u5146\u8087\u53EC\u906E\u6298\u54F2\u86F0\u8F99\u8005\u9517\u8517\u8FD9\u6D59\u73CD\u659F\u771F\u7504\u7827\u81FB\u8D1E\u9488\u4FA6\u6795\u75B9\u8BCA\u9707\u632F\u9547\u9635\u84B8\u6323\u7741\u5F81\u72F0\u4E89\u6014\u6574\u62EF\u6B63\u653F"], + ["d640", "\u8AE4", 34, "\u8B08", 27], + ["d680", "\u8B24\u8B25\u8B27", 30, "\u5E27\u75C7\u90D1\u8BC1\u829D\u679D\u652F\u5431\u8718\u77E5\u80A2\u8102\u6C41\u4E4B\u7EC7\u804C\u76F4\u690D\u6B96\u6267\u503C\u4F84\u5740\u6307\u6B62\u8DBE\u53EA\u65E8\u7EB8\u5FD7\u631A\u63B7\u81F3\u81F4\u7F6E\u5E1C\u5CD9\u5236\u667A\u79E9\u7A1A\u8D28\u7099\u75D4\u6EDE\u6CBB\u7A92\u4E2D\u76C5\u5FE0\u949F\u8877\u7EC8\u79CD\u80BF\u91CD\u4EF2\u4F17\u821F\u5468\u5DDE\u6D32\u8BCC\u7CA5\u8F74\u8098\u5E1A\u5492\u76B1\u5B99\u663C\u9AA4\u73E0\u682A\u86DB\u6731\u732A\u8BF8\u8BDB\u9010\u7AF9\u70DB\u716E\u62C4\u77A9\u5631\u4E3B\u8457\u67F1\u52A9\u86C0\u8D2E\u94F8\u7B51"], + ["d740", "\u8B46", 31, "\u8B67", 4, "\u8B6D", 25], + ["d780", "\u8B87", 24, "\u8BAC\u8BB1\u8BBB\u8BC7\u8BD0\u8BEA\u8C09\u8C1E\u4F4F\u6CE8\u795D\u9A7B\u6293\u722A\u62FD\u4E13\u7816\u8F6C\u64B0\u8D5A\u7BC6\u6869\u5E84\u88C5\u5986\u649E\u58EE\u72B6\u690E\u9525\u8FFD\u8D58\u5760\u7F00\u8C06\u51C6\u6349\u62D9\u5353\u684C\u7422\u8301\u914C\u5544\u7740\u707C\u6D4A\u5179\u54A8\u8D44\u59FF\u6ECB\u6DC4\u5B5C\u7D2B\u4ED4\u7C7D\u6ED3\u5B50\u81EA\u6E0D\u5B57\u9B03\u68D5\u8E2A\u5B97\u7EFC\u603B\u7EB5\u90B9\u8D70\u594F\u63CD\u79DF\u8DB3\u5352\u65CF\u7956\u8BC5\u963B\u7EC4\u94BB\u7E82\u5634\u9189\u6700\u7F6A\u5C0A\u9075\u6628\u5DE6\u4F50\u67DE\u505A\u4F5C\u5750\u5EA7"], + ["d840", "\u8C38", 8, "\u8C42\u8C43\u8C44\u8C45\u8C48\u8C4A\u8C4B\u8C4D", 7, "\u8C56\u8C57\u8C58\u8C59\u8C5B", 5, "\u8C63", 6, "\u8C6C", 6, "\u8C74\u8C75\u8C76\u8C77\u8C7B", 6, "\u8C83\u8C84\u8C86\u8C87"], + ["d880", "\u8C88\u8C8B\u8C8D", 6, "\u8C95\u8C96\u8C97\u8C99", 20, "\u4E8D\u4E0C\u5140\u4E10\u5EFF\u5345\u4E15\u4E98\u4E1E\u9B32\u5B6C\u5669\u4E28\u79BA\u4E3F\u5315\u4E47\u592D\u723B\u536E\u6C10\u56DF\u80E4\u9997\u6BD3\u777E\u9F17\u4E36\u4E9F\u9F10\u4E5C\u4E69\u4E93\u8288\u5B5B\u556C\u560F\u4EC4\u538D\u539D\u53A3\u53A5\u53AE\u9765\u8D5D\u531A\u53F5\u5326\u532E\u533E\u8D5C\u5366\u5363\u5202\u5208\u520E\u522D\u5233\u523F\u5240\u524C\u525E\u5261\u525C\u84AF\u527D\u5282\u5281\u5290\u5293\u5182\u7F54\u4EBB\u4EC3\u4EC9\u4EC2\u4EE8\u4EE1\u4EEB\u4EDE\u4F1B\u4EF3\u4F22\u4F64\u4EF5\u4F25\u4F27\u4F09\u4F2B\u4F5E\u4F67\u6538\u4F5A\u4F5D"], + ["d940", "\u8CAE", 62], + ["d980", "\u8CED", 32, "\u4F5F\u4F57\u4F32\u4F3D\u4F76\u4F74\u4F91\u4F89\u4F83\u4F8F\u4F7E\u4F7B\u4FAA\u4F7C\u4FAC\u4F94\u4FE6\u4FE8\u4FEA\u4FC5\u4FDA\u4FE3\u4FDC\u4FD1\u4FDF\u4FF8\u5029\u504C\u4FF3\u502C\u500F\u502E\u502D\u4FFE\u501C\u500C\u5025\u5028\u507E\u5043\u5055\u5048\u504E\u506C\u507B\u50A5\u50A7\u50A9\u50BA\u50D6\u5106\u50ED\u50EC\u50E6\u50EE\u5107\u510B\u4EDD\u6C3D\u4F58\u4F65\u4FCE\u9FA0\u6C46\u7C74\u516E\u5DFD\u9EC9\u9998\u5181\u5914\u52F9\u530D\u8A07\u5310\u51EB\u5919\u5155\u4EA0\u5156\u4EB3\u886E\u88A4\u4EB5\u8114\u88D2\u7980\u5B34\u8803\u7FB8\u51AB\u51B1\u51BD\u51BC"], + ["da40", "\u8D0E", 14, "\u8D20\u8D51\u8D52\u8D57\u8D5F\u8D65\u8D68\u8D69\u8D6A\u8D6C\u8D6E\u8D6F\u8D71\u8D72\u8D78", 8, "\u8D82\u8D83\u8D86\u8D87\u8D88\u8D89\u8D8C", 4, "\u8D92\u8D93\u8D95", 9, "\u8DA0\u8DA1"], + ["da80", "\u8DA2\u8DA4", 12, "\u8DB2\u8DB6\u8DB7\u8DB9\u8DBB\u8DBD\u8DC0\u8DC1\u8DC2\u8DC5\u8DC7\u8DC8\u8DC9\u8DCA\u8DCD\u8DD0\u8DD2\u8DD3\u8DD4\u51C7\u5196\u51A2\u51A5\u8BA0\u8BA6\u8BA7\u8BAA\u8BB4\u8BB5\u8BB7\u8BC2\u8BC3\u8BCB\u8BCF\u8BCE\u8BD2\u8BD3\u8BD4\u8BD6\u8BD8\u8BD9\u8BDC\u8BDF\u8BE0\u8BE4\u8BE8\u8BE9\u8BEE\u8BF0\u8BF3\u8BF6\u8BF9\u8BFC\u8BFF\u8C00\u8C02\u8C04\u8C07\u8C0C\u8C0F\u8C11\u8C12\u8C14\u8C15\u8C16\u8C19\u8C1B\u8C18\u8C1D\u8C1F\u8C20\u8C21\u8C25\u8C27\u8C2A\u8C2B\u8C2E\u8C2F\u8C32\u8C33\u8C35\u8C36\u5369\u537A\u961D\u9622\u9621\u9631\u962A\u963D\u963C\u9642\u9649\u9654\u965F\u9667\u966C\u9672\u9674\u9688\u968D\u9697\u96B0\u9097\u909B\u909D\u9099\u90AC\u90A1\u90B4\u90B3\u90B6\u90BA"], + ["db40", "\u8DD5\u8DD8\u8DD9\u8DDC\u8DE0\u8DE1\u8DE2\u8DE5\u8DE6\u8DE7\u8DE9\u8DED\u8DEE\u8DF0\u8DF1\u8DF2\u8DF4\u8DF6\u8DFC\u8DFE", 6, "\u8E06\u8E07\u8E08\u8E0B\u8E0D\u8E0E\u8E10\u8E11\u8E12\u8E13\u8E15", 7, "\u8E20\u8E21\u8E24", 4, "\u8E2B\u8E2D\u8E30\u8E32\u8E33\u8E34\u8E36\u8E37\u8E38\u8E3B\u8E3C\u8E3E"], + ["db80", "\u8E3F\u8E43\u8E45\u8E46\u8E4C", 4, "\u8E53", 5, "\u8E5A", 11, "\u8E67\u8E68\u8E6A\u8E6B\u8E6E\u8E71\u90B8\u90B0\u90CF\u90C5\u90BE\u90D0\u90C4\u90C7\u90D3\u90E6\u90E2\u90DC\u90D7\u90DB\u90EB\u90EF\u90FE\u9104\u9122\u911E\u9123\u9131\u912F\u9139\u9143\u9146\u520D\u5942\u52A2\u52AC\u52AD\u52BE\u54FF\u52D0\u52D6\u52F0\u53DF\u71EE\u77CD\u5EF4\u51F5\u51FC\u9B2F\u53B6\u5F01\u755A\u5DEF\u574C\u57A9\u57A1\u587E\u58BC\u58C5\u58D1\u5729\u572C\u572A\u5733\u5739\u572E\u572F\u575C\u573B\u5742\u5769\u5785\u576B\u5786\u577C\u577B\u5768\u576D\u5776\u5773\u57AD\u57A4\u578C\u57B2\u57CF\u57A7\u57B4\u5793\u57A0\u57D5\u57D8\u57DA\u57D9\u57D2\u57B8\u57F4\u57EF\u57F8\u57E4\u57DD"], + ["dc40", "\u8E73\u8E75\u8E77", 4, "\u8E7D\u8E7E\u8E80\u8E82\u8E83\u8E84\u8E86\u8E88", 6, "\u8E91\u8E92\u8E93\u8E95", 6, "\u8E9D\u8E9F", 11, "\u8EAD\u8EAE\u8EB0\u8EB1\u8EB3", 6, "\u8EBB", 7], + ["dc80", "\u8EC3", 10, "\u8ECF", 21, "\u580B\u580D\u57FD\u57ED\u5800\u581E\u5819\u5844\u5820\u5865\u586C\u5881\u5889\u589A\u5880\u99A8\u9F19\u61FF\u8279\u827D\u827F\u828F\u828A\u82A8\u8284\u828E\u8291\u8297\u8299\u82AB\u82B8\u82BE\u82B0\u82C8\u82CA\u82E3\u8298\u82B7\u82AE\u82CB\u82CC\u82C1\u82A9\u82B4\u82A1\u82AA\u829F\u82C4\u82CE\u82A4\u82E1\u8309\u82F7\u82E4\u830F\u8307\u82DC\u82F4\u82D2\u82D8\u830C\u82FB\u82D3\u8311\u831A\u8306\u8314\u8315\u82E0\u82D5\u831C\u8351\u835B\u835C\u8308\u8392\u833C\u8334\u8331\u839B\u835E\u832F\u834F\u8347\u8343\u835F\u8340\u8317\u8360\u832D\u833A\u8333\u8366\u8365"], + ["dd40", "\u8EE5", 62], + ["dd80", "\u8F24", 32, "\u8368\u831B\u8369\u836C\u836A\u836D\u836E\u83B0\u8378\u83B3\u83B4\u83A0\u83AA\u8393\u839C\u8385\u837C\u83B6\u83A9\u837D\u83B8\u837B\u8398\u839E\u83A8\u83BA\u83BC\u83C1\u8401\u83E5\u83D8\u5807\u8418\u840B\u83DD\u83FD\u83D6\u841C\u8438\u8411\u8406\u83D4\u83DF\u840F\u8403\u83F8\u83F9\u83EA\u83C5\u83C0\u8426\u83F0\u83E1\u845C\u8451\u845A\u8459\u8473\u8487\u8488\u847A\u8489\u8478\u843C\u8446\u8469\u8476\u848C\u848E\u8431\u846D\u84C1\u84CD\u84D0\u84E6\u84BD\u84D3\u84CA\u84BF\u84BA\u84E0\u84A1\u84B9\u84B4\u8497\u84E5\u84E3\u850C\u750D\u8538\u84F0\u8539\u851F\u853A"], + ["de40", "\u8F45", 32, "\u8F6A\u8F80\u8F8C\u8F92\u8F9D\u8FA0\u8FA1\u8FA2\u8FA4\u8FA5\u8FA6\u8FA7\u8FAA\u8FAC\u8FAD\u8FAE\u8FAF\u8FB2\u8FB3\u8FB4\u8FB5\u8FB7\u8FB8\u8FBA\u8FBB\u8FBC\u8FBF\u8FC0\u8FC3\u8FC6"], + ["de80", "\u8FC9", 4, "\u8FCF\u8FD2\u8FD6\u8FD7\u8FDA\u8FE0\u8FE1\u8FE3\u8FE7\u8FEC\u8FEF\u8FF1\u8FF2\u8FF4\u8FF5\u8FF6\u8FFA\u8FFB\u8FFC\u8FFE\u8FFF\u9007\u9008\u900C\u900E\u9013\u9015\u9018\u8556\u853B\u84FF\u84FC\u8559\u8548\u8568\u8564\u855E\u857A\u77A2\u8543\u8572\u857B\u85A4\u85A8\u8587\u858F\u8579\u85AE\u859C\u8585\u85B9\u85B7\u85B0\u85D3\u85C1\u85DC\u85FF\u8627\u8605\u8629\u8616\u863C\u5EFE\u5F08\u593C\u5941\u8037\u5955\u595A\u5958\u530F\u5C22\u5C25\u5C2C\u5C34\u624C\u626A\u629F\u62BB\u62CA\u62DA\u62D7\u62EE\u6322\u62F6\u6339\u634B\u6343\u63AD\u63F6\u6371\u637A\u638E\u63B4\u636D\u63AC\u638A\u6369\u63AE\u63BC\u63F2\u63F8\u63E0\u63FF\u63C4\u63DE\u63CE\u6452\u63C6\u63BE\u6445\u6441\u640B\u641B\u6420\u640C\u6426\u6421\u645E\u6484\u646D\u6496"], + ["df40", "\u9019\u901C\u9023\u9024\u9025\u9027", 5, "\u9030", 4, "\u9037\u9039\u903A\u903D\u903F\u9040\u9043\u9045\u9046\u9048", 4, "\u904E\u9054\u9055\u9056\u9059\u905A\u905C", 5, "\u9064\u9066\u9067\u9069\u906A\u906B\u906C\u906F", 4, "\u9076", 6, "\u907E\u9081"], + ["df80", "\u9084\u9085\u9086\u9087\u9089\u908A\u908C", 4, "\u9092\u9094\u9096\u9098\u909A\u909C\u909E\u909F\u90A0\u90A4\u90A5\u90A7\u90A8\u90A9\u90AB\u90AD\u90B2\u90B7\u90BC\u90BD\u90BF\u90C0\u647A\u64B7\u64B8\u6499\u64BA\u64C0\u64D0\u64D7\u64E4\u64E2\u6509\u6525\u652E\u5F0B\u5FD2\u7519\u5F11\u535F\u53F1\u53FD\u53E9\u53E8\u53FB\u5412\u5416\u5406\u544B\u5452\u5453\u5454\u5456\u5443\u5421\u5457\u5459\u5423\u5432\u5482\u5494\u5477\u5471\u5464\u549A\u549B\u5484\u5476\u5466\u549D\u54D0\u54AD\u54C2\u54B4\u54D2\u54A7\u54A6\u54D3\u54D4\u5472\u54A3\u54D5\u54BB\u54BF\u54CC\u54D9\u54DA\u54DC\u54A9\u54AA\u54A4\u54DD\u54CF\u54DE\u551B\u54E7\u5520\u54FD\u5514\u54F3\u5522\u5523\u550F\u5511\u5527\u552A\u5567\u558F\u55B5\u5549\u556D\u5541\u5555\u553F\u5550\u553C"], + ["e040", "\u90C2\u90C3\u90C6\u90C8\u90C9\u90CB\u90CC\u90CD\u90D2\u90D4\u90D5\u90D6\u90D8\u90D9\u90DA\u90DE\u90DF\u90E0\u90E3\u90E4\u90E5\u90E9\u90EA\u90EC\u90EE\u90F0\u90F1\u90F2\u90F3\u90F5\u90F6\u90F7\u90F9\u90FA\u90FB\u90FC\u90FF\u9100\u9101\u9103\u9105", 19, "\u911A\u911B\u911C"], + ["e080", "\u911D\u911F\u9120\u9121\u9124", 10, "\u9130\u9132", 6, "\u913A", 8, "\u9144\u5537\u5556\u5575\u5576\u5577\u5533\u5530\u555C\u558B\u55D2\u5583\u55B1\u55B9\u5588\u5581\u559F\u557E\u55D6\u5591\u557B\u55DF\u55BD\u55BE\u5594\u5599\u55EA\u55F7\u55C9\u561F\u55D1\u55EB\u55EC\u55D4\u55E6\u55DD\u55C4\u55EF\u55E5\u55F2\u55F3\u55CC\u55CD\u55E8\u55F5\u55E4\u8F94\u561E\u5608\u560C\u5601\u5624\u5623\u55FE\u5600\u5627\u562D\u5658\u5639\u5657\u562C\u564D\u5662\u5659\u565C\u564C\u5654\u5686\u5664\u5671\u566B\u567B\u567C\u5685\u5693\u56AF\u56D4\u56D7\u56DD\u56E1\u56F5\u56EB\u56F9\u56FF\u5704\u570A\u5709\u571C\u5E0F\u5E19\u5E14\u5E11\u5E31\u5E3B\u5E3C"], + ["e140", "\u9145\u9147\u9148\u9151\u9153\u9154\u9155\u9156\u9158\u9159\u915B\u915C\u915F\u9160\u9166\u9167\u9168\u916B\u916D\u9173\u917A\u917B\u917C\u9180", 4, "\u9186\u9188\u918A\u918E\u918F\u9193", 6, "\u919C", 5, "\u91A4", 5, "\u91AB\u91AC\u91B0\u91B1\u91B2\u91B3\u91B6\u91B7\u91B8\u91B9\u91BB"], + ["e180", "\u91BC", 10, "\u91C8\u91CB\u91D0\u91D2", 9, "\u91DD", 8, "\u5E37\u5E44\u5E54\u5E5B\u5E5E\u5E61\u5C8C\u5C7A\u5C8D\u5C90\u5C96\u5C88\u5C98\u5C99\u5C91\u5C9A\u5C9C\u5CB5\u5CA2\u5CBD\u5CAC\u5CAB\u5CB1\u5CA3\u5CC1\u5CB7\u5CC4\u5CD2\u5CE4\u5CCB\u5CE5\u5D02\u5D03\u5D27\u5D26\u5D2E\u5D24\u5D1E\u5D06\u5D1B\u5D58\u5D3E\u5D34\u5D3D\u5D6C\u5D5B\u5D6F\u5D5D\u5D6B\u5D4B\u5D4A\u5D69\u5D74\u5D82\u5D99\u5D9D\u8C73\u5DB7\u5DC5\u5F73\u5F77\u5F82\u5F87\u5F89\u5F8C\u5F95\u5F99\u5F9C\u5FA8\u5FAD\u5FB5\u5FBC\u8862\u5F61\u72AD\u72B0\u72B4\u72B7\u72B8\u72C3\u72C1\u72CE\u72CD\u72D2\u72E8\u72EF\u72E9\u72F2\u72F4\u72F7\u7301\u72F3\u7303\u72FA"], + ["e240", "\u91E6", 62], + ["e280", "\u9225", 32, "\u72FB\u7317\u7313\u7321\u730A\u731E\u731D\u7315\u7322\u7339\u7325\u732C\u7338\u7331\u7350\u734D\u7357\u7360\u736C\u736F\u737E\u821B\u5925\u98E7\u5924\u5902\u9963\u9967", 5, "\u9974\u9977\u997D\u9980\u9984\u9987\u998A\u998D\u9990\u9991\u9993\u9994\u9995\u5E80\u5E91\u5E8B\u5E96\u5EA5\u5EA0\u5EB9\u5EB5\u5EBE\u5EB3\u8D53\u5ED2\u5ED1\u5EDB\u5EE8\u5EEA\u81BA\u5FC4\u5FC9\u5FD6\u5FCF\u6003\u5FEE\u6004\u5FE1\u5FE4\u5FFE\u6005\u6006\u5FEA\u5FED\u5FF8\u6019\u6035\u6026\u601B\u600F\u600D\u6029\u602B\u600A\u603F\u6021\u6078\u6079\u607B\u607A\u6042"], + ["e340", "\u9246", 45, "\u9275", 16], + ["e380", "\u9286", 7, "\u928F", 24, "\u606A\u607D\u6096\u609A\u60AD\u609D\u6083\u6092\u608C\u609B\u60EC\u60BB\u60B1\u60DD\u60D8\u60C6\u60DA\u60B4\u6120\u6126\u6115\u6123\u60F4\u6100\u610E\u612B\u614A\u6175\u61AC\u6194\u61A7\u61B7\u61D4\u61F5\u5FDD\u96B3\u95E9\u95EB\u95F1\u95F3\u95F5\u95F6\u95FC\u95FE\u9603\u9604\u9606\u9608\u960A\u960B\u960C\u960D\u960F\u9612\u9615\u9616\u9617\u9619\u961A\u4E2C\u723F\u6215\u6C35\u6C54\u6C5C\u6C4A\u6CA3\u6C85\u6C90\u6C94\u6C8C\u6C68\u6C69\u6C74\u6C76\u6C86\u6CA9\u6CD0\u6CD4\u6CAD\u6CF7\u6CF8\u6CF1\u6CD7\u6CB2\u6CE0\u6CD6\u6CFA\u6CEB\u6CEE\u6CB1\u6CD3\u6CEF\u6CFE"], + ["e440", "\u92A8", 5, "\u92AF", 24, "\u92C9", 31], + ["e480", "\u92E9", 32, "\u6D39\u6D27\u6D0C\u6D43\u6D48\u6D07\u6D04\u6D19\u6D0E\u6D2B\u6D4D\u6D2E\u6D35\u6D1A\u6D4F\u6D52\u6D54\u6D33\u6D91\u6D6F\u6D9E\u6DA0\u6D5E\u6D93\u6D94\u6D5C\u6D60\u6D7C\u6D63\u6E1A\u6DC7\u6DC5\u6DDE\u6E0E\u6DBF\u6DE0\u6E11\u6DE6\u6DDD\u6DD9\u6E16\u6DAB\u6E0C\u6DAE\u6E2B\u6E6E\u6E4E\u6E6B\u6EB2\u6E5F\u6E86\u6E53\u6E54\u6E32\u6E25\u6E44\u6EDF\u6EB1\u6E98\u6EE0\u6F2D\u6EE2\u6EA5\u6EA7\u6EBD\u6EBB\u6EB7\u6ED7\u6EB4\u6ECF\u6E8F\u6EC2\u6E9F\u6F62\u6F46\u6F47\u6F24\u6F15\u6EF9\u6F2F\u6F36\u6F4B\u6F74\u6F2A\u6F09\u6F29\u6F89\u6F8D\u6F8C\u6F78\u6F72\u6F7C\u6F7A\u6FD1"], + ["e540", "\u930A", 51, "\u933F", 10], + ["e580", "\u934A", 31, "\u936B\u6FC9\u6FA7\u6FB9\u6FB6\u6FC2\u6FE1\u6FEE\u6FDE\u6FE0\u6FEF\u701A\u7023\u701B\u7039\u7035\u704F\u705E\u5B80\u5B84\u5B95\u5B93\u5BA5\u5BB8\u752F\u9A9E\u6434\u5BE4\u5BEE\u8930\u5BF0\u8E47\u8B07\u8FB6\u8FD3\u8FD5\u8FE5\u8FEE\u8FE4\u8FE9\u8FE6\u8FF3\u8FE8\u9005\u9004\u900B\u9026\u9011\u900D\u9016\u9021\u9035\u9036\u902D\u902F\u9044\u9051\u9052\u9050\u9068\u9058\u9062\u905B\u66B9\u9074\u907D\u9082\u9088\u9083\u908B\u5F50\u5F57\u5F56\u5F58\u5C3B\u54AB\u5C50\u5C59\u5B71\u5C63\u5C66\u7FBC\u5F2A\u5F29\u5F2D\u8274\u5F3C\u9B3B\u5C6E\u5981\u5983\u598D\u59A9\u59AA\u59A3"], + ["e640", "\u936C", 34, "\u9390", 27], + ["e680", "\u93AC", 29, "\u93CB\u93CC\u93CD\u5997\u59CA\u59AB\u599E\u59A4\u59D2\u59B2\u59AF\u59D7\u59BE\u5A05\u5A06\u59DD\u5A08\u59E3\u59D8\u59F9\u5A0C\u5A09\u5A32\u5A34\u5A11\u5A23\u5A13\u5A40\u5A67\u5A4A\u5A55\u5A3C\u5A62\u5A75\u80EC\u5AAA\u5A9B\u5A77\u5A7A\u5ABE\u5AEB\u5AB2\u5AD2\u5AD4\u5AB8\u5AE0\u5AE3\u5AF1\u5AD6\u5AE6\u5AD8\u5ADC\u5B09\u5B17\u5B16\u5B32\u5B37\u5B40\u5C15\u5C1C\u5B5A\u5B65\u5B73\u5B51\u5B53\u5B62\u9A75\u9A77\u9A78\u9A7A\u9A7F\u9A7D\u9A80\u9A81\u9A85\u9A88\u9A8A\u9A90\u9A92\u9A93\u9A96\u9A98\u9A9B\u9A9C\u9A9D\u9A9F\u9AA0\u9AA2\u9AA3\u9AA5\u9AA7\u7E9F\u7EA1\u7EA3\u7EA5\u7EA8\u7EA9"], + ["e740", "\u93CE", 7, "\u93D7", 54], + ["e780", "\u940E", 32, "\u7EAD\u7EB0\u7EBE\u7EC0\u7EC1\u7EC2\u7EC9\u7ECB\u7ECC\u7ED0\u7ED4\u7ED7\u7EDB\u7EE0\u7EE1\u7EE8\u7EEB\u7EEE\u7EEF\u7EF1\u7EF2\u7F0D\u7EF6\u7EFA\u7EFB\u7EFE\u7F01\u7F02\u7F03\u7F07\u7F08\u7F0B\u7F0C\u7F0F\u7F11\u7F12\u7F17\u7F19\u7F1C\u7F1B\u7F1F\u7F21", 6, "\u7F2A\u7F2B\u7F2C\u7F2D\u7F2F", 4, "\u7F35\u5E7A\u757F\u5DDB\u753E\u9095\u738E\u7391\u73AE\u73A2\u739F\u73CF\u73C2\u73D1\u73B7\u73B3\u73C0\u73C9\u73C8\u73E5\u73D9\u987C\u740A\u73E9\u73E7\u73DE\u73BA\u73F2\u740F\u742A\u745B\u7426\u7425\u7428\u7430\u742E\u742C"], + ["e840", "\u942F", 14, "\u943F", 43, "\u946C\u946D\u946E\u946F"], + ["e880", "\u9470", 20, "\u9491\u9496\u9498\u94C7\u94CF\u94D3\u94D4\u94DA\u94E6\u94FB\u951C\u9520\u741B\u741A\u7441\u745C\u7457\u7455\u7459\u7477\u746D\u747E\u749C\u748E\u7480\u7481\u7487\u748B\u749E\u74A8\u74A9\u7490\u74A7\u74D2\u74BA\u97EA\u97EB\u97EC\u674C\u6753\u675E\u6748\u6769\u67A5\u6787\u676A\u6773\u6798\u67A7\u6775\u67A8\u679E\u67AD\u678B\u6777\u677C\u67F0\u6809\u67D8\u680A\u67E9\u67B0\u680C\u67D9\u67B5\u67DA\u67B3\u67DD\u6800\u67C3\u67B8\u67E2\u680E\u67C1\u67FD\u6832\u6833\u6860\u6861\u684E\u6862\u6844\u6864\u6883\u681D\u6855\u6866\u6841\u6867\u6840\u683E\u684A\u6849\u6829\u68B5\u688F\u6874\u6877\u6893\u686B\u68C2\u696E\u68FC\u691F\u6920\u68F9"], + ["e940", "\u9527\u9533\u953D\u9543\u9548\u954B\u9555\u955A\u9560\u956E\u9574\u9575\u9577", 7, "\u9580", 42], + ["e980", "\u95AB", 32, "\u6924\u68F0\u690B\u6901\u6957\u68E3\u6910\u6971\u6939\u6960\u6942\u695D\u6984\u696B\u6980\u6998\u6978\u6934\u69CC\u6987\u6988\u69CE\u6989\u6966\u6963\u6979\u699B\u69A7\u69BB\u69AB\u69AD\u69D4\u69B1\u69C1\u69CA\u69DF\u6995\u69E0\u698D\u69FF\u6A2F\u69ED\u6A17\u6A18\u6A65\u69F2\u6A44\u6A3E\u6AA0\u6A50\u6A5B\u6A35\u6A8E\u6A79\u6A3D\u6A28\u6A58\u6A7C\u6A91\u6A90\u6AA9\u6A97\u6AAB\u7337\u7352\u6B81\u6B82\u6B87\u6B84\u6B92\u6B93\u6B8D\u6B9A\u6B9B\u6BA1\u6BAA\u8F6B\u8F6D\u8F71\u8F72\u8F73\u8F75\u8F76\u8F78\u8F77\u8F79\u8F7A\u8F7C\u8F7E\u8F81\u8F82\u8F84\u8F87\u8F8B"], + ["ea40", "\u95CC", 27, "\u95EC\u95FF\u9607\u9613\u9618\u961B\u961E\u9620\u9623", 6, "\u962B\u962C\u962D\u962F\u9630\u9637\u9638\u9639\u963A\u963E\u9641\u9643\u964A\u964E\u964F\u9651\u9652\u9653\u9656\u9657"], + ["ea80", "\u9658\u9659\u965A\u965C\u965D\u965E\u9660\u9663\u9665\u9666\u966B\u966D", 4, "\u9673\u9678", 12, "\u9687\u9689\u968A\u8F8D\u8F8E\u8F8F\u8F98\u8F9A\u8ECE\u620B\u6217\u621B\u621F\u6222\u6221\u6225\u6224\u622C\u81E7\u74EF\u74F4\u74FF\u750F\u7511\u7513\u6534\u65EE\u65EF\u65F0\u660A\u6619\u6772\u6603\u6615\u6600\u7085\u66F7\u661D\u6634\u6631\u6636\u6635\u8006\u665F\u6654\u6641\u664F\u6656\u6661\u6657\u6677\u6684\u668C\u66A7\u669D\u66BE\u66DB\u66DC\u66E6\u66E9\u8D32\u8D33\u8D36\u8D3B\u8D3D\u8D40\u8D45\u8D46\u8D48\u8D49\u8D47\u8D4D\u8D55\u8D59\u89C7\u89CA\u89CB\u89CC\u89CE\u89CF\u89D0\u89D1\u726E\u729F\u725D\u7266\u726F\u727E\u727F\u7284\u728B\u728D\u728F\u7292\u6308\u6332\u63B0"], + ["eb40", "\u968C\u968E\u9691\u9692\u9693\u9695\u9696\u969A\u969B\u969D", 9, "\u96A8", 7, "\u96B1\u96B2\u96B4\u96B5\u96B7\u96B8\u96BA\u96BB\u96BF\u96C2\u96C3\u96C8\u96CA\u96CB\u96D0\u96D1\u96D3\u96D4\u96D6", 9, "\u96E1", 6, "\u96EB"], + ["eb80", "\u96EC\u96ED\u96EE\u96F0\u96F1\u96F2\u96F4\u96F5\u96F8\u96FA\u96FB\u96FC\u96FD\u96FF\u9702\u9703\u9705\u970A\u970B\u970C\u9710\u9711\u9712\u9714\u9715\u9717", 4, "\u971D\u971F\u9720\u643F\u64D8\u8004\u6BEA\u6BF3\u6BFD\u6BF5\u6BF9\u6C05\u6C07\u6C06\u6C0D\u6C15\u6C18\u6C19\u6C1A\u6C21\u6C29\u6C24\u6C2A\u6C32\u6535\u6555\u656B\u724D\u7252\u7256\u7230\u8662\u5216\u809F\u809C\u8093\u80BC\u670A\u80BD\u80B1\u80AB\u80AD\u80B4\u80B7\u80E7\u80E8\u80E9\u80EA\u80DB\u80C2\u80C4\u80D9\u80CD\u80D7\u6710\u80DD\u80EB\u80F1\u80F4\u80ED\u810D\u810E\u80F2\u80FC\u6715\u8112\u8C5A\u8136\u811E\u812C\u8118\u8132\u8148\u814C\u8153\u8174\u8159\u815A\u8171\u8160\u8169\u817C\u817D\u816D\u8167\u584D\u5AB5\u8188\u8182\u8191\u6ED5\u81A3\u81AA\u81CC\u6726\u81CA\u81BB"], + ["ec40", "\u9721", 8, "\u972B\u972C\u972E\u972F\u9731\u9733", 4, "\u973A\u973B\u973C\u973D\u973F", 18, "\u9754\u9755\u9757\u9758\u975A\u975C\u975D\u975F\u9763\u9764\u9766\u9767\u9768\u976A", 7], + ["ec80", "\u9772\u9775\u9777", 4, "\u977D", 7, "\u9786", 4, "\u978C\u978E\u978F\u9790\u9793\u9795\u9796\u9797\u9799", 4, "\u81C1\u81A6\u6B24\u6B37\u6B39\u6B43\u6B46\u6B59\u98D1\u98D2\u98D3\u98D5\u98D9\u98DA\u6BB3\u5F40\u6BC2\u89F3\u6590\u9F51\u6593\u65BC\u65C6\u65C4\u65C3\u65CC\u65CE\u65D2\u65D6\u7080\u709C\u7096\u709D\u70BB\u70C0\u70B7\u70AB\u70B1\u70E8\u70CA\u7110\u7113\u7116\u712F\u7131\u7173\u715C\u7168\u7145\u7172\u714A\u7178\u717A\u7198\u71B3\u71B5\u71A8\u71A0\u71E0\u71D4\u71E7\u71F9\u721D\u7228\u706C\u7118\u7166\u71B9\u623E\u623D\u6243\u6248\u6249\u793B\u7940\u7946\u7949\u795B\u795C\u7953\u795A\u7962\u7957\u7960\u796F\u7967\u797A\u7985\u798A\u799A\u79A7\u79B3\u5FD1\u5FD0"], + ["ed40", "\u979E\u979F\u97A1\u97A2\u97A4", 6, "\u97AC\u97AE\u97B0\u97B1\u97B3\u97B5", 46], + ["ed80", "\u97E4\u97E5\u97E8\u97EE", 4, "\u97F4\u97F7", 23, "\u603C\u605D\u605A\u6067\u6041\u6059\u6063\u60AB\u6106\u610D\u615D\u61A9\u619D\u61CB\u61D1\u6206\u8080\u807F\u6C93\u6CF6\u6DFC\u77F6\u77F8\u7800\u7809\u7817\u7818\u7811\u65AB\u782D\u781C\u781D\u7839\u783A\u783B\u781F\u783C\u7825\u782C\u7823\u7829\u784E\u786D\u7856\u7857\u7826\u7850\u7847\u784C\u786A\u789B\u7893\u789A\u7887\u789C\u78A1\u78A3\u78B2\u78B9\u78A5\u78D4\u78D9\u78C9\u78EC\u78F2\u7905\u78F4\u7913\u7924\u791E\u7934\u9F9B\u9EF9\u9EFB\u9EFC\u76F1\u7704\u770D\u76F9\u7707\u7708\u771A\u7722\u7719\u772D\u7726\u7735\u7738\u7750\u7751\u7747\u7743\u775A\u7768"], + ["ee40", "\u980F", 62], + ["ee80", "\u984E", 32, "\u7762\u7765\u777F\u778D\u777D\u7780\u778C\u7791\u779F\u77A0\u77B0\u77B5\u77BD\u753A\u7540\u754E\u754B\u7548\u755B\u7572\u7579\u7583\u7F58\u7F61\u7F5F\u8A48\u7F68\u7F74\u7F71\u7F79\u7F81\u7F7E\u76CD\u76E5\u8832\u9485\u9486\u9487\u948B\u948A\u948C\u948D\u948F\u9490\u9494\u9497\u9495\u949A\u949B\u949C\u94A3\u94A4\u94AB\u94AA\u94AD\u94AC\u94AF\u94B0\u94B2\u94B4\u94B6", 4, "\u94BC\u94BD\u94BF\u94C4\u94C8", 6, "\u94D0\u94D1\u94D2\u94D5\u94D6\u94D7\u94D9\u94D8\u94DB\u94DE\u94DF\u94E0\u94E2\u94E4\u94E5\u94E7\u94E8\u94EA"], + ["ef40", "\u986F", 5, "\u988B\u988E\u9892\u9895\u9899\u98A3\u98A8", 37, "\u98CF\u98D0\u98D4\u98D6\u98D7\u98DB\u98DC\u98DD\u98E0", 4], + ["ef80", "\u98E5\u98E6\u98E9", 30, "\u94E9\u94EB\u94EE\u94EF\u94F3\u94F4\u94F5\u94F7\u94F9\u94FC\u94FD\u94FF\u9503\u9502\u9506\u9507\u9509\u950A\u950D\u950E\u950F\u9512", 4, "\u9518\u951B\u951D\u951E\u951F\u9522\u952A\u952B\u9529\u952C\u9531\u9532\u9534\u9536\u9537\u9538\u953C\u953E\u953F\u9542\u9535\u9544\u9545\u9546\u9549\u954C\u954E\u954F\u9552\u9553\u9554\u9556\u9557\u9558\u9559\u955B\u955E\u955F\u955D\u9561\u9562\u9564", 8, "\u956F\u9571\u9572\u9573\u953A\u77E7\u77EC\u96C9\u79D5\u79ED\u79E3\u79EB\u7A06\u5D47\u7A03\u7A02\u7A1E\u7A14"], + ["f040", "\u9908", 4, "\u990E\u990F\u9911", 28, "\u992F", 26], + ["f080", "\u994A", 9, "\u9956", 12, "\u9964\u9966\u9973\u9978\u9979\u997B\u997E\u9982\u9983\u9989\u7A39\u7A37\u7A51\u9ECF\u99A5\u7A70\u7688\u768E\u7693\u7699\u76A4\u74DE\u74E0\u752C\u9E20\u9E22\u9E28", 4, "\u9E32\u9E31\u9E36\u9E38\u9E37\u9E39\u9E3A\u9E3E\u9E41\u9E42\u9E44\u9E46\u9E47\u9E48\u9E49\u9E4B\u9E4C\u9E4E\u9E51\u9E55\u9E57\u9E5A\u9E5B\u9E5C\u9E5E\u9E63\u9E66", 6, "\u9E71\u9E6D\u9E73\u7592\u7594\u7596\u75A0\u759D\u75AC\u75A3\u75B3\u75B4\u75B8\u75C4\u75B1\u75B0\u75C3\u75C2\u75D6\u75CD\u75E3\u75E8\u75E6\u75E4\u75EB\u75E7\u7603\u75F1\u75FC\u75FF\u7610\u7600\u7605\u760C\u7617\u760A\u7625\u7618\u7615\u7619"], + ["f140", "\u998C\u998E\u999A", 10, "\u99A6\u99A7\u99A9", 47], + ["f180", "\u99D9", 32, "\u761B\u763C\u7622\u7620\u7640\u762D\u7630\u763F\u7635\u7643\u763E\u7633\u764D\u765E\u7654\u765C\u7656\u766B\u766F\u7FCA\u7AE6\u7A78\u7A79\u7A80\u7A86\u7A88\u7A95\u7AA6\u7AA0\u7AAC\u7AA8\u7AAD\u7AB3\u8864\u8869\u8872\u887D\u887F\u8882\u88A2\u88C6\u88B7\u88BC\u88C9\u88E2\u88CE\u88E3\u88E5\u88F1\u891A\u88FC\u88E8\u88FE\u88F0\u8921\u8919\u8913\u891B\u890A\u8934\u892B\u8936\u8941\u8966\u897B\u758B\u80E5\u76B2\u76B4\u77DC\u8012\u8014\u8016\u801C\u8020\u8022\u8025\u8026\u8027\u8029\u8028\u8031\u800B\u8035\u8043\u8046\u804D\u8052\u8069\u8071\u8983\u9878\u9880\u9883"], + ["f240", "\u99FA", 62], + ["f280", "\u9A39", 32, "\u9889\u988C\u988D\u988F\u9894\u989A\u989B\u989E\u989F\u98A1\u98A2\u98A5\u98A6\u864D\u8654\u866C\u866E\u867F\u867A\u867C\u867B\u86A8\u868D\u868B\u86AC\u869D\u86A7\u86A3\u86AA\u8693\u86A9\u86B6\u86C4\u86B5\u86CE\u86B0\u86BA\u86B1\u86AF\u86C9\u86CF\u86B4\u86E9\u86F1\u86F2\u86ED\u86F3\u86D0\u8713\u86DE\u86F4\u86DF\u86D8\u86D1\u8703\u8707\u86F8\u8708\u870A\u870D\u8709\u8723\u873B\u871E\u8725\u872E\u871A\u873E\u8748\u8734\u8731\u8729\u8737\u873F\u8782\u8722\u877D\u877E\u877B\u8760\u8770\u874C\u876E\u878B\u8753\u8763\u877C\u8764\u8759\u8765\u8793\u87AF\u87A8\u87D2"], + ["f340", "\u9A5A", 17, "\u9A72\u9A83\u9A89\u9A8D\u9A8E\u9A94\u9A95\u9A99\u9AA6\u9AA9", 6, "\u9AB2\u9AB3\u9AB4\u9AB5\u9AB9\u9ABB\u9ABD\u9ABE\u9ABF\u9AC3\u9AC4\u9AC6", 4, "\u9ACD\u9ACE\u9ACF\u9AD0\u9AD2\u9AD4\u9AD5\u9AD6\u9AD7\u9AD9\u9ADA\u9ADB\u9ADC"], + ["f380", "\u9ADD\u9ADE\u9AE0\u9AE2\u9AE3\u9AE4\u9AE5\u9AE7\u9AE8\u9AE9\u9AEA\u9AEC\u9AEE\u9AF0", 8, "\u9AFA\u9AFC", 6, "\u9B04\u9B05\u9B06\u87C6\u8788\u8785\u87AD\u8797\u8783\u87AB\u87E5\u87AC\u87B5\u87B3\u87CB\u87D3\u87BD\u87D1\u87C0\u87CA\u87DB\u87EA\u87E0\u87EE\u8816\u8813\u87FE\u880A\u881B\u8821\u8839\u883C\u7F36\u7F42\u7F44\u7F45\u8210\u7AFA\u7AFD\u7B08\u7B03\u7B04\u7B15\u7B0A\u7B2B\u7B0F\u7B47\u7B38\u7B2A\u7B19\u7B2E\u7B31\u7B20\u7B25\u7B24\u7B33\u7B3E\u7B1E\u7B58\u7B5A\u7B45\u7B75\u7B4C\u7B5D\u7B60\u7B6E\u7B7B\u7B62\u7B72\u7B71\u7B90\u7BA6\u7BA7\u7BB8\u7BAC\u7B9D\u7BA8\u7B85\u7BAA\u7B9C\u7BA2\u7BAB\u7BB4\u7BD1\u7BC1\u7BCC\u7BDD\u7BDA\u7BE5\u7BE6\u7BEA\u7C0C\u7BFE\u7BFC\u7C0F\u7C16\u7C0B"], + ["f440", "\u9B07\u9B09", 5, "\u9B10\u9B11\u9B12\u9B14", 10, "\u9B20\u9B21\u9B22\u9B24", 10, "\u9B30\u9B31\u9B33", 7, "\u9B3D\u9B3E\u9B3F\u9B40\u9B46\u9B4A\u9B4B\u9B4C\u9B4E\u9B50\u9B52\u9B53\u9B55", 5], + ["f480", "\u9B5B", 32, "\u7C1F\u7C2A\u7C26\u7C38\u7C41\u7C40\u81FE\u8201\u8202\u8204\u81EC\u8844\u8221\u8222\u8223\u822D\u822F\u8228\u822B\u8238\u823B\u8233\u8234\u823E\u8244\u8249\u824B\u824F\u825A\u825F\u8268\u887E\u8885\u8888\u88D8\u88DF\u895E\u7F9D\u7F9F\u7FA7\u7FAF\u7FB0\u7FB2\u7C7C\u6549\u7C91\u7C9D\u7C9C\u7C9E\u7CA2\u7CB2\u7CBC\u7CBD\u7CC1\u7CC7\u7CCC\u7CCD\u7CC8\u7CC5\u7CD7\u7CE8\u826E\u66A8\u7FBF\u7FCE\u7FD5\u7FE5\u7FE1\u7FE6\u7FE9\u7FEE\u7FF3\u7CF8\u7D77\u7DA6\u7DAE\u7E47\u7E9B\u9EB8\u9EB4\u8D73\u8D84\u8D94\u8D91\u8DB1\u8D67\u8D6D\u8C47\u8C49\u914A\u9150\u914E\u914F\u9164"], + ["f540", "\u9B7C", 62], + ["f580", "\u9BBB", 32, "\u9162\u9161\u9170\u9169\u916F\u917D\u917E\u9172\u9174\u9179\u918C\u9185\u9190\u918D\u9191\u91A2\u91A3\u91AA\u91AD\u91AE\u91AF\u91B5\u91B4\u91BA\u8C55\u9E7E\u8DB8\u8DEB\u8E05\u8E59\u8E69\u8DB5\u8DBF\u8DBC\u8DBA\u8DC4\u8DD6\u8DD7\u8DDA\u8DDE\u8DCE\u8DCF\u8DDB\u8DC6\u8DEC\u8DF7\u8DF8\u8DE3\u8DF9\u8DFB\u8DE4\u8E09\u8DFD\u8E14\u8E1D\u8E1F\u8E2C\u8E2E\u8E23\u8E2F\u8E3A\u8E40\u8E39\u8E35\u8E3D\u8E31\u8E49\u8E41\u8E42\u8E51\u8E52\u8E4A\u8E70\u8E76\u8E7C\u8E6F\u8E74\u8E85\u8E8F\u8E94\u8E90\u8E9C\u8E9E\u8C78\u8C82\u8C8A\u8C85\u8C98\u8C94\u659B\u89D6\u89DE\u89DA\u89DC"], + ["f640", "\u9BDC", 62], + ["f680", "\u9C1B", 32, "\u89E5\u89EB\u89EF\u8A3E\u8B26\u9753\u96E9\u96F3\u96EF\u9706\u9701\u9708\u970F\u970E\u972A\u972D\u9730\u973E\u9F80\u9F83\u9F85", 5, "\u9F8C\u9EFE\u9F0B\u9F0D\u96B9\u96BC\u96BD\u96CE\u96D2\u77BF\u96E0\u928E\u92AE\u92C8\u933E\u936A\u93CA\u938F\u943E\u946B\u9C7F\u9C82\u9C85\u9C86\u9C87\u9C88\u7A23\u9C8B\u9C8E\u9C90\u9C91\u9C92\u9C94\u9C95\u9C9A\u9C9B\u9C9E", 5, "\u9CA5", 4, "\u9CAB\u9CAD\u9CAE\u9CB0", 7, "\u9CBA\u9CBB\u9CBC\u9CBD\u9CC4\u9CC5\u9CC6\u9CC7\u9CCA\u9CCB"], + ["f740", "\u9C3C", 62], + ["f780", "\u9C7B\u9C7D\u9C7E\u9C80\u9C83\u9C84\u9C89\u9C8A\u9C8C\u9C8F\u9C93\u9C96\u9C97\u9C98\u9C99\u9C9D\u9CAA\u9CAC\u9CAF\u9CB9\u9CBE", 4, "\u9CC8\u9CC9\u9CD1\u9CD2\u9CDA\u9CDB\u9CE0\u9CE1\u9CCC", 4, "\u9CD3\u9CD4\u9CD5\u9CD7\u9CD8\u9CD9\u9CDC\u9CDD\u9CDF\u9CE2\u977C\u9785\u9791\u9792\u9794\u97AF\u97AB\u97A3\u97B2\u97B4\u9AB1\u9AB0\u9AB7\u9E58\u9AB6\u9ABA\u9ABC\u9AC1\u9AC0\u9AC5\u9AC2\u9ACB\u9ACC\u9AD1\u9B45\u9B43\u9B47\u9B49\u9B48\u9B4D\u9B51\u98E8\u990D\u992E\u9955\u9954\u9ADF\u9AE1\u9AE6\u9AEF\u9AEB\u9AFB\u9AED\u9AF9\u9B08\u9B0F\u9B13\u9B1F\u9B23\u9EBD\u9EBE\u7E3B\u9E82\u9E87\u9E88\u9E8B\u9E92\u93D6\u9E9D\u9E9F\u9EDB\u9EDC\u9EDD\u9EE0\u9EDF\u9EE2\u9EE9\u9EE7\u9EE5\u9EEA\u9EEF\u9F22\u9F2C\u9F2F\u9F39\u9F37\u9F3D\u9F3E\u9F44"], + ["f840", "\u9CE3", 62], + ["f880", "\u9D22", 32], + ["f940", "\u9D43", 62], + ["f980", "\u9D82", 32], + ["fa40", "\u9DA3", 62], + ["fa80", "\u9DE2", 32], + ["fb40", "\u9E03", 27, "\u9E24\u9E27\u9E2E\u9E30\u9E34\u9E3B\u9E3C\u9E40\u9E4D\u9E50\u9E52\u9E53\u9E54\u9E56\u9E59\u9E5D\u9E5F\u9E60\u9E61\u9E62\u9E65\u9E6E\u9E6F\u9E72\u9E74", 9, "\u9E80"], + ["fb80", "\u9E81\u9E83\u9E84\u9E85\u9E86\u9E89\u9E8A\u9E8C", 5, "\u9E94", 8, "\u9E9E\u9EA0", 5, "\u9EA7\u9EA8\u9EA9\u9EAA"], + ["fc40", "\u9EAB", 8, "\u9EB5\u9EB6\u9EB7\u9EB9\u9EBA\u9EBC\u9EBF", 4, "\u9EC5\u9EC6\u9EC7\u9EC8\u9ECA\u9ECB\u9ECC\u9ED0\u9ED2\u9ED3\u9ED5\u9ED6\u9ED7\u9ED9\u9EDA\u9EDE\u9EE1\u9EE3\u9EE4\u9EE6\u9EE8\u9EEB\u9EEC\u9EED\u9EEE\u9EF0", 8, "\u9EFA\u9EFD\u9EFF", 6], + ["fc80", "\u9F06", 4, "\u9F0C\u9F0F\u9F11\u9F12\u9F14\u9F15\u9F16\u9F18\u9F1A", 5, "\u9F21\u9F23", 8, "\u9F2D\u9F2E\u9F30\u9F31"], + ["fd40", "\u9F32", 4, "\u9F38\u9F3A\u9F3C\u9F3F", 4, "\u9F45", 10, "\u9F52", 38], + ["fd80", "\u9F79", 5, "\u9F81\u9F82\u9F8D", 11, "\u9F9C\u9F9D\u9F9E\u9FA1", 4, "\uF92C\uF979\uF995\uF9E7\uF9F1"], + ["fe40", "\uFA0C\uFA0D\uFA0E\uFA0F\uFA11\uFA13\uFA14\uFA18\uFA1F\uFA20\uFA21\uFA23\uFA24\uFA27\uFA28\uFA29"] + ]; + } +}); + +// ../../node_modules/iconv-lite/encodings/tables/gbk-added.json +var require_gbk_added = __commonJS({ + "../../node_modules/iconv-lite/encodings/tables/gbk-added.json"(exports2, module2) { + module2.exports = [ + ["a140", "\uE4C6", 62], + ["a180", "\uE505", 32], + ["a240", "\uE526", 62], + ["a280", "\uE565", 32], + ["a2ab", "\uE766", 5], + ["a2e3", "\u20AC\uE76D"], + ["a2ef", "\uE76E\uE76F"], + ["a2fd", "\uE770\uE771"], + ["a340", "\uE586", 62], + ["a380", "\uE5C5", 31, "\u3000"], + ["a440", "\uE5E6", 62], + ["a480", "\uE625", 32], + ["a4f4", "\uE772", 10], + ["a540", "\uE646", 62], + ["a580", "\uE685", 32], + ["a5f7", "\uE77D", 7], + ["a640", "\uE6A6", 62], + ["a680", "\uE6E5", 32], + ["a6b9", "\uE785", 7], + ["a6d9", "\uE78D", 6], + ["a6ec", "\uE794\uE795"], + ["a6f3", "\uE796"], + ["a6f6", "\uE797", 8], + ["a740", "\uE706", 62], + ["a780", "\uE745", 32], + ["a7c2", "\uE7A0", 14], + ["a7f2", "\uE7AF", 12], + ["a896", "\uE7BC", 10], + ["a8bc", "\u1E3F"], + ["a8bf", "\u01F9"], + ["a8c1", "\uE7C9\uE7CA\uE7CB\uE7CC"], + ["a8ea", "\uE7CD", 20], + ["a958", "\uE7E2"], + ["a95b", "\uE7E3"], + ["a95d", "\uE7E4\uE7E5\uE7E6"], + ["a989", "\u303E\u2FF0", 11], + ["a997", "\uE7F4", 12], + ["a9f0", "\uE801", 14], + ["aaa1", "\uE000", 93], + ["aba1", "\uE05E", 93], + ["aca1", "\uE0BC", 93], + ["ada1", "\uE11A", 93], + ["aea1", "\uE178", 93], + ["afa1", "\uE1D6", 93], + ["d7fa", "\uE810", 4], + ["f8a1", "\uE234", 93], + ["f9a1", "\uE292", 93], + ["faa1", "\uE2F0", 93], + ["fba1", "\uE34E", 93], + ["fca1", "\uE3AC", 93], + ["fda1", "\uE40A", 93], + ["fe50", "\u2E81\uE816\uE817\uE818\u2E84\u3473\u3447\u2E88\u2E8B\uE81E\u359E\u361A\u360E\u2E8C\u2E97\u396E\u3918\uE826\u39CF\u39DF\u3A73\u39D0\uE82B\uE82C\u3B4E\u3C6E\u3CE0\u2EA7\uE831\uE832\u2EAA\u4056\u415F\u2EAE\u4337\u2EB3\u2EB6\u2EB7\uE83B\u43B1\u43AC\u2EBB\u43DD\u44D6\u4661\u464C\uE843"], + ["fe80", "\u4723\u4729\u477C\u478D\u2ECA\u4947\u497A\u497D\u4982\u4983\u4985\u4986\u499F\u499B\u49B7\u49B6\uE854\uE855\u4CA3\u4C9F\u4CA0\u4CA1\u4C77\u4CA2\u4D13", 6, "\u4DAE\uE864\uE468", 93], + ["8135f437", "\uE7C7"] + ]; + } +}); + +// ../../node_modules/iconv-lite/encodings/tables/gb18030-ranges.json +var require_gb18030_ranges = __commonJS({ + "../../node_modules/iconv-lite/encodings/tables/gb18030-ranges.json"(exports2, module2) { + module2.exports = { uChars: [128, 165, 169, 178, 184, 216, 226, 235, 238, 244, 248, 251, 253, 258, 276, 284, 300, 325, 329, 334, 364, 463, 465, 467, 469, 471, 473, 475, 477, 506, 594, 610, 712, 716, 730, 930, 938, 962, 970, 1026, 1104, 1106, 8209, 8215, 8218, 8222, 8231, 8241, 8244, 8246, 8252, 8365, 8452, 8454, 8458, 8471, 8482, 8556, 8570, 8596, 8602, 8713, 8720, 8722, 8726, 8731, 8737, 8740, 8742, 8748, 8751, 8760, 8766, 8777, 8781, 8787, 8802, 8808, 8816, 8854, 8858, 8870, 8896, 8979, 9322, 9372, 9548, 9588, 9616, 9622, 9634, 9652, 9662, 9672, 9676, 9680, 9702, 9735, 9738, 9793, 9795, 11906, 11909, 11913, 11917, 11928, 11944, 11947, 11951, 11956, 11960, 11964, 11979, 12284, 12292, 12312, 12319, 12330, 12351, 12436, 12447, 12535, 12543, 12586, 12842, 12850, 12964, 13200, 13215, 13218, 13253, 13263, 13267, 13270, 13384, 13428, 13727, 13839, 13851, 14617, 14703, 14801, 14816, 14964, 15183, 15471, 15585, 16471, 16736, 17208, 17325, 17330, 17374, 17623, 17997, 18018, 18212, 18218, 18301, 18318, 18760, 18811, 18814, 18820, 18823, 18844, 18848, 18872, 19576, 19620, 19738, 19887, 40870, 59244, 59336, 59367, 59413, 59417, 59423, 59431, 59437, 59443, 59452, 59460, 59478, 59493, 63789, 63866, 63894, 63976, 63986, 64016, 64018, 64021, 64025, 64034, 64037, 64042, 65074, 65093, 65107, 65112, 65127, 65132, 65375, 65510, 65536], gbChars: [0, 36, 38, 45, 50, 81, 89, 95, 96, 100, 103, 104, 105, 109, 126, 133, 148, 172, 175, 179, 208, 306, 307, 308, 309, 310, 311, 312, 313, 341, 428, 443, 544, 545, 558, 741, 742, 749, 750, 805, 819, 820, 7922, 7924, 7925, 7927, 7934, 7943, 7944, 7945, 7950, 8062, 8148, 8149, 8152, 8164, 8174, 8236, 8240, 8262, 8264, 8374, 8380, 8381, 8384, 8388, 8390, 8392, 8393, 8394, 8396, 8401, 8406, 8416, 8419, 8424, 8437, 8439, 8445, 8482, 8485, 8496, 8521, 8603, 8936, 8946, 9046, 9050, 9063, 9066, 9076, 9092, 9100, 9108, 9111, 9113, 9131, 9162, 9164, 9218, 9219, 11329, 11331, 11334, 11336, 11346, 11361, 11363, 11366, 11370, 11372, 11375, 11389, 11682, 11686, 11687, 11692, 11694, 11714, 11716, 11723, 11725, 11730, 11736, 11982, 11989, 12102, 12336, 12348, 12350, 12384, 12393, 12395, 12397, 12510, 12553, 12851, 12962, 12973, 13738, 13823, 13919, 13933, 14080, 14298, 14585, 14698, 15583, 15847, 16318, 16434, 16438, 16481, 16729, 17102, 17122, 17315, 17320, 17402, 17418, 17859, 17909, 17911, 17915, 17916, 17936, 17939, 17961, 18664, 18703, 18814, 18962, 19043, 33469, 33470, 33471, 33484, 33485, 33490, 33497, 33501, 33505, 33513, 33520, 33536, 33550, 37845, 37921, 37948, 38029, 38038, 38064, 38065, 38066, 38069, 38075, 38076, 38078, 39108, 39109, 39113, 39114, 39115, 39116, 39265, 39394, 189e3] }; + } +}); + +// ../../node_modules/iconv-lite/encodings/tables/cp949.json +var require_cp949 = __commonJS({ + "../../node_modules/iconv-lite/encodings/tables/cp949.json"(exports2, module2) { + module2.exports = [ + ["0", "\0", 127], + ["8141", "\uAC02\uAC03\uAC05\uAC06\uAC0B", 4, "\uAC18\uAC1E\uAC1F\uAC21\uAC22\uAC23\uAC25", 6, "\uAC2E\uAC32\uAC33\uAC34"], + ["8161", "\uAC35\uAC36\uAC37\uAC3A\uAC3B\uAC3D\uAC3E\uAC3F\uAC41", 9, "\uAC4C\uAC4E", 5, "\uAC55"], + ["8181", "\uAC56\uAC57\uAC59\uAC5A\uAC5B\uAC5D", 18, "\uAC72\uAC73\uAC75\uAC76\uAC79\uAC7B", 4, "\uAC82\uAC87\uAC88\uAC8D\uAC8E\uAC8F\uAC91\uAC92\uAC93\uAC95", 6, "\uAC9E\uACA2", 5, "\uACAB\uACAD\uACAE\uACB1", 6, "\uACBA\uACBE\uACBF\uACC0\uACC2\uACC3\uACC5\uACC6\uACC7\uACC9\uACCA\uACCB\uACCD", 7, "\uACD6\uACD8", 7, "\uACE2\uACE3\uACE5\uACE6\uACE9\uACEB\uACED\uACEE\uACF2\uACF4\uACF7", 4, "\uACFE\uACFF\uAD01\uAD02\uAD03\uAD05\uAD07", 4, "\uAD0E\uAD10\uAD12\uAD13"], + ["8241", "\uAD14\uAD15\uAD16\uAD17\uAD19\uAD1A\uAD1B\uAD1D\uAD1E\uAD1F\uAD21", 7, "\uAD2A\uAD2B\uAD2E", 5], + ["8261", "\uAD36\uAD37\uAD39\uAD3A\uAD3B\uAD3D", 6, "\uAD46\uAD48\uAD4A", 5, "\uAD51\uAD52\uAD53\uAD55\uAD56\uAD57"], + ["8281", "\uAD59", 7, "\uAD62\uAD64", 7, "\uAD6E\uAD6F\uAD71\uAD72\uAD77\uAD78\uAD79\uAD7A\uAD7E\uAD80\uAD83", 4, "\uAD8A\uAD8B\uAD8D\uAD8E\uAD8F\uAD91", 10, "\uAD9E", 5, "\uADA5", 17, "\uADB8", 7, "\uADC2\uADC3\uADC5\uADC6\uADC7\uADC9", 6, "\uADD2\uADD4", 7, "\uADDD\uADDE\uADDF\uADE1\uADE2\uADE3\uADE5", 18], + ["8341", "\uADFA\uADFB\uADFD\uADFE\uAE02", 5, "\uAE0A\uAE0C\uAE0E", 5, "\uAE15", 7], + ["8361", "\uAE1D", 18, "\uAE32\uAE33\uAE35\uAE36\uAE39\uAE3B\uAE3C"], + ["8381", "\uAE3D\uAE3E\uAE3F\uAE42\uAE44\uAE47\uAE48\uAE49\uAE4B\uAE4F\uAE51\uAE52\uAE53\uAE55\uAE57", 4, "\uAE5E\uAE62\uAE63\uAE64\uAE66\uAE67\uAE6A\uAE6B\uAE6D\uAE6E\uAE6F\uAE71", 6, "\uAE7A\uAE7E", 5, "\uAE86", 5, "\uAE8D", 46, "\uAEBF\uAEC1\uAEC2\uAEC3\uAEC5", 6, "\uAECE\uAED2", 5, "\uAEDA\uAEDB\uAEDD", 8], + ["8441", "\uAEE6\uAEE7\uAEE9\uAEEA\uAEEC\uAEEE", 5, "\uAEF5\uAEF6\uAEF7\uAEF9\uAEFA\uAEFB\uAEFD", 8], + ["8461", "\uAF06\uAF09\uAF0A\uAF0B\uAF0C\uAF0E\uAF0F\uAF11", 18], + ["8481", "\uAF24", 7, "\uAF2E\uAF2F\uAF31\uAF33\uAF35", 6, "\uAF3E\uAF40\uAF44\uAF45\uAF46\uAF47\uAF4A", 5, "\uAF51", 10, "\uAF5E", 5, "\uAF66", 18, "\uAF7A", 5, "\uAF81\uAF82\uAF83\uAF85\uAF86\uAF87\uAF89", 6, "\uAF92\uAF93\uAF94\uAF96", 5, "\uAF9D", 26, "\uAFBA\uAFBB\uAFBD\uAFBE"], + ["8541", "\uAFBF\uAFC1", 5, "\uAFCA\uAFCC\uAFCF", 4, "\uAFD5", 6, "\uAFDD", 4], + ["8561", "\uAFE2", 5, "\uAFEA", 5, "\uAFF2\uAFF3\uAFF5\uAFF6\uAFF7\uAFF9", 6, "\uB002\uB003"], + ["8581", "\uB005", 6, "\uB00D\uB00E\uB00F\uB011\uB012\uB013\uB015", 6, "\uB01E", 9, "\uB029", 26, "\uB046\uB047\uB049\uB04B\uB04D\uB04F\uB050\uB051\uB052\uB056\uB058\uB05A\uB05B\uB05C\uB05E", 29, "\uB07E\uB07F\uB081\uB082\uB083\uB085", 6, "\uB08E\uB090\uB092", 5, "\uB09B\uB09D\uB09E\uB0A3\uB0A4"], + ["8641", "\uB0A5\uB0A6\uB0A7\uB0AA\uB0B0\uB0B2\uB0B6\uB0B7\uB0B9\uB0BA\uB0BB\uB0BD", 6, "\uB0C6\uB0CA", 5, "\uB0D2"], + ["8661", "\uB0D3\uB0D5\uB0D6\uB0D7\uB0D9", 6, "\uB0E1\uB0E2\uB0E3\uB0E4\uB0E6", 10], + ["8681", "\uB0F1", 22, "\uB10A\uB10D\uB10E\uB10F\uB111\uB114\uB115\uB116\uB117\uB11A\uB11E", 4, "\uB126\uB127\uB129\uB12A\uB12B\uB12D", 6, "\uB136\uB13A", 5, "\uB142\uB143\uB145\uB146\uB147\uB149", 6, "\uB152\uB153\uB156\uB157\uB159\uB15A\uB15B\uB15D\uB15E\uB15F\uB161", 22, "\uB17A\uB17B\uB17D\uB17E\uB17F\uB181\uB183", 4, "\uB18A\uB18C\uB18E\uB18F\uB190\uB191\uB195\uB196\uB197\uB199\uB19A\uB19B\uB19D"], + ["8741", "\uB19E", 9, "\uB1A9", 15], + ["8761", "\uB1B9", 18, "\uB1CD\uB1CE\uB1CF\uB1D1\uB1D2\uB1D3\uB1D5"], + ["8781", "\uB1D6", 5, "\uB1DE\uB1E0", 7, "\uB1EA\uB1EB\uB1ED\uB1EE\uB1EF\uB1F1", 7, "\uB1FA\uB1FC\uB1FE", 5, "\uB206\uB207\uB209\uB20A\uB20D", 6, "\uB216\uB218\uB21A", 5, "\uB221", 18, "\uB235", 6, "\uB23D", 26, "\uB259\uB25A\uB25B\uB25D\uB25E\uB25F\uB261", 6, "\uB26A", 4], + ["8841", "\uB26F", 4, "\uB276", 5, "\uB27D", 6, "\uB286\uB287\uB288\uB28A", 4], + ["8861", "\uB28F\uB292\uB293\uB295\uB296\uB297\uB29B", 4, "\uB2A2\uB2A4\uB2A7\uB2A8\uB2A9\uB2AB\uB2AD\uB2AE\uB2AF\uB2B1\uB2B2\uB2B3\uB2B5\uB2B6\uB2B7"], + ["8881", "\uB2B8", 15, "\uB2CA\uB2CB\uB2CD\uB2CE\uB2CF\uB2D1\uB2D3", 4, "\uB2DA\uB2DC\uB2DE\uB2DF\uB2E0\uB2E1\uB2E3\uB2E7\uB2E9\uB2EA\uB2F0\uB2F1\uB2F2\uB2F6\uB2FC\uB2FD\uB2FE\uB302\uB303\uB305\uB306\uB307\uB309", 6, "\uB312\uB316", 5, "\uB31D", 54, "\uB357\uB359\uB35A\uB35D\uB360\uB361\uB362\uB363"], + ["8941", "\uB366\uB368\uB36A\uB36C\uB36D\uB36F\uB372\uB373\uB375\uB376\uB377\uB379", 6, "\uB382\uB386", 5, "\uB38D"], + ["8961", "\uB38E\uB38F\uB391\uB392\uB393\uB395", 10, "\uB3A2", 5, "\uB3A9\uB3AA\uB3AB\uB3AD"], + ["8981", "\uB3AE", 21, "\uB3C6\uB3C7\uB3C9\uB3CA\uB3CD\uB3CF\uB3D1\uB3D2\uB3D3\uB3D6\uB3D8\uB3DA\uB3DC\uB3DE\uB3DF\uB3E1\uB3E2\uB3E3\uB3E5\uB3E6\uB3E7\uB3E9", 18, "\uB3FD", 18, "\uB411", 6, "\uB419\uB41A\uB41B\uB41D\uB41E\uB41F\uB421", 6, "\uB42A\uB42C", 7, "\uB435", 15], + ["8a41", "\uB445", 10, "\uB452\uB453\uB455\uB456\uB457\uB459", 6, "\uB462\uB464\uB466"], + ["8a61", "\uB467", 4, "\uB46D", 18, "\uB481\uB482"], + ["8a81", "\uB483", 4, "\uB489", 19, "\uB49E", 5, "\uB4A5\uB4A6\uB4A7\uB4A9\uB4AA\uB4AB\uB4AD", 7, "\uB4B6\uB4B8\uB4BA", 5, "\uB4C1\uB4C2\uB4C3\uB4C5\uB4C6\uB4C7\uB4C9", 6, "\uB4D1\uB4D2\uB4D3\uB4D4\uB4D6", 5, "\uB4DE\uB4DF\uB4E1\uB4E2\uB4E5\uB4E7", 4, "\uB4EE\uB4F0\uB4F2", 5, "\uB4F9", 26, "\uB516\uB517\uB519\uB51A\uB51D"], + ["8b41", "\uB51E", 5, "\uB526\uB52B", 4, "\uB532\uB533\uB535\uB536\uB537\uB539", 6, "\uB542\uB546"], + ["8b61", "\uB547\uB548\uB549\uB54A\uB54E\uB54F\uB551\uB552\uB553\uB555", 6, "\uB55E\uB562", 8], + ["8b81", "\uB56B", 52, "\uB5A2\uB5A3\uB5A5\uB5A6\uB5A7\uB5A9\uB5AC\uB5AD\uB5AE\uB5AF\uB5B2\uB5B6", 4, "\uB5BE\uB5BF\uB5C1\uB5C2\uB5C3\uB5C5", 6, "\uB5CE\uB5D2", 5, "\uB5D9", 18, "\uB5ED", 18], + ["8c41", "\uB600", 15, "\uB612\uB613\uB615\uB616\uB617\uB619", 4], + ["8c61", "\uB61E", 6, "\uB626", 5, "\uB62D", 6, "\uB635", 5], + ["8c81", "\uB63B", 12, "\uB649", 26, "\uB665\uB666\uB667\uB669", 50, "\uB69E\uB69F\uB6A1\uB6A2\uB6A3\uB6A5", 5, "\uB6AD\uB6AE\uB6AF\uB6B0\uB6B2", 16], + ["8d41", "\uB6C3", 16, "\uB6D5", 8], + ["8d61", "\uB6DE", 17, "\uB6F1\uB6F2\uB6F3\uB6F5\uB6F6\uB6F7\uB6F9\uB6FA"], + ["8d81", "\uB6FB", 4, "\uB702\uB703\uB704\uB706", 33, "\uB72A\uB72B\uB72D\uB72E\uB731", 6, "\uB73A\uB73C", 7, "\uB745\uB746\uB747\uB749\uB74A\uB74B\uB74D", 6, "\uB756", 9, "\uB761\uB762\uB763\uB765\uB766\uB767\uB769", 6, "\uB772\uB774\uB776", 5, "\uB77E\uB77F\uB781\uB782\uB783\uB785", 6, "\uB78E\uB793\uB794\uB795\uB79A\uB79B\uB79D\uB79E"], + ["8e41", "\uB79F\uB7A1", 6, "\uB7AA\uB7AE", 5, "\uB7B6\uB7B7\uB7B9", 8], + ["8e61", "\uB7C2", 4, "\uB7C8\uB7CA", 19], + ["8e81", "\uB7DE", 13, "\uB7EE\uB7EF\uB7F1\uB7F2\uB7F3\uB7F5", 6, "\uB7FE\uB802", 4, "\uB80A\uB80B\uB80D\uB80E\uB80F\uB811", 6, "\uB81A\uB81C\uB81E", 5, "\uB826\uB827\uB829\uB82A\uB82B\uB82D", 6, "\uB836\uB83A", 5, "\uB841\uB842\uB843\uB845", 11, "\uB852\uB854", 7, "\uB85E\uB85F\uB861\uB862\uB863\uB865", 6, "\uB86E\uB870\uB872", 5, "\uB879\uB87A\uB87B\uB87D", 7], + ["8f41", "\uB885", 7, "\uB88E", 17], + ["8f61", "\uB8A0", 7, "\uB8A9", 6, "\uB8B1\uB8B2\uB8B3\uB8B5\uB8B6\uB8B7\uB8B9", 4], + ["8f81", "\uB8BE\uB8BF\uB8C2\uB8C4\uB8C6", 5, "\uB8CD\uB8CE\uB8CF\uB8D1\uB8D2\uB8D3\uB8D5", 7, "\uB8DE\uB8E0\uB8E2", 5, "\uB8EA\uB8EB\uB8ED\uB8EE\uB8EF\uB8F1", 6, "\uB8FA\uB8FC\uB8FE", 5, "\uB905", 18, "\uB919", 6, "\uB921", 26, "\uB93E\uB93F\uB941\uB942\uB943\uB945", 6, "\uB94D\uB94E\uB950\uB952", 5], + ["9041", "\uB95A\uB95B\uB95D\uB95E\uB95F\uB961", 6, "\uB96A\uB96C\uB96E", 5, "\uB976\uB977\uB979\uB97A\uB97B\uB97D"], + ["9061", "\uB97E", 5, "\uB986\uB988\uB98B\uB98C\uB98F", 15], + ["9081", "\uB99F", 12, "\uB9AE\uB9AF\uB9B1\uB9B2\uB9B3\uB9B5", 6, "\uB9BE\uB9C0\uB9C2", 5, "\uB9CA\uB9CB\uB9CD\uB9D3", 4, "\uB9DA\uB9DC\uB9DF\uB9E0\uB9E2\uB9E6\uB9E7\uB9E9\uB9EA\uB9EB\uB9ED", 6, "\uB9F6\uB9FB", 4, "\uBA02", 5, "\uBA09", 11, "\uBA16", 33, "\uBA3A\uBA3B\uBA3D\uBA3E\uBA3F\uBA41\uBA43\uBA44\uBA45\uBA46"], + ["9141", "\uBA47\uBA4A\uBA4C\uBA4F\uBA50\uBA51\uBA52\uBA56\uBA57\uBA59\uBA5A\uBA5B\uBA5D", 6, "\uBA66\uBA6A", 5], + ["9161", "\uBA72\uBA73\uBA75\uBA76\uBA77\uBA79", 9, "\uBA86\uBA88\uBA89\uBA8A\uBA8B\uBA8D", 5], + ["9181", "\uBA93", 20, "\uBAAA\uBAAD\uBAAE\uBAAF\uBAB1\uBAB3", 4, "\uBABA\uBABC\uBABE", 5, "\uBAC5\uBAC6\uBAC7\uBAC9", 14, "\uBADA", 33, "\uBAFD\uBAFE\uBAFF\uBB01\uBB02\uBB03\uBB05", 7, "\uBB0E\uBB10\uBB12", 5, "\uBB19\uBB1A\uBB1B\uBB1D\uBB1E\uBB1F\uBB21", 6], + ["9241", "\uBB28\uBB2A\uBB2C", 7, "\uBB37\uBB39\uBB3A\uBB3F", 4, "\uBB46\uBB48\uBB4A\uBB4B\uBB4C\uBB4E\uBB51\uBB52"], + ["9261", "\uBB53\uBB55\uBB56\uBB57\uBB59", 7, "\uBB62\uBB64", 7, "\uBB6D", 4], + ["9281", "\uBB72", 21, "\uBB89\uBB8A\uBB8B\uBB8D\uBB8E\uBB8F\uBB91", 18, "\uBBA5\uBBA6\uBBA7\uBBA9\uBBAA\uBBAB\uBBAD", 6, "\uBBB5\uBBB6\uBBB8", 7, "\uBBC1\uBBC2\uBBC3\uBBC5\uBBC6\uBBC7\uBBC9", 6, "\uBBD1\uBBD2\uBBD4", 35, "\uBBFA\uBBFB\uBBFD\uBBFE\uBC01"], + ["9341", "\uBC03", 4, "\uBC0A\uBC0E\uBC10\uBC12\uBC13\uBC19\uBC1A\uBC20\uBC21\uBC22\uBC23\uBC26\uBC28\uBC2A\uBC2B\uBC2C\uBC2E\uBC2F\uBC32\uBC33\uBC35"], + ["9361", "\uBC36\uBC37\uBC39", 6, "\uBC42\uBC46\uBC47\uBC48\uBC4A\uBC4B\uBC4E\uBC4F\uBC51", 8], + ["9381", "\uBC5A\uBC5B\uBC5C\uBC5E", 37, "\uBC86\uBC87\uBC89\uBC8A\uBC8D\uBC8F", 4, "\uBC96\uBC98\uBC9B", 4, "\uBCA2\uBCA3\uBCA5\uBCA6\uBCA9", 6, "\uBCB2\uBCB6", 5, "\uBCBE\uBCBF\uBCC1\uBCC2\uBCC3\uBCC5", 7, "\uBCCE\uBCD2\uBCD3\uBCD4\uBCD6\uBCD7\uBCD9\uBCDA\uBCDB\uBCDD", 22, "\uBCF7\uBCF9\uBCFA\uBCFB\uBCFD"], + ["9441", "\uBCFE", 5, "\uBD06\uBD08\uBD0A", 5, "\uBD11\uBD12\uBD13\uBD15", 8], + ["9461", "\uBD1E", 5, "\uBD25", 6, "\uBD2D", 12], + ["9481", "\uBD3A", 5, "\uBD41", 6, "\uBD4A\uBD4B\uBD4D\uBD4E\uBD4F\uBD51", 6, "\uBD5A", 9, "\uBD65\uBD66\uBD67\uBD69", 22, "\uBD82\uBD83\uBD85\uBD86\uBD8B", 4, "\uBD92\uBD94\uBD96\uBD97\uBD98\uBD9B\uBD9D", 6, "\uBDA5", 10, "\uBDB1", 6, "\uBDB9", 24], + ["9541", "\uBDD2\uBDD3\uBDD6\uBDD7\uBDD9\uBDDA\uBDDB\uBDDD", 11, "\uBDEA", 5, "\uBDF1"], + ["9561", "\uBDF2\uBDF3\uBDF5\uBDF6\uBDF7\uBDF9", 6, "\uBE01\uBE02\uBE04\uBE06", 5, "\uBE0E\uBE0F\uBE11\uBE12\uBE13"], + ["9581", "\uBE15", 6, "\uBE1E\uBE20", 35, "\uBE46\uBE47\uBE49\uBE4A\uBE4B\uBE4D\uBE4F", 4, "\uBE56\uBE58\uBE5C\uBE5D\uBE5E\uBE5F\uBE62\uBE63\uBE65\uBE66\uBE67\uBE69\uBE6B", 4, "\uBE72\uBE76", 4, "\uBE7E\uBE7F\uBE81\uBE82\uBE83\uBE85", 6, "\uBE8E\uBE92", 5, "\uBE9A", 13, "\uBEA9", 14], + ["9641", "\uBEB8", 23, "\uBED2\uBED3"], + ["9661", "\uBED5\uBED6\uBED9", 6, "\uBEE1\uBEE2\uBEE6", 5, "\uBEED", 8], + ["9681", "\uBEF6", 10, "\uBF02", 5, "\uBF0A", 13, "\uBF1A\uBF1E", 33, "\uBF42\uBF43\uBF45\uBF46\uBF47\uBF49", 6, "\uBF52\uBF53\uBF54\uBF56", 44], + ["9741", "\uBF83", 16, "\uBF95", 8], + ["9761", "\uBF9E", 17, "\uBFB1", 7], + ["9781", "\uBFB9", 11, "\uBFC6", 5, "\uBFCE\uBFCF\uBFD1\uBFD2\uBFD3\uBFD5", 6, "\uBFDD\uBFDE\uBFE0\uBFE2", 89, "\uC03D\uC03E\uC03F"], + ["9841", "\uC040", 16, "\uC052", 5, "\uC059\uC05A\uC05B"], + ["9861", "\uC05D\uC05E\uC05F\uC061", 6, "\uC06A", 15], + ["9881", "\uC07A", 21, "\uC092\uC093\uC095\uC096\uC097\uC099", 6, "\uC0A2\uC0A4\uC0A6", 5, "\uC0AE\uC0B1\uC0B2\uC0B7", 4, "\uC0BE\uC0C2\uC0C3\uC0C4\uC0C6\uC0C7\uC0CA\uC0CB\uC0CD\uC0CE\uC0CF\uC0D1", 6, "\uC0DA\uC0DE", 5, "\uC0E6\uC0E7\uC0E9\uC0EA\uC0EB\uC0ED", 6, "\uC0F6\uC0F8\uC0FA", 5, "\uC101\uC102\uC103\uC105\uC106\uC107\uC109", 6, "\uC111\uC112\uC113\uC114\uC116", 5, "\uC121\uC122\uC125\uC128\uC129\uC12A\uC12B\uC12E"], + ["9941", "\uC132\uC133\uC134\uC135\uC137\uC13A\uC13B\uC13D\uC13E\uC13F\uC141", 6, "\uC14A\uC14E", 5, "\uC156\uC157"], + ["9961", "\uC159\uC15A\uC15B\uC15D", 6, "\uC166\uC16A", 5, "\uC171\uC172\uC173\uC175\uC176\uC177\uC179\uC17A\uC17B"], + ["9981", "\uC17C", 8, "\uC186", 5, "\uC18F\uC191\uC192\uC193\uC195\uC197", 4, "\uC19E\uC1A0\uC1A2\uC1A3\uC1A4\uC1A6\uC1A7\uC1AA\uC1AB\uC1AD\uC1AE\uC1AF\uC1B1", 11, "\uC1BE", 5, "\uC1C5\uC1C6\uC1C7\uC1C9\uC1CA\uC1CB\uC1CD", 6, "\uC1D5\uC1D6\uC1D9", 6, "\uC1E1\uC1E2\uC1E3\uC1E5\uC1E6\uC1E7\uC1E9", 6, "\uC1F2\uC1F4", 7, "\uC1FE\uC1FF\uC201\uC202\uC203\uC205", 6, "\uC20E\uC210\uC212", 5, "\uC21A\uC21B\uC21D\uC21E\uC221\uC222\uC223"], + ["9a41", "\uC224\uC225\uC226\uC227\uC22A\uC22C\uC22E\uC230\uC233\uC235", 16], + ["9a61", "\uC246\uC247\uC249", 6, "\uC252\uC253\uC255\uC256\uC257\uC259", 6, "\uC261\uC262\uC263\uC264\uC266"], + ["9a81", "\uC267", 4, "\uC26E\uC26F\uC271\uC272\uC273\uC275", 6, "\uC27E\uC280\uC282", 5, "\uC28A", 5, "\uC291", 6, "\uC299\uC29A\uC29C\uC29E", 5, "\uC2A6\uC2A7\uC2A9\uC2AA\uC2AB\uC2AE", 5, "\uC2B6\uC2B8\uC2BA", 33, "\uC2DE\uC2DF\uC2E1\uC2E2\uC2E5", 5, "\uC2EE\uC2F0\uC2F2\uC2F3\uC2F4\uC2F5\uC2F7\uC2FA\uC2FD\uC2FE\uC2FF\uC301", 6, "\uC30A\uC30B\uC30E\uC30F"], + ["9b41", "\uC310\uC311\uC312\uC316\uC317\uC319\uC31A\uC31B\uC31D", 6, "\uC326\uC327\uC32A", 8], + ["9b61", "\uC333", 17, "\uC346", 7], + ["9b81", "\uC34E", 25, "\uC36A\uC36B\uC36D\uC36E\uC36F\uC371\uC373", 4, "\uC37A\uC37B\uC37E", 5, "\uC385\uC386\uC387\uC389\uC38A\uC38B\uC38D", 50, "\uC3C1", 22, "\uC3DA"], + ["9c41", "\uC3DB\uC3DD\uC3DE\uC3E1\uC3E3", 4, "\uC3EA\uC3EB\uC3EC\uC3EE", 5, "\uC3F6\uC3F7\uC3F9", 5], + ["9c61", "\uC3FF", 8, "\uC409", 6, "\uC411", 9], + ["9c81", "\uC41B", 8, "\uC425", 6, "\uC42D\uC42E\uC42F\uC431\uC432\uC433\uC435", 6, "\uC43E", 9, "\uC449", 26, "\uC466\uC467\uC469\uC46A\uC46B\uC46D", 6, "\uC476\uC477\uC478\uC47A", 5, "\uC481", 18, "\uC495", 6, "\uC49D", 12], + ["9d41", "\uC4AA", 13, "\uC4B9\uC4BA\uC4BB\uC4BD", 8], + ["9d61", "\uC4C6", 25], + ["9d81", "\uC4E0", 8, "\uC4EA", 5, "\uC4F2\uC4F3\uC4F5\uC4F6\uC4F7\uC4F9\uC4FB\uC4FC\uC4FD\uC4FE\uC502", 9, "\uC50D\uC50E\uC50F\uC511\uC512\uC513\uC515", 6, "\uC51D", 10, "\uC52A\uC52B\uC52D\uC52E\uC52F\uC531", 6, "\uC53A\uC53C\uC53E", 5, "\uC546\uC547\uC54B\uC54F\uC550\uC551\uC552\uC556\uC55A\uC55B\uC55C\uC55F\uC562\uC563\uC565\uC566\uC567\uC569", 6, "\uC572\uC576", 5, "\uC57E\uC57F\uC581\uC582\uC583\uC585\uC586\uC588\uC589\uC58A\uC58B\uC58E\uC590\uC592\uC593\uC594"], + ["9e41", "\uC596\uC599\uC59A\uC59B\uC59D\uC59E\uC59F\uC5A1", 7, "\uC5AA", 9, "\uC5B6"], + ["9e61", "\uC5B7\uC5BA\uC5BF", 4, "\uC5CB\uC5CD\uC5CF\uC5D2\uC5D3\uC5D5\uC5D6\uC5D7\uC5D9", 6, "\uC5E2\uC5E4\uC5E6\uC5E7"], + ["9e81", "\uC5E8\uC5E9\uC5EA\uC5EB\uC5EF\uC5F1\uC5F2\uC5F3\uC5F5\uC5F8\uC5F9\uC5FA\uC5FB\uC602\uC603\uC604\uC609\uC60A\uC60B\uC60D\uC60E\uC60F\uC611", 6, "\uC61A\uC61D", 6, "\uC626\uC627\uC629\uC62A\uC62B\uC62F\uC631\uC632\uC636\uC638\uC63A\uC63C\uC63D\uC63E\uC63F\uC642\uC643\uC645\uC646\uC647\uC649", 6, "\uC652\uC656", 5, "\uC65E\uC65F\uC661", 10, "\uC66D\uC66E\uC670\uC672", 5, "\uC67A\uC67B\uC67D\uC67E\uC67F\uC681", 6, "\uC68A\uC68C\uC68E", 5, "\uC696\uC697\uC699\uC69A\uC69B\uC69D", 6, "\uC6A6"], + ["9f41", "\uC6A8\uC6AA", 5, "\uC6B2\uC6B3\uC6B5\uC6B6\uC6B7\uC6BB", 4, "\uC6C2\uC6C4\uC6C6", 5, "\uC6CE"], + ["9f61", "\uC6CF\uC6D1\uC6D2\uC6D3\uC6D5", 6, "\uC6DE\uC6DF\uC6E2", 5, "\uC6EA\uC6EB\uC6ED\uC6EE\uC6EF\uC6F1\uC6F2"], + ["9f81", "\uC6F3", 4, "\uC6FA\uC6FB\uC6FC\uC6FE", 5, "\uC706\uC707\uC709\uC70A\uC70B\uC70D", 6, "\uC716\uC718\uC71A", 5, "\uC722\uC723\uC725\uC726\uC727\uC729", 6, "\uC732\uC734\uC736\uC738\uC739\uC73A\uC73B\uC73E\uC73F\uC741\uC742\uC743\uC745", 4, "\uC74B\uC74E\uC750\uC759\uC75A\uC75B\uC75D\uC75E\uC75F\uC761", 6, "\uC769\uC76A\uC76C", 7, "\uC776\uC777\uC779\uC77A\uC77B\uC77F\uC780\uC781\uC782\uC786\uC78B\uC78C\uC78D\uC78F\uC792\uC793\uC795\uC799\uC79B", 4, "\uC7A2\uC7A7", 4, "\uC7AE\uC7AF\uC7B1\uC7B2\uC7B3\uC7B5\uC7B6\uC7B7"], + ["a041", "\uC7B8\uC7B9\uC7BA\uC7BB\uC7BE\uC7C2", 5, "\uC7CA\uC7CB\uC7CD\uC7CF\uC7D1", 6, "\uC7D9\uC7DA\uC7DB\uC7DC"], + ["a061", "\uC7DE", 5, "\uC7E5\uC7E6\uC7E7\uC7E9\uC7EA\uC7EB\uC7ED", 13], + ["a081", "\uC7FB", 4, "\uC802\uC803\uC805\uC806\uC807\uC809\uC80B", 4, "\uC812\uC814\uC817", 4, "\uC81E\uC81F\uC821\uC822\uC823\uC825", 6, "\uC82E\uC830\uC832", 5, "\uC839\uC83A\uC83B\uC83D\uC83E\uC83F\uC841", 6, "\uC84A\uC84B\uC84E", 5, "\uC855", 26, "\uC872\uC873\uC875\uC876\uC877\uC879\uC87B", 4, "\uC882\uC884\uC888\uC889\uC88A\uC88E", 5, "\uC895", 7, "\uC89E\uC8A0\uC8A2\uC8A3\uC8A4"], + ["a141", "\uC8A5\uC8A6\uC8A7\uC8A9", 18, "\uC8BE\uC8BF\uC8C0\uC8C1"], + ["a161", "\uC8C2\uC8C3\uC8C5\uC8C6\uC8C7\uC8C9\uC8CA\uC8CB\uC8CD", 6, "\uC8D6\uC8D8\uC8DA", 5, "\uC8E2\uC8E3\uC8E5"], + ["a181", "\uC8E6", 14, "\uC8F6", 5, "\uC8FE\uC8FF\uC901\uC902\uC903\uC907", 4, "\uC90E\u3000\u3001\u3002\xB7\u2025\u2026\xA8\u3003\xAD\u2015\u2225\uFF3C\u223C\u2018\u2019\u201C\u201D\u3014\u3015\u3008", 9, "\xB1\xD7\xF7\u2260\u2264\u2265\u221E\u2234\xB0\u2032\u2033\u2103\u212B\uFFE0\uFFE1\uFFE5\u2642\u2640\u2220\u22A5\u2312\u2202\u2207\u2261\u2252\xA7\u203B\u2606\u2605\u25CB\u25CF\u25CE\u25C7\u25C6\u25A1\u25A0\u25B3\u25B2\u25BD\u25BC\u2192\u2190\u2191\u2193\u2194\u3013\u226A\u226B\u221A\u223D\u221D\u2235\u222B\u222C\u2208\u220B\u2286\u2287\u2282\u2283\u222A\u2229\u2227\u2228\uFFE2"], + ["a241", "\uC910\uC912", 5, "\uC919", 18], + ["a261", "\uC92D", 6, "\uC935", 18], + ["a281", "\uC948", 7, "\uC952\uC953\uC955\uC956\uC957\uC959", 6, "\uC962\uC964", 7, "\uC96D\uC96E\uC96F\u21D2\u21D4\u2200\u2203\xB4\uFF5E\u02C7\u02D8\u02DD\u02DA\u02D9\xB8\u02DB\xA1\xBF\u02D0\u222E\u2211\u220F\xA4\u2109\u2030\u25C1\u25C0\u25B7\u25B6\u2664\u2660\u2661\u2665\u2667\u2663\u2299\u25C8\u25A3\u25D0\u25D1\u2592\u25A4\u25A5\u25A8\u25A7\u25A6\u25A9\u2668\u260F\u260E\u261C\u261E\xB6\u2020\u2021\u2195\u2197\u2199\u2196\u2198\u266D\u2669\u266A\u266C\u327F\u321C\u2116\u33C7\u2122\u33C2\u33D8\u2121\u20AC\xAE"], + ["a341", "\uC971\uC972\uC973\uC975", 6, "\uC97D", 10, "\uC98A\uC98B\uC98D\uC98E\uC98F"], + ["a361", "\uC991", 6, "\uC99A\uC99C\uC99E", 16], + ["a381", "\uC9AF", 16, "\uC9C2\uC9C3\uC9C5\uC9C6\uC9C9\uC9CB", 4, "\uC9D2\uC9D4\uC9D7\uC9D8\uC9DB\uFF01", 58, "\uFFE6\uFF3D", 32, "\uFFE3"], + ["a441", "\uC9DE\uC9DF\uC9E1\uC9E3\uC9E5\uC9E6\uC9E8\uC9E9\uC9EA\uC9EB\uC9EE\uC9F2", 5, "\uC9FA\uC9FB\uC9FD\uC9FE\uC9FF\uCA01\uCA02\uCA03\uCA04"], + ["a461", "\uCA05\uCA06\uCA07\uCA0A\uCA0E", 5, "\uCA15\uCA16\uCA17\uCA19", 12], + ["a481", "\uCA26\uCA27\uCA28\uCA2A", 28, "\u3131", 93], + ["a541", "\uCA47", 4, "\uCA4E\uCA4F\uCA51\uCA52\uCA53\uCA55", 6, "\uCA5E\uCA62", 5, "\uCA69\uCA6A"], + ["a561", "\uCA6B", 17, "\uCA7E", 5, "\uCA85\uCA86"], + ["a581", "\uCA87", 16, "\uCA99", 14, "\u2170", 9], + ["a5b0", "\u2160", 9], + ["a5c1", "\u0391", 16, "\u03A3", 6], + ["a5e1", "\u03B1", 16, "\u03C3", 6], + ["a641", "\uCAA8", 19, "\uCABE\uCABF\uCAC1\uCAC2\uCAC3\uCAC5"], + ["a661", "\uCAC6", 5, "\uCACE\uCAD0\uCAD2\uCAD4\uCAD5\uCAD6\uCAD7\uCADA", 5, "\uCAE1", 6], + ["a681", "\uCAE8\uCAE9\uCAEA\uCAEB\uCAED", 6, "\uCAF5", 18, "\uCB09\uCB0A\u2500\u2502\u250C\u2510\u2518\u2514\u251C\u252C\u2524\u2534\u253C\u2501\u2503\u250F\u2513\u251B\u2517\u2523\u2533\u252B\u253B\u254B\u2520\u252F\u2528\u2537\u253F\u251D\u2530\u2525\u2538\u2542\u2512\u2511\u251A\u2519\u2516\u2515\u250E\u250D\u251E\u251F\u2521\u2522\u2526\u2527\u2529\u252A\u252D\u252E\u2531\u2532\u2535\u2536\u2539\u253A\u253D\u253E\u2540\u2541\u2543", 7], + ["a741", "\uCB0B", 4, "\uCB11\uCB12\uCB13\uCB15\uCB16\uCB17\uCB19", 6, "\uCB22", 7], + ["a761", "\uCB2A", 22, "\uCB42\uCB43\uCB44"], + ["a781", "\uCB45\uCB46\uCB47\uCB4A\uCB4B\uCB4D\uCB4E\uCB4F\uCB51", 6, "\uCB5A\uCB5B\uCB5C\uCB5E", 5, "\uCB65", 7, "\u3395\u3396\u3397\u2113\u3398\u33C4\u33A3\u33A4\u33A5\u33A6\u3399", 9, "\u33CA\u338D\u338E\u338F\u33CF\u3388\u3389\u33C8\u33A7\u33A8\u33B0", 9, "\u3380", 4, "\u33BA", 5, "\u3390", 4, "\u2126\u33C0\u33C1\u338A\u338B\u338C\u33D6\u33C5\u33AD\u33AE\u33AF\u33DB\u33A9\u33AA\u33AB\u33AC\u33DD\u33D0\u33D3\u33C3\u33C9\u33DC\u33C6"], + ["a841", "\uCB6D", 10, "\uCB7A", 14], + ["a861", "\uCB89", 18, "\uCB9D", 6], + ["a881", "\uCBA4", 19, "\uCBB9", 11, "\xC6\xD0\xAA\u0126"], + ["a8a6", "\u0132"], + ["a8a8", "\u013F\u0141\xD8\u0152\xBA\xDE\u0166\u014A"], + ["a8b1", "\u3260", 27, "\u24D0", 25, "\u2460", 14, "\xBD\u2153\u2154\xBC\xBE\u215B\u215C\u215D\u215E"], + ["a941", "\uCBC5", 14, "\uCBD5", 10], + ["a961", "\uCBE0\uCBE1\uCBE2\uCBE3\uCBE5\uCBE6\uCBE8\uCBEA", 18], + ["a981", "\uCBFD", 14, "\uCC0E\uCC0F\uCC11\uCC12\uCC13\uCC15", 6, "\uCC1E\uCC1F\uCC20\uCC23\uCC24\xE6\u0111\xF0\u0127\u0131\u0133\u0138\u0140\u0142\xF8\u0153\xDF\xFE\u0167\u014B\u0149\u3200", 27, "\u249C", 25, "\u2474", 14, "\xB9\xB2\xB3\u2074\u207F\u2081\u2082\u2083\u2084"], + ["aa41", "\uCC25\uCC26\uCC2A\uCC2B\uCC2D\uCC2F\uCC31", 6, "\uCC3A\uCC3F", 4, "\uCC46\uCC47\uCC49\uCC4A\uCC4B\uCC4D\uCC4E"], + ["aa61", "\uCC4F", 4, "\uCC56\uCC5A", 5, "\uCC61\uCC62\uCC63\uCC65\uCC67\uCC69", 6, "\uCC71\uCC72"], + ["aa81", "\uCC73\uCC74\uCC76", 29, "\u3041", 82], + ["ab41", "\uCC94\uCC95\uCC96\uCC97\uCC9A\uCC9B\uCC9D\uCC9E\uCC9F\uCCA1", 6, "\uCCAA\uCCAE", 5, "\uCCB6\uCCB7\uCCB9"], + ["ab61", "\uCCBA\uCCBB\uCCBD", 6, "\uCCC6\uCCC8\uCCCA", 5, "\uCCD1\uCCD2\uCCD3\uCCD5", 5], + ["ab81", "\uCCDB", 8, "\uCCE5", 6, "\uCCED\uCCEE\uCCEF\uCCF1", 12, "\u30A1", 85], + ["ac41", "\uCCFE\uCCFF\uCD00\uCD02", 5, "\uCD0A\uCD0B\uCD0D\uCD0E\uCD0F\uCD11", 6, "\uCD1A\uCD1C\uCD1E\uCD1F\uCD20"], + ["ac61", "\uCD21\uCD22\uCD23\uCD25\uCD26\uCD27\uCD29\uCD2A\uCD2B\uCD2D", 11, "\uCD3A", 4], + ["ac81", "\uCD3F", 28, "\uCD5D\uCD5E\uCD5F\u0410", 5, "\u0401\u0416", 25], + ["acd1", "\u0430", 5, "\u0451\u0436", 25], + ["ad41", "\uCD61\uCD62\uCD63\uCD65", 6, "\uCD6E\uCD70\uCD72", 5, "\uCD79", 7], + ["ad61", "\uCD81", 6, "\uCD89", 10, "\uCD96\uCD97\uCD99\uCD9A\uCD9B\uCD9D\uCD9E\uCD9F"], + ["ad81", "\uCDA0\uCDA1\uCDA2\uCDA3\uCDA6\uCDA8\uCDAA", 5, "\uCDB1", 18, "\uCDC5"], + ["ae41", "\uCDC6", 5, "\uCDCD\uCDCE\uCDCF\uCDD1", 16], + ["ae61", "\uCDE2", 5, "\uCDE9\uCDEA\uCDEB\uCDED\uCDEE\uCDEF\uCDF1", 6, "\uCDFA\uCDFC\uCDFE", 4], + ["ae81", "\uCE03\uCE05\uCE06\uCE07\uCE09\uCE0A\uCE0B\uCE0D", 6, "\uCE15\uCE16\uCE17\uCE18\uCE1A", 5, "\uCE22\uCE23\uCE25\uCE26\uCE27\uCE29\uCE2A\uCE2B"], + ["af41", "\uCE2C\uCE2D\uCE2E\uCE2F\uCE32\uCE34\uCE36", 19], + ["af61", "\uCE4A", 13, "\uCE5A\uCE5B\uCE5D\uCE5E\uCE62", 5, "\uCE6A\uCE6C"], + ["af81", "\uCE6E", 5, "\uCE76\uCE77\uCE79\uCE7A\uCE7B\uCE7D", 6, "\uCE86\uCE88\uCE8A", 5, "\uCE92\uCE93\uCE95\uCE96\uCE97\uCE99"], + ["b041", "\uCE9A", 5, "\uCEA2\uCEA6", 5, "\uCEAE", 12], + ["b061", "\uCEBB", 5, "\uCEC2", 19], + ["b081", "\uCED6", 13, "\uCEE6\uCEE7\uCEE9\uCEEA\uCEED", 6, "\uCEF6\uCEFA", 5, "\uAC00\uAC01\uAC04\uAC07\uAC08\uAC09\uAC0A\uAC10", 7, "\uAC19", 4, "\uAC20\uAC24\uAC2C\uAC2D\uAC2F\uAC30\uAC31\uAC38\uAC39\uAC3C\uAC40\uAC4B\uAC4D\uAC54\uAC58\uAC5C\uAC70\uAC71\uAC74\uAC77\uAC78\uAC7A\uAC80\uAC81\uAC83\uAC84\uAC85\uAC86\uAC89\uAC8A\uAC8B\uAC8C\uAC90\uAC94\uAC9C\uAC9D\uAC9F\uACA0\uACA1\uACA8\uACA9\uACAA\uACAC\uACAF\uACB0\uACB8\uACB9\uACBB\uACBC\uACBD\uACC1\uACC4\uACC8\uACCC\uACD5\uACD7\uACE0\uACE1\uACE4\uACE7\uACE8\uACEA\uACEC\uACEF\uACF0\uACF1\uACF3\uACF5\uACF6\uACFC\uACFD\uAD00\uAD04\uAD06"], + ["b141", "\uCF02\uCF03\uCF05\uCF06\uCF07\uCF09", 6, "\uCF12\uCF14\uCF16", 5, "\uCF1D\uCF1E\uCF1F\uCF21\uCF22\uCF23"], + ["b161", "\uCF25", 6, "\uCF2E\uCF32", 5, "\uCF39", 11], + ["b181", "\uCF45", 14, "\uCF56\uCF57\uCF59\uCF5A\uCF5B\uCF5D", 6, "\uCF66\uCF68\uCF6A\uCF6B\uCF6C\uAD0C\uAD0D\uAD0F\uAD11\uAD18\uAD1C\uAD20\uAD29\uAD2C\uAD2D\uAD34\uAD35\uAD38\uAD3C\uAD44\uAD45\uAD47\uAD49\uAD50\uAD54\uAD58\uAD61\uAD63\uAD6C\uAD6D\uAD70\uAD73\uAD74\uAD75\uAD76\uAD7B\uAD7C\uAD7D\uAD7F\uAD81\uAD82\uAD88\uAD89\uAD8C\uAD90\uAD9C\uAD9D\uADA4\uADB7\uADC0\uADC1\uADC4\uADC8\uADD0\uADD1\uADD3\uADDC\uADE0\uADE4\uADF8\uADF9\uADFC\uADFF\uAE00\uAE01\uAE08\uAE09\uAE0B\uAE0D\uAE14\uAE30\uAE31\uAE34\uAE37\uAE38\uAE3A\uAE40\uAE41\uAE43\uAE45\uAE46\uAE4A\uAE4C\uAE4D\uAE4E\uAE50\uAE54\uAE56\uAE5C\uAE5D\uAE5F\uAE60\uAE61\uAE65\uAE68\uAE69\uAE6C\uAE70\uAE78"], + ["b241", "\uCF6D\uCF6E\uCF6F\uCF72\uCF73\uCF75\uCF76\uCF77\uCF79", 6, "\uCF81\uCF82\uCF83\uCF84\uCF86", 5, "\uCF8D"], + ["b261", "\uCF8E", 18, "\uCFA2", 5, "\uCFA9"], + ["b281", "\uCFAA", 5, "\uCFB1", 18, "\uCFC5", 6, "\uAE79\uAE7B\uAE7C\uAE7D\uAE84\uAE85\uAE8C\uAEBC\uAEBD\uAEBE\uAEC0\uAEC4\uAECC\uAECD\uAECF\uAED0\uAED1\uAED8\uAED9\uAEDC\uAEE8\uAEEB\uAEED\uAEF4\uAEF8\uAEFC\uAF07\uAF08\uAF0D\uAF10\uAF2C\uAF2D\uAF30\uAF32\uAF34\uAF3C\uAF3D\uAF3F\uAF41\uAF42\uAF43\uAF48\uAF49\uAF50\uAF5C\uAF5D\uAF64\uAF65\uAF79\uAF80\uAF84\uAF88\uAF90\uAF91\uAF95\uAF9C\uAFB8\uAFB9\uAFBC\uAFC0\uAFC7\uAFC8\uAFC9\uAFCB\uAFCD\uAFCE\uAFD4\uAFDC\uAFE8\uAFE9\uAFF0\uAFF1\uAFF4\uAFF8\uB000\uB001\uB004\uB00C\uB010\uB014\uB01C\uB01D\uB028\uB044\uB045\uB048\uB04A\uB04C\uB04E\uB053\uB054\uB055\uB057\uB059"], + ["b341", "\uCFCC", 19, "\uCFE2\uCFE3\uCFE5\uCFE6\uCFE7\uCFE9"], + ["b361", "\uCFEA", 5, "\uCFF2\uCFF4\uCFF6", 5, "\uCFFD\uCFFE\uCFFF\uD001\uD002\uD003\uD005", 5], + ["b381", "\uD00B", 5, "\uD012", 5, "\uD019", 19, "\uB05D\uB07C\uB07D\uB080\uB084\uB08C\uB08D\uB08F\uB091\uB098\uB099\uB09A\uB09C\uB09F\uB0A0\uB0A1\uB0A2\uB0A8\uB0A9\uB0AB", 4, "\uB0B1\uB0B3\uB0B4\uB0B5\uB0B8\uB0BC\uB0C4\uB0C5\uB0C7\uB0C8\uB0C9\uB0D0\uB0D1\uB0D4\uB0D8\uB0E0\uB0E5\uB108\uB109\uB10B\uB10C\uB110\uB112\uB113\uB118\uB119\uB11B\uB11C\uB11D\uB123\uB124\uB125\uB128\uB12C\uB134\uB135\uB137\uB138\uB139\uB140\uB141\uB144\uB148\uB150\uB151\uB154\uB155\uB158\uB15C\uB160\uB178\uB179\uB17C\uB180\uB182\uB188\uB189\uB18B\uB18D\uB192\uB193\uB194\uB198\uB19C\uB1A8\uB1CC\uB1D0\uB1D4\uB1DC\uB1DD"], + ["b441", "\uD02E", 5, "\uD036\uD037\uD039\uD03A\uD03B\uD03D", 6, "\uD046\uD048\uD04A", 5], + ["b461", "\uD051\uD052\uD053\uD055\uD056\uD057\uD059", 6, "\uD061", 10, "\uD06E\uD06F"], + ["b481", "\uD071\uD072\uD073\uD075", 6, "\uD07E\uD07F\uD080\uD082", 18, "\uB1DF\uB1E8\uB1E9\uB1EC\uB1F0\uB1F9\uB1FB\uB1FD\uB204\uB205\uB208\uB20B\uB20C\uB214\uB215\uB217\uB219\uB220\uB234\uB23C\uB258\uB25C\uB260\uB268\uB269\uB274\uB275\uB27C\uB284\uB285\uB289\uB290\uB291\uB294\uB298\uB299\uB29A\uB2A0\uB2A1\uB2A3\uB2A5\uB2A6\uB2AA\uB2AC\uB2B0\uB2B4\uB2C8\uB2C9\uB2CC\uB2D0\uB2D2\uB2D8\uB2D9\uB2DB\uB2DD\uB2E2\uB2E4\uB2E5\uB2E6\uB2E8\uB2EB", 4, "\uB2F3\uB2F4\uB2F5\uB2F7", 4, "\uB2FF\uB300\uB301\uB304\uB308\uB310\uB311\uB313\uB314\uB315\uB31C\uB354\uB355\uB356\uB358\uB35B\uB35C\uB35E\uB35F\uB364\uB365"], + ["b541", "\uD095", 14, "\uD0A6\uD0A7\uD0A9\uD0AA\uD0AB\uD0AD", 5], + ["b561", "\uD0B3\uD0B6\uD0B8\uD0BA", 5, "\uD0C2\uD0C3\uD0C5\uD0C6\uD0C7\uD0CA", 5, "\uD0D2\uD0D6", 4], + ["b581", "\uD0DB\uD0DE\uD0DF\uD0E1\uD0E2\uD0E3\uD0E5", 6, "\uD0EE\uD0F2", 5, "\uD0F9", 11, "\uB367\uB369\uB36B\uB36E\uB370\uB371\uB374\uB378\uB380\uB381\uB383\uB384\uB385\uB38C\uB390\uB394\uB3A0\uB3A1\uB3A8\uB3AC\uB3C4\uB3C5\uB3C8\uB3CB\uB3CC\uB3CE\uB3D0\uB3D4\uB3D5\uB3D7\uB3D9\uB3DB\uB3DD\uB3E0\uB3E4\uB3E8\uB3FC\uB410\uB418\uB41C\uB420\uB428\uB429\uB42B\uB434\uB450\uB451\uB454\uB458\uB460\uB461\uB463\uB465\uB46C\uB480\uB488\uB49D\uB4A4\uB4A8\uB4AC\uB4B5\uB4B7\uB4B9\uB4C0\uB4C4\uB4C8\uB4D0\uB4D5\uB4DC\uB4DD\uB4E0\uB4E3\uB4E4\uB4E6\uB4EC\uB4ED\uB4EF\uB4F1\uB4F8\uB514\uB515\uB518\uB51B\uB51C\uB524\uB525\uB527\uB528\uB529\uB52A\uB530\uB531\uB534\uB538"], + ["b641", "\uD105", 7, "\uD10E", 17], + ["b661", "\uD120", 15, "\uD132\uD133\uD135\uD136\uD137\uD139\uD13B\uD13C\uD13D\uD13E"], + ["b681", "\uD13F\uD142\uD146", 5, "\uD14E\uD14F\uD151\uD152\uD153\uD155", 6, "\uD15E\uD160\uD162", 5, "\uD169\uD16A\uD16B\uD16D\uB540\uB541\uB543\uB544\uB545\uB54B\uB54C\uB54D\uB550\uB554\uB55C\uB55D\uB55F\uB560\uB561\uB5A0\uB5A1\uB5A4\uB5A8\uB5AA\uB5AB\uB5B0\uB5B1\uB5B3\uB5B4\uB5B5\uB5BB\uB5BC\uB5BD\uB5C0\uB5C4\uB5CC\uB5CD\uB5CF\uB5D0\uB5D1\uB5D8\uB5EC\uB610\uB611\uB614\uB618\uB625\uB62C\uB634\uB648\uB664\uB668\uB69C\uB69D\uB6A0\uB6A4\uB6AB\uB6AC\uB6B1\uB6D4\uB6F0\uB6F4\uB6F8\uB700\uB701\uB705\uB728\uB729\uB72C\uB72F\uB730\uB738\uB739\uB73B\uB744\uB748\uB74C\uB754\uB755\uB760\uB764\uB768\uB770\uB771\uB773\uB775\uB77C\uB77D\uB780\uB784\uB78C\uB78D\uB78F\uB790\uB791\uB792\uB796\uB797"], + ["b741", "\uD16E", 13, "\uD17D", 6, "\uD185\uD186\uD187\uD189\uD18A"], + ["b761", "\uD18B", 20, "\uD1A2\uD1A3\uD1A5\uD1A6\uD1A7"], + ["b781", "\uD1A9", 6, "\uD1B2\uD1B4\uD1B6\uD1B7\uD1B8\uD1B9\uD1BB\uD1BD\uD1BE\uD1BF\uD1C1", 14, "\uB798\uB799\uB79C\uB7A0\uB7A8\uB7A9\uB7AB\uB7AC\uB7AD\uB7B4\uB7B5\uB7B8\uB7C7\uB7C9\uB7EC\uB7ED\uB7F0\uB7F4\uB7FC\uB7FD\uB7FF\uB800\uB801\uB807\uB808\uB809\uB80C\uB810\uB818\uB819\uB81B\uB81D\uB824\uB825\uB828\uB82C\uB834\uB835\uB837\uB838\uB839\uB840\uB844\uB851\uB853\uB85C\uB85D\uB860\uB864\uB86C\uB86D\uB86F\uB871\uB878\uB87C\uB88D\uB8A8\uB8B0\uB8B4\uB8B8\uB8C0\uB8C1\uB8C3\uB8C5\uB8CC\uB8D0\uB8D4\uB8DD\uB8DF\uB8E1\uB8E8\uB8E9\uB8EC\uB8F0\uB8F8\uB8F9\uB8FB\uB8FD\uB904\uB918\uB920\uB93C\uB93D\uB940\uB944\uB94C\uB94F\uB951\uB958\uB959\uB95C\uB960\uB968\uB969"], + ["b841", "\uD1D0", 7, "\uD1D9", 17], + ["b861", "\uD1EB", 8, "\uD1F5\uD1F6\uD1F7\uD1F9", 13], + ["b881", "\uD208\uD20A", 5, "\uD211", 24, "\uB96B\uB96D\uB974\uB975\uB978\uB97C\uB984\uB985\uB987\uB989\uB98A\uB98D\uB98E\uB9AC\uB9AD\uB9B0\uB9B4\uB9BC\uB9BD\uB9BF\uB9C1\uB9C8\uB9C9\uB9CC\uB9CE", 4, "\uB9D8\uB9D9\uB9DB\uB9DD\uB9DE\uB9E1\uB9E3\uB9E4\uB9E5\uB9E8\uB9EC\uB9F4\uB9F5\uB9F7\uB9F8\uB9F9\uB9FA\uBA00\uBA01\uBA08\uBA15\uBA38\uBA39\uBA3C\uBA40\uBA42\uBA48\uBA49\uBA4B\uBA4D\uBA4E\uBA53\uBA54\uBA55\uBA58\uBA5C\uBA64\uBA65\uBA67\uBA68\uBA69\uBA70\uBA71\uBA74\uBA78\uBA83\uBA84\uBA85\uBA87\uBA8C\uBAA8\uBAA9\uBAAB\uBAAC\uBAB0\uBAB2\uBAB8\uBAB9\uBABB\uBABD\uBAC4\uBAC8\uBAD8\uBAD9\uBAFC"], + ["b941", "\uD22A\uD22B\uD22E\uD22F\uD231\uD232\uD233\uD235", 6, "\uD23E\uD240\uD242", 5, "\uD249\uD24A\uD24B\uD24C"], + ["b961", "\uD24D", 14, "\uD25D", 6, "\uD265\uD266\uD267\uD268"], + ["b981", "\uD269", 22, "\uD282\uD283\uD285\uD286\uD287\uD289\uD28A\uD28B\uD28C\uBB00\uBB04\uBB0D\uBB0F\uBB11\uBB18\uBB1C\uBB20\uBB29\uBB2B\uBB34\uBB35\uBB36\uBB38\uBB3B\uBB3C\uBB3D\uBB3E\uBB44\uBB45\uBB47\uBB49\uBB4D\uBB4F\uBB50\uBB54\uBB58\uBB61\uBB63\uBB6C\uBB88\uBB8C\uBB90\uBBA4\uBBA8\uBBAC\uBBB4\uBBB7\uBBC0\uBBC4\uBBC8\uBBD0\uBBD3\uBBF8\uBBF9\uBBFC\uBBFF\uBC00\uBC02\uBC08\uBC09\uBC0B\uBC0C\uBC0D\uBC0F\uBC11\uBC14", 4, "\uBC1B", 4, "\uBC24\uBC25\uBC27\uBC29\uBC2D\uBC30\uBC31\uBC34\uBC38\uBC40\uBC41\uBC43\uBC44\uBC45\uBC49\uBC4C\uBC4D\uBC50\uBC5D\uBC84\uBC85\uBC88\uBC8B\uBC8C\uBC8E\uBC94\uBC95\uBC97"], + ["ba41", "\uD28D\uD28E\uD28F\uD292\uD293\uD294\uD296", 5, "\uD29D\uD29E\uD29F\uD2A1\uD2A2\uD2A3\uD2A5", 6, "\uD2AD"], + ["ba61", "\uD2AE\uD2AF\uD2B0\uD2B2", 5, "\uD2BA\uD2BB\uD2BD\uD2BE\uD2C1\uD2C3", 4, "\uD2CA\uD2CC", 5], + ["ba81", "\uD2D2\uD2D3\uD2D5\uD2D6\uD2D7\uD2D9\uD2DA\uD2DB\uD2DD", 6, "\uD2E6", 9, "\uD2F2\uD2F3\uD2F5\uD2F6\uD2F7\uD2F9\uD2FA\uBC99\uBC9A\uBCA0\uBCA1\uBCA4\uBCA7\uBCA8\uBCB0\uBCB1\uBCB3\uBCB4\uBCB5\uBCBC\uBCBD\uBCC0\uBCC4\uBCCD\uBCCF\uBCD0\uBCD1\uBCD5\uBCD8\uBCDC\uBCF4\uBCF5\uBCF6\uBCF8\uBCFC\uBD04\uBD05\uBD07\uBD09\uBD10\uBD14\uBD24\uBD2C\uBD40\uBD48\uBD49\uBD4C\uBD50\uBD58\uBD59\uBD64\uBD68\uBD80\uBD81\uBD84\uBD87\uBD88\uBD89\uBD8A\uBD90\uBD91\uBD93\uBD95\uBD99\uBD9A\uBD9C\uBDA4\uBDB0\uBDB8\uBDD4\uBDD5\uBDD8\uBDDC\uBDE9\uBDF0\uBDF4\uBDF8\uBE00\uBE03\uBE05\uBE0C\uBE0D\uBE10\uBE14\uBE1C\uBE1D\uBE1F\uBE44\uBE45\uBE48\uBE4C\uBE4E\uBE54\uBE55\uBE57\uBE59\uBE5A\uBE5B\uBE60\uBE61\uBE64"], + ["bb41", "\uD2FB", 4, "\uD302\uD304\uD306", 5, "\uD30F\uD311\uD312\uD313\uD315\uD317", 4, "\uD31E\uD322\uD323"], + ["bb61", "\uD324\uD326\uD327\uD32A\uD32B\uD32D\uD32E\uD32F\uD331", 6, "\uD33A\uD33E", 5, "\uD346\uD347\uD348\uD349"], + ["bb81", "\uD34A", 31, "\uBE68\uBE6A\uBE70\uBE71\uBE73\uBE74\uBE75\uBE7B\uBE7C\uBE7D\uBE80\uBE84\uBE8C\uBE8D\uBE8F\uBE90\uBE91\uBE98\uBE99\uBEA8\uBED0\uBED1\uBED4\uBED7\uBED8\uBEE0\uBEE3\uBEE4\uBEE5\uBEEC\uBF01\uBF08\uBF09\uBF18\uBF19\uBF1B\uBF1C\uBF1D\uBF40\uBF41\uBF44\uBF48\uBF50\uBF51\uBF55\uBF94\uBFB0\uBFC5\uBFCC\uBFCD\uBFD0\uBFD4\uBFDC\uBFDF\uBFE1\uC03C\uC051\uC058\uC05C\uC060\uC068\uC069\uC090\uC091\uC094\uC098\uC0A0\uC0A1\uC0A3\uC0A5\uC0AC\uC0AD\uC0AF\uC0B0\uC0B3\uC0B4\uC0B5\uC0B6\uC0BC\uC0BD\uC0BF\uC0C0\uC0C1\uC0C5\uC0C8\uC0C9\uC0CC\uC0D0\uC0D8\uC0D9\uC0DB\uC0DC\uC0DD\uC0E4"], + ["bc41", "\uD36A", 17, "\uD37E\uD37F\uD381\uD382\uD383\uD385\uD386\uD387"], + ["bc61", "\uD388\uD389\uD38A\uD38B\uD38E\uD392", 5, "\uD39A\uD39B\uD39D\uD39E\uD39F\uD3A1", 6, "\uD3AA\uD3AC\uD3AE"], + ["bc81", "\uD3AF", 4, "\uD3B5\uD3B6\uD3B7\uD3B9\uD3BA\uD3BB\uD3BD", 6, "\uD3C6\uD3C7\uD3CA", 5, "\uD3D1", 5, "\uC0E5\uC0E8\uC0EC\uC0F4\uC0F5\uC0F7\uC0F9\uC100\uC104\uC108\uC110\uC115\uC11C", 4, "\uC123\uC124\uC126\uC127\uC12C\uC12D\uC12F\uC130\uC131\uC136\uC138\uC139\uC13C\uC140\uC148\uC149\uC14B\uC14C\uC14D\uC154\uC155\uC158\uC15C\uC164\uC165\uC167\uC168\uC169\uC170\uC174\uC178\uC185\uC18C\uC18D\uC18E\uC190\uC194\uC196\uC19C\uC19D\uC19F\uC1A1\uC1A5\uC1A8\uC1A9\uC1AC\uC1B0\uC1BD\uC1C4\uC1C8\uC1CC\uC1D4\uC1D7\uC1D8\uC1E0\uC1E4\uC1E8\uC1F0\uC1F1\uC1F3\uC1FC\uC1FD\uC200\uC204\uC20C\uC20D\uC20F\uC211\uC218\uC219\uC21C\uC21F\uC220\uC228\uC229\uC22B\uC22D"], + ["bd41", "\uD3D7\uD3D9", 7, "\uD3E2\uD3E4", 7, "\uD3EE\uD3EF\uD3F1\uD3F2\uD3F3\uD3F5\uD3F6\uD3F7"], + ["bd61", "\uD3F8\uD3F9\uD3FA\uD3FB\uD3FE\uD400\uD402", 5, "\uD409", 13], + ["bd81", "\uD417", 5, "\uD41E", 25, "\uC22F\uC231\uC232\uC234\uC248\uC250\uC251\uC254\uC258\uC260\uC265\uC26C\uC26D\uC270\uC274\uC27C\uC27D\uC27F\uC281\uC288\uC289\uC290\uC298\uC29B\uC29D\uC2A4\uC2A5\uC2A8\uC2AC\uC2AD\uC2B4\uC2B5\uC2B7\uC2B9\uC2DC\uC2DD\uC2E0\uC2E3\uC2E4\uC2EB\uC2EC\uC2ED\uC2EF\uC2F1\uC2F6\uC2F8\uC2F9\uC2FB\uC2FC\uC300\uC308\uC309\uC30C\uC30D\uC313\uC314\uC315\uC318\uC31C\uC324\uC325\uC328\uC329\uC345\uC368\uC369\uC36C\uC370\uC372\uC378\uC379\uC37C\uC37D\uC384\uC388\uC38C\uC3C0\uC3D8\uC3D9\uC3DC\uC3DF\uC3E0\uC3E2\uC3E8\uC3E9\uC3ED\uC3F4\uC3F5\uC3F8\uC408\uC410\uC424\uC42C\uC430"], + ["be41", "\uD438", 7, "\uD441\uD442\uD443\uD445", 14], + ["be61", "\uD454", 7, "\uD45D\uD45E\uD45F\uD461\uD462\uD463\uD465", 7, "\uD46E\uD470\uD471\uD472"], + ["be81", "\uD473", 4, "\uD47A\uD47B\uD47D\uD47E\uD481\uD483", 4, "\uD48A\uD48C\uD48E", 5, "\uD495", 8, "\uC434\uC43C\uC43D\uC448\uC464\uC465\uC468\uC46C\uC474\uC475\uC479\uC480\uC494\uC49C\uC4B8\uC4BC\uC4E9\uC4F0\uC4F1\uC4F4\uC4F8\uC4FA\uC4FF\uC500\uC501\uC50C\uC510\uC514\uC51C\uC528\uC529\uC52C\uC530\uC538\uC539\uC53B\uC53D\uC544\uC545\uC548\uC549\uC54A\uC54C\uC54D\uC54E\uC553\uC554\uC555\uC557\uC558\uC559\uC55D\uC55E\uC560\uC561\uC564\uC568\uC570\uC571\uC573\uC574\uC575\uC57C\uC57D\uC580\uC584\uC587\uC58C\uC58D\uC58F\uC591\uC595\uC597\uC598\uC59C\uC5A0\uC5A9\uC5B4\uC5B5\uC5B8\uC5B9\uC5BB\uC5BC\uC5BD\uC5BE\uC5C4", 6, "\uC5CC\uC5CE"], + ["bf41", "\uD49E", 10, "\uD4AA", 14], + ["bf61", "\uD4B9", 18, "\uD4CD\uD4CE\uD4CF\uD4D1\uD4D2\uD4D3\uD4D5"], + ["bf81", "\uD4D6", 5, "\uD4DD\uD4DE\uD4E0", 7, "\uD4E9\uD4EA\uD4EB\uD4ED\uD4EE\uD4EF\uD4F1", 6, "\uD4F9\uD4FA\uD4FC\uC5D0\uC5D1\uC5D4\uC5D8\uC5E0\uC5E1\uC5E3\uC5E5\uC5EC\uC5ED\uC5EE\uC5F0\uC5F4\uC5F6\uC5F7\uC5FC", 5, "\uC605\uC606\uC607\uC608\uC60C\uC610\uC618\uC619\uC61B\uC61C\uC624\uC625\uC628\uC62C\uC62D\uC62E\uC630\uC633\uC634\uC635\uC637\uC639\uC63B\uC640\uC641\uC644\uC648\uC650\uC651\uC653\uC654\uC655\uC65C\uC65D\uC660\uC66C\uC66F\uC671\uC678\uC679\uC67C\uC680\uC688\uC689\uC68B\uC68D\uC694\uC695\uC698\uC69C\uC6A4\uC6A5\uC6A7\uC6A9\uC6B0\uC6B1\uC6B4\uC6B8\uC6B9\uC6BA\uC6C0\uC6C1\uC6C3\uC6C5\uC6CC\uC6CD\uC6D0\uC6D4\uC6DC\uC6DD\uC6E0\uC6E1\uC6E8"], + ["c041", "\uD4FE", 5, "\uD505\uD506\uD507\uD509\uD50A\uD50B\uD50D", 6, "\uD516\uD518", 5], + ["c061", "\uD51E", 25], + ["c081", "\uD538\uD539\uD53A\uD53B\uD53E\uD53F\uD541\uD542\uD543\uD545", 6, "\uD54E\uD550\uD552", 5, "\uD55A\uD55B\uD55D\uD55E\uD55F\uD561\uD562\uD563\uC6E9\uC6EC\uC6F0\uC6F8\uC6F9\uC6FD\uC704\uC705\uC708\uC70C\uC714\uC715\uC717\uC719\uC720\uC721\uC724\uC728\uC730\uC731\uC733\uC735\uC737\uC73C\uC73D\uC740\uC744\uC74A\uC74C\uC74D\uC74F\uC751", 7, "\uC75C\uC760\uC768\uC76B\uC774\uC775\uC778\uC77C\uC77D\uC77E\uC783\uC784\uC785\uC787\uC788\uC789\uC78A\uC78E\uC790\uC791\uC794\uC796\uC797\uC798\uC79A\uC7A0\uC7A1\uC7A3\uC7A4\uC7A5\uC7A6\uC7AC\uC7AD\uC7B0\uC7B4\uC7BC\uC7BD\uC7BF\uC7C0\uC7C1\uC7C8\uC7C9\uC7CC\uC7CE\uC7D0\uC7D8\uC7DD\uC7E4\uC7E8\uC7EC\uC800\uC801\uC804\uC808\uC80A"], + ["c141", "\uD564\uD566\uD567\uD56A\uD56C\uD56E", 5, "\uD576\uD577\uD579\uD57A\uD57B\uD57D", 6, "\uD586\uD58A\uD58B"], + ["c161", "\uD58C\uD58D\uD58E\uD58F\uD591", 19, "\uD5A6\uD5A7"], + ["c181", "\uD5A8", 31, "\uC810\uC811\uC813\uC815\uC816\uC81C\uC81D\uC820\uC824\uC82C\uC82D\uC82F\uC831\uC838\uC83C\uC840\uC848\uC849\uC84C\uC84D\uC854\uC870\uC871\uC874\uC878\uC87A\uC880\uC881\uC883\uC885\uC886\uC887\uC88B\uC88C\uC88D\uC894\uC89D\uC89F\uC8A1\uC8A8\uC8BC\uC8BD\uC8C4\uC8C8\uC8CC\uC8D4\uC8D5\uC8D7\uC8D9\uC8E0\uC8E1\uC8E4\uC8F5\uC8FC\uC8FD\uC900\uC904\uC905\uC906\uC90C\uC90D\uC90F\uC911\uC918\uC92C\uC934\uC950\uC951\uC954\uC958\uC960\uC961\uC963\uC96C\uC970\uC974\uC97C\uC988\uC989\uC98C\uC990\uC998\uC999\uC99B\uC99D\uC9C0\uC9C1\uC9C4\uC9C7\uC9C8\uC9CA\uC9D0\uC9D1\uC9D3"], + ["c241", "\uD5CA\uD5CB\uD5CD\uD5CE\uD5CF\uD5D1\uD5D3", 4, "\uD5DA\uD5DC\uD5DE", 5, "\uD5E6\uD5E7\uD5E9\uD5EA\uD5EB\uD5ED\uD5EE"], + ["c261", "\uD5EF", 4, "\uD5F6\uD5F8\uD5FA", 5, "\uD602\uD603\uD605\uD606\uD607\uD609", 6, "\uD612"], + ["c281", "\uD616", 5, "\uD61D\uD61E\uD61F\uD621\uD622\uD623\uD625", 7, "\uD62E", 9, "\uD63A\uD63B\uC9D5\uC9D6\uC9D9\uC9DA\uC9DC\uC9DD\uC9E0\uC9E2\uC9E4\uC9E7\uC9EC\uC9ED\uC9EF\uC9F0\uC9F1\uC9F8\uC9F9\uC9FC\uCA00\uCA08\uCA09\uCA0B\uCA0C\uCA0D\uCA14\uCA18\uCA29\uCA4C\uCA4D\uCA50\uCA54\uCA5C\uCA5D\uCA5F\uCA60\uCA61\uCA68\uCA7D\uCA84\uCA98\uCABC\uCABD\uCAC0\uCAC4\uCACC\uCACD\uCACF\uCAD1\uCAD3\uCAD8\uCAD9\uCAE0\uCAEC\uCAF4\uCB08\uCB10\uCB14\uCB18\uCB20\uCB21\uCB41\uCB48\uCB49\uCB4C\uCB50\uCB58\uCB59\uCB5D\uCB64\uCB78\uCB79\uCB9C\uCBB8\uCBD4\uCBE4\uCBE7\uCBE9\uCC0C\uCC0D\uCC10\uCC14\uCC1C\uCC1D\uCC21\uCC22\uCC27\uCC28\uCC29\uCC2C\uCC2E\uCC30\uCC38\uCC39\uCC3B"], + ["c341", "\uD63D\uD63E\uD63F\uD641\uD642\uD643\uD644\uD646\uD647\uD64A\uD64C\uD64E\uD64F\uD650\uD652\uD653\uD656\uD657\uD659\uD65A\uD65B\uD65D", 4], + ["c361", "\uD662", 4, "\uD668\uD66A", 5, "\uD672\uD673\uD675", 11], + ["c381", "\uD681\uD682\uD684\uD686", 5, "\uD68E\uD68F\uD691\uD692\uD693\uD695", 7, "\uD69E\uD6A0\uD6A2", 5, "\uD6A9\uD6AA\uCC3C\uCC3D\uCC3E\uCC44\uCC45\uCC48\uCC4C\uCC54\uCC55\uCC57\uCC58\uCC59\uCC60\uCC64\uCC66\uCC68\uCC70\uCC75\uCC98\uCC99\uCC9C\uCCA0\uCCA8\uCCA9\uCCAB\uCCAC\uCCAD\uCCB4\uCCB5\uCCB8\uCCBC\uCCC4\uCCC5\uCCC7\uCCC9\uCCD0\uCCD4\uCCE4\uCCEC\uCCF0\uCD01\uCD08\uCD09\uCD0C\uCD10\uCD18\uCD19\uCD1B\uCD1D\uCD24\uCD28\uCD2C\uCD39\uCD5C\uCD60\uCD64\uCD6C\uCD6D\uCD6F\uCD71\uCD78\uCD88\uCD94\uCD95\uCD98\uCD9C\uCDA4\uCDA5\uCDA7\uCDA9\uCDB0\uCDC4\uCDCC\uCDD0\uCDE8\uCDEC\uCDF0\uCDF8\uCDF9\uCDFB\uCDFD\uCE04\uCE08\uCE0C\uCE14\uCE19\uCE20\uCE21\uCE24\uCE28\uCE30\uCE31\uCE33\uCE35"], + ["c441", "\uD6AB\uD6AD\uD6AE\uD6AF\uD6B1", 7, "\uD6BA\uD6BC", 7, "\uD6C6\uD6C7\uD6C9\uD6CA\uD6CB"], + ["c461", "\uD6CD\uD6CE\uD6CF\uD6D0\uD6D2\uD6D3\uD6D5\uD6D6\uD6D8\uD6DA", 5, "\uD6E1\uD6E2\uD6E3\uD6E5\uD6E6\uD6E7\uD6E9", 4], + ["c481", "\uD6EE\uD6EF\uD6F1\uD6F2\uD6F3\uD6F4\uD6F6", 5, "\uD6FE\uD6FF\uD701\uD702\uD703\uD705", 11, "\uD712\uD713\uD714\uCE58\uCE59\uCE5C\uCE5F\uCE60\uCE61\uCE68\uCE69\uCE6B\uCE6D\uCE74\uCE75\uCE78\uCE7C\uCE84\uCE85\uCE87\uCE89\uCE90\uCE91\uCE94\uCE98\uCEA0\uCEA1\uCEA3\uCEA4\uCEA5\uCEAC\uCEAD\uCEC1\uCEE4\uCEE5\uCEE8\uCEEB\uCEEC\uCEF4\uCEF5\uCEF7\uCEF8\uCEF9\uCF00\uCF01\uCF04\uCF08\uCF10\uCF11\uCF13\uCF15\uCF1C\uCF20\uCF24\uCF2C\uCF2D\uCF2F\uCF30\uCF31\uCF38\uCF54\uCF55\uCF58\uCF5C\uCF64\uCF65\uCF67\uCF69\uCF70\uCF71\uCF74\uCF78\uCF80\uCF85\uCF8C\uCFA1\uCFA8\uCFB0\uCFC4\uCFE0\uCFE1\uCFE4\uCFE8\uCFF0\uCFF1\uCFF3\uCFF5\uCFFC\uD000\uD004\uD011\uD018\uD02D\uD034\uD035\uD038\uD03C"], + ["c541", "\uD715\uD716\uD717\uD71A\uD71B\uD71D\uD71E\uD71F\uD721", 6, "\uD72A\uD72C\uD72E", 5, "\uD736\uD737\uD739"], + ["c561", "\uD73A\uD73B\uD73D", 6, "\uD745\uD746\uD748\uD74A", 5, "\uD752\uD753\uD755\uD75A", 4], + ["c581", "\uD75F\uD762\uD764\uD766\uD767\uD768\uD76A\uD76B\uD76D\uD76E\uD76F\uD771\uD772\uD773\uD775", 6, "\uD77E\uD77F\uD780\uD782", 5, "\uD78A\uD78B\uD044\uD045\uD047\uD049\uD050\uD054\uD058\uD060\uD06C\uD06D\uD070\uD074\uD07C\uD07D\uD081\uD0A4\uD0A5\uD0A8\uD0AC\uD0B4\uD0B5\uD0B7\uD0B9\uD0C0\uD0C1\uD0C4\uD0C8\uD0C9\uD0D0\uD0D1\uD0D3\uD0D4\uD0D5\uD0DC\uD0DD\uD0E0\uD0E4\uD0EC\uD0ED\uD0EF\uD0F0\uD0F1\uD0F8\uD10D\uD130\uD131\uD134\uD138\uD13A\uD140\uD141\uD143\uD144\uD145\uD14C\uD14D\uD150\uD154\uD15C\uD15D\uD15F\uD161\uD168\uD16C\uD17C\uD184\uD188\uD1A0\uD1A1\uD1A4\uD1A8\uD1B0\uD1B1\uD1B3\uD1B5\uD1BA\uD1BC\uD1C0\uD1D8\uD1F4\uD1F8\uD207\uD209\uD210\uD22C\uD22D\uD230\uD234\uD23C\uD23D\uD23F\uD241\uD248\uD25C"], + ["c641", "\uD78D\uD78E\uD78F\uD791", 6, "\uD79A\uD79C\uD79E", 5], + ["c6a1", "\uD264\uD280\uD281\uD284\uD288\uD290\uD291\uD295\uD29C\uD2A0\uD2A4\uD2AC\uD2B1\uD2B8\uD2B9\uD2BC\uD2BF\uD2C0\uD2C2\uD2C8\uD2C9\uD2CB\uD2D4\uD2D8\uD2DC\uD2E4\uD2E5\uD2F0\uD2F1\uD2F4\uD2F8\uD300\uD301\uD303\uD305\uD30C\uD30D\uD30E\uD310\uD314\uD316\uD31C\uD31D\uD31F\uD320\uD321\uD325\uD328\uD329\uD32C\uD330\uD338\uD339\uD33B\uD33C\uD33D\uD344\uD345\uD37C\uD37D\uD380\uD384\uD38C\uD38D\uD38F\uD390\uD391\uD398\uD399\uD39C\uD3A0\uD3A8\uD3A9\uD3AB\uD3AD\uD3B4\uD3B8\uD3BC\uD3C4\uD3C5\uD3C8\uD3C9\uD3D0\uD3D8\uD3E1\uD3E3\uD3EC\uD3ED\uD3F0\uD3F4\uD3FC\uD3FD\uD3FF\uD401"], + ["c7a1", "\uD408\uD41D\uD440\uD444\uD45C\uD460\uD464\uD46D\uD46F\uD478\uD479\uD47C\uD47F\uD480\uD482\uD488\uD489\uD48B\uD48D\uD494\uD4A9\uD4CC\uD4D0\uD4D4\uD4DC\uD4DF\uD4E8\uD4EC\uD4F0\uD4F8\uD4FB\uD4FD\uD504\uD508\uD50C\uD514\uD515\uD517\uD53C\uD53D\uD540\uD544\uD54C\uD54D\uD54F\uD551\uD558\uD559\uD55C\uD560\uD565\uD568\uD569\uD56B\uD56D\uD574\uD575\uD578\uD57C\uD584\uD585\uD587\uD588\uD589\uD590\uD5A5\uD5C8\uD5C9\uD5CC\uD5D0\uD5D2\uD5D8\uD5D9\uD5DB\uD5DD\uD5E4\uD5E5\uD5E8\uD5EC\uD5F4\uD5F5\uD5F7\uD5F9\uD600\uD601\uD604\uD608\uD610\uD611\uD613\uD614\uD615\uD61C\uD620"], + ["c8a1", "\uD624\uD62D\uD638\uD639\uD63C\uD640\uD645\uD648\uD649\uD64B\uD64D\uD651\uD654\uD655\uD658\uD65C\uD667\uD669\uD670\uD671\uD674\uD683\uD685\uD68C\uD68D\uD690\uD694\uD69D\uD69F\uD6A1\uD6A8\uD6AC\uD6B0\uD6B9\uD6BB\uD6C4\uD6C5\uD6C8\uD6CC\uD6D1\uD6D4\uD6D7\uD6D9\uD6E0\uD6E4\uD6E8\uD6F0\uD6F5\uD6FC\uD6FD\uD700\uD704\uD711\uD718\uD719\uD71C\uD720\uD728\uD729\uD72B\uD72D\uD734\uD735\uD738\uD73C\uD744\uD747\uD749\uD750\uD751\uD754\uD756\uD757\uD758\uD759\uD760\uD761\uD763\uD765\uD769\uD76C\uD770\uD774\uD77C\uD77D\uD781\uD788\uD789\uD78C\uD790\uD798\uD799\uD79B\uD79D"], + ["caa1", "\u4F3D\u4F73\u5047\u50F9\u52A0\u53EF\u5475\u54E5\u5609\u5AC1\u5BB6\u6687\u67B6\u67B7\u67EF\u6B4C\u73C2\u75C2\u7A3C\u82DB\u8304\u8857\u8888\u8A36\u8CC8\u8DCF\u8EFB\u8FE6\u99D5\u523B\u5374\u5404\u606A\u6164\u6BBC\u73CF\u811A\u89BA\u89D2\u95A3\u4F83\u520A\u58BE\u5978\u59E6\u5E72\u5E79\u61C7\u63C0\u6746\u67EC\u687F\u6F97\u764E\u770B\u78F5\u7A08\u7AFF\u7C21\u809D\u826E\u8271\u8AEB\u9593\u4E6B\u559D\u66F7\u6E34\u78A3\u7AED\u845B\u8910\u874E\u97A8\u52D8\u574E\u582A\u5D4C\u611F\u61BE\u6221\u6562\u67D1\u6A44\u6E1B\u7518\u75B3\u76E3\u77B0\u7D3A\u90AF\u9451\u9452\u9F95"], + ["cba1", "\u5323\u5CAC\u7532\u80DB\u9240\u9598\u525B\u5808\u59DC\u5CA1\u5D17\u5EB7\u5F3A\u5F4A\u6177\u6C5F\u757A\u7586\u7CE0\u7D73\u7DB1\u7F8C\u8154\u8221\u8591\u8941\u8B1B\u92FC\u964D\u9C47\u4ECB\u4EF7\u500B\u51F1\u584F\u6137\u613E\u6168\u6539\u69EA\u6F11\u75A5\u7686\u76D6\u7B87\u82A5\u84CB\uF900\u93A7\u958B\u5580\u5BA2\u5751\uF901\u7CB3\u7FB9\u91B5\u5028\u53BB\u5C45\u5DE8\u62D2\u636E\u64DA\u64E7\u6E20\u70AC\u795B\u8DDD\u8E1E\uF902\u907D\u9245\u92F8\u4E7E\u4EF6\u5065\u5DFE\u5EFA\u6106\u6957\u8171\u8654\u8E47\u9375\u9A2B\u4E5E\u5091\u6770\u6840\u5109\u528D\u5292\u6AA2"], + ["cca1", "\u77BC\u9210\u9ED4\u52AB\u602F\u8FF2\u5048\u61A9\u63ED\u64CA\u683C\u6A84\u6FC0\u8188\u89A1\u9694\u5805\u727D\u72AC\u7504\u7D79\u7E6D\u80A9\u898B\u8B74\u9063\u9D51\u6289\u6C7A\u6F54\u7D50\u7F3A\u8A23\u517C\u614A\u7B9D\u8B19\u9257\u938C\u4EAC\u4FD3\u501E\u50BE\u5106\u52C1\u52CD\u537F\u5770\u5883\u5E9A\u5F91\u6176\u61AC\u64CE\u656C\u666F\u66BB\u66F4\u6897\u6D87\u7085\u70F1\u749F\u74A5\u74CA\u75D9\u786C\u78EC\u7ADF\u7AF6\u7D45\u7D93\u8015\u803F\u811B\u8396\u8B66\u8F15\u9015\u93E1\u9803\u9838\u9A5A\u9BE8\u4FC2\u5553\u583A\u5951\u5B63\u5C46\u60B8\u6212\u6842\u68B0"], + ["cda1", "\u68E8\u6EAA\u754C\u7678\u78CE\u7A3D\u7CFB\u7E6B\u7E7C\u8A08\u8AA1\u8C3F\u968E\u9DC4\u53E4\u53E9\u544A\u5471\u56FA\u59D1\u5B64\u5C3B\u5EAB\u62F7\u6537\u6545\u6572\u66A0\u67AF\u69C1\u6CBD\u75FC\u7690\u777E\u7A3F\u7F94\u8003\u80A1\u818F\u82E6\u82FD\u83F0\u85C1\u8831\u88B4\u8AA5\uF903\u8F9C\u932E\u96C7\u9867\u9AD8\u9F13\u54ED\u659B\u66F2\u688F\u7A40\u8C37\u9D60\u56F0\u5764\u5D11\u6606\u68B1\u68CD\u6EFE\u7428\u889E\u9BE4\u6C68\uF904\u9AA8\u4F9B\u516C\u5171\u529F\u5B54\u5DE5\u6050\u606D\u62F1\u63A7\u653B\u73D9\u7A7A\u86A3\u8CA2\u978F\u4E32\u5BE1\u6208\u679C\u74DC"], + ["cea1", "\u79D1\u83D3\u8A87\u8AB2\u8DE8\u904E\u934B\u9846\u5ED3\u69E8\u85FF\u90ED\uF905\u51A0\u5B98\u5BEC\u6163\u68FA\u6B3E\u704C\u742F\u74D8\u7BA1\u7F50\u83C5\u89C0\u8CAB\u95DC\u9928\u522E\u605D\u62EC\u9002\u4F8A\u5149\u5321\u58D9\u5EE3\u66E0\u6D38\u709A\u72C2\u73D6\u7B50\u80F1\u945B\u5366\u639B\u7F6B\u4E56\u5080\u584A\u58DE\u602A\u6127\u62D0\u69D0\u9B41\u5B8F\u7D18\u80B1\u8F5F\u4EA4\u50D1\u54AC\u55AC\u5B0C\u5DA0\u5DE7\u652A\u654E\u6821\u6A4B\u72E1\u768E\u77EF\u7D5E\u7FF9\u81A0\u854E\u86DF\u8F03\u8F4E\u90CA\u9903\u9A55\u9BAB\u4E18\u4E45\u4E5D\u4EC7\u4FF1\u5177\u52FE"], + ["cfa1", "\u5340\u53E3\u53E5\u548E\u5614\u5775\u57A2\u5BC7\u5D87\u5ED0\u61FC\u62D8\u6551\u67B8\u67E9\u69CB\u6B50\u6BC6\u6BEC\u6C42\u6E9D\u7078\u72D7\u7396\u7403\u77BF\u77E9\u7A76\u7D7F\u8009\u81FC\u8205\u820A\u82DF\u8862\u8B33\u8CFC\u8EC0\u9011\u90B1\u9264\u92B6\u99D2\u9A45\u9CE9\u9DD7\u9F9C\u570B\u5C40\u83CA\u97A0\u97AB\u9EB4\u541B\u7A98\u7FA4\u88D9\u8ECD\u90E1\u5800\u5C48\u6398\u7A9F\u5BAE\u5F13\u7A79\u7AAE\u828E\u8EAC\u5026\u5238\u52F8\u5377\u5708\u62F3\u6372\u6B0A\u6DC3\u7737\u53A5\u7357\u8568\u8E76\u95D5\u673A\u6AC3\u6F70\u8A6D\u8ECC\u994B\uF906\u6677\u6B78\u8CB4"], + ["d0a1", "\u9B3C\uF907\u53EB\u572D\u594E\u63C6\u69FB\u73EA\u7845\u7ABA\u7AC5\u7CFE\u8475\u898F\u8D73\u9035\u95A8\u52FB\u5747\u7547\u7B60\u83CC\u921E\uF908\u6A58\u514B\u524B\u5287\u621F\u68D8\u6975\u9699\u50C5\u52A4\u52E4\u61C3\u65A4\u6839\u69FF\u747E\u7B4B\u82B9\u83EB\u89B2\u8B39\u8FD1\u9949\uF909\u4ECA\u5997\u64D2\u6611\u6A8E\u7434\u7981\u79BD\u82A9\u887E\u887F\u895F\uF90A\u9326\u4F0B\u53CA\u6025\u6271\u6C72\u7D1A\u7D66\u4E98\u5162\u77DC\u80AF\u4F01\u4F0E\u5176\u5180\u55DC\u5668\u573B\u57FA\u57FC\u5914\u5947\u5993\u5BC4\u5C90\u5D0E\u5DF1\u5E7E\u5FCC\u6280\u65D7\u65E3"], + ["d1a1", "\u671E\u671F\u675E\u68CB\u68C4\u6A5F\u6B3A\u6C23\u6C7D\u6C82\u6DC7\u7398\u7426\u742A\u7482\u74A3\u7578\u757F\u7881\u78EF\u7941\u7947\u7948\u797A\u7B95\u7D00\u7DBA\u7F88\u8006\u802D\u808C\u8A18\u8B4F\u8C48\u8D77\u9321\u9324\u98E2\u9951\u9A0E\u9A0F\u9A65\u9E92\u7DCA\u4F76\u5409\u62EE\u6854\u91D1\u55AB\u513A\uF90B\uF90C\u5A1C\u61E6\uF90D\u62CF\u62FF\uF90E", 5, "\u90A3\uF914", 4, "\u8AFE\uF919\uF91A\uF91B\uF91C\u6696\uF91D\u7156\uF91E\uF91F\u96E3\uF920\u634F\u637A\u5357\uF921\u678F\u6960\u6E73\uF922\u7537\uF923\uF924\uF925"], + ["d2a1", "\u7D0D\uF926\uF927\u8872\u56CA\u5A18\uF928", 4, "\u4E43\uF92D\u5167\u5948\u67F0\u8010\uF92E\u5973\u5E74\u649A\u79CA\u5FF5\u606C\u62C8\u637B\u5BE7\u5BD7\u52AA\uF92F\u5974\u5F29\u6012\uF930\uF931\uF932\u7459\uF933", 5, "\u99D1\uF939", 10, "\u6FC3\uF944\uF945\u81BF\u8FB2\u60F1\uF946\uF947\u8166\uF948\uF949\u5C3F\uF94A", 7, "\u5AE9\u8A25\u677B\u7D10\uF952", 5, "\u80FD\uF958\uF959\u5C3C\u6CE5\u533F\u6EBA\u591A\u8336"], + ["d3a1", "\u4E39\u4EB6\u4F46\u55AE\u5718\u58C7\u5F56\u65B7\u65E6\u6A80\u6BB5\u6E4D\u77ED\u7AEF\u7C1E\u7DDE\u86CB\u8892\u9132\u935B\u64BB\u6FBE\u737A\u75B8\u9054\u5556\u574D\u61BA\u64D4\u66C7\u6DE1\u6E5B\u6F6D\u6FB9\u75F0\u8043\u81BD\u8541\u8983\u8AC7\u8B5A\u931F\u6C93\u7553\u7B54\u8E0F\u905D\u5510\u5802\u5858\u5E62\u6207\u649E\u68E0\u7576\u7CD6\u87B3\u9EE8\u4EE3\u5788\u576E\u5927\u5C0D\u5CB1\u5E36\u5F85\u6234\u64E1\u73B3\u81FA\u888B\u8CB8\u968A\u9EDB\u5B85\u5FB7\u60B3\u5012\u5200\u5230\u5716\u5835\u5857\u5C0E\u5C60\u5CF6\u5D8B\u5EA6\u5F92\u60BC\u6311\u6389\u6417\u6843"], + ["d4a1", "\u68F9\u6AC2\u6DD8\u6E21\u6ED4\u6FE4\u71FE\u76DC\u7779\u79B1\u7A3B\u8404\u89A9\u8CED\u8DF3\u8E48\u9003\u9014\u9053\u90FD\u934D\u9676\u97DC\u6BD2\u7006\u7258\u72A2\u7368\u7763\u79BF\u7BE4\u7E9B\u8B80\u58A9\u60C7\u6566\u65FD\u66BE\u6C8C\u711E\u71C9\u8C5A\u9813\u4E6D\u7A81\u4EDD\u51AC\u51CD\u52D5\u540C\u61A7\u6771\u6850\u68DF\u6D1E\u6F7C\u75BC\u77B3\u7AE5\u80F4\u8463\u9285\u515C\u6597\u675C\u6793\u75D8\u7AC7\u8373\uF95A\u8C46\u9017\u982D\u5C6F\u81C0\u829A\u9041\u906F\u920D\u5F97\u5D9D\u6A59\u71C8\u767B\u7B49\u85E4\u8B04\u9127\u9A30\u5587\u61F6\uF95B\u7669\u7F85"], + ["d5a1", "\u863F\u87BA\u88F8\u908F\uF95C\u6D1B\u70D9\u73DE\u7D61\u843D\uF95D\u916A\u99F1\uF95E\u4E82\u5375\u6B04\u6B12\u703E\u721B\u862D\u9E1E\u524C\u8FA3\u5D50\u64E5\u652C\u6B16\u6FEB\u7C43\u7E9C\u85CD\u8964\u89BD\u62C9\u81D8\u881F\u5ECA\u6717\u6D6A\u72FC\u7405\u746F\u8782\u90DE\u4F86\u5D0D\u5FA0\u840A\u51B7\u63A0\u7565\u4EAE\u5006\u5169\u51C9\u6881\u6A11\u7CAE\u7CB1\u7CE7\u826F\u8AD2\u8F1B\u91CF\u4FB6\u5137\u52F5\u5442\u5EEC\u616E\u623E\u65C5\u6ADA\u6FFE\u792A\u85DC\u8823\u95AD\u9A62\u9A6A\u9E97\u9ECE\u529B\u66C6\u6B77\u701D\u792B\u8F62\u9742\u6190\u6200\u6523\u6F23"], + ["d6a1", "\u7149\u7489\u7DF4\u806F\u84EE\u8F26\u9023\u934A\u51BD\u5217\u52A3\u6D0C\u70C8\u88C2\u5EC9\u6582\u6BAE\u6FC2\u7C3E\u7375\u4EE4\u4F36\u56F9\uF95F\u5CBA\u5DBA\u601C\u73B2\u7B2D\u7F9A\u7FCE\u8046\u901E\u9234\u96F6\u9748\u9818\u9F61\u4F8B\u6FA7\u79AE\u91B4\u96B7\u52DE\uF960\u6488\u64C4\u6AD3\u6F5E\u7018\u7210\u76E7\u8001\u8606\u865C\u8DEF\u8F05\u9732\u9B6F\u9DFA\u9E75\u788C\u797F\u7DA0\u83C9\u9304\u9E7F\u9E93\u8AD6\u58DF\u5F04\u6727\u7027\u74CF\u7C60\u807E\u5121\u7028\u7262\u78CA\u8CC2\u8CDA\u8CF4\u96F7\u4E86\u50DA\u5BEE\u5ED6\u6599\u71CE\u7642\u77AD\u804A\u84FC"], + ["d7a1", "\u907C\u9B27\u9F8D\u58D8\u5A41\u5C62\u6A13\u6DDA\u6F0F\u763B\u7D2F\u7E37\u851E\u8938\u93E4\u964B\u5289\u65D2\u67F3\u69B4\u6D41\u6E9C\u700F\u7409\u7460\u7559\u7624\u786B\u8B2C\u985E\u516D\u622E\u9678\u4F96\u502B\u5D19\u6DEA\u7DB8\u8F2A\u5F8B\u6144\u6817\uF961\u9686\u52D2\u808B\u51DC\u51CC\u695E\u7A1C\u7DBE\u83F1\u9675\u4FDA\u5229\u5398\u540F\u550E\u5C65\u60A7\u674E\u68A8\u6D6C\u7281\u72F8\u7406\u7483\uF962\u75E2\u7C6C\u7F79\u7FB8\u8389\u88CF\u88E1\u91CC\u91D0\u96E2\u9BC9\u541D\u6F7E\u71D0\u7498\u85FA\u8EAA\u96A3\u9C57\u9E9F\u6797\u6DCB\u7433\u81E8\u9716\u782C"], + ["d8a1", "\u7ACB\u7B20\u7C92\u6469\u746A\u75F2\u78BC\u78E8\u99AC\u9B54\u9EBB\u5BDE\u5E55\u6F20\u819C\u83AB\u9088\u4E07\u534D\u5A29\u5DD2\u5F4E\u6162\u633D\u6669\u66FC\u6EFF\u6F2B\u7063\u779E\u842C\u8513\u883B\u8F13\u9945\u9C3B\u551C\u62B9\u672B\u6CAB\u8309\u896A\u977A\u4EA1\u5984\u5FD8\u5FD9\u671B\u7DB2\u7F54\u8292\u832B\u83BD\u8F1E\u9099\u57CB\u59B9\u5A92\u5BD0\u6627\u679A\u6885\u6BCF\u7164\u7F75\u8CB7\u8CE3\u9081\u9B45\u8108\u8C8A\u964C\u9A40\u9EA5\u5B5F\u6C13\u731B\u76F2\u76DF\u840C\u51AA\u8993\u514D\u5195\u52C9\u68C9\u6C94\u7704\u7720\u7DBF\u7DEC\u9762\u9EB5\u6EC5"], + ["d9a1", "\u8511\u51A5\u540D\u547D\u660E\u669D\u6927\u6E9F\u76BF\u7791\u8317\u84C2\u879F\u9169\u9298\u9CF4\u8882\u4FAE\u5192\u52DF\u59C6\u5E3D\u6155\u6478\u6479\u66AE\u67D0\u6A21\u6BCD\u6BDB\u725F\u7261\u7441\u7738\u77DB\u8017\u82BC\u8305\u8B00\u8B28\u8C8C\u6728\u6C90\u7267\u76EE\u7766\u7A46\u9DA9\u6B7F\u6C92\u5922\u6726\u8499\u536F\u5893\u5999\u5EDF\u63CF\u6634\u6773\u6E3A\u732B\u7AD7\u82D7\u9328\u52D9\u5DEB\u61AE\u61CB\u620A\u62C7\u64AB\u65E0\u6959\u6B66\u6BCB\u7121\u73F7\u755D\u7E46\u821E\u8302\u856A\u8AA3\u8CBF\u9727\u9D61\u58A8\u9ED8\u5011\u520E\u543B\u554F\u6587"], + ["daa1", "\u6C76\u7D0A\u7D0B\u805E\u868A\u9580\u96EF\u52FF\u6C95\u7269\u5473\u5A9A\u5C3E\u5D4B\u5F4C\u5FAE\u672A\u68B6\u6963\u6E3C\u6E44\u7709\u7C73\u7F8E\u8587\u8B0E\u8FF7\u9761\u9EF4\u5CB7\u60B6\u610D\u61AB\u654F\u65FB\u65FC\u6C11\u6CEF\u739F\u73C9\u7DE1\u9594\u5BC6\u871C\u8B10\u525D\u535A\u62CD\u640F\u64B2\u6734\u6A38\u6CCA\u73C0\u749E\u7B94\u7C95\u7E1B\u818A\u8236\u8584\u8FEB\u96F9\u99C1\u4F34\u534A\u53CD\u53DB\u62CC\u642C\u6500\u6591\u69C3\u6CEE\u6F58\u73ED\u7554\u7622\u76E4\u76FC\u78D0\u78FB\u792C\u7D46\u822C\u87E0\u8FD4\u9812\u98EF\u52C3\u62D4\u64A5\u6E24\u6F51"], + ["dba1", "\u767C\u8DCB\u91B1\u9262\u9AEE\u9B43\u5023\u508D\u574A\u59A8\u5C28\u5E47\u5F77\u623F\u653E\u65B9\u65C1\u6609\u678B\u699C\u6EC2\u78C5\u7D21\u80AA\u8180\u822B\u82B3\u84A1\u868C\u8A2A\u8B17\u90A6\u9632\u9F90\u500D\u4FF3\uF963\u57F9\u5F98\u62DC\u6392\u676F\u6E43\u7119\u76C3\u80CC\u80DA\u88F4\u88F5\u8919\u8CE0\u8F29\u914D\u966A\u4F2F\u4F70\u5E1B\u67CF\u6822\u767D\u767E\u9B44\u5E61\u6A0A\u7169\u71D4\u756A\uF964\u7E41\u8543\u85E9\u98DC\u4F10\u7B4F\u7F70\u95A5\u51E1\u5E06\u68B5\u6C3E\u6C4E\u6CDB\u72AF\u7BC4\u8303\u6CD5\u743A\u50FB\u5288\u58C1\u64D8\u6A97\u74A7\u7656"], + ["dca1", "\u78A7\u8617\u95E2\u9739\uF965\u535E\u5F01\u8B8A\u8FA8\u8FAF\u908A\u5225\u77A5\u9C49\u9F08\u4E19\u5002\u5175\u5C5B\u5E77\u661E\u663A\u67C4\u68C5\u70B3\u7501\u75C5\u79C9\u7ADD\u8F27\u9920\u9A08\u4FDD\u5821\u5831\u5BF6\u666E\u6B65\u6D11\u6E7A\u6F7D\u73E4\u752B\u83E9\u88DC\u8913\u8B5C\u8F14\u4F0F\u50D5\u5310\u535C\u5B93\u5FA9\u670D\u798F\u8179\u832F\u8514\u8907\u8986\u8F39\u8F3B\u99A5\u9C12\u672C\u4E76\u4FF8\u5949\u5C01\u5CEF\u5CF0\u6367\u68D2\u70FD\u71A2\u742B\u7E2B\u84EC\u8702\u9022\u92D2\u9CF3\u4E0D\u4ED8\u4FEF\u5085\u5256\u526F\u5426\u5490\u57E0\u592B\u5A66"], + ["dda1", "\u5B5A\u5B75\u5BCC\u5E9C\uF966\u6276\u6577\u65A7\u6D6E\u6EA5\u7236\u7B26\u7C3F\u7F36\u8150\u8151\u819A\u8240\u8299\u83A9\u8A03\u8CA0\u8CE6\u8CFB\u8D74\u8DBA\u90E8\u91DC\u961C\u9644\u99D9\u9CE7\u5317\u5206\u5429\u5674\u58B3\u5954\u596E\u5FFF\u61A4\u626E\u6610\u6C7E\u711A\u76C6\u7C89\u7CDE\u7D1B\u82AC\u8CC1\u96F0\uF967\u4F5B\u5F17\u5F7F\u62C2\u5D29\u670B\u68DA\u787C\u7E43\u9D6C\u4E15\u5099\u5315\u532A\u5351\u5983\u5A62\u5E87\u60B2\u618A\u6249\u6279\u6590\u6787\u69A7\u6BD4\u6BD6\u6BD7\u6BD8\u6CB8\uF968\u7435\u75FA\u7812\u7891\u79D5\u79D8\u7C83\u7DCB\u7FE1\u80A5"], + ["dea1", "\u813E\u81C2\u83F2\u871A\u88E8\u8AB9\u8B6C\u8CBB\u9119\u975E\u98DB\u9F3B\u56AC\u5B2A\u5F6C\u658C\u6AB3\u6BAF\u6D5C\u6FF1\u7015\u725D\u73AD\u8CA7\u8CD3\u983B\u6191\u6C37\u8058\u9A01\u4E4D\u4E8B\u4E9B\u4ED5\u4F3A\u4F3C\u4F7F\u4FDF\u50FF\u53F2\u53F8\u5506\u55E3\u56DB\u58EB\u5962\u5A11\u5BEB\u5BFA\u5C04\u5DF3\u5E2B\u5F99\u601D\u6368\u659C\u65AF\u67F6\u67FB\u68AD\u6B7B\u6C99\u6CD7\u6E23\u7009\u7345\u7802\u793E\u7940\u7960\u79C1\u7BE9\u7D17\u7D72\u8086\u820D\u838E\u84D1\u86C7\u88DF\u8A50\u8A5E\u8B1D\u8CDC\u8D66\u8FAD\u90AA\u98FC\u99DF\u9E9D\u524A\uF969\u6714\uF96A"], + ["dfa1", "\u5098\u522A\u5C71\u6563\u6C55\u73CA\u7523\u759D\u7B97\u849C\u9178\u9730\u4E77\u6492\u6BBA\u715E\u85A9\u4E09\uF96B\u6749\u68EE\u6E17\u829F\u8518\u886B\u63F7\u6F81\u9212\u98AF\u4E0A\u50B7\u50CF\u511F\u5546\u55AA\u5617\u5B40\u5C19\u5CE0\u5E38\u5E8A\u5EA0\u5EC2\u60F3\u6851\u6A61\u6E58\u723D\u7240\u72C0\u76F8\u7965\u7BB1\u7FD4\u88F3\u89F4\u8A73\u8C61\u8CDE\u971C\u585E\u74BD\u8CFD\u55C7\uF96C\u7A61\u7D22\u8272\u7272\u751F\u7525\uF96D\u7B19\u5885\u58FB\u5DBC\u5E8F\u5EB6\u5F90\u6055\u6292\u637F\u654D\u6691\u66D9\u66F8\u6816\u68F2\u7280\u745E\u7B6E\u7D6E\u7DD6\u7F72"], + ["e0a1", "\u80E5\u8212\u85AF\u897F\u8A93\u901D\u92E4\u9ECD\u9F20\u5915\u596D\u5E2D\u60DC\u6614\u6673\u6790\u6C50\u6DC5\u6F5F\u77F3\u78A9\u84C6\u91CB\u932B\u4ED9\u50CA\u5148\u5584\u5B0B\u5BA3\u6247\u657E\u65CB\u6E32\u717D\u7401\u7444\u7487\u74BF\u766C\u79AA\u7DDA\u7E55\u7FA8\u817A\u81B3\u8239\u861A\u87EC\u8A75\u8DE3\u9078\u9291\u9425\u994D\u9BAE\u5368\u5C51\u6954\u6CC4\u6D29\u6E2B\u820C\u859B\u893B\u8A2D\u8AAA\u96EA\u9F67\u5261\u66B9\u6BB2\u7E96\u87FE\u8D0D\u9583\u965D\u651D\u6D89\u71EE\uF96E\u57CE\u59D3\u5BAC\u6027\u60FA\u6210\u661F\u665F\u7329\u73F9\u76DB\u7701\u7B6C"], + ["e1a1", "\u8056\u8072\u8165\u8AA0\u9192\u4E16\u52E2\u6B72\u6D17\u7A05\u7B39\u7D30\uF96F\u8CB0\u53EC\u562F\u5851\u5BB5\u5C0F\u5C11\u5DE2\u6240\u6383\u6414\u662D\u68B3\u6CBC\u6D88\u6EAF\u701F\u70A4\u71D2\u7526\u758F\u758E\u7619\u7B11\u7BE0\u7C2B\u7D20\u7D39\u852C\u856D\u8607\u8A34\u900D\u9061\u90B5\u92B7\u97F6\u9A37\u4FD7\u5C6C\u675F\u6D91\u7C9F\u7E8C\u8B16\u8D16\u901F\u5B6B\u5DFD\u640D\u84C0\u905C\u98E1\u7387\u5B8B\u609A\u677E\u6DDE\u8A1F\u8AA6\u9001\u980C\u5237\uF970\u7051\u788E\u9396\u8870\u91D7\u4FEE\u53D7\u55FD\u56DA\u5782\u58FD\u5AC2\u5B88\u5CAB\u5CC0\u5E25\u6101"], + ["e2a1", "\u620D\u624B\u6388\u641C\u6536\u6578\u6A39\u6B8A\u6C34\u6D19\u6F31\u71E7\u72E9\u7378\u7407\u74B2\u7626\u7761\u79C0\u7A57\u7AEA\u7CB9\u7D8F\u7DAC\u7E61\u7F9E\u8129\u8331\u8490\u84DA\u85EA\u8896\u8AB0\u8B90\u8F38\u9042\u9083\u916C\u9296\u92B9\u968B\u96A7\u96A8\u96D6\u9700\u9808\u9996\u9AD3\u9B1A\u53D4\u587E\u5919\u5B70\u5BBF\u6DD1\u6F5A\u719F\u7421\u74B9\u8085\u83FD\u5DE1\u5F87\u5FAA\u6042\u65EC\u6812\u696F\u6A53\u6B89\u6D35\u6DF3\u73E3\u76FE\u77AC\u7B4D\u7D14\u8123\u821C\u8340\u84F4\u8563\u8A62\u8AC4\u9187\u931E\u9806\u99B4\u620C\u8853\u8FF0\u9265\u5D07\u5D27"], + ["e3a1", "\u5D69\u745F\u819D\u8768\u6FD5\u62FE\u7FD2\u8936\u8972\u4E1E\u4E58\u50E7\u52DD\u5347\u627F\u6607\u7E69\u8805\u965E\u4F8D\u5319\u5636\u59CB\u5AA4\u5C38\u5C4E\u5C4D\u5E02\u5F11\u6043\u65BD\u662F\u6642\u67BE\u67F4\u731C\u77E2\u793A\u7FC5\u8494\u84CD\u8996\u8A66\u8A69\u8AE1\u8C55\u8C7A\u57F4\u5BD4\u5F0F\u606F\u62ED\u690D\u6B96\u6E5C\u7184\u7BD2\u8755\u8B58\u8EFE\u98DF\u98FE\u4F38\u4F81\u4FE1\u547B\u5A20\u5BB8\u613C\u65B0\u6668\u71FC\u7533\u795E\u7D33\u814E\u81E3\u8398\u85AA\u85CE\u8703\u8A0A\u8EAB\u8F9B\uF971\u8FC5\u5931\u5BA4\u5BE6\u6089\u5BE9\u5C0B\u5FC3\u6C81"], + ["e4a1", "\uF972\u6DF1\u700B\u751A\u82AF\u8AF6\u4EC0\u5341\uF973\u96D9\u6C0F\u4E9E\u4FC4\u5152\u555E\u5A25\u5CE8\u6211\u7259\u82BD\u83AA\u86FE\u8859\u8A1D\u963F\u96C5\u9913\u9D09\u9D5D\u580A\u5CB3\u5DBD\u5E44\u60E1\u6115\u63E1\u6A02\u6E25\u9102\u9354\u984E\u9C10\u9F77\u5B89\u5CB8\u6309\u664F\u6848\u773C\u96C1\u978D\u9854\u9B9F\u65A1\u8B01\u8ECB\u95BC\u5535\u5CA9\u5DD6\u5EB5\u6697\u764C\u83F4\u95C7\u58D3\u62BC\u72CE\u9D28\u4EF0\u592E\u600F\u663B\u6B83\u79E7\u9D26\u5393\u54C0\u57C3\u5D16\u611B\u66D6\u6DAF\u788D\u827E\u9698\u9744\u5384\u627C\u6396\u6DB2\u7E0A\u814B\u984D"], + ["e5a1", "\u6AFB\u7F4C\u9DAF\u9E1A\u4E5F\u503B\u51B6\u591C\u60F9\u63F6\u6930\u723A\u8036\uF974\u91CE\u5F31\uF975\uF976\u7D04\u82E5\u846F\u84BB\u85E5\u8E8D\uF977\u4F6F\uF978\uF979\u58E4\u5B43\u6059\u63DA\u6518\u656D\u6698\uF97A\u694A\u6A23\u6D0B\u7001\u716C\u75D2\u760D\u79B3\u7A70\uF97B\u7F8A\uF97C\u8944\uF97D\u8B93\u91C0\u967D\uF97E\u990A\u5704\u5FA1\u65BC\u6F01\u7600\u79A6\u8A9E\u99AD\u9B5A\u9F6C\u5104\u61B6\u6291\u6A8D\u81C6\u5043\u5830\u5F66\u7109\u8A00\u8AFA\u5B7C\u8616\u4FFA\u513C\u56B4\u5944\u63A9\u6DF9\u5DAA\u696D\u5186\u4E88\u4F59\uF97F\uF980\uF981\u5982\uF982"], + ["e6a1", "\uF983\u6B5F\u6C5D\uF984\u74B5\u7916\uF985\u8207\u8245\u8339\u8F3F\u8F5D\uF986\u9918\uF987\uF988\uF989\u4EA6\uF98A\u57DF\u5F79\u6613\uF98B\uF98C\u75AB\u7E79\u8B6F\uF98D\u9006\u9A5B\u56A5\u5827\u59F8\u5A1F\u5BB4\uF98E\u5EF6\uF98F\uF990\u6350\u633B\uF991\u693D\u6C87\u6CBF\u6D8E\u6D93\u6DF5\u6F14\uF992\u70DF\u7136\u7159\uF993\u71C3\u71D5\uF994\u784F\u786F\uF995\u7B75\u7DE3\uF996\u7E2F\uF997\u884D\u8EDF\uF998\uF999\uF99A\u925B\uF99B\u9CF6\uF99C\uF99D\uF99E\u6085\u6D85\uF99F\u71B1\uF9A0\uF9A1\u95B1\u53AD\uF9A2\uF9A3\uF9A4\u67D3\uF9A5\u708E\u7130\u7430\u8276\u82D2"], + ["e7a1", "\uF9A6\u95BB\u9AE5\u9E7D\u66C4\uF9A7\u71C1\u8449\uF9A8\uF9A9\u584B\uF9AA\uF9AB\u5DB8\u5F71\uF9AC\u6620\u668E\u6979\u69AE\u6C38\u6CF3\u6E36\u6F41\u6FDA\u701B\u702F\u7150\u71DF\u7370\uF9AD\u745B\uF9AE\u74D4\u76C8\u7A4E\u7E93\uF9AF\uF9B0\u82F1\u8A60\u8FCE\uF9B1\u9348\uF9B2\u9719\uF9B3\uF9B4\u4E42\u502A\uF9B5\u5208\u53E1\u66F3\u6C6D\u6FCA\u730A\u777F\u7A62\u82AE\u85DD\u8602\uF9B6\u88D4\u8A63\u8B7D\u8C6B\uF9B7\u92B3\uF9B8\u9713\u9810\u4E94\u4F0D\u4FC9\u50B2\u5348\u543E\u5433\u55DA\u5862\u58BA\u5967\u5A1B\u5BE4\u609F\uF9B9\u61CA\u6556\u65FF\u6664\u68A7\u6C5A\u6FB3"], + ["e8a1", "\u70CF\u71AC\u7352\u7B7D\u8708\u8AA4\u9C32\u9F07\u5C4B\u6C83\u7344\u7389\u923A\u6EAB\u7465\u761F\u7A69\u7E15\u860A\u5140\u58C5\u64C1\u74EE\u7515\u7670\u7FC1\u9095\u96CD\u9954\u6E26\u74E6\u7AA9\u7AAA\u81E5\u86D9\u8778\u8A1B\u5A49\u5B8C\u5B9B\u68A1\u6900\u6D63\u73A9\u7413\u742C\u7897\u7DE9\u7FEB\u8118\u8155\u839E\u8C4C\u962E\u9811\u66F0\u5F80\u65FA\u6789\u6C6A\u738B\u502D\u5A03\u6B6A\u77EE\u5916\u5D6C\u5DCD\u7325\u754F\uF9BA\uF9BB\u50E5\u51F9\u582F\u592D\u5996\u59DA\u5BE5\uF9BC\uF9BD\u5DA2\u62D7\u6416\u6493\u64FE\uF9BE\u66DC\uF9BF\u6A48\uF9C0\u71FF\u7464\uF9C1"], + ["e9a1", "\u7A88\u7AAF\u7E47\u7E5E\u8000\u8170\uF9C2\u87EF\u8981\u8B20\u9059\uF9C3\u9080\u9952\u617E\u6B32\u6D74\u7E1F\u8925\u8FB1\u4FD1\u50AD\u5197\u52C7\u57C7\u5889\u5BB9\u5EB8\u6142\u6995\u6D8C\u6E67\u6EB6\u7194\u7462\u7528\u752C\u8073\u8338\u84C9\u8E0A\u9394\u93DE\uF9C4\u4E8E\u4F51\u5076\u512A\u53C8\u53CB\u53F3\u5B87\u5BD3\u5C24\u611A\u6182\u65F4\u725B\u7397\u7440\u76C2\u7950\u7991\u79B9\u7D06\u7FBD\u828B\u85D5\u865E\u8FC2\u9047\u90F5\u91EA\u9685\u96E8\u96E9\u52D6\u5F67\u65ED\u6631\u682F\u715C\u7A36\u90C1\u980A\u4E91\uF9C5\u6A52\u6B9E\u6F90\u7189\u8018\u82B8\u8553"], + ["eaa1", "\u904B\u9695\u96F2\u97FB\u851A\u9B31\u4E90\u718A\u96C4\u5143\u539F\u54E1\u5713\u5712\u57A3\u5A9B\u5AC4\u5BC3\u6028\u613F\u63F4\u6C85\u6D39\u6E72\u6E90\u7230\u733F\u7457\u82D1\u8881\u8F45\u9060\uF9C6\u9662\u9858\u9D1B\u6708\u8D8A\u925E\u4F4D\u5049\u50DE\u5371\u570D\u59D4\u5A01\u5C09\u6170\u6690\u6E2D\u7232\u744B\u7DEF\u80C3\u840E\u8466\u853F\u875F\u885B\u8918\u8B02\u9055\u97CB\u9B4F\u4E73\u4F91\u5112\u516A\uF9C7\u552F\u55A9\u5B7A\u5BA5\u5E7C\u5E7D\u5EBE\u60A0\u60DF\u6108\u6109\u63C4\u6538\u6709\uF9C8\u67D4\u67DA\uF9C9\u6961\u6962\u6CB9\u6D27\uF9CA\u6E38\uF9CB"], + ["eba1", "\u6FE1\u7336\u7337\uF9CC\u745C\u7531\uF9CD\u7652\uF9CE\uF9CF\u7DAD\u81FE\u8438\u88D5\u8A98\u8ADB\u8AED\u8E30\u8E42\u904A\u903E\u907A\u9149\u91C9\u936E\uF9D0\uF9D1\u5809\uF9D2\u6BD3\u8089\u80B2\uF9D3\uF9D4\u5141\u596B\u5C39\uF9D5\uF9D6\u6F64\u73A7\u80E4\u8D07\uF9D7\u9217\u958F\uF9D8\uF9D9\uF9DA\uF9DB\u807F\u620E\u701C\u7D68\u878D\uF9DC\u57A0\u6069\u6147\u6BB7\u8ABE\u9280\u96B1\u4E59\u541F\u6DEB\u852D\u9670\u97F3\u98EE\u63D6\u6CE3\u9091\u51DD\u61C9\u81BA\u9DF9\u4F9D\u501A\u5100\u5B9C\u610F\u61FF\u64EC\u6905\u6BC5\u7591\u77E3\u7FA9\u8264\u858F\u87FB\u8863\u8ABC"], + ["eca1", "\u8B70\u91AB\u4E8C\u4EE5\u4F0A\uF9DD\uF9DE\u5937\u59E8\uF9DF\u5DF2\u5F1B\u5F5B\u6021\uF9E0\uF9E1\uF9E2\uF9E3\u723E\u73E5\uF9E4\u7570\u75CD\uF9E5\u79FB\uF9E6\u800C\u8033\u8084\u82E1\u8351\uF9E7\uF9E8\u8CBD\u8CB3\u9087\uF9E9\uF9EA\u98F4\u990C\uF9EB\uF9EC\u7037\u76CA\u7FCA\u7FCC\u7FFC\u8B1A\u4EBA\u4EC1\u5203\u5370\uF9ED\u54BD\u56E0\u59FB\u5BC5\u5F15\u5FCD\u6E6E\uF9EE\uF9EF\u7D6A\u8335\uF9F0\u8693\u8A8D\uF9F1\u976D\u9777\uF9F2\uF9F3\u4E00\u4F5A\u4F7E\u58F9\u65E5\u6EA2\u9038\u93B0\u99B9\u4EFB\u58EC\u598A\u59D9\u6041\uF9F4\uF9F5\u7A14\uF9F6\u834F\u8CC3\u5165\u5344"], + ["eda1", "\uF9F7\uF9F8\uF9F9\u4ECD\u5269\u5B55\u82BF\u4ED4\u523A\u54A8\u59C9\u59FF\u5B50\u5B57\u5B5C\u6063\u6148\u6ECB\u7099\u716E\u7386\u74F7\u75B5\u78C1\u7D2B\u8005\u81EA\u8328\u8517\u85C9\u8AEE\u8CC7\u96CC\u4F5C\u52FA\u56BC\u65AB\u6628\u707C\u70B8\u7235\u7DBD\u828D\u914C\u96C0\u9D72\u5B71\u68E7\u6B98\u6F7A\u76DE\u5C91\u66AB\u6F5B\u7BB4\u7C2A\u8836\u96DC\u4E08\u4ED7\u5320\u5834\u58BB\u58EF\u596C\u5C07\u5E33\u5E84\u5F35\u638C\u66B2\u6756\u6A1F\u6AA3\u6B0C\u6F3F\u7246\uF9FA\u7350\u748B\u7AE0\u7CA7\u8178\u81DF\u81E7\u838A\u846C\u8523\u8594\u85CF\u88DD\u8D13\u91AC\u9577"], + ["eea1", "\u969C\u518D\u54C9\u5728\u5BB0\u624D\u6750\u683D\u6893\u6E3D\u6ED3\u707D\u7E21\u88C1\u8CA1\u8F09\u9F4B\u9F4E\u722D\u7B8F\u8ACD\u931A\u4F47\u4F4E\u5132\u5480\u59D0\u5E95\u62B5\u6775\u696E\u6A17\u6CAE\u6E1A\u72D9\u732A\u75BD\u7BB8\u7D35\u82E7\u83F9\u8457\u85F7\u8A5B\u8CAF\u8E87\u9019\u90B8\u96CE\u9F5F\u52E3\u540A\u5AE1\u5BC2\u6458\u6575\u6EF4\u72C4\uF9FB\u7684\u7A4D\u7B1B\u7C4D\u7E3E\u7FDF\u837B\u8B2B\u8CCA\u8D64\u8DE1\u8E5F\u8FEA\u8FF9\u9069\u93D1\u4F43\u4F7A\u50B3\u5168\u5178\u524D\u526A\u5861\u587C\u5960\u5C08\u5C55\u5EDB\u609B\u6230\u6813\u6BBF\u6C08\u6FB1"], + ["efa1", "\u714E\u7420\u7530\u7538\u7551\u7672\u7B4C\u7B8B\u7BAD\u7BC6\u7E8F\u8A6E\u8F3E\u8F49\u923F\u9293\u9322\u942B\u96FB\u985A\u986B\u991E\u5207\u622A\u6298\u6D59\u7664\u7ACA\u7BC0\u7D76\u5360\u5CBE\u5E97\u6F38\u70B9\u7C98\u9711\u9B8E\u9EDE\u63A5\u647A\u8776\u4E01\u4E95\u4EAD\u505C\u5075\u5448\u59C3\u5B9A\u5E40\u5EAD\u5EF7\u5F81\u60C5\u633A\u653F\u6574\u65CC\u6676\u6678\u67FE\u6968\u6A89\u6B63\u6C40\u6DC0\u6DE8\u6E1F\u6E5E\u701E\u70A1\u738E\u73FD\u753A\u775B\u7887\u798E\u7A0B\u7A7D\u7CBE\u7D8E\u8247\u8A02\u8AEA\u8C9E\u912D\u914A\u91D8\u9266\u92CC\u9320\u9706\u9756"], + ["f0a1", "\u975C\u9802\u9F0E\u5236\u5291\u557C\u5824\u5E1D\u5F1F\u608C\u63D0\u68AF\u6FDF\u796D\u7B2C\u81CD\u85BA\u88FD\u8AF8\u8E44\u918D\u9664\u969B\u973D\u984C\u9F4A\u4FCE\u5146\u51CB\u52A9\u5632\u5F14\u5F6B\u63AA\u64CD\u65E9\u6641\u66FA\u66F9\u671D\u689D\u68D7\u69FD\u6F15\u6F6E\u7167\u71E5\u722A\u74AA\u773A\u7956\u795A\u79DF\u7A20\u7A95\u7C97\u7CDF\u7D44\u7E70\u8087\u85FB\u86A4\u8A54\u8ABF\u8D99\u8E81\u9020\u906D\u91E3\u963B\u96D5\u9CE5\u65CF\u7C07\u8DB3\u93C3\u5B58\u5C0A\u5352\u62D9\u731D\u5027\u5B97\u5F9E\u60B0\u616B\u68D5\u6DD9\u742E\u7A2E\u7D42\u7D9C\u7E31\u816B"], + ["f1a1", "\u8E2A\u8E35\u937E\u9418\u4F50\u5750\u5DE6\u5EA7\u632B\u7F6A\u4E3B\u4F4F\u4F8F\u505A\u59DD\u80C4\u546A\u5468\u55FE\u594F\u5B99\u5DDE\u5EDA\u665D\u6731\u67F1\u682A\u6CE8\u6D32\u6E4A\u6F8D\u70B7\u73E0\u7587\u7C4C\u7D02\u7D2C\u7DA2\u821F\u86DB\u8A3B\u8A85\u8D70\u8E8A\u8F33\u9031\u914E\u9152\u9444\u99D0\u7AF9\u7CA5\u4FCA\u5101\u51C6\u57C8\u5BEF\u5CFB\u6659\u6A3D\u6D5A\u6E96\u6FEC\u710C\u756F\u7AE3\u8822\u9021\u9075\u96CB\u99FF\u8301\u4E2D\u4EF2\u8846\u91CD\u537D\u6ADB\u696B\u6C41\u847A\u589E\u618E\u66FE\u62EF\u70DD\u7511\u75C7\u7E52\u84B8\u8B49\u8D08\u4E4B\u53EA"], + ["f2a1", "\u54AB\u5730\u5740\u5FD7\u6301\u6307\u646F\u652F\u65E8\u667A\u679D\u67B3\u6B62\u6C60\u6C9A\u6F2C\u77E5\u7825\u7949\u7957\u7D19\u80A2\u8102\u81F3\u829D\u82B7\u8718\u8A8C\uF9FC\u8D04\u8DBE\u9072\u76F4\u7A19\u7A37\u7E54\u8077\u5507\u55D4\u5875\u632F\u6422\u6649\u664B\u686D\u699B\u6B84\u6D25\u6EB1\u73CD\u7468\u74A1\u755B\u75B9\u76E1\u771E\u778B\u79E6\u7E09\u7E1D\u81FB\u852F\u8897\u8A3A\u8CD1\u8EEB\u8FB0\u9032\u93AD\u9663\u9673\u9707\u4F84\u53F1\u59EA\u5AC9\u5E19\u684E\u74C6\u75BE\u79E9\u7A92\u81A3\u86ED\u8CEA\u8DCC\u8FED\u659F\u6715\uF9FD\u57F7\u6F57\u7DDD\u8F2F"], + ["f3a1", "\u93F6\u96C6\u5FB5\u61F2\u6F84\u4E14\u4F98\u501F\u53C9\u55DF\u5D6F\u5DEE\u6B21\u6B64\u78CB\u7B9A\uF9FE\u8E49\u8ECA\u906E\u6349\u643E\u7740\u7A84\u932F\u947F\u9F6A\u64B0\u6FAF\u71E6\u74A8\u74DA\u7AC4\u7C12\u7E82\u7CB2\u7E98\u8B9A\u8D0A\u947D\u9910\u994C\u5239\u5BDF\u64E6\u672D\u7D2E\u50ED\u53C3\u5879\u6158\u6159\u61FA\u65AC\u7AD9\u8B92\u8B96\u5009\u5021\u5275\u5531\u5A3C\u5EE0\u5F70\u6134\u655E\u660C\u6636\u66A2\u69CD\u6EC4\u6F32\u7316\u7621\u7A93\u8139\u8259\u83D6\u84BC\u50B5\u57F0\u5BC0\u5BE8\u5F69\u63A1\u7826\u7DB5\u83DC\u8521\u91C7\u91F5\u518A\u67F5\u7B56"], + ["f4a1", "\u8CAC\u51C4\u59BB\u60BD\u8655\u501C\uF9FF\u5254\u5C3A\u617D\u621A\u62D3\u64F2\u65A5\u6ECC\u7620\u810A\u8E60\u965F\u96BB\u4EDF\u5343\u5598\u5929\u5DDD\u64C5\u6CC9\u6DFA\u7394\u7A7F\u821B\u85A6\u8CE4\u8E10\u9077\u91E7\u95E1\u9621\u97C6\u51F8\u54F2\u5586\u5FB9\u64A4\u6F88\u7DB4\u8F1F\u8F4D\u9435\u50C9\u5C16\u6CBE\u6DFB\u751B\u77BB\u7C3D\u7C64\u8A79\u8AC2\u581E\u59BE\u5E16\u6377\u7252\u758A\u776B\u8ADC\u8CBC\u8F12\u5EF3\u6674\u6DF8\u807D\u83C1\u8ACB\u9751\u9BD6\uFA00\u5243\u66FF\u6D95\u6EEF\u7DE0\u8AE6\u902E\u905E\u9AD4\u521D\u527F\u54E8\u6194\u6284\u62DB\u68A2"], + ["f5a1", "\u6912\u695A\u6A35\u7092\u7126\u785D\u7901\u790E\u79D2\u7A0D\u8096\u8278\u82D5\u8349\u8549\u8C82\u8D85\u9162\u918B\u91AE\u4FC3\u56D1\u71ED\u77D7\u8700\u89F8\u5BF8\u5FD6\u6751\u90A8\u53E2\u585A\u5BF5\u60A4\u6181\u6460\u7E3D\u8070\u8525\u9283\u64AE\u50AC\u5D14\u6700\u589C\u62BD\u63A8\u690E\u6978\u6A1E\u6E6B\u76BA\u79CB\u82BB\u8429\u8ACF\u8DA8\u8FFD\u9112\u914B\u919C\u9310\u9318\u939A\u96DB\u9A36\u9C0D\u4E11\u755C\u795D\u7AFA\u7B51\u7BC9\u7E2E\u84C4\u8E59\u8E74\u8EF8\u9010\u6625\u693F\u7443\u51FA\u672E\u9EDC\u5145\u5FE0\u6C96\u87F2\u885D\u8877\u60B4\u81B5\u8403"], + ["f6a1", "\u8D05\u53D6\u5439\u5634\u5A36\u5C31\u708A\u7FE0\u805A\u8106\u81ED\u8DA3\u9189\u9A5F\u9DF2\u5074\u4EC4\u53A0\u60FB\u6E2C\u5C64\u4F88\u5024\u55E4\u5CD9\u5E5F\u6065\u6894\u6CBB\u6DC4\u71BE\u75D4\u75F4\u7661\u7A1A\u7A49\u7DC7\u7DFB\u7F6E\u81F4\u86A9\u8F1C\u96C9\u99B3\u9F52\u5247\u52C5\u98ED\u89AA\u4E03\u67D2\u6F06\u4FB5\u5BE2\u6795\u6C88\u6D78\u741B\u7827\u91DD\u937C\u87C4\u79E4\u7A31\u5FEB\u4ED6\u54A4\u553E\u58AE\u59A5\u60F0\u6253\u62D6\u6736\u6955\u8235\u9640\u99B1\u99DD\u502C\u5353\u5544\u577C\uFA01\u6258\uFA02\u64E2\u666B\u67DD\u6FC1\u6FEF\u7422\u7438\u8A17"], + ["f7a1", "\u9438\u5451\u5606\u5766\u5F48\u619A\u6B4E\u7058\u70AD\u7DBB\u8A95\u596A\u812B\u63A2\u7708\u803D\u8CAA\u5854\u642D\u69BB\u5B95\u5E11\u6E6F\uFA03\u8569\u514C\u53F0\u592A\u6020\u614B\u6B86\u6C70\u6CF0\u7B1E\u80CE\u82D4\u8DC6\u90B0\u98B1\uFA04\u64C7\u6FA4\u6491\u6504\u514E\u5410\u571F\u8A0E\u615F\u6876\uFA05\u75DB\u7B52\u7D71\u901A\u5806\u69CC\u817F\u892A\u9000\u9839\u5078\u5957\u59AC\u6295\u900F\u9B2A\u615D\u7279\u95D6\u5761\u5A46\u5DF4\u628A\u64AD\u64FA\u6777\u6CE2\u6D3E\u722C\u7436\u7834\u7F77\u82AD\u8DDB\u9817\u5224\u5742\u677F\u7248\u74E3\u8CA9\u8FA6\u9211"], + ["f8a1", "\u962A\u516B\u53ED\u634C\u4F69\u5504\u6096\u6557\u6C9B\u6D7F\u724C\u72FD\u7A17\u8987\u8C9D\u5F6D\u6F8E\u70F9\u81A8\u610E\u4FBF\u504F\u6241\u7247\u7BC7\u7DE8\u7FE9\u904D\u97AD\u9A19\u8CB6\u576A\u5E73\u67B0\u840D\u8A55\u5420\u5B16\u5E63\u5EE2\u5F0A\u6583\u80BA\u853D\u9589\u965B\u4F48\u5305\u530D\u530F\u5486\u54FA\u5703\u5E03\u6016\u629B\u62B1\u6355\uFA06\u6CE1\u6D66\u75B1\u7832\u80DE\u812F\u82DE\u8461\u84B2\u888D\u8912\u900B\u92EA\u98FD\u9B91\u5E45\u66B4\u66DD\u7011\u7206\uFA07\u4FF5\u527D\u5F6A\u6153\u6753\u6A19\u6F02\u74E2\u7968\u8868\u8C79\u98C7\u98C4\u9A43"], + ["f9a1", "\u54C1\u7A1F\u6953\u8AF7\u8C4A\u98A8\u99AE\u5F7C\u62AB\u75B2\u76AE\u88AB\u907F\u9642\u5339\u5F3C\u5FC5\u6CCC\u73CC\u7562\u758B\u7B46\u82FE\u999D\u4E4F\u903C\u4E0B\u4F55\u53A6\u590F\u5EC8\u6630\u6CB3\u7455\u8377\u8766\u8CC0\u9050\u971E\u9C15\u58D1\u5B78\u8650\u8B14\u9DB4\u5BD2\u6068\u608D\u65F1\u6C57\u6F22\u6FA3\u701A\u7F55\u7FF0\u9591\u9592\u9650\u97D3\u5272\u8F44\u51FD\u542B\u54B8\u5563\u558A\u6ABB\u6DB5\u7DD8\u8266\u929C\u9677\u9E79\u5408\u54C8\u76D2\u86E4\u95A4\u95D4\u965C\u4EA2\u4F09\u59EE\u5AE6\u5DF7\u6052\u6297\u676D\u6841\u6C86\u6E2F\u7F38\u809B\u822A"], + ["faa1", "\uFA08\uFA09\u9805\u4EA5\u5055\u54B3\u5793\u595A\u5B69\u5BB3\u61C8\u6977\u6D77\u7023\u87F9\u89E3\u8A72\u8AE7\u9082\u99ED\u9AB8\u52BE\u6838\u5016\u5E78\u674F\u8347\u884C\u4EAB\u5411\u56AE\u73E6\u9115\u97FF\u9909\u9957\u9999\u5653\u589F\u865B\u8A31\u61B2\u6AF6\u737B\u8ED2\u6B47\u96AA\u9A57\u5955\u7200\u8D6B\u9769\u4FD4\u5CF4\u5F26\u61F8\u665B\u6CEB\u70AB\u7384\u73B9\u73FE\u7729\u774D\u7D43\u7D62\u7E23\u8237\u8852\uFA0A\u8CE2\u9249\u986F\u5B51\u7A74\u8840\u9801\u5ACC\u4FE0\u5354\u593E\u5CFD\u633E\u6D79\u72F9\u8105\u8107\u83A2\u92CF\u9830\u4EA8\u5144\u5211\u578B"], + ["fba1", "\u5F62\u6CC2\u6ECE\u7005\u7050\u70AF\u7192\u73E9\u7469\u834A\u87A2\u8861\u9008\u90A2\u93A3\u99A8\u516E\u5F57\u60E0\u6167\u66B3\u8559\u8E4A\u91AF\u978B\u4E4E\u4E92\u547C\u58D5\u58FA\u597D\u5CB5\u5F27\u6236\u6248\u660A\u6667\u6BEB\u6D69\u6DCF\u6E56\u6EF8\u6F94\u6FE0\u6FE9\u705D\u72D0\u7425\u745A\u74E0\u7693\u795C\u7CCA\u7E1E\u80E1\u82A6\u846B\u84BF\u864E\u865F\u8774\u8B77\u8C6A\u93AC\u9800\u9865\u60D1\u6216\u9177\u5A5A\u660F\u6DF7\u6E3E\u743F\u9B42\u5FFD\u60DA\u7B0F\u54C4\u5F18\u6C5E\u6CD3\u6D2A\u70D8\u7D05\u8679\u8A0C\u9D3B\u5316\u548C\u5B05\u6A3A\u706B\u7575"], + ["fca1", "\u798D\u79BE\u82B1\u83EF\u8A71\u8B41\u8CA8\u9774\uFA0B\u64F4\u652B\u78BA\u78BB\u7A6B\u4E38\u559A\u5950\u5BA6\u5E7B\u60A3\u63DB\u6B61\u6665\u6853\u6E19\u7165\u74B0\u7D08\u9084\u9A69\u9C25\u6D3B\u6ED1\u733E\u8C41\u95CA\u51F0\u5E4C\u5FA8\u604D\u60F6\u6130\u614C\u6643\u6644\u69A5\u6CC1\u6E5F\u6EC9\u6F62\u714C\u749C\u7687\u7BC1\u7C27\u8352\u8757\u9051\u968D\u9EC3\u532F\u56DE\u5EFB\u5F8A\u6062\u6094\u61F7\u6666\u6703\u6A9C\u6DEE\u6FAE\u7070\u736A\u7E6A\u81BE\u8334\u86D4\u8AA8\u8CC4\u5283\u7372\u5B96\u6A6B\u9404\u54EE\u5686\u5B5D\u6548\u6585\u66C9\u689F\u6D8D\u6DC6"], + ["fda1", "\u723B\u80B4\u9175\u9A4D\u4FAF\u5019\u539A\u540E\u543C\u5589\u55C5\u5E3F\u5F8C\u673D\u7166\u73DD\u9005\u52DB\u52F3\u5864\u58CE\u7104\u718F\u71FB\u85B0\u8A13\u6688\u85A8\u55A7\u6684\u714A\u8431\u5349\u5599\u6BC1\u5F59\u5FBD\u63EE\u6689\u7147\u8AF1\u8F1D\u9EBE\u4F11\u643A\u70CB\u7566\u8667\u6064\u8B4E\u9DF8\u5147\u51F6\u5308\u6D36\u80F8\u9ED1\u6615\u6B23\u7098\u75D5\u5403\u5C79\u7D07\u8A16\u6B20\u6B3D\u6B46\u5438\u6070\u6D3D\u7FD5\u8208\u50D6\u51DE\u559C\u566B\u56CD\u59EC\u5B09\u5E0C\u6199\u6198\u6231\u665E\u66E6\u7199\u71B9\u71BA\u72A7\u79A7\u7A00\u7FB2\u8A70"] + ]; + } +}); + +// ../../node_modules/iconv-lite/encodings/tables/cp950.json +var require_cp950 = __commonJS({ + "../../node_modules/iconv-lite/encodings/tables/cp950.json"(exports2, module2) { + module2.exports = [ + ["0", "\0", 127], + ["a140", "\u3000\uFF0C\u3001\u3002\uFF0E\u2027\uFF1B\uFF1A\uFF1F\uFF01\uFE30\u2026\u2025\uFE50\uFE51\uFE52\xB7\uFE54\uFE55\uFE56\uFE57\uFF5C\u2013\uFE31\u2014\uFE33\u2574\uFE34\uFE4F\uFF08\uFF09\uFE35\uFE36\uFF5B\uFF5D\uFE37\uFE38\u3014\u3015\uFE39\uFE3A\u3010\u3011\uFE3B\uFE3C\u300A\u300B\uFE3D\uFE3E\u3008\u3009\uFE3F\uFE40\u300C\u300D\uFE41\uFE42\u300E\u300F\uFE43\uFE44\uFE59\uFE5A"], + ["a1a1", "\uFE5B\uFE5C\uFE5D\uFE5E\u2018\u2019\u201C\u201D\u301D\u301E\u2035\u2032\uFF03\uFF06\uFF0A\u203B\xA7\u3003\u25CB\u25CF\u25B3\u25B2\u25CE\u2606\u2605\u25C7\u25C6\u25A1\u25A0\u25BD\u25BC\u32A3\u2105\xAF\uFFE3\uFF3F\u02CD\uFE49\uFE4A\uFE4D\uFE4E\uFE4B\uFE4C\uFE5F\uFE60\uFE61\uFF0B\uFF0D\xD7\xF7\xB1\u221A\uFF1C\uFF1E\uFF1D\u2266\u2267\u2260\u221E\u2252\u2261\uFE62", 4, "\uFF5E\u2229\u222A\u22A5\u2220\u221F\u22BF\u33D2\u33D1\u222B\u222E\u2235\u2234\u2640\u2642\u2295\u2299\u2191\u2193\u2190\u2192\u2196\u2197\u2199\u2198\u2225\u2223\uFF0F"], + ["a240", "\uFF3C\u2215\uFE68\uFF04\uFFE5\u3012\uFFE0\uFFE1\uFF05\uFF20\u2103\u2109\uFE69\uFE6A\uFE6B\u33D5\u339C\u339D\u339E\u33CE\u33A1\u338E\u338F\u33C4\xB0\u5159\u515B\u515E\u515D\u5161\u5163\u55E7\u74E9\u7CCE\u2581", 7, "\u258F\u258E\u258D\u258C\u258B\u258A\u2589\u253C\u2534\u252C\u2524\u251C\u2594\u2500\u2502\u2595\u250C\u2510\u2514\u2518\u256D"], + ["a2a1", "\u256E\u2570\u256F\u2550\u255E\u256A\u2561\u25E2\u25E3\u25E5\u25E4\u2571\u2572\u2573\uFF10", 9, "\u2160", 9, "\u3021", 8, "\u5341\u5344\u5345\uFF21", 25, "\uFF41", 21], + ["a340", "\uFF57\uFF58\uFF59\uFF5A\u0391", 16, "\u03A3", 6, "\u03B1", 16, "\u03C3", 6, "\u3105", 10], + ["a3a1", "\u3110", 25, "\u02D9\u02C9\u02CA\u02C7\u02CB"], + ["a3e1", "\u20AC"], + ["a440", "\u4E00\u4E59\u4E01\u4E03\u4E43\u4E5D\u4E86\u4E8C\u4EBA\u513F\u5165\u516B\u51E0\u5200\u5201\u529B\u5315\u5341\u535C\u53C8\u4E09\u4E0B\u4E08\u4E0A\u4E2B\u4E38\u51E1\u4E45\u4E48\u4E5F\u4E5E\u4E8E\u4EA1\u5140\u5203\u52FA\u5343\u53C9\u53E3\u571F\u58EB\u5915\u5927\u5973\u5B50\u5B51\u5B53\u5BF8\u5C0F\u5C22\u5C38\u5C71\u5DDD\u5DE5\u5DF1\u5DF2\u5DF3\u5DFE\u5E72\u5EFE\u5F0B\u5F13\u624D"], + ["a4a1", "\u4E11\u4E10\u4E0D\u4E2D\u4E30\u4E39\u4E4B\u5C39\u4E88\u4E91\u4E95\u4E92\u4E94\u4EA2\u4EC1\u4EC0\u4EC3\u4EC6\u4EC7\u4ECD\u4ECA\u4ECB\u4EC4\u5143\u5141\u5167\u516D\u516E\u516C\u5197\u51F6\u5206\u5207\u5208\u52FB\u52FE\u52FF\u5316\u5339\u5348\u5347\u5345\u535E\u5384\u53CB\u53CA\u53CD\u58EC\u5929\u592B\u592A\u592D\u5B54\u5C11\u5C24\u5C3A\u5C6F\u5DF4\u5E7B\u5EFF\u5F14\u5F15\u5FC3\u6208\u6236\u624B\u624E\u652F\u6587\u6597\u65A4\u65B9\u65E5\u66F0\u6708\u6728\u6B20\u6B62\u6B79\u6BCB\u6BD4\u6BDB\u6C0F\u6C34\u706B\u722A\u7236\u723B\u7247\u7259\u725B\u72AC\u738B\u4E19"], + ["a540", "\u4E16\u4E15\u4E14\u4E18\u4E3B\u4E4D\u4E4F\u4E4E\u4EE5\u4ED8\u4ED4\u4ED5\u4ED6\u4ED7\u4EE3\u4EE4\u4ED9\u4EDE\u5145\u5144\u5189\u518A\u51AC\u51F9\u51FA\u51F8\u520A\u52A0\u529F\u5305\u5306\u5317\u531D\u4EDF\u534A\u5349\u5361\u5360\u536F\u536E\u53BB\u53EF\u53E4\u53F3\u53EC\u53EE\u53E9\u53E8\u53FC\u53F8\u53F5\u53EB\u53E6\u53EA\u53F2\u53F1\u53F0\u53E5\u53ED\u53FB\u56DB\u56DA\u5916"], + ["a5a1", "\u592E\u5931\u5974\u5976\u5B55\u5B83\u5C3C\u5DE8\u5DE7\u5DE6\u5E02\u5E03\u5E73\u5E7C\u5F01\u5F18\u5F17\u5FC5\u620A\u6253\u6254\u6252\u6251\u65A5\u65E6\u672E\u672C\u672A\u672B\u672D\u6B63\u6BCD\u6C11\u6C10\u6C38\u6C41\u6C40\u6C3E\u72AF\u7384\u7389\u74DC\u74E6\u7518\u751F\u7528\u7529\u7530\u7531\u7532\u7533\u758B\u767D\u76AE\u76BF\u76EE\u77DB\u77E2\u77F3\u793A\u79BE\u7A74\u7ACB\u4E1E\u4E1F\u4E52\u4E53\u4E69\u4E99\u4EA4\u4EA6\u4EA5\u4EFF\u4F09\u4F19\u4F0A\u4F15\u4F0D\u4F10\u4F11\u4F0F\u4EF2\u4EF6\u4EFB\u4EF0\u4EF3\u4EFD\u4F01\u4F0B\u5149\u5147\u5146\u5148\u5168"], + ["a640", "\u5171\u518D\u51B0\u5217\u5211\u5212\u520E\u5216\u52A3\u5308\u5321\u5320\u5370\u5371\u5409\u540F\u540C\u540A\u5410\u5401\u540B\u5404\u5411\u540D\u5408\u5403\u540E\u5406\u5412\u56E0\u56DE\u56DD\u5733\u5730\u5728\u572D\u572C\u572F\u5729\u5919\u591A\u5937\u5938\u5984\u5978\u5983\u597D\u5979\u5982\u5981\u5B57\u5B58\u5B87\u5B88\u5B85\u5B89\u5BFA\u5C16\u5C79\u5DDE\u5E06\u5E76\u5E74"], + ["a6a1", "\u5F0F\u5F1B\u5FD9\u5FD6\u620E\u620C\u620D\u6210\u6263\u625B\u6258\u6536\u65E9\u65E8\u65EC\u65ED\u66F2\u66F3\u6709\u673D\u6734\u6731\u6735\u6B21\u6B64\u6B7B\u6C16\u6C5D\u6C57\u6C59\u6C5F\u6C60\u6C50\u6C55\u6C61\u6C5B\u6C4D\u6C4E\u7070\u725F\u725D\u767E\u7AF9\u7C73\u7CF8\u7F36\u7F8A\u7FBD\u8001\u8003\u800C\u8012\u8033\u807F\u8089\u808B\u808C\u81E3\u81EA\u81F3\u81FC\u820C\u821B\u821F\u826E\u8272\u827E\u866B\u8840\u884C\u8863\u897F\u9621\u4E32\u4EA8\u4F4D\u4F4F\u4F47\u4F57\u4F5E\u4F34\u4F5B\u4F55\u4F30\u4F50\u4F51\u4F3D\u4F3A\u4F38\u4F43\u4F54\u4F3C\u4F46\u4F63"], + ["a740", "\u4F5C\u4F60\u4F2F\u4F4E\u4F36\u4F59\u4F5D\u4F48\u4F5A\u514C\u514B\u514D\u5175\u51B6\u51B7\u5225\u5224\u5229\u522A\u5228\u52AB\u52A9\u52AA\u52AC\u5323\u5373\u5375\u541D\u542D\u541E\u543E\u5426\u544E\u5427\u5446\u5443\u5433\u5448\u5442\u541B\u5429\u544A\u5439\u543B\u5438\u542E\u5435\u5436\u5420\u543C\u5440\u5431\u542B\u541F\u542C\u56EA\u56F0\u56E4\u56EB\u574A\u5751\u5740\u574D"], + ["a7a1", "\u5747\u574E\u573E\u5750\u574F\u573B\u58EF\u593E\u599D\u5992\u59A8\u599E\u59A3\u5999\u5996\u598D\u59A4\u5993\u598A\u59A5\u5B5D\u5B5C\u5B5A\u5B5B\u5B8C\u5B8B\u5B8F\u5C2C\u5C40\u5C41\u5C3F\u5C3E\u5C90\u5C91\u5C94\u5C8C\u5DEB\u5E0C\u5E8F\u5E87\u5E8A\u5EF7\u5F04\u5F1F\u5F64\u5F62\u5F77\u5F79\u5FD8\u5FCC\u5FD7\u5FCD\u5FF1\u5FEB\u5FF8\u5FEA\u6212\u6211\u6284\u6297\u6296\u6280\u6276\u6289\u626D\u628A\u627C\u627E\u6279\u6273\u6292\u626F\u6298\u626E\u6295\u6293\u6291\u6286\u6539\u653B\u6538\u65F1\u66F4\u675F\u674E\u674F\u6750\u6751\u675C\u6756\u675E\u6749\u6746\u6760"], + ["a840", "\u6753\u6757\u6B65\u6BCF\u6C42\u6C5E\u6C99\u6C81\u6C88\u6C89\u6C85\u6C9B\u6C6A\u6C7A\u6C90\u6C70\u6C8C\u6C68\u6C96\u6C92\u6C7D\u6C83\u6C72\u6C7E\u6C74\u6C86\u6C76\u6C8D\u6C94\u6C98\u6C82\u7076\u707C\u707D\u7078\u7262\u7261\u7260\u72C4\u72C2\u7396\u752C\u752B\u7537\u7538\u7682\u76EF\u77E3\u79C1\u79C0\u79BF\u7A76\u7CFB\u7F55\u8096\u8093\u809D\u8098\u809B\u809A\u80B2\u826F\u8292"], + ["a8a1", "\u828B\u828D\u898B\u89D2\u8A00\u8C37\u8C46\u8C55\u8C9D\u8D64\u8D70\u8DB3\u8EAB\u8ECA\u8F9B\u8FB0\u8FC2\u8FC6\u8FC5\u8FC4\u5DE1\u9091\u90A2\u90AA\u90A6\u90A3\u9149\u91C6\u91CC\u9632\u962E\u9631\u962A\u962C\u4E26\u4E56\u4E73\u4E8B\u4E9B\u4E9E\u4EAB\u4EAC\u4F6F\u4F9D\u4F8D\u4F73\u4F7F\u4F6C\u4F9B\u4F8B\u4F86\u4F83\u4F70\u4F75\u4F88\u4F69\u4F7B\u4F96\u4F7E\u4F8F\u4F91\u4F7A\u5154\u5152\u5155\u5169\u5177\u5176\u5178\u51BD\u51FD\u523B\u5238\u5237\u523A\u5230\u522E\u5236\u5241\u52BE\u52BB\u5352\u5354\u5353\u5351\u5366\u5377\u5378\u5379\u53D6\u53D4\u53D7\u5473\u5475"], + ["a940", "\u5496\u5478\u5495\u5480\u547B\u5477\u5484\u5492\u5486\u547C\u5490\u5471\u5476\u548C\u549A\u5462\u5468\u548B\u547D\u548E\u56FA\u5783\u5777\u576A\u5769\u5761\u5766\u5764\u577C\u591C\u5949\u5947\u5948\u5944\u5954\u59BE\u59BB\u59D4\u59B9\u59AE\u59D1\u59C6\u59D0\u59CD\u59CB\u59D3\u59CA\u59AF\u59B3\u59D2\u59C5\u5B5F\u5B64\u5B63\u5B97\u5B9A\u5B98\u5B9C\u5B99\u5B9B\u5C1A\u5C48\u5C45"], + ["a9a1", "\u5C46\u5CB7\u5CA1\u5CB8\u5CA9\u5CAB\u5CB1\u5CB3\u5E18\u5E1A\u5E16\u5E15\u5E1B\u5E11\u5E78\u5E9A\u5E97\u5E9C\u5E95\u5E96\u5EF6\u5F26\u5F27\u5F29\u5F80\u5F81\u5F7F\u5F7C\u5FDD\u5FE0\u5FFD\u5FF5\u5FFF\u600F\u6014\u602F\u6035\u6016\u602A\u6015\u6021\u6027\u6029\u602B\u601B\u6216\u6215\u623F\u623E\u6240\u627F\u62C9\u62CC\u62C4\u62BF\u62C2\u62B9\u62D2\u62DB\u62AB\u62D3\u62D4\u62CB\u62C8\u62A8\u62BD\u62BC\u62D0\u62D9\u62C7\u62CD\u62B5\u62DA\u62B1\u62D8\u62D6\u62D7\u62C6\u62AC\u62CE\u653E\u65A7\u65BC\u65FA\u6614\u6613\u660C\u6606\u6602\u660E\u6600\u660F\u6615\u660A"], + ["aa40", "\u6607\u670D\u670B\u676D\u678B\u6795\u6771\u679C\u6773\u6777\u6787\u679D\u6797\u676F\u6770\u677F\u6789\u677E\u6790\u6775\u679A\u6793\u677C\u676A\u6772\u6B23\u6B66\u6B67\u6B7F\u6C13\u6C1B\u6CE3\u6CE8\u6CF3\u6CB1\u6CCC\u6CE5\u6CB3\u6CBD\u6CBE\u6CBC\u6CE2\u6CAB\u6CD5\u6CD3\u6CB8\u6CC4\u6CB9\u6CC1\u6CAE\u6CD7\u6CC5\u6CF1\u6CBF\u6CBB\u6CE1\u6CDB\u6CCA\u6CAC\u6CEF\u6CDC\u6CD6\u6CE0"], + ["aaa1", "\u7095\u708E\u7092\u708A\u7099\u722C\u722D\u7238\u7248\u7267\u7269\u72C0\u72CE\u72D9\u72D7\u72D0\u73A9\u73A8\u739F\u73AB\u73A5\u753D\u759D\u7599\u759A\u7684\u76C2\u76F2\u76F4\u77E5\u77FD\u793E\u7940\u7941\u79C9\u79C8\u7A7A\u7A79\u7AFA\u7CFE\u7F54\u7F8C\u7F8B\u8005\u80BA\u80A5\u80A2\u80B1\u80A1\u80AB\u80A9\u80B4\u80AA\u80AF\u81E5\u81FE\u820D\u82B3\u829D\u8299\u82AD\u82BD\u829F\u82B9\u82B1\u82AC\u82A5\u82AF\u82B8\u82A3\u82B0\u82BE\u82B7\u864E\u8671\u521D\u8868\u8ECB\u8FCE\u8FD4\u8FD1\u90B5\u90B8\u90B1\u90B6\u91C7\u91D1\u9577\u9580\u961C\u9640\u963F\u963B\u9644"], + ["ab40", "\u9642\u96B9\u96E8\u9752\u975E\u4E9F\u4EAD\u4EAE\u4FE1\u4FB5\u4FAF\u4FBF\u4FE0\u4FD1\u4FCF\u4FDD\u4FC3\u4FB6\u4FD8\u4FDF\u4FCA\u4FD7\u4FAE\u4FD0\u4FC4\u4FC2\u4FDA\u4FCE\u4FDE\u4FB7\u5157\u5192\u5191\u51A0\u524E\u5243\u524A\u524D\u524C\u524B\u5247\u52C7\u52C9\u52C3\u52C1\u530D\u5357\u537B\u539A\u53DB\u54AC\u54C0\u54A8\u54CE\u54C9\u54B8\u54A6\u54B3\u54C7\u54C2\u54BD\u54AA\u54C1"], + ["aba1", "\u54C4\u54C8\u54AF\u54AB\u54B1\u54BB\u54A9\u54A7\u54BF\u56FF\u5782\u578B\u57A0\u57A3\u57A2\u57CE\u57AE\u5793\u5955\u5951\u594F\u594E\u5950\u59DC\u59D8\u59FF\u59E3\u59E8\u5A03\u59E5\u59EA\u59DA\u59E6\u5A01\u59FB\u5B69\u5BA3\u5BA6\u5BA4\u5BA2\u5BA5\u5C01\u5C4E\u5C4F\u5C4D\u5C4B\u5CD9\u5CD2\u5DF7\u5E1D\u5E25\u5E1F\u5E7D\u5EA0\u5EA6\u5EFA\u5F08\u5F2D\u5F65\u5F88\u5F85\u5F8A\u5F8B\u5F87\u5F8C\u5F89\u6012\u601D\u6020\u6025\u600E\u6028\u604D\u6070\u6068\u6062\u6046\u6043\u606C\u606B\u606A\u6064\u6241\u62DC\u6316\u6309\u62FC\u62ED\u6301\u62EE\u62FD\u6307\u62F1\u62F7"], + ["ac40", "\u62EF\u62EC\u62FE\u62F4\u6311\u6302\u653F\u6545\u65AB\u65BD\u65E2\u6625\u662D\u6620\u6627\u662F\u661F\u6628\u6631\u6624\u66F7\u67FF\u67D3\u67F1\u67D4\u67D0\u67EC\u67B6\u67AF\u67F5\u67E9\u67EF\u67C4\u67D1\u67B4\u67DA\u67E5\u67B8\u67CF\u67DE\u67F3\u67B0\u67D9\u67E2\u67DD\u67D2\u6B6A\u6B83\u6B86\u6BB5\u6BD2\u6BD7\u6C1F\u6CC9\u6D0B\u6D32\u6D2A\u6D41\u6D25\u6D0C\u6D31\u6D1E\u6D17"], + ["aca1", "\u6D3B\u6D3D\u6D3E\u6D36\u6D1B\u6CF5\u6D39\u6D27\u6D38\u6D29\u6D2E\u6D35\u6D0E\u6D2B\u70AB\u70BA\u70B3\u70AC\u70AF\u70AD\u70B8\u70AE\u70A4\u7230\u7272\u726F\u7274\u72E9\u72E0\u72E1\u73B7\u73CA\u73BB\u73B2\u73CD\u73C0\u73B3\u751A\u752D\u754F\u754C\u754E\u754B\u75AB\u75A4\u75A5\u75A2\u75A3\u7678\u7686\u7687\u7688\u76C8\u76C6\u76C3\u76C5\u7701\u76F9\u76F8\u7709\u770B\u76FE\u76FC\u7707\u77DC\u7802\u7814\u780C\u780D\u7946\u7949\u7948\u7947\u79B9\u79BA\u79D1\u79D2\u79CB\u7A7F\u7A81\u7AFF\u7AFD\u7C7D\u7D02\u7D05\u7D00\u7D09\u7D07\u7D04\u7D06\u7F38\u7F8E\u7FBF\u8004"], + ["ad40", "\u8010\u800D\u8011\u8036\u80D6\u80E5\u80DA\u80C3\u80C4\u80CC\u80E1\u80DB\u80CE\u80DE\u80E4\u80DD\u81F4\u8222\u82E7\u8303\u8305\u82E3\u82DB\u82E6\u8304\u82E5\u8302\u8309\u82D2\u82D7\u82F1\u8301\u82DC\u82D4\u82D1\u82DE\u82D3\u82DF\u82EF\u8306\u8650\u8679\u867B\u867A\u884D\u886B\u8981\u89D4\u8A08\u8A02\u8A03\u8C9E\u8CA0\u8D74\u8D73\u8DB4\u8ECD\u8ECC\u8FF0\u8FE6\u8FE2\u8FEA\u8FE5"], + ["ada1", "\u8FED\u8FEB\u8FE4\u8FE8\u90CA\u90CE\u90C1\u90C3\u914B\u914A\u91CD\u9582\u9650\u964B\u964C\u964D\u9762\u9769\u97CB\u97ED\u97F3\u9801\u98A8\u98DB\u98DF\u9996\u9999\u4E58\u4EB3\u500C\u500D\u5023\u4FEF\u5026\u5025\u4FF8\u5029\u5016\u5006\u503C\u501F\u501A\u5012\u5011\u4FFA\u5000\u5014\u5028\u4FF1\u5021\u500B\u5019\u5018\u4FF3\u4FEE\u502D\u502A\u4FFE\u502B\u5009\u517C\u51A4\u51A5\u51A2\u51CD\u51CC\u51C6\u51CB\u5256\u525C\u5254\u525B\u525D\u532A\u537F\u539F\u539D\u53DF\u54E8\u5510\u5501\u5537\u54FC\u54E5\u54F2\u5506\u54FA\u5514\u54E9\u54ED\u54E1\u5509\u54EE\u54EA"], + ["ae40", "\u54E6\u5527\u5507\u54FD\u550F\u5703\u5704\u57C2\u57D4\u57CB\u57C3\u5809\u590F\u5957\u5958\u595A\u5A11\u5A18\u5A1C\u5A1F\u5A1B\u5A13\u59EC\u5A20\u5A23\u5A29\u5A25\u5A0C\u5A09\u5B6B\u5C58\u5BB0\u5BB3\u5BB6\u5BB4\u5BAE\u5BB5\u5BB9\u5BB8\u5C04\u5C51\u5C55\u5C50\u5CED\u5CFD\u5CFB\u5CEA\u5CE8\u5CF0\u5CF6\u5D01\u5CF4\u5DEE\u5E2D\u5E2B\u5EAB\u5EAD\u5EA7\u5F31\u5F92\u5F91\u5F90\u6059"], + ["aea1", "\u6063\u6065\u6050\u6055\u606D\u6069\u606F\u6084\u609F\u609A\u608D\u6094\u608C\u6085\u6096\u6247\u62F3\u6308\u62FF\u634E\u633E\u632F\u6355\u6342\u6346\u634F\u6349\u633A\u6350\u633D\u632A\u632B\u6328\u634D\u634C\u6548\u6549\u6599\u65C1\u65C5\u6642\u6649\u664F\u6643\u6652\u664C\u6645\u6641\u66F8\u6714\u6715\u6717\u6821\u6838\u6848\u6846\u6853\u6839\u6842\u6854\u6829\u68B3\u6817\u684C\u6851\u683D\u67F4\u6850\u6840\u683C\u6843\u682A\u6845\u6813\u6818\u6841\u6B8A\u6B89\u6BB7\u6C23\u6C27\u6C28\u6C26\u6C24\u6CF0\u6D6A\u6D95\u6D88\u6D87\u6D66\u6D78\u6D77\u6D59\u6D93"], + ["af40", "\u6D6C\u6D89\u6D6E\u6D5A\u6D74\u6D69\u6D8C\u6D8A\u6D79\u6D85\u6D65\u6D94\u70CA\u70D8\u70E4\u70D9\u70C8\u70CF\u7239\u7279\u72FC\u72F9\u72FD\u72F8\u72F7\u7386\u73ED\u7409\u73EE\u73E0\u73EA\u73DE\u7554\u755D\u755C\u755A\u7559\u75BE\u75C5\u75C7\u75B2\u75B3\u75BD\u75BC\u75B9\u75C2\u75B8\u768B\u76B0\u76CA\u76CD\u76CE\u7729\u771F\u7720\u7728\u77E9\u7830\u7827\u7838\u781D\u7834\u7837"], + ["afa1", "\u7825\u782D\u7820\u781F\u7832\u7955\u7950\u7960\u795F\u7956\u795E\u795D\u7957\u795A\u79E4\u79E3\u79E7\u79DF\u79E6\u79E9\u79D8\u7A84\u7A88\u7AD9\u7B06\u7B11\u7C89\u7D21\u7D17\u7D0B\u7D0A\u7D20\u7D22\u7D14\u7D10\u7D15\u7D1A\u7D1C\u7D0D\u7D19\u7D1B\u7F3A\u7F5F\u7F94\u7FC5\u7FC1\u8006\u8018\u8015\u8019\u8017\u803D\u803F\u80F1\u8102\u80F0\u8105\u80ED\u80F4\u8106\u80F8\u80F3\u8108\u80FD\u810A\u80FC\u80EF\u81ED\u81EC\u8200\u8210\u822A\u822B\u8228\u822C\u82BB\u832B\u8352\u8354\u834A\u8338\u8350\u8349\u8335\u8334\u834F\u8332\u8339\u8336\u8317\u8340\u8331\u8328\u8343"], + ["b040", "\u8654\u868A\u86AA\u8693\u86A4\u86A9\u868C\u86A3\u869C\u8870\u8877\u8881\u8882\u887D\u8879\u8A18\u8A10\u8A0E\u8A0C\u8A15\u8A0A\u8A17\u8A13\u8A16\u8A0F\u8A11\u8C48\u8C7A\u8C79\u8CA1\u8CA2\u8D77\u8EAC\u8ED2\u8ED4\u8ECF\u8FB1\u9001\u9006\u8FF7\u9000\u8FFA\u8FF4\u9003\u8FFD\u9005\u8FF8\u9095\u90E1\u90DD\u90E2\u9152\u914D\u914C\u91D8\u91DD\u91D7\u91DC\u91D9\u9583\u9662\u9663\u9661"], + ["b0a1", "\u965B\u965D\u9664\u9658\u965E\u96BB\u98E2\u99AC\u9AA8\u9AD8\u9B25\u9B32\u9B3C\u4E7E\u507A\u507D\u505C\u5047\u5043\u504C\u505A\u5049\u5065\u5076\u504E\u5055\u5075\u5074\u5077\u504F\u500F\u506F\u506D\u515C\u5195\u51F0\u526A\u526F\u52D2\u52D9\u52D8\u52D5\u5310\u530F\u5319\u533F\u5340\u533E\u53C3\u66FC\u5546\u556A\u5566\u5544\u555E\u5561\u5543\u554A\u5531\u5556\u554F\u5555\u552F\u5564\u5538\u552E\u555C\u552C\u5563\u5533\u5541\u5557\u5708\u570B\u5709\u57DF\u5805\u580A\u5806\u57E0\u57E4\u57FA\u5802\u5835\u57F7\u57F9\u5920\u5962\u5A36\u5A41\u5A49\u5A66\u5A6A\u5A40"], + ["b140", "\u5A3C\u5A62\u5A5A\u5A46\u5A4A\u5B70\u5BC7\u5BC5\u5BC4\u5BC2\u5BBF\u5BC6\u5C09\u5C08\u5C07\u5C60\u5C5C\u5C5D\u5D07\u5D06\u5D0E\u5D1B\u5D16\u5D22\u5D11\u5D29\u5D14\u5D19\u5D24\u5D27\u5D17\u5DE2\u5E38\u5E36\u5E33\u5E37\u5EB7\u5EB8\u5EB6\u5EB5\u5EBE\u5F35\u5F37\u5F57\u5F6C\u5F69\u5F6B\u5F97\u5F99\u5F9E\u5F98\u5FA1\u5FA0\u5F9C\u607F\u60A3\u6089\u60A0\u60A8\u60CB\u60B4\u60E6\u60BD"], + ["b1a1", "\u60C5\u60BB\u60B5\u60DC\u60BC\u60D8\u60D5\u60C6\u60DF\u60B8\u60DA\u60C7\u621A\u621B\u6248\u63A0\u63A7\u6372\u6396\u63A2\u63A5\u6377\u6367\u6398\u63AA\u6371\u63A9\u6389\u6383\u639B\u636B\u63A8\u6384\u6388\u6399\u63A1\u63AC\u6392\u638F\u6380\u637B\u6369\u6368\u637A\u655D\u6556\u6551\u6559\u6557\u555F\u654F\u6558\u6555\u6554\u659C\u659B\u65AC\u65CF\u65CB\u65CC\u65CE\u665D\u665A\u6664\u6668\u6666\u665E\u66F9\u52D7\u671B\u6881\u68AF\u68A2\u6893\u68B5\u687F\u6876\u68B1\u68A7\u6897\u68B0\u6883\u68C4\u68AD\u6886\u6885\u6894\u689D\u68A8\u689F\u68A1\u6882\u6B32\u6BBA"], + ["b240", "\u6BEB\u6BEC\u6C2B\u6D8E\u6DBC\u6DF3\u6DD9\u6DB2\u6DE1\u6DCC\u6DE4\u6DFB\u6DFA\u6E05\u6DC7\u6DCB\u6DAF\u6DD1\u6DAE\u6DDE\u6DF9\u6DB8\u6DF7\u6DF5\u6DC5\u6DD2\u6E1A\u6DB5\u6DDA\u6DEB\u6DD8\u6DEA\u6DF1\u6DEE\u6DE8\u6DC6\u6DC4\u6DAA\u6DEC\u6DBF\u6DE6\u70F9\u7109\u710A\u70FD\u70EF\u723D\u727D\u7281\u731C\u731B\u7316\u7313\u7319\u7387\u7405\u740A\u7403\u7406\u73FE\u740D\u74E0\u74F6"], + ["b2a1", "\u74F7\u751C\u7522\u7565\u7566\u7562\u7570\u758F\u75D4\u75D5\u75B5\u75CA\u75CD\u768E\u76D4\u76D2\u76DB\u7737\u773E\u773C\u7736\u7738\u773A\u786B\u7843\u784E\u7965\u7968\u796D\u79FB\u7A92\u7A95\u7B20\u7B28\u7B1B\u7B2C\u7B26\u7B19\u7B1E\u7B2E\u7C92\u7C97\u7C95\u7D46\u7D43\u7D71\u7D2E\u7D39\u7D3C\u7D40\u7D30\u7D33\u7D44\u7D2F\u7D42\u7D32\u7D31\u7F3D\u7F9E\u7F9A\u7FCC\u7FCE\u7FD2\u801C\u804A\u8046\u812F\u8116\u8123\u812B\u8129\u8130\u8124\u8202\u8235\u8237\u8236\u8239\u838E\u839E\u8398\u8378\u83A2\u8396\u83BD\u83AB\u8392\u838A\u8393\u8389\u83A0\u8377\u837B\u837C"], + ["b340", "\u8386\u83A7\u8655\u5F6A\u86C7\u86C0\u86B6\u86C4\u86B5\u86C6\u86CB\u86B1\u86AF\u86C9\u8853\u889E\u8888\u88AB\u8892\u8896\u888D\u888B\u8993\u898F\u8A2A\u8A1D\u8A23\u8A25\u8A31\u8A2D\u8A1F\u8A1B\u8A22\u8C49\u8C5A\u8CA9\u8CAC\u8CAB\u8CA8\u8CAA\u8CA7\u8D67\u8D66\u8DBE\u8DBA\u8EDB\u8EDF\u9019\u900D\u901A\u9017\u9023\u901F\u901D\u9010\u9015\u901E\u9020\u900F\u9022\u9016\u901B\u9014"], + ["b3a1", "\u90E8\u90ED\u90FD\u9157\u91CE\u91F5\u91E6\u91E3\u91E7\u91ED\u91E9\u9589\u966A\u9675\u9673\u9678\u9670\u9674\u9676\u9677\u966C\u96C0\u96EA\u96E9\u7AE0\u7ADF\u9802\u9803\u9B5A\u9CE5\u9E75\u9E7F\u9EA5\u9EBB\u50A2\u508D\u5085\u5099\u5091\u5080\u5096\u5098\u509A\u6700\u51F1\u5272\u5274\u5275\u5269\u52DE\u52DD\u52DB\u535A\u53A5\u557B\u5580\u55A7\u557C\u558A\u559D\u5598\u5582\u559C\u55AA\u5594\u5587\u558B\u5583\u55B3\u55AE\u559F\u553E\u55B2\u559A\u55BB\u55AC\u55B1\u557E\u5589\u55AB\u5599\u570D\u582F\u582A\u5834\u5824\u5830\u5831\u5821\u581D\u5820\u58F9\u58FA\u5960"], + ["b440", "\u5A77\u5A9A\u5A7F\u5A92\u5A9B\u5AA7\u5B73\u5B71\u5BD2\u5BCC\u5BD3\u5BD0\u5C0A\u5C0B\u5C31\u5D4C\u5D50\u5D34\u5D47\u5DFD\u5E45\u5E3D\u5E40\u5E43\u5E7E\u5ECA\u5EC1\u5EC2\u5EC4\u5F3C\u5F6D\u5FA9\u5FAA\u5FA8\u60D1\u60E1\u60B2\u60B6\u60E0\u611C\u6123\u60FA\u6115\u60F0\u60FB\u60F4\u6168\u60F1\u610E\u60F6\u6109\u6100\u6112\u621F\u6249\u63A3\u638C\u63CF\u63C0\u63E9\u63C9\u63C6\u63CD"], + ["b4a1", "\u63D2\u63E3\u63D0\u63E1\u63D6\u63ED\u63EE\u6376\u63F4\u63EA\u63DB\u6452\u63DA\u63F9\u655E\u6566\u6562\u6563\u6591\u6590\u65AF\u666E\u6670\u6674\u6676\u666F\u6691\u667A\u667E\u6677\u66FE\u66FF\u671F\u671D\u68FA\u68D5\u68E0\u68D8\u68D7\u6905\u68DF\u68F5\u68EE\u68E7\u68F9\u68D2\u68F2\u68E3\u68CB\u68CD\u690D\u6912\u690E\u68C9\u68DA\u696E\u68FB\u6B3E\u6B3A\u6B3D\u6B98\u6B96\u6BBC\u6BEF\u6C2E\u6C2F\u6C2C\u6E2F\u6E38\u6E54\u6E21\u6E32\u6E67\u6E4A\u6E20\u6E25\u6E23\u6E1B\u6E5B\u6E58\u6E24\u6E56\u6E6E\u6E2D\u6E26\u6E6F\u6E34\u6E4D\u6E3A\u6E2C\u6E43\u6E1D\u6E3E\u6ECB"], + ["b540", "\u6E89\u6E19\u6E4E\u6E63\u6E44\u6E72\u6E69\u6E5F\u7119\u711A\u7126\u7130\u7121\u7136\u716E\u711C\u724C\u7284\u7280\u7336\u7325\u7334\u7329\u743A\u742A\u7433\u7422\u7425\u7435\u7436\u7434\u742F\u741B\u7426\u7428\u7525\u7526\u756B\u756A\u75E2\u75DB\u75E3\u75D9\u75D8\u75DE\u75E0\u767B\u767C\u7696\u7693\u76B4\u76DC\u774F\u77ED\u785D\u786C\u786F\u7A0D\u7A08\u7A0B\u7A05\u7A00\u7A98"], + ["b5a1", "\u7A97\u7A96\u7AE5\u7AE3\u7B49\u7B56\u7B46\u7B50\u7B52\u7B54\u7B4D\u7B4B\u7B4F\u7B51\u7C9F\u7CA5\u7D5E\u7D50\u7D68\u7D55\u7D2B\u7D6E\u7D72\u7D61\u7D66\u7D62\u7D70\u7D73\u5584\u7FD4\u7FD5\u800B\u8052\u8085\u8155\u8154\u814B\u8151\u814E\u8139\u8146\u813E\u814C\u8153\u8174\u8212\u821C\u83E9\u8403\u83F8\u840D\u83E0\u83C5\u840B\u83C1\u83EF\u83F1\u83F4\u8457\u840A\u83F0\u840C\u83CC\u83FD\u83F2\u83CA\u8438\u840E\u8404\u83DC\u8407\u83D4\u83DF\u865B\u86DF\u86D9\u86ED\u86D4\u86DB\u86E4\u86D0\u86DE\u8857\u88C1\u88C2\u88B1\u8983\u8996\u8A3B\u8A60\u8A55\u8A5E\u8A3C\u8A41"], + ["b640", "\u8A54\u8A5B\u8A50\u8A46\u8A34\u8A3A\u8A36\u8A56\u8C61\u8C82\u8CAF\u8CBC\u8CB3\u8CBD\u8CC1\u8CBB\u8CC0\u8CB4\u8CB7\u8CB6\u8CBF\u8CB8\u8D8A\u8D85\u8D81\u8DCE\u8DDD\u8DCB\u8DDA\u8DD1\u8DCC\u8DDB\u8DC6\u8EFB\u8EF8\u8EFC\u8F9C\u902E\u9035\u9031\u9038\u9032\u9036\u9102\u90F5\u9109\u90FE\u9163\u9165\u91CF\u9214\u9215\u9223\u9209\u921E\u920D\u9210\u9207\u9211\u9594\u958F\u958B\u9591"], + ["b6a1", "\u9593\u9592\u958E\u968A\u968E\u968B\u967D\u9685\u9686\u968D\u9672\u9684\u96C1\u96C5\u96C4\u96C6\u96C7\u96EF\u96F2\u97CC\u9805\u9806\u9808\u98E7\u98EA\u98EF\u98E9\u98F2\u98ED\u99AE\u99AD\u9EC3\u9ECD\u9ED1\u4E82\u50AD\u50B5\u50B2\u50B3\u50C5\u50BE\u50AC\u50B7\u50BB\u50AF\u50C7\u527F\u5277\u527D\u52DF\u52E6\u52E4\u52E2\u52E3\u532F\u55DF\u55E8\u55D3\u55E6\u55CE\u55DC\u55C7\u55D1\u55E3\u55E4\u55EF\u55DA\u55E1\u55C5\u55C6\u55E5\u55C9\u5712\u5713\u585E\u5851\u5858\u5857\u585A\u5854\u586B\u584C\u586D\u584A\u5862\u5852\u584B\u5967\u5AC1\u5AC9\u5ACC\u5ABE\u5ABD\u5ABC"], + ["b740", "\u5AB3\u5AC2\u5AB2\u5D69\u5D6F\u5E4C\u5E79\u5EC9\u5EC8\u5F12\u5F59\u5FAC\u5FAE\u611A\u610F\u6148\u611F\u60F3\u611B\u60F9\u6101\u6108\u614E\u614C\u6144\u614D\u613E\u6134\u6127\u610D\u6106\u6137\u6221\u6222\u6413\u643E\u641E\u642A\u642D\u643D\u642C\u640F\u641C\u6414\u640D\u6436\u6416\u6417\u6406\u656C\u659F\u65B0\u6697\u6689\u6687\u6688\u6696\u6684\u6698\u668D\u6703\u6994\u696D"], + ["b7a1", "\u695A\u6977\u6960\u6954\u6975\u6930\u6982\u694A\u6968\u696B\u695E\u6953\u6979\u6986\u695D\u6963\u695B\u6B47\u6B72\u6BC0\u6BBF\u6BD3\u6BFD\u6EA2\u6EAF\u6ED3\u6EB6\u6EC2\u6E90\u6E9D\u6EC7\u6EC5\u6EA5\u6E98\u6EBC\u6EBA\u6EAB\u6ED1\u6E96\u6E9C\u6EC4\u6ED4\u6EAA\u6EA7\u6EB4\u714E\u7159\u7169\u7164\u7149\u7167\u715C\u716C\u7166\u714C\u7165\u715E\u7146\u7168\u7156\u723A\u7252\u7337\u7345\u733F\u733E\u746F\u745A\u7455\u745F\u745E\u7441\u743F\u7459\u745B\u745C\u7576\u7578\u7600\u75F0\u7601\u75F2\u75F1\u75FA\u75FF\u75F4\u75F3\u76DE\u76DF\u775B\u776B\u7766\u775E\u7763"], + ["b840", "\u7779\u776A\u776C\u775C\u7765\u7768\u7762\u77EE\u788E\u78B0\u7897\u7898\u788C\u7889\u787C\u7891\u7893\u787F\u797A\u797F\u7981\u842C\u79BD\u7A1C\u7A1A\u7A20\u7A14\u7A1F\u7A1E\u7A9F\u7AA0\u7B77\u7BC0\u7B60\u7B6E\u7B67\u7CB1\u7CB3\u7CB5\u7D93\u7D79\u7D91\u7D81\u7D8F\u7D5B\u7F6E\u7F69\u7F6A\u7F72\u7FA9\u7FA8\u7FA4\u8056\u8058\u8086\u8084\u8171\u8170\u8178\u8165\u816E\u8173\u816B"], + ["b8a1", "\u8179\u817A\u8166\u8205\u8247\u8482\u8477\u843D\u8431\u8475\u8466\u846B\u8449\u846C\u845B\u843C\u8435\u8461\u8463\u8469\u846D\u8446\u865E\u865C\u865F\u86F9\u8713\u8708\u8707\u8700\u86FE\u86FB\u8702\u8703\u8706\u870A\u8859\u88DF\u88D4\u88D9\u88DC\u88D8\u88DD\u88E1\u88CA\u88D5\u88D2\u899C\u89E3\u8A6B\u8A72\u8A73\u8A66\u8A69\u8A70\u8A87\u8A7C\u8A63\u8AA0\u8A71\u8A85\u8A6D\u8A62\u8A6E\u8A6C\u8A79\u8A7B\u8A3E\u8A68\u8C62\u8C8A\u8C89\u8CCA\u8CC7\u8CC8\u8CC4\u8CB2\u8CC3\u8CC2\u8CC5\u8DE1\u8DDF\u8DE8\u8DEF\u8DF3\u8DFA\u8DEA\u8DE4\u8DE6\u8EB2\u8F03\u8F09\u8EFE\u8F0A"], + ["b940", "\u8F9F\u8FB2\u904B\u904A\u9053\u9042\u9054\u903C\u9055\u9050\u9047\u904F\u904E\u904D\u9051\u903E\u9041\u9112\u9117\u916C\u916A\u9169\u91C9\u9237\u9257\u9238\u923D\u9240\u923E\u925B\u924B\u9264\u9251\u9234\u9249\u924D\u9245\u9239\u923F\u925A\u9598\u9698\u9694\u9695\u96CD\u96CB\u96C9\u96CA\u96F7\u96FB\u96F9\u96F6\u9756\u9774\u9776\u9810\u9811\u9813\u980A\u9812\u980C\u98FC\u98F4"], + ["b9a1", "\u98FD\u98FE\u99B3\u99B1\u99B4\u9AE1\u9CE9\u9E82\u9F0E\u9F13\u9F20\u50E7\u50EE\u50E5\u50D6\u50ED\u50DA\u50D5\u50CF\u50D1\u50F1\u50CE\u50E9\u5162\u51F3\u5283\u5282\u5331\u53AD\u55FE\u5600\u561B\u5617\u55FD\u5614\u5606\u5609\u560D\u560E\u55F7\u5616\u561F\u5608\u5610\u55F6\u5718\u5716\u5875\u587E\u5883\u5893\u588A\u5879\u5885\u587D\u58FD\u5925\u5922\u5924\u596A\u5969\u5AE1\u5AE6\u5AE9\u5AD7\u5AD6\u5AD8\u5AE3\u5B75\u5BDE\u5BE7\u5BE1\u5BE5\u5BE6\u5BE8\u5BE2\u5BE4\u5BDF\u5C0D\u5C62\u5D84\u5D87\u5E5B\u5E63\u5E55\u5E57\u5E54\u5ED3\u5ED6\u5F0A\u5F46\u5F70\u5FB9\u6147"], + ["ba40", "\u613F\u614B\u6177\u6162\u6163\u615F\u615A\u6158\u6175\u622A\u6487\u6458\u6454\u64A4\u6478\u645F\u647A\u6451\u6467\u6434\u646D\u647B\u6572\u65A1\u65D7\u65D6\u66A2\u66A8\u669D\u699C\u69A8\u6995\u69C1\u69AE\u69D3\u69CB\u699B\u69B7\u69BB\u69AB\u69B4\u69D0\u69CD\u69AD\u69CC\u69A6\u69C3\u69A3\u6B49\u6B4C\u6C33\u6F33\u6F14\u6EFE\u6F13\u6EF4\u6F29\u6F3E\u6F20\u6F2C\u6F0F\u6F02\u6F22"], + ["baa1", "\u6EFF\u6EEF\u6F06\u6F31\u6F38\u6F32\u6F23\u6F15\u6F2B\u6F2F\u6F88\u6F2A\u6EEC\u6F01\u6EF2\u6ECC\u6EF7\u7194\u7199\u717D\u718A\u7184\u7192\u723E\u7292\u7296\u7344\u7350\u7464\u7463\u746A\u7470\u746D\u7504\u7591\u7627\u760D\u760B\u7609\u7613\u76E1\u76E3\u7784\u777D\u777F\u7761\u78C1\u789F\u78A7\u78B3\u78A9\u78A3\u798E\u798F\u798D\u7A2E\u7A31\u7AAA\u7AA9\u7AED\u7AEF\u7BA1\u7B95\u7B8B\u7B75\u7B97\u7B9D\u7B94\u7B8F\u7BB8\u7B87\u7B84\u7CB9\u7CBD\u7CBE\u7DBB\u7DB0\u7D9C\u7DBD\u7DBE\u7DA0\u7DCA\u7DB4\u7DB2\u7DB1\u7DBA\u7DA2\u7DBF\u7DB5\u7DB8\u7DAD\u7DD2\u7DC7\u7DAC"], + ["bb40", "\u7F70\u7FE0\u7FE1\u7FDF\u805E\u805A\u8087\u8150\u8180\u818F\u8188\u818A\u817F\u8182\u81E7\u81FA\u8207\u8214\u821E\u824B\u84C9\u84BF\u84C6\u84C4\u8499\u849E\u84B2\u849C\u84CB\u84B8\u84C0\u84D3\u8490\u84BC\u84D1\u84CA\u873F\u871C\u873B\u8722\u8725\u8734\u8718\u8755\u8737\u8729\u88F3\u8902\u88F4\u88F9\u88F8\u88FD\u88E8\u891A\u88EF\u8AA6\u8A8C\u8A9E\u8AA3\u8A8D\u8AA1\u8A93\u8AA4"], + ["bba1", "\u8AAA\u8AA5\u8AA8\u8A98\u8A91\u8A9A\u8AA7\u8C6A\u8C8D\u8C8C\u8CD3\u8CD1\u8CD2\u8D6B\u8D99\u8D95\u8DFC\u8F14\u8F12\u8F15\u8F13\u8FA3\u9060\u9058\u905C\u9063\u9059\u905E\u9062\u905D\u905B\u9119\u9118\u911E\u9175\u9178\u9177\u9174\u9278\u9280\u9285\u9298\u9296\u927B\u9293\u929C\u92A8\u927C\u9291\u95A1\u95A8\u95A9\u95A3\u95A5\u95A4\u9699\u969C\u969B\u96CC\u96D2\u9700\u977C\u9785\u97F6\u9817\u9818\u98AF\u98B1\u9903\u9905\u990C\u9909\u99C1\u9AAF\u9AB0\u9AE6\u9B41\u9B42\u9CF4\u9CF6\u9CF3\u9EBC\u9F3B\u9F4A\u5104\u5100\u50FB\u50F5\u50F9\u5102\u5108\u5109\u5105\u51DC"], + ["bc40", "\u5287\u5288\u5289\u528D\u528A\u52F0\u53B2\u562E\u563B\u5639\u5632\u563F\u5634\u5629\u5653\u564E\u5657\u5674\u5636\u562F\u5630\u5880\u589F\u589E\u58B3\u589C\u58AE\u58A9\u58A6\u596D\u5B09\u5AFB\u5B0B\u5AF5\u5B0C\u5B08\u5BEE\u5BEC\u5BE9\u5BEB\u5C64\u5C65\u5D9D\u5D94\u5E62\u5E5F\u5E61\u5EE2\u5EDA\u5EDF\u5EDD\u5EE3\u5EE0\u5F48\u5F71\u5FB7\u5FB5\u6176\u6167\u616E\u615D\u6155\u6182"], + ["bca1", "\u617C\u6170\u616B\u617E\u61A7\u6190\u61AB\u618E\u61AC\u619A\u61A4\u6194\u61AE\u622E\u6469\u646F\u6479\u649E\u64B2\u6488\u6490\u64B0\u64A5\u6493\u6495\u64A9\u6492\u64AE\u64AD\u64AB\u649A\u64AC\u6499\u64A2\u64B3\u6575\u6577\u6578\u66AE\u66AB\u66B4\u66B1\u6A23\u6A1F\u69E8\u6A01\u6A1E\u6A19\u69FD\u6A21\u6A13\u6A0A\u69F3\u6A02\u6A05\u69ED\u6A11\u6B50\u6B4E\u6BA4\u6BC5\u6BC6\u6F3F\u6F7C\u6F84\u6F51\u6F66\u6F54\u6F86\u6F6D\u6F5B\u6F78\u6F6E\u6F8E\u6F7A\u6F70\u6F64\u6F97\u6F58\u6ED5\u6F6F\u6F60\u6F5F\u719F\u71AC\u71B1\u71A8\u7256\u729B\u734E\u7357\u7469\u748B\u7483"], + ["bd40", "\u747E\u7480\u757F\u7620\u7629\u761F\u7624\u7626\u7621\u7622\u769A\u76BA\u76E4\u778E\u7787\u778C\u7791\u778B\u78CB\u78C5\u78BA\u78CA\u78BE\u78D5\u78BC\u78D0\u7A3F\u7A3C\u7A40\u7A3D\u7A37\u7A3B\u7AAF\u7AAE\u7BAD\u7BB1\u7BC4\u7BB4\u7BC6\u7BC7\u7BC1\u7BA0\u7BCC\u7CCA\u7DE0\u7DF4\u7DEF\u7DFB\u7DD8\u7DEC\u7DDD\u7DE8\u7DE3\u7DDA\u7DDE\u7DE9\u7D9E\u7DD9\u7DF2\u7DF9\u7F75\u7F77\u7FAF"], + ["bda1", "\u7FE9\u8026\u819B\u819C\u819D\u81A0\u819A\u8198\u8517\u853D\u851A\u84EE\u852C\u852D\u8513\u8511\u8523\u8521\u8514\u84EC\u8525\u84FF\u8506\u8782\u8774\u8776\u8760\u8766\u8778\u8768\u8759\u8757\u874C\u8753\u885B\u885D\u8910\u8907\u8912\u8913\u8915\u890A\u8ABC\u8AD2\u8AC7\u8AC4\u8A95\u8ACB\u8AF8\u8AB2\u8AC9\u8AC2\u8ABF\u8AB0\u8AD6\u8ACD\u8AB6\u8AB9\u8ADB\u8C4C\u8C4E\u8C6C\u8CE0\u8CDE\u8CE6\u8CE4\u8CEC\u8CED\u8CE2\u8CE3\u8CDC\u8CEA\u8CE1\u8D6D\u8D9F\u8DA3\u8E2B\u8E10\u8E1D\u8E22\u8E0F\u8E29\u8E1F\u8E21\u8E1E\u8EBA\u8F1D\u8F1B\u8F1F\u8F29\u8F26\u8F2A\u8F1C\u8F1E"], + ["be40", "\u8F25\u9069\u906E\u9068\u906D\u9077\u9130\u912D\u9127\u9131\u9187\u9189\u918B\u9183\u92C5\u92BB\u92B7\u92EA\u92AC\u92E4\u92C1\u92B3\u92BC\u92D2\u92C7\u92F0\u92B2\u95AD\u95B1\u9704\u9706\u9707\u9709\u9760\u978D\u978B\u978F\u9821\u982B\u981C\u98B3\u990A\u9913\u9912\u9918\u99DD\u99D0\u99DF\u99DB\u99D1\u99D5\u99D2\u99D9\u9AB7\u9AEE\u9AEF\u9B27\u9B45\u9B44\u9B77\u9B6F\u9D06\u9D09"], + ["bea1", "\u9D03\u9EA9\u9EBE\u9ECE\u58A8\u9F52\u5112\u5118\u5114\u5110\u5115\u5180\u51AA\u51DD\u5291\u5293\u52F3\u5659\u566B\u5679\u5669\u5664\u5678\u566A\u5668\u5665\u5671\u566F\u566C\u5662\u5676\u58C1\u58BE\u58C7\u58C5\u596E\u5B1D\u5B34\u5B78\u5BF0\u5C0E\u5F4A\u61B2\u6191\u61A9\u618A\u61CD\u61B6\u61BE\u61CA\u61C8\u6230\u64C5\u64C1\u64CB\u64BB\u64BC\u64DA\u64C4\u64C7\u64C2\u64CD\u64BF\u64D2\u64D4\u64BE\u6574\u66C6\u66C9\u66B9\u66C4\u66C7\u66B8\u6A3D\u6A38\u6A3A\u6A59\u6A6B\u6A58\u6A39\u6A44\u6A62\u6A61\u6A4B\u6A47\u6A35\u6A5F\u6A48\u6B59\u6B77\u6C05\u6FC2\u6FB1\u6FA1"], + ["bf40", "\u6FC3\u6FA4\u6FC1\u6FA7\u6FB3\u6FC0\u6FB9\u6FB6\u6FA6\u6FA0\u6FB4\u71BE\u71C9\u71D0\u71D2\u71C8\u71D5\u71B9\u71CE\u71D9\u71DC\u71C3\u71C4\u7368\u749C\u74A3\u7498\u749F\u749E\u74E2\u750C\u750D\u7634\u7638\u763A\u76E7\u76E5\u77A0\u779E\u779F\u77A5\u78E8\u78DA\u78EC\u78E7\u79A6\u7A4D\u7A4E\u7A46\u7A4C\u7A4B\u7ABA\u7BD9\u7C11\u7BC9\u7BE4\u7BDB\u7BE1\u7BE9\u7BE6\u7CD5\u7CD6\u7E0A"], + ["bfa1", "\u7E11\u7E08\u7E1B\u7E23\u7E1E\u7E1D\u7E09\u7E10\u7F79\u7FB2\u7FF0\u7FF1\u7FEE\u8028\u81B3\u81A9\u81A8\u81FB\u8208\u8258\u8259\u854A\u8559\u8548\u8568\u8569\u8543\u8549\u856D\u856A\u855E\u8783\u879F\u879E\u87A2\u878D\u8861\u892A\u8932\u8925\u892B\u8921\u89AA\u89A6\u8AE6\u8AFA\u8AEB\u8AF1\u8B00\u8ADC\u8AE7\u8AEE\u8AFE\u8B01\u8B02\u8AF7\u8AED\u8AF3\u8AF6\u8AFC\u8C6B\u8C6D\u8C93\u8CF4\u8E44\u8E31\u8E34\u8E42\u8E39\u8E35\u8F3B\u8F2F\u8F38\u8F33\u8FA8\u8FA6\u9075\u9074\u9078\u9072\u907C\u907A\u9134\u9192\u9320\u9336\u92F8\u9333\u932F\u9322\u92FC\u932B\u9304\u931A"], + ["c040", "\u9310\u9326\u9321\u9315\u932E\u9319\u95BB\u96A7\u96A8\u96AA\u96D5\u970E\u9711\u9716\u970D\u9713\u970F\u975B\u975C\u9766\u9798\u9830\u9838\u983B\u9837\u982D\u9839\u9824\u9910\u9928\u991E\u991B\u9921\u991A\u99ED\u99E2\u99F1\u9AB8\u9ABC\u9AFB\u9AED\u9B28\u9B91\u9D15\u9D23\u9D26\u9D28\u9D12\u9D1B\u9ED8\u9ED4\u9F8D\u9F9C\u512A\u511F\u5121\u5132\u52F5\u568E\u5680\u5690\u5685\u5687"], + ["c0a1", "\u568F\u58D5\u58D3\u58D1\u58CE\u5B30\u5B2A\u5B24\u5B7A\u5C37\u5C68\u5DBC\u5DBA\u5DBD\u5DB8\u5E6B\u5F4C\u5FBD\u61C9\u61C2\u61C7\u61E6\u61CB\u6232\u6234\u64CE\u64CA\u64D8\u64E0\u64F0\u64E6\u64EC\u64F1\u64E2\u64ED\u6582\u6583\u66D9\u66D6\u6A80\u6A94\u6A84\u6AA2\u6A9C\u6ADB\u6AA3\u6A7E\u6A97\u6A90\u6AA0\u6B5C\u6BAE\u6BDA\u6C08\u6FD8\u6FF1\u6FDF\u6FE0\u6FDB\u6FE4\u6FEB\u6FEF\u6F80\u6FEC\u6FE1\u6FE9\u6FD5\u6FEE\u6FF0\u71E7\u71DF\u71EE\u71E6\u71E5\u71ED\u71EC\u71F4\u71E0\u7235\u7246\u7370\u7372\u74A9\u74B0\u74A6\u74A8\u7646\u7642\u764C\u76EA\u77B3\u77AA\u77B0\u77AC"], + ["c140", "\u77A7\u77AD\u77EF\u78F7\u78FA\u78F4\u78EF\u7901\u79A7\u79AA\u7A57\u7ABF\u7C07\u7C0D\u7BFE\u7BF7\u7C0C\u7BE0\u7CE0\u7CDC\u7CDE\u7CE2\u7CDF\u7CD9\u7CDD\u7E2E\u7E3E\u7E46\u7E37\u7E32\u7E43\u7E2B\u7E3D\u7E31\u7E45\u7E41\u7E34\u7E39\u7E48\u7E35\u7E3F\u7E2F\u7F44\u7FF3\u7FFC\u8071\u8072\u8070\u806F\u8073\u81C6\u81C3\u81BA\u81C2\u81C0\u81BF\u81BD\u81C9\u81BE\u81E8\u8209\u8271\u85AA"], + ["c1a1", "\u8584\u857E\u859C\u8591\u8594\u85AF\u859B\u8587\u85A8\u858A\u8667\u87C0\u87D1\u87B3\u87D2\u87C6\u87AB\u87BB\u87BA\u87C8\u87CB\u893B\u8936\u8944\u8938\u893D\u89AC\u8B0E\u8B17\u8B19\u8B1B\u8B0A\u8B20\u8B1D\u8B04\u8B10\u8C41\u8C3F\u8C73\u8CFA\u8CFD\u8CFC\u8CF8\u8CFB\u8DA8\u8E49\u8E4B\u8E48\u8E4A\u8F44\u8F3E\u8F42\u8F45\u8F3F\u907F\u907D\u9084\u9081\u9082\u9080\u9139\u91A3\u919E\u919C\u934D\u9382\u9328\u9375\u934A\u9365\u934B\u9318\u937E\u936C\u935B\u9370\u935A\u9354\u95CA\u95CB\u95CC\u95C8\u95C6\u96B1\u96B8\u96D6\u971C\u971E\u97A0\u97D3\u9846\u98B6\u9935\u9A01"], + ["c240", "\u99FF\u9BAE\u9BAB\u9BAA\u9BAD\u9D3B\u9D3F\u9E8B\u9ECF\u9EDE\u9EDC\u9EDD\u9EDB\u9F3E\u9F4B\u53E2\u5695\u56AE\u58D9\u58D8\u5B38\u5F5D\u61E3\u6233\u64F4\u64F2\u64FE\u6506\u64FA\u64FB\u64F7\u65B7\u66DC\u6726\u6AB3\u6AAC\u6AC3\u6ABB\u6AB8\u6AC2\u6AAE\u6AAF\u6B5F\u6B78\u6BAF\u7009\u700B\u6FFE\u7006\u6FFA\u7011\u700F\u71FB\u71FC\u71FE\u71F8\u7377\u7375\u74A7\u74BF\u7515\u7656\u7658"], + ["c2a1", "\u7652\u77BD\u77BF\u77BB\u77BC\u790E\u79AE\u7A61\u7A62\u7A60\u7AC4\u7AC5\u7C2B\u7C27\u7C2A\u7C1E\u7C23\u7C21\u7CE7\u7E54\u7E55\u7E5E\u7E5A\u7E61\u7E52\u7E59\u7F48\u7FF9\u7FFB\u8077\u8076\u81CD\u81CF\u820A\u85CF\u85A9\u85CD\u85D0\u85C9\u85B0\u85BA\u85B9\u85A6\u87EF\u87EC\u87F2\u87E0\u8986\u89B2\u89F4\u8B28\u8B39\u8B2C\u8B2B\u8C50\u8D05\u8E59\u8E63\u8E66\u8E64\u8E5F\u8E55\u8EC0\u8F49\u8F4D\u9087\u9083\u9088\u91AB\u91AC\u91D0\u9394\u938A\u9396\u93A2\u93B3\u93AE\u93AC\u93B0\u9398\u939A\u9397\u95D4\u95D6\u95D0\u95D5\u96E2\u96DC\u96D9\u96DB\u96DE\u9724\u97A3\u97A6"], + ["c340", "\u97AD\u97F9\u984D\u984F\u984C\u984E\u9853\u98BA\u993E\u993F\u993D\u992E\u99A5\u9A0E\u9AC1\u9B03\u9B06\u9B4F\u9B4E\u9B4D\u9BCA\u9BC9\u9BFD\u9BC8\u9BC0\u9D51\u9D5D\u9D60\u9EE0\u9F15\u9F2C\u5133\u56A5\u58DE\u58DF\u58E2\u5BF5\u9F90\u5EEC\u61F2\u61F7\u61F6\u61F5\u6500\u650F\u66E0\u66DD\u6AE5\u6ADD\u6ADA\u6AD3\u701B\u701F\u7028\u701A\u701D\u7015\u7018\u7206\u720D\u7258\u72A2\u7378"], + ["c3a1", "\u737A\u74BD\u74CA\u74E3\u7587\u7586\u765F\u7661\u77C7\u7919\u79B1\u7A6B\u7A69\u7C3E\u7C3F\u7C38\u7C3D\u7C37\u7C40\u7E6B\u7E6D\u7E79\u7E69\u7E6A\u7F85\u7E73\u7FB6\u7FB9\u7FB8\u81D8\u85E9\u85DD\u85EA\u85D5\u85E4\u85E5\u85F7\u87FB\u8805\u880D\u87F9\u87FE\u8960\u895F\u8956\u895E\u8B41\u8B5C\u8B58\u8B49\u8B5A\u8B4E\u8B4F\u8B46\u8B59\u8D08\u8D0A\u8E7C\u8E72\u8E87\u8E76\u8E6C\u8E7A\u8E74\u8F54\u8F4E\u8FAD\u908A\u908B\u91B1\u91AE\u93E1\u93D1\u93DF\u93C3\u93C8\u93DC\u93DD\u93D6\u93E2\u93CD\u93D8\u93E4\u93D7\u93E8\u95DC\u96B4\u96E3\u972A\u9727\u9761\u97DC\u97FB\u985E"], + ["c440", "\u9858\u985B\u98BC\u9945\u9949\u9A16\u9A19\u9B0D\u9BE8\u9BE7\u9BD6\u9BDB\u9D89\u9D61\u9D72\u9D6A\u9D6C\u9E92\u9E97\u9E93\u9EB4\u52F8\u56A8\u56B7\u56B6\u56B4\u56BC\u58E4\u5B40\u5B43\u5B7D\u5BF6\u5DC9\u61F8\u61FA\u6518\u6514\u6519\u66E6\u6727\u6AEC\u703E\u7030\u7032\u7210\u737B\u74CF\u7662\u7665\u7926\u792A\u792C\u792B\u7AC7\u7AF6\u7C4C\u7C43\u7C4D\u7CEF\u7CF0\u8FAE\u7E7D\u7E7C"], + ["c4a1", "\u7E82\u7F4C\u8000\u81DA\u8266\u85FB\u85F9\u8611\u85FA\u8606\u860B\u8607\u860A\u8814\u8815\u8964\u89BA\u89F8\u8B70\u8B6C\u8B66\u8B6F\u8B5F\u8B6B\u8D0F\u8D0D\u8E89\u8E81\u8E85\u8E82\u91B4\u91CB\u9418\u9403\u93FD\u95E1\u9730\u98C4\u9952\u9951\u99A8\u9A2B\u9A30\u9A37\u9A35\u9C13\u9C0D\u9E79\u9EB5\u9EE8\u9F2F\u9F5F\u9F63\u9F61\u5137\u5138\u56C1\u56C0\u56C2\u5914\u5C6C\u5DCD\u61FC\u61FE\u651D\u651C\u6595\u66E9\u6AFB\u6B04\u6AFA\u6BB2\u704C\u721B\u72A7\u74D6\u74D4\u7669\u77D3\u7C50\u7E8F\u7E8C\u7FBC\u8617\u862D\u861A\u8823\u8822\u8821\u881F\u896A\u896C\u89BD\u8B74"], + ["c540", "\u8B77\u8B7D\u8D13\u8E8A\u8E8D\u8E8B\u8F5F\u8FAF\u91BA\u942E\u9433\u9435\u943A\u9438\u9432\u942B\u95E2\u9738\u9739\u9732\u97FF\u9867\u9865\u9957\u9A45\u9A43\u9A40\u9A3E\u9ACF\u9B54\u9B51\u9C2D\u9C25\u9DAF\u9DB4\u9DC2\u9DB8\u9E9D\u9EEF\u9F19\u9F5C\u9F66\u9F67\u513C\u513B\u56C8\u56CA\u56C9\u5B7F\u5DD4\u5DD2\u5F4E\u61FF\u6524\u6B0A\u6B61\u7051\u7058\u7380\u74E4\u758A\u766E\u766C"], + ["c5a1", "\u79B3\u7C60\u7C5F\u807E\u807D\u81DF\u8972\u896F\u89FC\u8B80\u8D16\u8D17\u8E91\u8E93\u8F61\u9148\u9444\u9451\u9452\u973D\u973E\u97C3\u97C1\u986B\u9955\u9A55\u9A4D\u9AD2\u9B1A\u9C49\u9C31\u9C3E\u9C3B\u9DD3\u9DD7\u9F34\u9F6C\u9F6A\u9F94\u56CC\u5DD6\u6200\u6523\u652B\u652A\u66EC\u6B10\u74DA\u7ACA\u7C64\u7C63\u7C65\u7E93\u7E96\u7E94\u81E2\u8638\u863F\u8831\u8B8A\u9090\u908F\u9463\u9460\u9464\u9768\u986F\u995C\u9A5A\u9A5B\u9A57\u9AD3\u9AD4\u9AD1\u9C54\u9C57\u9C56\u9DE5\u9E9F\u9EF4\u56D1\u58E9\u652C\u705E\u7671\u7672\u77D7\u7F50\u7F88\u8836\u8839\u8862\u8B93\u8B92"], + ["c640", "\u8B96\u8277\u8D1B\u91C0\u946A\u9742\u9748\u9744\u97C6\u9870\u9A5F\u9B22\u9B58\u9C5F\u9DF9\u9DFA\u9E7C\u9E7D\u9F07\u9F77\u9F72\u5EF3\u6B16\u7063\u7C6C\u7C6E\u883B\u89C0\u8EA1\u91C1\u9472\u9470\u9871\u995E\u9AD6\u9B23\u9ECC\u7064\u77DA\u8B9A\u9477\u97C9\u9A62\u9A65\u7E9C\u8B9C\u8EAA\u91C5\u947D\u947E\u947C\u9C77\u9C78\u9EF7\u8C54\u947F\u9E1A\u7228\u9A6A\u9B31\u9E1B\u9E1E\u7C72"], + ["c940", "\u4E42\u4E5C\u51F5\u531A\u5382\u4E07\u4E0C\u4E47\u4E8D\u56D7\uFA0C\u5C6E\u5F73\u4E0F\u5187\u4E0E\u4E2E\u4E93\u4EC2\u4EC9\u4EC8\u5198\u52FC\u536C\u53B9\u5720\u5903\u592C\u5C10\u5DFF\u65E1\u6BB3\u6BCC\u6C14\u723F\u4E31\u4E3C\u4EE8\u4EDC\u4EE9\u4EE1\u4EDD\u4EDA\u520C\u531C\u534C\u5722\u5723\u5917\u592F\u5B81\u5B84\u5C12\u5C3B\u5C74\u5C73\u5E04\u5E80\u5E82\u5FC9\u6209\u6250\u6C15"], + ["c9a1", "\u6C36\u6C43\u6C3F\u6C3B\u72AE\u72B0\u738A\u79B8\u808A\u961E\u4F0E\u4F18\u4F2C\u4EF5\u4F14\u4EF1\u4F00\u4EF7\u4F08\u4F1D\u4F02\u4F05\u4F22\u4F13\u4F04\u4EF4\u4F12\u51B1\u5213\u5209\u5210\u52A6\u5322\u531F\u534D\u538A\u5407\u56E1\u56DF\u572E\u572A\u5734\u593C\u5980\u597C\u5985\u597B\u597E\u5977\u597F\u5B56\u5C15\u5C25\u5C7C\u5C7A\u5C7B\u5C7E\u5DDF\u5E75\u5E84\u5F02\u5F1A\u5F74\u5FD5\u5FD4\u5FCF\u625C\u625E\u6264\u6261\u6266\u6262\u6259\u6260\u625A\u6265\u65EF\u65EE\u673E\u6739\u6738\u673B\u673A\u673F\u673C\u6733\u6C18\u6C46\u6C52\u6C5C\u6C4F\u6C4A\u6C54\u6C4B"], + ["ca40", "\u6C4C\u7071\u725E\u72B4\u72B5\u738E\u752A\u767F\u7A75\u7F51\u8278\u827C\u8280\u827D\u827F\u864D\u897E\u9099\u9097\u9098\u909B\u9094\u9622\u9624\u9620\u9623\u4F56\u4F3B\u4F62\u4F49\u4F53\u4F64\u4F3E\u4F67\u4F52\u4F5F\u4F41\u4F58\u4F2D\u4F33\u4F3F\u4F61\u518F\u51B9\u521C\u521E\u5221\u52AD\u52AE\u5309\u5363\u5372\u538E\u538F\u5430\u5437\u542A\u5454\u5445\u5419\u541C\u5425\u5418"], + ["caa1", "\u543D\u544F\u5441\u5428\u5424\u5447\u56EE\u56E7\u56E5\u5741\u5745\u574C\u5749\u574B\u5752\u5906\u5940\u59A6\u5998\u59A0\u5997\u598E\u59A2\u5990\u598F\u59A7\u59A1\u5B8E\u5B92\u5C28\u5C2A\u5C8D\u5C8F\u5C88\u5C8B\u5C89\u5C92\u5C8A\u5C86\u5C93\u5C95\u5DE0\u5E0A\u5E0E\u5E8B\u5E89\u5E8C\u5E88\u5E8D\u5F05\u5F1D\u5F78\u5F76\u5FD2\u5FD1\u5FD0\u5FED\u5FE8\u5FEE\u5FF3\u5FE1\u5FE4\u5FE3\u5FFA\u5FEF\u5FF7\u5FFB\u6000\u5FF4\u623A\u6283\u628C\u628E\u628F\u6294\u6287\u6271\u627B\u627A\u6270\u6281\u6288\u6277\u627D\u6272\u6274\u6537\u65F0\u65F4\u65F3\u65F2\u65F5\u6745\u6747"], + ["cb40", "\u6759\u6755\u674C\u6748\u675D\u674D\u675A\u674B\u6BD0\u6C19\u6C1A\u6C78\u6C67\u6C6B\u6C84\u6C8B\u6C8F\u6C71\u6C6F\u6C69\u6C9A\u6C6D\u6C87\u6C95\u6C9C\u6C66\u6C73\u6C65\u6C7B\u6C8E\u7074\u707A\u7263\u72BF\u72BD\u72C3\u72C6\u72C1\u72BA\u72C5\u7395\u7397\u7393\u7394\u7392\u753A\u7539\u7594\u7595\u7681\u793D\u8034\u8095\u8099\u8090\u8092\u809C\u8290\u828F\u8285\u828E\u8291\u8293"], + ["cba1", "\u828A\u8283\u8284\u8C78\u8FC9\u8FBF\u909F\u90A1\u90A5\u909E\u90A7\u90A0\u9630\u9628\u962F\u962D\u4E33\u4F98\u4F7C\u4F85\u4F7D\u4F80\u4F87\u4F76\u4F74\u4F89\u4F84\u4F77\u4F4C\u4F97\u4F6A\u4F9A\u4F79\u4F81\u4F78\u4F90\u4F9C\u4F94\u4F9E\u4F92\u4F82\u4F95\u4F6B\u4F6E\u519E\u51BC\u51BE\u5235\u5232\u5233\u5246\u5231\u52BC\u530A\u530B\u533C\u5392\u5394\u5487\u547F\u5481\u5491\u5482\u5488\u546B\u547A\u547E\u5465\u546C\u5474\u5466\u548D\u546F\u5461\u5460\u5498\u5463\u5467\u5464\u56F7\u56F9\u576F\u5772\u576D\u576B\u5771\u5770\u5776\u5780\u5775\u577B\u5773\u5774\u5762"], + ["cc40", "\u5768\u577D\u590C\u5945\u59B5\u59BA\u59CF\u59CE\u59B2\u59CC\u59C1\u59B6\u59BC\u59C3\u59D6\u59B1\u59BD\u59C0\u59C8\u59B4\u59C7\u5B62\u5B65\u5B93\u5B95\u5C44\u5C47\u5CAE\u5CA4\u5CA0\u5CB5\u5CAF\u5CA8\u5CAC\u5C9F\u5CA3\u5CAD\u5CA2\u5CAA\u5CA7\u5C9D\u5CA5\u5CB6\u5CB0\u5CA6\u5E17\u5E14\u5E19\u5F28\u5F22\u5F23\u5F24\u5F54\u5F82\u5F7E\u5F7D\u5FDE\u5FE5\u602D\u6026\u6019\u6032\u600B"], + ["cca1", "\u6034\u600A\u6017\u6033\u601A\u601E\u602C\u6022\u600D\u6010\u602E\u6013\u6011\u600C\u6009\u601C\u6214\u623D\u62AD\u62B4\u62D1\u62BE\u62AA\u62B6\u62CA\u62AE\u62B3\u62AF\u62BB\u62A9\u62B0\u62B8\u653D\u65A8\u65BB\u6609\u65FC\u6604\u6612\u6608\u65FB\u6603\u660B\u660D\u6605\u65FD\u6611\u6610\u66F6\u670A\u6785\u676C\u678E\u6792\u6776\u677B\u6798\u6786\u6784\u6774\u678D\u678C\u677A\u679F\u6791\u6799\u6783\u677D\u6781\u6778\u6779\u6794\u6B25\u6B80\u6B7E\u6BDE\u6C1D\u6C93\u6CEC\u6CEB\u6CEE\u6CD9\u6CB6\u6CD4\u6CAD\u6CE7\u6CB7\u6CD0\u6CC2\u6CBA\u6CC3\u6CC6\u6CED\u6CF2"], + ["cd40", "\u6CD2\u6CDD\u6CB4\u6C8A\u6C9D\u6C80\u6CDE\u6CC0\u6D30\u6CCD\u6CC7\u6CB0\u6CF9\u6CCF\u6CE9\u6CD1\u7094\u7098\u7085\u7093\u7086\u7084\u7091\u7096\u7082\u709A\u7083\u726A\u72D6\u72CB\u72D8\u72C9\u72DC\u72D2\u72D4\u72DA\u72CC\u72D1\u73A4\u73A1\u73AD\u73A6\u73A2\u73A0\u73AC\u739D\u74DD\u74E8\u753F\u7540\u753E\u758C\u7598\u76AF\u76F3\u76F1\u76F0\u76F5\u77F8\u77FC\u77F9\u77FB\u77FA"], + ["cda1", "\u77F7\u7942\u793F\u79C5\u7A78\u7A7B\u7AFB\u7C75\u7CFD\u8035\u808F\u80AE\u80A3\u80B8\u80B5\u80AD\u8220\u82A0\u82C0\u82AB\u829A\u8298\u829B\u82B5\u82A7\u82AE\u82BC\u829E\u82BA\u82B4\u82A8\u82A1\u82A9\u82C2\u82A4\u82C3\u82B6\u82A2\u8670\u866F\u866D\u866E\u8C56\u8FD2\u8FCB\u8FD3\u8FCD\u8FD6\u8FD5\u8FD7\u90B2\u90B4\u90AF\u90B3\u90B0\u9639\u963D\u963C\u963A\u9643\u4FCD\u4FC5\u4FD3\u4FB2\u4FC9\u4FCB\u4FC1\u4FD4\u4FDC\u4FD9\u4FBB\u4FB3\u4FDB\u4FC7\u4FD6\u4FBA\u4FC0\u4FB9\u4FEC\u5244\u5249\u52C0\u52C2\u533D\u537C\u5397\u5396\u5399\u5398\u54BA\u54A1\u54AD\u54A5\u54CF"], + ["ce40", "\u54C3\u830D\u54B7\u54AE\u54D6\u54B6\u54C5\u54C6\u54A0\u5470\u54BC\u54A2\u54BE\u5472\u54DE\u54B0\u57B5\u579E\u579F\u57A4\u578C\u5797\u579D\u579B\u5794\u5798\u578F\u5799\u57A5\u579A\u5795\u58F4\u590D\u5953\u59E1\u59DE\u59EE\u5A00\u59F1\u59DD\u59FA\u59FD\u59FC\u59F6\u59E4\u59F2\u59F7\u59DB\u59E9\u59F3\u59F5\u59E0\u59FE\u59F4\u59ED\u5BA8\u5C4C\u5CD0\u5CD8\u5CCC\u5CD7\u5CCB\u5CDB"], + ["cea1", "\u5CDE\u5CDA\u5CC9\u5CC7\u5CCA\u5CD6\u5CD3\u5CD4\u5CCF\u5CC8\u5CC6\u5CCE\u5CDF\u5CF8\u5DF9\u5E21\u5E22\u5E23\u5E20\u5E24\u5EB0\u5EA4\u5EA2\u5E9B\u5EA3\u5EA5\u5F07\u5F2E\u5F56\u5F86\u6037\u6039\u6054\u6072\u605E\u6045\u6053\u6047\u6049\u605B\u604C\u6040\u6042\u605F\u6024\u6044\u6058\u6066\u606E\u6242\u6243\u62CF\u630D\u630B\u62F5\u630E\u6303\u62EB\u62F9\u630F\u630C\u62F8\u62F6\u6300\u6313\u6314\u62FA\u6315\u62FB\u62F0\u6541\u6543\u65AA\u65BF\u6636\u6621\u6632\u6635\u661C\u6626\u6622\u6633\u662B\u663A\u661D\u6634\u6639\u662E\u670F\u6710\u67C1\u67F2\u67C8\u67BA"], + ["cf40", "\u67DC\u67BB\u67F8\u67D8\u67C0\u67B7\u67C5\u67EB\u67E4\u67DF\u67B5\u67CD\u67B3\u67F7\u67F6\u67EE\u67E3\u67C2\u67B9\u67CE\u67E7\u67F0\u67B2\u67FC\u67C6\u67ED\u67CC\u67AE\u67E6\u67DB\u67FA\u67C9\u67CA\u67C3\u67EA\u67CB\u6B28\u6B82\u6B84\u6BB6\u6BD6\u6BD8\u6BE0\u6C20\u6C21\u6D28\u6D34\u6D2D\u6D1F\u6D3C\u6D3F\u6D12\u6D0A\u6CDA\u6D33\u6D04\u6D19\u6D3A\u6D1A\u6D11\u6D00\u6D1D\u6D42"], + ["cfa1", "\u6D01\u6D18\u6D37\u6D03\u6D0F\u6D40\u6D07\u6D20\u6D2C\u6D08\u6D22\u6D09\u6D10\u70B7\u709F\u70BE\u70B1\u70B0\u70A1\u70B4\u70B5\u70A9\u7241\u7249\u724A\u726C\u7270\u7273\u726E\u72CA\u72E4\u72E8\u72EB\u72DF\u72EA\u72E6\u72E3\u7385\u73CC\u73C2\u73C8\u73C5\u73B9\u73B6\u73B5\u73B4\u73EB\u73BF\u73C7\u73BE\u73C3\u73C6\u73B8\u73CB\u74EC\u74EE\u752E\u7547\u7548\u75A7\u75AA\u7679\u76C4\u7708\u7703\u7704\u7705\u770A\u76F7\u76FB\u76FA\u77E7\u77E8\u7806\u7811\u7812\u7805\u7810\u780F\u780E\u7809\u7803\u7813\u794A\u794C\u794B\u7945\u7944\u79D5\u79CD\u79CF\u79D6\u79CE\u7A80"], + ["d040", "\u7A7E\u7AD1\u7B00\u7B01\u7C7A\u7C78\u7C79\u7C7F\u7C80\u7C81\u7D03\u7D08\u7D01\u7F58\u7F91\u7F8D\u7FBE\u8007\u800E\u800F\u8014\u8037\u80D8\u80C7\u80E0\u80D1\u80C8\u80C2\u80D0\u80C5\u80E3\u80D9\u80DC\u80CA\u80D5\u80C9\u80CF\u80D7\u80E6\u80CD\u81FF\u8221\u8294\u82D9\u82FE\u82F9\u8307\u82E8\u8300\u82D5\u833A\u82EB\u82D6\u82F4\u82EC\u82E1\u82F2\u82F5\u830C\u82FB\u82F6\u82F0\u82EA"], + ["d0a1", "\u82E4\u82E0\u82FA\u82F3\u82ED\u8677\u8674\u867C\u8673\u8841\u884E\u8867\u886A\u8869\u89D3\u8A04\u8A07\u8D72\u8FE3\u8FE1\u8FEE\u8FE0\u90F1\u90BD\u90BF\u90D5\u90C5\u90BE\u90C7\u90CB\u90C8\u91D4\u91D3\u9654\u964F\u9651\u9653\u964A\u964E\u501E\u5005\u5007\u5013\u5022\u5030\u501B\u4FF5\u4FF4\u5033\u5037\u502C\u4FF6\u4FF7\u5017\u501C\u5020\u5027\u5035\u502F\u5031\u500E\u515A\u5194\u5193\u51CA\u51C4\u51C5\u51C8\u51CE\u5261\u525A\u5252\u525E\u525F\u5255\u5262\u52CD\u530E\u539E\u5526\u54E2\u5517\u5512\u54E7\u54F3\u54E4\u551A\u54FF\u5504\u5508\u54EB\u5511\u5505\u54F1"], + ["d140", "\u550A\u54FB\u54F7\u54F8\u54E0\u550E\u5503\u550B\u5701\u5702\u57CC\u5832\u57D5\u57D2\u57BA\u57C6\u57BD\u57BC\u57B8\u57B6\u57BF\u57C7\u57D0\u57B9\u57C1\u590E\u594A\u5A19\u5A16\u5A2D\u5A2E\u5A15\u5A0F\u5A17\u5A0A\u5A1E\u5A33\u5B6C\u5BA7\u5BAD\u5BAC\u5C03\u5C56\u5C54\u5CEC\u5CFF\u5CEE\u5CF1\u5CF7\u5D00\u5CF9\u5E29\u5E28\u5EA8\u5EAE\u5EAA\u5EAC\u5F33\u5F30\u5F67\u605D\u605A\u6067"], + ["d1a1", "\u6041\u60A2\u6088\u6080\u6092\u6081\u609D\u6083\u6095\u609B\u6097\u6087\u609C\u608E\u6219\u6246\u62F2\u6310\u6356\u632C\u6344\u6345\u6336\u6343\u63E4\u6339\u634B\u634A\u633C\u6329\u6341\u6334\u6358\u6354\u6359\u632D\u6347\u6333\u635A\u6351\u6338\u6357\u6340\u6348\u654A\u6546\u65C6\u65C3\u65C4\u65C2\u664A\u665F\u6647\u6651\u6712\u6713\u681F\u681A\u6849\u6832\u6833\u683B\u684B\u684F\u6816\u6831\u681C\u6835\u682B\u682D\u682F\u684E\u6844\u6834\u681D\u6812\u6814\u6826\u6828\u682E\u684D\u683A\u6825\u6820\u6B2C\u6B2F\u6B2D\u6B31\u6B34\u6B6D\u8082\u6B88\u6BE6\u6BE4"], + ["d240", "\u6BE8\u6BE3\u6BE2\u6BE7\u6C25\u6D7A\u6D63\u6D64\u6D76\u6D0D\u6D61\u6D92\u6D58\u6D62\u6D6D\u6D6F\u6D91\u6D8D\u6DEF\u6D7F\u6D86\u6D5E\u6D67\u6D60\u6D97\u6D70\u6D7C\u6D5F\u6D82\u6D98\u6D2F\u6D68\u6D8B\u6D7E\u6D80\u6D84\u6D16\u6D83\u6D7B\u6D7D\u6D75\u6D90\u70DC\u70D3\u70D1\u70DD\u70CB\u7F39\u70E2\u70D7\u70D2\u70DE\u70E0\u70D4\u70CD\u70C5\u70C6\u70C7\u70DA\u70CE\u70E1\u7242\u7278"], + ["d2a1", "\u7277\u7276\u7300\u72FA\u72F4\u72FE\u72F6\u72F3\u72FB\u7301\u73D3\u73D9\u73E5\u73D6\u73BC\u73E7\u73E3\u73E9\u73DC\u73D2\u73DB\u73D4\u73DD\u73DA\u73D7\u73D8\u73E8\u74DE\u74DF\u74F4\u74F5\u7521\u755B\u755F\u75B0\u75C1\u75BB\u75C4\u75C0\u75BF\u75B6\u75BA\u768A\u76C9\u771D\u771B\u7710\u7713\u7712\u7723\u7711\u7715\u7719\u771A\u7722\u7727\u7823\u782C\u7822\u7835\u782F\u7828\u782E\u782B\u7821\u7829\u7833\u782A\u7831\u7954\u795B\u794F\u795C\u7953\u7952\u7951\u79EB\u79EC\u79E0\u79EE\u79ED\u79EA\u79DC\u79DE\u79DD\u7A86\u7A89\u7A85\u7A8B\u7A8C\u7A8A\u7A87\u7AD8\u7B10"], + ["d340", "\u7B04\u7B13\u7B05\u7B0F\u7B08\u7B0A\u7B0E\u7B09\u7B12\u7C84\u7C91\u7C8A\u7C8C\u7C88\u7C8D\u7C85\u7D1E\u7D1D\u7D11\u7D0E\u7D18\u7D16\u7D13\u7D1F\u7D12\u7D0F\u7D0C\u7F5C\u7F61\u7F5E\u7F60\u7F5D\u7F5B\u7F96\u7F92\u7FC3\u7FC2\u7FC0\u8016\u803E\u8039\u80FA\u80F2\u80F9\u80F5\u8101\u80FB\u8100\u8201\u822F\u8225\u8333\u832D\u8344\u8319\u8351\u8325\u8356\u833F\u8341\u8326\u831C\u8322"], + ["d3a1", "\u8342\u834E\u831B\u832A\u8308\u833C\u834D\u8316\u8324\u8320\u8337\u832F\u8329\u8347\u8345\u834C\u8353\u831E\u832C\u834B\u8327\u8348\u8653\u8652\u86A2\u86A8\u8696\u868D\u8691\u869E\u8687\u8697\u8686\u868B\u869A\u8685\u86A5\u8699\u86A1\u86A7\u8695\u8698\u868E\u869D\u8690\u8694\u8843\u8844\u886D\u8875\u8876\u8872\u8880\u8871\u887F\u886F\u8883\u887E\u8874\u887C\u8A12\u8C47\u8C57\u8C7B\u8CA4\u8CA3\u8D76\u8D78\u8DB5\u8DB7\u8DB6\u8ED1\u8ED3\u8FFE\u8FF5\u9002\u8FFF\u8FFB\u9004\u8FFC\u8FF6\u90D6\u90E0\u90D9\u90DA\u90E3\u90DF\u90E5\u90D8\u90DB\u90D7\u90DC\u90E4\u9150"], + ["d440", "\u914E\u914F\u91D5\u91E2\u91DA\u965C\u965F\u96BC\u98E3\u9ADF\u9B2F\u4E7F\u5070\u506A\u5061\u505E\u5060\u5053\u504B\u505D\u5072\u5048\u504D\u5041\u505B\u504A\u5062\u5015\u5045\u505F\u5069\u506B\u5063\u5064\u5046\u5040\u506E\u5073\u5057\u5051\u51D0\u526B\u526D\u526C\u526E\u52D6\u52D3\u532D\u539C\u5575\u5576\u553C\u554D\u5550\u5534\u552A\u5551\u5562\u5536\u5535\u5530\u5552\u5545"], + ["d4a1", "\u550C\u5532\u5565\u554E\u5539\u5548\u552D\u553B\u5540\u554B\u570A\u5707\u57FB\u5814\u57E2\u57F6\u57DC\u57F4\u5800\u57ED\u57FD\u5808\u57F8\u580B\u57F3\u57CF\u5807\u57EE\u57E3\u57F2\u57E5\u57EC\u57E1\u580E\u57FC\u5810\u57E7\u5801\u580C\u57F1\u57E9\u57F0\u580D\u5804\u595C\u5A60\u5A58\u5A55\u5A67\u5A5E\u5A38\u5A35\u5A6D\u5A50\u5A5F\u5A65\u5A6C\u5A53\u5A64\u5A57\u5A43\u5A5D\u5A52\u5A44\u5A5B\u5A48\u5A8E\u5A3E\u5A4D\u5A39\u5A4C\u5A70\u5A69\u5A47\u5A51\u5A56\u5A42\u5A5C\u5B72\u5B6E\u5BC1\u5BC0\u5C59\u5D1E\u5D0B\u5D1D\u5D1A\u5D20\u5D0C\u5D28\u5D0D\u5D26\u5D25\u5D0F"], + ["d540", "\u5D30\u5D12\u5D23\u5D1F\u5D2E\u5E3E\u5E34\u5EB1\u5EB4\u5EB9\u5EB2\u5EB3\u5F36\u5F38\u5F9B\u5F96\u5F9F\u608A\u6090\u6086\u60BE\u60B0\u60BA\u60D3\u60D4\u60CF\u60E4\u60D9\u60DD\u60C8\u60B1\u60DB\u60B7\u60CA\u60BF\u60C3\u60CD\u60C0\u6332\u6365\u638A\u6382\u637D\u63BD\u639E\u63AD\u639D\u6397\u63AB\u638E\u636F\u6387\u6390\u636E\u63AF\u6375\u639C\u636D\u63AE\u637C\u63A4\u633B\u639F"], + ["d5a1", "\u6378\u6385\u6381\u6391\u638D\u6370\u6553\u65CD\u6665\u6661\u665B\u6659\u665C\u6662\u6718\u6879\u6887\u6890\u689C\u686D\u686E\u68AE\u68AB\u6956\u686F\u68A3\u68AC\u68A9\u6875\u6874\u68B2\u688F\u6877\u6892\u687C\u686B\u6872\u68AA\u6880\u6871\u687E\u689B\u6896\u688B\u68A0\u6889\u68A4\u6878\u687B\u6891\u688C\u688A\u687D\u6B36\u6B33\u6B37\u6B38\u6B91\u6B8F\u6B8D\u6B8E\u6B8C\u6C2A\u6DC0\u6DAB\u6DB4\u6DB3\u6E74\u6DAC\u6DE9\u6DE2\u6DB7\u6DF6\u6DD4\u6E00\u6DC8\u6DE0\u6DDF\u6DD6\u6DBE\u6DE5\u6DDC\u6DDD\u6DDB\u6DF4\u6DCA\u6DBD\u6DED\u6DF0\u6DBA\u6DD5\u6DC2\u6DCF\u6DC9"], + ["d640", "\u6DD0\u6DF2\u6DD3\u6DFD\u6DD7\u6DCD\u6DE3\u6DBB\u70FA\u710D\u70F7\u7117\u70F4\u710C\u70F0\u7104\u70F3\u7110\u70FC\u70FF\u7106\u7113\u7100\u70F8\u70F6\u710B\u7102\u710E\u727E\u727B\u727C\u727F\u731D\u7317\u7307\u7311\u7318\u730A\u7308\u72FF\u730F\u731E\u7388\u73F6\u73F8\u73F5\u7404\u7401\u73FD\u7407\u7400\u73FA\u73FC\u73FF\u740C\u740B\u73F4\u7408\u7564\u7563\u75CE\u75D2\u75CF"], + ["d6a1", "\u75CB\u75CC\u75D1\u75D0\u768F\u7689\u76D3\u7739\u772F\u772D\u7731\u7732\u7734\u7733\u773D\u7725\u773B\u7735\u7848\u7852\u7849\u784D\u784A\u784C\u7826\u7845\u7850\u7964\u7967\u7969\u796A\u7963\u796B\u7961\u79BB\u79FA\u79F8\u79F6\u79F7\u7A8F\u7A94\u7A90\u7B35\u7B47\u7B34\u7B25\u7B30\u7B22\u7B24\u7B33\u7B18\u7B2A\u7B1D\u7B31\u7B2B\u7B2D\u7B2F\u7B32\u7B38\u7B1A\u7B23\u7C94\u7C98\u7C96\u7CA3\u7D35\u7D3D\u7D38\u7D36\u7D3A\u7D45\u7D2C\u7D29\u7D41\u7D47\u7D3E\u7D3F\u7D4A\u7D3B\u7D28\u7F63\u7F95\u7F9C\u7F9D\u7F9B\u7FCA\u7FCB\u7FCD\u7FD0\u7FD1\u7FC7\u7FCF\u7FC9\u801F"], + ["d740", "\u801E\u801B\u8047\u8043\u8048\u8118\u8125\u8119\u811B\u812D\u811F\u812C\u811E\u8121\u8115\u8127\u811D\u8122\u8211\u8238\u8233\u823A\u8234\u8232\u8274\u8390\u83A3\u83A8\u838D\u837A\u8373\u83A4\u8374\u838F\u8381\u8395\u8399\u8375\u8394\u83A9\u837D\u8383\u838C\u839D\u839B\u83AA\u838B\u837E\u83A5\u83AF\u8388\u8397\u83B0\u837F\u83A6\u8387\u83AE\u8376\u839A\u8659\u8656\u86BF\u86B7"], + ["d7a1", "\u86C2\u86C1\u86C5\u86BA\u86B0\u86C8\u86B9\u86B3\u86B8\u86CC\u86B4\u86BB\u86BC\u86C3\u86BD\u86BE\u8852\u8889\u8895\u88A8\u88A2\u88AA\u889A\u8891\u88A1\u889F\u8898\u88A7\u8899\u889B\u8897\u88A4\u88AC\u888C\u8893\u888E\u8982\u89D6\u89D9\u89D5\u8A30\u8A27\u8A2C\u8A1E\u8C39\u8C3B\u8C5C\u8C5D\u8C7D\u8CA5\u8D7D\u8D7B\u8D79\u8DBC\u8DC2\u8DB9\u8DBF\u8DC1\u8ED8\u8EDE\u8EDD\u8EDC\u8ED7\u8EE0\u8EE1\u9024\u900B\u9011\u901C\u900C\u9021\u90EF\u90EA\u90F0\u90F4\u90F2\u90F3\u90D4\u90EB\u90EC\u90E9\u9156\u9158\u915A\u9153\u9155\u91EC\u91F4\u91F1\u91F3\u91F8\u91E4\u91F9\u91EA"], + ["d840", "\u91EB\u91F7\u91E8\u91EE\u957A\u9586\u9588\u967C\u966D\u966B\u9671\u966F\u96BF\u976A\u9804\u98E5\u9997\u509B\u5095\u5094\u509E\u508B\u50A3\u5083\u508C\u508E\u509D\u5068\u509C\u5092\u5082\u5087\u515F\u51D4\u5312\u5311\u53A4\u53A7\u5591\u55A8\u55A5\u55AD\u5577\u5645\u55A2\u5593\u5588\u558F\u55B5\u5581\u55A3\u5592\u55A4\u557D\u558C\u55A6\u557F\u5595\u55A1\u558E\u570C\u5829\u5837"], + ["d8a1", "\u5819\u581E\u5827\u5823\u5828\u57F5\u5848\u5825\u581C\u581B\u5833\u583F\u5836\u582E\u5839\u5838\u582D\u582C\u583B\u5961\u5AAF\u5A94\u5A9F\u5A7A\u5AA2\u5A9E\u5A78\u5AA6\u5A7C\u5AA5\u5AAC\u5A95\u5AAE\u5A37\u5A84\u5A8A\u5A97\u5A83\u5A8B\u5AA9\u5A7B\u5A7D\u5A8C\u5A9C\u5A8F\u5A93\u5A9D\u5BEA\u5BCD\u5BCB\u5BD4\u5BD1\u5BCA\u5BCE\u5C0C\u5C30\u5D37\u5D43\u5D6B\u5D41\u5D4B\u5D3F\u5D35\u5D51\u5D4E\u5D55\u5D33\u5D3A\u5D52\u5D3D\u5D31\u5D59\u5D42\u5D39\u5D49\u5D38\u5D3C\u5D32\u5D36\u5D40\u5D45\u5E44\u5E41\u5F58\u5FA6\u5FA5\u5FAB\u60C9\u60B9\u60CC\u60E2\u60CE\u60C4\u6114"], + ["d940", "\u60F2\u610A\u6116\u6105\u60F5\u6113\u60F8\u60FC\u60FE\u60C1\u6103\u6118\u611D\u6110\u60FF\u6104\u610B\u624A\u6394\u63B1\u63B0\u63CE\u63E5\u63E8\u63EF\u63C3\u649D\u63F3\u63CA\u63E0\u63F6\u63D5\u63F2\u63F5\u6461\u63DF\u63BE\u63DD\u63DC\u63C4\u63D8\u63D3\u63C2\u63C7\u63CC\u63CB\u63C8\u63F0\u63D7\u63D9\u6532\u6567\u656A\u6564\u655C\u6568\u6565\u658C\u659D\u659E\u65AE\u65D0\u65D2"], + ["d9a1", "\u667C\u666C\u667B\u6680\u6671\u6679\u666A\u6672\u6701\u690C\u68D3\u6904\u68DC\u692A\u68EC\u68EA\u68F1\u690F\u68D6\u68F7\u68EB\u68E4\u68F6\u6913\u6910\u68F3\u68E1\u6907\u68CC\u6908\u6970\u68B4\u6911\u68EF\u68C6\u6914\u68F8\u68D0\u68FD\u68FC\u68E8\u690B\u690A\u6917\u68CE\u68C8\u68DD\u68DE\u68E6\u68F4\u68D1\u6906\u68D4\u68E9\u6915\u6925\u68C7\u6B39\u6B3B\u6B3F\u6B3C\u6B94\u6B97\u6B99\u6B95\u6BBD\u6BF0\u6BF2\u6BF3\u6C30\u6DFC\u6E46\u6E47\u6E1F\u6E49\u6E88\u6E3C\u6E3D\u6E45\u6E62\u6E2B\u6E3F\u6E41\u6E5D\u6E73\u6E1C\u6E33\u6E4B\u6E40\u6E51\u6E3B\u6E03\u6E2E\u6E5E"], + ["da40", "\u6E68\u6E5C\u6E61\u6E31\u6E28\u6E60\u6E71\u6E6B\u6E39\u6E22\u6E30\u6E53\u6E65\u6E27\u6E78\u6E64\u6E77\u6E55\u6E79\u6E52\u6E66\u6E35\u6E36\u6E5A\u7120\u711E\u712F\u70FB\u712E\u7131\u7123\u7125\u7122\u7132\u711F\u7128\u713A\u711B\u724B\u725A\u7288\u7289\u7286\u7285\u728B\u7312\u730B\u7330\u7322\u7331\u7333\u7327\u7332\u732D\u7326\u7323\u7335\u730C\u742E\u742C\u7430\u742B\u7416"], + ["daa1", "\u741A\u7421\u742D\u7431\u7424\u7423\u741D\u7429\u7420\u7432\u74FB\u752F\u756F\u756C\u75E7\u75DA\u75E1\u75E6\u75DD\u75DF\u75E4\u75D7\u7695\u7692\u76DA\u7746\u7747\u7744\u774D\u7745\u774A\u774E\u774B\u774C\u77DE\u77EC\u7860\u7864\u7865\u785C\u786D\u7871\u786A\u786E\u7870\u7869\u7868\u785E\u7862\u7974\u7973\u7972\u7970\u7A02\u7A0A\u7A03\u7A0C\u7A04\u7A99\u7AE6\u7AE4\u7B4A\u7B3B\u7B44\u7B48\u7B4C\u7B4E\u7B40\u7B58\u7B45\u7CA2\u7C9E\u7CA8\u7CA1\u7D58\u7D6F\u7D63\u7D53\u7D56\u7D67\u7D6A\u7D4F\u7D6D\u7D5C\u7D6B\u7D52\u7D54\u7D69\u7D51\u7D5F\u7D4E\u7F3E\u7F3F\u7F65"], + ["db40", "\u7F66\u7FA2\u7FA0\u7FA1\u7FD7\u8051\u804F\u8050\u80FE\u80D4\u8143\u814A\u8152\u814F\u8147\u813D\u814D\u813A\u81E6\u81EE\u81F7\u81F8\u81F9\u8204\u823C\u823D\u823F\u8275\u833B\u83CF\u83F9\u8423\u83C0\u83E8\u8412\u83E7\u83E4\u83FC\u83F6\u8410\u83C6\u83C8\u83EB\u83E3\u83BF\u8401\u83DD\u83E5\u83D8\u83FF\u83E1\u83CB\u83CE\u83D6\u83F5\u83C9\u8409\u840F\u83DE\u8411\u8406\u83C2\u83F3"], + ["dba1", "\u83D5\u83FA\u83C7\u83D1\u83EA\u8413\u83C3\u83EC\u83EE\u83C4\u83FB\u83D7\u83E2\u841B\u83DB\u83FE\u86D8\u86E2\u86E6\u86D3\u86E3\u86DA\u86EA\u86DD\u86EB\u86DC\u86EC\u86E9\u86D7\u86E8\u86D1\u8848\u8856\u8855\u88BA\u88D7\u88B9\u88B8\u88C0\u88BE\u88B6\u88BC\u88B7\u88BD\u88B2\u8901\u88C9\u8995\u8998\u8997\u89DD\u89DA\u89DB\u8A4E\u8A4D\u8A39\u8A59\u8A40\u8A57\u8A58\u8A44\u8A45\u8A52\u8A48\u8A51\u8A4A\u8A4C\u8A4F\u8C5F\u8C81\u8C80\u8CBA\u8CBE\u8CB0\u8CB9\u8CB5\u8D84\u8D80\u8D89\u8DD8\u8DD3\u8DCD\u8DC7\u8DD6\u8DDC\u8DCF\u8DD5\u8DD9\u8DC8\u8DD7\u8DC5\u8EEF\u8EF7\u8EFA"], + ["dc40", "\u8EF9\u8EE6\u8EEE\u8EE5\u8EF5\u8EE7\u8EE8\u8EF6\u8EEB\u8EF1\u8EEC\u8EF4\u8EE9\u902D\u9034\u902F\u9106\u912C\u9104\u90FF\u90FC\u9108\u90F9\u90FB\u9101\u9100\u9107\u9105\u9103\u9161\u9164\u915F\u9162\u9160\u9201\u920A\u9225\u9203\u921A\u9226\u920F\u920C\u9200\u9212\u91FF\u91FD\u9206\u9204\u9227\u9202\u921C\u9224\u9219\u9217\u9205\u9216\u957B\u958D\u958C\u9590\u9687\u967E\u9688"], + ["dca1", "\u9689\u9683\u9680\u96C2\u96C8\u96C3\u96F1\u96F0\u976C\u9770\u976E\u9807\u98A9\u98EB\u9CE6\u9EF9\u4E83\u4E84\u4EB6\u50BD\u50BF\u50C6\u50AE\u50C4\u50CA\u50B4\u50C8\u50C2\u50B0\u50C1\u50BA\u50B1\u50CB\u50C9\u50B6\u50B8\u51D7\u527A\u5278\u527B\u527C\u55C3\u55DB\u55CC\u55D0\u55CB\u55CA\u55DD\u55C0\u55D4\u55C4\u55E9\u55BF\u55D2\u558D\u55CF\u55D5\u55E2\u55D6\u55C8\u55F2\u55CD\u55D9\u55C2\u5714\u5853\u5868\u5864\u584F\u584D\u5849\u586F\u5855\u584E\u585D\u5859\u5865\u585B\u583D\u5863\u5871\u58FC\u5AC7\u5AC4\u5ACB\u5ABA\u5AB8\u5AB1\u5AB5\u5AB0\u5ABF\u5AC8\u5ABB\u5AC6"], + ["dd40", "\u5AB7\u5AC0\u5ACA\u5AB4\u5AB6\u5ACD\u5AB9\u5A90\u5BD6\u5BD8\u5BD9\u5C1F\u5C33\u5D71\u5D63\u5D4A\u5D65\u5D72\u5D6C\u5D5E\u5D68\u5D67\u5D62\u5DF0\u5E4F\u5E4E\u5E4A\u5E4D\u5E4B\u5EC5\u5ECC\u5EC6\u5ECB\u5EC7\u5F40\u5FAF\u5FAD\u60F7\u6149\u614A\u612B\u6145\u6136\u6132\u612E\u6146\u612F\u614F\u6129\u6140\u6220\u9168\u6223\u6225\u6224\u63C5\u63F1\u63EB\u6410\u6412\u6409\u6420\u6424"], + ["dda1", "\u6433\u6443\u641F\u6415\u6418\u6439\u6437\u6422\u6423\u640C\u6426\u6430\u6428\u6441\u6435\u642F\u640A\u641A\u6440\u6425\u6427\u640B\u63E7\u641B\u642E\u6421\u640E\u656F\u6592\u65D3\u6686\u668C\u6695\u6690\u668B\u668A\u6699\u6694\u6678\u6720\u6966\u695F\u6938\u694E\u6962\u6971\u693F\u6945\u696A\u6939\u6942\u6957\u6959\u697A\u6948\u6949\u6935\u696C\u6933\u693D\u6965\u68F0\u6978\u6934\u6969\u6940\u696F\u6944\u6976\u6958\u6941\u6974\u694C\u693B\u694B\u6937\u695C\u694F\u6951\u6932\u6952\u692F\u697B\u693C\u6B46\u6B45\u6B43\u6B42\u6B48\u6B41\u6B9B\uFA0D\u6BFB\u6BFC"], + ["de40", "\u6BF9\u6BF7\u6BF8\u6E9B\u6ED6\u6EC8\u6E8F\u6EC0\u6E9F\u6E93\u6E94\u6EA0\u6EB1\u6EB9\u6EC6\u6ED2\u6EBD\u6EC1\u6E9E\u6EC9\u6EB7\u6EB0\u6ECD\u6EA6\u6ECF\u6EB2\u6EBE\u6EC3\u6EDC\u6ED8\u6E99\u6E92\u6E8E\u6E8D\u6EA4\u6EA1\u6EBF\u6EB3\u6ED0\u6ECA\u6E97\u6EAE\u6EA3\u7147\u7154\u7152\u7163\u7160\u7141\u715D\u7162\u7172\u7178\u716A\u7161\u7142\u7158\u7143\u714B\u7170\u715F\u7150\u7153"], + ["dea1", "\u7144\u714D\u715A\u724F\u728D\u728C\u7291\u7290\u728E\u733C\u7342\u733B\u733A\u7340\u734A\u7349\u7444\u744A\u744B\u7452\u7451\u7457\u7440\u744F\u7450\u744E\u7442\u7446\u744D\u7454\u74E1\u74FF\u74FE\u74FD\u751D\u7579\u7577\u6983\u75EF\u760F\u7603\u75F7\u75FE\u75FC\u75F9\u75F8\u7610\u75FB\u75F6\u75ED\u75F5\u75FD\u7699\u76B5\u76DD\u7755\u775F\u7760\u7752\u7756\u775A\u7769\u7767\u7754\u7759\u776D\u77E0\u7887\u789A\u7894\u788F\u7884\u7895\u7885\u7886\u78A1\u7883\u7879\u7899\u7880\u7896\u787B\u797C\u7982\u797D\u7979\u7A11\u7A18\u7A19\u7A12\u7A17\u7A15\u7A22\u7A13"], + ["df40", "\u7A1B\u7A10\u7AA3\u7AA2\u7A9E\u7AEB\u7B66\u7B64\u7B6D\u7B74\u7B69\u7B72\u7B65\u7B73\u7B71\u7B70\u7B61\u7B78\u7B76\u7B63\u7CB2\u7CB4\u7CAF\u7D88\u7D86\u7D80\u7D8D\u7D7F\u7D85\u7D7A\u7D8E\u7D7B\u7D83\u7D7C\u7D8C\u7D94\u7D84\u7D7D\u7D92\u7F6D\u7F6B\u7F67\u7F68\u7F6C\u7FA6\u7FA5\u7FA7\u7FDB\u7FDC\u8021\u8164\u8160\u8177\u815C\u8169\u815B\u8162\u8172\u6721\u815E\u8176\u8167\u816F"], + ["dfa1", "\u8144\u8161\u821D\u8249\u8244\u8240\u8242\u8245\u84F1\u843F\u8456\u8476\u8479\u848F\u848D\u8465\u8451\u8440\u8486\u8467\u8430\u844D\u847D\u845A\u8459\u8474\u8473\u845D\u8507\u845E\u8437\u843A\u8434\u847A\u8443\u8478\u8432\u8445\u8429\u83D9\u844B\u842F\u8442\u842D\u845F\u8470\u8439\u844E\u844C\u8452\u846F\u84C5\u848E\u843B\u8447\u8436\u8433\u8468\u847E\u8444\u842B\u8460\u8454\u846E\u8450\u870B\u8704\u86F7\u870C\u86FA\u86D6\u86F5\u874D\u86F8\u870E\u8709\u8701\u86F6\u870D\u8705\u88D6\u88CB\u88CD\u88CE\u88DE\u88DB\u88DA\u88CC\u88D0\u8985\u899B\u89DF\u89E5\u89E4"], + ["e040", "\u89E1\u89E0\u89E2\u89DC\u89E6\u8A76\u8A86\u8A7F\u8A61\u8A3F\u8A77\u8A82\u8A84\u8A75\u8A83\u8A81\u8A74\u8A7A\u8C3C\u8C4B\u8C4A\u8C65\u8C64\u8C66\u8C86\u8C84\u8C85\u8CCC\u8D68\u8D69\u8D91\u8D8C\u8D8E\u8D8F\u8D8D\u8D93\u8D94\u8D90\u8D92\u8DF0\u8DE0\u8DEC\u8DF1\u8DEE\u8DD0\u8DE9\u8DE3\u8DE2\u8DE7\u8DF2\u8DEB\u8DF4\u8F06\u8EFF\u8F01\u8F00\u8F05\u8F07\u8F08\u8F02\u8F0B\u9052\u903F"], + ["e0a1", "\u9044\u9049\u903D\u9110\u910D\u910F\u9111\u9116\u9114\u910B\u910E\u916E\u916F\u9248\u9252\u9230\u923A\u9266\u9233\u9265\u925E\u9283\u922E\u924A\u9246\u926D\u926C\u924F\u9260\u9267\u926F\u9236\u9261\u9270\u9231\u9254\u9263\u9250\u9272\u924E\u9253\u924C\u9256\u9232\u959F\u959C\u959E\u959B\u9692\u9693\u9691\u9697\u96CE\u96FA\u96FD\u96F8\u96F5\u9773\u9777\u9778\u9772\u980F\u980D\u980E\u98AC\u98F6\u98F9\u99AF\u99B2\u99B0\u99B5\u9AAD\u9AAB\u9B5B\u9CEA\u9CED\u9CE7\u9E80\u9EFD\u50E6\u50D4\u50D7\u50E8\u50F3\u50DB\u50EA\u50DD\u50E4\u50D3\u50EC\u50F0\u50EF\u50E3\u50E0"], + ["e140", "\u51D8\u5280\u5281\u52E9\u52EB\u5330\u53AC\u5627\u5615\u560C\u5612\u55FC\u560F\u561C\u5601\u5613\u5602\u55FA\u561D\u5604\u55FF\u55F9\u5889\u587C\u5890\u5898\u5886\u5881\u587F\u5874\u588B\u587A\u5887\u5891\u588E\u5876\u5882\u5888\u587B\u5894\u588F\u58FE\u596B\u5ADC\u5AEE\u5AE5\u5AD5\u5AEA\u5ADA\u5AED\u5AEB\u5AF3\u5AE2\u5AE0\u5ADB\u5AEC\u5ADE\u5ADD\u5AD9\u5AE8\u5ADF\u5B77\u5BE0"], + ["e1a1", "\u5BE3\u5C63\u5D82\u5D80\u5D7D\u5D86\u5D7A\u5D81\u5D77\u5D8A\u5D89\u5D88\u5D7E\u5D7C\u5D8D\u5D79\u5D7F\u5E58\u5E59\u5E53\u5ED8\u5ED1\u5ED7\u5ECE\u5EDC\u5ED5\u5ED9\u5ED2\u5ED4\u5F44\u5F43\u5F6F\u5FB6\u612C\u6128\u6141\u615E\u6171\u6173\u6152\u6153\u6172\u616C\u6180\u6174\u6154\u617A\u615B\u6165\u613B\u616A\u6161\u6156\u6229\u6227\u622B\u642B\u644D\u645B\u645D\u6474\u6476\u6472\u6473\u647D\u6475\u6466\u64A6\u644E\u6482\u645E\u645C\u644B\u6453\u6460\u6450\u647F\u643F\u646C\u646B\u6459\u6465\u6477\u6573\u65A0\u66A1\u66A0\u669F\u6705\u6704\u6722\u69B1\u69B6\u69C9"], + ["e240", "\u69A0\u69CE\u6996\u69B0\u69AC\u69BC\u6991\u6999\u698E\u69A7\u698D\u69A9\u69BE\u69AF\u69BF\u69C4\u69BD\u69A4\u69D4\u69B9\u69CA\u699A\u69CF\u69B3\u6993\u69AA\u69A1\u699E\u69D9\u6997\u6990\u69C2\u69B5\u69A5\u69C6\u6B4A\u6B4D\u6B4B\u6B9E\u6B9F\u6BA0\u6BC3\u6BC4\u6BFE\u6ECE\u6EF5\u6EF1\u6F03\u6F25\u6EF8\u6F37\u6EFB\u6F2E\u6F09\u6F4E\u6F19\u6F1A\u6F27\u6F18\u6F3B\u6F12\u6EED\u6F0A"], + ["e2a1", "\u6F36\u6F73\u6EF9\u6EEE\u6F2D\u6F40\u6F30\u6F3C\u6F35\u6EEB\u6F07\u6F0E\u6F43\u6F05\u6EFD\u6EF6\u6F39\u6F1C\u6EFC\u6F3A\u6F1F\u6F0D\u6F1E\u6F08\u6F21\u7187\u7190\u7189\u7180\u7185\u7182\u718F\u717B\u7186\u7181\u7197\u7244\u7253\u7297\u7295\u7293\u7343\u734D\u7351\u734C\u7462\u7473\u7471\u7475\u7472\u7467\u746E\u7500\u7502\u7503\u757D\u7590\u7616\u7608\u760C\u7615\u7611\u760A\u7614\u76B8\u7781\u777C\u7785\u7782\u776E\u7780\u776F\u777E\u7783\u78B2\u78AA\u78B4\u78AD\u78A8\u787E\u78AB\u789E\u78A5\u78A0\u78AC\u78A2\u78A4\u7998\u798A\u798B\u7996\u7995\u7994\u7993"], + ["e340", "\u7997\u7988\u7992\u7990\u7A2B\u7A4A\u7A30\u7A2F\u7A28\u7A26\u7AA8\u7AAB\u7AAC\u7AEE\u7B88\u7B9C\u7B8A\u7B91\u7B90\u7B96\u7B8D\u7B8C\u7B9B\u7B8E\u7B85\u7B98\u5284\u7B99\u7BA4\u7B82\u7CBB\u7CBF\u7CBC\u7CBA\u7DA7\u7DB7\u7DC2\u7DA3\u7DAA\u7DC1\u7DC0\u7DC5\u7D9D\u7DCE\u7DC4\u7DC6\u7DCB\u7DCC\u7DAF\u7DB9\u7D96\u7DBC\u7D9F\u7DA6\u7DAE\u7DA9\u7DA1\u7DC9\u7F73\u7FE2\u7FE3\u7FE5\u7FDE"], + ["e3a1", "\u8024\u805D\u805C\u8189\u8186\u8183\u8187\u818D\u818C\u818B\u8215\u8497\u84A4\u84A1\u849F\u84BA\u84CE\u84C2\u84AC\u84AE\u84AB\u84B9\u84B4\u84C1\u84CD\u84AA\u849A\u84B1\u84D0\u849D\u84A7\u84BB\u84A2\u8494\u84C7\u84CC\u849B\u84A9\u84AF\u84A8\u84D6\u8498\u84B6\u84CF\u84A0\u84D7\u84D4\u84D2\u84DB\u84B0\u8491\u8661\u8733\u8723\u8728\u876B\u8740\u872E\u871E\u8721\u8719\u871B\u8743\u872C\u8741\u873E\u8746\u8720\u8732\u872A\u872D\u873C\u8712\u873A\u8731\u8735\u8742\u8726\u8727\u8738\u8724\u871A\u8730\u8711\u88F7\u88E7\u88F1\u88F2\u88FA\u88FE\u88EE\u88FC\u88F6\u88FB"], + ["e440", "\u88F0\u88EC\u88EB\u899D\u89A1\u899F\u899E\u89E9\u89EB\u89E8\u8AAB\u8A99\u8A8B\u8A92\u8A8F\u8A96\u8C3D\u8C68\u8C69\u8CD5\u8CCF\u8CD7\u8D96\u8E09\u8E02\u8DFF\u8E0D\u8DFD\u8E0A\u8E03\u8E07\u8E06\u8E05\u8DFE\u8E00\u8E04\u8F10\u8F11\u8F0E\u8F0D\u9123\u911C\u9120\u9122\u911F\u911D\u911A\u9124\u9121\u911B\u917A\u9172\u9179\u9173\u92A5\u92A4\u9276\u929B\u927A\u92A0\u9294\u92AA\u928D"], + ["e4a1", "\u92A6\u929A\u92AB\u9279\u9297\u927F\u92A3\u92EE\u928E\u9282\u9295\u92A2\u927D\u9288\u92A1\u928A\u9286\u928C\u9299\u92A7\u927E\u9287\u92A9\u929D\u928B\u922D\u969E\u96A1\u96FF\u9758\u977D\u977A\u977E\u9783\u9780\u9782\u977B\u9784\u9781\u977F\u97CE\u97CD\u9816\u98AD\u98AE\u9902\u9900\u9907\u999D\u999C\u99C3\u99B9\u99BB\u99BA\u99C2\u99BD\u99C7\u9AB1\u9AE3\u9AE7\u9B3E\u9B3F\u9B60\u9B61\u9B5F\u9CF1\u9CF2\u9CF5\u9EA7\u50FF\u5103\u5130\u50F8\u5106\u5107\u50F6\u50FE\u510B\u510C\u50FD\u510A\u528B\u528C\u52F1\u52EF\u5648\u5642\u564C\u5635\u5641\u564A\u5649\u5646\u5658"], + ["e540", "\u565A\u5640\u5633\u563D\u562C\u563E\u5638\u562A\u563A\u571A\u58AB\u589D\u58B1\u58A0\u58A3\u58AF\u58AC\u58A5\u58A1\u58FF\u5AFF\u5AF4\u5AFD\u5AF7\u5AF6\u5B03\u5AF8\u5B02\u5AF9\u5B01\u5B07\u5B05\u5B0F\u5C67\u5D99\u5D97\u5D9F\u5D92\u5DA2\u5D93\u5D95\u5DA0\u5D9C\u5DA1\u5D9A\u5D9E\u5E69\u5E5D\u5E60\u5E5C\u7DF3\u5EDB\u5EDE\u5EE1\u5F49\u5FB2\u618B\u6183\u6179\u61B1\u61B0\u61A2\u6189"], + ["e5a1", "\u619B\u6193\u61AF\u61AD\u619F\u6192\u61AA\u61A1\u618D\u6166\u61B3\u622D\u646E\u6470\u6496\u64A0\u6485\u6497\u649C\u648F\u648B\u648A\u648C\u64A3\u649F\u6468\u64B1\u6498\u6576\u657A\u6579\u657B\u65B2\u65B3\u66B5\u66B0\u66A9\u66B2\u66B7\u66AA\u66AF\u6A00\u6A06\u6A17\u69E5\u69F8\u6A15\u69F1\u69E4\u6A20\u69FF\u69EC\u69E2\u6A1B\u6A1D\u69FE\u6A27\u69F2\u69EE\u6A14\u69F7\u69E7\u6A40\u6A08\u69E6\u69FB\u6A0D\u69FC\u69EB\u6A09\u6A04\u6A18\u6A25\u6A0F\u69F6\u6A26\u6A07\u69F4\u6A16\u6B51\u6BA5\u6BA3\u6BA2\u6BA6\u6C01\u6C00\u6BFF\u6C02\u6F41\u6F26\u6F7E\u6F87\u6FC6\u6F92"], + ["e640", "\u6F8D\u6F89\u6F8C\u6F62\u6F4F\u6F85\u6F5A\u6F96\u6F76\u6F6C\u6F82\u6F55\u6F72\u6F52\u6F50\u6F57\u6F94\u6F93\u6F5D\u6F00\u6F61\u6F6B\u6F7D\u6F67\u6F90\u6F53\u6F8B\u6F69\u6F7F\u6F95\u6F63\u6F77\u6F6A\u6F7B\u71B2\u71AF\u719B\u71B0\u71A0\u719A\u71A9\u71B5\u719D\u71A5\u719E\u71A4\u71A1\u71AA\u719C\u71A7\u71B3\u7298\u729A\u7358\u7352\u735E\u735F\u7360\u735D\u735B\u7361\u735A\u7359"], + ["e6a1", "\u7362\u7487\u7489\u748A\u7486\u7481\u747D\u7485\u7488\u747C\u7479\u7508\u7507\u757E\u7625\u761E\u7619\u761D\u761C\u7623\u761A\u7628\u761B\u769C\u769D\u769E\u769B\u778D\u778F\u7789\u7788\u78CD\u78BB\u78CF\u78CC\u78D1\u78CE\u78D4\u78C8\u78C3\u78C4\u78C9\u799A\u79A1\u79A0\u799C\u79A2\u799B\u6B76\u7A39\u7AB2\u7AB4\u7AB3\u7BB7\u7BCB\u7BBE\u7BAC\u7BCE\u7BAF\u7BB9\u7BCA\u7BB5\u7CC5\u7CC8\u7CCC\u7CCB\u7DF7\u7DDB\u7DEA\u7DE7\u7DD7\u7DE1\u7E03\u7DFA\u7DE6\u7DF6\u7DF1\u7DF0\u7DEE\u7DDF\u7F76\u7FAC\u7FB0\u7FAD\u7FED\u7FEB\u7FEA\u7FEC\u7FE6\u7FE8\u8064\u8067\u81A3\u819F"], + ["e740", "\u819E\u8195\u81A2\u8199\u8197\u8216\u824F\u8253\u8252\u8250\u824E\u8251\u8524\u853B\u850F\u8500\u8529\u850E\u8509\u850D\u851F\u850A\u8527\u851C\u84FB\u852B\u84FA\u8508\u850C\u84F4\u852A\u84F2\u8515\u84F7\u84EB\u84F3\u84FC\u8512\u84EA\u84E9\u8516\u84FE\u8528\u851D\u852E\u8502\u84FD\u851E\u84F6\u8531\u8526\u84E7\u84E8\u84F0\u84EF\u84F9\u8518\u8520\u8530\u850B\u8519\u852F\u8662"], + ["e7a1", "\u8756\u8763\u8764\u8777\u87E1\u8773\u8758\u8754\u875B\u8752\u8761\u875A\u8751\u875E\u876D\u876A\u8750\u874E\u875F\u875D\u876F\u876C\u877A\u876E\u875C\u8765\u874F\u877B\u8775\u8762\u8767\u8769\u885A\u8905\u890C\u8914\u890B\u8917\u8918\u8919\u8906\u8916\u8911\u890E\u8909\u89A2\u89A4\u89A3\u89ED\u89F0\u89EC\u8ACF\u8AC6\u8AB8\u8AD3\u8AD1\u8AD4\u8AD5\u8ABB\u8AD7\u8ABE\u8AC0\u8AC5\u8AD8\u8AC3\u8ABA\u8ABD\u8AD9\u8C3E\u8C4D\u8C8F\u8CE5\u8CDF\u8CD9\u8CE8\u8CDA\u8CDD\u8CE7\u8DA0\u8D9C\u8DA1\u8D9B\u8E20\u8E23\u8E25\u8E24\u8E2E\u8E15\u8E1B\u8E16\u8E11\u8E19\u8E26\u8E27"], + ["e840", "\u8E14\u8E12\u8E18\u8E13\u8E1C\u8E17\u8E1A\u8F2C\u8F24\u8F18\u8F1A\u8F20\u8F23\u8F16\u8F17\u9073\u9070\u906F\u9067\u906B\u912F\u912B\u9129\u912A\u9132\u9126\u912E\u9185\u9186\u918A\u9181\u9182\u9184\u9180\u92D0\u92C3\u92C4\u92C0\u92D9\u92B6\u92CF\u92F1\u92DF\u92D8\u92E9\u92D7\u92DD\u92CC\u92EF\u92C2\u92E8\u92CA\u92C8\u92CE\u92E6\u92CD\u92D5\u92C9\u92E0\u92DE\u92E7\u92D1\u92D3"], + ["e8a1", "\u92B5\u92E1\u92C6\u92B4\u957C\u95AC\u95AB\u95AE\u95B0\u96A4\u96A2\u96D3\u9705\u9708\u9702\u975A\u978A\u978E\u9788\u97D0\u97CF\u981E\u981D\u9826\u9829\u9828\u9820\u981B\u9827\u98B2\u9908\u98FA\u9911\u9914\u9916\u9917\u9915\u99DC\u99CD\u99CF\u99D3\u99D4\u99CE\u99C9\u99D6\u99D8\u99CB\u99D7\u99CC\u9AB3\u9AEC\u9AEB\u9AF3\u9AF2\u9AF1\u9B46\u9B43\u9B67\u9B74\u9B71\u9B66\u9B76\u9B75\u9B70\u9B68\u9B64\u9B6C\u9CFC\u9CFA\u9CFD\u9CFF\u9CF7\u9D07\u9D00\u9CF9\u9CFB\u9D08\u9D05\u9D04\u9E83\u9ED3\u9F0F\u9F10\u511C\u5113\u5117\u511A\u5111\u51DE\u5334\u53E1\u5670\u5660\u566E"], + ["e940", "\u5673\u5666\u5663\u566D\u5672\u565E\u5677\u571C\u571B\u58C8\u58BD\u58C9\u58BF\u58BA\u58C2\u58BC\u58C6\u5B17\u5B19\u5B1B\u5B21\u5B14\u5B13\u5B10\u5B16\u5B28\u5B1A\u5B20\u5B1E\u5BEF\u5DAC\u5DB1\u5DA9\u5DA7\u5DB5\u5DB0\u5DAE\u5DAA\u5DA8\u5DB2\u5DAD\u5DAF\u5DB4\u5E67\u5E68\u5E66\u5E6F\u5EE9\u5EE7\u5EE6\u5EE8\u5EE5\u5F4B\u5FBC\u619D\u61A8\u6196\u61C5\u61B4\u61C6\u61C1\u61CC\u61BA"], + ["e9a1", "\u61BF\u61B8\u618C\u64D7\u64D6\u64D0\u64CF\u64C9\u64BD\u6489\u64C3\u64DB\u64F3\u64D9\u6533\u657F\u657C\u65A2\u66C8\u66BE\u66C0\u66CA\u66CB\u66CF\u66BD\u66BB\u66BA\u66CC\u6723\u6A34\u6A66\u6A49\u6A67\u6A32\u6A68\u6A3E\u6A5D\u6A6D\u6A76\u6A5B\u6A51\u6A28\u6A5A\u6A3B\u6A3F\u6A41\u6A6A\u6A64\u6A50\u6A4F\u6A54\u6A6F\u6A69\u6A60\u6A3C\u6A5E\u6A56\u6A55\u6A4D\u6A4E\u6A46\u6B55\u6B54\u6B56\u6BA7\u6BAA\u6BAB\u6BC8\u6BC7\u6C04\u6C03\u6C06\u6FAD\u6FCB\u6FA3\u6FC7\u6FBC\u6FCE\u6FC8\u6F5E\u6FC4\u6FBD\u6F9E\u6FCA\u6FA8\u7004\u6FA5\u6FAE\u6FBA\u6FAC\u6FAA\u6FCF\u6FBF\u6FB8"], + ["ea40", "\u6FA2\u6FC9\u6FAB\u6FCD\u6FAF\u6FB2\u6FB0\u71C5\u71C2\u71BF\u71B8\u71D6\u71C0\u71C1\u71CB\u71D4\u71CA\u71C7\u71CF\u71BD\u71D8\u71BC\u71C6\u71DA\u71DB\u729D\u729E\u7369\u7366\u7367\u736C\u7365\u736B\u736A\u747F\u749A\u74A0\u7494\u7492\u7495\u74A1\u750B\u7580\u762F\u762D\u7631\u763D\u7633\u763C\u7635\u7632\u7630\u76BB\u76E6\u779A\u779D\u77A1\u779C\u779B\u77A2\u77A3\u7795\u7799"], + ["eaa1", "\u7797\u78DD\u78E9\u78E5\u78EA\u78DE\u78E3\u78DB\u78E1\u78E2\u78ED\u78DF\u78E0\u79A4\u7A44\u7A48\u7A47\u7AB6\u7AB8\u7AB5\u7AB1\u7AB7\u7BDE\u7BE3\u7BE7\u7BDD\u7BD5\u7BE5\u7BDA\u7BE8\u7BF9\u7BD4\u7BEA\u7BE2\u7BDC\u7BEB\u7BD8\u7BDF\u7CD2\u7CD4\u7CD7\u7CD0\u7CD1\u7E12\u7E21\u7E17\u7E0C\u7E1F\u7E20\u7E13\u7E0E\u7E1C\u7E15\u7E1A\u7E22\u7E0B\u7E0F\u7E16\u7E0D\u7E14\u7E25\u7E24\u7F43\u7F7B\u7F7C\u7F7A\u7FB1\u7FEF\u802A\u8029\u806C\u81B1\u81A6\u81AE\u81B9\u81B5\u81AB\u81B0\u81AC\u81B4\u81B2\u81B7\u81A7\u81F2\u8255\u8256\u8257\u8556\u8545\u856B\u854D\u8553\u8561\u8558"], + ["eb40", "\u8540\u8546\u8564\u8541\u8562\u8544\u8551\u8547\u8563\u853E\u855B\u8571\u854E\u856E\u8575\u8555\u8567\u8560\u858C\u8566\u855D\u8554\u8565\u856C\u8663\u8665\u8664\u879B\u878F\u8797\u8793\u8792\u8788\u8781\u8796\u8798\u8779\u8787\u87A3\u8785\u8790\u8791\u879D\u8784\u8794\u879C\u879A\u8789\u891E\u8926\u8930\u892D\u892E\u8927\u8931\u8922\u8929\u8923\u892F\u892C\u891F\u89F1\u8AE0"], + ["eba1", "\u8AE2\u8AF2\u8AF4\u8AF5\u8ADD\u8B14\u8AE4\u8ADF\u8AF0\u8AC8\u8ADE\u8AE1\u8AE8\u8AFF\u8AEF\u8AFB\u8C91\u8C92\u8C90\u8CF5\u8CEE\u8CF1\u8CF0\u8CF3\u8D6C\u8D6E\u8DA5\u8DA7\u8E33\u8E3E\u8E38\u8E40\u8E45\u8E36\u8E3C\u8E3D\u8E41\u8E30\u8E3F\u8EBD\u8F36\u8F2E\u8F35\u8F32\u8F39\u8F37\u8F34\u9076\u9079\u907B\u9086\u90FA\u9133\u9135\u9136\u9193\u9190\u9191\u918D\u918F\u9327\u931E\u9308\u931F\u9306\u930F\u937A\u9338\u933C\u931B\u9323\u9312\u9301\u9346\u932D\u930E\u930D\u92CB\u931D\u92FA\u9325\u9313\u92F9\u92F7\u9334\u9302\u9324\u92FF\u9329\u9339\u9335\u932A\u9314\u930C"], + ["ec40", "\u930B\u92FE\u9309\u9300\u92FB\u9316\u95BC\u95CD\u95BE\u95B9\u95BA\u95B6\u95BF\u95B5\u95BD\u96A9\u96D4\u970B\u9712\u9710\u9799\u9797\u9794\u97F0\u97F8\u9835\u982F\u9832\u9924\u991F\u9927\u9929\u999E\u99EE\u99EC\u99E5\u99E4\u99F0\u99E3\u99EA\u99E9\u99E7\u9AB9\u9ABF\u9AB4\u9ABB\u9AF6\u9AFA\u9AF9\u9AF7\u9B33\u9B80\u9B85\u9B87\u9B7C\u9B7E\u9B7B\u9B82\u9B93\u9B92\u9B90\u9B7A\u9B95"], + ["eca1", "\u9B7D\u9B88\u9D25\u9D17\u9D20\u9D1E\u9D14\u9D29\u9D1D\u9D18\u9D22\u9D10\u9D19\u9D1F\u9E88\u9E86\u9E87\u9EAE\u9EAD\u9ED5\u9ED6\u9EFA\u9F12\u9F3D\u5126\u5125\u5122\u5124\u5120\u5129\u52F4\u5693\u568C\u568D\u5686\u5684\u5683\u567E\u5682\u567F\u5681\u58D6\u58D4\u58CF\u58D2\u5B2D\u5B25\u5B32\u5B23\u5B2C\u5B27\u5B26\u5B2F\u5B2E\u5B7B\u5BF1\u5BF2\u5DB7\u5E6C\u5E6A\u5FBE\u5FBB\u61C3\u61B5\u61BC\u61E7\u61E0\u61E5\u61E4\u61E8\u61DE\u64EF\u64E9\u64E3\u64EB\u64E4\u64E8\u6581\u6580\u65B6\u65DA\u66D2\u6A8D\u6A96\u6A81\u6AA5\u6A89\u6A9F\u6A9B\u6AA1\u6A9E\u6A87\u6A93\u6A8E"], + ["ed40", "\u6A95\u6A83\u6AA8\u6AA4\u6A91\u6A7F\u6AA6\u6A9A\u6A85\u6A8C\u6A92\u6B5B\u6BAD\u6C09\u6FCC\u6FA9\u6FF4\u6FD4\u6FE3\u6FDC\u6FED\u6FE7\u6FE6\u6FDE\u6FF2\u6FDD\u6FE2\u6FE8\u71E1\u71F1\u71E8\u71F2\u71E4\u71F0\u71E2\u7373\u736E\u736F\u7497\u74B2\u74AB\u7490\u74AA\u74AD\u74B1\u74A5\u74AF\u7510\u7511\u7512\u750F\u7584\u7643\u7648\u7649\u7647\u76A4\u76E9\u77B5\u77AB\u77B2\u77B7\u77B6"], + ["eda1", "\u77B4\u77B1\u77A8\u77F0\u78F3\u78FD\u7902\u78FB\u78FC\u78F2\u7905\u78F9\u78FE\u7904\u79AB\u79A8\u7A5C\u7A5B\u7A56\u7A58\u7A54\u7A5A\u7ABE\u7AC0\u7AC1\u7C05\u7C0F\u7BF2\u7C00\u7BFF\u7BFB\u7C0E\u7BF4\u7C0B\u7BF3\u7C02\u7C09\u7C03\u7C01\u7BF8\u7BFD\u7C06\u7BF0\u7BF1\u7C10\u7C0A\u7CE8\u7E2D\u7E3C\u7E42\u7E33\u9848\u7E38\u7E2A\u7E49\u7E40\u7E47\u7E29\u7E4C\u7E30\u7E3B\u7E36\u7E44\u7E3A\u7F45\u7F7F\u7F7E\u7F7D\u7FF4\u7FF2\u802C\u81BB\u81C4\u81CC\u81CA\u81C5\u81C7\u81BC\u81E9\u825B\u825A\u825C\u8583\u8580\u858F\u85A7\u8595\u85A0\u858B\u85A3\u857B\u85A4\u859A\u859E"], + ["ee40", "\u8577\u857C\u8589\u85A1\u857A\u8578\u8557\u858E\u8596\u8586\u858D\u8599\u859D\u8581\u85A2\u8582\u8588\u8585\u8579\u8576\u8598\u8590\u859F\u8668\u87BE\u87AA\u87AD\u87C5\u87B0\u87AC\u87B9\u87B5\u87BC\u87AE\u87C9\u87C3\u87C2\u87CC\u87B7\u87AF\u87C4\u87CA\u87B4\u87B6\u87BF\u87B8\u87BD\u87DE\u87B2\u8935\u8933\u893C\u893E\u8941\u8952\u8937\u8942\u89AD\u89AF\u89AE\u89F2\u89F3\u8B1E"], + ["eea1", "\u8B18\u8B16\u8B11\u8B05\u8B0B\u8B22\u8B0F\u8B12\u8B15\u8B07\u8B0D\u8B08\u8B06\u8B1C\u8B13\u8B1A\u8C4F\u8C70\u8C72\u8C71\u8C6F\u8C95\u8C94\u8CF9\u8D6F\u8E4E\u8E4D\u8E53\u8E50\u8E4C\u8E47\u8F43\u8F40\u9085\u907E\u9138\u919A\u91A2\u919B\u9199\u919F\u91A1\u919D\u91A0\u93A1\u9383\u93AF\u9364\u9356\u9347\u937C\u9358\u935C\u9376\u9349\u9350\u9351\u9360\u936D\u938F\u934C\u936A\u9379\u9357\u9355\u9352\u934F\u9371\u9377\u937B\u9361\u935E\u9363\u9367\u9380\u934E\u9359\u95C7\u95C0\u95C9\u95C3\u95C5\u95B7\u96AE\u96B0\u96AC\u9720\u971F\u9718\u971D\u9719\u979A\u97A1\u979C"], + ["ef40", "\u979E\u979D\u97D5\u97D4\u97F1\u9841\u9844\u984A\u9849\u9845\u9843\u9925\u992B\u992C\u992A\u9933\u9932\u992F\u992D\u9931\u9930\u9998\u99A3\u99A1\u9A02\u99FA\u99F4\u99F7\u99F9\u99F8\u99F6\u99FB\u99FD\u99FE\u99FC\u9A03\u9ABE\u9AFE\u9AFD\u9B01\u9AFC\u9B48\u9B9A\u9BA8\u9B9E\u9B9B\u9BA6\u9BA1\u9BA5\u9BA4\u9B86\u9BA2\u9BA0\u9BAF\u9D33\u9D41\u9D67\u9D36\u9D2E\u9D2F\u9D31\u9D38\u9D30"], + ["efa1", "\u9D45\u9D42\u9D43\u9D3E\u9D37\u9D40\u9D3D\u7FF5\u9D2D\u9E8A\u9E89\u9E8D\u9EB0\u9EC8\u9EDA\u9EFB\u9EFF\u9F24\u9F23\u9F22\u9F54\u9FA0\u5131\u512D\u512E\u5698\u569C\u5697\u569A\u569D\u5699\u5970\u5B3C\u5C69\u5C6A\u5DC0\u5E6D\u5E6E\u61D8\u61DF\u61ED\u61EE\u61F1\u61EA\u61F0\u61EB\u61D6\u61E9\u64FF\u6504\u64FD\u64F8\u6501\u6503\u64FC\u6594\u65DB\u66DA\u66DB\u66D8\u6AC5\u6AB9\u6ABD\u6AE1\u6AC6\u6ABA\u6AB6\u6AB7\u6AC7\u6AB4\u6AAD\u6B5E\u6BC9\u6C0B\u7007\u700C\u700D\u7001\u7005\u7014\u700E\u6FFF\u7000\u6FFB\u7026\u6FFC\u6FF7\u700A\u7201\u71FF\u71F9\u7203\u71FD\u7376"], + ["f040", "\u74B8\u74C0\u74B5\u74C1\u74BE\u74B6\u74BB\u74C2\u7514\u7513\u765C\u7664\u7659\u7650\u7653\u7657\u765A\u76A6\u76BD\u76EC\u77C2\u77BA\u78FF\u790C\u7913\u7914\u7909\u7910\u7912\u7911\u79AD\u79AC\u7A5F\u7C1C\u7C29\u7C19\u7C20\u7C1F\u7C2D\u7C1D\u7C26\u7C28\u7C22\u7C25\u7C30\u7E5C\u7E50\u7E56\u7E63\u7E58\u7E62\u7E5F\u7E51\u7E60\u7E57\u7E53\u7FB5\u7FB3\u7FF7\u7FF8\u8075\u81D1\u81D2"], + ["f0a1", "\u81D0\u825F\u825E\u85B4\u85C6\u85C0\u85C3\u85C2\u85B3\u85B5\u85BD\u85C7\u85C4\u85BF\u85CB\u85CE\u85C8\u85C5\u85B1\u85B6\u85D2\u8624\u85B8\u85B7\u85BE\u8669\u87E7\u87E6\u87E2\u87DB\u87EB\u87EA\u87E5\u87DF\u87F3\u87E4\u87D4\u87DC\u87D3\u87ED\u87D8\u87E3\u87A4\u87D7\u87D9\u8801\u87F4\u87E8\u87DD\u8953\u894B\u894F\u894C\u8946\u8950\u8951\u8949\u8B2A\u8B27\u8B23\u8B33\u8B30\u8B35\u8B47\u8B2F\u8B3C\u8B3E\u8B31\u8B25\u8B37\u8B26\u8B36\u8B2E\u8B24\u8B3B\u8B3D\u8B3A\u8C42\u8C75\u8C99\u8C98\u8C97\u8CFE\u8D04\u8D02\u8D00\u8E5C\u8E62\u8E60\u8E57\u8E56\u8E5E\u8E65\u8E67"], + ["f140", "\u8E5B\u8E5A\u8E61\u8E5D\u8E69\u8E54\u8F46\u8F47\u8F48\u8F4B\u9128\u913A\u913B\u913E\u91A8\u91A5\u91A7\u91AF\u91AA\u93B5\u938C\u9392\u93B7\u939B\u939D\u9389\u93A7\u938E\u93AA\u939E\u93A6\u9395\u9388\u9399\u939F\u938D\u93B1\u9391\u93B2\u93A4\u93A8\u93B4\u93A3\u93A5\u95D2\u95D3\u95D1\u96B3\u96D7\u96DA\u5DC2\u96DF\u96D8\u96DD\u9723\u9722\u9725\u97AC\u97AE\u97A8\u97AB\u97A4\u97AA"], + ["f1a1", "\u97A2\u97A5\u97D7\u97D9\u97D6\u97D8\u97FA\u9850\u9851\u9852\u98B8\u9941\u993C\u993A\u9A0F\u9A0B\u9A09\u9A0D\u9A04\u9A11\u9A0A\u9A05\u9A07\u9A06\u9AC0\u9ADC\u9B08\u9B04\u9B05\u9B29\u9B35\u9B4A\u9B4C\u9B4B\u9BC7\u9BC6\u9BC3\u9BBF\u9BC1\u9BB5\u9BB8\u9BD3\u9BB6\u9BC4\u9BB9\u9BBD\u9D5C\u9D53\u9D4F\u9D4A\u9D5B\u9D4B\u9D59\u9D56\u9D4C\u9D57\u9D52\u9D54\u9D5F\u9D58\u9D5A\u9E8E\u9E8C\u9EDF\u9F01\u9F00\u9F16\u9F25\u9F2B\u9F2A\u9F29\u9F28\u9F4C\u9F55\u5134\u5135\u5296\u52F7\u53B4\u56AB\u56AD\u56A6\u56A7\u56AA\u56AC\u58DA\u58DD\u58DB\u5912\u5B3D\u5B3E\u5B3F\u5DC3\u5E70"], + ["f240", "\u5FBF\u61FB\u6507\u6510\u650D\u6509\u650C\u650E\u6584\u65DE\u65DD\u66DE\u6AE7\u6AE0\u6ACC\u6AD1\u6AD9\u6ACB\u6ADF\u6ADC\u6AD0\u6AEB\u6ACF\u6ACD\u6ADE\u6B60\u6BB0\u6C0C\u7019\u7027\u7020\u7016\u702B\u7021\u7022\u7023\u7029\u7017\u7024\u701C\u702A\u720C\u720A\u7207\u7202\u7205\u72A5\u72A6\u72A4\u72A3\u72A1\u74CB\u74C5\u74B7\u74C3\u7516\u7660\u77C9\u77CA\u77C4\u77F1\u791D\u791B"], + ["f2a1", "\u7921\u791C\u7917\u791E\u79B0\u7A67\u7A68\u7C33\u7C3C\u7C39\u7C2C\u7C3B\u7CEC\u7CEA\u7E76\u7E75\u7E78\u7E70\u7E77\u7E6F\u7E7A\u7E72\u7E74\u7E68\u7F4B\u7F4A\u7F83\u7F86\u7FB7\u7FFD\u7FFE\u8078\u81D7\u81D5\u8264\u8261\u8263\u85EB\u85F1\u85ED\u85D9\u85E1\u85E8\u85DA\u85D7\u85EC\u85F2\u85F8\u85D8\u85DF\u85E3\u85DC\u85D1\u85F0\u85E6\u85EF\u85DE\u85E2\u8800\u87FA\u8803\u87F6\u87F7\u8809\u880C\u880B\u8806\u87FC\u8808\u87FF\u880A\u8802\u8962\u895A\u895B\u8957\u8961\u895C\u8958\u895D\u8959\u8988\u89B7\u89B6\u89F6\u8B50\u8B48\u8B4A\u8B40\u8B53\u8B56\u8B54\u8B4B\u8B55"], + ["f340", "\u8B51\u8B42\u8B52\u8B57\u8C43\u8C77\u8C76\u8C9A\u8D06\u8D07\u8D09\u8DAC\u8DAA\u8DAD\u8DAB\u8E6D\u8E78\u8E73\u8E6A\u8E6F\u8E7B\u8EC2\u8F52\u8F51\u8F4F\u8F50\u8F53\u8FB4\u9140\u913F\u91B0\u91AD\u93DE\u93C7\u93CF\u93C2\u93DA\u93D0\u93F9\u93EC\u93CC\u93D9\u93A9\u93E6\u93CA\u93D4\u93EE\u93E3\u93D5\u93C4\u93CE\u93C0\u93D2\u93E7\u957D\u95DA\u95DB\u96E1\u9729\u972B\u972C\u9728\u9726"], + ["f3a1", "\u97B3\u97B7\u97B6\u97DD\u97DE\u97DF\u985C\u9859\u985D\u9857\u98BF\u98BD\u98BB\u98BE\u9948\u9947\u9943\u99A6\u99A7\u9A1A\u9A15\u9A25\u9A1D\u9A24\u9A1B\u9A22\u9A20\u9A27\u9A23\u9A1E\u9A1C\u9A14\u9AC2\u9B0B\u9B0A\u9B0E\u9B0C\u9B37\u9BEA\u9BEB\u9BE0\u9BDE\u9BE4\u9BE6\u9BE2\u9BF0\u9BD4\u9BD7\u9BEC\u9BDC\u9BD9\u9BE5\u9BD5\u9BE1\u9BDA\u9D77\u9D81\u9D8A\u9D84\u9D88\u9D71\u9D80\u9D78\u9D86\u9D8B\u9D8C\u9D7D\u9D6B\u9D74\u9D75\u9D70\u9D69\u9D85\u9D73\u9D7B\u9D82\u9D6F\u9D79\u9D7F\u9D87\u9D68\u9E94\u9E91\u9EC0\u9EFC\u9F2D\u9F40\u9F41\u9F4D\u9F56\u9F57\u9F58\u5337\u56B2"], + ["f440", "\u56B5\u56B3\u58E3\u5B45\u5DC6\u5DC7\u5EEE\u5EEF\u5FC0\u5FC1\u61F9\u6517\u6516\u6515\u6513\u65DF\u66E8\u66E3\u66E4\u6AF3\u6AF0\u6AEA\u6AE8\u6AF9\u6AF1\u6AEE\u6AEF\u703C\u7035\u702F\u7037\u7034\u7031\u7042\u7038\u703F\u703A\u7039\u7040\u703B\u7033\u7041\u7213\u7214\u72A8\u737D\u737C\u74BA\u76AB\u76AA\u76BE\u76ED\u77CC\u77CE\u77CF\u77CD\u77F2\u7925\u7923\u7927\u7928\u7924\u7929"], + ["f4a1", "\u79B2\u7A6E\u7A6C\u7A6D\u7AF7\u7C49\u7C48\u7C4A\u7C47\u7C45\u7CEE\u7E7B\u7E7E\u7E81\u7E80\u7FBA\u7FFF\u8079\u81DB\u81D9\u820B\u8268\u8269\u8622\u85FF\u8601\u85FE\u861B\u8600\u85F6\u8604\u8609\u8605\u860C\u85FD\u8819\u8810\u8811\u8817\u8813\u8816\u8963\u8966\u89B9\u89F7\u8B60\u8B6A\u8B5D\u8B68\u8B63\u8B65\u8B67\u8B6D\u8DAE\u8E86\u8E88\u8E84\u8F59\u8F56\u8F57\u8F55\u8F58\u8F5A\u908D\u9143\u9141\u91B7\u91B5\u91B2\u91B3\u940B\u9413\u93FB\u9420\u940F\u9414\u93FE\u9415\u9410\u9428\u9419\u940D\u93F5\u9400\u93F7\u9407\u940E\u9416\u9412\u93FA\u9409\u93F8\u940A\u93FF"], + ["f540", "\u93FC\u940C\u93F6\u9411\u9406\u95DE\u95E0\u95DF\u972E\u972F\u97B9\u97BB\u97FD\u97FE\u9860\u9862\u9863\u985F\u98C1\u98C2\u9950\u994E\u9959\u994C\u994B\u9953\u9A32\u9A34\u9A31\u9A2C\u9A2A\u9A36\u9A29\u9A2E\u9A38\u9A2D\u9AC7\u9ACA\u9AC6\u9B10\u9B12\u9B11\u9C0B\u9C08\u9BF7\u9C05\u9C12\u9BF8\u9C40\u9C07\u9C0E\u9C06\u9C17\u9C14\u9C09\u9D9F\u9D99\u9DA4\u9D9D\u9D92\u9D98\u9D90\u9D9B"], + ["f5a1", "\u9DA0\u9D94\u9D9C\u9DAA\u9D97\u9DA1\u9D9A\u9DA2\u9DA8\u9D9E\u9DA3\u9DBF\u9DA9\u9D96\u9DA6\u9DA7\u9E99\u9E9B\u9E9A\u9EE5\u9EE4\u9EE7\u9EE6\u9F30\u9F2E\u9F5B\u9F60\u9F5E\u9F5D\u9F59\u9F91\u513A\u5139\u5298\u5297\u56C3\u56BD\u56BE\u5B48\u5B47\u5DCB\u5DCF\u5EF1\u61FD\u651B\u6B02\u6AFC\u6B03\u6AF8\u6B00\u7043\u7044\u704A\u7048\u7049\u7045\u7046\u721D\u721A\u7219\u737E\u7517\u766A\u77D0\u792D\u7931\u792F\u7C54\u7C53\u7CF2\u7E8A\u7E87\u7E88\u7E8B\u7E86\u7E8D\u7F4D\u7FBB\u8030\u81DD\u8618\u862A\u8626\u861F\u8623\u861C\u8619\u8627\u862E\u8621\u8620\u8629\u861E\u8625"], + ["f640", "\u8829\u881D\u881B\u8820\u8824\u881C\u882B\u884A\u896D\u8969\u896E\u896B\u89FA\u8B79\u8B78\u8B45\u8B7A\u8B7B\u8D10\u8D14\u8DAF\u8E8E\u8E8C\u8F5E\u8F5B\u8F5D\u9146\u9144\u9145\u91B9\u943F\u943B\u9436\u9429\u943D\u943C\u9430\u9439\u942A\u9437\u942C\u9440\u9431\u95E5\u95E4\u95E3\u9735\u973A\u97BF\u97E1\u9864\u98C9\u98C6\u98C0\u9958\u9956\u9A39\u9A3D\u9A46\u9A44\u9A42\u9A41\u9A3A"], + ["f6a1", "\u9A3F\u9ACD\u9B15\u9B17\u9B18\u9B16\u9B3A\u9B52\u9C2B\u9C1D\u9C1C\u9C2C\u9C23\u9C28\u9C29\u9C24\u9C21\u9DB7\u9DB6\u9DBC\u9DC1\u9DC7\u9DCA\u9DCF\u9DBE\u9DC5\u9DC3\u9DBB\u9DB5\u9DCE\u9DB9\u9DBA\u9DAC\u9DC8\u9DB1\u9DAD\u9DCC\u9DB3\u9DCD\u9DB2\u9E7A\u9E9C\u9EEB\u9EEE\u9EED\u9F1B\u9F18\u9F1A\u9F31\u9F4E\u9F65\u9F64\u9F92\u4EB9\u56C6\u56C5\u56CB\u5971\u5B4B\u5B4C\u5DD5\u5DD1\u5EF2\u6521\u6520\u6526\u6522\u6B0B\u6B08\u6B09\u6C0D\u7055\u7056\u7057\u7052\u721E\u721F\u72A9\u737F\u74D8\u74D5\u74D9\u74D7\u766D\u76AD\u7935\u79B4\u7A70\u7A71\u7C57\u7C5C\u7C59\u7C5B\u7C5A"], + ["f740", "\u7CF4\u7CF1\u7E91\u7F4F\u7F87\u81DE\u826B\u8634\u8635\u8633\u862C\u8632\u8636\u882C\u8828\u8826\u882A\u8825\u8971\u89BF\u89BE\u89FB\u8B7E\u8B84\u8B82\u8B86\u8B85\u8B7F\u8D15\u8E95\u8E94\u8E9A\u8E92\u8E90\u8E96\u8E97\u8F60\u8F62\u9147\u944C\u9450\u944A\u944B\u944F\u9447\u9445\u9448\u9449\u9446\u973F\u97E3\u986A\u9869\u98CB\u9954\u995B\u9A4E\u9A53\u9A54\u9A4C\u9A4F\u9A48\u9A4A"], + ["f7a1", "\u9A49\u9A52\u9A50\u9AD0\u9B19\u9B2B\u9B3B\u9B56\u9B55\u9C46\u9C48\u9C3F\u9C44\u9C39\u9C33\u9C41\u9C3C\u9C37\u9C34\u9C32\u9C3D\u9C36\u9DDB\u9DD2\u9DDE\u9DDA\u9DCB\u9DD0\u9DDC\u9DD1\u9DDF\u9DE9\u9DD9\u9DD8\u9DD6\u9DF5\u9DD5\u9DDD\u9EB6\u9EF0\u9F35\u9F33\u9F32\u9F42\u9F6B\u9F95\u9FA2\u513D\u5299\u58E8\u58E7\u5972\u5B4D\u5DD8\u882F\u5F4F\u6201\u6203\u6204\u6529\u6525\u6596\u66EB\u6B11\u6B12\u6B0F\u6BCA\u705B\u705A\u7222\u7382\u7381\u7383\u7670\u77D4\u7C67\u7C66\u7E95\u826C\u863A\u8640\u8639\u863C\u8631\u863B\u863E\u8830\u8832\u882E\u8833\u8976\u8974\u8973\u89FE"], + ["f840", "\u8B8C\u8B8E\u8B8B\u8B88\u8C45\u8D19\u8E98\u8F64\u8F63\u91BC\u9462\u9455\u945D\u9457\u945E\u97C4\u97C5\u9800\u9A56\u9A59\u9B1E\u9B1F\u9B20\u9C52\u9C58\u9C50\u9C4A\u9C4D\u9C4B\u9C55\u9C59\u9C4C\u9C4E\u9DFB\u9DF7\u9DEF\u9DE3\u9DEB\u9DF8\u9DE4\u9DF6\u9DE1\u9DEE\u9DE6\u9DF2\u9DF0\u9DE2\u9DEC\u9DF4\u9DF3\u9DE8\u9DED\u9EC2\u9ED0\u9EF2\u9EF3\u9F06\u9F1C\u9F38\u9F37\u9F36\u9F43\u9F4F"], + ["f8a1", "\u9F71\u9F70\u9F6E\u9F6F\u56D3\u56CD\u5B4E\u5C6D\u652D\u66ED\u66EE\u6B13\u705F\u7061\u705D\u7060\u7223\u74DB\u74E5\u77D5\u7938\u79B7\u79B6\u7C6A\u7E97\u7F89\u826D\u8643\u8838\u8837\u8835\u884B\u8B94\u8B95\u8E9E\u8E9F\u8EA0\u8E9D\u91BE\u91BD\u91C2\u946B\u9468\u9469\u96E5\u9746\u9743\u9747\u97C7\u97E5\u9A5E\u9AD5\u9B59\u9C63\u9C67\u9C66\u9C62\u9C5E\u9C60\u9E02\u9DFE\u9E07\u9E03\u9E06\u9E05\u9E00\u9E01\u9E09\u9DFF\u9DFD\u9E04\u9EA0\u9F1E\u9F46\u9F74\u9F75\u9F76\u56D4\u652E\u65B8\u6B18\u6B19\u6B17\u6B1A\u7062\u7226\u72AA\u77D8\u77D9\u7939\u7C69\u7C6B\u7CF6\u7E9A"], + ["f940", "\u7E98\u7E9B\u7E99\u81E0\u81E1\u8646\u8647\u8648\u8979\u897A\u897C\u897B\u89FF\u8B98\u8B99\u8EA5\u8EA4\u8EA3\u946E\u946D\u946F\u9471\u9473\u9749\u9872\u995F\u9C68\u9C6E\u9C6D\u9E0B\u9E0D\u9E10\u9E0F\u9E12\u9E11\u9EA1\u9EF5\u9F09\u9F47\u9F78\u9F7B\u9F7A\u9F79\u571E\u7066\u7C6F\u883C\u8DB2\u8EA6\u91C3\u9474\u9478\u9476\u9475\u9A60\u9C74\u9C73\u9C71\u9C75\u9E14\u9E13\u9EF6\u9F0A"], + ["f9a1", "\u9FA4\u7068\u7065\u7CF7\u866A\u883E\u883D\u883F\u8B9E\u8C9C\u8EA9\u8EC9\u974B\u9873\u9874\u98CC\u9961\u99AB\u9A64\u9A66\u9A67\u9B24\u9E15\u9E17\u9F48\u6207\u6B1E\u7227\u864C\u8EA8\u9482\u9480\u9481\u9A69\u9A68\u9B2E\u9E19\u7229\u864B\u8B9F\u9483\u9C79\u9EB7\u7675\u9A6B\u9C7A\u9E1D\u7069\u706A\u9EA4\u9F7E\u9F49\u9F98\u7881\u92B9\u88CF\u58BB\u6052\u7CA7\u5AFA\u2554\u2566\u2557\u2560\u256C\u2563\u255A\u2569\u255D\u2552\u2564\u2555\u255E\u256A\u2561\u2558\u2567\u255B\u2553\u2565\u2556\u255F\u256B\u2562\u2559\u2568\u255C\u2551\u2550\u256D\u256E\u2570\u256F\u2593"] + ]; + } +}); + +// ../../node_modules/iconv-lite/encodings/tables/big5-added.json +var require_big5_added = __commonJS({ + "../../node_modules/iconv-lite/encodings/tables/big5-added.json"(exports2, module2) { + module2.exports = [ + ["8740", "\u43F0\u4C32\u4603\u45A6\u4578\u{27267}\u4D77\u45B3\u{27CB1}\u4CE2\u{27CC5}\u3B95\u4736\u4744\u4C47\u4C40\u{242BF}\u{23617}\u{27352}\u{26E8B}\u{270D2}\u4C57\u{2A351}\u474F\u45DA\u4C85\u{27C6C}\u4D07\u4AA4\u46A1\u{26B23}\u7225\u{25A54}\u{21A63}\u{23E06}\u{23F61}\u664D\u56FB"], + ["8767", "\u7D95\u591D\u{28BB9}\u3DF4\u9734\u{27BEF}\u5BDB\u{21D5E}\u5AA4\u3625\u{29EB0}\u5AD1\u5BB7\u5CFC\u676E\u8593\u{29945}\u7461\u749D\u3875\u{21D53}\u{2369E}\u{26021}\u3EEC"], + ["87a1", "\u{258DE}\u3AF5\u7AFC\u9F97\u{24161}\u{2890D}\u{231EA}\u{20A8A}\u{2325E}\u430A\u8484\u9F96\u942F\u4930\u8613\u5896\u974A\u9218\u79D0\u7A32\u6660\u6A29\u889D\u744C\u7BC5\u6782\u7A2C\u524F\u9046\u34E6\u73C4\u{25DB9}\u74C6\u9FC7\u57B3\u492F\u544C\u4131\u{2368E}\u5818\u7A72\u{27B65}\u8B8F\u46AE\u{26E88}\u4181\u{25D99}\u7BAE\u{224BC}\u9FC8\u{224C1}\u{224C9}\u{224CC}\u9FC9\u8504\u{235BB}\u40B4\u9FCA\u44E1\u{2ADFF}\u62C1\u706E\u9FCB"], + ["8840", "\u31C0", 4, "\u{2010C}\u31C5\u{200D1}\u{200CD}\u31C6\u31C7\u{200CB}\u{21FE8}\u31C8\u{200CA}\u31C9\u31CA\u31CB\u31CC\u{2010E}\u31CD\u31CE\u0100\xC1\u01CD\xC0\u0112\xC9\u011A\xC8\u014C\xD3\u01D1\xD2\u0FFF\xCA\u0304\u1EBE\u0FFF\xCA\u030C\u1EC0\xCA\u0101\xE1\u01CE\xE0\u0251\u0113\xE9\u011B\xE8\u012B\xED\u01D0\xEC\u014D\xF3\u01D2\xF2\u016B\xFA\u01D4\xF9\u01D6\u01D8\u01DA"], + ["88a1", "\u01DC\xFC\u0FFF\xEA\u0304\u1EBF\u0FFF\xEA\u030C\u1EC1\xEA\u0261\u23DA\u23DB"], + ["8940", "\u{2A3A9}\u{21145}"], + ["8943", "\u650A"], + ["8946", "\u4E3D\u6EDD\u9D4E\u91DF"], + ["894c", "\u{27735}\u6491\u4F1A\u4F28\u4FA8\u5156\u5174\u519C\u51E4\u52A1\u52A8\u533B\u534E\u53D1\u53D8\u56E2\u58F0\u5904\u5907\u5932\u5934\u5B66\u5B9E\u5B9F\u5C9A\u5E86\u603B\u6589\u67FE\u6804\u6865\u6D4E\u70BC\u7535\u7EA4\u7EAC\u7EBA\u7EC7\u7ECF\u7EDF\u7F06\u7F37\u827A\u82CF\u836F\u89C6\u8BBE\u8BE2\u8F66\u8F67\u8F6E"], + ["89a1", "\u7411\u7CFC\u7DCD\u6946\u7AC9\u5227"], + ["89ab", "\u918C\u78B8\u915E\u80BC"], + ["89b0", "\u8D0B\u80F6\u{209E7}"], + ["89b5", "\u809F\u9EC7\u4CCD\u9DC9\u9E0C\u4C3E\u{29DF6}\u{2700E}\u9E0A\u{2A133}\u35C1"], + ["89c1", "\u6E9A\u823E\u7519"], + ["89c5", "\u4911\u9A6C\u9A8F\u9F99\u7987\u{2846C}\u{21DCA}\u{205D0}\u{22AE6}\u4E24\u4E81\u4E80\u4E87\u4EBF\u4EEB\u4F37\u344C\u4FBD\u3E48\u5003\u5088\u347D\u3493\u34A5\u5186\u5905\u51DB\u51FC\u5205\u4E89\u5279\u5290\u5327\u35C7\u53A9\u3551\u53B0\u3553\u53C2\u5423\u356D\u3572\u3681\u5493\u54A3\u54B4\u54B9\u54D0\u54EF\u5518\u5523\u5528\u3598\u553F\u35A5\u35BF\u55D7\u35C5"], + ["8a40", "\u{27D84}\u5525"], + ["8a43", "\u{20C42}\u{20D15}\u{2512B}\u5590\u{22CC6}\u39EC\u{20341}\u8E46\u{24DB8}\u{294E5}\u4053\u{280BE}\u777A\u{22C38}\u3A34\u47D5\u{2815D}\u{269F2}\u{24DEA}\u64DD\u{20D7C}\u{20FB4}\u{20CD5}\u{210F4}\u648D\u8E7E\u{20E96}\u{20C0B}\u{20F64}\u{22CA9}\u{28256}\u{244D3}"], + ["8a64", "\u{20D46}\u{29A4D}\u{280E9}\u47F4\u{24EA7}\u{22CC2}\u9AB2\u3A67\u{295F4}\u3FED\u3506\u{252C7}\u{297D4}\u{278C8}\u{22D44}\u9D6E\u9815"], + ["8a76", "\u43D9\u{260A5}\u64B4\u54E3\u{22D4C}\u{22BCA}\u{21077}\u39FB\u{2106F}"], + ["8aa1", "\u{266DA}\u{26716}\u{279A0}\u64EA\u{25052}\u{20C43}\u8E68\u{221A1}\u{28B4C}\u{20731}"], + ["8aac", "\u480B\u{201A9}\u3FFA\u5873\u{22D8D}"], + ["8ab2", "\u{245C8}\u{204FC}\u{26097}\u{20F4C}\u{20D96}\u5579\u40BB\u43BA"], + ["8abb", "\u4AB4\u{22A66}\u{2109D}\u81AA\u98F5\u{20D9C}\u6379\u39FE\u{22775}\u8DC0\u56A1\u647C\u3E43"], + ["8ac9", "\u{2A601}\u{20E09}\u{22ACF}\u{22CC9}"], + ["8ace", "\u{210C8}\u{239C2}\u3992\u3A06\u{2829B}\u3578\u{25E49}\u{220C7}\u5652\u{20F31}\u{22CB2}\u{29720}\u34BC\u6C3D\u{24E3B}"], + ["8adf", "\u{27574}\u{22E8B}\u{22208}\u{2A65B}\u{28CCD}\u{20E7A}\u{20C34}\u{2681C}\u7F93\u{210CF}\u{22803}\u{22939}\u35FB\u{251E3}\u{20E8C}\u{20F8D}\u{20EAA}\u3F93\u{20F30}\u{20D47}\u{2114F}\u{20E4C}"], + ["8af6", "\u{20EAB}\u{20BA9}\u{20D48}\u{210C0}\u{2113D}\u3FF9\u{22696}\u6432\u{20FAD}"], + ["8b40", "\u{233F4}\u{27639}\u{22BCE}\u{20D7E}\u{20D7F}\u{22C51}\u{22C55}\u3A18\u{20E98}\u{210C7}\u{20F2E}\u{2A632}\u{26B50}\u{28CD2}\u{28D99}\u{28CCA}\u95AA\u54CC\u82C4\u55B9"], + ["8b55", "\u{29EC3}\u9C26\u9AB6\u{2775E}\u{22DEE}\u7140\u816D\u80EC\u5C1C\u{26572}\u8134\u3797\u535F\u{280BD}\u91B6\u{20EFA}\u{20E0F}\u{20E77}\u{20EFB}\u35DD\u{24DEB}\u3609\u{20CD6}\u56AF\u{227B5}\u{210C9}\u{20E10}\u{20E78}\u{21078}\u{21148}\u{28207}\u{21455}\u{20E79}\u{24E50}\u{22DA4}\u5A54\u{2101D}\u{2101E}\u{210F5}\u{210F6}\u579C\u{20E11}"], + ["8ba1", "\u{27694}\u{282CD}\u{20FB5}\u{20E7B}\u{2517E}\u3703\u{20FB6}\u{21180}\u{252D8}\u{2A2BD}\u{249DA}\u{2183A}\u{24177}\u{2827C}\u5899\u5268\u361A\u{2573D}\u7BB2\u5B68\u4800\u4B2C\u9F27\u49E7\u9C1F\u9B8D\u{25B74}\u{2313D}\u55FB\u35F2\u5689\u4E28\u5902\u{21BC1}\u{2F878}\u9751\u{20086}\u4E5B\u4EBB\u353E\u5C23\u5F51\u5FC4\u38FA\u624C\u6535\u6B7A\u6C35\u6C3A\u706C\u722B\u4E2C\u72AD\u{248E9}\u7F52\u793B\u7CF9\u7F53\u{2626A}\u34C1"], + ["8bde", "\u{2634B}\u8002\u8080\u{26612}\u{26951}\u535D\u8864\u89C1\u{278B2}\u8BA0\u8D1D\u9485\u9578\u957F\u95E8\u{28E0F}\u97E6\u9875\u98CE\u98DE\u9963\u{29810}\u9C7C\u9E1F\u9EC4\u6B6F\uF907\u4E37\u{20087}\u961D\u6237\u94A2"], + ["8c40", "\u503B\u6DFE\u{29C73}\u9FA6\u3DC9\u888F\u{2414E}\u7077\u5CF5\u4B20\u{251CD}\u3559\u{25D30}\u6122\u{28A32}\u8FA7\u91F6\u7191\u6719\u73BA\u{23281}\u{2A107}\u3C8B\u{21980}\u4B10\u78E4\u7402\u51AE\u{2870F}\u4009\u6A63\u{2A2BA}\u4223\u860F\u{20A6F}\u7A2A\u{29947}\u{28AEA}\u9755\u704D\u5324\u{2207E}\u93F4\u76D9\u{289E3}\u9FA7\u77DD\u4EA3\u4FF0\u50BC\u4E2F\u4F17\u9FA8\u5434\u7D8B\u5892\u58D0\u{21DB6}\u5E92\u5E99\u5FC2\u{22712}\u658B"], + ["8ca1", "\u{233F9}\u6919\u6A43\u{23C63}\u6CFF"], + ["8ca7", "\u7200\u{24505}\u738C\u3EDB\u{24A13}\u5B15\u74B9\u8B83\u{25CA4}\u{25695}\u7A93\u7BEC\u7CC3\u7E6C\u82F8\u8597\u9FA9\u8890\u9FAA\u8EB9\u9FAB\u8FCF\u855F\u99E0\u9221\u9FAC\u{28DB9}\u{2143F}\u4071\u42A2\u5A1A"], + ["8cc9", "\u9868\u676B\u4276\u573D"], + ["8cce", "\u85D6\u{2497B}\u82BF\u{2710D}\u4C81\u{26D74}\u5D7B\u{26B15}\u{26FBE}\u9FAD\u9FAE\u5B96\u9FAF\u66E7\u7E5B\u6E57\u79CA\u3D88\u44C3\u{23256}\u{22796}\u439A\u4536"], + ["8ce6", "\u5CD5\u{23B1A}\u8AF9\u5C78\u3D12\u{23551}\u5D78\u9FB2\u7157\u4558\u{240EC}\u{21E23}\u4C77\u3978\u344A\u{201A4}\u{26C41}\u8ACC\u4FB4\u{20239}\u59BF\u816C\u9856\u{298FA}\u5F3B"], + ["8d40", "\u{20B9F}"], + ["8d42", "\u{221C1}\u{2896D}\u4102\u46BB\u{29079}\u3F07\u9FB3\u{2A1B5}\u40F8\u37D6\u46F7\u{26C46}\u417C\u{286B2}\u{273FF}\u456D\u38D4\u{2549A}\u4561\u451B\u4D89\u4C7B\u4D76\u45EA\u3FC8\u{24B0F}\u3661\u44DE\u44BD\u41ED\u5D3E\u5D48\u5D56\u3DFC\u380F\u5DA4\u5DB9\u3820\u3838\u5E42\u5EBD\u5F25\u5F83\u3908\u3914\u393F\u394D\u60D7\u613D\u5CE5\u3989\u61B7\u61B9\u61CF\u39B8\u622C\u6290\u62E5\u6318\u39F8\u56B1"], + ["8da1", "\u3A03\u63E2\u63FB\u6407\u645A\u3A4B\u64C0\u5D15\u5621\u9F9F\u3A97\u6586\u3ABD\u65FF\u6653\u3AF2\u6692\u3B22\u6716\u3B42\u67A4\u6800\u3B58\u684A\u6884\u3B72\u3B71\u3B7B\u6909\u6943\u725C\u6964\u699F\u6985\u3BBC\u69D6\u3BDD\u6A65\u6A74\u6A71\u6A82\u3BEC\u6A99\u3BF2\u6AAB\u6AB5\u6AD4\u6AF6\u6B81\u6BC1\u6BEA\u6C75\u6CAA\u3CCB\u6D02\u6D06\u6D26\u6D81\u3CEF\u6DA4\u6DB1\u6E15\u6E18\u6E29\u6E86\u{289C0}\u6EBB\u6EE2\u6EDA\u9F7F\u6EE8\u6EE9\u6F24\u6F34\u3D46\u{23F41}\u6F81\u6FBE\u3D6A\u3D75\u71B7\u5C99\u3D8A\u702C\u3D91\u7050\u7054\u706F\u707F\u7089\u{20325}\u43C1\u35F1\u{20ED8}"], + ["8e40", "\u{23ED7}\u57BE\u{26ED3}\u713E\u{257E0}\u364E\u69A2\u{28BE9}\u5B74\u7A49\u{258E1}\u{294D9}\u7A65\u7A7D\u{259AC}\u7ABB\u7AB0\u7AC2\u7AC3\u71D1\u{2648D}\u41CA\u7ADA\u7ADD\u7AEA\u41EF\u54B2\u{25C01}\u7B0B\u7B55\u7B29\u{2530E}\u{25CFE}\u7BA2\u7B6F\u839C\u{25BB4}\u{26C7F}\u7BD0\u8421\u7B92\u7BB8\u{25D20}\u3DAD\u{25C65}\u8492\u7BFA\u7C06\u7C35\u{25CC1}\u7C44\u7C83\u{24882}\u7CA6\u667D\u{24578}\u7CC9\u7CC7\u7CE6\u7C74\u7CF3\u7CF5\u7CCE"], + ["8ea1", "\u7E67\u451D\u{26E44}\u7D5D\u{26ED6}\u748D\u7D89\u7DAB\u7135\u7DB3\u7DD2\u{24057}\u{26029}\u7DE4\u3D13\u7DF5\u{217F9}\u7DE5\u{2836D}\u7E1D\u{26121}\u{2615A}\u7E6E\u7E92\u432B\u946C\u7E27\u7F40\u7F41\u7F47\u7936\u{262D0}\u99E1\u7F97\u{26351}\u7FA3\u{21661}\u{20068}\u455C\u{23766}\u4503\u{2833A}\u7FFA\u{26489}\u8005\u8008\u801D\u8028\u802F\u{2A087}\u{26CC3}\u803B\u803C\u8061\u{22714}\u4989\u{26626}\u{23DE3}\u{266E8}\u6725\u80A7\u{28A48}\u8107\u811A\u58B0\u{226F6}\u6C7F\u{26498}\u{24FB8}\u64E7\u{2148A}\u8218\u{2185E}\u6A53\u{24A65}\u{24A95}\u447A\u8229\u{20B0D}\u{26A52}\u{23D7E}\u4FF9\u{214FD}\u84E2\u8362\u{26B0A}\u{249A7}\u{23530}\u{21773}\u{23DF8}\u82AA\u691B\u{2F994}\u41DB"], + ["8f40", "\u854B\u82D0\u831A\u{20E16}\u{217B4}\u36C1\u{2317D}\u{2355A}\u827B\u82E2\u8318\u{23E8B}\u{26DA3}\u{26B05}\u{26B97}\u{235CE}\u3DBF\u831D\u55EC\u8385\u450B\u{26DA5}\u83AC\u83C1\u83D3\u347E\u{26ED4}\u6A57\u855A\u3496\u{26E42}\u{22EEF}\u8458\u{25BE4}\u8471\u3DD3\u44E4\u6AA7\u844A\u{23CB5}\u7958\u84A8\u{26B96}\u{26E77}\u{26E43}\u84DE\u840F\u8391\u44A0\u8493\u84E4\u{25C91}\u4240\u{25CC0}\u4543\u8534\u5AF2\u{26E99}\u4527\u8573\u4516\u67BF\u8616"], + ["8fa1", "\u{28625}\u{2863B}\u85C1\u{27088}\u8602\u{21582}\u{270CD}\u{2F9B2}\u456A\u8628\u3648\u{218A2}\u53F7\u{2739A}\u867E\u8771\u{2A0F8}\u87EE\u{22C27}\u87B1\u87DA\u880F\u5661\u866C\u6856\u460F\u8845\u8846\u{275E0}\u{23DB9}\u{275E4}\u885E\u889C\u465B\u88B4\u88B5\u63C1\u88C5\u7777\u{2770F}\u8987\u898A\u89A6\u89A9\u89A7\u89BC\u{28A25}\u89E7\u{27924}\u{27ABD}\u8A9C\u7793\u91FE\u8A90\u{27A59}\u7AE9\u{27B3A}\u{23F8F}\u4713\u{27B38}\u717C\u8B0C\u8B1F\u{25430}\u{25565}\u8B3F\u8B4C\u8B4D\u8AA9\u{24A7A}\u8B90\u8B9B\u8AAF\u{216DF}\u4615\u884F\u8C9B\u{27D54}\u{27D8F}\u{2F9D4}\u3725\u{27D53}\u8CD6\u{27D98}\u{27DBD}\u8D12\u8D03\u{21910}\u8CDB\u705C\u8D11\u{24CC9}\u3ED0\u8D77"], + ["9040", "\u8DA9\u{28002}\u{21014}\u{2498A}\u3B7C\u{281BC}\u{2710C}\u7AE7\u8EAD\u8EB6\u8EC3\u92D4\u8F19\u8F2D\u{28365}\u{28412}\u8FA5\u9303\u{2A29F}\u{20A50}\u8FB3\u492A\u{289DE}\u{2853D}\u{23DBB}\u5EF8\u{23262}\u8FF9\u{2A014}\u{286BC}\u{28501}\u{22325}\u3980\u{26ED7}\u9037\u{2853C}\u{27ABE}\u9061\u{2856C}\u{2860B}\u90A8\u{28713}\u90C4\u{286E6}\u90AE\u90FD\u9167\u3AF0\u91A9\u91C4\u7CAC\u{28933}\u{21E89}\u920E\u6C9F\u9241\u9262\u{255B9}\u92B9\u{28AC6}\u{23C9B}\u{28B0C}\u{255DB}"], + ["90a1", "\u{20D31}\u932C\u936B\u{28AE1}\u{28BEB}\u708F\u5AC3\u{28AE2}\u{28AE5}\u4965\u9244\u{28BEC}\u{28C39}\u{28BFF}\u9373\u945B\u8EBC\u9585\u95A6\u9426\u95A0\u6FF6\u42B9\u{2267A}\u{286D8}\u{2127C}\u{23E2E}\u49DF\u6C1C\u967B\u9696\u416C\u96A3\u{26ED5}\u61DA\u96B6\u78F5\u{28AE0}\u96BD\u53CC\u49A1\u{26CB8}\u{20274}\u{26410}\u{290AF}\u{290E5}\u{24AD1}\u{21915}\u{2330A}\u9731\u8642\u9736\u4A0F\u453D\u4585\u{24AE9}\u7075\u5B41\u971B\u975C\u{291D5}\u9757\u5B4A\u{291EB}\u975F\u9425\u50D0\u{230B7}\u{230BC}\u9789\u979F\u97B1\u97BE\u97C0\u97D2\u97E0\u{2546C}\u97EE\u741C\u{29433}\u97FF\u97F5\u{2941D}\u{2797A}\u4AD1\u9834\u9833\u984B\u9866\u3B0E\u{27175}\u3D51\u{20630}\u{2415C}"], + ["9140", "\u{25706}\u98CA\u98B7\u98C8\u98C7\u4AFF\u{26D27}\u{216D3}\u55B0\u98E1\u98E6\u98EC\u9378\u9939\u{24A29}\u4B72\u{29857}\u{29905}\u99F5\u9A0C\u9A3B\u9A10\u9A58\u{25725}\u36C4\u{290B1}\u{29BD5}\u9AE0\u9AE2\u{29B05}\u9AF4\u4C0E\u9B14\u9B2D\u{28600}\u5034\u9B34\u{269A8}\u38C3\u{2307D}\u9B50\u9B40\u{29D3E}\u5A45\u{21863}\u9B8E\u{2424B}\u9C02\u9BFF\u9C0C\u{29E68}\u9DD4\u{29FB7}\u{2A192}\u{2A1AB}\u{2A0E1}\u{2A123}\u{2A1DF}\u9D7E\u9D83\u{2A134}\u9E0E\u6888"], + ["91a1", "\u9DC4\u{2215B}\u{2A193}\u{2A220}\u{2193B}\u{2A233}\u9D39\u{2A0B9}\u{2A2B4}\u9E90\u9E95\u9E9E\u9EA2\u4D34\u9EAA\u9EAF\u{24364}\u9EC1\u3B60\u39E5\u3D1D\u4F32\u37BE\u{28C2B}\u9F02\u9F08\u4B96\u9424\u{26DA2}\u9F17\u9F16\u9F39\u569F\u568A\u9F45\u99B8\u{2908B}\u97F2\u847F\u9F62\u9F69\u7ADC\u9F8E\u7216\u4BBE\u{24975}\u{249BB}\u7177\u{249F8}\u{24348}\u{24A51}\u739E\u{28BDA}\u{218FA}\u799F\u{2897E}\u{28E36}\u9369\u93F3\u{28A44}\u92EC\u9381\u93CB\u{2896C}\u{244B9}\u7217\u3EEB\u7772\u7A43\u70D0\u{24473}\u{243F8}\u717E\u{217EF}\u70A3\u{218BE}\u{23599}\u3EC7\u{21885}\u{2542F}\u{217F8}\u3722\u{216FB}\u{21839}\u36E1\u{21774}\u{218D1}\u{25F4B}\u3723\u{216C0}\u575B\u{24A25}\u{213FE}\u{212A8}"], + ["9240", "\u{213C6}\u{214B6}\u8503\u{236A6}\u8503\u8455\u{24994}\u{27165}\u{23E31}\u{2555C}\u{23EFB}\u{27052}\u44F4\u{236EE}\u{2999D}\u{26F26}\u67F9\u3733\u3C15\u3DE7\u586C\u{21922}\u6810\u4057\u{2373F}\u{240E1}\u{2408B}\u{2410F}\u{26C21}\u54CB\u569E\u{266B1}\u5692\u{20FDF}\u{20BA8}\u{20E0D}\u93C6\u{28B13}\u939C\u4EF8\u512B\u3819\u{24436}\u4EBC\u{20465}\u{2037F}\u4F4B\u4F8A\u{25651}\u5A68\u{201AB}\u{203CB}\u3999\u{2030A}\u{20414}\u3435\u4F29\u{202C0}\u{28EB3}\u{20275}\u8ADA\u{2020C}\u4E98"], + ["92a1", "\u50CD\u510D\u4FA2\u4F03\u{24A0E}\u{23E8A}\u4F42\u502E\u506C\u5081\u4FCC\u4FE5\u5058\u50FC\u5159\u515B\u515D\u515E\u6E76\u{23595}\u{23E39}\u{23EBF}\u6D72\u{21884}\u{23E89}\u51A8\u51C3\u{205E0}\u44DD\u{204A3}\u{20492}\u{20491}\u8D7A\u{28A9C}\u{2070E}\u5259\u52A4\u{20873}\u52E1\u936E\u467A\u718C\u{2438C}\u{20C20}\u{249AC}\u{210E4}\u69D1\u{20E1D}\u7479\u3EDE\u7499\u7414\u7456\u7398\u4B8E\u{24ABC}\u{2408D}\u53D0\u3584\u720F\u{240C9}\u55B4\u{20345}\u54CD\u{20BC6}\u571D\u925D\u96F4\u9366\u57DD\u578D\u577F\u363E\u58CB\u5A99\u{28A46}\u{216FA}\u{2176F}\u{21710}\u5A2C\u59B8\u928F\u5A7E\u5ACF\u5A12\u{25946}\u{219F3}\u{21861}\u{24295}\u36F5\u6D05\u7443\u5A21\u{25E83}"], + ["9340", "\u5A81\u{28BD7}\u{20413}\u93E0\u748C\u{21303}\u7105\u4972\u9408\u{289FB}\u93BD\u37A0\u5C1E\u5C9E\u5E5E\u5E48\u{21996}\u{2197C}\u{23AEE}\u5ECD\u5B4F\u{21903}\u{21904}\u3701\u{218A0}\u36DD\u{216FE}\u36D3\u812A\u{28A47}\u{21DBA}\u{23472}\u{289A8}\u5F0C\u5F0E\u{21927}\u{217AB}\u5A6B\u{2173B}\u5B44\u8614\u{275FD}\u8860\u607E\u{22860}\u{2262B}\u5FDB\u3EB8\u{225AF}\u{225BE}\u{29088}\u{26F73}\u61C0\u{2003E}\u{20046}\u{2261B}\u6199\u6198\u6075\u{22C9B}\u{22D07}\u{246D4}\u{2914D}"], + ["93a1", "\u6471\u{24665}\u{22B6A}\u3A29\u{22B22}\u{23450}\u{298EA}\u{22E78}\u6337\u{2A45B}\u64B6\u6331\u63D1\u{249E3}\u{22D67}\u62A4\u{22CA1}\u643B\u656B\u6972\u3BF4\u{2308E}\u{232AD}\u{24989}\u{232AB}\u550D\u{232E0}\u{218D9}\u{2943F}\u66CE\u{23289}\u{231B3}\u3AE0\u4190\u{25584}\u{28B22}\u{2558F}\u{216FC}\u{2555B}\u{25425}\u78EE\u{23103}\u{2182A}\u{23234}\u3464\u{2320F}\u{23182}\u{242C9}\u668E\u{26D24}\u666B\u4B93\u6630\u{27870}\u{21DEB}\u6663\u{232D2}\u{232E1}\u661E\u{25872}\u38D1\u{2383A}\u{237BC}\u3B99\u{237A2}\u{233FE}\u74D0\u3B96\u678F\u{2462A}\u68B6\u681E\u3BC4\u6ABE\u3863\u{237D5}\u{24487}\u6A33\u6A52\u6AC9\u6B05\u{21912}\u6511\u6898\u6A4C\u3BD7\u6A7A\u6B57\u{23FC0}\u{23C9A}\u93A0\u92F2\u{28BEA}\u{28ACB}"], + ["9440", "\u9289\u{2801E}\u{289DC}\u9467\u6DA5\u6F0B\u{249EC}\u6D67\u{23F7F}\u3D8F\u6E04\u{2403C}\u5A3D\u6E0A\u5847\u6D24\u7842\u713B\u{2431A}\u{24276}\u70F1\u7250\u7287\u7294\u{2478F}\u{24725}\u5179\u{24AA4}\u{205EB}\u747A\u{23EF8}\u{2365F}\u{24A4A}\u{24917}\u{25FE1}\u3F06\u3EB1\u{24ADF}\u{28C23}\u{23F35}\u60A7\u3EF3\u74CC\u743C\u9387\u7437\u449F\u{26DEA}\u4551\u7583\u3F63\u{24CD9}\u{24D06}\u3F58\u7555\u7673\u{2A5C6}\u3B19\u7468\u{28ACC}\u{249AB}\u{2498E}\u3AFB"], + ["94a1", "\u3DCD\u{24A4E}\u3EFF\u{249C5}\u{248F3}\u91FA\u5732\u9342\u{28AE3}\u{21864}\u50DF\u{25221}\u{251E7}\u7778\u{23232}\u770E\u770F\u777B\u{24697}\u{23781}\u3A5E\u{248F0}\u7438\u749B\u3EBF\u{24ABA}\u{24AC7}\u40C8\u{24A96}\u{261AE}\u9307\u{25581}\u781E\u788D\u7888\u78D2\u73D0\u7959\u{27741}\u{256E3}\u410E\u799B\u8496\u79A5\u6A2D\u{23EFA}\u7A3A\u79F4\u416E\u{216E6}\u4132\u9235\u79F1\u{20D4C}\u{2498C}\u{20299}\u{23DBA}\u{2176E}\u3597\u556B\u3570\u36AA\u{201D4}\u{20C0D}\u7AE2\u5A59\u{226F5}\u{25AAF}\u{25A9C}\u5A0D\u{2025B}\u78F0\u5A2A\u{25BC6}\u7AFE\u41F9\u7C5D\u7C6D\u4211\u{25BB3}\u{25EBC}\u{25EA6}\u7CCD\u{249F9}\u{217B0}\u7C8E\u7C7C\u7CAE\u6AB2\u7DDC\u7E07\u7DD3\u7F4E\u{26261}"], + ["9540", "\u{2615C}\u{27B48}\u7D97\u{25E82}\u426A\u{26B75}\u{20916}\u67D6\u{2004E}\u{235CF}\u57C4\u{26412}\u{263F8}\u{24962}\u7FDD\u7B27\u{2082C}\u{25AE9}\u{25D43}\u7B0C\u{25E0E}\u99E6\u8645\u9A63\u6A1C\u{2343F}\u39E2\u{249F7}\u{265AD}\u9A1F\u{265A0}\u8480\u{27127}\u{26CD1}\u44EA\u8137\u4402\u80C6\u8109\u8142\u{267B4}\u98C3\u{26A42}\u8262\u8265\u{26A51}\u8453\u{26DA7}\u8610\u{2721B}\u5A86\u417F\u{21840}\u5B2B\u{218A1}\u5AE4\u{218D8}\u86A0\u{2F9BC}\u{23D8F}\u882D\u{27422}\u5A02"], + ["95a1", "\u886E\u4F45\u8887\u88BF\u88E6\u8965\u894D\u{25683}\u8954\u{27785}\u{27784}\u{28BF5}\u{28BD9}\u{28B9C}\u{289F9}\u3EAD\u84A3\u46F5\u46CF\u37F2\u8A3D\u8A1C\u{29448}\u5F4D\u922B\u{24284}\u65D4\u7129\u70C4\u{21845}\u9D6D\u8C9F\u8CE9\u{27DDC}\u599A\u77C3\u59F0\u436E\u36D4\u8E2A\u8EA7\u{24C09}\u8F30\u8F4A\u42F4\u6C58\u6FBB\u{22321}\u489B\u6F79\u6E8B\u{217DA}\u9BE9\u36B5\u{2492F}\u90BB\u9097\u5571\u4906\u91BB\u9404\u{28A4B}\u4062\u{28AFC}\u9427\u{28C1D}\u{28C3B}\u84E5\u8A2B\u9599\u95A7\u9597\u9596\u{28D34}\u7445\u3EC2\u{248FF}\u{24A42}\u{243EA}\u3EE7\u{23225}\u968F\u{28EE7}\u{28E66}\u{28E65}\u3ECC\u{249ED}\u{24A78}\u{23FEE}\u7412\u746B\u3EFC\u9741\u{290B0}"], + ["9640", "\u6847\u4A1D\u{29093}\u{257DF}\u975D\u9368\u{28989}\u{28C26}\u{28B2F}\u{263BE}\u92BA\u5B11\u8B69\u493C\u73F9\u{2421B}\u979B\u9771\u9938\u{20F26}\u5DC1\u{28BC5}\u{24AB2}\u981F\u{294DA}\u92F6\u{295D7}\u91E5\u44C0\u{28B50}\u{24A67}\u{28B64}\u98DC\u{28A45}\u3F00\u922A\u4925\u8414\u993B\u994D\u{27B06}\u3DFD\u999B\u4B6F\u99AA\u9A5C\u{28B65}\u{258C8}\u6A8F\u9A21\u5AFE\u9A2F\u{298F1}\u4B90\u{29948}\u99BC\u4BBD\u4B97\u937D\u5872\u{21302}\u5822\u{249B8}"], + ["96a1", "\u{214E8}\u7844\u{2271F}\u{23DB8}\u68C5\u3D7D\u9458\u3927\u6150\u{22781}\u{2296B}\u6107\u9C4F\u9C53\u9C7B\u9C35\u9C10\u9B7F\u9BCF\u{29E2D}\u9B9F\u{2A1F5}\u{2A0FE}\u9D21\u4CAE\u{24104}\u9E18\u4CB0\u9D0C\u{2A1B4}\u{2A0ED}\u{2A0F3}\u{2992F}\u9DA5\u84BD\u{26E12}\u{26FDF}\u{26B82}\u85FC\u4533\u{26DA4}\u{26E84}\u{26DF0}\u8420\u85EE\u{26E00}\u{237D7}\u{26064}\u79E2\u{2359C}\u{23640}\u492D\u{249DE}\u3D62\u93DB\u92BE\u9348\u{202BF}\u78B9\u9277\u944D\u4FE4\u3440\u9064\u{2555D}\u783D\u7854\u78B6\u784B\u{21757}\u{231C9}\u{24941}\u369A\u4F72\u6FDA\u6FD9\u701E\u701E\u5414\u{241B5}\u57BB\u58F3\u578A\u9D16\u57D7\u7134\u34AF\u{241AC}\u71EB\u{26C40}\u{24F97}\u5B28\u{217B5}\u{28A49}"], + ["9740", "\u610C\u5ACE\u5A0B\u42BC\u{24488}\u372C\u4B7B\u{289FC}\u93BB\u93B8\u{218D6}\u{20F1D}\u8472\u{26CC0}\u{21413}\u{242FA}\u{22C26}\u{243C1}\u5994\u{23DB7}\u{26741}\u7DA8\u{2615B}\u{260A4}\u{249B9}\u{2498B}\u{289FA}\u92E5\u73E2\u3EE9\u74B4\u{28B63}\u{2189F}\u3EE1\u{24AB3}\u6AD8\u73F3\u73FB\u3ED6\u{24A3E}\u{24A94}\u{217D9}\u{24A66}\u{203A7}\u{21424}\u{249E5}\u7448\u{24916}\u70A5\u{24976}\u9284\u73E6\u935F\u{204FE}\u9331\u{28ACE}\u{28A16}\u9386\u{28BE7}\u{255D5}\u4935\u{28A82}\u716B"], + ["97a1", "\u{24943}\u{20CFF}\u56A4\u{2061A}\u{20BEB}\u{20CB8}\u5502\u79C4\u{217FA}\u7DFE\u{216C2}\u{24A50}\u{21852}\u452E\u9401\u370A\u{28AC0}\u{249AD}\u59B0\u{218BF}\u{21883}\u{27484}\u5AA1\u36E2\u{23D5B}\u36B0\u925F\u5A79\u{28A81}\u{21862}\u9374\u3CCD\u{20AB4}\u4A96\u398A\u50F4\u3D69\u3D4C\u{2139C}\u7175\u42FB\u{28218}\u6E0F\u{290E4}\u44EB\u6D57\u{27E4F}\u7067\u6CAF\u3CD6\u{23FED}\u{23E2D}\u6E02\u6F0C\u3D6F\u{203F5}\u7551\u36BC\u34C8\u4680\u3EDA\u4871\u59C4\u926E\u493E\u8F41\u{28C1C}\u{26BC0}\u5812\u57C8\u36D6\u{21452}\u70FE\u{24362}\u{24A71}\u{22FE3}\u{212B0}\u{223BD}\u68B9\u6967\u{21398}\u{234E5}\u{27BF4}\u{236DF}\u{28A83}\u{237D6}\u{233FA}\u{24C9F}\u6A1A\u{236AD}\u{26CB7}\u843E\u44DF\u44CE"], + ["9840", "\u{26D26}\u{26D51}\u{26C82}\u{26FDE}\u6F17\u{27109}\u833D\u{2173A}\u83ED\u{26C80}\u{27053}\u{217DB}\u5989\u5A82\u{217B3}\u5A61\u5A71\u{21905}\u{241FC}\u372D\u59EF\u{2173C}\u36C7\u718E\u9390\u669A\u{242A5}\u5A6E\u5A2B\u{24293}\u6A2B\u{23EF9}\u{27736}\u{2445B}\u{242CA}\u711D\u{24259}\u{289E1}\u4FB0\u{26D28}\u5CC2\u{244CE}\u{27E4D}\u{243BD}\u6A0C\u{24256}\u{21304}\u70A6\u7133\u{243E9}\u3DA5\u6CDF\u{2F825}\u{24A4F}\u7E65\u59EB\u5D2F\u3DF3\u5F5C\u{24A5D}\u{217DF}\u7DA4\u8426"], + ["98a1", "\u5485\u{23AFA}\u{23300}\u{20214}\u577E\u{208D5}\u{20619}\u3FE5\u{21F9E}\u{2A2B6}\u7003\u{2915B}\u5D70\u738F\u7CD3\u{28A59}\u{29420}\u4FC8\u7FE7\u72CD\u7310\u{27AF4}\u7338\u7339\u{256F6}\u7341\u7348\u3EA9\u{27B18}\u906C\u71F5\u{248F2}\u73E1\u81F6\u3ECA\u770C\u3ED1\u6CA2\u56FD\u7419\u741E\u741F\u3EE2\u3EF0\u3EF4\u3EFA\u74D3\u3F0E\u3F53\u7542\u756D\u7572\u758D\u3F7C\u75C8\u75DC\u3FC0\u764D\u3FD7\u7674\u3FDC\u767A\u{24F5C}\u7188\u5623\u8980\u5869\u401D\u7743\u4039\u6761\u4045\u35DB\u7798\u406A\u406F\u5C5E\u77BE\u77CB\u58F2\u7818\u70B9\u781C\u40A8\u7839\u7847\u7851\u7866\u8448\u{25535}\u7933\u6803\u7932\u4103"], + ["9940", "\u4109\u7991\u7999\u8FBB\u7A06\u8FBC\u4167\u7A91\u41B2\u7ABC\u8279\u41C4\u7ACF\u7ADB\u41CF\u4E21\u7B62\u7B6C\u7B7B\u7C12\u7C1B\u4260\u427A\u7C7B\u7C9C\u428C\u7CB8\u4294\u7CED\u8F93\u70C0\u{20CCF}\u7DCF\u7DD4\u7DD0\u7DFD\u7FAE\u7FB4\u729F\u4397\u8020\u8025\u7B39\u802E\u8031\u8054\u3DCC\u57B4\u70A0\u80B7\u80E9\u43ED\u810C\u732A\u810E\u8112\u7560\u8114\u4401\u3B39\u8156\u8159\u815A"], + ["99a1", "\u4413\u583A\u817C\u8184\u4425\u8193\u442D\u81A5\u57EF\u81C1\u81E4\u8254\u448F\u82A6\u8276\u82CA\u82D8\u82FF\u44B0\u8357\u9669\u698A\u8405\u70F5\u8464\u60E3\u8488\u4504\u84BE\u84E1\u84F8\u8510\u8538\u8552\u453B\u856F\u8570\u85E0\u4577\u8672\u8692\u86B2\u86EF\u9645\u878B\u4606\u4617\u88AE\u88FF\u8924\u8947\u8991\u{27967}\u8A29\u8A38\u8A94\u8AB4\u8C51\u8CD4\u8CF2\u8D1C\u4798\u585F\u8DC3\u47ED\u4EEE\u8E3A\u55D8\u5754\u8E71\u55F5\u8EB0\u4837\u8ECE\u8EE2\u8EE4\u8EED\u8EF2\u8FB7\u8FC1\u8FCA\u8FCC\u9033\u99C4\u48AD\u98E0\u9213\u491E\u9228\u9258\u926B\u92B1\u92AE\u92BF"], + ["9a40", "\u92E3\u92EB\u92F3\u92F4\u92FD\u9343\u9384\u93AD\u4945\u4951\u9EBF\u9417\u5301\u941D\u942D\u943E\u496A\u9454\u9479\u952D\u95A2\u49A7\u95F4\u9633\u49E5\u67A0\u4A24\u9740\u4A35\u97B2\u97C2\u5654\u4AE4\u60E8\u98B9\u4B19\u98F1\u5844\u990E\u9919\u51B4\u991C\u9937\u9942\u995D\u9962\u4B70\u99C5\u4B9D\u9A3C\u9B0F\u7A83\u9B69\u9B81\u9BDD\u9BF1\u9BF4\u4C6D\u9C20\u376F\u{21BC2}\u9D49\u9C3A"], + ["9aa1", "\u9EFE\u5650\u9D93\u9DBD\u9DC0\u9DFC\u94F6\u8FB6\u9E7B\u9EAC\u9EB1\u9EBD\u9EC6\u94DC\u9EE2\u9EF1\u9EF8\u7AC8\u9F44\u{20094}\u{202B7}\u{203A0}\u691A\u94C3\u59AC\u{204D7}\u5840\u94C1\u37B9\u{205D5}\u{20615}\u{20676}\u{216BA}\u5757\u7173\u{20AC2}\u{20ACD}\u{20BBF}\u546A\u{2F83B}\u{20BCB}\u549E\u{20BFB}\u{20C3B}\u{20C53}\u{20C65}\u{20C7C}\u60E7\u{20C8D}\u567A\u{20CB5}\u{20CDD}\u{20CED}\u{20D6F}\u{20DB2}\u{20DC8}\u6955\u9C2F\u87A5\u{20E04}\u{20E0E}\u{20ED7}\u{20F90}\u{20F2D}\u{20E73}\u5C20\u{20FBC}\u5E0B\u{2105C}\u{2104F}\u{21076}\u671E\u{2107B}\u{21088}\u{21096}\u3647\u{210BF}\u{210D3}\u{2112F}\u{2113B}\u5364\u84AD\u{212E3}\u{21375}\u{21336}\u8B81\u{21577}\u{21619}\u{217C3}\u{217C7}\u4E78\u70BB\u{2182D}\u{2196A}"], + ["9b40", "\u{21A2D}\u{21A45}\u{21C2A}\u{21C70}\u{21CAC}\u{21EC8}\u62C3\u{21ED5}\u{21F15}\u7198\u6855\u{22045}\u69E9\u36C8\u{2227C}\u{223D7}\u{223FA}\u{2272A}\u{22871}\u{2294F}\u82FD\u{22967}\u{22993}\u{22AD5}\u89A5\u{22AE8}\u8FA0\u{22B0E}\u97B8\u{22B3F}\u9847\u9ABD\u{22C4C}"], + ["9b62", "\u{22C88}\u{22CB7}\u{25BE8}\u{22D08}\u{22D12}\u{22DB7}\u{22D95}\u{22E42}\u{22F74}\u{22FCC}\u{23033}\u{23066}\u{2331F}\u{233DE}\u5FB1\u6648\u66BF\u{27A79}\u{23567}\u{235F3}\u7201\u{249BA}\u77D7\u{2361A}\u{23716}\u7E87\u{20346}\u58B5\u670E"], + ["9ba1", "\u6918\u{23AA7}\u{27657}\u{25FE2}\u{23E11}\u{23EB9}\u{275FE}\u{2209A}\u48D0\u4AB8\u{24119}\u{28A9A}\u{242EE}\u{2430D}\u{2403B}\u{24334}\u{24396}\u{24A45}\u{205CA}\u51D2\u{20611}\u599F\u{21EA8}\u3BBE\u{23CFF}\u{24404}\u{244D6}\u5788\u{24674}\u399B\u{2472F}\u{285E8}\u{299C9}\u3762\u{221C3}\u8B5E\u{28B4E}\u99D6\u{24812}\u{248FB}\u{24A15}\u7209\u{24AC0}\u{20C78}\u5965\u{24EA5}\u{24F86}\u{20779}\u8EDA\u{2502C}\u528F\u573F\u7171\u{25299}\u{25419}\u{23F4A}\u{24AA7}\u55BC\u{25446}\u{2546E}\u{26B52}\u91D4\u3473\u{2553F}\u{27632}\u{2555E}\u4718\u{25562}\u{25566}\u{257C7}\u{2493F}\u{2585D}\u5066\u34FB\u{233CC}\u60DE\u{25903}\u477C\u{28948}\u{25AAE}\u{25B89}\u{25C06}\u{21D90}\u57A1\u7151\u6FB6\u{26102}\u{27C12}\u9056\u{261B2}\u{24F9A}\u8B62\u{26402}\u{2644A}"], + ["9c40", "\u5D5B\u{26BF7}\u8F36\u{26484}\u{2191C}\u8AEA\u{249F6}\u{26488}\u{23FEF}\u{26512}\u4BC0\u{265BF}\u{266B5}\u{2271B}\u9465\u{257E1}\u6195\u5A27\u{2F8CD}\u4FBB\u56B9\u{24521}\u{266FC}\u4E6A\u{24934}\u9656\u6D8F\u{26CBD}\u3618\u8977\u{26799}\u{2686E}\u{26411}\u{2685E}\u71DF\u{268C7}\u7B42\u{290C0}\u{20A11}\u{26926}\u9104\u{26939}\u7A45\u9DF0\u{269FA}\u9A26\u{26A2D}\u365F\u{26469}\u{20021}\u7983\u{26A34}\u{26B5B}\u5D2C\u{23519}\u83CF\u{26B9D}\u46D0\u{26CA4}\u753B\u8865\u{26DAE}\u58B6"], + ["9ca1", "\u371C\u{2258D}\u{2704B}\u{271CD}\u3C54\u{27280}\u{27285}\u9281\u{2217A}\u{2728B}\u9330\u{272E6}\u{249D0}\u6C39\u949F\u{27450}\u{20EF8}\u8827\u88F5\u{22926}\u{28473}\u{217B1}\u6EB8\u{24A2A}\u{21820}\u39A4\u36B9\u5C10\u79E3\u453F\u66B6\u{29CAD}\u{298A4}\u8943\u{277CC}\u{27858}\u56D6\u40DF\u{2160A}\u39A1\u{2372F}\u{280E8}\u{213C5}\u71AD\u8366\u{279DD}\u{291A8}\u5A67\u4CB7\u{270AF}\u{289AB}\u{279FD}\u{27A0A}\u{27B0B}\u{27D66}\u{2417A}\u7B43\u797E\u{28009}\u6FB5\u{2A2DF}\u6A03\u{28318}\u53A2\u{26E07}\u93BF\u6836\u975D\u{2816F}\u{28023}\u{269B5}\u{213ED}\u{2322F}\u{28048}\u5D85\u{28C30}\u{28083}\u5715\u9823\u{28949}\u5DAB\u{24988}\u65BE\u69D5\u53D2\u{24AA5}\u{23F81}\u3C11\u6736\u{28090}\u{280F4}\u{2812E}\u{21FA1}\u{2814F}"], + ["9d40", "\u{28189}\u{281AF}\u{2821A}\u{28306}\u{2832F}\u{2838A}\u35CA\u{28468}\u{286AA}\u48FA\u63E6\u{28956}\u7808\u9255\u{289B8}\u43F2\u{289E7}\u43DF\u{289E8}\u{28B46}\u{28BD4}\u59F8\u{28C09}\u8F0B\u{28FC5}\u{290EC}\u7B51\u{29110}\u{2913C}\u3DF7\u{2915E}\u{24ACA}\u8FD0\u728F\u568B\u{294E7}\u{295E9}\u{295B0}\u{295B8}\u{29732}\u{298D1}\u{29949}\u{2996A}\u{299C3}\u{29A28}\u{29B0E}\u{29D5A}\u{29D9B}\u7E9F\u{29EF8}\u{29F23}\u4CA4\u9547\u{2A293}\u71A2\u{2A2FF}\u4D91\u9012\u{2A5CB}\u4D9C\u{20C9C}\u8FBE\u55C1"], + ["9da1", "\u8FBA\u{224B0}\u8FB9\u{24A93}\u4509\u7E7F\u6F56\u6AB1\u4EEA\u34E4\u{28B2C}\u{2789D}\u373A\u8E80\u{217F5}\u{28024}\u{28B6C}\u{28B99}\u{27A3E}\u{266AF}\u3DEB\u{27655}\u{23CB7}\u{25635}\u{25956}\u4E9A\u{25E81}\u{26258}\u56BF\u{20E6D}\u8E0E\u5B6D\u{23E88}\u{24C9E}\u63DE\u62D0\u{217F6}\u{2187B}\u6530\u562D\u{25C4A}\u541A\u{25311}\u3DC6\u{29D98}\u4C7D\u5622\u561E\u7F49\u{25ED8}\u5975\u{23D40}\u8770\u4E1C\u{20FEA}\u{20D49}\u{236BA}\u8117\u9D5E\u8D18\u763B\u9C45\u764E\u77B9\u9345\u5432\u8148\u82F7\u5625\u8132\u8418\u80BD\u55EA\u7962\u5643\u5416\u{20E9D}\u35CE\u5605\u55F1\u66F1\u{282E2}\u362D\u7534\u55F0\u55BA\u5497\u5572\u{20C41}\u{20C96}\u5ED0\u{25148}\u{20E76}\u{22C62}"], + ["9e40", "\u{20EA2}\u9EAB\u7D5A\u55DE\u{21075}\u629D\u976D\u5494\u8CCD\u71F6\u9176\u63FC\u63B9\u63FE\u5569\u{22B43}\u9C72\u{22EB3}\u519A\u34DF\u{20DA7}\u51A7\u544D\u551E\u5513\u7666\u8E2D\u{2688A}\u75B1\u80B6\u8804\u8786\u88C7\u81B6\u841C\u{210C1}\u44EC\u7304\u{24706}\u5B90\u830B\u{26893}\u567B\u{226F4}\u{27D2F}\u{241A3}\u{27D73}\u{26ED0}\u{272B6}\u9170\u{211D9}\u9208\u{23CFC}\u{2A6A9}\u{20EAC}\u{20EF9}\u7266\u{21CA2}\u474E\u{24FC2}\u{27FF9}\u{20FEB}\u40FA"], + ["9ea1", "\u9C5D\u651F\u{22DA0}\u48F3\u{247E0}\u{29D7C}\u{20FEC}\u{20E0A}\u6062\u{275A3}\u{20FED}"], + ["9ead", "\u{26048}\u{21187}\u71A3\u7E8E\u9D50\u4E1A\u4E04\u3577\u5B0D\u6CB2\u5367\u36AC\u39DC\u537D\u36A5\u{24618}\u589A\u{24B6E}\u822D\u544B\u57AA\u{25A95}\u{20979}"], + ["9ec5", "\u3A52\u{22465}\u7374\u{29EAC}\u4D09\u9BED\u{23CFE}\u{29F30}\u4C5B\u{24FA9}\u{2959E}\u{29FDE}\u845C\u{23DB6}\u{272B2}\u{267B3}\u{23720}\u632E\u7D25\u{23EF7}\u{23E2C}\u3A2A\u9008\u52CC\u3E74\u367A\u45E9\u{2048E}\u7640\u5AF0\u{20EB6}\u787A\u{27F2E}\u58A7\u40BF\u567C\u9B8B\u5D74\u7654\u{2A434}\u9E85\u4CE1\u75F9\u37FB\u6119\u{230DA}\u{243F2}"], + ["9ef5", "\u565D\u{212A9}\u57A7\u{24963}\u{29E06}\u5234\u{270AE}\u35AD\u6C4A\u9D7C"], + ["9f40", "\u7C56\u9B39\u57DE\u{2176C}\u5C53\u64D3\u{294D0}\u{26335}\u{27164}\u86AD\u{20D28}\u{26D22}\u{24AE2}\u{20D71}"], + ["9f4f", "\u51FE\u{21F0F}\u5D8E\u9703\u{21DD1}\u9E81\u904C\u7B1F\u9B02\u5CD1\u7BA3\u6268\u6335\u9AFF\u7BCF\u9B2A\u7C7E\u9B2E\u7C42\u7C86\u9C15\u7BFC\u9B09\u9F17\u9C1B\u{2493E}\u9F5A\u5573\u5BC3\u4FFD\u9E98\u4FF2\u5260\u3E06\u52D1\u5767\u5056\u59B7\u5E12\u97C8\u9DAB\u8F5C\u5469\u97B4\u9940\u97BA\u532C\u6130"], + ["9fa1", "\u692C\u53DA\u9C0A\u9D02\u4C3B\u9641\u6980\u50A6\u7546\u{2176D}\u99DA\u5273"], + ["9fae", "\u9159\u9681\u915C"], + ["9fb2", "\u9151\u{28E97}\u637F\u{26D23}\u6ACA\u5611\u918E\u757A\u6285\u{203FC}\u734F\u7C70\u{25C21}\u{23CFD}"], + ["9fc1", "\u{24919}\u76D6\u9B9D\u4E2A\u{20CD4}\u83BE\u8842"], + ["9fc9", "\u5C4A\u69C0\u50ED\u577A\u521F\u5DF5\u4ECE\u6C31\u{201F2}\u4F39\u549C\u54DA\u529A\u8D82\u35FE\u5F0C\u35F3"], + ["9fdb", "\u6B52\u917C\u9FA5\u9B97\u982E\u98B4\u9ABA\u9EA8\u9E84\u717A\u7B14"], + ["9fe7", "\u6BFA\u8818\u7F78"], + ["9feb", "\u5620\u{2A64A}\u8E77\u9F53"], + ["9ff0", "\u8DD4\u8E4F\u9E1C\u8E01\u6282\u{2837D}\u8E28\u8E75\u7AD3\u{24A77}\u7A3E\u78D8\u6CEA\u8A67\u7607"], + ["a040", "\u{28A5A}\u9F26\u6CCE\u87D6\u75C3\u{2A2B2}\u7853\u{2F840}\u8D0C\u72E2\u7371\u8B2D\u7302\u74F1\u8CEB\u{24ABB}\u862F\u5FBA\u88A0\u44B7"], + ["a055", "\u{2183B}\u{26E05}"], + ["a058", "\u8A7E\u{2251B}"], + ["a05b", "\u60FD\u7667\u9AD7\u9D44\u936E\u9B8F\u87F5"], + ["a063", "\u880F\u8CF7\u732C\u9721\u9BB0\u35D6\u72B2\u4C07\u7C51\u994A\u{26159}\u6159\u4C04\u9E96\u617D"], + ["a073", "\u575F\u616F\u62A6\u6239\u62CE\u3A5C\u61E2\u53AA\u{233F5}\u6364\u6802\u35D2"], + ["a0a1", "\u5D57\u{28BC2}\u8FDA\u{28E39}"], + ["a0a6", "\u50D9\u{21D46}\u7906\u5332\u9638\u{20F3B}\u4065"], + ["a0ae", "\u77FE"], + ["a0b0", "\u7CC2\u{25F1A}\u7CDA\u7A2D\u8066\u8063\u7D4D\u7505\u74F2\u8994\u821A\u670C\u8062\u{27486}\u805B\u74F0\u8103\u7724\u8989\u{267CC}\u7553\u{26ED1}\u87A9\u87CE\u81C8\u878C\u8A49\u8CAD\u8B43\u772B\u74F8\u84DA\u3635\u69B2\u8DA6"], + ["a0d4", "\u89A9\u7468\u6DB9\u87C1\u{24011}\u74E7\u3DDB\u7176\u60A4\u619C\u3CD1\u7162\u6077"], + ["a0e2", "\u7F71\u{28B2D}\u7250\u60E9\u4B7E\u5220\u3C18\u{23CC7}\u{25ED7}\u{27656}\u{25531}\u{21944}\u{212FE}\u{29903}\u{26DDC}\u{270AD}\u5CC1\u{261AD}\u{28A0F}\u{23677}\u{200EE}\u{26846}\u{24F0E}\u4562\u5B1F\u{2634C}\u9F50\u9EA6\u{2626B}"], + ["a3c0", "\u2400", 31, "\u2421"], + ["c6a1", "\u2460", 9, "\u2474", 9, "\u2170", 9, "\u4E36\u4E3F\u4E85\u4EA0\u5182\u5196\u51AB\u52F9\u5338\u5369\u53B6\u590A\u5B80\u5DDB\u2F33\u5E7F\u5EF4\u5F50\u5F61\u6534\u65E0\u7592\u7676\u8FB5\u96B6\xA8\u02C6\u30FD\u30FE\u309D\u309E\u3003\u4EDD\u3005\u3006\u3007\u30FC\uFF3B\uFF3D\u273D\u3041", 23], + ["c740", "\u3059", 58, "\u30A1\u30A2\u30A3\u30A4"], + ["c7a1", "\u30A5", 81, "\u0410", 5, "\u0401\u0416", 4], + ["c840", "\u041B", 26, "\u0451\u0436", 25, "\u21E7\u21B8\u21B9\u31CF\u{200CC}\u4E5A\u{2008A}\u5202\u4491"], + ["c8a1", "\u9FB0\u5188\u9FB1\u{27607}"], + ["c8cd", "\uFFE2\uFFE4\uFF07\uFF02\u3231\u2116\u2121\u309B\u309C\u2E80\u2E84\u2E86\u2E87\u2E88\u2E8A\u2E8C\u2E8D\u2E95\u2E9C\u2E9D\u2EA5\u2EA7\u2EAA\u2EAC\u2EAE\u2EB6\u2EBC\u2EBE\u2EC6\u2ECA\u2ECC\u2ECD\u2ECF\u2ED6\u2ED7\u2EDE\u2EE3"], + ["c8f5", "\u0283\u0250\u025B\u0254\u0275\u0153\xF8\u014B\u028A\u026A"], + ["f9fe", "\uFFED"], + ["fa40", "\u{20547}\u92DB\u{205DF}\u{23FC5}\u854C\u42B5\u73EF\u51B5\u3649\u{24942}\u{289E4}\u9344\u{219DB}\u82EE\u{23CC8}\u783C\u6744\u62DF\u{24933}\u{289AA}\u{202A0}\u{26BB3}\u{21305}\u4FAB\u{224ED}\u5008\u{26D29}\u{27A84}\u{23600}\u{24AB1}\u{22513}\u5029\u{2037E}\u5FA4\u{20380}\u{20347}\u6EDB\u{2041F}\u507D\u5101\u347A\u510E\u986C\u3743\u8416\u{249A4}\u{20487}\u5160\u{233B4}\u516A\u{20BFF}\u{220FC}\u{202E5}\u{22530}\u{2058E}\u{23233}\u{21983}\u5B82\u877D\u{205B3}\u{23C99}\u51B2\u51B8"], + ["faa1", "\u9D34\u51C9\u51CF\u51D1\u3CDC\u51D3\u{24AA6}\u51B3\u51E2\u5342\u51ED\u83CD\u693E\u{2372D}\u5F7B\u520B\u5226\u523C\u52B5\u5257\u5294\u52B9\u52C5\u7C15\u8542\u52E0\u860D\u{26B13}\u5305\u{28ADE}\u5549\u6ED9\u{23F80}\u{20954}\u{23FEC}\u5333\u5344\u{20BE2}\u6CCB\u{21726}\u681B\u73D5\u604A\u3EAA\u38CC\u{216E8}\u71DD\u44A2\u536D\u5374\u{286AB}\u537E\u537F\u{21596}\u{21613}\u77E6\u5393\u{28A9B}\u53A0\u53AB\u53AE\u73A7\u{25772}\u3F59\u739C\u53C1\u53C5\u6C49\u4E49\u57FE\u53D9\u3AAB\u{20B8F}\u53E0\u{23FEB}\u{22DA3}\u53F6\u{20C77}\u5413\u7079\u552B\u6657\u6D5B\u546D\u{26B53}\u{20D74}\u555D\u548F\u54A4\u47A6\u{2170D}\u{20EDD}\u3DB4\u{20D4D}"], + ["fb40", "\u{289BC}\u{22698}\u5547\u4CED\u542F\u7417\u5586\u55A9\u5605\u{218D7}\u{2403A}\u4552\u{24435}\u66B3\u{210B4}\u5637\u66CD\u{2328A}\u66A4\u66AD\u564D\u564F\u78F1\u56F1\u9787\u53FE\u5700\u56EF\u56ED\u{28B66}\u3623\u{2124F}\u5746\u{241A5}\u6C6E\u708B\u5742\u36B1\u{26C7E}\u57E6\u{21416}\u5803\u{21454}\u{24363}\u5826\u{24BF5}\u585C\u58AA\u3561\u58E0\u58DC\u{2123C}\u58FB\u5BFF\u5743\u{2A150}\u{24278}\u93D3\u35A1\u591F\u68A6\u36C3\u6E59"], + ["fba1", "\u{2163E}\u5A24\u5553\u{21692}\u8505\u59C9\u{20D4E}\u{26C81}\u{26D2A}\u{217DC}\u59D9\u{217FB}\u{217B2}\u{26DA6}\u6D71\u{21828}\u{216D5}\u59F9\u{26E45}\u5AAB\u5A63\u36E6\u{249A9}\u5A77\u3708\u5A96\u7465\u5AD3\u{26FA1}\u{22554}\u3D85\u{21911}\u3732\u{216B8}\u5E83\u52D0\u5B76\u6588\u5B7C\u{27A0E}\u4004\u485D\u{20204}\u5BD5\u6160\u{21A34}\u{259CC}\u{205A5}\u5BF3\u5B9D\u4D10\u5C05\u{21B44}\u5C13\u73CE\u5C14\u{21CA5}\u{26B28}\u5C49\u48DD\u5C85\u5CE9\u5CEF\u5D8B\u{21DF9}\u{21E37}\u5D10\u5D18\u5D46\u{21EA4}\u5CBA\u5DD7\u82FC\u382D\u{24901}\u{22049}\u{22173}\u8287\u3836\u3BC2\u5E2E\u6A8A\u5E75\u5E7A\u{244BC}\u{20CD3}\u53A6\u4EB7\u5ED0\u53A8\u{21771}\u5E09\u5EF4\u{28482}"], + ["fc40", "\u5EF9\u5EFB\u38A0\u5EFC\u683E\u941B\u5F0D\u{201C1}\u{2F894}\u3ADE\u48AE\u{2133A}\u5F3A\u{26888}\u{223D0}\u5F58\u{22471}\u5F63\u97BD\u{26E6E}\u5F72\u9340\u{28A36}\u5FA7\u5DB6\u3D5F\u{25250}\u{21F6A}\u{270F8}\u{22668}\u91D6\u{2029E}\u{28A29}\u6031\u6685\u{21877}\u3963\u3DC7\u3639\u5790\u{227B4}\u7971\u3E40\u609E\u60A4\u60B3\u{24982}\u{2498F}\u{27A53}\u74A4\u50E1\u5AA0\u6164\u8424\u6142\u{2F8A6}\u{26ED2}\u6181\u51F4\u{20656}\u6187\u5BAA\u{23FB7}"], + ["fca1", "\u{2285F}\u61D3\u{28B9D}\u{2995D}\u61D0\u3932\u{22980}\u{228C1}\u6023\u615C\u651E\u638B\u{20118}\u62C5\u{21770}\u62D5\u{22E0D}\u636C\u{249DF}\u3A17\u6438\u63F8\u{2138E}\u{217FC}\u6490\u6F8A\u{22E36}\u9814\u{2408C}\u{2571D}\u64E1\u64E5\u947B\u3A66\u643A\u3A57\u654D\u6F16\u{24A28}\u{24A23}\u6585\u656D\u655F\u{2307E}\u65B5\u{24940}\u4B37\u65D1\u40D8\u{21829}\u65E0\u65E3\u5FDF\u{23400}\u6618\u{231F7}\u{231F8}\u6644\u{231A4}\u{231A5}\u664B\u{20E75}\u6667\u{251E6}\u6673\u6674\u{21E3D}\u{23231}\u{285F4}\u{231C8}\u{25313}\u77C5\u{228F7}\u99A4\u6702\u{2439C}\u{24A21}\u3B2B\u69FA\u{237C2}\u675E\u6767\u6762\u{241CD}\u{290ED}\u67D7\u44E9\u6822\u6E50\u923C\u6801\u{233E6}\u{26DA0}\u685D"], + ["fd40", "\u{2346F}\u69E1\u6A0B\u{28ADF}\u6973\u68C3\u{235CD}\u6901\u6900\u3D32\u3A01\u{2363C}\u3B80\u67AC\u6961\u{28A4A}\u42FC\u6936\u6998\u3BA1\u{203C9}\u8363\u5090\u69F9\u{23659}\u{2212A}\u6A45\u{23703}\u6A9D\u3BF3\u67B1\u6AC8\u{2919C}\u3C0D\u6B1D\u{20923}\u60DE\u6B35\u6B74\u{227CD}\u6EB5\u{23ADB}\u{203B5}\u{21958}\u3740\u5421\u{23B5A}\u6BE1\u{23EFC}\u6BDC\u6C37\u{2248B}\u{248F1}\u{26B51}\u6C5A\u8226\u6C79\u{23DBC}\u44C5\u{23DBD}\u{241A4}\u{2490C}\u{24900}"], + ["fda1", "\u{23CC9}\u36E5\u3CEB\u{20D32}\u9B83\u{231F9}\u{22491}\u7F8F\u6837\u{26D25}\u{26DA1}\u{26DEB}\u6D96\u6D5C\u6E7C\u6F04\u{2497F}\u{24085}\u{26E72}\u8533\u{26F74}\u51C7\u6C9C\u6E1D\u842E\u{28B21}\u6E2F\u{23E2F}\u7453\u{23F82}\u79CC\u6E4F\u5A91\u{2304B}\u6FF8\u370D\u6F9D\u{23E30}\u6EFA\u{21497}\u{2403D}\u4555\u93F0\u6F44\u6F5C\u3D4E\u6F74\u{29170}\u3D3B\u6F9F\u{24144}\u6FD3\u{24091}\u{24155}\u{24039}\u{23FF0}\u{23FB4}\u{2413F}\u51DF\u{24156}\u{24157}\u{24140}\u{261DD}\u704B\u707E\u70A7\u7081\u70CC\u70D5\u70D6\u70DF\u4104\u3DE8\u71B4\u7196\u{24277}\u712B\u7145\u5A88\u714A\u716E\u5C9C\u{24365}\u714F\u9362\u{242C1}\u712C\u{2445A}\u{24A27}\u{24A22}\u71BA\u{28BE8}\u70BD\u720E"], + ["fe40", "\u9442\u7215\u5911\u9443\u7224\u9341\u{25605}\u722E\u7240\u{24974}\u68BD\u7255\u7257\u3E55\u{23044}\u680D\u6F3D\u7282\u732A\u732B\u{24823}\u{2882B}\u48ED\u{28804}\u7328\u732E\u73CF\u73AA\u{20C3A}\u{26A2E}\u73C9\u7449\u{241E2}\u{216E7}\u{24A24}\u6623\u36C5\u{249B7}\u{2498D}\u{249FB}\u73F7\u7415\u6903\u{24A26}\u7439\u{205C3}\u3ED7\u745C\u{228AD}\u7460\u{28EB2}\u7447\u73E4\u7476\u83B9\u746C\u3730\u7474\u93F1\u6A2C\u7482\u4953\u{24A8C}"], + ["fea1", "\u{2415F}\u{24A79}\u{28B8F}\u5B46\u{28C03}\u{2189E}\u74C8\u{21988}\u750E\u74E9\u751E\u{28ED9}\u{21A4B}\u5BD7\u{28EAC}\u9385\u754D\u754A\u7567\u756E\u{24F82}\u3F04\u{24D13}\u758E\u745D\u759E\u75B4\u7602\u762C\u7651\u764F\u766F\u7676\u{263F5}\u7690\u81EF\u37F8\u{26911}\u{2690E}\u76A1\u76A5\u76B7\u76CC\u{26F9F}\u8462\u{2509D}\u{2517D}\u{21E1C}\u771E\u7726\u7740\u64AF\u{25220}\u7758\u{232AC}\u77AF\u{28964}\u{28968}\u{216C1}\u77F4\u7809\u{21376}\u{24A12}\u68CA\u78AF\u78C7\u78D3\u96A5\u792E\u{255E0}\u78D7\u7934\u78B1\u{2760C}\u8FB8\u8884\u{28B2B}\u{26083}\u{2261C}\u7986\u8900\u6902\u7980\u{25857}\u799D\u{27B39}\u793C\u79A9\u6E2A\u{27126}\u3EA8\u79C6\u{2910D}\u79D4"] + ]; + } +}); + +// ../../node_modules/iconv-lite/encodings/dbcs-data.js +var require_dbcs_data = __commonJS({ + "../../node_modules/iconv-lite/encodings/dbcs-data.js"(exports2, module2) { + "use strict"; + module2.exports = { + // == Japanese/ShiftJIS ==================================================== + // All japanese encodings are based on JIS X set of standards: + // JIS X 0201 - Single-byte encoding of ASCII + ¥ + Kana chars at 0xA1-0xDF. + // JIS X 0208 - Main set of 6879 characters, placed in 94x94 plane, to be encoded by 2 bytes. + // Has several variations in 1978, 1983, 1990 and 1997. + // JIS X 0212 - Supplementary plane of 6067 chars in 94x94 plane. 1990. Effectively dead. + // JIS X 0213 - Extension and modern replacement of 0208 and 0212. Total chars: 11233. + // 2 planes, first is superset of 0208, second - revised 0212. + // Introduced in 2000, revised 2004. Some characters are in Unicode Plane 2 (0x2xxxx) + // Byte encodings are: + // * Shift_JIS: Compatible with 0201, uses not defined chars in top half as lead bytes for double-byte + // encoding of 0208. Lead byte ranges: 0x81-0x9F, 0xE0-0xEF; Trail byte ranges: 0x40-0x7E, 0x80-0x9E, 0x9F-0xFC. + // Windows CP932 is a superset of Shift_JIS. Some companies added more chars, notably KDDI. + // * EUC-JP: Up to 3 bytes per character. Used mostly on *nixes. + // 0x00-0x7F - lower part of 0201 + // 0x8E, 0xA1-0xDF - upper part of 0201 + // (0xA1-0xFE)x2 - 0208 plane (94x94). + // 0x8F, (0xA1-0xFE)x2 - 0212 plane (94x94). + // * JIS X 208: 7-bit, direct encoding of 0208. Byte ranges: 0x21-0x7E (94 values). Uncommon. + // Used as-is in ISO2022 family. + // * ISO2022-JP: Stateful encoding, with escape sequences to switch between ASCII, + // 0201-1976 Roman, 0208-1978, 0208-1983. + // * ISO2022-JP-1: Adds esc seq for 0212-1990. + // * ISO2022-JP-2: Adds esc seq for GB2313-1980, KSX1001-1992, ISO8859-1, ISO8859-7. + // * ISO2022-JP-3: Adds esc seq for 0201-1976 Kana set, 0213-2000 Planes 1, 2. + // * ISO2022-JP-2004: Adds 0213-2004 Plane 1. + // + // After JIS X 0213 appeared, Shift_JIS-2004, EUC-JISX0213 and ISO2022-JP-2004 followed, with just changing the planes. + // + // Overall, it seems that it's a mess :( http://www8.plala.or.jp/tkubota1/unicode-symbols-map2.html + "shiftjis": { + type: "_dbcs", + table: function() { + return require_shiftjis(); + }, + encodeAdd: { "\xA5": 92, "\u203E": 126 }, + encodeSkipVals: [{ from: 60736, to: 63808 }] + }, + "csshiftjis": "shiftjis", + "mskanji": "shiftjis", + "sjis": "shiftjis", + "windows31j": "shiftjis", + "ms31j": "shiftjis", + "xsjis": "shiftjis", + "windows932": "shiftjis", + "ms932": "shiftjis", + "932": "shiftjis", + "cp932": "shiftjis", + "eucjp": { + type: "_dbcs", + table: function() { + return require_eucjp(); + }, + encodeAdd: { "\xA5": 92, "\u203E": 126 } + }, + // TODO: KDDI extension to Shift_JIS + // TODO: IBM CCSID 942 = CP932, but F0-F9 custom chars and other char changes. + // TODO: IBM CCSID 943 = Shift_JIS = CP932 with original Shift_JIS lower 128 chars. + // == Chinese/GBK ========================================================== + // http://en.wikipedia.org/wiki/GBK + // We mostly implement W3C recommendation: https://www.w3.org/TR/encoding/#gbk-encoder + // Oldest GB2312 (1981, ~7600 chars) is a subset of CP936 + "gb2312": "cp936", + "gb231280": "cp936", + "gb23121980": "cp936", + "csgb2312": "cp936", + "csiso58gb231280": "cp936", + "euccn": "cp936", + // Microsoft's CP936 is a subset and approximation of GBK. + "windows936": "cp936", + "ms936": "cp936", + "936": "cp936", + "cp936": { + type: "_dbcs", + table: function() { + return require_cp936(); + } + }, + // GBK (~22000 chars) is an extension of CP936 that added user-mapped chars and some other. + "gbk": { + type: "_dbcs", + table: function() { + return require_cp936().concat(require_gbk_added()); + } + }, + "xgbk": "gbk", + "isoir58": "gbk", + // GB18030 is an algorithmic extension of GBK. + // Main source: https://www.w3.org/TR/encoding/#gbk-encoder + // http://icu-project.org/docs/papers/gb18030.html + // http://source.icu-project.org/repos/icu/data/trunk/charset/data/xml/gb-18030-2000.xml + // http://www.khngai.com/chinese/charmap/tblgbk.php?page=0 + "gb18030": { + type: "_dbcs", + table: function() { + return require_cp936().concat(require_gbk_added()); + }, + gb18030: function() { + return require_gb18030_ranges(); + }, + encodeSkipVals: [128], + encodeAdd: { "\u20AC": 41699 } + }, + "chinese": "gb18030", + // == Korean =============================================================== + // EUC-KR, KS_C_5601 and KS X 1001 are exactly the same. + "windows949": "cp949", + "ms949": "cp949", + "949": "cp949", + "cp949": { + type: "_dbcs", + table: function() { + return require_cp949(); + } + }, + "cseuckr": "cp949", + "csksc56011987": "cp949", + "euckr": "cp949", + "isoir149": "cp949", + "korean": "cp949", + "ksc56011987": "cp949", + "ksc56011989": "cp949", + "ksc5601": "cp949", + // == Big5/Taiwan/Hong Kong ================================================ + // There are lots of tables for Big5 and cp950. Please see the following links for history: + // http://moztw.org/docs/big5/ http://www.haible.de/bruno/charsets/conversion-tables/Big5.html + // Variations, in roughly number of defined chars: + // * Windows CP 950: Microsoft variant of Big5. Canonical: http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP950.TXT + // * Windows CP 951: Microsoft variant of Big5-HKSCS-2001. Seems to be never public. http://me.abelcheung.org/articles/research/what-is-cp951/ + // * Big5-2003 (Taiwan standard) almost superset of cp950. + // * Unicode-at-on (UAO) / Mozilla 1.8. Falling out of use on the Web. Not supported by other browsers. + // * Big5-HKSCS (-2001, -2004, -2008). Hong Kong standard. + // many unicode code points moved from PUA to Supplementary plane (U+2XXXX) over the years. + // Plus, it has 4 combining sequences. + // Seems that Mozilla refused to support it for 10 yrs. https://bugzilla.mozilla.org/show_bug.cgi?id=162431 https://bugzilla.mozilla.org/show_bug.cgi?id=310299 + // because big5-hkscs is the only encoding to include astral characters in non-algorithmic way. + // Implementations are not consistent within browsers; sometimes labeled as just big5. + // MS Internet Explorer switches from big5 to big5-hkscs when a patch applied. + // Great discussion & recap of what's going on https://bugzilla.mozilla.org/show_bug.cgi?id=912470#c31 + // In the encoder, it might make sense to support encoding old PUA mappings to Big5 bytes seq-s. + // Official spec: http://www.ogcio.gov.hk/en/business/tech_promotion/ccli/terms/doc/2003cmp_2008.txt + // http://www.ogcio.gov.hk/tc/business/tech_promotion/ccli/terms/doc/hkscs-2008-big5-iso.txt + // + // Current understanding of how to deal with Big5(-HKSCS) is in the Encoding Standard, http://encoding.spec.whatwg.org/#big5-encoder + // Unicode mapping (http://www.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/OTHER/BIG5.TXT) is said to be wrong. + "windows950": "cp950", + "ms950": "cp950", + "950": "cp950", + "cp950": { + type: "_dbcs", + table: function() { + return require_cp950(); + } + }, + // Big5 has many variations and is an extension of cp950. We use Encoding Standard's as a consensus. + "big5": "big5hkscs", + "big5hkscs": { + type: "_dbcs", + table: function() { + return require_cp950().concat(require_big5_added()); + }, + encodeSkipVals: [ + // Although Encoding Standard says we should avoid encoding to HKSCS area (See Step 1 of + // https://encoding.spec.whatwg.org/#index-big5-pointer), we still do it to increase compatibility with ICU. + // But if a single unicode point can be encoded both as HKSCS and regular Big5, we prefer the latter. + 36457, + 36463, + 36478, + 36523, + 36532, + 36557, + 36560, + 36695, + 36713, + 36718, + 36811, + 36862, + 36973, + 36986, + 37060, + 37084, + 37105, + 37311, + 37551, + 37552, + 37553, + 37554, + 37585, + 37959, + 38090, + 38361, + 38652, + 39285, + 39798, + 39800, + 39803, + 39878, + 39902, + 39916, + 39926, + 40002, + 40019, + 40034, + 40040, + 40043, + 40055, + 40124, + 40125, + 40144, + 40279, + 40282, + 40388, + 40431, + 40443, + 40617, + 40687, + 40701, + 40800, + 40907, + 41079, + 41180, + 41183, + 36812, + 37576, + 38468, + 38637, + // Step 2 of https://encoding.spec.whatwg.org/#index-big5-pointer: Use last pointer for U+2550, U+255E, U+2561, U+256A, U+5341, or U+5345 + 41636, + 41637, + 41639, + 41638, + 41676, + 41678 + ] + }, + "cnbig5": "big5hkscs", + "csbig5": "big5hkscs", + "xxbig5": "big5hkscs" + }; + } +}); + +// ../../node_modules/iconv-lite/encodings/index.js +var require_encodings = __commonJS({ + "../../node_modules/iconv-lite/encodings/index.js"(exports2, module2) { + "use strict"; + var modules = [ + require_internal(), + require_utf32(), + require_utf16(), + require_utf7(), + require_sbcs_codec(), + require_sbcs_data(), + require_sbcs_data_generated(), + require_dbcs_codec(), + require_dbcs_data() + ]; + for (i = 0; i < modules.length; i++) { + module2 = modules[i]; + for (enc in module2) + if (Object.prototype.hasOwnProperty.call(module2, enc)) + exports2[enc] = module2[enc]; + } + var module2; + var enc; + var i; + } +}); + +// ../../node_modules/iconv-lite/lib/streams.js +var require_streams = __commonJS({ + "../../node_modules/iconv-lite/lib/streams.js"(exports2, module2) { + "use strict"; + var Buffer2 = require_safer().Buffer; + module2.exports = function(stream_module) { + var Transform = stream_module.Transform; + function IconvLiteEncoderStream(conv, options) { + this.conv = conv; + options = options || {}; + options.decodeStrings = false; + Transform.call(this, options); + } + IconvLiteEncoderStream.prototype = Object.create(Transform.prototype, { + constructor: { value: IconvLiteEncoderStream } + }); + IconvLiteEncoderStream.prototype._transform = function(chunk, encoding, done) { + if (typeof chunk != "string") + return done(new Error("Iconv encoding stream needs strings as its input.")); + try { + var res = this.conv.write(chunk); + if (res && res.length) this.push(res); + done(); + } catch (e) { + done(e); + } + }; + IconvLiteEncoderStream.prototype._flush = function(done) { + try { + var res = this.conv.end(); + if (res && res.length) this.push(res); + done(); + } catch (e) { + done(e); + } + }; + IconvLiteEncoderStream.prototype.collect = function(cb) { + var chunks = []; + this.on("error", cb); + this.on("data", function(chunk) { + chunks.push(chunk); + }); + this.on("end", function() { + cb(null, Buffer2.concat(chunks)); + }); + return this; + }; + function IconvLiteDecoderStream(conv, options) { + this.conv = conv; + options = options || {}; + options.encoding = this.encoding = "utf8"; + Transform.call(this, options); + } + IconvLiteDecoderStream.prototype = Object.create(Transform.prototype, { + constructor: { value: IconvLiteDecoderStream } + }); + IconvLiteDecoderStream.prototype._transform = function(chunk, encoding, done) { + if (!Buffer2.isBuffer(chunk) && !(chunk instanceof Uint8Array)) + return done(new Error("Iconv decoding stream needs buffers as its input.")); + try { + var res = this.conv.write(chunk); + if (res && res.length) this.push(res, this.encoding); + done(); + } catch (e) { + done(e); + } + }; + IconvLiteDecoderStream.prototype._flush = function(done) { + try { + var res = this.conv.end(); + if (res && res.length) this.push(res, this.encoding); + done(); + } catch (e) { + done(e); + } + }; + IconvLiteDecoderStream.prototype.collect = function(cb) { + var res = ""; + this.on("error", cb); + this.on("data", function(chunk) { + res += chunk; + }); + this.on("end", function() { + cb(null, res); + }); + return this; + }; + return { + IconvLiteEncoderStream, + IconvLiteDecoderStream + }; + }; + } +}); + +// ../../node_modules/iconv-lite/lib/index.js +var require_lib3 = __commonJS({ + "../../node_modules/iconv-lite/lib/index.js"(exports2, module2) { + "use strict"; + var Buffer2 = require_safer().Buffer; + var bomHandling = require_bom_handling(); + var iconv = module2.exports; + iconv.encodings = null; + iconv.defaultCharUnicode = "\uFFFD"; + iconv.defaultCharSingleByte = "?"; + iconv.encode = function encode(str, encoding, options) { + str = "" + (str || ""); + var encoder = iconv.getEncoder(encoding, options); + var res = encoder.write(str); + var trail = encoder.end(); + return trail && trail.length > 0 ? Buffer2.concat([res, trail]) : res; + }; + iconv.decode = function decode(buf, encoding, options) { + if (typeof buf === "string") { + if (!iconv.skipDecodeWarning) { + console.error("Iconv-lite warning: decode()-ing strings is deprecated. Refer to https://github.com/ashtuchkin/iconv-lite/wiki/Use-Buffers-when-decoding"); + iconv.skipDecodeWarning = true; + } + buf = Buffer2.from("" + (buf || ""), "binary"); + } + var decoder = iconv.getDecoder(encoding, options); + var res = decoder.write(buf); + var trail = decoder.end(); + return trail ? res + trail : res; + }; + iconv.encodingExists = function encodingExists(enc) { + try { + iconv.getCodec(enc); + return true; + } catch (e) { + return false; + } + }; + iconv.toEncoding = iconv.encode; + iconv.fromEncoding = iconv.decode; + iconv._codecDataCache = {}; + iconv.getCodec = function getCodec(encoding) { + if (!iconv.encodings) + iconv.encodings = require_encodings(); + var enc = iconv._canonicalizeEncoding(encoding); + var codecOptions = {}; + while (true) { + var codec = iconv._codecDataCache[enc]; + if (codec) + return codec; + var codecDef = iconv.encodings[enc]; + switch (typeof codecDef) { + case "string": + enc = codecDef; + break; + case "object": + for (var key in codecDef) + codecOptions[key] = codecDef[key]; + if (!codecOptions.encodingName) + codecOptions.encodingName = enc; + enc = codecDef.type; + break; + case "function": + if (!codecOptions.encodingName) + codecOptions.encodingName = enc; + codec = new codecDef(codecOptions, iconv); + iconv._codecDataCache[codecOptions.encodingName] = codec; + return codec; + default: + throw new Error("Encoding not recognized: '" + encoding + "' (searched as: '" + enc + "')"); + } + } + }; + iconv._canonicalizeEncoding = function(encoding) { + return ("" + encoding).toLowerCase().replace(/:\d{4}$|[^0-9a-z]/g, ""); + }; + iconv.getEncoder = function getEncoder(encoding, options) { + var codec = iconv.getCodec(encoding), encoder = new codec.encoder(options, codec); + if (codec.bomAware && options && options.addBOM) + encoder = new bomHandling.PrependBOM(encoder, options); + return encoder; + }; + iconv.getDecoder = function getDecoder(encoding, options) { + var codec = iconv.getCodec(encoding), decoder = new codec.decoder(options, codec); + if (codec.bomAware && !(options && options.stripBOM === false)) + decoder = new bomHandling.StripBOM(decoder, options); + return decoder; + }; + iconv.enableStreamingAPI = function enableStreamingAPI(stream_module2) { + if (iconv.supportsStreams) + return; + var streams = require_streams()(stream_module2); + iconv.IconvLiteEncoderStream = streams.IconvLiteEncoderStream; + iconv.IconvLiteDecoderStream = streams.IconvLiteDecoderStream; + iconv.encodeStream = function encodeStream(encoding, options) { + return new iconv.IconvLiteEncoderStream(iconv.getEncoder(encoding, options), options); + }; + iconv.decodeStream = function decodeStream(encoding, options) { + return new iconv.IconvLiteDecoderStream(iconv.getDecoder(encoding, options), options); + }; + iconv.supportsStreams = true; + }; + var stream_module; + try { + stream_module = require("stream"); + } catch (e) { + } + if (stream_module && stream_module.Transform) { + iconv.enableStreamingAPI(stream_module); + } else { + iconv.encodeStream = iconv.decodeStream = function() { + throw new Error("iconv-lite Streaming API is not enabled. Use iconv.enableStreamingAPI(require('stream')); to enable it."); + }; + } + if (false) { + console.error("iconv-lite warning: js files use non-utf8 encoding. See https://github.com/ashtuchkin/iconv-lite/wiki/Javascript-source-file-encodings for more info."); + } + } +}); + +// ../../node_modules/postman-collection/lib/util.js +var require_util2 = __commonJS({ + "../../node_modules/postman-collection/lib/util.js"(exports2, module2) { + var _2 = require_lodash().noConflict(); + var iconvlite = require_lib3(); + var util; + var ASCII_SOURCE = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; + var ASCII_SOURCE_LENGTH = ASCII_SOURCE.length; + var EMPTY = ""; + _2.mixin( + /** @lends util */ + { + /** + * Creates an inheritance relation between the child and the parent, adding a 'super_' attribute to the + * child, and setting up the child prototype. + * + * @param {Function} child - The target object to create parent references for,. + * @param {Function} base - The parent association to assign to the provided child definition. + * @returns {*} + */ + inherit(child, base) { + Object.defineProperty(child, "super_", { + value: _2.isFunction(base) ? base : _2.noop, + configurable: false, + enumerable: false, + writable: false + }); + child.prototype = Object.create(_2.isFunction(base) ? base.prototype : base, { + constructor: { + value: child, + enumerable: false, + writable: true, + configurable: true + } + }); + return child; + }, + /** + * Creates an array from a Javascript "arguments" object. + * https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Functions/arguments + * + * @param {Array} args - + * @returns {Array.} + */ + args(args) { + return Array.prototype.slice.call(args); + }, + /** + * Makes sure the given string is encoded only once. + * + * @param {String} string - + * @returns {String} + */ + ensureEncoded(string) { + try { + string = decodeURIComponent(string); + } catch (e) { + } + try { + return encodeURIComponent(string); + } catch (error) { + return string; + } + }, + /** + * Creates a locked property on an object, which is not writable or enumerable. + * + * @param {Object} obj - + * @param {String} name - + * @param {*} prop - + * @returns {*} + */ + assignLocked(obj, name, prop) { + Object.defineProperty(obj, name, { + value: prop, + configurable: false, + enumerable: false, + writable: false + }); + return obj; + }, + /** + * Creates a hidden property on an object, which can be changed, but is not enumerable. + * + * @param {Object} obj - + * @param {String} name - + * @param {*} prop - + * @returns {*} + */ + assignHidden(obj, name, prop) { + Object.defineProperty(obj, name, { + value: prop, + configurable: true, + enumerable: false, + writable: true + }); + return obj; + }, + /** + * Creates a property on an object, with the given type. + * + * @param {Object} obj - + * @param {String} name - + * @param {Property} Prop - + * @param {*} [fallback] - + * @returns {Prop|undefined} + */ + createDefined(obj, name, Prop, fallback) { + return _2.has(obj, name) ? new Prop(obj[name]) : fallback; + }, + /** + * Merges defined keys from the target object onto the source object. + * + * @param {Object} target - + * @param {Object} source - + * @returns {Object} + */ + mergeDefined(target, source) { + var key; + for (key in source) { + if (_2.has(source, key) && !_2.isUndefined(source[key])) { + target[key] = source[key]; + } + } + return target; + }, + /** + * Returns the value of a property if defined in object, else the default + * + * @param {Object} obj - + * @param {String} prop - + * @param {*=} def - + * + * @returns {*} + */ + getOwn(obj, prop, def) { + return _2.has(obj, prop) ? obj[prop] : def; + }, + /** + * Creates a clone of an object, but uses the toJSON method if available. + * + * @param {Object} obj - + * @returns {*} + */ + cloneElement(obj) { + return _2.cloneDeepWith(obj, function(value) { + if (value && _2.isFunction(value.toJSON)) { + return value.toJSON(); + } + }); + }, + /** + * Returns the match of a value of a property by traversing the prototype + * + * @param {Object} obj - + * @param {String} key - + * @param {*} value - + * + * @returns {Boolean} + */ + inSuperChain(obj, key, value) { + return obj ? obj[key] === value || _2.inSuperChain(obj.super_, key, value) : false; + }, + /** + * Generates a random string of given length (useful for nonce generation, etc). + * + * @param {Number} length - + */ + randomString(length) { + length = length || 6; + var result = [], i; + for (i = 0; i < length; i++) { + result[i] = ASCII_SOURCE[Math.random() * ASCII_SOURCE_LENGTH | 0]; + } + return result.join(EMPTY); + }, + choose() { + for (var i = 0, ii = arguments.length; i < ii; i++) { + if (!_2.isEmpty(arguments[i])) { + return arguments[i]; + } + } + } + } + ); + util = { + lodash: _2, + /** + * + * @param {String} data - + * @returns {String} [description] + */ + btoa: ( + /* istanbul ignore next */ + typeof btoa !== "function" && typeof Buffer === "function" ? function(data) { + return Buffer.from(data).toString("base64"); + } : function(data) { + return btoa(data); + } + ), + // @todo use browserify to normalise this + /** + * ArrayBuffer to String + * + * @param {ArrayBuffer} buffer - + * @returns {String} + */ + arrayBufferToString: function(buffer) { + var str = "", uArrayVal = new Uint8Array(buffer), i, ii; + for (i = 0, ii = uArrayVal.length; i < ii; i++) { + str += String.fromCharCode(uArrayVal[i]); + } + return str; + }, + bufferOrArrayBufferToString: function(buffer, charset) { + if (!buffer || _2.isString(buffer)) { + return buffer || ""; + } + if (Buffer.isBuffer(buffer)) { + if (iconvlite.encodingExists(charset)) { + return iconvlite.decode(buffer, charset); + } + return buffer.toString(); + } + return util.arrayBufferToString(buffer); + }, + bufferOrArrayBufferToBase64: function(buffer) { + if (!buffer) { + return ""; + } + if (_2.isString(buffer)) { + return util.btoa(buffer); + } + var base64 = buffer.toString("base64") || ""; + if (base64 === "[object ArrayBuffer]") { + return util.btoa(util.arrayBufferToString(buffer)); + } + return base64; + }, + /** + * Check whether a value is number-like + * https://github.com/lodash/lodash/issues/1148#issuecomment-141139153 + * + * @param {*} n - The candidate to be checked for numeric compliance. + * @returns {Boolean} + */ + isNumeric: function(n) { + return !isNaN(parseFloat(n)) && isFinite(n); + } + }; + module2.exports = util; + } +}); + +// ../../node_modules/uuid/dist/esm-node/rng.js +function rng() { + if (poolPtr > rnds8Pool.length - 16) { + import_crypto.default.randomFillSync(rnds8Pool); + poolPtr = 0; + } + return rnds8Pool.slice(poolPtr, poolPtr += 16); +} +var import_crypto, rnds8Pool, poolPtr; +var init_rng = __esm({ + "../../node_modules/uuid/dist/esm-node/rng.js"() { + import_crypto = __toESM(require("crypto")); + rnds8Pool = new Uint8Array(256); + poolPtr = rnds8Pool.length; + } +}); + +// ../../node_modules/uuid/dist/esm-node/regex.js +var regex_default; +var init_regex = __esm({ + "../../node_modules/uuid/dist/esm-node/regex.js"() { + regex_default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; + } +}); + +// ../../node_modules/uuid/dist/esm-node/validate.js +function validate(uuid) { + return typeof uuid === "string" && regex_default.test(uuid); +} +var validate_default; +var init_validate = __esm({ + "../../node_modules/uuid/dist/esm-node/validate.js"() { + init_regex(); + validate_default = validate; + } +}); + +// ../../node_modules/uuid/dist/esm-node/stringify.js +function stringify(arr, offset = 0) { + const uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); + if (!validate_default(uuid)) { + throw TypeError("Stringified UUID is invalid"); + } + return uuid; +} +var byteToHex, stringify_default; +var init_stringify = __esm({ + "../../node_modules/uuid/dist/esm-node/stringify.js"() { + init_validate(); + byteToHex = []; + for (let i = 0; i < 256; ++i) { + byteToHex.push((i + 256).toString(16).substr(1)); + } + stringify_default = stringify; + } +}); + +// ../../node_modules/uuid/dist/esm-node/v1.js +function v1(options, buf, offset) { + let i = buf && offset || 0; + const b = buf || new Array(16); + options = options || {}; + let node = options.node || _nodeId; + let clockseq = options.clockseq !== void 0 ? options.clockseq : _clockseq; + if (node == null || clockseq == null) { + const seedBytes = options.random || (options.rng || rng)(); + if (node == null) { + node = _nodeId = [seedBytes[0] | 1, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]]; + } + if (clockseq == null) { + clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 16383; + } + } + let msecs = options.msecs !== void 0 ? options.msecs : Date.now(); + let nsecs = options.nsecs !== void 0 ? options.nsecs : _lastNSecs + 1; + const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 1e4; + if (dt < 0 && options.clockseq === void 0) { + clockseq = clockseq + 1 & 16383; + } + if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === void 0) { + nsecs = 0; + } + if (nsecs >= 1e4) { + throw new Error("uuid.v1(): Can't create more than 10M uuids/sec"); + } + _lastMSecs = msecs; + _lastNSecs = nsecs; + _clockseq = clockseq; + msecs += 122192928e5; + const tl = ((msecs & 268435455) * 1e4 + nsecs) % 4294967296; + b[i++] = tl >>> 24 & 255; + b[i++] = tl >>> 16 & 255; + b[i++] = tl >>> 8 & 255; + b[i++] = tl & 255; + const tmh = msecs / 4294967296 * 1e4 & 268435455; + b[i++] = tmh >>> 8 & 255; + b[i++] = tmh & 255; + b[i++] = tmh >>> 24 & 15 | 16; + b[i++] = tmh >>> 16 & 255; + b[i++] = clockseq >>> 8 | 128; + b[i++] = clockseq & 255; + for (let n = 0; n < 6; ++n) { + b[i + n] = node[n]; + } + return buf || stringify_default(b); +} +var _nodeId, _clockseq, _lastMSecs, _lastNSecs, v1_default; +var init_v1 = __esm({ + "../../node_modules/uuid/dist/esm-node/v1.js"() { + init_rng(); + init_stringify(); + _lastMSecs = 0; + _lastNSecs = 0; + v1_default = v1; + } +}); + +// ../../node_modules/uuid/dist/esm-node/parse.js +function parse(uuid) { + if (!validate_default(uuid)) { + throw TypeError("Invalid UUID"); + } + let v; + const arr = new Uint8Array(16); + arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24; + arr[1] = v >>> 16 & 255; + arr[2] = v >>> 8 & 255; + arr[3] = v & 255; + arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8; + arr[5] = v & 255; + arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8; + arr[7] = v & 255; + arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8; + arr[9] = v & 255; + arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 1099511627776 & 255; + arr[11] = v / 4294967296 & 255; + arr[12] = v >>> 24 & 255; + arr[13] = v >>> 16 & 255; + arr[14] = v >>> 8 & 255; + arr[15] = v & 255; + return arr; +} +var parse_default; +var init_parse = __esm({ + "../../node_modules/uuid/dist/esm-node/parse.js"() { + init_validate(); + parse_default = parse; + } +}); + +// ../../node_modules/uuid/dist/esm-node/v35.js +function stringToBytes(str) { + str = unescape(encodeURIComponent(str)); + const bytes = []; + for (let i = 0; i < str.length; ++i) { + bytes.push(str.charCodeAt(i)); + } + return bytes; +} +function v35_default(name, version2, hashfunc) { + function generateUUID(value, namespace, buf, offset) { + if (typeof value === "string") { + value = stringToBytes(value); + } + if (typeof namespace === "string") { + namespace = parse_default(namespace); + } + if (namespace.length !== 16) { + throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)"); + } + let bytes = new Uint8Array(16 + value.length); + bytes.set(namespace); + bytes.set(value, namespace.length); + bytes = hashfunc(bytes); + bytes[6] = bytes[6] & 15 | version2; + bytes[8] = bytes[8] & 63 | 128; + if (buf) { + offset = offset || 0; + for (let i = 0; i < 16; ++i) { + buf[offset + i] = bytes[i]; + } + return buf; + } + return stringify_default(bytes); + } + try { + generateUUID.name = name; + } catch (err) { + } + generateUUID.DNS = DNS; + generateUUID.URL = URL2; + return generateUUID; +} +var DNS, URL2; +var init_v35 = __esm({ + "../../node_modules/uuid/dist/esm-node/v35.js"() { + init_stringify(); + init_parse(); + DNS = "6ba7b810-9dad-11d1-80b4-00c04fd430c8"; + URL2 = "6ba7b811-9dad-11d1-80b4-00c04fd430c8"; + } +}); + +// ../../node_modules/uuid/dist/esm-node/md5.js +function md5(bytes) { + if (Array.isArray(bytes)) { + bytes = Buffer.from(bytes); + } else if (typeof bytes === "string") { + bytes = Buffer.from(bytes, "utf8"); + } + return import_crypto2.default.createHash("md5").update(bytes).digest(); +} +var import_crypto2, md5_default; +var init_md5 = __esm({ + "../../node_modules/uuid/dist/esm-node/md5.js"() { + import_crypto2 = __toESM(require("crypto")); + md5_default = md5; + } +}); + +// ../../node_modules/uuid/dist/esm-node/v3.js +var v3, v3_default; +var init_v3 = __esm({ + "../../node_modules/uuid/dist/esm-node/v3.js"() { + init_v35(); + init_md5(); + v3 = v35_default("v3", 48, md5_default); + v3_default = v3; + } +}); + +// ../../node_modules/uuid/dist/esm-node/v4.js +function v4(options, buf, offset) { + options = options || {}; + const rnds = options.random || (options.rng || rng)(); + rnds[6] = rnds[6] & 15 | 64; + rnds[8] = rnds[8] & 63 | 128; + if (buf) { + offset = offset || 0; + for (let i = 0; i < 16; ++i) { + buf[offset + i] = rnds[i]; + } + return buf; + } + return stringify_default(rnds); +} +var v4_default; +var init_v4 = __esm({ + "../../node_modules/uuid/dist/esm-node/v4.js"() { + init_rng(); + init_stringify(); + v4_default = v4; + } +}); + +// ../../node_modules/uuid/dist/esm-node/sha1.js +function sha1(bytes) { + if (Array.isArray(bytes)) { + bytes = Buffer.from(bytes); + } else if (typeof bytes === "string") { + bytes = Buffer.from(bytes, "utf8"); + } + return import_crypto3.default.createHash("sha1").update(bytes).digest(); +} +var import_crypto3, sha1_default; +var init_sha1 = __esm({ + "../../node_modules/uuid/dist/esm-node/sha1.js"() { + import_crypto3 = __toESM(require("crypto")); + sha1_default = sha1; + } +}); + +// ../../node_modules/uuid/dist/esm-node/v5.js +var v5, v5_default; +var init_v5 = __esm({ + "../../node_modules/uuid/dist/esm-node/v5.js"() { + init_v35(); + init_sha1(); + v5 = v35_default("v5", 80, sha1_default); + v5_default = v5; + } +}); + +// ../../node_modules/uuid/dist/esm-node/nil.js +var nil_default; +var init_nil = __esm({ + "../../node_modules/uuid/dist/esm-node/nil.js"() { + nil_default = "00000000-0000-0000-0000-000000000000"; + } +}); + +// ../../node_modules/uuid/dist/esm-node/version.js +function version(uuid) { + if (!validate_default(uuid)) { + throw TypeError("Invalid UUID"); + } + return parseInt(uuid.substr(14, 1), 16); +} +var version_default; +var init_version = __esm({ + "../../node_modules/uuid/dist/esm-node/version.js"() { + init_validate(); + version_default = version; + } +}); + +// ../../node_modules/uuid/dist/esm-node/index.js +var esm_node_exports = {}; +__export(esm_node_exports, { + NIL: () => nil_default, + parse: () => parse_default, + stringify: () => stringify_default, + v1: () => v1_default, + v3: () => v3_default, + v4: () => v4_default, + v5: () => v5_default, + validate: () => validate_default, + version: () => version_default +}); +var init_esm_node = __esm({ + "../../node_modules/uuid/dist/esm-node/index.js"() { + init_v1(); + init_v3(); + init_v4(); + init_v5(); + init_nil(); + init_version(); + init_validate(); + init_stringify(); + init_parse(); + } +}); + +// ../../node_modules/postman-collection/lib/collection/property-base.js +var require_property_base = __commonJS({ + "../../node_modules/postman-collection/lib/collection/property-base.js"(exports2, module2) { + var _2 = require_util2().lodash; + var __PARENT = "__parent"; + var PropertyBase; + PropertyBase = function PropertyBase2(definition) { + if (!definition || typeof definition === "string") { + return; + } + var src = definition && definition.info || definition, meta = _2(src).pickBy(PropertyBase2.propertyIsMeta).mapKeys(PropertyBase2.propertyUnprefixMeta).value(); + if (_2.keys(meta).length) { + this._ = _2.isObject(this._) ? ( + /* istanbul ignore next */ + _2.mergeDefined(this._, meta) + ) : meta; + } + }; + _2.assign( + PropertyBase.prototype, + /** @lends PropertyBase.prototype */ + { + /** + * Invokes the given iterator for every parent in the parent chain of the given element. + * + * @param {Object} options - A set of options for the parent chain traversal. + * @param {?Boolean} [options.withRoot=false] - Set to true to include the collection object as well. + * @param {Function} iterator - The function to call for every parent in the ancestry chain. + * @todo Cache the results + */ + forEachParent(options, iterator) { + _2.isFunction(options) && (iterator = options, options = {}); + if (!_2.isFunction(iterator) || !_2.isObject(options)) { + return; + } + var parent = this.parent(), grandparent = parent && _2.isFunction(parent.parent) && parent.parent(); + while (parent && (grandparent || options.withRoot)) { + iterator(parent); + parent = grandparent; + grandparent = grandparent && _2.isFunction(grandparent.parent) && grandparent.parent(); + } + }, + /** + * Tries to find the given property locally, and then proceeds to lookup in each parent, + * going up the chain as necessary. Lookup will continue until `customizer` returns a truthy value. If used + * without a customizer, the lookup will stop at the first parent that contains the property. + * + * @param {String} property - + * @param {Function} [customizer] - + * @returns {*|undefined} + */ + findInParents(property, customizer) { + var owner = this.findParentContaining(property, customizer); + return owner ? owner[property] : void 0; + }, + /** + * Looks up the closest parent which has a truthy value for the given property. Lookup will continue + * until `customizer` returns a truthy value. If used without a customizer, + * the lookup will stop at the first parent that contains the property. + * + * @private + * @param {String} property - + * @param {Function} [customizer] - + * @returns {PropertyBase|undefined} + */ + findParentContaining(property, customizer) { + var parent = this; + if (customizer) { + customizer = customizer.bind(this); + do { + if (customizer(parent)) { + return parent; + } + parent = parent.__parent; + } while (parent); + } else { + do { + if (parent[property]) { + return parent; + } + parent = parent.__parent; + } while (parent); + } + }, + /** + * Returns the JSON representation of a property, which conforms to the way it is defined in a collection. + * You can use this method to get the instantaneous representation of any property, including a {@link Collection}. + */ + toJSON() { + return _2.reduce(this, function(accumulator, value, key) { + if (value === void 0) { + return accumulator; + } + if (value && value._postman_propertyIsList && !value._postman_proprtyIsSerialisedAsPlural && _2.endsWith(key, "s")) { + key = key.slice(0, -1); + } + if (value && _2.isFunction(value.toJSON)) { + accumulator[key] = value.toJSON(); + return accumulator; + } + if (_2.isString(value)) { + accumulator[key] = value; + return accumulator; + } + accumulator[key] = _2.cloneElement(value); + return accumulator; + }, {}); + }, + /** + * Returns the meta keys associated with the property + * + * @returns {*} + */ + meta() { + return arguments.length ? _2.pick(this._, Array.prototype.slice.apply(arguments)) : _2.cloneDeep(this._); + }, + /** + * Returns the parent of item + * + * @returns {*|undefined} + */ + parent() { + return this && this.__parent && (this.__parent.__parent || this.__parent) || void 0; + }, + /** + * Accepts an object and sets it as the parent of the current property. + * + * @param {Object} parent The object to set as parent. + * @private + */ + setParent(parent) { + _2.assignHidden(this, __PARENT, parent); + } + } + ); + _2.assign( + PropertyBase, + /** @lends PropertyBase */ + { + /** + * Defines the name of this property for internal use. + * + * @private + * @readOnly + * @type {String} + */ + _postman_propertyName: "PropertyBase", + /** + * Filter function to check whether a key starts with underscore or not. These usually are the meta properties. It + * returns `true` if the criteria is matched. + * + * @param {*} value - + * @param {String} key - + * + * @returns {boolean} + */ + propertyIsMeta: function(value, key) { + return _2.startsWith(key, "_") && key !== "_"; + }, + /** + * Map function that removes the underscore prefix from an object key. + * + * @param {*} value - + * @param {String} key - + * @returns {String} + */ + propertyUnprefixMeta: function(value, key) { + return _2.trimStart(key, "_"); + }, + /** + * Static function which allows calling toJSON() on any object. + * + * @param {Object} obj - + * @returns {*} + */ + toJSON: function(obj) { + return PropertyBase.prototype.toJSON.call(obj); + } + } + ); + module2.exports = { + PropertyBase + }; + } +}); + +// ../../node_modules/postman-collection/lib/collection/description.js +var require_description = __commonJS({ + "../../node_modules/postman-collection/lib/collection/description.js"(exports2, module2) { + var _2 = require_util2().lodash; + var E = ""; + var DEFAULT_MIMETYPE = "text/plain"; + var Description; + Description = function PostmanPropertyDescription(definition) { + _2.isString(definition) && (definition = { + content: definition, + type: DEFAULT_MIMETYPE + }); + definition && this.update(definition); + }; + _2.assign( + Description.prototype, + /** @lends Description.prototype */ + { + /** + * Updates the content of this description property. + * + * @param {String|Description.definition} content - + * @param {String=} [type] - + * @todo parse version of description + */ + update(content, type) { + _2.isObject(content) && (type = content.type, content = content.content); + _2.assign( + this, + /** @lends Description.prototype */ + { + /** + * The raw content of the description + * + * @type {String} + */ + content, + /** + * The mime-type of the description. + * + * @type {String} + */ + type: type || DEFAULT_MIMETYPE + } + ); + }, + /** + * Returns stringified Description. + * + * @returns {String} + */ + toString() { + return this.content || E; + }, + /** + * Creates a JSON representation of the Description (as a plain Javascript object). + * + * @returns {{content: *, type: *, version: (String|*)}} + */ + toJSON() { + return { + content: this.content, + type: this.type + }; + } + } + ); + _2.assign( + Description, + /** @lends Description */ + { + /** + * Defines the name of this property for internal use. + * + * @private + * @readOnly + * @type {String} + */ + _postman_propertyName: "Description", + /** + * Checks whether a property is an instance of Description object. + * + * @param {*} obj - + * @returns {Boolean} + */ + isDescription: function(obj) { + return Boolean(obj) && (obj instanceof Description || _2.inSuperChain(obj.constructor, "_postman_propertyName", Description._postman_propertyName)); + } + } + ); + module2.exports = { + Description + }; + } +}); + +// ../../node_modules/@faker-js/faker/lib/fake.js +var require_fake = __commonJS({ + "../../node_modules/@faker-js/faker/lib/fake.js"(exports2, module2) { + function Fake(faker) { + this.fake = function fake(str) { + var res = ""; + if (typeof str !== "string" || str.length === 0) { + throw new Error("string parameter is required!"); + } + var start = str.search("{{"); + var end = str.search("}}"); + if (start === -1 && end === -1) { + return str; + } + var token = str.substr(start + 2, end - start - 2); + var method = token.replace("}}", "").replace("{{", ""); + var regExp = /\(([^)]+)\)/; + var matches = regExp.exec(method); + var parameters = ""; + if (matches) { + method = method.replace(regExp, ""); + parameters = matches[1]; + } + var parts = method.split("."); + if (typeof faker[parts[0]] === "undefined") { + throw new Error("Invalid module: " + parts[0]); + } + if (typeof faker[parts[0]][parts[1]] === "undefined") { + throw new Error("Invalid method: " + parts[0] + "." + parts[1]); + } + var fn = faker[parts[0]][parts[1]]; + var params; + try { + params = JSON.parse(parameters); + } catch (err) { + params = parameters; + } + var result; + if (typeof params === "string" && params.length === 0) { + result = fn.call(this); + } else { + result = fn.call(this, params); + } + res = str.replace("{{" + token + "}}", result); + return fake(res); + }; + return this; + } + module2["exports"] = Fake; + } +}); + +// ../../node_modules/@faker-js/faker/vendor/unique.js +var require_unique = __commonJS({ + "../../node_modules/@faker-js/faker/vendor/unique.js"(exports2, module2) { + var unique = {}; + var found = {}; + var exclude = []; + var currentIterations = 0; + var defaultCompare = function(obj, key) { + if (typeof obj[key] === "undefined") { + return -1; + } + return 0; + }; + unique.errorMessage = function(now, code, opts) { + console.error("error", code); + console.log("found", Object.keys(found).length, "unique entries before throwing error. \nretried:", currentIterations, "\ntotal time:", now - opts.startTime, "ms"); + throw new Error(code + " for uniqueness check \n\nMay not be able to generate any more unique values with current settings. \nTry adjusting maxTime or maxRetries parameters for faker.unique()"); + }; + unique.exec = function(method, args, opts) { + var now = (/* @__PURE__ */ new Date()).getTime(); + opts = opts || {}; + opts.maxTime = opts.maxTime || 3; + opts.maxRetries = opts.maxRetries || 50; + opts.exclude = opts.exclude || exclude; + opts.compare = opts.compare || defaultCompare; + if (typeof opts.currentIterations !== "number") { + opts.currentIterations = 0; + } + if (typeof opts.startTime === "undefined") { + opts.startTime = (/* @__PURE__ */ new Date()).getTime(); + } + var startTime = opts.startTime; + if (typeof opts.exclude === "string") { + opts.exclude = [opts.exclude]; + } + if (opts.currentIterations > 0) { + } + if (now - startTime >= opts.maxTime) { + return unique.errorMessage(now, "Exceeded maxTime:" + opts.maxTime, opts); + } + if (opts.currentIterations >= opts.maxRetries) { + return unique.errorMessage(now, "Exceeded maxRetries:" + opts.maxRetries, opts); + } + var result = method.apply(this, args); + if (opts.compare(found, result) === -1 && opts.exclude.indexOf(result) === -1) { + found[result] = result; + opts.currentIterations = 0; + return result; + } else { + opts.currentIterations++; + return unique.exec(method, args, opts); + } + }; + module2.exports = unique; + } +}); + +// ../../node_modules/@faker-js/faker/lib/unique.js +var require_unique2 = __commonJS({ + "../../node_modules/@faker-js/faker/lib/unique.js"(exports2, module2) { + var uniqueExec = require_unique(); + function Unique(faker) { + var maxTime = 10; + var maxRetries = 10; + this.unique = function unique(method, args, opts) { + opts = opts || {}; + opts.startTime = (/* @__PURE__ */ new Date()).getTime(); + if (typeof opts.maxTime !== "number") { + opts.maxTime = maxTime; + } + if (typeof opts.maxRetries !== "number") { + opts.maxRetries = maxRetries; + } + opts.currentIterations = 0; + return uniqueExec.exec(method, args, opts); + }; + } + module2["exports"] = Unique; + } +}); + +// ../../node_modules/@faker-js/faker/vendor/mersenne.js +var require_mersenne = __commonJS({ + "../../node_modules/@faker-js/faker/vendor/mersenne.js"(exports2) { + function MersenneTwister19937() { + var N, M, MATRIX_A, UPPER_MASK, LOWER_MASK; + N = 624; + M = 397; + MATRIX_A = 2567483615; + UPPER_MASK = 2147483648; + LOWER_MASK = 2147483647; + var mt = new Array(N); + var mti = N + 1; + function unsigned32(n1) { + return n1 < 0 ? (n1 ^ UPPER_MASK) + UPPER_MASK : n1; + } + function subtraction32(n1, n2) { + return n1 < n2 ? unsigned32(4294967296 - (n2 - n1) & 4294967295) : n1 - n2; + } + function addition32(n1, n2) { + return unsigned32(n1 + n2 & 4294967295); + } + function multiplication32(n1, n2) { + var sum = 0; + for (var i = 0; i < 32; ++i) { + if (n1 >>> i & 1) { + sum = addition32(sum, unsigned32(n2 << i)); + } + } + return sum; + } + this.init_genrand = function(s) { + mt[0] = unsigned32(s & 4294967295); + for (mti = 1; mti < N; mti++) { + mt[mti] = //c//(1812433253 * (mt[mti-1] ^ (mt[mti-1] >> 30)) + mti); + addition32(multiplication32(1812433253, unsigned32(mt[mti - 1] ^ mt[mti - 1] >>> 30)), mti); + mt[mti] = unsigned32(mt[mti] & 4294967295); + } + }; + this.init_by_array = function(init_key, key_length) { + var i, j, k; + this.init_genrand(19650218); + i = 1; + j = 0; + k = N > key_length ? N : key_length; + for (; k; k--) { + mt[i] = addition32(addition32(unsigned32(mt[i] ^ multiplication32(unsigned32(mt[i - 1] ^ mt[i - 1] >>> 30), 1664525)), init_key[j]), j); + mt[i] = //c//mt[i] &= 0xffffffff; /* for WORDSIZE > 32 machines */ + unsigned32(mt[i] & 4294967295); + i++; + j++; + if (i >= N) { + mt[0] = mt[N - 1]; + i = 1; + } + if (j >= key_length) { + j = 0; + } + } + for (k = N - 1; k; k--) { + mt[i] = subtraction32(unsigned32((dbg = mt[i]) ^ multiplication32(unsigned32(mt[i - 1] ^ mt[i - 1] >>> 30), 1566083941)), i); + mt[i] = unsigned32(mt[i] & 4294967295); + i++; + if (i >= N) { + mt[0] = mt[N - 1]; + i = 1; + } + } + mt[0] = 2147483648; + }; + var mag01 = [0, MATRIX_A]; + this.genrand_int32 = function() { + var y; + if (mti >= N) { + var kk; + if (mti == N + 1) { + this.init_genrand(5489); + } + for (kk = 0; kk < N - M; kk++) { + y = unsigned32(mt[kk] & UPPER_MASK | mt[kk + 1] & LOWER_MASK); + mt[kk] = unsigned32(mt[kk + M] ^ y >>> 1 ^ mag01[y & 1]); + } + for (; kk < N - 1; kk++) { + y = unsigned32(mt[kk] & UPPER_MASK | mt[kk + 1] & LOWER_MASK); + mt[kk] = unsigned32(mt[kk + (M - N)] ^ y >>> 1 ^ mag01[y & 1]); + } + y = unsigned32(mt[N - 1] & UPPER_MASK | mt[0] & LOWER_MASK); + mt[N - 1] = unsigned32(mt[M - 1] ^ y >>> 1 ^ mag01[y & 1]); + mti = 0; + } + y = mt[mti++]; + y = unsigned32(y ^ y >>> 11); + y = unsigned32(y ^ y << 7 & 2636928640); + y = unsigned32(y ^ y << 15 & 4022730752); + y = unsigned32(y ^ y >>> 18); + return y; + }; + this.genrand_int31 = function() { + return this.genrand_int32() >>> 1; + }; + this.genrand_real1 = function() { + return this.genrand_int32() * (1 / 4294967295); + }; + this.genrand_real2 = function() { + return this.genrand_int32() * (1 / 4294967296); + }; + this.genrand_real3 = function() { + return (this.genrand_int32() + 0.5) * (1 / 4294967296); + }; + this.genrand_res53 = function() { + var a = this.genrand_int32() >>> 5, b = this.genrand_int32() >>> 6; + return (a * 67108864 + b) * (1 / 9007199254740992); + }; + } + exports2.MersenneTwister19937 = MersenneTwister19937; + } +}); + +// ../../node_modules/@faker-js/faker/lib/mersenne.js +var require_mersenne2 = __commonJS({ + "../../node_modules/@faker-js/faker/lib/mersenne.js"(exports2, module2) { + var Gen = require_mersenne().MersenneTwister19937; + function Mersenne() { + var gen = new Gen(); + gen.init_genrand((/* @__PURE__ */ new Date()).getTime() % 1e9); + this.rand = function(max, min) { + if (max === void 0) { + min = 0; + max = 32768; + } + return Math.floor(gen.genrand_real2() * (max - min) + min); + }; + this.seed = function(S) { + if (typeof S != "number") { + throw new Error("seed(S) must take numeric argument; is " + typeof S); + } + gen.init_genrand(S); + }; + this.seed_array = function(A) { + if (typeof A != "object") { + throw new Error("seed_array(A) must take array of numbers; is " + typeof A); + } + gen.init_by_array(A, A.length); + }; + } + module2.exports = Mersenne; + } +}); + +// ../../node_modules/@faker-js/faker/lib/random.js +var require_random = __commonJS({ + "../../node_modules/@faker-js/faker/lib/random.js"(exports2, module2) { + var arrayRemove = function(arr, values) { + values.forEach(function(value) { + arr = arr.filter(function(ele) { + return ele !== value; + }); + }); + return arr; + }; + function Random(faker, seed) { + if (Array.isArray(seed) && seed.length) { + faker.mersenne.seed_array(seed); + } else if (!isNaN(seed)) { + faker.mersenne.seed(seed); + } + this.number = function(options) { + console.log("Deprecation Warning: faker.random.number is now located in faker.datatype.number"); + return faker.datatype.number(options); + }; + this.float = function(options) { + console.log("Deprecation Warning: faker.random.float is now located in faker.datatype.float"); + return faker.datatype.float(options); + }; + this.arrayElement = function(array) { + array = array || ["a", "b", "c"]; + var r = faker.datatype.number({ max: array.length - 1 }); + return array[r]; + }; + this.arrayElements = function(array, count) { + array = array || ["a", "b", "c"]; + if (typeof count !== "number") { + count = faker.datatype.number({ min: 1, max: array.length }); + } else if (count > array.length) { + count = array.length; + } else if (count < 0) { + count = 0; + } + var arrayCopy = array.slice(0); + var i = array.length; + var min = i - count; + var temp; + var index; + while (i-- > min) { + index = Math.floor((i + 1) * faker.datatype.float({ min: 0, max: 0.99 })); + temp = arrayCopy[index]; + arrayCopy[index] = arrayCopy[i]; + arrayCopy[i] = temp; + } + return arrayCopy.slice(min); + }; + this.objectElement = function(object, field) { + object = object || { "foo": "bar", "too": "car" }; + var array = Object.keys(object); + var key = faker.random.arrayElement(array); + return field === "key" ? key : object[key]; + }; + this.uuid = function() { + console.log("Deprecation Warning: faker.random.uuid is now located in faker.datatype.uuid"); + return faker.datatype.uuid(); + }; + this.boolean = function() { + console.log("Deprecation Warning: faker.random.boolean is now located in faker.datatype.boolean"); + return faker.datatype.boolean(); + }; + this.word = function randomWord(type) { + var wordMethods = [ + "commerce.department", + "commerce.productName", + "commerce.productAdjective", + "commerce.productMaterial", + "commerce.product", + "commerce.color", + "company.catchPhraseAdjective", + "company.catchPhraseDescriptor", + "company.catchPhraseNoun", + "company.bsAdjective", + "company.bsBuzz", + "company.bsNoun", + "address.streetSuffix", + "address.county", + "address.country", + "address.state", + "finance.accountName", + "finance.transactionType", + "finance.currencyName", + "hacker.noun", + "hacker.verb", + "hacker.adjective", + "hacker.ingverb", + "hacker.abbreviation", + "name.jobDescriptor", + "name.jobArea", + "name.jobType" + ]; + var randomWordMethod = faker.random.arrayElement(wordMethods); + var result = faker.fake("{{" + randomWordMethod + "}}"); + return faker.random.arrayElement(result.split(" ")); + }; + this.words = function randomWords(count) { + var words = []; + if (typeof count === "undefined") { + count = faker.datatype.number({ min: 1, max: 3 }); + } + for (var i = 0; i < count; i++) { + words.push(faker.random.word()); + } + return words.join(" "); + }; + this.image = function randomImage() { + return faker.image.image(); + }; + this.locale = function randomLocale() { + return faker.random.arrayElement(Object.keys(faker.locales)); + }; + this.alpha = function alpha(options) { + if (typeof options === "undefined") { + options = { + count: 1 + }; + } else if (typeof options === "number") { + options = { + count: options + }; + } else if (typeof options.count === "undefined") { + options.count = 1; + } + if (typeof options.upcase === "undefined") { + options.upcase = false; + } + if (typeof options.bannedChars === "undefined") { + options.bannedChars = []; + } + var wholeString = ""; + var charsArray = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"]; + if (options.bannedChars) { + charsArray = arrayRemove(charsArray, options.bannedChars); + } + for (var i = 0; i < options.count; i++) { + wholeString += faker.random.arrayElement(charsArray); + } + return options.upcase ? wholeString.toUpperCase() : wholeString; + }; + this.alphaNumeric = function alphaNumeric(count, options) { + if (typeof count === "undefined") { + count = 1; + } + if (typeof options === "undefined") { + options = {}; + } + if (typeof options.bannedChars === "undefined") { + options.bannedChars = []; + } + var wholeString = ""; + var charsArray = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"]; + if (options) { + if (options.bannedChars) { + charsArray = arrayRemove(charsArray, options.bannedChars); + } + } + for (var i = 0; i < count; i++) { + wholeString += faker.random.arrayElement(charsArray); + } + return wholeString; + }; + this.hexaDecimal = function hexaDecimal(count) { + console.log("Deprecation Warning: faker.random.hexaDecimal is now located in faker.datatype.hexaDecimal"); + return faker.datatype.hexaDecimal(count); + }; + return this; + } + module2["exports"] = Random; + } +}); + +// ../../node_modules/@faker-js/faker/lib/helpers.js +var require_helpers = __commonJS({ + "../../node_modules/@faker-js/faker/lib/helpers.js"(exports2, module2) { + var Helpers = function(faker) { + var self2 = this; + self2.randomize = function(array) { + array = array || ["a", "b", "c"]; + return faker.random.arrayElement(array); + }; + self2.slugify = function(string) { + string = string || ""; + return string.replace(/ /g, "-").replace(/[^\一-龠\ぁ-ゔ\ァ-ヴー\w\.\-]+/g, ""); + }; + self2.replaceSymbolWithNumber = function(string, symbol) { + string = string || ""; + if (symbol === void 0) { + symbol = "#"; + } + var str = ""; + for (var i = 0; i < string.length; i++) { + if (string.charAt(i) == symbol) { + str += faker.datatype.number(9); + } else if (string.charAt(i) == "!") { + str += faker.datatype.number({ min: 2, max: 9 }); + } else { + str += string.charAt(i); + } + } + return str; + }; + self2.replaceSymbols = function(string) { + string = string || ""; + var alpha = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"]; + var str = ""; + for (var i = 0; i < string.length; i++) { + if (string.charAt(i) == "#") { + str += faker.datatype.number(9); + } else if (string.charAt(i) == "?") { + str += faker.random.arrayElement(alpha); + } else if (string.charAt(i) == "*") { + str += faker.datatype.boolean() ? faker.random.arrayElement(alpha) : faker.datatype.number(9); + } else { + str += string.charAt(i); + } + } + return str; + }; + self2.replaceCreditCardSymbols = function(string, symbol) { + string = string || "6453-####-####-####-###L"; + symbol = symbol || "#"; + var getCheckBit = function(number) { + number.reverse(); + number = number.map(function(num, index) { + if (index % 2 === 0) { + num *= 2; + if (num > 9) { + num -= 9; + } + } + return num; + }); + var sum = number.reduce(function(prev, curr) { + return prev + curr; + }); + return sum % 10; + }; + string = faker.helpers.regexpStyleStringParse(string); + string = faker.helpers.replaceSymbolWithNumber(string, symbol); + var numberList = string.replace(/\D/g, "").split("").map(function(num) { + return parseInt(num); + }); + var checkNum = getCheckBit(numberList); + return string.replace("L", checkNum); + }; + self2.repeatString = function(string, num) { + if (typeof num === "undefined") { + num = 0; + } + var text = ""; + for (var i = 0; i < num; i++) { + text += string.toString(); + } + return text; + }; + self2.regexpStyleStringParse = function(string) { + string = string || ""; + var RANGE_REP_REG = /(.)\{(\d+)\,(\d+)\}/; + var REP_REG = /(.)\{(\d+)\}/; + var RANGE_REG = /\[(\d+)\-(\d+)\]/; + var min, max, tmp, repetitions; + var token = string.match(RANGE_REP_REG); + while (token !== null) { + min = parseInt(token[2]); + max = parseInt(token[3]); + if (min > max) { + tmp = max; + max = min; + min = tmp; + } + repetitions = faker.datatype.number({ min, max }); + string = string.slice(0, token.index) + faker.helpers.repeatString(token[1], repetitions) + string.slice(token.index + token[0].length); + token = string.match(RANGE_REP_REG); + } + token = string.match(REP_REG); + while (token !== null) { + repetitions = parseInt(token[2]); + string = string.slice(0, token.index) + faker.helpers.repeatString(token[1], repetitions) + string.slice(token.index + token[0].length); + token = string.match(REP_REG); + } + token = string.match(RANGE_REG); + while (token !== null) { + min = parseInt(token[1]); + max = parseInt(token[2]); + if (min > max) { + tmp = max; + max = min; + min = tmp; + } + string = string.slice(0, token.index) + faker.datatype.number({ min, max }).toString() + string.slice(token.index + token[0].length); + token = string.match(RANGE_REG); + } + return string; + }; + self2.shuffle = function(o) { + if (typeof o === "undefined" || o.length === 0) { + return o || []; + } + o = o || ["a", "b", "c"]; + for (var x, j, i = o.length - 1; i > 0; --i) { + j = faker.datatype.number(i); + x = o[i]; + o[i] = o[j]; + o[j] = x; + } + return o; + }; + self2.mustache = function(str, data) { + if (typeof str === "undefined") { + return ""; + } + for (var p in data) { + var re = new RegExp("{{" + p + "}}", "g"); + str = str.replace(re, data[p]); + } + return str; + }; + self2.createCard = function() { + return { + "name": faker.name.findName(), + "username": faker.internet.userName(), + "email": faker.internet.email(), + "address": { + "streetA": faker.address.streetName(), + "streetB": faker.address.streetAddress(), + "streetC": faker.address.streetAddress(true), + "streetD": faker.address.secondaryAddress(), + "city": faker.address.city(), + "state": faker.address.state(), + "country": faker.address.country(), + "zipcode": faker.address.zipCode(), + "geo": { + "lat": faker.address.latitude(), + "lng": faker.address.longitude() + } + }, + "phone": faker.phone.phoneNumber(), + "website": faker.internet.domainName(), + "company": { + "name": faker.company.companyName(), + "catchPhrase": faker.company.catchPhrase(), + "bs": faker.company.bs() + }, + "posts": [ + { + "words": faker.lorem.words(), + "sentence": faker.lorem.sentence(), + "sentences": faker.lorem.sentences(), + "paragraph": faker.lorem.paragraph() + }, + { + "words": faker.lorem.words(), + "sentence": faker.lorem.sentence(), + "sentences": faker.lorem.sentences(), + "paragraph": faker.lorem.paragraph() + }, + { + "words": faker.lorem.words(), + "sentence": faker.lorem.sentence(), + "sentences": faker.lorem.sentences(), + "paragraph": faker.lorem.paragraph() + } + ], + "accountHistory": [faker.helpers.createTransaction(), faker.helpers.createTransaction(), faker.helpers.createTransaction()] + }; + }; + self2.contextualCard = function() { + var name = faker.name.firstName(), userName = faker.internet.userName(name); + return { + "name": name, + "username": userName, + "avatar": faker.internet.avatar(), + "email": faker.internet.email(userName), + "dob": faker.date.past(50, /* @__PURE__ */ new Date("Sat Sep 20 1992 21:35:02 GMT+0200 (CEST)")), + "phone": faker.phone.phoneNumber(), + "address": { + "street": faker.address.streetName(true), + "suite": faker.address.secondaryAddress(), + "city": faker.address.city(), + "zipcode": faker.address.zipCode(), + "geo": { + "lat": faker.address.latitude(), + "lng": faker.address.longitude() + } + }, + "website": faker.internet.domainName(), + "company": { + "name": faker.company.companyName(), + "catchPhrase": faker.company.catchPhrase(), + "bs": faker.company.bs() + } + }; + }; + self2.userCard = function() { + return { + "name": faker.name.findName(), + "username": faker.internet.userName(), + "email": faker.internet.email(), + "address": { + "street": faker.address.streetName(true), + "suite": faker.address.secondaryAddress(), + "city": faker.address.city(), + "zipcode": faker.address.zipCode(), + "geo": { + "lat": faker.address.latitude(), + "lng": faker.address.longitude() + } + }, + "phone": faker.phone.phoneNumber(), + "website": faker.internet.domainName(), + "company": { + "name": faker.company.companyName(), + "catchPhrase": faker.company.catchPhrase(), + "bs": faker.company.bs() + } + }; + }; + self2.createTransaction = function() { + return { + "amount": faker.finance.amount(), + "date": new Date(2012, 1, 2), + //TODO: add a ranged date method + "business": faker.company.companyName(), + "name": [faker.finance.accountName(), faker.finance.mask()].join(" "), + "type": self2.randomize(faker.definitions.finance.transaction_type), + "account": faker.finance.account() + }; + }; + return self2; + }; + module2["exports"] = Helpers; + } +}); + +// ../../node_modules/@faker-js/faker/lib/name.js +var require_name = __commonJS({ + "../../node_modules/@faker-js/faker/lib/name.js"(exports2, module2) { + function Name(faker) { + this.firstName = function(gender) { + if (typeof faker.definitions.name.male_first_name !== "undefined" && typeof faker.definitions.name.female_first_name !== "undefined") { + if (typeof gender === "string") { + if (gender.toLowerCase() === "male") { + gender = 0; + } else if (gender.toLowerCase() === "female") { + gender = 1; + } + } + if (typeof gender !== "number") { + if (typeof faker.definitions.name.first_name === "undefined") { + gender = faker.datatype.number(1); + } else { + return faker.random.arrayElement(faker.definitions.name.first_name); + } + } + if (gender === 0) { + return faker.random.arrayElement(faker.definitions.name.male_first_name); + } else { + return faker.random.arrayElement(faker.definitions.name.female_first_name); + } + } + return faker.random.arrayElement(faker.definitions.name.first_name); + }; + this.lastName = function(gender) { + if (typeof faker.definitions.name.male_last_name !== "undefined" && typeof faker.definitions.name.female_last_name !== "undefined") { + if (typeof gender !== "number") { + gender = faker.datatype.number(1); + } + if (gender === 0) { + return faker.random.arrayElement(faker.locales[faker.locale].name.male_last_name); + } else { + return faker.random.arrayElement(faker.locales[faker.locale].name.female_last_name); + } + } + return faker.random.arrayElement(faker.definitions.name.last_name); + }; + this.middleName = function(gender) { + if (typeof faker.definitions.name.male_middle_name !== "undefined" && typeof faker.definitions.name.female_middle_name !== "undefined") { + if (typeof gender !== "number") { + gender = faker.datatype.number(1); + } + if (gender === 0) { + return faker.random.arrayElement(faker.locales[faker.locale].name.male_middle_name); + } else { + return faker.random.arrayElement(faker.locales[faker.locale].name.female_middle_name); + } + } + return faker.random.arrayElement(faker.definitions.name.middle_name); + }; + this.findName = function(firstName, lastName, gender) { + var r = faker.datatype.number(8); + var prefix, suffix; + if (typeof gender !== "number") { + gender = faker.datatype.number(1); + } + firstName = firstName || faker.name.firstName(gender); + lastName = lastName || faker.name.lastName(gender); + switch (r) { + case 0: + prefix = faker.name.prefix(gender); + if (prefix) { + return prefix + " " + firstName + " " + lastName; + } + case 1: + suffix = faker.name.suffix(gender); + if (suffix) { + return firstName + " " + lastName + " " + suffix; + } + } + return firstName + " " + lastName; + }; + this.jobTitle = function() { + return faker.name.jobDescriptor() + " " + faker.name.jobArea() + " " + faker.name.jobType(); + }; + this.gender = function(binary) { + if (binary) { + return faker.random.arrayElement(faker.definitions.name.binary_gender); + } else { + return faker.random.arrayElement(faker.definitions.name.gender); + } + }; + this.prefix = function(gender) { + if (typeof faker.definitions.name.male_prefix !== "undefined" && typeof faker.definitions.name.female_prefix !== "undefined") { + if (typeof gender !== "number") { + gender = faker.datatype.number(1); + } + if (gender === 0) { + return faker.random.arrayElement(faker.locales[faker.locale].name.male_prefix); + } else { + return faker.random.arrayElement(faker.locales[faker.locale].name.female_prefix); + } + } + return faker.random.arrayElement(faker.definitions.name.prefix); + }; + this.suffix = function() { + return faker.random.arrayElement(faker.definitions.name.suffix); + }; + this.title = function() { + var descriptor = faker.random.arrayElement(faker.definitions.name.title.descriptor), level = faker.random.arrayElement(faker.definitions.name.title.level), job = faker.random.arrayElement(faker.definitions.name.title.job); + return descriptor + " " + level + " " + job; + }; + this.jobDescriptor = function() { + return faker.random.arrayElement(faker.definitions.name.title.descriptor); + }; + this.jobArea = function() { + return faker.random.arrayElement(faker.definitions.name.title.level); + }; + this.jobType = function() { + return faker.random.arrayElement(faker.definitions.name.title.job); + }; + } + module2["exports"] = Name; + } +}); + +// ../../node_modules/@faker-js/faker/lib/address.js +var require_address = __commonJS({ + "../../node_modules/@faker-js/faker/lib/address.js"(exports2, module2) { + function Address(faker) { + var f = faker.fake, Helpers = faker.helpers; + this.zipCode = function(format) { + if (typeof format === "undefined") { + var localeFormat = faker.definitions.address.postcode; + if (typeof localeFormat === "string") { + format = localeFormat; + } else { + format = faker.random.arrayElement(localeFormat); + } + } + return Helpers.replaceSymbols(format); + }; + this.zipCodeByState = function(state) { + var zipRange = faker.definitions.address.postcode_by_state[state]; + if (zipRange) { + return faker.datatype.number(zipRange); + } + return faker.address.zipCode(); + }; + this.city = function(format) { + var formats = [ + "{{address.cityPrefix}} {{name.firstName}}{{address.citySuffix}}", + "{{address.cityPrefix}} {{name.firstName}}", + "{{name.firstName}}{{address.citySuffix}}", + "{{name.lastName}}{{address.citySuffix}}" + ]; + if (!format && faker.definitions.address.city_name) { + formats.push("{{address.cityName}}"); + } + if (typeof format !== "number") { + format = faker.datatype.number(formats.length - 1); + } + return f(formats[format]); + }; + this.cityPrefix = function() { + return faker.random.arrayElement(faker.definitions.address.city_prefix); + }; + this.citySuffix = function() { + return faker.random.arrayElement(faker.definitions.address.city_suffix); + }; + this.cityName = function() { + return faker.random.arrayElement(faker.definitions.address.city_name); + }; + this.streetName = function() { + var result; + var suffix = faker.address.streetSuffix(); + if (suffix !== "") { + suffix = " " + suffix; + } + switch (faker.datatype.number(1)) { + case 0: + result = faker.name.lastName() + suffix; + break; + case 1: + result = faker.name.firstName() + suffix; + break; + } + return result; + }; + this.streetAddress = function(useFullAddress) { + if (useFullAddress === void 0) { + useFullAddress = false; + } + var address = ""; + switch (faker.datatype.number(2)) { + case 0: + address = Helpers.replaceSymbolWithNumber("#####") + " " + faker.address.streetName(); + break; + case 1: + address = Helpers.replaceSymbolWithNumber("####") + " " + faker.address.streetName(); + break; + case 2: + address = Helpers.replaceSymbolWithNumber("###") + " " + faker.address.streetName(); + break; + } + return useFullAddress ? address + " " + faker.address.secondaryAddress() : address; + }; + this.streetSuffix = function() { + return faker.random.arrayElement(faker.definitions.address.street_suffix); + }; + this.streetPrefix = function() { + return faker.random.arrayElement(faker.definitions.address.street_prefix); + }; + this.secondaryAddress = function() { + return Helpers.replaceSymbolWithNumber(faker.random.arrayElement( + [ + "Apt. ###", + "Suite ###" + ] + )); + }; + this.county = function() { + return faker.random.arrayElement(faker.definitions.address.county); + }; + this.country = function() { + return faker.random.arrayElement(faker.definitions.address.country); + }; + this.countryCode = function(alphaCode) { + if (typeof alphaCode === "undefined" || alphaCode === "alpha-2") { + return faker.random.arrayElement(faker.definitions.address.country_code); + } + if (alphaCode === "alpha-3") { + return faker.random.arrayElement(faker.definitions.address.country_code_alpha_3); + } + return faker.random.arrayElement(faker.definitions.address.country_code); + }; + this.state = function(useAbbr) { + return faker.random.arrayElement(faker.definitions.address.state); + }; + this.stateAbbr = function() { + return faker.random.arrayElement(faker.definitions.address.state_abbr); + }; + this.latitude = function(max, min, precision) { + max = max || 90; + min = min || -90; + precision = precision || 4; + return faker.datatype.number({ + max, + min, + precision: parseFloat(0 .toPrecision(precision) + "1") + }).toFixed(precision); + }; + this.longitude = function(max, min, precision) { + max = max || 180; + min = min || -180; + precision = precision || 4; + return faker.datatype.number({ + max, + min, + precision: parseFloat(0 .toPrecision(precision) + "1") + }).toFixed(precision); + }; + this.direction = function(useAbbr) { + if (typeof useAbbr === "undefined" || useAbbr === false) { + return faker.random.arrayElement(faker.definitions.address.direction); + } + return faker.random.arrayElement(faker.definitions.address.direction_abbr); + }; + this.direction.schema = { + "description": "Generates a direction. Use optional useAbbr bool to return abbreviation", + "sampleResults": ["Northwest", "South", "SW", "E"] + }; + this.cardinalDirection = function(useAbbr) { + if (typeof useAbbr === "undefined" || useAbbr === false) { + return faker.random.arrayElement(faker.definitions.address.direction.slice(0, 4)); + } + return faker.random.arrayElement(faker.definitions.address.direction_abbr.slice(0, 4)); + }; + this.cardinalDirection.schema = { + "description": "Generates a cardinal direction. Use optional useAbbr boolean to return abbreviation", + "sampleResults": ["North", "South", "E", "W"] + }; + this.ordinalDirection = function(useAbbr) { + if (typeof useAbbr === "undefined" || useAbbr === false) { + return faker.random.arrayElement(faker.definitions.address.direction.slice(4, 8)); + } + return faker.random.arrayElement(faker.definitions.address.direction_abbr.slice(4, 8)); + }; + this.ordinalDirection.schema = { + "description": "Generates an ordinal direction. Use optional useAbbr boolean to return abbreviation", + "sampleResults": ["Northwest", "Southeast", "SW", "NE"] + }; + this.nearbyGPSCoordinate = function(coordinate, radius, isMetric) { + function randomFloat(min, max) { + return Math.random() * (max - min) + min; + } + function degreesToRadians(degrees) { + return degrees * (Math.PI / 180); + } + function radiansToDegrees(radians) { + return radians * (180 / Math.PI); + } + function kilometersToMiles(miles) { + return miles * 0.621371; + } + function coordinateWithOffset(coordinate2, bearing, distance, isMetric2) { + var R = 6378.137; + var d = isMetric2 ? distance : kilometersToMiles(distance); + var lat1 = degreesToRadians(coordinate2[0]); + var lon1 = degreesToRadians(coordinate2[1]); + var lat2 = Math.asin(Math.sin(lat1) * Math.cos(d / R) + Math.cos(lat1) * Math.sin(d / R) * Math.cos(bearing)); + var lon2 = lon1 + Math.atan2( + Math.sin(bearing) * Math.sin(d / R) * Math.cos(lat1), + Math.cos(d / R) - Math.sin(lat1) * Math.sin(lat2) + ); + if (lon2 > degreesToRadians(180)) { + lon2 = lon2 - degreesToRadians(360); + } else if (lon2 < degreesToRadians(-180)) { + lon2 = lon2 + degreesToRadians(360); + } + return [radiansToDegrees(lat2), radiansToDegrees(lon2)]; + } + if (coordinate === void 0) { + return [faker.address.latitude(), faker.address.longitude()]; + } + radius = radius || 10; + isMetric = isMetric || false; + var randomCoord = coordinateWithOffset(coordinate, degreesToRadians(Math.random() * 360), radius, isMetric); + return [randomCoord[0].toFixed(4), randomCoord[1].toFixed(4)]; + }; + this.timeZone = function() { + return faker.random.arrayElement(faker.definitions.address.time_zone); + }; + return this; + } + module2.exports = Address; + } +}); + +// ../../node_modules/@faker-js/faker/lib/animal.js +var require_animal = __commonJS({ + "../../node_modules/@faker-js/faker/lib/animal.js"(exports2, module2) { + var Animal = function(faker) { + var self2 = this; + self2.dog = function() { + return faker.random.arrayElement(faker.definitions.animal.dog); + }; + self2.cat = function() { + return faker.random.arrayElement(faker.definitions.animal.cat); + }; + self2.snake = function() { + return faker.random.arrayElement(faker.definitions.animal.snake); + }; + self2.bear = function() { + return faker.random.arrayElement(faker.definitions.animal.bear); + }; + self2.lion = function() { + return faker.random.arrayElement(faker.definitions.animal.lion); + }; + self2.cetacean = function() { + return faker.random.arrayElement(faker.definitions.animal.cetacean); + }; + self2.horse = function() { + return faker.random.arrayElement(faker.definitions.animal.horse); + }; + self2.bird = function() { + return faker.random.arrayElement(faker.definitions.animal.bird); + }; + self2.cow = function() { + return faker.random.arrayElement(faker.definitions.animal.cow); + }; + self2.fish = function() { + return faker.random.arrayElement(faker.definitions.animal.fish); + }; + self2.crocodilia = function() { + return faker.random.arrayElement(faker.definitions.animal.crocodilia); + }; + self2.insect = function() { + return faker.random.arrayElement(faker.definitions.animal.insect); + }; + self2.rabbit = function() { + return faker.random.arrayElement(faker.definitions.animal.rabbit); + }; + self2.type = function() { + return faker.random.arrayElement(faker.definitions.animal.type); + }; + return self2; + }; + module2["exports"] = Animal; + } +}); + +// ../../node_modules/@faker-js/faker/lib/company.js +var require_company = __commonJS({ + "../../node_modules/@faker-js/faker/lib/company.js"(exports2, module2) { + var Company = function(faker) { + var self2 = this; + var f = faker.fake; + this.suffixes = function() { + return faker.definitions.company.suffix.slice(0); + }; + this.companyName = function(format) { + var formats = [ + "{{name.lastName}} {{company.companySuffix}}", + "{{name.lastName}} - {{name.lastName}}", + "{{name.lastName}}, {{name.lastName}} and {{name.lastName}}" + ]; + if (typeof format !== "number") { + format = faker.datatype.number(formats.length - 1); + } + return f(formats[format]); + }; + this.companySuffix = function() { + return faker.random.arrayElement(faker.company.suffixes()); + }; + this.catchPhrase = function() { + return f("{{company.catchPhraseAdjective}} {{company.catchPhraseDescriptor}} {{company.catchPhraseNoun}}"); + }; + this.bs = function() { + return f("{{company.bsBuzz}} {{company.bsAdjective}} {{company.bsNoun}}"); + }; + this.catchPhraseAdjective = function() { + return faker.random.arrayElement(faker.definitions.company.adjective); + }; + this.catchPhraseDescriptor = function() { + return faker.random.arrayElement(faker.definitions.company.descriptor); + }; + this.catchPhraseNoun = function() { + return faker.random.arrayElement(faker.definitions.company.noun); + }; + this.bsAdjective = function() { + return faker.random.arrayElement(faker.definitions.company.bs_adjective); + }; + this.bsBuzz = function() { + return faker.random.arrayElement(faker.definitions.company.bs_verb); + }; + this.bsNoun = function() { + return faker.random.arrayElement(faker.definitions.company.bs_noun); + }; + }; + module2["exports"] = Company; + } +}); + +// ../../node_modules/@faker-js/faker/lib/iban.js +var require_iban = __commonJS({ + "../../node_modules/@faker-js/faker/lib/iban.js"(exports2, module2) { + module2["exports"] = { + alpha: [ + "A", + "B", + "C", + "D", + "E", + "F", + "G", + "H", + "I", + "J", + "K", + "L", + "M", + "N", + "O", + "P", + "Q", + "R", + "S", + "T", + "U", + "V", + "W", + "X", + "Y", + "Z" + ], + pattern10: [ + "01", + "02", + "03", + "04", + "05", + "06", + "07", + "08", + "09" + ], + pattern100: [ + "001", + "002", + "003", + "004", + "005", + "006", + "007", + "008", + "009" + ], + toDigitString: function(str) { + return str.replace(/[A-Z]/gi, function(match) { + return match.toUpperCase().charCodeAt(0) - 55; + }); + }, + mod97: function(digitStr) { + var m = 0; + for (var i = 0; i < digitStr.length; i++) { + m = (m * 10 + (digitStr[i] | 0)) % 97; + } + return m; + }, + formats: [ + { + country: "AL", + total: 28, + bban: [ + { + type: "n", + count: 8 + }, + { + type: "c", + count: 16 + } + ], + format: "ALkk bbbs sssx cccc cccc cccc cccc" + }, + { + country: "AD", + total: 24, + bban: [ + { + type: "n", + count: 8 + }, + { + type: "c", + count: 12 + } + ], + format: "ADkk bbbb ssss cccc cccc cccc" + }, + { + country: "AT", + total: 20, + bban: [ + { + type: "n", + count: 5 + }, + { + type: "n", + count: 11 + } + ], + format: "ATkk bbbb bccc cccc cccc" + }, + { + // Azerbaijan + // https://transferwise.com/fr/iban/azerbaijan + // Length 28 + // BBAN 2c,16n + // GEkk bbbb cccc cccc cccc cccc cccc + // b = National bank code (alpha) + // c = Account number + // example IBAN AZ21 NABZ 0000 0000 1370 1000 1944 + country: "AZ", + total: 28, + bban: [ + { + type: "a", + count: 4 + }, + { + type: "n", + count: 20 + } + ], + format: "AZkk bbbb cccc cccc cccc cccc cccc" + }, + { + country: "BH", + total: 22, + bban: [ + { + type: "a", + count: 4 + }, + { + type: "c", + count: 14 + } + ], + format: "BHkk bbbb cccc cccc cccc cc" + }, + { + country: "BE", + total: 16, + bban: [ + { + type: "n", + count: 3 + }, + { + type: "n", + count: 9 + } + ], + format: "BEkk bbbc cccc ccxx" + }, + { + country: "BA", + total: 20, + bban: [ + { + type: "n", + count: 6 + }, + { + type: "n", + count: 10 + } + ], + format: "BAkk bbbs sscc cccc ccxx" + }, + { + country: "BR", + total: 29, + bban: [ + { + type: "n", + count: 13 + }, + { + type: "n", + count: 10 + }, + { + type: "a", + count: 1 + }, + { + type: "c", + count: 1 + } + ], + format: "BRkk bbbb bbbb ssss sccc cccc ccct n" + }, + { + country: "BG", + total: 22, + bban: [ + { + type: "a", + count: 4 + }, + { + type: "n", + count: 6 + }, + { + type: "c", + count: 8 + } + ], + format: "BGkk bbbb ssss ddcc cccc cc" + }, + { + country: "CR", + total: 21, + bban: [ + { + type: "n", + count: 3 + }, + { + type: "n", + count: 14 + } + ], + format: "CRkk bbbc cccc cccc cccc c" + }, + { + country: "HR", + total: 21, + bban: [ + { + type: "n", + count: 7 + }, + { + type: "n", + count: 10 + } + ], + format: "HRkk bbbb bbbc cccc cccc c" + }, + { + country: "CY", + total: 28, + bban: [ + { + type: "n", + count: 8 + }, + { + type: "c", + count: 16 + } + ], + format: "CYkk bbbs ssss cccc cccc cccc cccc" + }, + { + country: "CZ", + total: 24, + bban: [ + { + type: "n", + count: 10 + }, + { + type: "n", + count: 10 + } + ], + format: "CZkk bbbb ssss sscc cccc cccc" + }, + { + country: "DK", + total: 18, + bban: [ + { + type: "n", + count: 4 + }, + { + type: "n", + count: 10 + } + ], + format: "DKkk bbbb cccc cccc cc" + }, + { + country: "DO", + total: 28, + bban: [ + { + type: "a", + count: 4 + }, + { + type: "n", + count: 20 + } + ], + format: "DOkk bbbb cccc cccc cccc cccc cccc" + }, + { + country: "TL", + total: 23, + bban: [ + { + type: "n", + count: 3 + }, + { + type: "n", + count: 16 + } + ], + format: "TLkk bbbc cccc cccc cccc cxx" + }, + { + country: "EE", + total: 20, + bban: [ + { + type: "n", + count: 4 + }, + { + type: "n", + count: 12 + } + ], + format: "EEkk bbss cccc cccc cccx" + }, + { + country: "FO", + total: 18, + bban: [ + { + type: "n", + count: 4 + }, + { + type: "n", + count: 10 + } + ], + format: "FOkk bbbb cccc cccc cx" + }, + { + country: "FI", + total: 18, + bban: [ + { + type: "n", + count: 6 + }, + { + type: "n", + count: 8 + } + ], + format: "FIkk bbbb bbcc cccc cx" + }, + { + country: "FR", + total: 27, + bban: [ + { + type: "n", + count: 10 + }, + { + type: "c", + count: 11 + }, + { + type: "n", + count: 2 + } + ], + format: "FRkk bbbb bggg ggcc cccc cccc cxx" + }, + { + country: "GE", + total: 22, + bban: [ + { + type: "a", + count: 2 + }, + { + type: "n", + count: 16 + } + ], + format: "GEkk bbcc cccc cccc cccc cc" + }, + { + country: "DE", + total: 22, + bban: [ + { + type: "n", + count: 8 + }, + { + type: "n", + count: 10 + } + ], + format: "DEkk bbbb bbbb cccc cccc cc" + }, + { + country: "GI", + total: 23, + bban: [ + { + type: "a", + count: 4 + }, + { + type: "c", + count: 15 + } + ], + format: "GIkk bbbb cccc cccc cccc ccc" + }, + { + country: "GR", + total: 27, + bban: [ + { + type: "n", + count: 7 + }, + { + type: "c", + count: 16 + } + ], + format: "GRkk bbbs sssc cccc cccc cccc ccc" + }, + { + country: "GL", + total: 18, + bban: [ + { + type: "n", + count: 4 + }, + { + type: "n", + count: 10 + } + ], + format: "GLkk bbbb cccc cccc cc" + }, + { + country: "GT", + total: 28, + bban: [ + { + type: "c", + count: 4 + }, + { + type: "c", + count: 4 + }, + { + type: "c", + count: 16 + } + ], + format: "GTkk bbbb mmtt cccc cccc cccc cccc" + }, + { + country: "HU", + total: 28, + bban: [ + { + type: "n", + count: 8 + }, + { + type: "n", + count: 16 + } + ], + format: "HUkk bbbs sssk cccc cccc cccc cccx" + }, + { + country: "IS", + total: 26, + bban: [ + { + type: "n", + count: 6 + }, + { + type: "n", + count: 16 + } + ], + format: "ISkk bbbb sscc cccc iiii iiii ii" + }, + { + country: "IE", + total: 22, + bban: [ + { + type: "c", + count: 4 + }, + { + type: "n", + count: 6 + }, + { + type: "n", + count: 8 + } + ], + format: "IEkk aaaa bbbb bbcc cccc cc" + }, + { + country: "IL", + total: 23, + bban: [ + { + type: "n", + count: 6 + }, + { + type: "n", + count: 13 + } + ], + format: "ILkk bbbn nncc cccc cccc ccc" + }, + { + country: "IT", + total: 27, + bban: [ + { + type: "a", + count: 1 + }, + { + type: "n", + count: 10 + }, + { + type: "c", + count: 12 + } + ], + format: "ITkk xaaa aabb bbbc cccc cccc ccc" + }, + { + country: "JO", + total: 30, + bban: [ + { + type: "a", + count: 4 + }, + { + type: "n", + count: 4 + }, + { + type: "n", + count: 18 + } + ], + format: "JOkk bbbb nnnn cccc cccc cccc cccc cc" + }, + { + country: "KZ", + total: 20, + bban: [ + { + type: "n", + count: 3 + }, + { + type: "c", + count: 13 + } + ], + format: "KZkk bbbc cccc cccc cccc" + }, + { + country: "XK", + total: 20, + bban: [ + { + type: "n", + count: 4 + }, + { + type: "n", + count: 12 + } + ], + format: "XKkk bbbb cccc cccc cccc" + }, + { + country: "KW", + total: 30, + bban: [ + { + type: "a", + count: 4 + }, + { + type: "c", + count: 22 + } + ], + format: "KWkk bbbb cccc cccc cccc cccc cccc cc" + }, + { + country: "LV", + total: 21, + bban: [ + { + type: "a", + count: 4 + }, + { + type: "c", + count: 13 + } + ], + format: "LVkk bbbb cccc cccc cccc c" + }, + { + country: "LB", + total: 28, + bban: [ + { + type: "n", + count: 4 + }, + { + type: "c", + count: 20 + } + ], + format: "LBkk bbbb cccc cccc cccc cccc cccc" + }, + { + country: "LI", + total: 21, + bban: [ + { + type: "n", + count: 5 + }, + { + type: "c", + count: 12 + } + ], + format: "LIkk bbbb bccc cccc cccc c" + }, + { + country: "LT", + total: 20, + bban: [ + { + type: "n", + count: 5 + }, + { + type: "n", + count: 11 + } + ], + format: "LTkk bbbb bccc cccc cccc" + }, + { + country: "LU", + total: 20, + bban: [ + { + type: "n", + count: 3 + }, + { + type: "c", + count: 13 + } + ], + format: "LUkk bbbc cccc cccc cccc" + }, + { + country: "MK", + total: 19, + bban: [ + { + type: "n", + count: 3 + }, + { + type: "c", + count: 10 + }, + { + type: "n", + count: 2 + } + ], + format: "MKkk bbbc cccc cccc cxx" + }, + { + country: "MT", + total: 31, + bban: [ + { + type: "a", + count: 4 + }, + { + type: "n", + count: 5 + }, + { + type: "c", + count: 18 + } + ], + format: "MTkk bbbb ssss sccc cccc cccc cccc ccc" + }, + { + country: "MR", + total: 27, + bban: [ + { + type: "n", + count: 10 + }, + { + type: "n", + count: 13 + } + ], + format: "MRkk bbbb bsss sscc cccc cccc cxx" + }, + { + country: "MU", + total: 30, + bban: [ + { + type: "a", + count: 4 + }, + { + type: "n", + count: 4 + }, + { + type: "n", + count: 15 + }, + { + type: "a", + count: 3 + } + ], + format: "MUkk bbbb bbss cccc cccc cccc 000d dd" + }, + { + country: "MC", + total: 27, + bban: [ + { + type: "n", + count: 10 + }, + { + type: "c", + count: 11 + }, + { + type: "n", + count: 2 + } + ], + format: "MCkk bbbb bsss sscc cccc cccc cxx" + }, + { + country: "MD", + total: 24, + bban: [ + { + type: "c", + count: 2 + }, + { + type: "c", + count: 18 + } + ], + format: "MDkk bbcc cccc cccc cccc cccc" + }, + { + country: "ME", + total: 22, + bban: [ + { + type: "n", + count: 3 + }, + { + type: "n", + count: 15 + } + ], + format: "MEkk bbbc cccc cccc cccc xx" + }, + { + country: "NL", + total: 18, + bban: [ + { + type: "a", + count: 4 + }, + { + type: "n", + count: 10 + } + ], + format: "NLkk bbbb cccc cccc cc" + }, + { + country: "NO", + total: 15, + bban: [ + { + type: "n", + count: 4 + }, + { + type: "n", + count: 7 + } + ], + format: "NOkk bbbb cccc ccx" + }, + { + country: "PK", + total: 24, + bban: [ + { + type: "a", + count: 4 + }, + { + type: "n", + count: 16 + } + ], + format: "PKkk bbbb cccc cccc cccc cccc" + }, + { + country: "PS", + total: 29, + bban: [ + { + type: "c", + count: 4 + }, + { + type: "n", + count: 9 + }, + { + type: "n", + count: 12 + } + ], + format: "PSkk bbbb xxxx xxxx xccc cccc cccc c" + }, + { + country: "PL", + total: 28, + bban: [ + { + type: "n", + count: 8 + }, + { + type: "n", + count: 16 + } + ], + format: "PLkk bbbs sssx cccc cccc cccc cccc" + }, + { + country: "PT", + total: 25, + bban: [ + { + type: "n", + count: 8 + }, + { + type: "n", + count: 13 + } + ], + format: "PTkk bbbb ssss cccc cccc cccx x" + }, + { + country: "QA", + total: 29, + bban: [ + { + type: "a", + count: 4 + }, + { + type: "c", + count: 21 + } + ], + format: "QAkk bbbb cccc cccc cccc cccc cccc c" + }, + { + country: "RO", + total: 24, + bban: [ + { + type: "a", + count: 4 + }, + { + type: "c", + count: 16 + } + ], + format: "ROkk bbbb cccc cccc cccc cccc" + }, + { + country: "SM", + total: 27, + bban: [ + { + type: "a", + count: 1 + }, + { + type: "n", + count: 10 + }, + { + type: "c", + count: 12 + } + ], + format: "SMkk xaaa aabb bbbc cccc cccc ccc" + }, + { + country: "SA", + total: 24, + bban: [ + { + type: "n", + count: 2 + }, + { + type: "c", + count: 18 + } + ], + format: "SAkk bbcc cccc cccc cccc cccc" + }, + { + country: "RS", + total: 22, + bban: [ + { + type: "n", + count: 3 + }, + { + type: "n", + count: 15 + } + ], + format: "RSkk bbbc cccc cccc cccc xx" + }, + { + country: "SK", + total: 24, + bban: [ + { + type: "n", + count: 10 + }, + { + type: "n", + count: 10 + } + ], + format: "SKkk bbbb ssss sscc cccc cccc" + }, + { + country: "SI", + total: 19, + bban: [ + { + type: "n", + count: 5 + }, + { + type: "n", + count: 10 + } + ], + format: "SIkk bbss sccc cccc cxx" + }, + { + country: "ES", + total: 24, + bban: [ + { + type: "n", + count: 10 + }, + { + type: "n", + count: 10 + } + ], + format: "ESkk bbbb gggg xxcc cccc cccc" + }, + { + country: "SE", + total: 24, + bban: [ + { + type: "n", + count: 3 + }, + { + type: "n", + count: 17 + } + ], + format: "SEkk bbbc cccc cccc cccc cccc" + }, + { + country: "CH", + total: 21, + bban: [ + { + type: "n", + count: 5 + }, + { + type: "c", + count: 12 + } + ], + format: "CHkk bbbb bccc cccc cccc c" + }, + { + country: "TN", + total: 24, + bban: [ + { + type: "n", + count: 5 + }, + { + type: "n", + count: 15 + } + ], + format: "TNkk bbss sccc cccc cccc cccc" + }, + { + country: "TR", + total: 26, + bban: [ + { + type: "n", + count: 5 + }, + { + type: "n", + count: 1 + }, + { + type: "n", + count: 16 + } + ], + format: "TRkk bbbb bxcc cccc cccc cccc cc" + }, + { + country: "AE", + total: 23, + bban: [ + { + type: "n", + count: 3 + }, + { + type: "n", + count: 16 + } + ], + format: "AEkk bbbc cccc cccc cccc ccc" + }, + { + country: "GB", + total: 22, + bban: [ + { + type: "a", + count: 4 + }, + { + type: "n", + count: 6 + }, + { + type: "n", + count: 8 + } + ], + format: "GBkk bbbb ssss sscc cccc cc" + }, + { + country: "VG", + total: 24, + bban: [ + { + type: "c", + count: 4 + }, + { + type: "n", + count: 16 + } + ], + format: "VGkk bbbb cccc cccc cccc cccc" + } + ], + iso3166: [ + "AC", + "AD", + "AE", + "AF", + "AG", + "AI", + "AL", + "AM", + "AN", + "AO", + "AQ", + "AR", + "AS", + "AT", + "AU", + "AW", + "AX", + "AZ", + "BA", + "BB", + "BD", + "BE", + "BF", + "BG", + "BH", + "BI", + "BJ", + "BL", + "BM", + "BN", + "BO", + "BQ", + "BR", + "BS", + "BT", + "BU", + "BV", + "BW", + "BY", + "BZ", + "CA", + "CC", + "CD", + "CE", + "CF", + "CG", + "CH", + "CI", + "CK", + "CL", + "CM", + "CN", + "CO", + "CP", + "CR", + "CS", + "CS", + "CU", + "CV", + "CW", + "CX", + "CY", + "CZ", + "DD", + "DE", + "DG", + "DJ", + "DK", + "DM", + "DO", + "DZ", + "EA", + "EC", + "EE", + "EG", + "EH", + "ER", + "ES", + "ET", + "EU", + "FI", + "FJ", + "FK", + "FM", + "FO", + "FR", + "FX", + "GA", + "GB", + "GD", + "GE", + "GF", + "GG", + "GH", + "GI", + "GL", + "GM", + "GN", + "GP", + "GQ", + "GR", + "GS", + "GT", + "GU", + "GW", + "GY", + "HK", + "HM", + "HN", + "HR", + "HT", + "HU", + "IC", + "ID", + "IE", + "IL", + "IM", + "IN", + "IO", + "IQ", + "IR", + "IS", + "IT", + "JE", + "JM", + "JO", + "JP", + "KE", + "KG", + "KH", + "KI", + "KM", + "KN", + "KP", + "KR", + "KW", + "KY", + "KZ", + "LA", + "LB", + "LC", + "LI", + "LK", + "LR", + "LS", + "LT", + "LU", + "LV", + "LY", + "MA", + "MC", + "MD", + "ME", + "MF", + "MG", + "MH", + "MK", + "ML", + "MM", + "MN", + "MO", + "MP", + "MQ", + "MR", + "MS", + "MT", + "MU", + "MV", + "MW", + "MX", + "MY", + "MZ", + "NA", + "NC", + "NE", + "NF", + "NG", + "NI", + "NL", + "NO", + "NP", + "NR", + "NT", + "NU", + "NZ", + "OM", + "PA", + "PE", + "PF", + "PG", + "PH", + "PK", + "PL", + "PM", + "PN", + "PR", + "PS", + "PT", + "PW", + "PY", + "QA", + "RE", + "RO", + "RS", + "RU", + "RW", + "SA", + "SB", + "SC", + "SD", + "SE", + "SG", + "SH", + "SI", + "SJ", + "SK", + "SL", + "SM", + "SN", + "SO", + "SR", + "SS", + "ST", + "SU", + "SV", + "SX", + "SY", + "SZ", + "TA", + "TC", + "TD", + "TF", + "TG", + "TH", + "TJ", + "TK", + "TL", + "TM", + "TN", + "TO", + "TR", + "TT", + "TV", + "TW", + "TZ", + "UA", + "UG", + "UM", + "US", + "UY", + "UZ", + "VA", + "VC", + "VE", + "VG", + "VI", + "VN", + "VU", + "WF", + "WS", + "YE", + "YT", + "YU", + "ZA", + "ZM", + "ZR", + "ZW" + ] + }; + } +}); + +// ../../node_modules/@faker-js/faker/lib/finance.js +var require_finance = __commonJS({ + "../../node_modules/@faker-js/faker/lib/finance.js"(exports2, module2) { + var Finance = function(faker) { + var ibanLib = require_iban(); + var Helpers = faker.helpers, self2 = this; + self2.account = function(length) { + length = length || 8; + var template = ""; + for (var i = 0; i < length; i++) { + template = template + "#"; + } + length = null; + return Helpers.replaceSymbolWithNumber(template); + }; + self2.accountName = function() { + return [Helpers.randomize(faker.definitions.finance.account_type), "Account"].join(" "); + }; + self2.routingNumber = function() { + var routingNumber = Helpers.replaceSymbolWithNumber("########"); + var sum = 0; + for (var i = 0; i < routingNumber.length; i += 3) { + sum += Number(routingNumber[i]) * 3; + sum += Number(routingNumber[i + 1]) * 7; + sum += Number(routingNumber[i + 2]) || 0; + } + return routingNumber + (Math.ceil(sum / 10) * 10 - sum); + }; + self2.mask = function(length, parens, ellipsis) { + length = length == 0 || !length || typeof length == "undefined" ? 4 : length; + parens = parens === null ? true : parens; + ellipsis = ellipsis === null ? true : ellipsis; + var template = ""; + for (var i = 0; i < length; i++) { + template = template + "#"; + } + template = ellipsis ? ["...", template].join("") : template; + template = parens ? ["(", template, ")"].join("") : template; + template = Helpers.replaceSymbolWithNumber(template); + return template; + }; + self2.amount = function(min, max, dec, symbol, autoFormat) { + min = min || 0; + max = max || 1e3; + dec = dec === void 0 ? 2 : dec; + symbol = symbol || ""; + const randValue = faker.datatype.number({ max, min, precision: Math.pow(10, -dec) }); + var formattedString; + if (autoFormat) { + formattedString = randValue.toLocaleString(void 0, { minimumFractionDigits: dec }); + } else { + formattedString = randValue.toFixed(dec); + } + return symbol + formattedString; + }; + self2.transactionType = function() { + return Helpers.randomize(faker.definitions.finance.transaction_type); + }; + self2.currencyCode = function() { + return faker.random.objectElement(faker.definitions.finance.currency)["code"]; + }; + self2.currencyName = function() { + return faker.random.objectElement(faker.definitions.finance.currency, "key"); + }; + self2.currencySymbol = function() { + var symbol; + while (!symbol) { + symbol = faker.random.objectElement(faker.definitions.finance.currency)["symbol"]; + } + return symbol; + }; + self2.bitcoinAddress = function() { + var addressLength = faker.datatype.number({ min: 25, max: 34 }); + var address = faker.random.arrayElement(["1", "3"]); + for (var i = 0; i < addressLength - 1; i++) + address += faker.random.arrayElement("123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ".split("")); + return address; + }; + self2.litecoinAddress = function() { + var addressLength = faker.datatype.number({ min: 26, max: 33 }); + var address = faker.random.arrayElement(["L", "M", "3"]); + for (var i = 0; i < addressLength - 1; i++) + address += faker.random.arrayElement("123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ".split("")); + return address; + }; + self2.creditCardNumber = function(provider) { + provider = provider || ""; + var format, formats; + var localeFormat = faker.definitions.finance.credit_card; + if (provider in localeFormat) { + formats = localeFormat[provider]; + if (typeof formats === "string") { + format = formats; + } else { + format = faker.random.arrayElement(formats); + } + } else if (provider.match(/#/)) { + format = provider; + } else { + if (typeof localeFormat === "string") { + format = localeFormat; + } else if (typeof localeFormat === "object") { + formats = faker.random.objectElement(localeFormat, "value"); + if (typeof formats === "string") { + format = formats; + } else { + format = faker.random.arrayElement(formats); + } + } + } + format = format.replace(/\//g, ""); + return Helpers.replaceCreditCardSymbols(format); + }; + self2.creditCardCVV = function() { + var cvv = ""; + for (var i = 0; i < 3; i++) { + cvv += faker.datatype.number({ max: 9 }).toString(); + } + return cvv; + }; + self2.ethereumAddress = function() { + var address = faker.datatype.hexaDecimal(40).toLowerCase(); + return address; + }; + self2.iban = function(formatted, countryCode) { + var ibanFormat; + if (countryCode) { + var findFormat = function(currentFormat) { + return currentFormat.country === countryCode; + }; + ibanFormat = ibanLib.formats.find(findFormat); + } else { + ibanFormat = faker.random.arrayElement(ibanLib.formats); + } + if (!ibanFormat) { + throw new Error("Country code " + countryCode + " not supported."); + } + var s = ""; + var count = 0; + for (var b = 0; b < ibanFormat.bban.length; b++) { + var bban = ibanFormat.bban[b]; + var c = bban.count; + count += bban.count; + while (c > 0) { + if (bban.type == "a") { + s += faker.random.arrayElement(ibanLib.alpha); + } else if (bban.type == "c") { + if (faker.datatype.number(100) < 80) { + s += faker.datatype.number(9); + } else { + s += faker.random.arrayElement(ibanLib.alpha); + } + } else { + if (c >= 3 && faker.datatype.number(100) < 30) { + if (faker.datatype.boolean()) { + s += faker.random.arrayElement(ibanLib.pattern100); + c -= 2; + } else { + s += faker.random.arrayElement(ibanLib.pattern10); + c--; + } + } else { + s += faker.datatype.number(9); + } + } + c--; + } + s = s.substring(0, count); + } + var checksum = 98 - ibanLib.mod97(ibanLib.toDigitString(s + ibanFormat.country + "00")); + if (checksum < 10) { + checksum = "0" + checksum; + } + var iban = ibanFormat.country + checksum + s; + return formatted ? iban.match(/.{1,4}/g).join(" ") : iban; + }; + self2.bic = function() { + var vowels = ["A", "E", "I", "O", "U"]; + var prob = faker.datatype.number(100); + return Helpers.replaceSymbols("???") + faker.random.arrayElement(vowels) + faker.random.arrayElement(ibanLib.iso3166) + Helpers.replaceSymbols("?") + "1" + (prob < 10 ? Helpers.replaceSymbols("?" + faker.random.arrayElement(vowels) + "?") : prob < 40 ? Helpers.replaceSymbols("###") : ""); + }; + self2.transactionDescription = function() { + var transaction = Helpers.createTransaction(); + var account = transaction.account; + var amount = transaction.amount; + var transactionType = transaction.type; + var company = transaction.business; + var card = faker.finance.mask(); + var currency = faker.finance.currencyCode(); + return transactionType + " transaction at " + company + " using card ending with ***" + card + " for " + currency + " " + amount + " in account ***" + account; + }; + }; + module2["exports"] = Finance; + } +}); + +// ../../node_modules/@faker-js/faker/lib/image_providers/lorempixel.js +var require_lorempixel = __commonJS({ + "../../node_modules/@faker-js/faker/lib/image_providers/lorempixel.js"(exports2, module2) { + var Lorempixel = function(faker) { + var self2 = this; + self2.image = function(width, height, randomize) { + var categories = ["abstract", "animals", "business", "cats", "city", "food", "nightlife", "fashion", "people", "nature", "sports", "technics", "transport"]; + return self2[faker.random.arrayElement(categories)](width, height, randomize); + }; + self2.avatar = function() { + return faker.internet.avatar(); + }; + self2.imageUrl = function(width, height, category, randomize) { + var width = width || 640; + var height = height || 480; + var url = "https://lorempixel.com/" + width + "/" + height; + if (typeof category !== "undefined") { + url += "/" + category; + } + if (randomize) { + url += "?" + faker.datatype.number(); + } + return url; + }; + self2.abstract = function(width, height, randomize) { + return faker.image.lorempixel.imageUrl(width, height, "abstract", randomize); + }; + self2.animals = function(width, height, randomize) { + return faker.image.lorempixel.imageUrl(width, height, "animals", randomize); + }; + self2.business = function(width, height, randomize) { + return faker.image.lorempixel.imageUrl(width, height, "business", randomize); + }; + self2.cats = function(width, height, randomize) { + return faker.image.lorempixel.imageUrl(width, height, "cats", randomize); + }; + self2.city = function(width, height, randomize) { + return faker.image.lorempixel.imageUrl(width, height, "city", randomize); + }; + self2.food = function(width, height, randomize) { + return faker.image.lorempixel.imageUrl(width, height, "food", randomize); + }; + self2.nightlife = function(width, height, randomize) { + return faker.image.lorempixel.imageUrl(width, height, "nightlife", randomize); + }; + self2.fashion = function(width, height, randomize) { + return faker.image.lorempixel.imageUrl(width, height, "fashion", randomize); + }; + self2.people = function(width, height, randomize) { + return faker.image.lorempixel.imageUrl(width, height, "people", randomize); + }; + self2.nature = function(width, height, randomize) { + return faker.image.lorempixel.imageUrl(width, height, "nature", randomize); + }; + self2.sports = function(width, height, randomize) { + return faker.image.lorempixel.imageUrl(width, height, "sports", randomize); + }; + self2.technics = function(width, height, randomize) { + return faker.image.lorempixel.imageUrl(width, height, "technics", randomize); + }; + self2.transport = function(width, height, randomize) { + return faker.image.lorempixel.imageUrl(width, height, "transport", randomize); + }; + }; + module2["exports"] = Lorempixel; + } +}); + +// ../../node_modules/@faker-js/faker/lib/image_providers/unsplash.js +var require_unsplash = __commonJS({ + "../../node_modules/@faker-js/faker/lib/image_providers/unsplash.js"(exports2, module2) { + var Unsplash = function(faker) { + var self2 = this; + var categories = ["food", "nature", "people", "technology", "objects", "buildings"]; + self2.image = function(width, height, keyword) { + return self2.imageUrl(width, height, void 0, keyword); + }; + self2.avatar = function() { + return faker.internet.avatar(); + }; + self2.imageUrl = function(width, height, category, keyword) { + var width = width || 640; + var height = height || 480; + var url = "https://source.unsplash.com"; + if (typeof category !== "undefined") { + url += "/category/" + category; + } + url += "/" + width + "x" + height; + if (typeof keyword !== "undefined") { + var keywordFormat = new RegExp("^([A-Za-z0-9].+,[A-Za-z0-9]+)$|^([A-Za-z0-9]+)$"); + if (keywordFormat.test(keyword)) { + url += "?" + keyword; + } + } + return url; + }; + self2.food = function(width, height, keyword) { + return faker.image.unsplash.imageUrl(width, height, "food", keyword); + }; + self2.people = function(width, height, keyword) { + return faker.image.unsplash.imageUrl(width, height, "people", keyword); + }; + self2.nature = function(width, height, keyword) { + return faker.image.unsplash.imageUrl(width, height, "nature", keyword); + }; + self2.technology = function(width, height, keyword) { + return faker.image.unsplash.imageUrl(width, height, "technology", keyword); + }; + self2.objects = function(width, height, keyword) { + return faker.image.unsplash.imageUrl(width, height, "objects", keyword); + }; + self2.buildings = function(width, height, keyword) { + return faker.image.unsplash.imageUrl(width, height, "buildings", keyword); + }; + }; + module2["exports"] = Unsplash; + } +}); + +// ../../node_modules/@faker-js/faker/lib/image_providers/lorempicsum.js +var require_lorempicsum = __commonJS({ + "../../node_modules/@faker-js/faker/lib/image_providers/lorempicsum.js"(exports2, module2) { + var LoremPicsum = function(faker) { + var self2 = this; + self2.image = function(width, height, grayscale, blur) { + return self2.imageUrl(width, height, grayscale, blur); + }; + self2.imageGrayscale = function(width, height, grayscale) { + return self2.imageUrl(width, height, grayscale); + }; + self2.imageBlurred = function(width, height, blur) { + return self2.imageUrl(width, height, void 0, blur); + }; + self2.imageRandomSeeded = function(width, height, grayscale, blur, seed) { + return self2.imageUrl(width, height, grayscale, blur, seed); + }; + self2.avatar = function() { + return faker.internet.avatar(); + }; + self2.imageUrl = function(width, height, grayscale, blur, seed) { + var width = width || 640; + var height = height || 480; + var url = "https://picsum.photos"; + if (seed) { + url += "/seed/" + seed; + } + url += "/" + width + "/" + height; + if (grayscale && blur) { + return url + "?grayscale&blur=" + blur; + } + if (grayscale) { + return url + "?grayscale"; + } + if (blur) { + return url + "?blur=" + blur; + } + return url; + }; + }; + module2["exports"] = LoremPicsum; + } +}); + +// ../../node_modules/@faker-js/faker/lib/image.js +var require_image = __commonJS({ + "../../node_modules/@faker-js/faker/lib/image.js"(exports2, module2) { + var Image = function(faker) { + var self2 = this; + var Lorempixel = require_lorempixel(); + var Unsplash = require_unsplash(); + var LoremPicsum = require_lorempicsum(); + self2.image = function(width, height, randomize) { + var categories = ["abstract", "animals", "business", "cats", "city", "food", "nightlife", "fashion", "people", "nature", "sports", "technics", "transport"]; + return self2[faker.random.arrayElement(categories)](width, height, randomize); + }; + self2.avatar = function() { + return faker.internet.avatar(); + }; + self2.imageUrl = function(width, height, category, randomize, https) { + var width = width || 640; + var height = height || 480; + var protocol = "http://"; + if (typeof https !== "undefined" && https === true) { + protocol = "https://"; + } + var url = protocol + "placeimg.com/" + width + "/" + height; + if (typeof category !== "undefined") { + url += "/" + category; + } + if (randomize) { + url += "?" + faker.datatype.number(); + } + return url; + }; + self2.abstract = function(width, height, randomize) { + return faker.image.imageUrl(width, height, "abstract", randomize); + }; + self2.animals = function(width, height, randomize) { + return faker.image.imageUrl(width, height, "animals", randomize); + }; + self2.business = function(width, height, randomize) { + return faker.image.imageUrl(width, height, "business", randomize); + }; + self2.cats = function(width, height, randomize) { + return faker.image.imageUrl(width, height, "cats", randomize); + }; + self2.city = function(width, height, randomize) { + return faker.image.imageUrl(width, height, "city", randomize); + }; + self2.food = function(width, height, randomize) { + return faker.image.imageUrl(width, height, "food", randomize); + }; + self2.nightlife = function(width, height, randomize) { + return faker.image.imageUrl(width, height, "nightlife", randomize); + }; + self2.fashion = function(width, height, randomize) { + return faker.image.imageUrl(width, height, "fashion", randomize); + }; + self2.people = function(width, height, randomize) { + return faker.image.imageUrl(width, height, "people", randomize); + }; + self2.nature = function(width, height, randomize) { + return faker.image.imageUrl(width, height, "nature", randomize); + }; + self2.sports = function(width, height, randomize) { + return faker.image.imageUrl(width, height, "sports", randomize); + }; + self2.technics = function(width, height, randomize) { + return faker.image.imageUrl(width, height, "technics", randomize); + }; + self2.transport = function(width, height, randomize) { + return faker.image.imageUrl(width, height, "transport", randomize); + }; + self2.dataUri = function(width, height, color) { + color = color || "grey"; + var svgString = '' + width + "x" + height + ""; + var rawPrefix = "data:image/svg+xml;charset=UTF-8,"; + return rawPrefix + encodeURIComponent(svgString); + }; + self2.lorempixel = new Lorempixel(faker); + self2.unsplash = new Unsplash(faker); + self2.lorempicsum = new LoremPicsum(faker); + }; + module2["exports"] = Image; + } +}); + +// ../../node_modules/@faker-js/faker/lib/lorem.js +var require_lorem = __commonJS({ + "../../node_modules/@faker-js/faker/lib/lorem.js"(exports2, module2) { + var Lorem = function(faker) { + var self2 = this; + var Helpers = faker.helpers; + self2.word = function(length) { + var hasRightLength = function(word) { + return word.length === length; + }; + var properLengthWords; + if (typeof length === "undefined") { + properLengthWords = faker.definitions.lorem.words; + } else { + properLengthWords = faker.definitions.lorem.words.filter(hasRightLength); + } + return faker.random.arrayElement(properLengthWords); + }; + self2.words = function(num) { + if (typeof num == "undefined") { + num = 3; + } + var words = []; + for (var i = 0; i < num; i++) { + words.push(faker.lorem.word()); + } + return words.join(" "); + }; + self2.sentence = function(wordCount, range) { + if (typeof wordCount == "undefined") { + wordCount = faker.datatype.number({ min: 3, max: 10 }); + } + var sentence = faker.lorem.words(wordCount); + return sentence.charAt(0).toUpperCase() + sentence.slice(1) + "."; + }; + self2.slug = function(wordCount) { + var words = faker.lorem.words(wordCount); + return Helpers.slugify(words); + }; + self2.sentences = function(sentenceCount, separator) { + if (typeof sentenceCount === "undefined") { + sentenceCount = faker.datatype.number({ min: 2, max: 6 }); + } + if (typeof separator == "undefined") { + separator = " "; + } + var sentences = []; + for (sentenceCount; sentenceCount > 0; sentenceCount--) { + sentences.push(faker.lorem.sentence()); + } + return sentences.join(separator); + }; + self2.paragraph = function(sentenceCount) { + if (typeof sentenceCount == "undefined") { + sentenceCount = 3; + } + return faker.lorem.sentences(sentenceCount + faker.datatype.number(3)); + }; + self2.paragraphs = function(paragraphCount, separator) { + if (typeof separator === "undefined") { + separator = "\n \r"; + } + if (typeof paragraphCount == "undefined") { + paragraphCount = 3; + } + var paragraphs = []; + for (paragraphCount; paragraphCount > 0; paragraphCount--) { + paragraphs.push(faker.lorem.paragraph()); + } + return paragraphs.join(separator); + }; + self2.text = function loremText(times) { + var loremMethods = ["lorem.word", "lorem.words", "lorem.sentence", "lorem.sentences", "lorem.paragraph", "lorem.paragraphs", "lorem.lines"]; + var randomLoremMethod = faker.random.arrayElement(loremMethods); + return faker.fake("{{" + randomLoremMethod + "}}"); + }; + self2.lines = function lines(lineCount) { + if (typeof lineCount === "undefined") { + lineCount = faker.datatype.number({ min: 1, max: 5 }); + } + return faker.lorem.sentences(lineCount, "\n"); + }; + return self2; + }; + module2["exports"] = Lorem; + } +}); + +// ../../node_modules/@faker-js/faker/lib/hacker.js +var require_hacker = __commonJS({ + "../../node_modules/@faker-js/faker/lib/hacker.js"(exports2, module2) { + var Hacker = function(faker) { + var self2 = this; + self2.abbreviation = function() { + return faker.random.arrayElement(faker.definitions.hacker.abbreviation); + }; + self2.adjective = function() { + return faker.random.arrayElement(faker.definitions.hacker.adjective); + }; + self2.noun = function() { + return faker.random.arrayElement(faker.definitions.hacker.noun); + }; + self2.verb = function() { + return faker.random.arrayElement(faker.definitions.hacker.verb); + }; + self2.ingverb = function() { + return faker.random.arrayElement(faker.definitions.hacker.ingverb); + }; + self2.phrase = function() { + var data = { + abbreviation: self2.abbreviation, + adjective: self2.adjective, + ingverb: self2.ingverb, + noun: self2.noun, + verb: self2.verb + }; + var phrase = faker.random.arrayElement(faker.definitions.hacker.phrase); + return faker.helpers.mustache(phrase, data); + }; + return self2; + }; + module2["exports"] = Hacker; + } +}); + +// ../../node_modules/@faker-js/faker/vendor/user-agent.js +var require_user_agent = __commonJS({ + "../../node_modules/@faker-js/faker/vendor/user-agent.js"(exports2) { + exports2.generate = function generate(faker) { + function rnd(a, b) { + a = a || 0; + b = b || 100; + if (typeof b === "number" && typeof a === "number") { + return faker.datatype.number({ min: a, max: b }); + } + if (Object.prototype.toString.call(a) === "[object Array]") { + return faker.random.arrayElement(a); + } + if (a && typeof a === "object") { + return function(obj) { + var rand = rnd(0, 100) / 100, min = 0, max = 0, key, return_val; + for (key in obj) { + if (obj.hasOwnProperty(key)) { + max = obj[key] + min; + return_val = key; + if (rand >= min && rand <= max) { + break; + } + min = min + obj[key]; + } + } + return return_val; + }(a); + } + throw new TypeError("Invalid arguments passed to rnd. (" + (b ? a + ", " + b : a) + ")"); + } + function randomLang() { + return rnd([ + "AB", + "AF", + "AN", + "AR", + "AS", + "AZ", + "BE", + "BG", + "BN", + "BO", + "BR", + "BS", + "CA", + "CE", + "CO", + "CS", + "CU", + "CY", + "DA", + "DE", + "EL", + "EN", + "EO", + "ES", + "ET", + "EU", + "FA", + "FI", + "FJ", + "FO", + "FR", + "FY", + "GA", + "GD", + "GL", + "GV", + "HE", + "HI", + "HR", + "HT", + "HU", + "HY", + "ID", + "IS", + "IT", + "JA", + "JV", + "KA", + "KG", + "KO", + "KU", + "KW", + "KY", + "LA", + "LB", + "LI", + "LN", + "LT", + "LV", + "MG", + "MK", + "MN", + "MO", + "MS", + "MT", + "MY", + "NB", + "NE", + "NL", + "NN", + "NO", + "OC", + "PL", + "PT", + "RM", + "RO", + "RU", + "SC", + "SE", + "SK", + "SL", + "SO", + "SQ", + "SR", + "SV", + "SW", + "TK", + "TR", + "TY", + "UK", + "UR", + "UZ", + "VI", + "VO", + "YI", + "ZH" + ]); + } + function randomBrowserAndOS() { + var browser2 = rnd({ + chrome: 0.45132810566, + iexplorer: 0.27477061836, + firefox: 0.19384170608, + safari: 0.06186781118, + opera: 0.01574236955 + }), os = { + chrome: { win: 0.89, mac: 0.09, lin: 0.02 }, + firefox: { win: 0.83, mac: 0.16, lin: 0.01 }, + opera: { win: 0.91, mac: 0.03, lin: 0.06 }, + safari: { win: 0.04, mac: 0.96 }, + iexplorer: ["win"] + }; + return [browser2, rnd(os[browser2])]; + } + function randomProc(arch) { + var procs = { + lin: ["i686", "x86_64"], + mac: { "Intel": 0.48, "PPC": 0.01, "U; Intel": 0.48, "U; PPC": 0.01 }, + win: ["", "WOW64", "Win64; x64"] + }; + return rnd(procs[arch]); + } + function randomRevision(dots) { + var return_val = ""; + for (var x = 0; x < dots; x++) { + return_val += "." + rnd(0, 9); + } + return return_val; + } + var version_string = { + net: function() { + return [rnd(1, 4), rnd(0, 9), rnd(1e4, 99999), rnd(0, 9)].join("."); + }, + nt: function() { + return rnd(5, 6) + "." + rnd(0, 3); + }, + ie: function() { + return rnd(7, 11); + }, + trident: function() { + return rnd(3, 7) + "." + rnd(0, 1); + }, + osx: function(delim) { + return [10, rnd(5, 10), rnd(0, 9)].join(delim || "."); + }, + chrome: function() { + return [rnd(13, 39), 0, rnd(800, 899), 0].join("."); + }, + presto: function() { + return "2.9." + rnd(160, 190); + }, + presto2: function() { + return rnd(10, 12) + ".00"; + }, + safari: function() { + return rnd(531, 538) + "." + rnd(0, 2) + "." + rnd(0, 2); + } + }; + var browser = { + firefox: function firefox(arch) { + var firefox_ver = rnd(5, 15) + randomRevision(2), gecko_ver = "Gecko/20100101 Firefox/" + firefox_ver, proc = randomProc(arch), os_ver = arch === "win" ? "(Windows NT " + version_string.nt() + (proc ? "; " + proc : "") : arch === "mac" ? "(Macintosh; " + proc + " Mac OS X " + version_string.osx() : "(X11; Linux " + proc; + return "Mozilla/5.0 " + os_ver + "; rv:" + firefox_ver.slice(0, -2) + ") " + gecko_ver; + }, + iexplorer: function iexplorer() { + var ver = version_string.ie(); + if (ver >= 11) { + return "Mozilla/5.0 (Windows NT 6." + rnd(1, 3) + "; Trident/7.0; " + rnd(["Touch; ", ""]) + "rv:11.0) like Gecko"; + } + return "Mozilla/5.0 (compatible; MSIE " + ver + ".0; Windows NT " + version_string.nt() + "; Trident/" + version_string.trident() + (rnd(0, 1) === 1 ? "; .NET CLR " + version_string.net() : "") + ")"; + }, + opera: function opera(arch) { + var presto_ver = " Presto/" + version_string.presto() + " Version/" + version_string.presto2() + ")", os_ver = arch === "win" ? "(Windows NT " + version_string.nt() + "; U; " + randomLang() + presto_ver : arch === "lin" ? "(X11; Linux " + randomProc(arch) + "; U; " + randomLang() + presto_ver : "(Macintosh; Intel Mac OS X " + version_string.osx() + " U; " + randomLang() + " Presto/" + version_string.presto() + " Version/" + version_string.presto2() + ")"; + return "Opera/" + rnd(9, 14) + "." + rnd(0, 99) + " " + os_ver; + }, + safari: function safari(arch) { + var safari2 = version_string.safari(), ver = rnd(4, 7) + "." + rnd(0, 1) + "." + rnd(0, 10), os_ver = arch === "mac" ? "(Macintosh; " + randomProc("mac") + " Mac OS X " + version_string.osx("_") + " rv:" + rnd(2, 6) + ".0; " + randomLang() + ") " : "(Windows; U; Windows NT " + version_string.nt() + ")"; + return "Mozilla/5.0 " + os_ver + "AppleWebKit/" + safari2 + " (KHTML, like Gecko) Version/" + ver + " Safari/" + safari2; + }, + chrome: function chrome2(arch) { + var safari = version_string.safari(), os_ver = arch === "mac" ? "(Macintosh; " + randomProc("mac") + " Mac OS X " + version_string.osx("_") + ") " : arch === "win" ? "(Windows; U; Windows NT " + version_string.nt() + ")" : "(X11; Linux " + randomProc(arch); + return "Mozilla/5.0 " + os_ver + " AppleWebKit/" + safari + " (KHTML, like Gecko) Chrome/" + version_string.chrome() + " Safari/" + safari; + } + }; + var random = randomBrowserAndOS(); + return browser[random[0]](random[1]); + }; + } +}); + +// ../../node_modules/@faker-js/faker/lib/internet.js +var require_internet = __commonJS({ + "../../node_modules/@faker-js/faker/lib/internet.js"(exports2, module2) { + var random_ua = require_user_agent(); + var Internet = function(faker) { + var self2 = this; + self2.avatar = function() { + return "https://cdn.fakercloud.com/avatars/" + faker.random.arrayElement(faker.definitions.internet.avatar_uri); + }; + self2.avatar.schema = { + "description": "Generates a URL for an avatar.", + "sampleResults": ["https://cdn.fakercloud.com/avatars/sydlawrence_128.jpg"] + }; + self2.email = function(firstName, lastName, provider) { + provider = provider || faker.random.arrayElement(faker.definitions.internet.free_email); + return faker.helpers.slugify(faker.internet.userName(firstName, lastName)) + "@" + provider; + }; + self2.email.schema = { + "description": "Generates a valid email address based on optional input criteria", + "sampleResults": ["foo.bar@gmail.com"], + "properties": { + "firstName": { + "type": "string", + "required": false, + "description": "The first name of the user" + }, + "lastName": { + "type": "string", + "required": false, + "description": "The last name of the user" + }, + "provider": { + "type": "string", + "required": false, + "description": "The domain of the user" + } + } + }; + self2.exampleEmail = function(firstName, lastName) { + var provider = faker.random.arrayElement(faker.definitions.internet.example_email); + return self2.email(firstName, lastName, provider); + }; + self2.userName = function(firstName, lastName) { + var result; + firstName = firstName || faker.name.firstName(); + lastName = lastName || faker.name.lastName(); + switch (faker.datatype.number(2)) { + case 0: + result = firstName + faker.datatype.number(99); + break; + case 1: + result = firstName + faker.random.arrayElement([".", "_"]) + lastName; + break; + case 2: + result = firstName + faker.random.arrayElement([".", "_"]) + lastName + faker.datatype.number(99); + break; + } + result = result.toString().replace(/'/g, ""); + result = result.replace(/ /g, ""); + return result; + }; + self2.userName.schema = { + "description": "Generates a username based on one of several patterns. The pattern is chosen randomly.", + "sampleResults": [ + "Kirstin39", + "Kirstin.Smith", + "Kirstin.Smith39", + "KirstinSmith", + "KirstinSmith39" + ], + "properties": { + "firstName": { + "type": "string", + "required": false, + "description": "The first name of the user" + }, + "lastName": { + "type": "string", + "required": false, + "description": "The last name of the user" + } + } + }; + self2.protocol = function() { + var protocols = ["http", "https"]; + return faker.random.arrayElement(protocols); + }; + self2.protocol.schema = { + "description": "Randomly generates http or https", + "sampleResults": ["https", "http"] + }; + self2.httpMethod = function() { + var httpMethods = ["GET", "POST", "PUT", "DELETE", "PATCH"]; + return faker.random.arrayElement(httpMethods); + }; + self2.httpMethod.schema = { + "description": "Randomly generates HTTP Methods (GET, POST, PUT, DELETE, PATCH)", + "sampleResults": ["GET", "POST", "PUT", "DELETE", "PATCH"] + }; + self2.url = function() { + return faker.internet.protocol() + "://" + faker.internet.domainName(); + }; + self2.url.schema = { + "description": "Generates a random URL. The URL could be secure or insecure.", + "sampleResults": [ + "http://rashawn.name", + "https://rashawn.name" + ] + }; + self2.domainName = function() { + return faker.internet.domainWord() + "." + faker.internet.domainSuffix(); + }; + self2.domainName.schema = { + "description": "Generates a random domain name.", + "sampleResults": ["marvin.org"] + }; + self2.domainSuffix = function() { + return faker.random.arrayElement(faker.definitions.internet.domain_suffix); + }; + self2.domainSuffix.schema = { + "description": "Generates a random domain suffix.", + "sampleResults": ["net"] + }; + self2.domainWord = function() { + return faker.name.firstName().replace(/([\\~#&*{}/:<>?|\"'])/ig, "").toLowerCase(); + }; + self2.domainWord.schema = { + "description": "Generates a random domain word.", + "sampleResults": ["alyce"] + }; + self2.ip = function() { + var randNum = function() { + return faker.datatype.number(255).toFixed(0); + }; + var result = []; + for (var i = 0; i < 4; i++) { + result[i] = randNum(); + } + return result.join("."); + }; + self2.ip.schema = { + "description": "Generates a random IP.", + "sampleResults": ["97.238.241.11"] + }; + self2.ipv6 = function() { + var randHash = function() { + var result2 = ""; + for (var i2 = 0; i2 < 4; i2++) { + result2 += faker.random.arrayElement(["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f"]); + } + return result2; + }; + var result = []; + for (var i = 0; i < 8; i++) { + result[i] = randHash(); + } + return result.join(":"); + }; + self2.ipv6.schema = { + "description": "Generates a random IPv6 address.", + "sampleResults": ["2001:0db8:6276:b1a7:5213:22f1:25df:c8a0"] + }; + self2.port = function() { + return faker.datatype.number({ min: 0, max: 65535 }); + }; + self2.port.schema = { + "description": "Generates a random port number.", + "sampleResults": ["4422"] + }; + self2.userAgent = function() { + return random_ua.generate(faker); + }; + self2.userAgent.schema = { + "description": "Generates a random user agent.", + "sampleResults": ["Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10_7_5 rv:6.0; SL) AppleWebKit/532.0.1 (KHTML, like Gecko) Version/7.1.6 Safari/532.0.1"] + }; + self2.color = function(baseRed255, baseGreen255, baseBlue255) { + baseRed255 = baseRed255 || 0; + baseGreen255 = baseGreen255 || 0; + baseBlue255 = baseBlue255 || 0; + var red = Math.floor((faker.datatype.number(256) + baseRed255) / 2); + var green = Math.floor((faker.datatype.number(256) + baseGreen255) / 2); + var blue = Math.floor((faker.datatype.number(256) + baseBlue255) / 2); + var redStr = red.toString(16); + var greenStr = green.toString(16); + var blueStr = blue.toString(16); + return "#" + (redStr.length === 1 ? "0" : "") + redStr + (greenStr.length === 1 ? "0" : "") + greenStr + (blueStr.length === 1 ? "0" : "") + blueStr; + }; + self2.color.schema = { + "description": "Generates a random hexadecimal color.", + "sampleResults": ["#06267f"], + "properties": { + "baseRed255": { + "type": "number", + "required": false, + "description": "The red value. Valid values are 0 - 255." + }, + "baseGreen255": { + "type": "number", + "required": false, + "description": "The green value. Valid values are 0 - 255." + }, + "baseBlue255": { + "type": "number", + "required": false, + "description": "The blue value. Valid values are 0 - 255." + } + } + }; + self2.mac = function(sep) { + var i, mac = "", validSep = ":"; + if (["-", ""].indexOf(sep) !== -1) { + validSep = sep; + } + for (i = 0; i < 12; i++) { + mac += faker.datatype.number(15).toString(16); + if (i % 2 == 1 && i != 11) { + mac += validSep; + } + } + return mac; + }; + self2.mac.schema = { + "description": "Generates a random mac address.", + "sampleResults": ["78:06:cc:ae:b3:81"] + }; + self2.password = function(len, memorable, pattern, prefix) { + len = len || 15; + if (typeof memorable === "undefined") { + memorable = false; + } + var consonant, letter, vowel; + letter = /[a-zA-Z]$/; + vowel = /[aeiouAEIOU]$/; + consonant = /[bcdfghjklmnpqrstvwxyzBCDFGHJKLMNPQRSTVWXYZ]$/; + var _password = function(length, memorable2, pattern2, prefix2) { + var char, n; + if (length == null) { + length = 10; + } + if (memorable2 == null) { + memorable2 = true; + } + if (pattern2 == null) { + pattern2 = /\w/; + } + if (prefix2 == null) { + prefix2 = ""; + } + if (prefix2.length >= length) { + return prefix2; + } + if (memorable2) { + if (prefix2.match(consonant)) { + pattern2 = vowel; + } else { + pattern2 = consonant; + } + } + n = faker.datatype.number(94) + 33; + char = String.fromCharCode(n); + if (memorable2) { + char = char.toLowerCase(); + } + if (!char.match(pattern2)) { + return _password(length, memorable2, pattern2, prefix2); + } + return _password(length, memorable2, pattern2, "" + prefix2 + char); + }; + return _password(len, memorable, pattern, prefix); + }; + self2.password.schema = { + "description": "Generates a random password.", + "sampleResults": [ + "AM7zl6Mg", + "susejofe" + ], + "properties": { + "length": { + "type": "number", + "required": false, + "description": "The number of characters in the password." + }, + "memorable": { + "type": "boolean", + "required": false, + "description": "Whether a password should be easy to remember." + }, + "pattern": { + "type": "regex", + "required": false, + "description": "A regex to match each character of the password against. This parameter will be negated if the memorable setting is turned on." + }, + "prefix": { + "type": "string", + "required": false, + "description": "A value to prepend to the generated password. The prefix counts towards the length of the password." + } + } + }; + }; + module2["exports"] = Internet; + } +}); + +// ../../node_modules/@faker-js/faker/lib/database.js +var require_database = __commonJS({ + "../../node_modules/@faker-js/faker/lib/database.js"(exports2, module2) { + var Database = function(faker) { + var self2 = this; + self2.column = function() { + return faker.random.arrayElement(faker.definitions.database.column); + }; + self2.column.schema = { + "description": "Generates a column name.", + "sampleResults": ["id", "title", "createdAt"] + }; + self2.type = function() { + return faker.random.arrayElement(faker.definitions.database.type); + }; + self2.type.schema = { + "description": "Generates a column type.", + "sampleResults": ["byte", "int", "varchar", "timestamp"] + }; + self2.collation = function() { + return faker.random.arrayElement(faker.definitions.database.collation); + }; + self2.collation.schema = { + "description": "Generates a collation.", + "sampleResults": ["utf8_unicode_ci", "utf8_bin"] + }; + self2.engine = function() { + return faker.random.arrayElement(faker.definitions.database.engine); + }; + self2.engine.schema = { + "description": "Generates a storage engine.", + "sampleResults": ["MyISAM", "InnoDB"] + }; + }; + module2["exports"] = Database; + } +}); + +// ../../node_modules/@faker-js/faker/lib/phone_number.js +var require_phone_number = __commonJS({ + "../../node_modules/@faker-js/faker/lib/phone_number.js"(exports2, module2) { + var Phone = function(faker) { + var self2 = this; + self2.phoneNumber = function(format) { + format = format || faker.phone.phoneFormats(); + return faker.helpers.replaceSymbolWithNumber(format); + }; + self2.phoneNumberFormat = function(phoneFormatsArrayIndex) { + phoneFormatsArrayIndex = phoneFormatsArrayIndex || 0; + return faker.helpers.replaceSymbolWithNumber(faker.definitions.phone_number.formats[phoneFormatsArrayIndex]); + }; + self2.phoneFormats = function() { + return faker.random.arrayElement(faker.definitions.phone_number.formats); + }; + return self2; + }; + module2["exports"] = Phone; + } +}); + +// ../../node_modules/@faker-js/faker/lib/date.js +var require_date = __commonJS({ + "../../node_modules/@faker-js/faker/lib/date.js"(exports2, module2) { + var _Date = function(faker) { + var self2 = this; + self2.past = function(years, refDate) { + var date = /* @__PURE__ */ new Date(); + if (typeof refDate !== "undefined") { + date = new Date(Date.parse(refDate)); + } + var range = { + min: 1e3, + max: (years || 1) * 365 * 24 * 3600 * 1e3 + }; + var past = date.getTime(); + past -= faker.datatype.number(range); + date.setTime(past); + return date; + }; + self2.future = function(years, refDate) { + var date = /* @__PURE__ */ new Date(); + if (typeof refDate !== "undefined") { + date = new Date(Date.parse(refDate)); + } + var range = { + min: 1e3, + max: (years || 1) * 365 * 24 * 3600 * 1e3 + }; + var future = date.getTime(); + future += faker.datatype.number(range); + date.setTime(future); + return date; + }; + self2.between = function(from, to) { + var fromMilli = Date.parse(from); + var dateOffset = faker.datatype.number(Date.parse(to) - fromMilli); + var newDate = new Date(fromMilli + dateOffset); + return newDate; + }; + self2.betweens = function(from, to, num) { + if (typeof num == "undefined") { + num = 3; + } + var newDates = []; + var fromMilli = Date.parse(from); + var dateOffset = (Date.parse(to) - fromMilli) / (num + 1); + var lastDate = from; + for (var i = 0; i < num; i++) { + fromMilli = Date.parse(lastDate); + lastDate = new Date(fromMilli + dateOffset); + newDates.push(lastDate); + } + return newDates; + }; + self2.recent = function(days, refDate) { + var date = /* @__PURE__ */ new Date(); + if (typeof refDate !== "undefined") { + date = new Date(Date.parse(refDate)); + } + var range = { + min: 1e3, + max: (days || 1) * 24 * 3600 * 1e3 + }; + var future = date.getTime(); + future -= faker.datatype.number(range); + date.setTime(future); + return date; + }; + self2.soon = function(days, refDate) { + var date = /* @__PURE__ */ new Date(); + if (typeof refDate !== "undefined") { + date = new Date(Date.parse(refDate)); + } + var range = { + min: 1e3, + max: (days || 1) * 24 * 3600 * 1e3 + }; + var future = date.getTime(); + future += faker.datatype.number(range); + date.setTime(future); + return date; + }; + self2.month = function(options) { + options = options || {}; + var type = "wide"; + if (options.abbr) { + type = "abbr"; + } + if (options.context && typeof faker.definitions.date.month[type + "_context"] !== "undefined") { + type += "_context"; + } + var source = faker.definitions.date.month[type]; + return faker.random.arrayElement(source); + }; + self2.weekday = function(options) { + options = options || {}; + var type = "wide"; + if (options.abbr) { + type = "abbr"; + } + if (options.context && typeof faker.definitions.date.weekday[type + "_context"] !== "undefined") { + type += "_context"; + } + var source = faker.definitions.date.weekday[type]; + return faker.random.arrayElement(source); + }; + return self2; + }; + module2["exports"] = _Date; + } +}); + +// ../../node_modules/@faker-js/faker/lib/time.js +var require_time = __commonJS({ + "../../node_modules/@faker-js/faker/lib/time.js"(exports2, module2) { + var _Time = function(faker) { + var self2 = this; + self2.recent = function(outputType) { + if (typeof outputType === "undefined") { + outputType = "unix"; + } + var date = /* @__PURE__ */ new Date(); + switch (outputType) { + case "abbr": + date = date.toLocaleTimeString(); + break; + case "wide": + date = date.toTimeString(); + break; + case "unix": + date = date.getTime(); + break; + } + return date; + }; + return self2; + }; + module2["exports"] = _Time; + } +}); + +// ../../node_modules/@faker-js/faker/lib/commerce.js +var require_commerce = __commonJS({ + "../../node_modules/@faker-js/faker/lib/commerce.js"(exports2, module2) { + var Commerce = function(faker) { + var self2 = this; + self2.color = function() { + return faker.random.arrayElement(faker.definitions.commerce.color); + }; + self2.department = function() { + return faker.random.arrayElement(faker.definitions.commerce.department); + }; + self2.productName = function() { + return faker.commerce.productAdjective() + " " + faker.commerce.productMaterial() + " " + faker.commerce.product(); + }; + self2.price = function(min, max, dec, symbol) { + min = min || 1; + max = max || 1e3; + dec = dec === void 0 ? 2 : dec; + symbol = symbol || ""; + if (min < 0 || max < 0) { + return symbol + 0; + } + var randValue = faker.datatype.number({ max, min }); + return symbol + (Math.round(randValue * Math.pow(10, dec)) / Math.pow(10, dec)).toFixed(dec); + }; + self2.productAdjective = function() { + return faker.random.arrayElement(faker.definitions.commerce.product_name.adjective); + }; + self2.productMaterial = function() { + return faker.random.arrayElement(faker.definitions.commerce.product_name.material); + }; + self2.product = function() { + return faker.random.arrayElement(faker.definitions.commerce.product_name.product); + }; + self2.productDescription = function() { + return faker.random.arrayElement(faker.definitions.commerce.product_description); + }; + return self2; + }; + module2["exports"] = Commerce; + } +}); + +// ../../node_modules/@faker-js/faker/lib/system.js +var require_system = __commonJS({ + "../../node_modules/@faker-js/faker/lib/system.js"(exports2, module2) { + var commonFileTypes = [ + "video", + "audio", + "image", + "text", + "application" + ]; + var commonMimeTypes = [ + "application/pdf", + "audio/mpeg", + "audio/wav", + "image/png", + "image/jpeg", + "image/gif", + "video/mp4", + "video/mpeg", + "text/html" + ]; + function setToArray(set) { + if (Array.from) { + return Array.from(set); + } + var array = []; + set.forEach(function(item) { + array.push(item); + }); + return array; + } + function System(faker) { + this.fileName = function() { + var str = faker.random.words(); + str = str.toLowerCase().replace(/\W/g, "_") + "." + faker.system.fileExt(); + ; + return str; + }; + this.commonFileName = function(ext) { + var str = faker.random.words(); + str = str.toLowerCase().replace(/\W/g, "_"); + str += "." + (ext || faker.system.commonFileExt()); + return str; + }; + this.mimeType = function() { + var typeSet = /* @__PURE__ */ new Set(); + var extensionSet = /* @__PURE__ */ new Set(); + var mimeTypes = faker.definitions.system.mimeTypes; + Object.keys(mimeTypes).forEach(function(m) { + var type = m.split("/")[0]; + typeSet.add(type); + if (mimeTypes[m].extensions instanceof Array) { + mimeTypes[m].extensions.forEach(function(ext) { + extensionSet.add(ext); + }); + } + }); + var types = setToArray(typeSet); + var extensions = setToArray(extensionSet); + var mimeTypeKeys = Object.keys(faker.definitions.system.mimeTypes); + return faker.random.arrayElement(mimeTypeKeys); + }; + this.commonFileType = function() { + return faker.random.arrayElement(commonFileTypes); + }; + this.commonFileExt = function() { + return faker.system.fileExt(faker.random.arrayElement(commonMimeTypes)); + }; + this.fileType = function() { + var typeSet = /* @__PURE__ */ new Set(); + var extensionSet = /* @__PURE__ */ new Set(); + var mimeTypes = faker.definitions.system.mimeTypes; + Object.keys(mimeTypes).forEach(function(m) { + var type = m.split("/")[0]; + typeSet.add(type); + if (mimeTypes[m].extensions instanceof Array) { + mimeTypes[m].extensions.forEach(function(ext) { + extensionSet.add(ext); + }); + } + }); + var types = setToArray(typeSet); + var extensions = setToArray(extensionSet); + var mimeTypeKeys = Object.keys(faker.definitions.system.mimeTypes); + return faker.random.arrayElement(types); + }; + this.fileExt = function(mimeType) { + var typeSet = /* @__PURE__ */ new Set(); + var extensionSet = /* @__PURE__ */ new Set(); + var mimeTypes = faker.definitions.system.mimeTypes; + Object.keys(mimeTypes).forEach(function(m) { + var type = m.split("/")[0]; + typeSet.add(type); + if (mimeTypes[m].extensions instanceof Array) { + mimeTypes[m].extensions.forEach(function(ext) { + extensionSet.add(ext); + }); + } + }); + var types = setToArray(typeSet); + var extensions = setToArray(extensionSet); + var mimeTypeKeys = Object.keys(faker.definitions.system.mimeTypes); + if (mimeType) { + var mimes = faker.definitions.system.mimeTypes; + return faker.random.arrayElement(mimes[mimeType].extensions); + } + return faker.random.arrayElement(extensions); + }; + this.directoryPath = function() { + var paths = faker.definitions.system.directoryPaths; + return faker.random.arrayElement(paths); + }; + this.filePath = function() { + return faker.fake("{{system.directoryPath}}/{{system.fileName}}.{{system.fileExt}}"); + }; + this.semver = function() { + return [ + faker.datatype.number(9), + faker.datatype.number(9), + faker.datatype.number(9) + ].join("."); + }; + } + module2["exports"] = System; + } +}); + +// ../../node_modules/@faker-js/faker/lib/git.js +var require_git = __commonJS({ + "../../node_modules/@faker-js/faker/lib/git.js"(exports2, module2) { + var Git = function(faker) { + var self2 = this; + var f = faker.fake; + var hexChars = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f"]; + self2.branch = function() { + var noun = faker.hacker.noun().replace(" ", "-"); + var verb = faker.hacker.verb().replace(" ", "-"); + return noun + "-" + verb; + }; + self2.commitEntry = function(options) { + options = options || {}; + var entry = "commit {{git.commitSha}}\r\n"; + if (options.merge || faker.datatype.number({ min: 0, max: 4 }) === 0) { + entry += "Merge: {{git.shortSha}} {{git.shortSha}}\r\n"; + } + entry += "Author: {{name.firstName}} {{name.lastName}} <{{internet.email}}>\r\n"; + entry += "Date: " + faker.date.recent().toString() + "\r\n"; + entry += "\r\n\xA0\xA0\xA0\xA0{{git.commitMessage}}\r\n"; + return f(entry); + }; + self2.commitMessage = function() { + var format = "{{hacker.verb}} {{hacker.adjective}} {{hacker.noun}}"; + return f(format); + }; + self2.commitSha = function() { + var commit = ""; + for (var i = 0; i < 40; i++) { + commit += faker.random.arrayElement(hexChars); + } + return commit; + }; + self2.shortSha = function() { + var shortSha = ""; + for (var i = 0; i < 7; i++) { + shortSha += faker.random.arrayElement(hexChars); + } + return shortSha; + }; + return self2; + }; + module2["exports"] = Git; + } +}); + +// ../../node_modules/@faker-js/faker/lib/vehicle.js +var require_vehicle = __commonJS({ + "../../node_modules/@faker-js/faker/lib/vehicle.js"(exports2, module2) { + var Vehicle = function(faker) { + var self2 = this; + var fake = faker.fake; + self2.vehicle = function() { + return fake("{{vehicle.manufacturer}} {{vehicle.model}}"); + }; + self2.vehicle.schema = { + "description": "Generates a random vehicle.", + "sampleResults": ["BMW Explorer", "Ford Camry", "Lamborghini Ranchero"] + }; + self2.manufacturer = function() { + return faker.random.arrayElement(faker.definitions.vehicle.manufacturer); + }; + self2.manufacturer.schema = { + "description": "Generates a manufacturer name.", + "sampleResults": ["Ford", "Jeep", "Tesla"] + }; + self2.model = function() { + return faker.random.arrayElement(faker.definitions.vehicle.model); + }; + self2.model.schema = { + "description": "Generates a vehicle model.", + "sampleResults": ["Explorer", "Camry", "Ranchero"] + }; + self2.type = function() { + return faker.random.arrayElement(faker.definitions.vehicle.type); + }; + self2.type.schema = { + "description": "Generates a vehicle type.", + "sampleResults": ["Coupe", "Convertable", "Sedan", "SUV"] + }; + self2.fuel = function() { + return faker.random.arrayElement(faker.definitions.vehicle.fuel); + }; + self2.fuel.schema = { + "description": "Generates a fuel type.", + "sampleResults": ["Electric", "Gasoline", "Diesel"] + }; + self2.vin = function() { + var bannedChars = ["o", "i", "q"]; + return (faker.random.alphaNumeric(10, { bannedChars }) + faker.random.alpha({ count: 1, upcase: true, bannedChars }) + faker.random.alphaNumeric(1, { bannedChars }) + faker.datatype.number({ min: 1e4, max: 1e5 })).toUpperCase(); + }; + self2.vin.schema = { + "description": "Generates a valid VIN number.", + "sampleResults": ["YV1MH682762184654", "3C7WRMBJ2EG208836"] + }; + self2.color = function() { + return fake("{{commerce.color}}"); + }; + self2.color.schema = { + "description": "Generates a color", + "sampleResults": ["red", "white", "black"] + }; + self2.vrm = function() { + return (faker.random.alpha({ count: 2, upcase: true }) + faker.datatype.number({ min: 0, max: 9 }) + faker.datatype.number({ min: 0, max: 9 }) + faker.random.alpha({ count: 3, upcase: true })).toUpperCase(); + }; + self2.vrm.schema = { + "description": "Generates a vehicle vrm", + "sampleResults": ["MF56UPA", "GL19AAQ", "SF20TTA"] + }; + self2.bicycle = function() { + return faker.random.arrayElement(faker.definitions.vehicle.bicycle_type); + }; + self2.bicycle.schema = { + "description": "Generates a type of bicycle", + "sampleResults": ["Adventure Road Bicycle", "City Bicycle", "Recumbent Bicycle"] + }; + }; + module2["exports"] = Vehicle; + } +}); + +// ../../node_modules/@faker-js/faker/lib/music.js +var require_music = __commonJS({ + "../../node_modules/@faker-js/faker/lib/music.js"(exports2, module2) { + var Music = function(faker) { + var self2 = this; + self2.genre = function() { + return faker.random.arrayElement(faker.definitions.music.genre); + }; + self2.genre.schema = { + "description": "Generates a genre.", + "sampleResults": ["Rock", "Metal", "Pop"] + }; + }; + module2["exports"] = Music; + } +}); + +// ../../node_modules/@faker-js/faker/lib/datatype.js +var require_datatype = __commonJS({ + "../../node_modules/@faker-js/faker/lib/datatype.js"(exports2, module2) { + function Datatype(faker, seed) { + if (Array.isArray(seed) && seed.length) { + faker.mersenne.seed_array(seed); + } else if (!isNaN(seed)) { + faker.mersenne.seed(seed); + } + this.number = function(options) { + if (typeof options === "number") { + options = { + max: options + }; + } + options = options || {}; + if (typeof options.min === "undefined") { + options.min = 0; + } + if (typeof options.max === "undefined") { + options.max = 99999; + } + if (typeof options.precision === "undefined") { + options.precision = 1; + } + var max = options.max; + if (max >= 0) { + max += options.precision; + } + var randomNumber = Math.floor( + faker.mersenne.rand(max / options.precision, options.min / options.precision) + ); + randomNumber = randomNumber / (1 / options.precision); + return randomNumber; + }; + this.float = function(options) { + if (typeof options === "number") { + options = { + precision: options + }; + } + options = options || {}; + var opts = {}; + for (var p in options) { + opts[p] = options[p]; + } + if (typeof opts.precision === "undefined") { + opts.precision = 0.01; + } + return faker.datatype.number(opts); + }; + this.datetime = function(options) { + if (typeof options === "number") { + options = { + max: options + }; + } + var minMax = 864e13; + options = options || {}; + if (typeof options.min === "undefined" || options.min < minMax * -1) { + options.min = (/* @__PURE__ */ new Date()).setFullYear(1990, 1, 1); + } + if (typeof options.max === "undefined" || options.max > minMax) { + options.max = (/* @__PURE__ */ new Date()).setFullYear(2100, 1, 1); + } + var random = faker.datatype.number(options); + return new Date(random); + }; + this.string = function(length) { + if (length === void 0) { + length = 10; + } + var maxLength = Math.pow(2, 20); + if (length >= maxLength) { + length = maxLength; + } + var charCodeOption = { + min: 33, + max: 125 + }; + var returnString = ""; + for (var i = 0; i < length; i++) { + returnString += String.fromCharCode(faker.datatype.number(charCodeOption)); + } + return returnString; + }; + this.uuid = function() { + var RFC4122_TEMPLATE = "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx"; + var replacePlaceholders = function(placeholder) { + var random = faker.datatype.number({ min: 0, max: 15 }); + var value = placeholder == "x" ? random : random & 3 | 8; + return value.toString(16); + }; + return RFC4122_TEMPLATE.replace(/[xy]/g, replacePlaceholders); + }; + this.boolean = function() { + return !!faker.datatype.number(1); + }; + this.hexaDecimal = function hexaDecimal(count) { + if (typeof count === "undefined") { + count = 1; + } + var wholeString = ""; + for (var i = 0; i < count; i++) { + wholeString += faker.random.arrayElement(["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f", "A", "B", "C", "D", "E", "F"]); + } + return "0x" + wholeString; + }; + this.json = function json() { + var properties = ["foo", "bar", "bike", "a", "b", "name", "prop"]; + var returnObject = {}; + properties.forEach(function(prop) { + returnObject[prop] = faker.datatype.boolean() ? faker.datatype.string() : faker.datatype.number(); + }); + return JSON.stringify(returnObject); + }; + this.array = function array(length) { + if (length === void 0) { + length = 10; + } + var returnArray = new Array(length); + for (var i = 0; i < length; i++) { + returnArray[i] = faker.datatype.boolean() ? faker.datatype.string() : faker.datatype.number(); + } + return returnArray; + }; + return this; + } + module2["exports"] = Datatype; + } +}); + +// ../../node_modules/@faker-js/faker/lib/index.js +var require_lib4 = __commonJS({ + "../../node_modules/@faker-js/faker/lib/index.js"(exports2, module2) { + function Faker(opts) { + var self2 = this; + opts = opts || {}; + var locales = self2.locales || opts.locales || {}; + var locale = self2.locale || opts.locale || "en"; + var localeFallback = self2.localeFallback || opts.localeFallback || "en"; + self2.locales = locales; + self2.locale = locale; + self2.localeFallback = localeFallback; + self2.definitions = {}; + var _definitions = { + "name": ["first_name", "last_name", "prefix", "suffix", "binary_gender", "gender", "title", "male_prefix", "female_prefix", "male_first_name", "female_first_name", "male_middle_name", "female_middle_name", "male_last_name", "female_last_name"], + "address": ["city_name", "city_prefix", "city_suffix", "street_suffix", "county", "country", "country_code", "country_code_alpha_3", "state", "state_abbr", "street_prefix", "postcode", "postcode_by_state", "direction", "direction_abbr", "time_zone"], + "animal": ["dog", "cat", "snake", "bear", "lion", "cetacean", "insect", "crocodilia", "cow", "bird", "fish", "rabbit", "horse", "type"], + "company": ["adjective", "noun", "descriptor", "bs_adjective", "bs_noun", "bs_verb", "suffix"], + "lorem": ["words"], + "hacker": ["abbreviation", "adjective", "noun", "verb", "ingverb", "phrase"], + "phone_number": ["formats"], + "finance": ["account_type", "transaction_type", "currency", "iban", "credit_card"], + "internet": ["avatar_uri", "domain_suffix", "free_email", "example_email", "password"], + "commerce": ["color", "department", "product_name", "price", "categories", "product_description"], + "database": ["collation", "column", "engine", "type"], + "system": ["mimeTypes", "directoryPaths"], + "date": ["month", "weekday"], + "vehicle": ["vehicle", "manufacturer", "model", "type", "fuel", "vin", "color"], + "music": ["genre"], + "title": "", + "separator": "" + }; + Object.keys(_definitions).forEach(function(d) { + if (typeof self2.definitions[d] === "undefined") { + self2.definitions[d] = {}; + } + if (typeof _definitions[d] === "string") { + self2.definitions[d] = _definitions[d]; + return; + } + _definitions[d].forEach(function(p) { + Object.defineProperty(self2.definitions[d], p, { + get: function() { + if (typeof self2.locales[self2.locale][d] === "undefined" || typeof self2.locales[self2.locale][d][p] === "undefined") { + return self2.locales[localeFallback][d][p]; + } else { + return self2.locales[self2.locale][d][p]; + } + } + }); + }); + }); + var Fake = require_fake(); + self2.fake = new Fake(self2).fake; + var Unique = require_unique2(); + self2.unique = new Unique(self2).unique; + var Mersenne = require_mersenne2(); + self2.mersenne = new Mersenne(); + var Random = require_random(); + self2.random = new Random(self2); + var Helpers = require_helpers(); + self2.helpers = new Helpers(self2); + var Name = require_name(); + self2.name = new Name(self2); + var Address = require_address(); + self2.address = new Address(self2); + var Animal = require_animal(); + self2.animal = new Animal(self2); + var Company = require_company(); + self2.company = new Company(self2); + var Finance = require_finance(); + self2.finance = new Finance(self2); + var Image = require_image(); + self2.image = new Image(self2); + var Lorem = require_lorem(); + self2.lorem = new Lorem(self2); + var Hacker = require_hacker(); + self2.hacker = new Hacker(self2); + var Internet = require_internet(); + self2.internet = new Internet(self2); + var Database = require_database(); + self2.database = new Database(self2); + var Phone = require_phone_number(); + self2.phone = new Phone(self2); + var _Date = require_date(); + self2.date = new _Date(self2); + var _Time = require_time(); + self2.time = new _Time(self2); + var Commerce = require_commerce(); + self2.commerce = new Commerce(self2); + var System = require_system(); + self2.system = new System(self2); + var Git = require_git(); + self2.git = new Git(self2); + var Vehicle = require_vehicle(); + self2.vehicle = new Vehicle(self2); + var Music = require_music(); + self2.music = new Music(self2); + var Datatype = require_datatype(); + self2.datatype = new Datatype(self2); + } + Faker.prototype.setLocale = function(locale) { + this.locale = locale; + }; + Faker.prototype.seed = function(value) { + var Random = require_random(); + var Datatype = require_datatype(); + this.seedValue = value; + this.random = new Random(this, this.seedValue); + this.datatype = new Datatype(this, this.seedValue); + }; + module2["exports"] = Faker; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/address/city_prefix.js +var require_city_prefix = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/address/city_prefix.js"(exports2, module2) { + module2["exports"] = [ + "North", + "East", + "West", + "South", + "New", + "Lake", + "Port" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/address/city_suffix.js +var require_city_suffix = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/address/city_suffix.js"(exports2, module2) { + module2["exports"] = [ + "town", + "ton", + "land", + "ville", + "berg", + "burgh", + "borough", + "bury", + "view", + "port", + "mouth", + "stad", + "furt", + "chester", + "mouth", + "fort", + "haven", + "side", + "shire" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/address/city_name.js +var require_city_name = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/address/city_name.js"(exports2, module2) { + module2.exports = [ + "Abilene", + "Akron", + "Alafaya", + "Alameda", + "Albany", + "Albany", + "Albany", + "Albuquerque", + "Alexandria", + "Alexandria", + "Alhambra", + "Aliso Viejo", + "Allen", + "Allentown", + "Aloha", + "Alpharetta", + "Altadena", + "Altamonte Springs", + "Altoona", + "Amarillo", + "Ames", + "Anaheim", + "Anchorage", + "Anderson", + "Ankeny", + "Ann Arbor", + "Annandale", + "Antelope", + "Antioch", + "Apex", + "Apopka", + "Apple Valley", + "Apple Valley", + "Appleton", + "Arcadia", + "Arden-Arcade", + "Arecibo", + "Arlington", + "Arlington", + "Arlington", + "Arlington Heights", + "Arvada", + "Ashburn", + "Asheville", + "Aspen Hill", + "Atascocita", + "Athens-Clarke County", + "Atlanta", + "Attleboro", + "Auburn", + "Auburn", + "Augusta-Richmond County", + "Aurora", + "Aurora", + "Austin", + "Avondale", + "Azusa", + "Bakersfield", + "Baldwin Park", + "Baltimore", + "Barnstable Town", + "Bartlett", + "Bartlett", + "Baton Rouge", + "Battle Creek", + "Bayamon", + "Bayonne", + "Baytown", + "Beaumont", + "Beaumont", + "Beavercreek", + "Beaverton", + "Bedford", + "Bel Air South", + "Bell Gardens", + "Belleville", + "Bellevue", + "Bellevue", + "Bellflower", + "Bellingham", + "Bend", + "Bentonville", + "Berkeley", + "Berwyn", + "Bethesda", + "Bethlehem", + "Billings", + "Biloxi", + "Binghamton", + "Birmingham", + "Bismarck", + "Blacksburg", + "Blaine", + "Bloomington", + "Bloomington", + "Bloomington", + "Blue Springs", + "Boca Raton", + "Boise City", + "Bolingbrook", + "Bonita Springs", + "Bossier City", + "Boston", + "Bothell", + "Boulder", + "Bountiful", + "Bowie", + "Bowling Green", + "Boynton Beach", + "Bozeman", + "Bradenton", + "Brandon", + "Brentwood", + "Brentwood", + "Bridgeport", + "Bristol", + "Brockton", + "Broken Arrow", + "Brookhaven", + "Brookline", + "Brooklyn Park", + "Broomfield", + "Brownsville", + "Bryan", + "Buckeye", + "Buena Park", + "Buffalo", + "Buffalo Grove", + "Burbank", + "Burien", + "Burke", + "Burleson", + "Burlington", + "Burlington", + "Burnsville", + "Caguas", + "Caldwell", + "Camarillo", + "Cambridge", + "Camden", + "Canton", + "Cape Coral", + "Carlsbad", + "Carmel", + "Carmichael", + "Carolina", + "Carrollton", + "Carson", + "Carson City", + "Cary", + "Casa Grande", + "Casas Adobes", + "Casper", + "Castle Rock", + "Castro Valley", + "Catalina Foothills", + "Cathedral City", + "Catonsville", + "Cedar Hill", + "Cedar Park", + "Cedar Rapids", + "Centennial", + "Centreville", + "Ceres", + "Cerritos", + "Champaign", + "Chandler", + "Chapel Hill", + "Charleston", + "Charleston", + "Charlotte", + "Charlottesville", + "Chattanooga", + "Cheektowaga", + "Chesapeake", + "Chesterfield", + "Cheyenne", + "Chicago", + "Chico", + "Chicopee", + "Chino", + "Chino Hills", + "Chula Vista", + "Cicero", + "Cincinnati", + "Citrus Heights", + "Clarksville", + "Clearwater", + "Cleveland", + "Cleveland", + "Cleveland Heights", + "Clifton", + "Clovis", + "Coachella", + "Coconut Creek", + "Coeur d'Alene", + "College Station", + "Collierville", + "Colorado Springs", + "Colton", + "Columbia", + "Columbia", + "Columbia", + "Columbus", + "Columbus", + "Columbus", + "Commerce City", + "Compton", + "Concord", + "Concord", + "Concord", + "Conroe", + "Conway", + "Coon Rapids", + "Coral Gables", + "Coral Springs", + "Corona", + "Corpus Christi", + "Corvallis", + "Costa Mesa", + "Council Bluffs", + "Country Club", + "Covina", + "Cranston", + "Cupertino", + "Cutler Bay", + "Cuyahoga Falls", + "Cypress", + "Dale City", + "Dallas", + "Daly City", + "Danbury", + "Danville", + "Danville", + "Davenport", + "Davie", + "Davis", + "Dayton", + "Daytona Beach", + "DeKalb", + "DeSoto", + "Dearborn", + "Dearborn Heights", + "Decatur", + "Decatur", + "Deerfield Beach", + "Delano", + "Delray Beach", + "Deltona", + "Denton", + "Denver", + "Des Moines", + "Des Plaines", + "Detroit", + "Diamond Bar", + "Doral", + "Dothan", + "Downers Grove", + "Downey", + "Draper", + "Dublin", + "Dublin", + "Dubuque", + "Duluth", + "Dundalk", + "Dunwoody", + "Durham", + "Eagan", + "East Hartford", + "East Honolulu", + "East Lansing", + "East Los Angeles", + "East Orange", + "East Providence", + "Eastvale", + "Eau Claire", + "Eden Prairie", + "Edina", + "Edinburg", + "Edmond", + "El Cajon", + "El Centro", + "El Dorado Hills", + "El Monte", + "El Paso", + "Elgin", + "Elizabeth", + "Elk Grove", + "Elkhart", + "Ellicott City", + "Elmhurst", + "Elyria", + "Encinitas", + "Enid", + "Enterprise", + "Erie", + "Escondido", + "Euclid", + "Eugene", + "Euless", + "Evanston", + "Evansville", + "Everett", + "Everett", + "Fairfield", + "Fairfield", + "Fall River", + "Fargo", + "Farmington", + "Farmington Hills", + "Fayetteville", + "Fayetteville", + "Federal Way", + "Findlay", + "Fishers", + "Flagstaff", + "Flint", + "Florence-Graham", + "Florin", + "Florissant", + "Flower Mound", + "Folsom", + "Fond du Lac", + "Fontana", + "Fort Collins", + "Fort Lauderdale", + "Fort Myers", + "Fort Pierce", + "Fort Smith", + "Fort Wayne", + "Fort Worth", + "Fountain Valley", + "Fountainebleau", + "Framingham", + "Franklin", + "Frederick", + "Freeport", + "Fremont", + "Fresno", + "Frisco", + "Fullerton", + "Gainesville", + "Gaithersburg", + "Galveston", + "Garden Grove", + "Gardena", + "Garland", + "Gary", + "Gastonia", + "Georgetown", + "Germantown", + "Gilbert", + "Gilroy", + "Glen Burnie", + "Glendale", + "Glendale", + "Glendora", + "Glenview", + "Goodyear", + "Grand Forks", + "Grand Island", + "Grand Junction", + "Grand Prairie", + "Grand Rapids", + "Grapevine", + "Great Falls", + "Greeley", + "Green Bay", + "Greensboro", + "Greenville", + "Greenville", + "Greenwood", + "Gresham", + "Guaynabo", + "Gulfport", + "Hacienda Heights", + "Hackensack", + "Haltom City", + "Hamilton", + "Hammond", + "Hampton", + "Hanford", + "Harlingen", + "Harrisburg", + "Harrisonburg", + "Hartford", + "Hattiesburg", + "Haverhill", + "Hawthorne", + "Hayward", + "Hemet", + "Hempstead", + "Henderson", + "Hendersonville", + "Hesperia", + "Hialeah", + "Hicksville", + "High Point", + "Highland", + "Highlands Ranch", + "Hillsboro", + "Hilo", + "Hoboken", + "Hoffman Estates", + "Hollywood", + "Homestead", + "Honolulu", + "Hoover", + "Houston", + "Huntersville", + "Huntington", + "Huntington Beach", + "Huntington Park", + "Huntsville", + "Hutchinson", + "Idaho Falls", + "Independence", + "Indianapolis", + "Indio", + "Inglewood", + "Iowa City", + "Irondequoit", + "Irvine", + "Irving", + "Jackson", + "Jackson", + "Jacksonville", + "Jacksonville", + "Janesville", + "Jefferson City", + "Jeffersonville", + "Jersey City", + "Johns Creek", + "Johnson City", + "Joliet", + "Jonesboro", + "Joplin", + "Jupiter", + "Jurupa Valley", + "Kalamazoo", + "Kannapolis", + "Kansas City", + "Kansas City", + "Kearny", + "Keller", + "Kendale Lakes", + "Kendall", + "Kenner", + "Kennewick", + "Kenosha", + "Kent", + "Kentwood", + "Kettering", + "Killeen", + "Kingsport", + "Kirkland", + "Kissimmee", + "Knoxville", + "Kokomo", + "La Crosse", + "La Habra", + "La Mesa", + "La Mirada", + "Lacey", + "Lafayette", + "Lafayette", + "Laguna Niguel", + "Lake Charles", + "Lake Elsinore", + "Lake Forest", + "Lake Havasu City", + "Lake Ridge", + "Lakeland", + "Lakeville", + "Lakewood", + "Lakewood", + "Lakewood", + "Lakewood", + "Lakewood", + "Lancaster", + "Lancaster", + "Lansing", + "Laredo", + "Largo", + "Las Cruces", + "Las Vegas", + "Lauderhill", + "Lawrence", + "Lawrence", + "Lawrence", + "Lawton", + "Layton", + "League City", + "Lee's Summit", + "Leesburg", + "Lehi", + "Lehigh Acres", + "Lenexa", + "Levittown", + "Levittown", + "Lewisville", + "Lexington-Fayette", + "Lincoln", + "Lincoln", + "Linden", + "Little Rock", + "Littleton", + "Livermore", + "Livonia", + "Lodi", + "Logan", + "Lombard", + "Lompoc", + "Long Beach", + "Longmont", + "Longview", + "Lorain", + "Los Angeles", + "Louisville/Jefferson County", + "Loveland", + "Lowell", + "Lubbock", + "Lynchburg", + "Lynn", + "Lynwood", + "Macon-Bibb County", + "Madera", + "Madison", + "Madison", + "Malden", + "Manchester", + "Manhattan", + "Mansfield", + "Mansfield", + "Manteca", + "Maple Grove", + "Margate", + "Maricopa", + "Marietta", + "Marysville", + "Mayaguez", + "McAllen", + "McKinney", + "McLean", + "Medford", + "Medford", + "Melbourne", + "Memphis", + "Menifee", + "Mentor", + "Merced", + "Meriden", + "Meridian", + "Mesa", + "Mesquite", + "Metairie", + "Methuen Town", + "Miami", + "Miami Beach", + "Miami Gardens", + "Middletown", + "Middletown", + "Midland", + "Midland", + "Midwest City", + "Milford", + "Millcreek", + "Milpitas", + "Milwaukee", + "Minneapolis", + "Minnetonka", + "Minot", + "Miramar", + "Mishawaka", + "Mission", + "Mission Viejo", + "Missoula", + "Missouri City", + "Mobile", + "Modesto", + "Moline", + "Monroe", + "Montebello", + "Monterey Park", + "Montgomery", + "Moore", + "Moreno Valley", + "Morgan Hill", + "Mount Pleasant", + "Mount Prospect", + "Mount Vernon", + "Mountain View", + "Muncie", + "Murfreesboro", + "Murray", + "Murrieta", + "Nampa", + "Napa", + "Naperville", + "Nashua", + "Nashville-Davidson", + "National City", + "New Bedford", + "New Braunfels", + "New Britain", + "New Brunswick", + "New Haven", + "New Orleans", + "New Rochelle", + "New York", + "Newark", + "Newark", + "Newark", + "Newport Beach", + "Newport News", + "Newton", + "Niagara Falls", + "Noblesville", + "Norfolk", + "Normal", + "Norman", + "North Bethesda", + "North Charleston", + "North Highlands", + "North Las Vegas", + "North Lauderdale", + "North Little Rock", + "North Miami", + "North Miami Beach", + "North Port", + "North Richland Hills", + "Norwalk", + "Norwalk", + "Novato", + "Novi", + "O'Fallon", + "Oak Lawn", + "Oak Park", + "Oakland", + "Oakland Park", + "Ocala", + "Oceanside", + "Odessa", + "Ogden", + "Oklahoma City", + "Olathe", + "Olympia", + "Omaha", + "Ontario", + "Orange", + "Orem", + "Orland Park", + "Orlando", + "Oro Valley", + "Oshkosh", + "Overland Park", + "Owensboro", + "Oxnard", + "Palatine", + "Palm Bay", + "Palm Beach Gardens", + "Palm Coast", + "Palm Desert", + "Palm Harbor", + "Palm Springs", + "Palmdale", + "Palo Alto", + "Paradise", + "Paramount", + "Parker", + "Parma", + "Pasadena", + "Pasadena", + "Pasco", + "Passaic", + "Paterson", + "Pawtucket", + "Peabody", + "Pearl City", + "Pearland", + "Pembroke Pines", + "Pensacola", + "Peoria", + "Peoria", + "Perris", + "Perth Amboy", + "Petaluma", + "Pflugerville", + "Pharr", + "Philadelphia", + "Phoenix", + "Pico Rivera", + "Pine Bluff", + "Pine Hills", + "Pinellas Park", + "Pittsburg", + "Pittsburgh", + "Pittsfield", + "Placentia", + "Plainfield", + "Plainfield", + "Plano", + "Plantation", + "Pleasanton", + "Plymouth", + "Pocatello", + "Poinciana", + "Pomona", + "Pompano Beach", + "Ponce", + "Pontiac", + "Port Arthur", + "Port Charlotte", + "Port Orange", + "Port St. Lucie", + "Portage", + "Porterville", + "Portland", + "Portland", + "Portsmouth", + "Potomac", + "Poway", + "Providence", + "Provo", + "Pueblo", + "Quincy", + "Racine", + "Raleigh", + "Rancho Cordova", + "Rancho Cucamonga", + "Rancho Palos Verdes", + "Rancho Santa Margarita", + "Rapid City", + "Reading", + "Redding", + "Redlands", + "Redmond", + "Redondo Beach", + "Redwood City", + "Reno", + "Renton", + "Reston", + "Revere", + "Rialto", + "Richardson", + "Richland", + "Richmond", + "Richmond", + "Rio Rancho", + "Riverside", + "Riverton", + "Riverview", + "Roanoke", + "Rochester", + "Rochester", + "Rochester Hills", + "Rock Hill", + "Rockford", + "Rocklin", + "Rockville", + "Rockwall", + "Rocky Mount", + "Rogers", + "Rohnert Park", + "Rosemead", + "Roseville", + "Roseville", + "Roswell", + "Roswell", + "Round Rock", + "Rowland Heights", + "Rowlett", + "Royal Oak", + "Sacramento", + "Saginaw", + "Salem", + "Salem", + "Salina", + "Salinas", + "Salt Lake City", + "Sammamish", + "San Angelo", + "San Antonio", + "San Bernardino", + "San Bruno", + "San Buenaventura (Ventura)", + "San Clemente", + "San Diego", + "San Francisco", + "San Jacinto", + "San Jose", + "San Juan", + "San Leandro", + "San Luis Obispo", + "San Marcos", + "San Marcos", + "San Mateo", + "San Rafael", + "San Ramon", + "San Tan Valley", + "Sandy", + "Sandy Springs", + "Sanford", + "Santa Ana", + "Santa Barbara", + "Santa Clara", + "Santa Clarita", + "Santa Cruz", + "Santa Fe", + "Santa Maria", + "Santa Monica", + "Santa Rosa", + "Santee", + "Sarasota", + "Savannah", + "Sayreville", + "Schaumburg", + "Schenectady", + "Scottsdale", + "Scranton", + "Seattle", + "Severn", + "Shawnee", + "Sheboygan", + "Shoreline", + "Shreveport", + "Sierra Vista", + "Silver Spring", + "Simi Valley", + "Sioux City", + "Sioux Falls", + "Skokie", + "Smyrna", + "Smyrna", + "Somerville", + "South Bend", + "South Gate", + "South Hill", + "South Jordan", + "South San Francisco", + "South Valley", + "South Whittier", + "Southaven", + "Southfield", + "Sparks", + "Spokane", + "Spokane Valley", + "Spring", + "Spring Hill", + "Spring Valley", + "Springdale", + "Springfield", + "Springfield", + "Springfield", + "Springfield", + "Springfield", + "St. Charles", + "St. Clair Shores", + "St. Cloud", + "St. Cloud", + "St. George", + "St. Joseph", + "St. Louis", + "St. Louis Park", + "St. Paul", + "St. Peters", + "St. Petersburg", + "Stamford", + "State College", + "Sterling Heights", + "Stillwater", + "Stockton", + "Stratford", + "Strongsville", + "Suffolk", + "Sugar Land", + "Summerville", + "Sunnyvale", + "Sunrise", + "Sunrise Manor", + "Surprise", + "Syracuse", + "Tacoma", + "Tallahassee", + "Tamarac", + "Tamiami", + "Tampa", + "Taunton", + "Taylor", + "Taylorsville", + "Temecula", + "Tempe", + "Temple", + "Terre Haute", + "Texas City", + "The Hammocks", + "The Villages", + "The Woodlands", + "Thornton", + "Thousand Oaks", + "Tigard", + "Tinley Park", + "Titusville", + "Toledo", + "Toms River", + "Tonawanda", + "Topeka", + "Torrance", + "Town 'n' Country", + "Towson", + "Tracy", + "Trenton", + "Troy", + "Troy", + "Trujillo Alto", + "Tuckahoe", + "Tucson", + "Tulare", + "Tulsa", + "Turlock", + "Tuscaloosa", + "Tustin", + "Twin Falls", + "Tyler", + "Union City", + "Union City", + "University", + "Upland", + "Urbana", + "Urbandale", + "Utica", + "Vacaville", + "Valdosta", + "Vallejo", + "Vancouver", + "Victoria", + "Victorville", + "Vineland", + "Virginia Beach", + "Visalia", + "Vista", + "Waco", + "Waipahu", + "Waldorf", + "Walnut Creek", + "Waltham", + "Warner Robins", + "Warren", + "Warwick", + "Washington", + "Waterbury", + "Waterloo", + "Watsonville", + "Waukegan", + "Waukesha", + "Wauwatosa", + "Wellington", + "Wesley Chapel", + "West Allis", + "West Babylon", + "West Covina", + "West Des Moines", + "West Hartford", + "West Haven", + "West Jordan", + "West Lafayette", + "West New York", + "West Palm Beach", + "West Sacramento", + "West Seneca", + "West Valley City", + "Westfield", + "Westland", + "Westminster", + "Westminster", + "Weston", + "Weymouth Town", + "Wheaton", + "Wheaton", + "White Plains", + "Whittier", + "Wichita", + "Wichita Falls", + "Wilmington", + "Wilmington", + "Wilson", + "Winston-Salem", + "Woodbury", + "Woodland", + "Worcester", + "Wylie", + "Wyoming", + "Yakima", + "Yonkers", + "Yorba Linda", + "York", + "Youngstown", + "Yuba City", + "Yucaipa", + "Yuma" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/address/county.js +var require_county = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/address/county.js"(exports2, module2) { + module2["exports"] = [ + "Avon", + "Bedfordshire", + "Berkshire", + "Borders", + "Buckinghamshire", + "Cambridgeshire" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/address/country.js +var require_country = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/address/country.js"(exports2, module2) { + module2["exports"] = [ + "Afghanistan", + "Albania", + "Algeria", + "American Samoa", + "Andorra", + "Angola", + "Anguilla", + "Antarctica (the territory South of 60 deg S)", + "Antigua and Barbuda", + "Argentina", + "Armenia", + "Aruba", + "Australia", + "Austria", + "Azerbaijan", + "Bahamas", + "Bahrain", + "Bangladesh", + "Barbados", + "Belarus", + "Belgium", + "Belize", + "Benin", + "Bermuda", + "Bhutan", + "Bolivia", + "Bosnia and Herzegovina", + "Botswana", + "Bouvet Island (Bouvetoya)", + "Brazil", + "British Indian Ocean Territory (Chagos Archipelago)", + "Brunei Darussalam", + "Bulgaria", + "Burkina Faso", + "Burundi", + "Cambodia", + "Cameroon", + "Canada", + "Cape Verde", + "Cayman Islands", + "Central African Republic", + "Chad", + "Chile", + "China", + "Christmas Island", + "Cocos (Keeling) Islands", + "Colombia", + "Comoros", + "Congo", + "Cook Islands", + "Costa Rica", + "Cote d'Ivoire", + "Croatia", + "Cuba", + "Cyprus", + "Czech Republic", + "Denmark", + "Djibouti", + "Dominica", + "Dominican Republic", + "Ecuador", + "Egypt", + "El Salvador", + "Equatorial Guinea", + "Eritrea", + "Estonia", + "Ethiopia", + "Faroe Islands", + "Falkland Islands (Malvinas)", + "Fiji", + "Finland", + "France", + "French Guiana", + "French Polynesia", + "French Southern Territories", + "Gabon", + "Gambia", + "Georgia", + "Germany", + "Ghana", + "Gibraltar", + "Greece", + "Greenland", + "Grenada", + "Guadeloupe", + "Guam", + "Guatemala", + "Guernsey", + "Guinea", + "Guinea-Bissau", + "Guyana", + "Haiti", + "Heard Island and McDonald Islands", + "Holy See (Vatican City State)", + "Honduras", + "Hong Kong", + "Hungary", + "Iceland", + "India", + "Indonesia", + "Iran", + "Iraq", + "Ireland", + "Isle of Man", + "Israel", + "Italy", + "Jamaica", + "Japan", + "Jersey", + "Jordan", + "Kazakhstan", + "Kenya", + "Kiribati", + "Democratic People's Republic of Korea", + "Republic of Korea", + "Kuwait", + "Kyrgyz Republic", + "Lao People's Democratic Republic", + "Latvia", + "Lebanon", + "Lesotho", + "Liberia", + "Libyan Arab Jamahiriya", + "Liechtenstein", + "Lithuania", + "Luxembourg", + "Macao", + "Macedonia", + "Madagascar", + "Malawi", + "Malaysia", + "Maldives", + "Mali", + "Malta", + "Marshall Islands", + "Martinique", + "Mauritania", + "Mauritius", + "Mayotte", + "Mexico", + "Micronesia", + "Moldova", + "Monaco", + "Mongolia", + "Montenegro", + "Montserrat", + "Morocco", + "Mozambique", + "Myanmar", + "Namibia", + "Nauru", + "Nepal", + "Netherlands Antilles", + "Netherlands", + "New Caledonia", + "New Zealand", + "Nicaragua", + "Niger", + "Nigeria", + "Niue", + "Norfolk Island", + "Northern Mariana Islands", + "Norway", + "Oman", + "Pakistan", + "Palau", + "Palestinian Territory", + "Panama", + "Papua New Guinea", + "Paraguay", + "Peru", + "Philippines", + "Pitcairn Islands", + "Poland", + "Portugal", + "Puerto Rico", + "Qatar", + "Reunion", + "Romania", + "Russian Federation", + "Rwanda", + "Saint Barthelemy", + "Saint Helena", + "Saint Kitts and Nevis", + "Saint Lucia", + "Saint Martin", + "Saint Pierre and Miquelon", + "Saint Vincent and the Grenadines", + "Samoa", + "San Marino", + "Sao Tome and Principe", + "Saudi Arabia", + "Senegal", + "Serbia", + "Seychelles", + "Sierra Leone", + "Singapore", + "Slovakia (Slovak Republic)", + "Slovenia", + "Solomon Islands", + "Somalia", + "South Africa", + "South Georgia and the South Sandwich Islands", + "Spain", + "Sri Lanka", + "Sudan", + "Suriname", + "Svalbard & Jan Mayen Islands", + "Swaziland", + "Sweden", + "Switzerland", + "Syrian Arab Republic", + "Taiwan", + "Tajikistan", + "Tanzania", + "Thailand", + "Timor-Leste", + "Togo", + "Tokelau", + "Tonga", + "Trinidad and Tobago", + "Tunisia", + "Turkey", + "Turkmenistan", + "Turks and Caicos Islands", + "Tuvalu", + "Uganda", + "Ukraine", + "United Arab Emirates", + "United Kingdom", + "United States of America", + "United States Minor Outlying Islands", + "Uruguay", + "Uzbekistan", + "Vanuatu", + "Venezuela", + "Vietnam", + "Virgin Islands, British", + "Virgin Islands, U.S.", + "Wallis and Futuna", + "Western Sahara", + "Yemen", + "Zambia", + "Zimbabwe" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/address/country_code.js +var require_country_code = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/address/country_code.js"(exports2, module2) { + module2["exports"] = [ + "AD", + "AE", + "AF", + "AG", + "AI", + "AL", + "AM", + "AO", + "AQ", + "AR", + "AS", + "AT", + "AU", + "AW", + "AX", + "AZ", + "BA", + "BB", + "BD", + "BE", + "BF", + "BG", + "BH", + "BI", + "BJ", + "BL", + "BM", + "BN", + "BO", + "BQ", + "BR", + "BS", + "BT", + "BV", + "BW", + "BY", + "BZ", + "CA", + "CC", + "CD", + "CF", + "CG", + "CH", + "CI", + "CK", + "CL", + "CM", + "CN", + "CO", + "CR", + "CU", + "CV", + "CW", + "CX", + "CY", + "CZ", + "DE", + "DJ", + "DK", + "DM", + "DO", + "DZ", + "EC", + "EE", + "EG", + "EH", + "ER", + "ES", + "ET", + "FI", + "FJ", + "FK", + "FM", + "FO", + "FR", + "GA", + "GB", + "GD", + "GE", + "GF", + "GG", + "GH", + "GI", + "GL", + "GM", + "GN", + "GP", + "GQ", + "GR", + "GS", + "GT", + "GU", + "GW", + "GY", + "HK", + "HM", + "HN", + "HR", + "HT", + "HU", + "ID", + "IE", + "IL", + "IM", + "IN", + "IO", + "IQ", + "IR", + "IS", + "IT", + "JE", + "JM", + "JO", + "JP", + "KE", + "KG", + "KH", + "KI", + "KM", + "KN", + "KP", + "KR", + "KW", + "KY", + "KZ", + "LA", + "LB", + "LC", + "LI", + "LK", + "LR", + "LS", + "LT", + "LU", + "LV", + "LY", + "MA", + "MC", + "MD", + "ME", + "MF", + "MG", + "MH", + "MK", + "ML", + "MM", + "MN", + "MO", + "MP", + "MQ", + "MR", + "MS", + "MT", + "MU", + "MV", + "MW", + "MX", + "MY", + "MZ", + "NA", + "NC", + "NE", + "NF", + "NG", + "NI", + "NL", + "NO", + "NP", + "NR", + "NU", + "NZ", + "OM", + "PA", + "PE", + "PF", + "PG", + "PH", + "PK", + "PL", + "PM", + "PN", + "PR", + "PS", + "PT", + "PW", + "PY", + "QA", + "RE", + "RO", + "RS", + "RU", + "RW", + "SA", + "SB", + "SC", + "SD", + "SE", + "SG", + "SH", + "SI", + "SJ", + "SK", + "SL", + "SM", + "SN", + "SO", + "SR", + "SS", + "ST", + "SV", + "SX", + "SY", + "SZ", + "TC", + "TD", + "TF", + "TG", + "TH", + "TJ", + "TK", + "TL", + "TM", + "TN", + "TO", + "TR", + "TT", + "TV", + "TW", + "TZ", + "UA", + "UG", + "UM", + "US", + "UY", + "UZ", + "VA", + "VC", + "VE", + "VG", + "VI", + "VN", + "VU", + "WF", + "WS", + "YE", + "YT", + "ZA", + "ZM", + "ZW" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/address/country_code_alpha_3.js +var require_country_code_alpha_3 = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/address/country_code_alpha_3.js"(exports2, module2) { + module2["exports"] = [ + "BGD", + "BEL", + "BFA", + "BGR", + "BIH", + "BRB", + "WLF", + "BLM", + "BMU", + "BRN", + "BOL", + "BHR", + "BDI", + "BEN", + "BTN", + "JAM", + "BVT", + "BWA", + "WSM", + "BES", + "BRA", + "BHS", + "JEY", + "BLR", + "BLZ", + "RUS", + "RWA", + "SRB", + "TLS", + "REU", + "TKM", + "TJK", + "ROU", + "TKL", + "GNB", + "GUM", + "GTM", + "SGS", + "GRC", + "GNQ", + "GLP", + "JPN", + "GUY", + "GGY", + "GUF", + "GEO", + "GRD", + "GBR", + "GAB", + "SLV", + "GIN", + "GMB", + "GRL", + "GIB", + "GHA", + "OMN", + "TUN", + "JOR", + "HRV", + "HTI", + "HUN", + "HKG", + "HND", + "HMD", + "VEN", + "PRI", + "PSE", + "PLW", + "PRT", + "SJM", + "PRY", + "IRQ", + "PAN", + "PYF", + "PNG", + "PER", + "PAK", + "PHL", + "PCN", + "POL", + "SPM", + "ZMB", + "ESH", + "EST", + "EGY", + "ZAF", + "ECU", + "ITA", + "VNM", + "SLB", + "ETH", + "SOM", + "ZWE", + "SAU", + "ESP", + "ERI", + "MNE", + "MDA", + "MDG", + "MAF", + "MAR", + "MCO", + "UZB", + "MMR", + "MLI", + "MAC", + "MNG", + "MHL", + "MKD", + "MUS", + "MLT", + "MWI", + "MDV", + "MTQ", + "MNP", + "MSR", + "MRT", + "IMN", + "UGA", + "TZA", + "MYS", + "MEX", + "ISR", + "FRA", + "IOT", + "SHN", + "FIN", + "FJI", + "FLK", + "FSM", + "FRO", + "NIC", + "NLD", + "NOR", + "NAM", + "VUT", + "NCL", + "NER", + "NFK", + "NGA", + "NZL", + "NPL", + "NRU", + "NIU", + "COK", + "XKX", + "CIV", + "CHE", + "COL", + "CHN", + "CMR", + "CHL", + "CCK", + "CAN", + "COG", + "CAF", + "COD", + "CZE", + "CYP", + "CXR", + "CRI", + "CUW", + "CPV", + "CUB", + "SWZ", + "SYR", + "SXM", + "KGZ", + "KEN", + "SSD", + "SUR", + "KIR", + "KHM", + "KNA", + "COM", + "STP", + "SVK", + "KOR", + "SVN", + "PRK", + "KWT", + "SEN", + "SMR", + "SLE", + "SYC", + "KAZ", + "CYM", + "SGP", + "SWE", + "SDN", + "DOM", + "DMA", + "DJI", + "DNK", + "VGB", + "DEU", + "YEM", + "DZA", + "USA", + "URY", + "MYT", + "UMI", + "LBN", + "LCA", + "LAO", + "TUV", + "TWN", + "TTO", + "TUR", + "LKA", + "LIE", + "LVA", + "TON", + "LTU", + "LUX", + "LBR", + "LSO", + "THA", + "ATF", + "TGO", + "TCD", + "TCA", + "LBY", + "VAT", + "VCT", + "ARE", + "AND", + "ATG", + "AFG", + "AIA", + "VIR", + "ISL", + "IRN", + "ARM", + "ALB", + "AGO", + "ATA", + "ASM", + "ARG", + "AUS", + "AUT", + "ABW", + "IND", + "ALA", + "AZE", + "IRL", + "IDN", + "UKR", + "QAT", + "MOZ" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/address/building_number.js +var require_building_number = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/address/building_number.js"(exports2, module2) { + module2["exports"] = [ + "#####", + "####", + "###" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/address/street_suffix.js +var require_street_suffix = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/address/street_suffix.js"(exports2, module2) { + module2["exports"] = [ + "Alley", + "Avenue", + "Branch", + "Bridge", + "Brook", + "Brooks", + "Burg", + "Burgs", + "Bypass", + "Camp", + "Canyon", + "Cape", + "Causeway", + "Center", + "Centers", + "Circle", + "Circles", + "Cliff", + "Cliffs", + "Club", + "Common", + "Corner", + "Corners", + "Course", + "Court", + "Courts", + "Cove", + "Coves", + "Creek", + "Crescent", + "Crest", + "Crossing", + "Crossroad", + "Curve", + "Dale", + "Dam", + "Divide", + "Drive", + "Drive", + "Drives", + "Estate", + "Estates", + "Expressway", + "Extension", + "Extensions", + "Fall", + "Falls", + "Ferry", + "Field", + "Fields", + "Flat", + "Flats", + "Ford", + "Fords", + "Forest", + "Forge", + "Forges", + "Fork", + "Forks", + "Fort", + "Freeway", + "Garden", + "Gardens", + "Gateway", + "Glen", + "Glens", + "Green", + "Greens", + "Grove", + "Groves", + "Harbor", + "Harbors", + "Haven", + "Heights", + "Highway", + "Hill", + "Hills", + "Hollow", + "Inlet", + "Inlet", + "Island", + "Island", + "Islands", + "Islands", + "Isle", + "Isle", + "Junction", + "Junctions", + "Key", + "Keys", + "Knoll", + "Knolls", + "Lake", + "Lakes", + "Land", + "Landing", + "Lane", + "Light", + "Lights", + "Loaf", + "Lock", + "Locks", + "Locks", + "Lodge", + "Lodge", + "Loop", + "Mall", + "Manor", + "Manors", + "Meadow", + "Meadows", + "Mews", + "Mill", + "Mills", + "Mission", + "Mission", + "Motorway", + "Mount", + "Mountain", + "Mountain", + "Mountains", + "Mountains", + "Neck", + "Orchard", + "Oval", + "Overpass", + "Park", + "Parks", + "Parkway", + "Parkways", + "Pass", + "Passage", + "Path", + "Pike", + "Pine", + "Pines", + "Place", + "Plain", + "Plains", + "Plains", + "Plaza", + "Plaza", + "Point", + "Points", + "Port", + "Port", + "Ports", + "Ports", + "Prairie", + "Prairie", + "Radial", + "Ramp", + "Ranch", + "Rapid", + "Rapids", + "Rest", + "Ridge", + "Ridges", + "River", + "Road", + "Road", + "Roads", + "Roads", + "Route", + "Row", + "Rue", + "Run", + "Shoal", + "Shoals", + "Shore", + "Shores", + "Skyway", + "Spring", + "Springs", + "Springs", + "Spur", + "Spurs", + "Square", + "Square", + "Squares", + "Squares", + "Station", + "Station", + "Stravenue", + "Stravenue", + "Stream", + "Stream", + "Street", + "Street", + "Streets", + "Summit", + "Summit", + "Terrace", + "Throughway", + "Trace", + "Track", + "Trafficway", + "Trail", + "Trail", + "Tunnel", + "Tunnel", + "Turnpike", + "Turnpike", + "Underpass", + "Union", + "Unions", + "Valley", + "Valleys", + "Via", + "Viaduct", + "View", + "Views", + "Village", + "Village", + "Villages", + "Ville", + "Vista", + "Vista", + "Walk", + "Walks", + "Wall", + "Way", + "Ways", + "Well", + "Wells" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/address/secondary_address.js +var require_secondary_address = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/address/secondary_address.js"(exports2, module2) { + module2["exports"] = [ + "Apt. ###", + "Suite ###" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/address/postcode.js +var require_postcode = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/address/postcode.js"(exports2, module2) { + module2["exports"] = [ + "#####", + "#####-####" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/address/postcode_by_state.js +var require_postcode_by_state = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/address/postcode_by_state.js"(exports2, module2) { + module2["exports"] = [ + "#####", + "#####-####" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/address/state.js +var require_state = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/address/state.js"(exports2, module2) { + module2["exports"] = [ + "Alabama", + "Alaska", + "Arizona", + "Arkansas", + "California", + "Colorado", + "Connecticut", + "Delaware", + "Florida", + "Georgia", + "Hawaii", + "Idaho", + "Illinois", + "Indiana", + "Iowa", + "Kansas", + "Kentucky", + "Louisiana", + "Maine", + "Maryland", + "Massachusetts", + "Michigan", + "Minnesota", + "Mississippi", + "Missouri", + "Montana", + "Nebraska", + "Nevada", + "New Hampshire", + "New Jersey", + "New Mexico", + "New York", + "North Carolina", + "North Dakota", + "Ohio", + "Oklahoma", + "Oregon", + "Pennsylvania", + "Rhode Island", + "South Carolina", + "South Dakota", + "Tennessee", + "Texas", + "Utah", + "Vermont", + "Virginia", + "Washington", + "West Virginia", + "Wisconsin", + "Wyoming" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/address/state_abbr.js +var require_state_abbr = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/address/state_abbr.js"(exports2, module2) { + module2["exports"] = [ + "AL", + "AK", + "AZ", + "AR", + "CA", + "CO", + "CT", + "DE", + "FL", + "GA", + "HI", + "ID", + "IL", + "IN", + "IA", + "KS", + "KY", + "LA", + "ME", + "MD", + "MA", + "MI", + "MN", + "MS", + "MO", + "MT", + "NE", + "NV", + "NH", + "NJ", + "NM", + "NY", + "NC", + "ND", + "OH", + "OK", + "OR", + "PA", + "RI", + "SC", + "SD", + "TN", + "TX", + "UT", + "VT", + "VA", + "WA", + "WV", + "WI", + "WY" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/address/time_zone.js +var require_time_zone = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/address/time_zone.js"(exports2, module2) { + module2["exports"] = [ + "Pacific/Midway", + "Pacific/Pago_Pago", + "Pacific/Honolulu", + "America/Juneau", + "America/Los_Angeles", + "America/Tijuana", + "America/Denver", + "America/Phoenix", + "America/Chihuahua", + "America/Mazatlan", + "America/Chicago", + "America/Regina", + "America/Mexico_City", + "America/Mexico_City", + "America/Monterrey", + "America/Guatemala", + "America/New_York", + "America/Indiana/Indianapolis", + "America/Bogota", + "America/Lima", + "America/Lima", + "America/Halifax", + "America/Caracas", + "America/La_Paz", + "America/Santiago", + "America/St_Johns", + "America/Sao_Paulo", + "America/Argentina/Buenos_Aires", + "America/Guyana", + "America/Godthab", + "Atlantic/South_Georgia", + "Atlantic/Azores", + "Atlantic/Cape_Verde", + "Europe/Dublin", + "Europe/London", + "Europe/Lisbon", + "Europe/London", + "Africa/Casablanca", + "Africa/Monrovia", + "Etc/UTC", + "Europe/Belgrade", + "Europe/Bratislava", + "Europe/Budapest", + "Europe/Ljubljana", + "Europe/Prague", + "Europe/Sarajevo", + "Europe/Skopje", + "Europe/Warsaw", + "Europe/Zagreb", + "Europe/Brussels", + "Europe/Copenhagen", + "Europe/Madrid", + "Europe/Paris", + "Europe/Amsterdam", + "Europe/Berlin", + "Europe/Berlin", + "Europe/Rome", + "Europe/Stockholm", + "Europe/Vienna", + "Africa/Algiers", + "Europe/Bucharest", + "Africa/Cairo", + "Europe/Helsinki", + "Europe/Kiev", + "Europe/Riga", + "Europe/Sofia", + "Europe/Tallinn", + "Europe/Vilnius", + "Europe/Athens", + "Europe/Istanbul", + "Europe/Minsk", + "Asia/Jerusalem", + "Africa/Harare", + "Africa/Johannesburg", + "Europe/Moscow", + "Europe/Moscow", + "Europe/Moscow", + "Asia/Kuwait", + "Asia/Riyadh", + "Africa/Nairobi", + "Asia/Baghdad", + "Asia/Tehran", + "Asia/Muscat", + "Asia/Muscat", + "Asia/Baku", + "Asia/Tbilisi", + "Asia/Yerevan", + "Asia/Kabul", + "Asia/Yekaterinburg", + "Asia/Karachi", + "Asia/Karachi", + "Asia/Tashkent", + "Asia/Kolkata", + "Asia/Kolkata", + "Asia/Kolkata", + "Asia/Kolkata", + "Asia/Kathmandu", + "Asia/Dhaka", + "Asia/Dhaka", + "Asia/Colombo", + "Asia/Almaty", + "Asia/Novosibirsk", + "Asia/Rangoon", + "Asia/Bangkok", + "Asia/Bangkok", + "Asia/Jakarta", + "Asia/Krasnoyarsk", + "Asia/Shanghai", + "Asia/Chongqing", + "Asia/Hong_Kong", + "Asia/Urumqi", + "Asia/Kuala_Lumpur", + "Asia/Singapore", + "Asia/Taipei", + "Australia/Perth", + "Asia/Irkutsk", + "Asia/Ulaanbaatar", + "Asia/Seoul", + "Asia/Tokyo", + "Asia/Tokyo", + "Asia/Tokyo", + "Asia/Yakutsk", + "Australia/Darwin", + "Australia/Adelaide", + "Australia/Melbourne", + "Australia/Melbourne", + "Australia/Sydney", + "Australia/Brisbane", + "Australia/Hobart", + "Asia/Vladivostok", + "Pacific/Guam", + "Pacific/Port_Moresby", + "Asia/Magadan", + "Asia/Magadan", + "Pacific/Noumea", + "Pacific/Fiji", + "Asia/Kamchatka", + "Pacific/Majuro", + "Pacific/Auckland", + "Pacific/Auckland", + "Pacific/Tongatapu", + "Pacific/Fakaofo", + "Pacific/Apia" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/address/city.js +var require_city = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/address/city.js"(exports2, module2) { + module2["exports"] = [ + "#{city_prefix} #{Name.first_name}#{city_suffix}", + "#{city_prefix} #{Name.first_name}", + "#{Name.first_name}#{city_suffix}", + "#{Name.last_name}#{city_suffix}" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/address/street_name.js +var require_street_name = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/address/street_name.js"(exports2, module2) { + module2["exports"] = [ + "#{Name.first_name} #{street_suffix}", + "#{Name.last_name} #{street_suffix}" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/address/street_address.js +var require_street_address = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/address/street_address.js"(exports2, module2) { + module2["exports"] = [ + "#{building_number} #{street_name}" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/address/default_country.js +var require_default_country = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/address/default_country.js"(exports2, module2) { + module2["exports"] = [ + "United States of America" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/address/direction.js +var require_direction = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/address/direction.js"(exports2, module2) { + module2["exports"] = [ + "North", + "East", + "South", + "West", + "Northeast", + "Northwest", + "Southeast", + "Southwest" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/address/direction_abbr.js +var require_direction_abbr = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/address/direction_abbr.js"(exports2, module2) { + module2["exports"] = [ + "N", + "E", + "S", + "W", + "NE", + "NW", + "SE", + "SW" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/address/index.js +var require_address2 = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/address/index.js"(exports2, module2) { + var address = {}; + module2["exports"] = address; + address.city_prefix = require_city_prefix(); + address.city_suffix = require_city_suffix(); + address.city_name = require_city_name(); + address.county = require_county(); + address.country = require_country(); + address.country_code = require_country_code(); + address.country_code_alpha_3 = require_country_code_alpha_3(); + address.building_number = require_building_number(); + address.street_suffix = require_street_suffix(); + address.secondary_address = require_secondary_address(); + address.postcode = require_postcode(); + address.postcode_by_state = require_postcode_by_state(); + address.state = require_state(); + address.state_abbr = require_state_abbr(); + address.time_zone = require_time_zone(); + address.city = require_city(); + address.street_name = require_street_name(); + address.street_address = require_street_address(); + address.default_country = require_default_country(); + address.direction = require_direction(); + address.direction_abbr = require_direction_abbr(); + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/animal/dog.js +var require_dog = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/animal/dog.js"(exports2, module2) { + module2["exports"] = [ + "Affenpinscher", + "Afghan Hound", + "Aidi", + "Airedale Terrier", + "Akbash", + "Akita", + "Alano Espa\xF1ol", + "Alapaha Blue Blood Bulldog", + "Alaskan Husky", + "Alaskan Klee Kai", + "Alaskan Malamute", + "Alopekis", + "Alpine Dachsbracke", + "American Bulldog", + "American Bully", + "American Cocker Spaniel", + "American English Coonhound", + "American Foxhound", + "American Hairless Terrier", + "American Pit Bull Terrier", + "American Staffordshire Terrier", + "American Water Spaniel", + "Andalusian Hound", + "Anglo-Fran\xE7ais de Petite V\xE9nerie", + "Appenzeller Sennenhund", + "Ariegeois", + "Armant", + "Armenian Gampr dog", + "Artois Hound", + "Australian Cattle Dog", + "Australian Kelpie", + "Australian Shepherd", + "Australian Stumpy Tail Cattle Dog", + "Australian Terrier", + "Austrian Black and Tan Hound", + "Austrian Pinscher", + "Azawakh", + "Bakharwal dog", + "Banjara Hound", + "Barbado da Terceira", + "Barbet", + "Basenji", + "Basque Shepherd Dog", + "Basset Art\xE9sien Normand", + "Basset Bleu de Gascogne", + "Basset Fauve de Bretagne", + "Basset Hound", + "Bavarian Mountain Hound", + "Beagle", + "Beagle-Harrier", + "Belgian Shepherd", + "Bearded Collie", + "Beauceron", + "Bedlington Terrier", + "Bergamasco Shepherd", + "Berger Picard", + "Bernese Mountain Dog", + "Bhotia", + "Bichon Fris\xE9", + "Billy", + "Black and Tan Coonhound", + "Black Norwegian Elkhound", + "Black Russian Terrier", + "Black Mouth Cur", + "Bloodhound", + "Blue Lacy", + "Blue Picardy Spaniel", + "Bluetick Coonhound", + "Boerboel", + "Bohemian Shepherd", + "Bolognese", + "Border Collie", + "Border Terrier", + "Borzoi", + "Bosnian Coarse-haired Hound", + "Boston Terrier", + "Bouvier des Ardennes", + "Bouvier des Flandres", + "Boxer", + "Boykin Spaniel", + "Bracco Italiano", + "Braque d'Auvergne", + "Braque de l'Ari\xE8ge", + "Braque du Bourbonnais", + "Braque Francais", + "Braque Saint-Germain", + "Briard", + "Briquet Griffon Vend\xE9en", + "Brittany", + "Broholmer", + "Bruno Jura Hound", + "Brussels Griffon", + "Bucovina Shepherd Dog", + "Bull Arab", + "Bull Terrier", + "Bulldog", + "Bullmastiff", + "Bully Kutta", + "Burgos Pointer", + "Cairn Terrier", + "Campeiro Bulldog", + "Canaan Dog", + "Canadian Eskimo Dog", + "Cane Corso", + "Cane di Oropa", + "Cane Paratore", + "Cantabrian Water Dog", + "Can de Chira", + "C\xE3o da Serra de Aires", + "C\xE3o de Castro Laboreiro", + "C\xE3o de Gado Transmontano", + "C\xE3o Fila de S\xE3o Miguel", + "Cardigan Welsh Corgi", + "Carea Castellano Manchego", + "Carolina Dog", + "Carpathian Shepherd Dog", + "Catahoula Leopard Dog", + "Catalan Sheepdog", + "Caucasian Shepherd Dog", + "Cavalier King Charles Spaniel", + "Central Asian Shepherd Dog", + "Cesky Fousek", + "Cesky Terrier", + "Chesapeake Bay Retriever", + "Chien Fran\xE7ais Blanc et Noir", + "Chien Fran\xE7ais Blanc et Orange", + "Chien Fran\xE7ais Tricolore", + "Chihuahua", + "Chilean Terrier", + "Chinese Chongqing Dog", + "Chinese Crested Dog", + "Chinook", + "Chippiparai", + "Chongqing dog", + "Chortai", + "Chow Chow", + "Cimarr\xF3n Uruguayo", + "Cirneco dell'Etna", + "Clumber Spaniel", + "Colombian fino hound", + "Coton de Tulear", + "Cretan Hound", + "Croatian Sheepdog", + "Curly-Coated Retriever", + "Cursinu", + "Czechoslovakian Wolfdog", + "Dachshund", + "Dalmatian", + "Dandie Dinmont Terrier", + "Danish-Swedish Farmdog", + "Denmark Feist", + "Dingo", + "Doberman Pinscher", + "Dogo Argentino", + "Dogo Guatemalteco", + "Dogo Sardesco", + "Dogue Brasileiro", + "Dogue de Bordeaux", + "Drentse Patrijshond", + "Drever", + "Dunker", + "Dutch Shepherd", + "Dutch Smoushond", + "East Siberian Laika", + "East European Shepherd", + "English Cocker Spaniel", + "English Foxhound", + "English Mastiff", + "English Setter", + "English Shepherd", + "English Springer Spaniel", + "English Toy Terrier", + "Entlebucher Mountain Dog", + "Estonian Hound", + "Estrela Mountain Dog", + "Eurasier", + "Field Spaniel", + "Fila Brasileiro", + "Finnish Hound", + "Finnish Lapphund", + "Finnish Spitz", + "Flat-Coated Retriever", + "French Bulldog", + "French Spaniel", + "Galgo Espa\xF1ol", + "Galician Shepherd Dog", + "Garafian Shepherd", + "Gascon Saintongeois", + "Georgian Shepherd", + "German Hound", + "German Longhaired Pointer", + "German Pinscher", + "German Roughhaired Pointer", + "German Shepherd Dog", + "German Shorthaired Pointer", + "German Spaniel", + "German Spitz", + "German Wirehaired Pointer", + "Giant Schnauzer", + "Glen of Imaal Terrier", + "Golden Retriever", + "Go\u0144czy Polski", + "Gordon Setter", + "Grand Anglo-Fran\xE7ais Blanc et Noir", + "Grand Anglo-Fran\xE7ais Blanc et Orange", + "Grand Anglo-Fran\xE7ais Tricolore", + "Grand Basset Griffon Vend\xE9en", + "Grand Bleu de Gascogne", + "Grand Griffon Vend\xE9en", + "Great Dane", + "Greater Swiss Mountain Dog", + "Greek Harehound", + "Greek Shepherd", + "Greenland Dog", + "Greyhound", + "Griffon Bleu de Gascogne", + "Griffon Fauve de Bretagne", + "Griffon Nivernais", + "Gull Dong", + "Gull Terrier", + "H\xE4llefors Elkhound", + "Hamiltonst\xF6vare", + "Hanover Hound", + "Harrier", + "Havanese", + "Hierran Wolfdog", + "Hokkaido", + "Hovawart", + "Huntaway", + "Hygen Hound", + "Ibizan Hound", + "Icelandic Sheepdog", + "Indian pariah dog", + "Indian Spitz", + "Irish Red and White Setter", + "Irish Setter", + "Irish Terrier", + "Irish Water Spaniel", + "Irish Wolfhound", + "Istrian Coarse-haired Hound", + "Istrian Shorthaired Hound", + "Italian Greyhound", + "Jack Russell Terrier", + "Jagdterrier", + "Japanese Chin", + "Japanese Spitz", + "Japanese Terrier", + "Jindo", + "Jonangi", + "Kai Ken", + "Kaikadi", + "Kangal Shepherd Dog", + "Kanni", + "Karakachan dog", + "Karelian Bear Dog", + "Kars", + "Karst Shepherd", + "Keeshond", + "Kerry Beagle", + "Kerry Blue Terrier", + "King Charles Spaniel", + "King Shepherd", + "Kintamani", + "Kishu", + "Kokoni", + "Kombai", + "Komondor", + "Kooikerhondje", + "Koolie", + "Koyun dog", + "Kromfohrl\xE4nder", + "Kuchi", + "Kuvasz", + "Labrador Retriever", + "Lagotto Romagnolo", + "Lakeland Terrier", + "Lancashire Heeler", + "Landseer", + "Lapponian Herder", + "Large M\xFCnsterl\xE4nder", + "Leonberger", + "Levriero Sardo", + "Lhasa Apso", + "Lithuanian Hound", + "L\xF6wchen", + "Lupo Italiano", + "Mackenzie River Husky", + "Magyar ag\xE1r", + "Mahratta Greyhound", + "Maltese", + "Manchester Terrier", + "Maremmano-Abruzzese Sheepdog", + "McNab dog", + "Miniature American Shepherd", + "Miniature Bull Terrier", + "Miniature Fox Terrier", + "Miniature Pinscher", + "Miniature Schnauzer", + "Molossus of Epirus", + "Montenegrin Mountain Hound", + "Mountain Cur", + "Mountain Feist", + "Mucuchies", + "Mudhol Hound", + "Mudi", + "Neapolitan Mastiff", + "New Guinea Singing Dog", + "New Zealand Heading Dog", + "Newfoundland", + "Norfolk Terrier", + "Norrbottenspets", + "Northern Inuit Dog", + "Norwegian Buhund", + "Norwegian Elkhound", + "Norwegian Lundehund", + "Norwich Terrier", + "Nova Scotia Duck Tolling Retriever", + "Old Croatian Sighthound", + "Old Danish Pointer", + "Old English Sheepdog", + "Old English Terrier", + "Olde English Bulldogge", + "Otterhound", + "Pachon Navarro", + "Pampas Deerhound", + "Paisley Terrier", + "Papillon", + "Parson Russell Terrier", + "Pastore della Lessinia e del Lagorai", + "Patagonian Sheepdog", + "Patterdale Terrier", + "Pekingese", + "Pembroke Welsh Corgi", + "Perro Majorero", + "Perro de Pastor Mallorquin", + "Perro de Presa Canario", + "Perro de Presa Mallorquin", + "Peruvian Inca Orchid", + "Petit Basset Griffon Vend\xE9en", + "Petit Bleu de Gascogne", + "Phal\xE8ne", + "Pharaoh Hound", + "Phu Quoc Ridgeback", + "Picardy Spaniel", + "Plummer Terrier", + "Plott Hound", + "Podenco Canario", + "Podenco Valenciano", + "Pointer", + "Poitevin", + "Polish Greyhound", + "Polish Hound", + "Polish Lowland Sheepdog", + "Polish Tatra Sheepdog", + "Pomeranian", + "Pont-Audemer Spaniel", + "Poodle", + "Porcelaine", + "Portuguese Podengo", + "Portuguese Pointer", + "Portuguese Water Dog", + "Posavac Hound", + "Pra\u017Esk\xFD Krysa\u0159\xEDk", + "Pshdar Dog", + "Pudelpointer", + "Pug", + "Puli", + "Pumi", + "Pungsan Dog", + "Pyrenean Mastiff", + "Pyrenean Mountain Dog", + "Pyrenean Sheepdog", + "Rafeiro do Alentejo", + "Rajapalayam", + "Rampur Greyhound", + "Rat Terrier", + "Ratonero Bodeguero Andaluz", + "Ratonero Mallorquin", + "Ratonero Murciano de Huerta", + "Ratonero Valenciano", + "Redbone Coonhound", + "Rhodesian Ridgeback", + "Romanian Mioritic Shepherd Dog", + "Romanian Raven Shepherd Dog", + "Rottweiler", + "Rough Collie", + "Russian Spaniel", + "Russian Toy", + "Russo-European Laika", + "Saarloos Wolfdog", + "Sabueso Espa\xF1ol", + "Saint Bernard", + "Saint Hubert Jura Hound", + "Saint-Usuge Spaniel", + "Saluki", + "Samoyed", + "Sapsali", + "Sarabi dog", + "\u0160arplaninac", + "Schapendoes", + "Schillerst\xF6vare", + "Schipperke", + "Schweizer Laufhund", + "Schweizerischer Niederlaufhund", + "Scottish Deerhound", + "Scottish Terrier", + "Sealyham Terrier", + "Segugio dell'Appennino", + "Segugio Italiano", + "Segugio Maremmano", + "Seppala Siberian Sleddog", + "Serbian Hound", + "Serbian Tricolour Hound", + "Serrano Bulldog", + "Shar Pei", + "Shetland Sheepdog", + "Shiba Inu", + "Shih Tzu", + "Shikoku", + "Shiloh Shepherd", + "Siberian Husky", + "Silken Windhound", + "Silky Terrier", + "Sinhala Hound", + "Skye Terrier", + "Sloughi", + "Slovakian Wirehaired Pointer", + "Slovensk\xFD Cuvac", + "Slovensk\xFD Kopov", + "Smalandst\xF6vare", + "Small Greek domestic dog", + "Small M\xFCnsterl\xE4nder", + "Smooth Collie", + "Smooth Fox Terrier", + "Soft-Coated Wheaten Terrier", + "South Russian Ovcharka", + "Spanish Mastiff", + "Spanish Water Dog", + "Spinone Italiano", + "Sporting Lucas Terrier", + "Sardinian Shepherd Dog", + "Stabyhoun", + "Staffordshire Bull Terrier", + "Standard Schnauzer", + "Stephens Stock", + "Styrian Coarse-haired Hound", + "Sussex Spaniel", + "Swedish Elkhound", + "Swedish Lapphund", + "Swedish Vallhund", + "Swedish White Elkhound", + "Taigan", + "Taiwan Dog", + "Tamaskan Dog", + "Teddy Roosevelt Terrier", + "Telomian", + "Tenterfield Terrier", + "Terrier Brasileiro", + "Thai Bangkaew Dog", + "Thai Ridgeback", + "Tibetan Mastiff", + "Tibetan Spaniel", + "Tibetan Terrier", + "Tornjak", + "Tosa", + "Toy Fox Terrier", + "Toy Manchester Terrier", + "Transylvanian Hound", + "Treeing Cur", + "Treeing Feist", + "Treeing Tennessee Brindle", + "Treeing Walker Coonhound", + "Trigg Hound", + "Tyrolean Hound", + "Vikhan", + "Villano de Las Encartaciones", + "Villanuco de Las Encartaciones", + "Vizsla", + "Volpino Italiano", + "Weimaraner", + "Welsh Sheepdog", + "Welsh Springer Spaniel", + "Welsh Terrier", + "West Highland White Terrier", + "West Siberian Laika", + "Westphalian Dachsbracke", + "Wetterhoun", + "Whippet", + "White Shepherd", + "White Swiss Shepherd Dog", + "Wire Fox Terrier", + "Wirehaired Pointing Griffon", + "Wirehaired Vizsla", + "Xiasi Dog", + "Xoloitzcuintli", + "Yakutian Laika", + "Yorkshire Terrier" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/animal/cat.js +var require_cat = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/animal/cat.js"(exports2, module2) { + module2["exports"] = [ + "Abyssinian", + "American Bobtail", + "American Curl", + "American Shorthair", + "American Wirehair", + "Balinese", + "Bengal", + "Birman", + "Bombay", + "British Shorthair", + "Burmese", + "Chartreux", + "Chausie", + "Cornish Rex", + "Devon Rex", + "Donskoy", + "Egyptian Mau", + "Exotic Shorthair", + "Havana", + "Highlander", + "Himalayan", + "Japanese Bobtail", + "Korat", + "Kurilian Bobtail", + "LaPerm", + "Maine Coon", + "Manx", + "Minskin", + "Munchkin", + "Nebelung", + "Norwegian Forest Cat", + "Ocicat", + "Ojos Azules", + "Oriental", + "Persian", + "Peterbald", + "Pixiebob", + "Ragdoll", + "Russian Blue", + "Savannah", + "Scottish Fold", + "Selkirk Rex", + "Serengeti", + "Siberian", + "Siamese", + "Singapura", + "Snowshoe", + "Sokoke", + "Somali", + "Sphynx", + "Thai", + "Tonkinese", + "Toyger", + "Turkish Angora", + "Turkish Van" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/animal/snake.js +var require_snake = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/animal/snake.js"(exports2, module2) { + module2["exports"] = [ + "Viper Adder", + "Common adder", + "Death Adder", + "Desert death adder", + "Horned adder", + "Long-nosed adder", + "Many-horned adder", + "Mountain adder", + "Mud adder", + "Namaqua dwarf adder", + "Nightingale adder", + "Peringuey's adder", + "Puff adder", + "African puff adder", + "Rhombic night adder", + "Sand adder", + "Dwarf sand adder", + "Namib dwarf sand adder", + "Water adder", + "Aesculapian snake", + "Anaconda", + "Bolivian anaconda", + "De Schauensee's anaconda", + "Green anaconda", + "Yellow anaconda", + "Arafura file snake", + "Asp", + "European asp", + "Egyptian asp", + "African beaked snake", + "Ball Python", + "Bird snake", + "Black-headed snake", + "Mexican black kingsnake", + "Black rat snake", + "Black snake", + "Red-bellied black snake", + "Blind snake", + "Brahminy blind snake", + "Texas blind snake", + "Western blind snake", + "Boa", + "Abaco Island boa", + "Amazon tree boa", + "Boa constrictor", + "Cuban boa", + "Dumeril's boa", + "Dwarf boa", + "Emerald tree boa", + "Hogg Island boa", + "Jamaican boa", + "Madagascar ground boa", + "Madagascar tree boa", + "Puerto Rican boa", + "Rainbow boa", + "Red-tailed boa", + "Rosy boa", + "Rubber boa", + "Sand boa", + "Tree boa", + "Boiga", + "Boomslang", + "Brown snake", + "Eastern brown snake", + "Bull snake", + "Bushmaster", + "Dwarf beaked snake", + "Rufous beaked snake", + "Canebrake", + "Cantil", + "Cascabel", + "Cat-eyed snake", + "Banded cat-eyed snake", + "Green cat-eyed snake", + "Cat snake", + "Andaman cat snake", + "Beddome's cat snake", + "Dog-toothed cat snake", + "Forsten's cat snake", + "Gold-ringed cat snake", + "Gray cat snake", + "Many-spotted cat snake", + "Tawny cat snake", + "Chicken snake", + "Coachwhip snake", + "Cobra", + "Andaman cobra", + "Arabian cobra", + "Asian cobra", + "Banded water cobra", + "Black-necked cobra", + "Black-necked spitting cobra", + "Black tree cobra", + "Burrowing cobra", + "Cape cobra", + "Caspian cobra", + "Congo water cobra", + "Common cobra", + "Eastern water cobra", + "Egyptian cobra", + "Equatorial spitting cobra", + "False cobra", + "False water cobra", + "Forest cobra", + "Gold tree cobra", + "Indian cobra", + "Indochinese spitting cobra", + "Javan spitting cobra", + "King cobra", + "Mandalay cobra", + "Mozambique spitting cobra", + "North Philippine cobra", + "Nubian spitting cobra", + "Philippine cobra", + "Red spitting cobra", + "Rinkhals cobra", + "Shield-nosed cobra", + "Sinai desert cobra", + "Southern Indonesian spitting cobra", + "Southern Philippine cobra", + "Southwestern black spitting cobra", + "Snouted cobra", + "Spectacled cobra", + "Spitting cobra", + "Storm water cobra", + "Thai cobra", + "Taiwan cobra", + "Zebra spitting cobra", + "Collett's snake", + "Congo snake", + "Copperhead", + "American copperhead", + "Australian copperhead", + "Coral snake", + "Arizona coral snake", + "Beddome's coral snake", + "Brazilian coral snake", + "Cape coral snake", + "Harlequin coral snake", + "High Woods coral snake", + "Malayan long-glanded coral snake", + "Texas Coral Snake", + "Western coral snake", + "Corn snake", + "South eastern corn snake", + "Cottonmouth", + "Crowned snake", + "Cuban wood snake", + "Eastern hognose snake", + "Egg-eater", + "Eastern coral snake", + "Fer-de-lance", + "Fierce snake", + "Fishing snake", + "Flying snake", + "Golden tree snake", + "Indian flying snake", + "Moluccan flying snake", + "Ornate flying snake", + "Paradise flying snake", + "Twin-Barred tree snake", + "Banded Flying Snake", + "Fox snake, three species of Pantherophis", + "Forest flame snake", + "Garter snake", + "Checkered garter snake", + "Common garter snake", + "San Francisco garter snake", + "Texas garter snake", + "Cape gopher snake", + "Grass snake", + "Green snake", + "Rough green snake", + "Smooth green snake", + "Ground snake", + "Common ground snake", + "Three-lined ground snake", + "Western ground snake", + "Habu", + "Hognose snake", + "Blonde hognose snake", + "Dusty hognose snake", + "Eastern hognose snake", + "Jan's hognose snake", + "Giant Malagasy hognose snake", + "Mexican hognose snake", + "South American hognose snake", + "Hundred pacer", + "Ikaheka snake", + "Indigo snake", + "Jamaican Tree Snake", + "Keelback", + "Asian keelback", + "Assam keelback", + "Black-striped keelback", + "Buff striped keelback", + "Burmese keelback", + "Checkered keelback", + "Common keelback", + "Hill keelback", + "Himalayan keelback", + "Khasi Hills keelback", + "Modest keelback", + "Nicobar Island keelback", + "Nilgiri keelback", + "Orange-collared keelback", + "Red-necked keelback", + "Sikkim keelback", + "Speckle-bellied keelback", + "White-lipped keelback", + "Wynaad keelback", + "Yunnan keelback", + "King brown", + "King cobra", + "King snake", + "California kingsnake", + "Desert kingsnake", + "Grey-banded kingsnake", + "North eastern king snake", + "Prairie kingsnake", + "Scarlet kingsnake", + "Speckled kingsnake", + "Krait", + "Banded krait", + "Blue krait", + "Black krait", + "Burmese krait", + "Ceylon krait", + "Indian krait", + "Lesser black krait", + "Malayan krait", + "Many-banded krait", + "Northeastern hill krait", + "Red-headed krait", + "Sind krait", + "Large shield snake", + "Lancehead", + "Common lancehead", + "Lora", + "Grey Lora", + "Lyre snake", + "Baja California lyresnake", + "Central American lyre snake", + "Texas lyre snake", + "Eastern lyre snake", + "Machete savane", + "Mamba", + "Black mamba", + "Green mamba", + "Eastern green mamba", + "Western green mamba", + "Mamushi", + "Mangrove snake", + "Milk snake", + "Moccasin snake", + "Montpellier snake", + "Mud snake", + "Eastern mud snake", + "Western mud snake", + "Mussurana", + "Night snake", + "Cat-eyed night snake", + "Texas night snake", + "Nichell snake", + "Narrowhead Garter Snake", + "Nose-horned viper", + "Rhinoceros viper", + "Vipera ammodytes", + "Parrot snake", + "Mexican parrot snake", + "Patchnose snake", + "Perrotet's shieldtail snake", + "Pine snake", + "Pipe snake", + "Asian pipe snake", + "Dwarf pipe snake", + "Red-tailed pipe snake", + "Python", + "African rock python", + "Amethystine python", + "Angolan python", + "Australian scrub python", + "Ball python", + "Bismarck ringed python", + "Black headed python", + "Blood python", + "Boelen python", + "Borneo short-tailed python", + "Bredl's python", + "Brown water python", + "Burmese python", + "Calabar python", + "Western carpet python", + "Centralian carpet python", + "Coastal carpet python", + "Inland carpet python", + "Jungle carpet python", + "New Guinea carpet python", + "Northwestern carpet python", + "Southwestern carpet python", + "Children's python", + "Dauan Island water python", + "Desert woma python", + "Diamond python", + "Flinders python", + "Green tree python", + "Halmahera python", + "Indian python", + "Indonesian water python", + "Macklot's python", + "Mollucan python", + "Oenpelli python", + "Olive python", + "Papuan python", + "Pygmy python", + "Red blood python", + "Reticulated python", + "Kayaudi dwarf reticulated python", + "Selayer reticulated python", + "Rough-scaled python", + "Royal python", + "Savu python", + "Spotted python", + "Stimson's python", + "Sumatran short-tailed python", + "Tanimbar python", + "Timor python", + "Wetar Island python", + "White-lipped python", + "Brown white-lipped python", + "Northern white-lipped python", + "Southern white-lipped python", + "Woma python", + "Western woma python", + "Queen snake", + "Racer", + "Bimini racer", + "Buttermilk racer", + "Eastern racer", + "Eastern yellowbelly sad racer", + "Mexican racer", + "Southern black racer", + "Tan racer", + "West Indian racer", + "Raddysnake", + "Southwestern blackhead snake", + "Rat snake", + "Baird's rat snake", + "Beauty rat snake", + "Great Plains rat snake", + "Green rat snake", + "Japanese forest rat snake", + "Japanese rat snake", + "King rat snake", + "Mandarin rat snake", + "Persian rat snake", + "Red-backed rat snake", + "Twin-spotted rat snake", + "Yellow-striped rat snake", + "Manchurian Black Water Snake", + "Rattlesnake", + "Arizona black rattlesnake", + "Aruba rattlesnake", + "Chihuahuan ridge-nosed rattlesnake", + "Coronado Island rattlesnake", + "Durango rock rattlesnake", + "Dusky pigmy rattlesnake", + "Eastern diamondback rattlesnake", + "Grand Canyon rattlesnake", + "Great Basin rattlesnake", + "Hopi rattlesnake", + "Lance-headed rattlesnake", + "Long-tailed rattlesnake", + "Massasauga rattlesnake", + "Mexican green rattlesnake", + "Mexican west coast rattlesnake", + "Midget faded rattlesnake", + "Mojave rattlesnake", + "Northern black-tailed rattlesnake", + "Oaxacan small-headed rattlesnake", + "Rattler", + "Red diamond rattlesnake", + "Southern Pacific rattlesnake", + "Southwestern speckled rattlesnake", + "Tancitaran dusky rattlesnake", + "Tiger rattlesnake", + "Timber rattlesnake", + "Tropical rattlesnake", + "Twin-spotted rattlesnake", + "Uracoan rattlesnake", + "Western diamondback rattlesnake", + "Ribbon snake", + "Rinkhals", + "River jack", + "Sea snake", + "Annulated sea snake", + "Beaked sea snake", + "Dubois's sea snake", + "Hardwicke's sea snake", + "Hook Nosed Sea Snake", + "Olive sea snake", + "Pelagic sea snake", + "Stoke's sea snake", + "Yellow-banded sea snake", + "Yellow-bellied sea snake", + "Yellow-lipped sea snake", + "Shield-tailed snake", + "Sidewinder", + "Colorado desert sidewinder", + "Mojave desert sidewinder", + "Sonoran sidewinder", + "Small-eyed snake", + "Smooth snake", + "Brazilian smooth snake", + "European smooth snake", + "Stiletto snake", + "Striped snake", + "Japanese striped snake", + "Sunbeam snake", + "Taipan", + "Central ranges taipan", + "Coastal taipan", + "Inland taipan", + "Paupan taipan", + "Tentacled snake", + "Tic polonga", + "Tiger snake", + "Chappell Island tiger snake", + "Common tiger snake", + "Down's tiger snake", + "Eastern tiger snake", + "King Island tiger snake", + "Krefft's tiger snake", + "Peninsula tiger snake", + "Tasmanian tiger snake", + "Western tiger snake", + "Tigre snake", + "Tree snake", + "Blanding's tree snake", + "Blunt-headed tree snake", + "Brown tree snake", + "Long-nosed tree snake", + "Many-banded tree snake", + "Northern tree snake", + "Trinket snake", + "Black-banded trinket snake", + "Twig snake", + "African twig snake", + "Twin Headed King Snake", + "Titanboa", + "Urutu", + "Vine snake", + "Asian Vine Snake, Whip Snake", + "American Vine Snake", + "Mexican vine snake", + "Viper", + "Asp viper", + "Bamboo viper", + "Bluntnose viper", + "Brazilian mud Viper", + "Burrowing viper", + "Bush viper", + "Great Lakes bush viper", + "Hairy bush viper", + "Nitsche's bush viper", + "Rough-scaled bush viper", + "Spiny bush viper", + "Carpet viper", + "Crossed viper", + "Cyclades blunt-nosed viper", + "Eyelash viper", + "False horned viper", + "Fea's viper", + "Fifty pacer", + "Gaboon viper", + "Hognosed viper", + "Horned desert viper", + "Horned viper", + "Jumping viper", + "Kaznakov's viper", + "Leaf-nosed viper", + "Leaf viper", + "Levant viper", + "Long-nosed viper", + "McMahon's viper", + "Mole viper", + "Nose-horned viper", + "Rhinoceros viper", + "Vipera ammodytes", + "Palestine viper", + "Pallas' viper", + "Palm viper", + "Amazonian palm viper", + "Black-speckled palm-pitviper", + "Eyelash palm-pitviper", + "Green palm viper", + "Mexican palm-pitviper", + "Guatemalan palm viper", + "Honduran palm viper", + "Siamese palm viper", + "Side-striped palm-pitviper", + "Yellow-lined palm viper", + "Pit viper", + "Banded pitviper", + "Bamboo pitviper", + "Barbour's pit viper", + "Black-tailed horned pit viper", + "Bornean pitviper", + "Brongersma's pitviper", + "Brown spotted pitviper[4]", + "Cantor's pitviper", + "Elegant pitviper", + "Eyelash pit viper", + "Fan-Si-Pan horned pitviper", + "Flat-nosed pitviper", + "Godman's pit viper", + "Green tree pit viper", + "Habu pit viper", + "Hagen's pitviper", + "Horseshoe pitviper", + "Jerdon's pitviper", + "Kanburian pit viper", + "Kaulback's lance-headed pitviper", + "Kham Plateau pitviper", + "Large-eyed pitviper", + "Malabar rock pitviper", + "Malayan pit viper", + "Mangrove pit viper", + "Mangshan pitviper", + "Motuo bamboo pitviper", + "Nicobar bamboo pitviper", + "Philippine pitviper", + "Pointed-scaled pit viper[5]", + "Red-tailed bamboo pitviper", + "Schultze's pitviper", + "Stejneger's bamboo pitviper", + "Sri Lankan pit viper", + "Temple pit viper", + "Tibetan bamboo pitviper", + "Tiger pit viper", + "Undulated pit viper", + "Wagler's pit viper", + "Wirot's pit viper", + "Portuguese viper", + "Saw-scaled viper", + "Schlegel's viper", + "Sedge viper", + "Sharp-nosed viper", + "Snorkel viper", + "Temple viper", + "Tree viper", + "Chinese tree viper", + "Guatemalan tree viper", + "Hutton's tree viper", + "Indian tree viper", + "Large-scaled tree viper", + "Malcolm's tree viper", + "Nitsche's tree viper", + "Pope's tree viper", + "Rough-scaled tree viper", + "Rungwe tree viper", + "Sumatran tree viper", + "White-lipped tree viper", + "Ursini's viper", + "Western hog-nosed viper", + "Wart snake", + "Water moccasin", + "Water snake", + "Bocourt's water snake", + "Northern water snake", + "Whip snake", + "Long-nosed whip snake", + "Wolf snake", + "African wolf snake", + "Barred wolf snake", + "Worm snake", + "Common worm snake", + "Longnosed worm snake", + "Wutu", + "Yarara", + "Zebra snake" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/animal/horse.js +var require_horse = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/animal/horse.js"(exports2, module2) { + module2["exports"] = [ + "American Albino", + "Abaco Barb", + "Abtenauer", + "Abyssinian", + "Aegidienberger", + "Akhal-Teke", + "Albanian Horse", + "Altai Horse", + "Alt\xE8r Real", + "American Cream Draft", + "American Indian Horse", + "American Paint Horse", + "American Quarter Horse", + "American Saddlebred", + "American Warmblood", + "Andalusian Horse", + "Andravida Horse", + "Anglo-Arabian", + "Anglo-Arabo-Sardo", + "Anglo-Kabarda", + "Appaloosa", + "AraAppaloosa", + "Arabian Horse", + "Ardennes Horse", + "Arenberg-Nordkirchen", + "Argentine Criollo", + "Asian wild Horse", + "Assateague Horse", + "Asturc\xF3n", + "Augeron", + "Australian Brumby", + "Australian Draught Horse", + "Australian Stock Horse", + "Austrian Warmblood", + "Auvergne Horse", + "Auxois", + "Azerbaijan Horse", + "Azteca Horse", + "Baise Horse", + "Bale", + "Balearic Horse", + "Balikun Horse", + "Baluchi Horse", + "Banker Horse", + "Barb Horse", + "Bardigiano", + "Bashkir Curly", + "Basque Mountain Horse", + "Bavarian Warmblood", + "Belgian Half-blood", + "Belgian Horse", + "Belgian Warmblood ", + "Bhutia Horse", + "Black Forest Horse", + "Blazer Horse", + "Boerperd", + "Borana", + "Boulonnais Horse", + "Brabant", + "Brandenburger", + "Brazilian Sport Horse", + "Breton Horse", + "Brumby", + "Budyonny Horse", + "Burguete Horse", + "Burmese Horse", + "Byelorussian Harness Horse", + "Calabrese Horse", + "Camargue Horse", + "Camarillo White Horse", + "Campeiro", + "Campolina", + "Canadian Horse", + "Canadian Pacer", + "Carolina Marsh Tacky", + "Carthusian Horse", + "Caspian Horse", + "Castilian Horse", + "Castillonnais", + "Catria Horse", + "Cavallo Romano della Maremma Laziale", + "Cerbat Mustang", + "Chickasaw Horse", + "Chilean Corralero", + "Choctaw Horse", + "Cleveland Bay", + "Clydesdale Horse", + "Cob", + "Coldblood Trotter", + "Colonial Spanish Horse", + "Colorado Ranger", + "Comtois Horse", + "Corsican Horse", + "Costa Rican Saddle Horse", + "Cretan Horse", + "Criollo Horse", + "Croatian Coldblood", + "Cuban Criollo", + "Cumberland Island Horse", + "Curly Horse", + "Czech Warmblood", + "Daliboz", + "Danish Warmblood", + "Danube Delta Horse", + "Dole Gudbrandsdal", + "Don", + "Dongola Horse", + "Draft Trotter", + "Dutch Harness Horse", + "Dutch Heavy Draft", + "Dutch Warmblood", + "Dzungarian Horse", + "East Bulgarian", + "East Friesian Horse", + "Estonian Draft", + "Estonian Horse", + "Falabella", + "Faroese", + "Finnhorse", + "Fjord Horse", + "Fleuve", + "Florida Cracker Horse", + "Foutank\xE9", + "Frederiksborg Horse", + "Freiberger", + "French Trotter", + "Friesian Cross", + "Friesian Horse", + "Friesian Sporthorse", + "Furioso-North Star", + "Galice\xF1o", + "Galician Pony", + "Gelderland Horse", + "Georgian Grande Horse", + "German Warmblood", + "Giara Horse", + "Gidran", + "Groningen Horse", + "Gypsy Horse", + "Hackney Horse", + "Haflinger", + "Hanoverian Horse", + "Heck Horse", + "Heihe Horse", + "Henson Horse", + "Hequ Horse", + "Hirzai", + "Hispano-Bret\xF3n", + "Holsteiner Horse", + "Horro", + "Hungarian Warmblood", + "Icelandic Horse", + "Iomud", + "Irish Draught", + "Irish Sport Horse sometimes called Irish Hunter", + "Italian Heavy Draft", + "Italian Trotter", + "Jaca Navarra", + "Jeju Horse", + "Jutland Horse", + "Kabarda Horse", + "Kafa", + "Kaimanawa Horses", + "Kalmyk Horse", + "Karabair", + "Karabakh Horse", + "Karachai Horse", + "Karossier", + "Kathiawari", + "Kazakh Horse", + "Kentucky Mountain Saddle Horse", + "Kiger Mustang", + "Kinsky Horse", + "Kisber Felver", + "Kiso Horse", + "Kladruber", + "Knabstrupper", + "Konik", + "Kundudo", + "Kustanair", + "Kyrgyz Horse", + "Latvian Horse", + "Lipizzan", + "Lithuanian Heavy Draught", + "Lokai", + "Losino Horse", + "Lusitano", + "Lyngshest", + "M'Bayar", + "M'Par", + "Mallorqu\xEDn", + "Malopolski", + "Mangalarga", + "Mangalarga Marchador", + "Maremmano", + "Marisme\xF1o Horse", + "Marsh Tacky", + "Marwari Horse", + "Mecklenburger", + "Me\u0111imurje Horse", + "Menorqu\xEDn", + "M\xE9rens Horse", + "Messara Horse", + "Metis Trotter", + "Mez\u0151hegyesi Sport Horse", + "Miniature Horse", + "Misaki Horse", + "Missouri Fox Trotter", + "Monchina", + "Mongolian Horse", + "Mongolian Wild Horse", + "Monterufolino", + "Morab", + "Morgan Horse", + "Mountain Pleasure Horse", + "Moyle Horse", + "Murakoz Horse", + "Murgese", + "Mustang Horse", + "Namib Desert Horse", + "Nangchen Horse", + "National Show Horse", + "Nez Perce Horse", + "Nivernais Horse", + "Nokota Horse", + "Noma", + "Nonius Horse", + "Nooitgedachter", + "Nordlandshest", + "Noriker Horse", + "Norman Cob", + "North American Single-Footer Horse", + "North Swedish Horse", + "Norwegian Coldblood Trotter", + "Norwegian Fjord", + "Novokirghiz", + "Oberlander Horse", + "Ogaden", + "Oldenburg Horse", + "Orlov trotter", + "Ostfriesen", + "Paint", + "Pampa Horse", + "Paso Fino", + "Pentro Horse", + "Percheron", + "Persano Horse", + "Peruvian Paso", + "Pintabian", + "Pleven Horse", + "Poitevin Horse", + "Posavac Horse", + "Pottok", + "Pryor Mountain Mustang", + "Przewalski's Horse", + "Pura Raza Espa\xF1ola", + "Purosangue Orientale", + "Qatgani", + "Quarab", + "Quarter Horse", + "Racking Horse", + "Retuerta Horse", + "Rhenish German Coldblood", + "Rhinelander Horse", + "Riwoche Horse", + "Rocky Mountain Horse", + "Romanian Sporthorse", + "Rottaler", + "Russian Don", + "Russian Heavy Draft", + "Russian Trotter", + "Saddlebred", + "Salerno Horse", + "Samolaco Horse", + "San Fratello Horse", + "Sarcidano Horse", + "Sardinian Anglo-Arab", + "Schleswig Coldblood", + "Schwarzw\xE4lder Kaltblut", + "Selale", + "Sella Italiano", + "Selle Fran\xE7ais", + "Shagya Arabian", + "Shan Horse", + "Shire Horse", + "Siciliano Indigeno", + "Silesian Horse", + "Sokolsky Horse", + "Sorraia", + "South German Coldblood", + "Soviet Heavy Draft", + "Spanish Anglo-Arab", + "Spanish Barb", + "Spanish Jennet Horse", + "Spanish Mustang", + "Spanish Tarpan", + "Spanish-Norman Horse", + "Spiti Horse", + "Spotted Saddle Horse", + "Standardbred Horse", + "Suffolk Punch", + "Swedish Ardennes", + "Swedish coldblood trotter", + "Swedish Warmblood", + "Swiss Warmblood", + "Taish\u016B Horse", + "Takhi", + "Tawleed", + "Tchernomor", + "Tennessee Walking Horse", + "Tersk Horse", + "Thoroughbred", + "Tiger Horse", + "Tinker Horse", + "Tolfetano", + "Tori Horse", + "Trait Du Nord", + "Trakehner", + "Tsushima", + "Tuigpaard", + "Ukrainian Riding Horse", + "Unmol Horse", + "Uzunyayla", + "Ventasso Horse", + "Virginia Highlander", + "Vlaamperd", + "Vladimir Heavy Draft", + "Vyatka", + "Waler", + "Waler Horse", + "Walkaloosa", + "Warlander", + "Warmblood", + "Welsh Cob", + "Westphalian Horse", + "Wielkopolski", + "W\xFCrttemberger", + "Xilingol Horse", + "Yakutian Horse", + "Yili Horse", + "Yonaguni Horse", + "Zaniskari", + "\u017Demaitukas", + "Zhemaichu", + "Zweibr\xFCcker" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/animal/cetacean.js +var require_cetacean = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/animal/cetacean.js"(exports2, module2) { + module2["exports"] = [ + "Blue Whale", + "Fin Whale", + "Sei Whale", + "Sperm Whale", + "Bryde\u2019s whale", + "Omura\u2019s whale", + "Humpback whale", + "Long-Beaked Common Dolphin", + "Short-Beaked Common Dolphin", + "Bottlenose Dolphin", + "Indo-Pacific Bottlenose Dolphin", + "Northern Rightwhale Dolphin", + "Southern Rightwhale Dolphin", + "Tucuxi", + "Costero", + "Indo-Pacific Hump-backed Dolphin", + "Chinese White Dolphin", + "Atlantic Humpbacked Dolphin", + "Atlantic Spotted Dolphin", + "Clymene Dolphin", + "Pantropical Spotted Dolphin", + "Spinner Dolphin", + "Striped Dolphin", + "Rough-Toothed Dolphin", + "Chilean Dolphin", + "Commerson\u2019s Dolphin", + "Heaviside\u2019s Dolphin", + "Hector\u2019s Dolphin", + "Risso\u2019s Dolphin", + "Fraser\u2019s Dolphin", + "Atlantic White-Sided Dolphin", + "Dusky Dolphin", + "Hourglass Dolphin", + "Pacific White-Sided Dolphin", + "Peale\u2019s Dolphin", + "White-Beaked Dolphin", + "Australian Snubfin Dolphin", + "Irrawaddy Dolphin", + "Melon-headed Whale", + "Killer Whale (Orca)", + "Pygmy Killer Whale", + "False Killer Whale", + "Long-finned Pilot Whale", + "Short-finned Pilot Whale", + "Guiana Dolphin", + "Burrunan Dolphin", + "Australian humpback Dolphin", + "Amazon River Dolphin", + "Chinese River Dolphin", + "Ganges River Dolphin", + "La Plata Dolphin", + "Southern Bottlenose Whale", + "Longman's Beaked Whale", + "Arnoux's Beaked Whale" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/animal/rabbit.js +var require_rabbit = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/animal/rabbit.js"(exports2, module2) { + module2["exports"] = [ + "American", + "American Chinchilla", + "American Fuzzy Lop", + "American Sable", + "Argente Brun", + "Belgian Hare", + "Beveren", + "Blanc de Hotot", + "Britannia Petite", + "Californian", + "Champagne D\u2019Argent", + "Checkered Giant", + "Cinnamon", + "Cr\xE8me D\u2019Argent", + "Dutch", + "Dwarf Hotot", + "English Angora", + "English Lop", + "English Spot", + "Flemish Giant", + "Florida White", + "French Angora", + "French Lop", + "Giant Angora", + "Giant Chinchilla", + "Harlequin", + "Havana", + "Himalayan", + "Holland Lop", + "Jersey Wooly", + "Lilac", + "Lionhead", + "Mini Lop", + "Mini Rex", + "Mini Satin", + "Netherland Dwarf", + "New Zealand", + "Palomino", + "Polish", + "Rex", + "Rhinelander", + "Satin", + "Satin Angora", + "Silver", + "Silver Fox", + "Silver Marten", + "Standard Chinchilla", + "Tan", + "Thrianta" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/animal/insect.js +var require_insect = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/animal/insect.js"(exports2, module2) { + module2["exports"] = [ + "Acacia-ants", + "Acorn-plum gall", + "Aerial yellowjacket", + "Africanized honey bee", + "Allegheny mound ant", + "Almond stone wasp", + "Ant", + "Arboreal ant", + "Argentine ant", + "Asian paper wasp", + "Baldfaced hornet", + "Bee", + "Bigheaded ant", + "Black and yellow mud dauber", + "Black carpenter ant", + "Black imported fire ant", + "Blue horntail woodwasp", + "Blue orchard bee", + "Braconid wasp", + "Bumble bee", + "Carpenter ant", + "Carpenter wasp", + "Chalcid wasp", + "Cicada killer", + "Citrus blackfly parasitoid", + "Common paper wasp", + "Crazy ant", + "Cuckoo wasp", + "Cynipid gall wasp", + "Eastern Carpenter bee", + "Eastern yellowjacket", + "Elm sawfly", + "Encyrtid wasp", + "Erythrina gall wasp", + "Eulophid wasp", + "European hornet", + "European imported fire ant", + "False honey ant", + "Fire ant", + "Forest bachac", + "Forest yellowjacket", + "German yellowjacket", + "Ghost ant", + "Giant ichneumon wasp", + "Giant resin bee", + "Giant wood wasp", + "Golden northern bumble bee", + "Golden paper wasp", + "Gouty oak gall", + "Grass Carrying Wasp", + "Great black wasp", + "Great golden digger wasp", + "Hackberry nipple gall parasitoid", + "Honey bee", + "Horned oak gall", + "Horse guard wasp", + "Horse guard wasp", + "Hunting wasp", + "Ichneumonid wasp", + "Keyhole wasp", + "Knopper gall", + "Large garden bumble bee", + "Large oak-apple gall", + "Leafcutting bee", + "Little fire ant", + "Little yellow ant", + "Long-horned bees", + "Long-legged ant", + "Macao paper wasp", + "Mallow bee", + "Marble gall", + "Mossyrose gall wasp", + "Mud-daubers", + "Multiflora rose seed chalcid", + "Oak apple gall wasp", + "Oak rough bulletgall wasp", + "Oak saucer gall", + "Oak shoot sawfly", + "Odorous house ant", + "Orange-tailed bumble bee", + "Orangetailed potter wasp", + "Oriental chestnut gall wasp", + "Paper wasp", + "Pavement ant", + "Pigeon tremex", + "Pip gall wasp", + "Prairie yellowjacket", + "Pteromalid wasp", + "Pyramid ant", + "Raspberry Horntail", + "Red ant", + "Red carpenter ant", + "Red harvester ant", + "Red imported fire ant", + "Red wasp", + "Red wood ant", + "Red-tailed wasp", + "Reddish carpenter ant", + "Rough harvester ant", + "Sawfly parasitic wasp", + "Scale parasitoid", + "Silky ant", + "Sirex woodwasp", + "Siricid woodwasp", + "Smaller yellow ant", + "Southeastern blueberry bee", + "Southern fire ant", + "Southern yellowjacket", + "Sphecid wasp", + "Stony gall", + "Sweat bee", + "Texas leafcutting ant", + "Tiphiid wasp", + "Torymid wasp", + "Tramp ant", + "Valentine ant", + "Velvet ant", + "Vespid wasp", + "Weevil parasitoid", + "Western harvester ant", + "Western paper wasp", + "Western thatching ant", + "Western yellowjacket", + "White-horned horntail", + "Willow shoot sawfly", + "Woodwasp", + "Wool sower gall maker", + "Yellow and black potter wasp", + "Yellow Crazy Ant", + "Yellow-horned horntail" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/animal/bear.js +var require_bear = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/animal/bear.js"(exports2, module2) { + module2["exports"] = [ + "Giant panda", + "Spectacled bear", + "Sun bear", + "Sloth bear", + "American black bear", + "Asian black bear", + "Brown bear", + "Polar bear" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/animal/lion.js +var require_lion = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/animal/lion.js"(exports2, module2) { + module2["exports"] = [ + "Asiatic Lion", + "Barbary Lion", + "West African Lion", + "Northeast Congo Lion", + "Masai Lion", + "Transvaal lion", + "Cape lion" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/animal/cow.js +var require_cow = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/animal/cow.js"(exports2, module2) { + module2["exports"] = [ + "Aberdeen Angus", + "Abergele", + "Abigar", + "Abondance", + "Abyssinian Shorthorned Zebu", + "Aceh", + "Achham", + "Adamawa", + "Adaptaur", + "Afar", + "Africangus", + "Afrikaner", + "Agerolese", + "Alambadi", + "Alatau", + "Albanian", + "Albera", + "Alderney", + "Alentejana", + "Aleutian wild cattle", + "Aliad Dinka", + "Alistana-Sanabresa", + "Allmogekor", + "Alur", + "American", + "American Angus", + "American Beef Friesian", + "American Brown Swiss", + "American Milking Devon", + "American White Park", + "Amerifax", + "Amrit Mahal", + "Amsterdam Island cattle", + "Anatolian Black", + "Andalusian Black", + "Andalusian Blond", + "Andalusian Grey", + "Angeln", + "Angoni", + "Ankina", + "Ankole", + "Ankole-Watusi", + "Aracena", + "Arado", + "Argentine Criollo", + "Argentine Friesian", + "Armorican", + "Arouquesa", + "Arsi", + "Asturian Mountain", + "Asturian Valley", + "Aubrac", + "Aulie-Ata", + "Aure et Saint-Girons", + "Australian Braford", + "Australian Brangus", + "Australian Charbray", + "Australian Friesian Sahiwal", + "Australian Lowline", + "Australian Milking Zebu", + "Australian Shorthorn", + "Austrian Simmental", + "Austrian Yellow", + "Av\xE9tonou", + "Avile\xF1a-Negra Ib\xE9rica", + "Aweil Dinka", + "Ayrshire", + "Azaouak", + "Azebuado", + "Azerbaijan Zebu", + "Azores", + "Bedit", + "Breed", + "Bachaur cattle", + "Baherie cattle", + "Bakosi cattle", + "Balancer", + "Baoule", + "Bargur cattle", + "Barros\xE3", + "Barzona", + "Bazadaise", + "Beef Freisian", + "Beefalo", + "Beefmaker", + "Beefmaster", + "Begayt", + "Belgian Blue", + "Belgian Red", + "Belgian Red Pied", + "Belgian White-and-Red", + "Belmont Red", + "Belted Galloway", + "Bernese", + "Berrenda cattle", + "Betizu", + "Bianca Modenese", + "Blaarkop", + "Black Angus", + "Black Baldy", + "Black Hereford", + "Blanca Cacere\xF1a", + "Blanco Orejinegro BON", + "Blonde d'Aquitaine", + "Blue Albion", + "Blue Grey", + "Bohuskulla", + "Bonsmara", + "Boran", + "Bo\u0161karin", + "Braford", + "Brahman", + "Brahmousin", + "Brangus", + "Braunvieh", + "Brava", + "British White", + "British Friesian", + "Brown Carpathian", + "Brown Caucasian", + "Brown Swiss", + "Bue Lingo", + "Burlina", + "Bu\u0161a cattle", + "Butana cattle", + "Bushuyev", + "Cedit", + "Breed", + "Cachena", + "Caldelana", + "Camargue", + "Campbell Island cattle", + "Canadian Speckle Park", + "Canadienne", + "Canaria", + "Canchim", + "Caracu", + "C\xE1rdena Andaluza", + "Carinthian Blondvieh", + "Carora", + "Charbray", + "Charolais", + "Chateaubriand", + "Chiangus", + "Chianina", + "Chillingham cattle", + "Chinese Black Pied", + "Cholistani", + "Coloursided White Back", + "Commercial", + "Corriente", + "Corsican cattle", + "Coste\xF1o con Cuernos", + "Crioulo Lageano", + "Dedit", + "Breed", + "Dajal", + "Dangi cattle", + "Danish Black-Pied", + "Danish Jersey", + "Danish Red", + "Deep Red cattle", + "Deoni", + "Devon", + "Dexter cattle", + "Dhanni", + "Doayo cattle", + "Doela", + "Drakensberger", + "D\xF8lafe", + "Droughtmaster", + "Dulong'", + "Dutch Belted", + "Dutch Friesian", + "Dwarf Lulu", + "Eedit", + "Breed", + "East Anatolian Red", + "Eastern Finncattle", + "Eastern Red Polled", + "Enderby Island cattle", + "English Longhorn", + "Ennstaler Bergscheck", + "Estonian Holstein", + "Estonian Native", + "Estonian Red cattle", + "\xC9vol\xE8ne cattle", + "Fedit", + "Breed", + "F\u0113ng Cattle", + "Finnish Ayrshire", + "Finncattle", + "Finnish Holstein-Friesian", + "Fj\xE4ll", + "Fleckvieh", + "Florida Cracker cattle", + "Fogera", + "French Simmental", + "Fribourgeoise", + "Friesian Red and White", + "Fulani Sudanese", + "Gedit", + "Breed", + "Galician Blond", + "Galloway cattle", + "Gangatiri", + "Gaolao", + "Garvonesa", + "Gascon cattle", + "Gelbvieh", + "Georgian Mountain cattle", + "German Angus", + "German Black Pied cattle", + "German Black Pied Dairy", + "German Red Pied", + "Gir", + "Glan cattle", + "Gloucester", + "Gobra", + "Greek Shorthorn", + "Greek Steppe", + "Greyman cattle", + "Gudali", + "Guernsey cattle", + "Guzer\xE1", + "Hedit", + "Breed", + "Hallikar4", + "Hanwoo", + "Hariana cattle", + "Hart\xF3n del Valle", + "Harzer Rotvieh", + "Hays Converter", + "Heck cattle", + "Hereford", + "Herens", + "Hybridmaster", + "Highland cattle", + "Hinterwald", + "Holando-Argentino", + "Holstein Friesian cattle", + "Horro", + "Hu\xE1ng Cattle", + "Hungarian Grey", + "Iedit", + "Breed", + "Iberian cattle", + "Icelandic", + "Illawarra cattle", + "Improved Red and White", + "Indo-Brazilian", + "Irish Moiled", + "Israeli Holstein", + "Israeli Red", + "Istoben cattle", + "Istrian cattle", + "Jedit", + "Breed", + "Jamaica Black", + "Jamaica Hope", + "Jamaica Red", + "Japanese Brown", + "Jarmelista", + "Javari cattle", + "Jersey cattle", + "Jutland cattle", + "Kedit", + "Breed", + "Kabin Buri cattle", + "Kalmyk cattle", + "Kangayam", + "Kankrej", + "Kamphaeng Saen cattle", + "Karan Swiss", + "Kasaragod Dwarf cattle", + "Kathiawadi", + "Kazakh Whiteheaded", + "Kenana cattle", + "Kenkatha cattle", + "Kerry cattle", + "Kherigarh", + "Khillari cattle", + "Kholomogory", + "Korat Wagyu", + "Kostroma cattle", + "Krishna Valley cattle", + "Kuri", + "Kurgan cattle", + "Ledit", + "Breed", + "La Reina cattle", + "Lakenvelder cattle", + "Lampurger", + "Latvian Blue", + "Latvian Brown", + "Latvian Danish Red", + "Lebedyn", + "Levantina", + "Limia cattle", + "Limousin", + "Limpurger", + "Lincoln Red", + "Lineback", + "Lithuanian Black-and-White", + "Lithuanian Light Grey", + "Lithuanian Red", + "Lithuanian White-Backed", + "Lohani cattle", + "Lourdais", + "Lucerna cattle", + "Luing", + "Medit", + "Breed", + "Madagascar Zebu", + "Madura", + "Maine-Anjou", + "Malnad Gidda", + "Malvi", + "Mandalong Special", + "Mantequera Leonesa", + "Maramure\u015F Brown", + "Marchigiana", + "Maremmana", + "Marinhoa", + "Maronesa", + "Masai", + "Mashona", + "Menorquina", + "Mertolenga", + "Meuse-Rhine-Issel", + "Mewati", + "Milking Shorthorn", + "Minhota", + "Mirandesa", + "Mirkadim", + "Moc\u0103ni\u0163\u0103", + "Mollie", + "Monchina", + "Mongolian", + "Montb\xE9liarde", + "Morucha", + "Muturu", + "Murboden", + "Murnau-Werdenfels", + "Murray Grey", + "Nedit", + "Breed", + "Nagori", + "N'Dama", + "Negra Andaluza", + "Nelore", + "Nguni", + "Nimari", + "Normande", + "North Bengal Grey", + "Northern Finncattle", + "Northern Shorthorn", + "Norwegian Red", + "Oedit]", + "Breed", + "Ongole", + "Original Simmental", + "Pedit", + "Breed", + "Pajuna", + "Palmera", + "Pantaneiro", + "Parda Alpina", + "Parthenaise", + "Pasiega", + "Pembroke", + "Philippine Native", + "Pie Rouge des Plaines", + "Piedmontese cattle", + "Pineywoods", + "Pinzgauer", + "Pirenaica", + "Podolac", + "Podolica", + "Polish Black-and-White", + "Polish Red", + "Polled Hereford", + "Poll Shorthorn", + "Polled Shorthorn", + "Ponwar", + "Preta", + "Punganur", + "Pulikulam", + "Pustertaler Sprinzen", + "Qedit", + "Breed", + "Qinchaun", + "Queensland Miniature Boran", + "Redit", + "Breed", + "Ramo Grande", + "Randall", + "Raramuri Criollo", + "Rathi", + "R\xE4tisches Grauvieh", + "Raya", + "Red Angus", + "Red Brangus", + "Red Chittagong", + "Red Fulani", + "Red Gorbatov", + "Red Holstein", + "Red Kandhari", + "Red Mingrelian", + "Red Poll", + "Red Polled \xD8stland", + "Red Sindhi", + "Retinta", + "Riggit Galloway", + "Ringam\xE5la", + "Rohjan", + "Romagnola", + "Romanian B\u0103l\u0163ata", + "Romanian Steppe Gray", + "Romosinuano", + "Russian Black Pied", + "RX3", + "Sedit", + "Breed", + "Sahiwal", + "Salers", + "Salorn", + "Sanga", + "Sanhe", + "Santa Cruz", + "Santa Gertrudis", + "Sayaguesa", + "Schwyz", + "Selembu", + "Senepol", + "Serbian Pied", + "Serbian Steppe", + "Sheko", + "Shetland", + "Shorthorn", + "Siboney de Cuba", + "Simbrah", + "Simford", + "Simmental", + "Siri", + "South Devon", + "Spanish Fighting Bull", + "Speckle Park", + "Square Meater", + "Sussex", + "Swedish Friesian", + "Swedish Polled", + "Swedish Red Pied", + "Swedish Red Polled", + "Swedish Red-and-White", + "Tedit", + "Breed", + "Tabapu\xE3", + "Tarentaise", + "Tasmanian Grey", + "Tauros", + "Telemark", + "Texas Longhorn", + "Texon", + "Thai Black", + "Thai Fighting Bull", + "Thai Friesian", + "Thai Milking Zebu", + "Tharparkar", + "Tswana", + "Tudanca", + "Tuli", + "Tulim", + "Turkish Grey Steppe", + "Tux-Zillertal", + "Tyrol Grey", + "Uedit", + "Breed", + "Umblachery", + "Ukrainian Grey", + "Vedit", + "Breed", + "Valdostana Castana", + "Valdostana Pezzata Nera", + "Valdostana Pezzata Rossa", + "V\xE4neko", + "Vaynol", + "Vechur8", + "Vestland Fjord", + "Vestland Red Polled", + "Vianesa", + "Volinian Beef", + "Vorderwald", + "Vosgienne", + "Wedit", + "Breed", + "Wagyu", + "Waguli", + "Wangus", + "Welsh Black", + "Western Finncattle", + "White C\xE1ceres", + "White Fulani", + "White Lamphun", + "White Park", + "Whitebred Shorthorn", + "Xedit", + "Breed", + "Xingjiang Brown", + "Yedit", + "Breed", + "Yakutian", + "Yanbian", + "Yanhuang", + "Yurino", + "Zedit", + "Breed", + "\u017Bubro\u0144", + "Zebu" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/animal/bird.js +var require_bird = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/animal/bird.js"(exports2, module2) { + module2["exports"] = [ + "Red-throated Loon", + "Arctic Loon", + "Pacific Loon", + "Common Loon", + "Yellow-billed Loon", + "Least Grebe", + "Pied-billed Grebe", + "Horned Grebe", + "Red-necked Grebe", + "Eared Grebe", + "Western Grebe", + "Clark's Grebe", + "Yellow-nosed Albatross", + "Shy Albatross", + "Black-browed Albatross", + "Wandering Albatross", + "Laysan Albatross", + "Black-footed Albatross", + "Short-tailed Albatross", + "Northern Fulmar", + "Herald Petrel", + "Murphy's Petrel", + "Mottled Petrel", + "Black-capped Petrel", + "Cook's Petrel", + "Stejneger's Petrel", + "White-chinned Petrel", + "Streaked Shearwater", + "Cory's Shearwater", + "Pink-footed Shearwater", + "Flesh-footed Shearwater", + "Greater Shearwater", + "Wedge-tailed Shearwater", + "Buller's Shearwater", + "Sooty Shearwater", + "Short-tailed Shearwater", + "Manx Shearwater", + "Black-vented Shearwater", + "Audubon's Shearwater", + "Little Shearwater", + "Wilson's Storm-Petrel", + "White-faced Storm-Petrel", + "European Storm-Petrel", + "Fork-tailed Storm-Petrel", + "Leach's Storm-Petrel", + "Ashy Storm-Petrel", + "Band-rumped Storm-Petrel", + "Wedge-rumped Storm-Petrel", + "Black Storm-Petrel", + "Least Storm-Petrel", + "White-tailed Tropicbird", + "Red-billed Tropicbird", + "Red-tailed Tropicbird", + "Masked Booby", + "Blue-footed Booby", + "Brown Booby", + "Red-footed Booby", + "Northern Gannet", + "American White Pelican", + "Brown Pelican", + "Brandt's Cormorant", + "Neotropic Cormorant", + "Double-crested Cormorant", + "Great Cormorant", + "Red-faced Cormorant", + "Pelagic Cormorant", + "Anhinga", + "Magnificent Frigatebird", + "Great Frigatebird", + "Lesser Frigatebird", + "American Bittern", + "Yellow Bittern", + "Least Bittern", + "Great Blue Heron", + "Great Egret", + "Chinese Egret", + "Little Egret", + "Western Reef-Heron", + "Snowy Egret", + "Little Blue Heron", + "Tricolored Heron", + "Reddish Egret", + "Cattle Egret", + "Green Heron", + "Black-crowned Night-Heron", + "Yellow-crowned Night-Heron", + "White Ibis", + "Scarlet Ibis", + "Glossy Ibis", + "White-faced Ibis", + "Roseate Spoonbill", + "Jabiru", + "Wood Stork", + "Black Vulture", + "Turkey Vulture", + "California Condor", + "Greater Flamingo", + "Black-bellied Whistling-Duck", + "Fulvous Whistling-Duck", + "Bean Goose", + "Pink-footed Goose", + "Greater White-fronted Goose", + "Lesser White-fronted Goose", + "Emperor Goose", + "Snow Goose", + "Ross's Goose", + "Canada Goose", + "Brant", + "Barnacle Goose", + "Mute Swan", + "Trumpeter Swan", + "Tundra Swan", + "Whooper Swan", + "Muscovy Duck", + "Wood Duck", + "Gadwall", + "Falcated Duck", + "Eurasian Wigeon", + "American Wigeon", + "American Black Duck", + "Mallard", + "Mottled Duck", + "Spot-billed Duck", + "Blue-winged Teal", + "Cinnamon Teal", + "Northern Shoveler", + "White-cheeked Pintail", + "Northern Pintail", + "Garganey", + "Baikal Teal", + "Green-winged Teal", + "Canvasback", + "Redhead", + "Common Pochard", + "Ring-necked Duck", + "Tufted Duck", + "Greater Scaup", + "Lesser Scaup", + "Steller's Eider", + "Spectacled Eider", + "King Eider", + "Common Eider", + "Harlequin Duck", + "Labrador Duck", + "Surf Scoter", + "White-winged Scoter", + "Black Scoter", + "Oldsquaw", + "Bufflehead", + "Common Goldeneye", + "Barrow's Goldeneye", + "Smew", + "Hooded Merganser", + "Common Merganser", + "Red-breasted Merganser", + "Masked Duck", + "Ruddy Duck", + "Osprey", + "Hook-billed Kite", + "Swallow-tailed Kite", + "White-tailed Kite", + "Snail Kite", + "Mississippi Kite", + "Bald Eagle", + "White-tailed Eagle", + "Steller's Sea-Eagle", + "Northern Harrier", + "Sharp-shinned Hawk", + "Cooper's Hawk", + "Northern Goshawk", + "Crane Hawk", + "Gray Hawk", + "Common Black-Hawk", + "Harris's Hawk", + "Roadside Hawk", + "Red-shouldered Hawk", + "Broad-winged Hawk", + "Short-tailed Hawk", + "Swainson's Hawk", + "White-tailed Hawk", + "Zone-tailed Hawk", + "Red-tailed Hawk", + "Ferruginous Hawk", + "Rough-legged Hawk", + "Golden Eagle", + "Collared Forest-Falcon", + "Crested Caracara", + "Eurasian Kestrel", + "American Kestrel", + "Merlin", + "Eurasian Hobby", + "Aplomado Falcon", + "Gyrfalcon", + "Peregrine Falcon", + "Prairie Falcon", + "Plain Chachalaca", + "Chukar", + "Himalayan Snowcock", + "Gray Partridge", + "Ring-necked Pheasant", + "Ruffed Grouse", + "Sage Grouse", + "Spruce Grouse", + "Willow Ptarmigan", + "Rock Ptarmigan", + "White-tailed Ptarmigan", + "Blue Grouse", + "Sharp-tailed Grouse", + "Greater Prairie-chicken", + "Lesser Prairie-chicken", + "Wild Turkey", + "Mountain Quail", + "Scaled Quail", + "California Quail", + "Gambel's Quail", + "Northern Bobwhite", + "Montezuma Quail", + "Yellow Rail", + "Black Rail", + "Corn Crake", + "Clapper Rail", + "King Rail", + "Virginia Rail", + "Sora", + "Paint-billed Crake", + "Spotted Rail", + "Purple Gallinule", + "Azure Gallinule", + "Common Moorhen", + "Eurasian Coot", + "American Coot", + "Limpkin", + "Sandhill Crane", + "Common Crane", + "Whooping Crane", + "Double-striped Thick-knee", + "Northern Lapwing", + "Black-bellied Plover", + "European Golden-Plover", + "American Golden-Plover", + "Pacific Golden-Plover", + "Mongolian Plover", + "Collared Plover", + "Snowy Plover", + "Wilson's Plover", + "Common Ringed Plover", + "Semipalmated Plover", + "Piping Plover", + "Little Ringed Plover", + "Killdeer", + "Mountain Plover", + "Eurasian Dotterel", + "Eurasian Oystercatcher", + "American Oystercatcher", + "Black Oystercatcher", + "Black-winged Stilt", + "Black-necked Stilt", + "American Avocet", + "Northern Jacana", + "Common Greenshank", + "Greater Yellowlegs", + "Lesser Yellowlegs", + "Marsh Sandpiper", + "Spotted Redshank", + "Wood Sandpiper", + "Green Sandpiper", + "Solitary Sandpiper", + "Willet", + "Wandering Tattler", + "Gray-tailed Tattler", + "Common Sandpiper", + "Spotted Sandpiper", + "Terek Sandpiper", + "Upland Sandpiper", + "Little Curlew", + "Eskimo Curlew", + "Whimbrel", + "Bristle-thighed Curlew", + "Far Eastern Curlew", + "Slender-billed Curlew", + "Eurasian Curlew", + "Long-billed Curlew", + "Black-tailed Godwit", + "Hudsonian Godwit", + "Bar-tailed Godwit", + "Marbled Godwit", + "Ruddy Turnstone", + "Black Turnstone", + "Surfbird", + "Great Knot", + "Red Knot", + "Sanderling", + "Semipalmated Sandpiper", + "Western Sandpiper", + "Red-necked Stint", + "Little Stint", + "Temminck's Stint", + "Long-toed Stint", + "Least Sandpiper", + "White-rumped Sandpiper", + "Baird's Sandpiper", + "Pectoral Sandpiper", + "Sharp-tailed Sandpiper", + "Purple Sandpiper", + "Rock Sandpiper", + "Dunlin", + "Curlew Sandpiper", + "Stilt Sandpiper", + "Spoonbill Sandpiper", + "Broad-billed Sandpiper", + "Buff-breasted Sandpiper", + "Ruff", + "Short-billed Dowitcher", + "Long-billed Dowitcher", + "Jack Snipe", + "Common Snipe", + "Pin-tailed Snipe", + "Eurasian Woodcock", + "American Woodcock", + "Wilson's Phalarope", + "Red-necked Phalarope", + "Red Phalarope", + "Oriental Pratincole", + "Great Skua", + "South Polar Skua", + "Pomarine Jaeger", + "Parasitic Jaeger", + "Long-tailed Jaeger", + "Laughing Gull", + "Franklin's Gull", + "Little Gull", + "Black-headed Gull", + "Bonaparte's Gull", + "Heermann's Gull", + "Band-tailed Gull", + "Black-tailed Gull", + "Mew Gull", + "Ring-billed Gull", + "California Gull", + "Herring Gull", + "Yellow-legged Gull", + "Thayer's Gull", + "Iceland Gull", + "Lesser Black-backed Gull", + "Slaty-backed Gull", + "Yellow-footed Gull", + "Western Gull", + "Glaucous-winged Gull", + "Glaucous Gull", + "Great Black-backed Gull", + "Sabine's Gull", + "Black-legged Kittiwake", + "Red-legged Kittiwake", + "Ross's Gull", + "Ivory Gull", + "Gull-billed Tern", + "Caspian Tern", + "Royal Tern", + "Elegant Tern", + "Sandwich Tern", + "Roseate Tern", + "Common Tern", + "Arctic Tern", + "Forster's Tern", + "Least Tern", + "Aleutian Tern", + "Bridled Tern", + "Sooty Tern", + "Large-billed Tern", + "White-winged Tern", + "Whiskered Tern", + "Black Tern", + "Brown Noddy", + "Black Noddy", + "Black Skimmer", + "Dovekie", + "Common Murre", + "Thick-billed Murre", + "Razorbill", + "Great Auk", + "Black Guillemot", + "Pigeon Guillemot", + "Long-billed Murrelet", + "Marbled Murrelet", + "Kittlitz's Murrelet", + "Xantus's Murrelet", + "Craveri's Murrelet", + "Ancient Murrelet", + "Cassin's Auklet", + "Parakeet Auklet", + "Least Auklet", + "Whiskered Auklet", + "Crested Auklet", + "Rhinoceros Auklet", + "Atlantic Puffin", + "Horned Puffin", + "Tufted Puffin", + "Rock Dove", + "Scaly-naped Pigeon", + "White-crowned Pigeon", + "Red-billed Pigeon", + "Band-tailed Pigeon", + "Oriental Turtle-Dove", + "European Turtle-Dove", + "Eurasian Collared-Dove", + "Spotted Dove", + "White-winged Dove", + "Zenaida Dove", + "Mourning Dove", + "Passenger Pigeon", + "Inca Dove", + "Common Ground-Dove", + "Ruddy Ground-Dove", + "White-tipped Dove", + "Key West Quail-Dove", + "Ruddy Quail-Dove", + "Budgerigar", + "Monk Parakeet", + "Carolina Parakeet", + "Thick-billed Parrot", + "White-winged Parakeet", + "Red-crowned Parrot", + "Common Cuckoo", + "Oriental Cuckoo", + "Black-billed Cuckoo", + "Yellow-billed Cuckoo", + "Mangrove Cuckoo", + "Greater Roadrunner", + "Smooth-billed Ani", + "Groove-billed Ani", + "Barn Owl", + "Flammulated Owl", + "Oriental Scops-Owl", + "Western Screech-Owl", + "Eastern Screech-Owl", + "Whiskered Screech-Owl", + "Great Horned Owl", + "Snowy Owl", + "Northern Hawk Owl", + "Northern Pygmy-Owl", + "Ferruginous Pygmy-Owl", + "Elf Owl", + "Burrowing Owl", + "Mottled Owl", + "Spotted Owl", + "Barred Owl", + "Great Gray Owl", + "Long-eared Owl", + "Short-eared Owl", + "Boreal Owl", + "Northern Saw-whet Owl", + "Lesser Nighthawk", + "Common Nighthawk", + "Antillean Nighthawk", + "Common Pauraque", + "Common Poorwill", + "Chuck-will's-widow", + "Buff-collared Nightjar", + "Whip-poor-will", + "Jungle Nightjar", + "Black Swift", + "White-collared Swift", + "Chimney Swift", + "Vaux's Swift", + "White-throated Needletail", + "Common Swift", + "Fork-tailed Swift", + "White-throated Swift", + "Antillean Palm Swift", + "Green Violet-ear", + "Green-breasted Mango", + "Broad-billed Hummingbird", + "White-eared Hummingbird", + "Xantus's Hummingbird", + "Berylline Hummingbird", + "Buff-bellied Hummingbird", + "Cinnamon Hummingbird", + "Violet-crowned Hummingbird", + "Blue-throated Hummingbird", + "Magnificent Hummingbird", + "Plain-capped Starthroat", + "Bahama Woodstar", + "Lucifer Hummingbird", + "Ruby-throated Hummingbird", + "Black-chinned Hummingbird", + "Anna's Hummingbird", + "Costa's Hummingbird", + "Calliope Hummingbird", + "Bumblebee Hummingbird", + "Broad-tailed Hummingbird", + "Rufous Hummingbird", + "Allen's Hummingbird", + "Elegant Trogon", + "Eared Trogon", + "Hoopoe", + "Ringed Kingfisher", + "Belted Kingfisher", + "Green Kingfisher", + "Eurasian Wryneck", + "Lewis's Woodpecker", + "Red-headed Woodpecker", + "Acorn Woodpecker", + "Gila Woodpecker", + "Golden-fronted Woodpecker", + "Red-bellied Woodpecker", + "Williamson's Sapsucker", + "Yellow-bellied Sapsucker", + "Red-naped Sapsucker", + "Red-breasted Sapsucker", + "Great Spotted Woodpecker", + "Ladder-backed Woodpecker", + "Nuttall's Woodpecker", + "Downy Woodpecker", + "Hairy Woodpecker", + "Strickland's Woodpecker", + "Red-cockaded Woodpecker", + "White-headed Woodpecker", + "Three-toed Woodpecker", + "Black-backed Woodpecker", + "Northern Flicker", + "Gilded Flicker", + "Pileated Woodpecker", + "Ivory-billed Woodpecker", + "Northern Beardless-Tyrannulet", + "Greenish Elaenia", + "Caribbean Elaenia", + "Tufted Flycatcher", + "Olive-sided Flycatcher", + "Greater Pewee", + "Western Wood-Pewee", + "Eastern Wood-Pewee", + "Yellow-bellied Flycatcher", + "Acadian Flycatcher", + "Alder Flycatcher", + "Willow Flycatcher", + "Least Flycatcher", + "Hammond's Flycatcher", + "Dusky Flycatcher", + "Gray Flycatcher", + "Pacific-slope Flycatcher", + "Cordilleran Flycatcher", + "Buff-breasted Flycatcher", + "Black Phoebe", + "Eastern Phoebe", + "Say's Phoebe", + "Vermilion Flycatcher", + "Dusky-capped Flycatcher", + "Ash-throated Flycatcher", + "Nutting's Flycatcher", + "Great Crested Flycatcher", + "Brown-crested Flycatcher", + "La Sagra's Flycatcher", + "Great Kiskadee", + "Sulphur-bellied Flycatcher", + "Variegated Flycatcher", + "Tropical Kingbird", + "Couch's Kingbird", + "Cassin's Kingbird", + "Thick-billed Kingbird", + "Western Kingbird", + "Eastern Kingbird", + "Gray Kingbird", + "Loggerhead Kingbird", + "Scissor-tailed Flycatcher", + "Fork-tailed Flycatcher", + "Rose-throated Becard", + "Masked Tityra", + "Brown Shrike", + "Loggerhead Shrike", + "Northern Shrike", + "White-eyed Vireo", + "Thick-billed Vireo", + "Bell's Vireo", + "Black-capped Vireo", + "Gray Vireo", + "Yellow-throated Vireo", + "Plumbeous Vireo", + "Cassin's Vireo", + "Blue-headed Vireo", + "Hutton's Vireo", + "Warbling Vireo", + "Philadelphia Vireo", + "Red-eyed Vireo", + "Yellow-green Vireo", + "Black-whiskered Vireo", + "Yucatan Vireo", + "Gray Jay", + "Steller's Jay", + "Blue Jay", + "Green Jay", + "Brown Jay", + "Florida Scrub-Jay", + "Island Scrub-Jay", + "Western Scrub-Jay", + "Mexican Jay", + "Pinyon Jay", + "Clark's Nutcracker", + "Black-billed Magpie", + "Yellow-billed Magpie", + "Eurasian Jackdaw", + "American Crow", + "Northwestern Crow", + "Tamaulipas Crow", + "Fish Crow", + "Chihuahuan Raven", + "Common Raven", + "Sky Lark", + "Horned Lark", + "Purple Martin", + "Cuban Martin", + "Gray-breasted Martin", + "Southern Martin", + "Brown-chested Martin", + "Tree Swallow", + "Violet-green Swallow", + "Bahama Swallow", + "Northern Rough-winged Swallow", + "Bank Swallow", + "Cliff Swallow", + "Cave Swallow", + "Barn Swallow", + "Common House-Martin", + "Carolina Chickadee", + "Black-capped Chickadee", + "Mountain Chickadee", + "Mexican Chickadee", + "Chestnut-backed Chickadee", + "Boreal Chickadee", + "Gray-headed Chickadee", + "Bridled Titmouse", + "Oak Titmouse", + "Juniper Titmouse", + "Tufted Titmouse", + "Verdin", + "Bushtit", + "Red-breasted Nuthatch", + "White-breasted Nuthatch", + "Pygmy Nuthatch", + "Brown-headed Nuthatch", + "Brown Creeper", + "Cactus Wren", + "Rock Wren", + "Canyon Wren", + "Carolina Wren", + "Bewick's Wren", + "House Wren", + "Winter Wren", + "Sedge Wren", + "Marsh Wren", + "American Dipper", + "Red-whiskered Bulbul", + "Golden-crowned Kinglet", + "Ruby-crowned Kinglet", + "Middendorff's Grasshopper-Warbler", + "Lanceolated Warbler", + "Wood Warbler", + "Dusky Warbler", + "Arctic Warbler", + "Blue-gray Gnatcatcher", + "California Gnatcatcher", + "Black-tailed Gnatcatcher", + "Black-capped Gnatcatcher", + "Narcissus Flycatcher", + "Mugimaki Flycatcher", + "Red-breasted Flycatcher", + "Siberian Flycatcher", + "Gray-spotted Flycatcher", + "Asian Brown Flycatcher", + "Siberian Rubythroat", + "Bluethroat", + "Siberian Blue Robin", + "Red-flanked Bluetail", + "Northern Wheatear", + "Stonechat", + "Eastern Bluebird", + "Western Bluebird", + "Mountain Bluebird", + "Townsend's Solitaire", + "Veery", + "Gray-cheeked Thrush", + "Bicknell's Thrush", + "Swainson's Thrush", + "Hermit Thrush", + "Wood Thrush", + "Eurasian Blackbird", + "Eyebrowed Thrush", + "Dusky Thrush", + "Fieldfare", + "Redwing", + "Clay-colored Robin", + "White-throated Robin", + "Rufous-backed Robin", + "American Robin", + "Varied Thrush", + "Aztec Thrush", + "Wrentit", + "Gray Catbird", + "Black Catbird", + "Northern Mockingbird", + "Bahama Mockingbird", + "Sage Thrasher", + "Brown Thrasher", + "Long-billed Thrasher", + "Bendire's Thrasher", + "Curve-billed Thrasher", + "California Thrasher", + "Crissal Thrasher", + "Le Conte's Thrasher", + "Blue Mockingbird", + "European Starling", + "Crested Myna", + "Siberian Accentor", + "Yellow Wagtail", + "Citrine Wagtail", + "Gray Wagtail", + "White Wagtail", + "Black-backed Wagtail", + "Tree Pipit", + "Olive-backed Pipit", + "Pechora Pipit", + "Red-throated Pipit", + "American Pipit", + "Sprague's Pipit", + "Bohemian Waxwing", + "Cedar Waxwing", + "Gray Silky-flycatcher", + "Phainopepla", + "Olive Warbler", + "Bachman's Warbler", + "Blue-winged Warbler", + "Golden-winged Warbler", + "Tennessee Warbler", + "Orange-crowned Warbler", + "Nashville Warbler", + "Virginia's Warbler", + "Colima Warbler", + "Lucy's Warbler", + "Crescent-chested Warbler", + "Northern Parula", + "Tropical Parula", + "Yellow Warbler", + "Chestnut-sided Warbler", + "Magnolia Warbler", + "Cape May Warbler", + "Black-throated Blue Warbler", + "Yellow-rumped Warbler", + "Black-throated Gray Warbler", + "Golden-cheeked Warbler", + "Black-throated Green Warbler", + "Townsend's Warbler", + "Hermit Warbler", + "Blackburnian Warbler", + "Yellow-throated Warbler", + "Grace's Warbler", + "Pine Warbler", + "Kirtland's Warbler", + "Prairie Warbler", + "Palm Warbler", + "Bay-breasted Warbler", + "Blackpoll Warbler", + "Cerulean Warbler", + "Black-and-white Warbler", + "American Redstart", + "Prothonotary Warbler", + "Worm-eating Warbler", + "Swainson's Warbler", + "Ovenbird", + "Northern Waterthrush", + "Louisiana Waterthrush", + "Kentucky Warbler", + "Connecticut Warbler", + "Mourning Warbler", + "MacGillivray's Warbler", + "Common Yellowthroat", + "Gray-crowned Yellowthroat", + "Hooded Warbler", + "Wilson's Warbler", + "Canada Warbler", + "Red-faced Warbler", + "Painted Redstart", + "Slate-throated Redstart", + "Fan-tailed Warbler", + "Golden-crowned Warbler", + "Rufous-capped Warbler", + "Yellow-breasted Chat", + "Bananaquit", + "Hepatic Tanager", + "Summer Tanager", + "Scarlet Tanager", + "Western Tanager", + "Flame-colored Tanager", + "Stripe-headed Tanager", + "White-collared Seedeater", + "Yellow-faced Grassquit", + "Black-faced Grassquit", + "Olive Sparrow", + "Green-tailed Towhee", + "Spotted Towhee", + "Eastern Towhee", + "Canyon Towhee", + "California Towhee", + "Abert's Towhee", + "Rufous-winged Sparrow", + "Cassin's Sparrow", + "Bachman's Sparrow", + "Botteri's Sparrow", + "Rufous-crowned Sparrow", + "Five-striped Sparrow", + "American Tree Sparrow", + "Chipping Sparrow", + "Clay-colored Sparrow", + "Brewer's Sparrow", + "Field Sparrow", + "Worthen's Sparrow", + "Black-chinned Sparrow", + "Vesper Sparrow", + "Lark Sparrow", + "Black-throated Sparrow", + "Sage Sparrow", + "Lark Bunting", + "Savannah Sparrow", + "Grasshopper Sparrow", + "Baird's Sparrow", + "Henslow's Sparrow", + "Le Conte's Sparrow", + "Nelson's Sharp-tailed Sparrow", + "Saltmarsh Sharp-tailed Sparrow", + "Seaside Sparrow", + "Fox Sparrow", + "Song Sparrow", + "Lincoln's Sparrow", + "Swamp Sparrow", + "White-throated Sparrow", + "Harris's Sparrow", + "White-crowned Sparrow", + "Golden-crowned Sparrow", + "Dark-eyed Junco", + "Yellow-eyed Junco", + "McCown's Longspur", + "Lapland Longspur", + "Smith's Longspur", + "Chestnut-collared Longspur", + "Pine Bunting", + "Little Bunting", + "Rustic Bunting", + "Yellow-breasted Bunting", + "Gray Bunting", + "Pallas's Bunting", + "Reed Bunting", + "Snow Bunting", + "McKay's Bunting", + "Crimson-collared Grosbeak", + "Northern Cardinal", + "Pyrrhuloxia", + "Yellow Grosbeak", + "Rose-breasted Grosbeak", + "Black-headed Grosbeak", + "Blue Bunting", + "Blue Grosbeak", + "Lazuli Bunting", + "Indigo Bunting", + "Varied Bunting", + "Painted Bunting", + "Dickcissel", + "Bobolink", + "Red-winged Blackbird", + "Tricolored Blackbird", + "Tawny-shouldered Blackbird", + "Eastern Meadowlark", + "Western Meadowlark", + "Yellow-headed Blackbird", + "Rusty Blackbird", + "Brewer's Blackbird", + "Common Grackle", + "Boat-tailed Grackle", + "Great-tailed Grackle", + "Shiny Cowbird", + "Bronzed Cowbird", + "Brown-headed Cowbird", + "Black-vented Oriole", + "Orchard Oriole", + "Hooded Oriole", + "Streak-backed Oriole", + "Spot-breasted Oriole", + "Altamira Oriole", + "Audubon's Oriole", + "Baltimore Oriole", + "Bullock's Oriole", + "Scott's Oriole", + "Common Chaffinch", + "Brambling", + "Gray-crowned Rosy-Finch", + "Black Rosy-Finch", + "Brown-capped Rosy-Finch", + "Pine Grosbeak", + "Common Rosefinch", + "Purple Finch", + "Cassin's Finch", + "House Finch", + "Red Crossbill", + "White-winged Crossbill", + "Common Redpoll", + "Hoary Redpoll", + "Eurasian Siskin", + "Pine Siskin", + "Lesser Goldfinch", + "Lawrence's Goldfinch", + "American Goldfinch", + "Oriental Greenfinch", + "Eurasian Bullfinch", + "Evening Grosbeak", + "Hawfinch", + "House Sparrow", + "Eurasian Tree Sparrow" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/animal/fish.js +var require_fish = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/animal/fish.js"(exports2, module2) { + module2["exports"] = [ + "Grass carp", + "Peruvian anchoveta", + "Silver carp", + "Common carp", + "Asari,", + "Japanese littleneck,", + "Filipino Venus,", + "Japanese cockle,", + "Alaska pollock", + "Nile tilapia", + "Whiteleg shrimp", + "Bighead carp", + "Skipjack tuna", + "Catla", + "Crucian carp", + "Atlantic salmon", + "Atlantic herring", + "Chub mackerel", + "Rohu", + "Yellowfin tuna", + "Japanese anchovy", + "Largehead hairtail", + "Atlantic cod", + "European pilchard", + "Capelin", + "Jumbo flying squid", + "Milkfish", + "Atlantic mackerel", + "Rainbow trout", + "Araucanian herring", + "Wuchang bream", + "Gulf menhaden", + "Indian oil sardine", + "Black carp", + "European anchovy", + "Northern snakehead", + "Pacific cod", + "Pacific saury", + "Pacific herring", + "Bigeye tuna", + "Chilean jack mackerel", + "Yellow croaker", + "Haddock", + "Gazami crab", + "Amur catfish", + "Japanese common catfish", + "European sprat", + "Pink salmon", + "Mrigal carp", + "Channel catfish", + "Blood cockle", + "Blue whiting", + "Hilsa shad", + "Daggertooth pike conger", + "California pilchard", + "Cape horse mackerel", + "Pacific anchoveta", + "Japanese flying squid", + "Pollock", + "Chinese softshell turtle", + "Kawakawa", + "Indian mackerel", + "Asian swamp eel", + "Argentine hake", + "Short mackerel", + "Southern rough shrimp", + "Southern African anchovy", + "Pond loach", + "Iridescent shark", + "Mandarin fish", + "Chinese perch", + "Nile perch", + "Round sardinella", + "Japanese pilchard", + "Bombay-duck", + "Yellowhead catfish", + "Korean bullhead", + "Narrow-barred Spanish mackerel", + "Albacore", + "Madeiran sardinella", + "Bonga shad", + "Silver cyprinid", + "Nile tilapia", + "Longtail tuna", + "Atlantic menhaden", + "North Pacific hake", + "Atlantic horse mackerel", + "Japanese jack mackerel", + "Pacific thread herring", + "Bigeye scad", + "Yellowstripe scad", + "Chum salmon", + "Blue swimming crab", + "Pacific sand lance", + "Pacific sandlance", + "Goldstripe sardinella" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/animal/crocodilia.js +var require_crocodilia = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/animal/crocodilia.js"(exports2, module2) { + module2["exports"] = [ + "Alligator mississippiensis", + "Chinese Alligator", + "Black Caiman", + "Broad-snouted Caiman", + "Spectacled Caiman", + "Yacare Caiman", + "Cuvier\u2019s Dwarf Caiman", + "Schneider\u2019s Smooth-fronted Caiman", + "African Slender-snouted Crocodile", + "American Crocodile", + "Australian Freshwater Crocodile", + "Cuban Crocodile", + "Dwarf Crocodile", + "Morelet\u2019s Crocodile", + "Mugger Crocodile", + "New Guinea Freshwater Crocodile", + "Nile Crocodile", + "West African Crocodile", + "Orinoco Crocodile", + "Philippine Crocodile", + "Saltwater Crocodile", + "Siamese Crocodile", + "Gharial", + "Tomistoma" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/animal/type.js +var require_type2 = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/animal/type.js"(exports2, module2) { + module2["exports"] = [ + "dog", + "cat", + "snake", + "bear", + "lion", + "cetacean", + "insect", + "crocodilia", + "cow", + "bird", + "fish", + "rabbit", + "horse" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/animal/index.js +var require_animal2 = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/animal/index.js"(exports2, module2) { + var animal = {}; + module2["exports"] = animal; + animal.dog = require_dog(); + animal.cat = require_cat(); + animal.snake = require_snake(); + animal.horse = require_horse(); + animal.cetacean = require_cetacean(); + animal.rabbit = require_rabbit(); + animal.insect = require_insect(); + animal.bear = require_bear(); + animal.lion = require_lion(); + animal.cow = require_cow(); + animal.bird = require_bird(); + animal.fish = require_fish(); + animal.crocodilia = require_crocodilia(); + animal.type = require_type2(); + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/company/suffix.js +var require_suffix = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/company/suffix.js"(exports2, module2) { + module2["exports"] = [ + "Inc", + "and Sons", + "LLC", + "Group" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/company/adjective.js +var require_adjective = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/company/adjective.js"(exports2, module2) { + module2["exports"] = [ + "Adaptive", + "Advanced", + "Ameliorated", + "Assimilated", + "Automated", + "Balanced", + "Business-focused", + "Centralized", + "Cloned", + "Compatible", + "Configurable", + "Cross-group", + "Cross-platform", + "Customer-focused", + "Customizable", + "Decentralized", + "De-engineered", + "Devolved", + "Digitized", + "Distributed", + "Diverse", + "Down-sized", + "Enhanced", + "Enterprise-wide", + "Ergonomic", + "Exclusive", + "Expanded", + "Extended", + "Face to face", + "Focused", + "Front-line", + "Fully-configurable", + "Function-based", + "Fundamental", + "Future-proofed", + "Grass-roots", + "Horizontal", + "Implemented", + "Innovative", + "Integrated", + "Intuitive", + "Inverse", + "Managed", + "Mandatory", + "Monitored", + "Multi-channelled", + "Multi-lateral", + "Multi-layered", + "Multi-tiered", + "Networked", + "Object-based", + "Open-architected", + "Open-source", + "Operative", + "Optimized", + "Optional", + "Organic", + "Organized", + "Persevering", + "Persistent", + "Phased", + "Polarised", + "Pre-emptive", + "Proactive", + "Profit-focused", + "Profound", + "Programmable", + "Progressive", + "Public-key", + "Quality-focused", + "Reactive", + "Realigned", + "Re-contextualized", + "Re-engineered", + "Reduced", + "Reverse-engineered", + "Right-sized", + "Robust", + "Seamless", + "Secured", + "Self-enabling", + "Sharable", + "Stand-alone", + "Streamlined", + "Switchable", + "Synchronised", + "Synergistic", + "Synergized", + "Team-oriented", + "Total", + "Triple-buffered", + "Universal", + "Up-sized", + "Upgradable", + "User-centric", + "User-friendly", + "Versatile", + "Virtual", + "Visionary", + "Vision-oriented" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/company/descriptor.js +var require_descriptor = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/company/descriptor.js"(exports2, module2) { + module2["exports"] = [ + "24 hour", + "24/7", + "3rd generation", + "4th generation", + "5th generation", + "6th generation", + "actuating", + "analyzing", + "asymmetric", + "asynchronous", + "attitude-oriented", + "background", + "bandwidth-monitored", + "bi-directional", + "bifurcated", + "bottom-line", + "clear-thinking", + "client-driven", + "client-server", + "coherent", + "cohesive", + "composite", + "context-sensitive", + "contextually-based", + "content-based", + "dedicated", + "demand-driven", + "didactic", + "directional", + "discrete", + "disintermediate", + "dynamic", + "eco-centric", + "empowering", + "encompassing", + "even-keeled", + "executive", + "explicit", + "exuding", + "fault-tolerant", + "foreground", + "fresh-thinking", + "full-range", + "global", + "grid-enabled", + "heuristic", + "high-level", + "holistic", + "homogeneous", + "human-resource", + "hybrid", + "impactful", + "incremental", + "intangible", + "interactive", + "intermediate", + "leading edge", + "local", + "logistical", + "maximized", + "methodical", + "mission-critical", + "mobile", + "modular", + "motivating", + "multimedia", + "multi-state", + "multi-tasking", + "national", + "needs-based", + "neutral", + "next generation", + "non-volatile", + "object-oriented", + "optimal", + "optimizing", + "radical", + "real-time", + "reciprocal", + "regional", + "responsive", + "scalable", + "secondary", + "solution-oriented", + "stable", + "static", + "systematic", + "systemic", + "system-worthy", + "tangible", + "tertiary", + "transitional", + "uniform", + "upward-trending", + "user-facing", + "value-added", + "web-enabled", + "well-modulated", + "zero administration", + "zero defect", + "zero tolerance" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/company/noun.js +var require_noun = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/company/noun.js"(exports2, module2) { + module2["exports"] = [ + "ability", + "access", + "adapter", + "algorithm", + "alliance", + "analyzer", + "application", + "approach", + "architecture", + "archive", + "artificial intelligence", + "array", + "attitude", + "benchmark", + "budgetary management", + "capability", + "capacity", + "challenge", + "circuit", + "collaboration", + "complexity", + "concept", + "conglomeration", + "contingency", + "core", + "customer loyalty", + "database", + "data-warehouse", + "definition", + "emulation", + "encoding", + "encryption", + "extranet", + "firmware", + "flexibility", + "focus group", + "forecast", + "frame", + "framework", + "function", + "functionalities", + "Graphic Interface", + "groupware", + "Graphical User Interface", + "hardware", + "help-desk", + "hierarchy", + "hub", + "implementation", + "info-mediaries", + "infrastructure", + "initiative", + "installation", + "instruction set", + "interface", + "internet solution", + "intranet", + "knowledge user", + "knowledge base", + "local area network", + "leverage", + "matrices", + "matrix", + "methodology", + "middleware", + "migration", + "model", + "moderator", + "monitoring", + "moratorium", + "neural-net", + "open architecture", + "open system", + "orchestration", + "paradigm", + "parallelism", + "policy", + "portal", + "pricing structure", + "process improvement", + "product", + "productivity", + "project", + "projection", + "protocol", + "secured line", + "service-desk", + "software", + "solution", + "standardization", + "strategy", + "structure", + "success", + "superstructure", + "support", + "synergy", + "system engine", + "task-force", + "throughput", + "time-frame", + "toolset", + "utilisation", + "website", + "workforce" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/company/bs_verb.js +var require_bs_verb = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/company/bs_verb.js"(exports2, module2) { + module2["exports"] = [ + "implement", + "utilize", + "integrate", + "streamline", + "optimize", + "evolve", + "transform", + "embrace", + "enable", + "orchestrate", + "leverage", + "reinvent", + "aggregate", + "architect", + "enhance", + "incentivize", + "morph", + "empower", + "envisioneer", + "monetize", + "harness", + "facilitate", + "seize", + "disintermediate", + "synergize", + "strategize", + "deploy", + "brand", + "grow", + "target", + "syndicate", + "synthesize", + "deliver", + "mesh", + "incubate", + "engage", + "maximize", + "benchmark", + "expedite", + "reintermediate", + "whiteboard", + "visualize", + "repurpose", + "innovate", + "scale", + "unleash", + "drive", + "extend", + "engineer", + "revolutionize", + "generate", + "exploit", + "transition", + "e-enable", + "iterate", + "cultivate", + "matrix", + "productize", + "redefine", + "recontextualize" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/company/bs_adjective.js +var require_bs_adjective = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/company/bs_adjective.js"(exports2, module2) { + module2["exports"] = [ + "clicks-and-mortar", + "value-added", + "vertical", + "proactive", + "robust", + "revolutionary", + "scalable", + "leading-edge", + "innovative", + "intuitive", + "strategic", + "e-business", + "mission-critical", + "sticky", + "one-to-one", + "24/7", + "end-to-end", + "global", + "B2B", + "B2C", + "granular", + "frictionless", + "virtual", + "viral", + "dynamic", + "24/365", + "best-of-breed", + "killer", + "magnetic", + "bleeding-edge", + "web-enabled", + "interactive", + "dot-com", + "sexy", + "back-end", + "real-time", + "efficient", + "front-end", + "distributed", + "seamless", + "extensible", + "turn-key", + "world-class", + "open-source", + "cross-platform", + "cross-media", + "synergistic", + "bricks-and-clicks", + "out-of-the-box", + "enterprise", + "integrated", + "impactful", + "wireless", + "transparent", + "next-generation", + "cutting-edge", + "user-centric", + "visionary", + "customized", + "ubiquitous", + "plug-and-play", + "collaborative", + "compelling", + "holistic", + "rich" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/company/bs_noun.js +var require_bs_noun = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/company/bs_noun.js"(exports2, module2) { + module2["exports"] = [ + "synergies", + "web-readiness", + "paradigms", + "markets", + "partnerships", + "infrastructures", + "platforms", + "initiatives", + "channels", + "eyeballs", + "communities", + "ROI", + "solutions", + "e-tailers", + "e-services", + "action-items", + "portals", + "niches", + "technologies", + "content", + "vortals", + "supply-chains", + "convergence", + "relationships", + "architectures", + "interfaces", + "e-markets", + "e-commerce", + "systems", + "bandwidth", + "infomediaries", + "models", + "mindshare", + "deliverables", + "users", + "schemas", + "networks", + "applications", + "metrics", + "e-business", + "functionalities", + "experiences", + "web services", + "methodologies", + "blockchains" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/company/name.js +var require_name2 = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/company/name.js"(exports2, module2) { + module2["exports"] = [ + "#{Name.last_name} #{suffix}", + "#{Name.last_name}-#{Name.last_name}", + "#{Name.last_name}, #{Name.last_name} and #{Name.last_name}" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/company/index.js +var require_company2 = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/company/index.js"(exports2, module2) { + var company = {}; + module2["exports"] = company; + company.suffix = require_suffix(); + company.adjective = require_adjective(); + company.descriptor = require_descriptor(); + company.noun = require_noun(); + company.bs_verb = require_bs_verb(); + company.bs_adjective = require_bs_adjective(); + company.bs_noun = require_bs_noun(); + company.name = require_name2(); + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/internet/free_email.js +var require_free_email = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/internet/free_email.js"(exports2, module2) { + module2["exports"] = [ + "gmail.com", + "yahoo.com", + "hotmail.com" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/internet/example_email.js +var require_example_email = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/internet/example_email.js"(exports2, module2) { + module2["exports"] = [ + "example.org", + "example.com", + "example.net" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/internet/domain_suffix.js +var require_domain_suffix = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/internet/domain_suffix.js"(exports2, module2) { + module2["exports"] = [ + "com", + "biz", + "info", + "name", + "net", + "org" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/internet/avatar_uri.js +var require_avatar_uri = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/internet/avatar_uri.js"(exports2, module2) { + module2["exports"] = [ + "0therplanet_128.jpg", + "1markiz_128.jpg", + "2fockus_128.jpg", + "8d3k_128.jpg", + "91bilal_128.jpg", + "9lessons_128.jpg", + "AM_Kn2_128.jpg", + "AlbertoCococi_128.jpg", + "BenouarradeM_128.jpg", + "BillSKenney_128.jpg", + "BrianPurkiss_128.jpg", + "BroumiYoussef_128.jpg", + "BryanHorsey_128.jpg", + "Chakintosh_128.jpg", + "ChrisFarina78_128.jpg", + "Elt_n_128.jpg", + "GavicoInd_128.jpg", + "HenryHoffman_128.jpg", + "IsaryAmairani_128.jpg", + "Karimmove_128.jpg", + "LucasPerdidao_128.jpg", + "ManikRathee_128.jpg", + "RussellBishop_128.jpg", + "S0ufi4n3_128.jpg", + "SULiik_128.jpg", + "Shriiiiimp_128.jpg", + "Silveredge9_128.jpg", + "Skyhartman_128.jpg", + "SlaapMe_128.jpg", + "Stievius_128.jpg", + "Talbi_ConSept_128.jpg", + "VMilescu_128.jpg", + "VinThomas_128.jpg", + "YoungCutlass_128.jpg", + "ZacharyZorbas_128.jpg", + "_dwite__128.jpg", + "_kkga_128.jpg", + "_pedropinho_128.jpg", + "_ragzor_128.jpg", + "_scottburgess_128.jpg", + "_shahedk_128.jpg", + "_victa_128.jpg", + "_vojto_128.jpg", + "_williamguerra_128.jpg", + "_yardenoon_128.jpg", + "a1chapone_128.jpg", + "a_brixen_128.jpg", + "a_harris88_128.jpg", + "aaronalfred_128.jpg", + "aaroni_128.jpg", + "aaronkwhite_128.jpg", + "abdots_128.jpg", + "abdulhyeuk_128.jpg", + "abdullindenis_128.jpg", + "abelcabans_128.jpg", + "abotap_128.jpg", + "abovefunction_128.jpg", + "adamawesomeface_128.jpg", + "adammarsbar_128.jpg", + "adamnac_128.jpg", + "adamsxu_128.jpg", + "adellecharles_128.jpg", + "ademilter_128.jpg", + "adhamdannaway_128.jpg", + "adhiardana_128.jpg", + "adityasutomo_128.jpg", + "adobi_128.jpg", + "adrienths_128.jpg", + "aeon56_128.jpg", + "afusinatto_128.jpg", + "agromov_128.jpg", + "agustincruiz_128.jpg", + "ah_lice_128.jpg", + "ahmadajmi_128.jpg", + "ahmetalpbalkan_128.jpg", + "ahmetsulek_128.jpg", + "aiiaiiaii_128.jpg", + "ainsleywagon_128.jpg", + "aio____128.jpg", + "airskylar_128.jpg", + "aislinnkelly_128.jpg", + "ajaxy_ru_128.jpg", + "aka_james_128.jpg", + "akashsharma39_128.jpg", + "akmalfikri_128.jpg", + "akmur_128.jpg", + "al_li_128.jpg", + "alagoon_128.jpg", + "alan_zhang__128.jpg", + "albertaugustin_128.jpg", + "alecarpentier_128.jpg", + "aleclarsoniv_128.jpg", + "aleinadsays_128.jpg", + "alek_djuric_128.jpg", + "aleksitappura_128.jpg", + "alessandroribe_128.jpg", + "alevizio_128.jpg", + "alexandermayes_128.jpg", + "alexivanichkin_128.jpg", + "algunsanabria_128.jpg", + "allagringaus_128.jpg", + "allfordesign_128.jpg", + "allthingssmitty_128.jpg", + "alsobrooks_128.jpg", + "alterchuca_128.jpg", + "aluisio_azevedo_128.jpg", + "alxleroydeval_128.jpg", + "alxndrustinov_128.jpg", + "amandabuzard_128.jpg", + "amanruzaini_128.jpg", + "amayvs_128.jpg", + "amywebbb_128.jpg", + "anaami_128.jpg", + "anasnakawa_128.jpg", + "anatolinicolae_128.jpg", + "andrea211087_128.jpg", + "andreas_pr_128.jpg", + "andresdjasso_128.jpg", + "andresenfredrik_128.jpg", + "andrewabogado_128.jpg", + "andrewarrow_128.jpg", + "andrewcohen_128.jpg", + "andrewofficer_128.jpg", + "andyisonline_128.jpg", + "andysolomon_128.jpg", + "andytlaw_128.jpg", + "angelceballos_128.jpg", + "angelcolberg_128.jpg", + "angelcreative_128.jpg", + "anjhero_128.jpg", + "ankitind_128.jpg", + "anoff_128.jpg", + "anthonysukow_128.jpg", + "antjanus_128.jpg", + "antongenkin_128.jpg", + "antonyryndya_128.jpg", + "antonyzotov_128.jpg", + "aoimedia_128.jpg", + "apriendeau_128.jpg", + "arashmanteghi_128.jpg", + "areandacom_128.jpg", + "areus_128.jpg", + "ariffsetiawan_128.jpg", + "ariil_128.jpg", + "arindam__128.jpg", + "arishi__128.jpg", + "arkokoley_128.jpg", + "aroon_sharma_128.jpg", + "arpitnj_128.jpg", + "artd_sign_128.jpg", + "artem_kostenko_128.jpg", + "arthurholcombe1_128.jpg", + "artvavs_128.jpg", + "ashernatali_128.jpg", + "ashocka18_128.jpg", + "atanism_128.jpg", + "atariboy_128.jpg", + "ateneupopular_128.jpg", + "attacks_128.jpg", + "aviddayentonbay_128.jpg", + "axel_128.jpg", + "badlittleduck_128.jpg", + "bagawarman_128.jpg", + "baires_128.jpg", + "balakayuriy_128.jpg", + "balintorosz_128.jpg", + "baliomega_128.jpg", + "baluli_128.jpg", + "bargaorobalo_128.jpg", + "barputro_128.jpg", + "bartjo_128.jpg", + "bartoszdawydzik_128.jpg", + "bassamology_128.jpg", + "batsirai_128.jpg", + "baumann_alex_128.jpg", + "baumannzone_128.jpg", + "bboy1895_128.jpg", + "bcrad_128.jpg", + "begreative_128.jpg", + "belyaev_rs_128.jpg", + "benefritz_128.jpg", + "benjamin_knight_128.jpg", + "bennyjien_128.jpg", + "benoitboucart_128.jpg", + "bereto_128.jpg", + "bergmartin_128.jpg", + "bermonpainter_128.jpg", + "bertboerland_128.jpg", + "besbujupi_128.jpg", + "beshur_128.jpg", + "betraydan_128.jpg", + "beweinreich_128.jpg", + "bfrohs_128.jpg", + "bighanddesign_128.jpg", + "bigmancho_128.jpg", + "billyroshan_128.jpg", + "bistrianiosip_128.jpg", + "blakehawksworth_128.jpg", + "blakesimkins_128.jpg", + "bluefx__128.jpg", + "bluesix_128.jpg", + "bobbytwoshoes_128.jpg", + "bobwassermann_128.jpg", + "bolzanmarco_128.jpg", + "borantula_128.jpg", + "borges_marcos_128.jpg", + "bowbrick_128.jpg", + "boxmodel_128.jpg", + "bpartridge_128.jpg", + "bradenhamm_128.jpg", + "brajeshwar_128.jpg", + "brandclay_128.jpg", + "brandonburke_128.jpg", + "brandonflatsoda_128.jpg", + "brandonmorreale_128.jpg", + "brenmurrell_128.jpg", + "brenton_clarke_128.jpg", + "bruno_mart_128.jpg", + "brunodesign1206_128.jpg", + "bryan_topham_128.jpg", + "bu7921_128.jpg", + "bublienko_128.jpg", + "buddhasource_128.jpg", + "buleswapnil_128.jpg", + "bungiwan_128.jpg", + "buryaknick_128.jpg", + "buzzusborne_128.jpg", + "byrnecore_128.jpg", + "byryan_128.jpg", + "cadikkara_128.jpg", + "calebjoyce_128.jpg", + "calebogden_128.jpg", + "canapud_128.jpg", + "carbontwelve_128.jpg", + "carlfairclough_128.jpg", + "carlosblanco_eu_128.jpg", + "carlosgavina_128.jpg", + "carlosjgsousa_128.jpg", + "carlosm_128.jpg", + "carlyson_128.jpg", + "caseycavanagh_128.jpg", + "caspergrl_128.jpg", + "catadeleon_128.jpg", + "catarino_128.jpg", + "cboller1_128.jpg", + "cbracco_128.jpg", + "ccinojasso1_128.jpg", + "cdavis565_128.jpg", + "cdharrison_128.jpg", + "ceekaytweet_128.jpg", + "cemshid_128.jpg", + "cggaurav_128.jpg", + "chaabane_wail_128.jpg", + "chacky14_128.jpg", + "chadami_128.jpg", + "chadengle_128.jpg", + "chaensel_128.jpg", + "chandlervdw_128.jpg", + "chanpory_128.jpg", + "charlesrpratt_128.jpg", + "charliecwaite_128.jpg", + "charliegann_128.jpg", + "chatyrko_128.jpg", + "cherif_b_128.jpg", + "chris_frees_128.jpg", + "chris_witko_128.jpg", + "chrismj83_128.jpg", + "chrisslowik_128.jpg", + "chrisstumph_128.jpg", + "christianoliff_128.jpg", + "chrisvanderkooi_128.jpg", + "ciaranr_128.jpg", + "cicerobr_128.jpg", + "claudioguglieri_128.jpg", + "cloudstudio_128.jpg", + "clubb3rry_128.jpg", + "cocolero_128.jpg", + "codepoet_ru_128.jpg", + "coderdiaz_128.jpg", + "codysanfilippo_128.jpg", + "cofla_128.jpg", + "colgruv_128.jpg", + "colirpixoil_128.jpg", + "collegeman_128.jpg", + "commadelimited_128.jpg", + "conspirator_128.jpg", + "constantx_128.jpg", + "coreyginnivan_128.jpg", + "coreyhaggard_128.jpg", + "coreyweb_128.jpg", + "craigelimeliah_128.jpg", + "craighenneberry_128.jpg", + "craigrcoles_128.jpg", + "creartinc_128.jpg", + "croakx_128.jpg", + "curiousoffice_128.jpg", + "curiousonaut_128.jpg", + "cybind_128.jpg", + "cynthiasavard_128.jpg", + "cyril_gaillard_128.jpg", + "d00maz_128.jpg", + "d33pthought_128.jpg", + "d_kobelyatsky_128.jpg", + "d_nny_m_cher_128.jpg", + "dactrtr_128.jpg", + "dahparra_128.jpg", + "dallasbpeters_128.jpg", + "damenleeturks_128.jpg", + "danillos_128.jpg", + "daniloc_128.jpg", + "danmartin70_128.jpg", + "dannol_128.jpg", + "danpliego_128.jpg", + "danro_128.jpg", + "dansowter_128.jpg", + "danthms_128.jpg", + "danvernon_128.jpg", + "danvierich_128.jpg", + "darcystonge_128.jpg", + "darylws_128.jpg", + "davecraige_128.jpg", + "davidbaldie_128.jpg", + "davidcazalis_128.jpg", + "davidhemphill_128.jpg", + "davidmerrique_128.jpg", + "davidsasda_128.jpg", + "dawidwu_128.jpg", + "daykiine_128.jpg", + "dc_user_128.jpg", + "dcalonaci_128.jpg", + "ddggccaa_128.jpg", + "de_ascanio_128.jpg", + "deeenright_128.jpg", + "demersdesigns_128.jpg", + "denisepires_128.jpg", + "depaulawagner_128.jpg", + "derekcramer_128.jpg", + "derekebradley_128.jpg", + "derienzo777_128.jpg", + "desastrozo_128.jpg", + "designervzm_128.jpg", + "dev_essentials_128.jpg", + "devankoshal_128.jpg", + "deviljho__128.jpg", + "devinhalladay_128.jpg", + "dgajjar_128.jpg", + "dgclegg_128.jpg", + "dhilipsiva_128.jpg", + "dhoot_amit_128.jpg", + "dhooyenga_128.jpg", + "dhrubo_128.jpg", + "diansigitp_128.jpg", + "dicesales_128.jpg", + "diesellaws_128.jpg", + "digitalmaverick_128.jpg", + "dimaposnyy_128.jpg", + "dingyi_128.jpg", + "divya_128.jpg", + "dixchen_128.jpg", + "djsherman_128.jpg", + "dmackerman_128.jpg", + "dmitriychuta_128.jpg", + "dnezkumar_128.jpg", + "dnirmal_128.jpg", + "donjain_128.jpg", + "doooon_128.jpg", + "doronmalki_128.jpg", + "dorphern_128.jpg", + "dotgridline_128.jpg", + "dparrelli_128.jpg", + "dpmachado_128.jpg", + "dreizle_128.jpg", + "drewbyreese_128.jpg", + "dshster_128.jpg", + "dss49_128.jpg", + "dudestein_128.jpg", + "duivvv_128.jpg", + "dutchnadia_128.jpg", + "dvdwinden_128.jpg", + "dzantievm_128.jpg", + "ecommerceil_128.jpg", + "eddiechen_128.jpg", + "edgarchris99_128.jpg", + "edhenderson_128.jpg", + "edkf_128.jpg", + "edobene_128.jpg", + "eduardostuart_128.jpg", + "ehsandiary_128.jpg", + "eitarafa_128.jpg", + "el_fuertisimo_128.jpg", + "elbuscainfo_128.jpg", + "elenadissi_128.jpg", + "elisabethkjaer_128.jpg", + "elliotlewis_128.jpg", + "elliotnolten_128.jpg", + "embrcecreations_128.jpg", + "emileboudeling_128.jpg", + "emmandenn_128.jpg", + "emmeffess_128.jpg", + "emsgulam_128.jpg", + "enda_128.jpg", + "enjoythetau_128.jpg", + "enricocicconi_128.jpg", + "envex_128.jpg", + "ernestsemerda_128.jpg", + "erwanhesry_128.jpg", + "estebanuribe_128.jpg", + "eugeneeweb_128.jpg", + "evandrix_128.jpg", + "evanshajed_128.jpg", + "exentrich_128.jpg", + "eyronn_128.jpg", + "fabbianz_128.jpg", + "fabbrucci_128.jpg", + "faisalabid_128.jpg", + "falconerie_128.jpg", + "falling_soul_128.jpg", + "falvarad_128.jpg", + "felipeapiress_128.jpg", + "felipecsl_128.jpg", + "ffbel_128.jpg", + "finchjke_128.jpg", + "findingjenny_128.jpg", + "fiterik_128.jpg", + "fjaguero_128.jpg", + "flashmurphy_128.jpg", + "flexrs_128.jpg", + "foczzi_128.jpg", + "fotomagin_128.jpg", + "fran_mchamy_128.jpg", + "francis_vega_128.jpg", + "franciscoamk_128.jpg", + "frankiefreesbie_128.jpg", + "fronx_128.jpg", + "funwatercat_128.jpg", + "g3d_128.jpg", + "gaborenton_128.jpg", + "gabrielizalo_128.jpg", + "gabrielrosser_128.jpg", + "ganserene_128.jpg", + "garand_128.jpg", + "gauchomatt_128.jpg", + "gauravjassal_128.jpg", + "gavr1l0_128.jpg", + "gcmorley_128.jpg", + "gearpixels_128.jpg", + "geneseleznev_128.jpg", + "geobikas_128.jpg", + "geran7_128.jpg", + "geshan_128.jpg", + "giancarlon_128.jpg", + "gipsy_raf_128.jpg", + "giuliusa_128.jpg", + "gizmeedevil1991_128.jpg", + "gkaam_128.jpg", + "gmourier_128.jpg", + "goddardlewis_128.jpg", + "gofrasdesign_128.jpg", + "gojeanyn_128.jpg", + "gonzalorobaina_128.jpg", + "grahamkennery_128.jpg", + "greenbes_128.jpg", + "gregkilian_128.jpg", + "gregrwilkinson_128.jpg", + "gregsqueeb_128.jpg", + "grrr_nl_128.jpg", + "gseguin_128.jpg", + "gt_128.jpg", + "gu5taf_128.jpg", + "guiiipontes_128.jpg", + "guillemboti_128.jpg", + "guischmitt_128.jpg", + "gusoto_128.jpg", + "h1brd_128.jpg", + "hafeeskhan_128.jpg", + "hai_ninh_nguyen_128.jpg", + "haligaliharun_128.jpg", + "hanna_smi_128.jpg", + "happypeter1983_128.jpg", + "harry_sistalam_128.jpg", + "haruintesettden_128.jpg", + "hasslunsford_128.jpg", + "haydn_woods_128.jpg", + "helderleal_128.jpg", + "hellofeverrrr_128.jpg", + "her_ruu_128.jpg", + "herbigt_128.jpg", + "herkulano_128.jpg", + "hermanobrother_128.jpg", + "herrhaase_128.jpg", + "heycamtaylor_128.jpg", + "heyimjuani_128.jpg", + "heykenneth_128.jpg", + "hfalucas_128.jpg", + "hgharrygo_128.jpg", + "hiemil_128.jpg", + "hjartstrorn_128.jpg", + "hoangloi_128.jpg", + "holdenweb_128.jpg", + "homka_128.jpg", + "horaciobella_128.jpg", + "hota_v_128.jpg", + "hsinyo23_128.jpg", + "hugocornejo_128.jpg", + "hugomano_128.jpg", + "iamgarth_128.jpg", + "iamglimy_128.jpg", + "iamjdeleon_128.jpg", + "iamkarna_128.jpg", + "iamkeithmason_128.jpg", + "iamsteffen_128.jpg", + "id835559_128.jpg", + "idiot_128.jpg", + "iduuck_128.jpg", + "ifarafonow_128.jpg", + "igorgarybaldi_128.jpg", + "illyzoren_128.jpg", + "ilya_pestov_128.jpg", + "imammuht_128.jpg", + "imcoding_128.jpg", + "imomenui_128.jpg", + "imsoper_128.jpg", + "increase_128.jpg", + "incubo82_128.jpg", + "instalox_128.jpg", + "ionuss_128.jpg", + "ipavelek_128.jpg", + "iqbalperkasa_128.jpg", + "iqonicd_128.jpg", + "irae_128.jpg", + "isaacfifth_128.jpg", + "isacosta_128.jpg", + "ismail_biltagi_128.jpg", + "isnifer_128.jpg", + "itolmach_128.jpg", + "itsajimithing_128.jpg", + "itskawsar_128.jpg", + "itstotallyamy_128.jpg", + "ivanfilipovbg_128.jpg", + "j04ntoh_128.jpg", + "j2deme_128.jpg", + "j_drake__128.jpg", + "jackiesaik_128.jpg", + "jacksonlatka_128.jpg", + "jacobbennett_128.jpg", + "jagan123_128.jpg", + "jakemoore_128.jpg", + "jamiebrittain_128.jpg", + "janpalounek_128.jpg", + "jarjan_128.jpg", + "jarsen_128.jpg", + "jasonmarkjones_128.jpg", + "javorszky_128.jpg", + "jay_wilburn_128.jpg", + "jayphen_128.jpg", + "jayrobinson_128.jpg", + "jcubic_128.jpg", + "jedbridges_128.jpg", + "jefffis_128.jpg", + "jeffgolenski_128.jpg", + "jehnglynn_128.jpg", + "jennyshen_128.jpg", + "jennyyo_128.jpg", + "jeremery_128.jpg", + "jeremiaha_128.jpg", + "jeremiespoken_128.jpg", + "jeremymouton_128.jpg", + "jeremyshimko_128.jpg", + "jeremyworboys_128.jpg", + "jerrybai1907_128.jpg", + "jervo_128.jpg", + "jesseddy_128.jpg", + "jffgrdnr_128.jpg", + "jghyllebert_128.jpg", + "jimmuirhead_128.jpg", + "jitachi_128.jpg", + "jjshaw14_128.jpg", + "jjsiii_128.jpg", + "jlsolerdeltoro_128.jpg", + "jm_denis_128.jpg", + "jmfsocial_128.jpg", + "jmillspaysbills_128.jpg", + "jnmnrd_128.jpg", + "joannefournier_128.jpg", + "joaoedumedeiros_128.jpg", + "jodytaggart_128.jpg", + "joe_black_128.jpg", + "joelcipriano_128.jpg", + "joelhelin_128.jpg", + "joemdesign_128.jpg", + "joetruesdell_128.jpg", + "joeymurdah_128.jpg", + "johannesneu_128.jpg", + "johncafazza_128.jpg", + "johndezember_128.jpg", + "johnriordan_128.jpg", + "johnsmithagency_128.jpg", + "joki4_128.jpg", + "jomarmen_128.jpg", + "jonathansimmons_128.jpg", + "jonkspr_128.jpg", + "jonsgotwood_128.jpg", + "jordyvdboom_128.jpg", + "joreira_128.jpg", + "josecarlospsh_128.jpg", + "josemarques_128.jpg", + "josep_martins_128.jpg", + "josevnclch_128.jpg", + "joshaustin_128.jpg", + "joshhemsley_128.jpg", + "joshmedeski_128.jpg", + "joshuaraichur_128.jpg", + "joshuasortino_128.jpg", + "jpenico_128.jpg", + "jpscribbles_128.jpg", + "jqiuss_128.jpg", + "juamperro_128.jpg", + "juangomezw_128.jpg", + "juanmamartinez_128.jpg", + "juaumlol_128.jpg", + "judzhin_miles_128.jpg", + "justinrgraham_128.jpg", + "justinrhee_128.jpg", + "justinrob_128.jpg", + "justme_timothyg_128.jpg", + "jwalter14_128.jpg", + "jydesign_128.jpg", + "kaelifa_128.jpg", + "kalmerrautam_128.jpg", + "kamal_chaneman_128.jpg", + "kanickairaj_128.jpg", + "kapaluccio_128.jpg", + "karalek_128.jpg", + "karlkanall_128.jpg", + "karolkrakowiak__128.jpg", + "karsh_128.jpg", + "karthipanraj_128.jpg", + "kaspernordkvist_128.jpg", + "katiemdaly_128.jpg", + "kaysix_dizzy_128.jpg", + "kazaky999_128.jpg", + "kennyadr_128.jpg", + "kerem_128.jpg", + "kerihenare_128.jpg", + "keryilmaz_128.jpg", + "kevinjohndayy_128.jpg", + "kevinoh_128.jpg", + "kevka_128.jpg", + "keyuri85_128.jpg", + "kianoshp_128.jpg", + "kijanmaharjan_128.jpg", + "kikillo_128.jpg", + "kimcool_128.jpg", + "kinday_128.jpg", + "kirangopal_128.jpg", + "kiwiupover_128.jpg", + "kkusaa_128.jpg", + "klefue_128.jpg", + "klimmka_128.jpg", + "knilob_128.jpg", + "kohette_128.jpg", + "kojourin_128.jpg", + "kolage_128.jpg", + "kolmarlopez_128.jpg", + "kolsvein_128.jpg", + "konus_128.jpg", + "koridhandy_128.jpg", + "kosmar_128.jpg", + "kostaspt_128.jpg", + "krasnoukhov_128.jpg", + "krystalfister_128.jpg", + "kucingbelang4_128.jpg", + "kudretkeskin_128.jpg", + "kuldarkalvik_128.jpg", + "kumarrajan12123_128.jpg", + "kurafire_128.jpg", + "kurtinc_128.jpg", + "kushsolitary_128.jpg", + "kvasnic_128.jpg", + "ky_128.jpg", + "kylefoundry_128.jpg", + "kylefrost_128.jpg", + "laasli_128.jpg", + "lanceguyatt_128.jpg", + "langate_128.jpg", + "larrybolt_128.jpg", + "larrygerard_128.jpg", + "laurengray_128.jpg", + "lawlbwoy_128.jpg", + "layerssss_128.jpg", + "leandrovaranda_128.jpg", + "lebinoclard_128.jpg", + "lebronjennan_128.jpg", + "leehambley_128.jpg", + "leeiio_128.jpg", + "leemunroe_128.jpg", + "leonfedotov_128.jpg", + "lepetitogre_128.jpg", + "lepinski_128.jpg", + "levisan_128.jpg", + "lewisainslie_128.jpg", + "lhausermann_128.jpg", + "liminha_128.jpg", + "lingeswaran_128.jpg", + "linkibol_128.jpg", + "linux29_128.jpg", + "lisovsky_128.jpg", + "llun_128.jpg", + "lmjabreu_128.jpg", + "loganjlambert_128.jpg", + "logorado_128.jpg", + "lokesh_coder_128.jpg", + "lonesomelemon_128.jpg", + "longlivemyword_128.jpg", + "looneydoodle_128.jpg", + "lososina_128.jpg", + "louis_currie_128.jpg", + "low_res_128.jpg", + "lowie_128.jpg", + "lu4sh1i_128.jpg", + "ludwiczakpawel_128.jpg", + "luxe_128.jpg", + "lvovenok_128.jpg", + "m4rio_128.jpg", + "m_kalibry_128.jpg", + "ma_tiax_128.jpg", + "mactopus_128.jpg", + "macxim_128.jpg", + "madcampos_128.jpg", + "madebybrenton_128.jpg", + "madebyvadim_128.jpg", + "madewulf_128.jpg", + "madshensel_128.jpg", + "madysondesigns_128.jpg", + "magoo04_128.jpg", + "magugzbrand2d_128.jpg", + "mahdif_128.jpg", + "mahmoudmetwally_128.jpg", + "maikelk_128.jpg", + "maiklam_128.jpg", + "malgordon_128.jpg", + "malykhinv_128.jpg", + "mandalareopens_128.jpg", + "manekenthe_128.jpg", + "mangosango_128.jpg", + "manigm_128.jpg", + "marakasina_128.jpg", + "marciotoledo_128.jpg", + "marclgonzales_128.jpg", + "marcobarbosa_128.jpg", + "marcomano__128.jpg", + "marcoramires_128.jpg", + "marcusgorillius_128.jpg", + "markjenkins_128.jpg", + "marklamb_128.jpg", + "markolschesky_128.jpg", + "markretzloff_128.jpg", + "markwienands_128.jpg", + "marlinjayakody_128.jpg", + "marosholly_128.jpg", + "marrimo_128.jpg", + "marshallchen__128.jpg", + "martinansty_128.jpg", + "martip07_128.jpg", + "mashaaaaal_128.jpg", + "mastermindesign_128.jpg", + "matbeedotcom_128.jpg", + "mateaodviteza_128.jpg", + "matkins_128.jpg", + "matt3224_128.jpg", + "mattbilotti_128.jpg", + "mattdetails_128.jpg", + "matthewkay__128.jpg", + "mattlat_128.jpg", + "mattsapii_128.jpg", + "mauriolg_128.jpg", + "maximseshuk_128.jpg", + "maximsorokin_128.jpg", + "maxlinderman_128.jpg", + "maz_128.jpg", + "mbilalsiddique1_128.jpg", + "mbilderbach_128.jpg", + "mcflydesign_128.jpg", + "mds_128.jpg", + "mdsisto_128.jpg", + "meelford_128.jpg", + "megdraws_128.jpg", + "mekal_128.jpg", + "meln1ks_128.jpg", + "melvindidit_128.jpg", + "mfacchinello_128.jpg", + "mgonto_128.jpg", + "mhaligowski_128.jpg", + "mhesslow_128.jpg", + "mhudobivnik_128.jpg", + "michaelabehsera_128.jpg", + "michaelbrooksjr_128.jpg", + "michaelcolenso_128.jpg", + "michaelcomiskey_128.jpg", + "michaelkoper_128.jpg", + "michaelmartinho_128.jpg", + "michalhron_128.jpg", + "michigangraham_128.jpg", + "michzen_128.jpg", + "mighty55_128.jpg", + "miguelkooreman_128.jpg", + "miguelmendes_128.jpg", + "mikaeljorhult_128.jpg", + "mikebeecham_128.jpg", + "mikemai2awesome_128.jpg", + "millinet_128.jpg", + "mirfanqureshi_128.jpg", + "missaaamy_128.jpg", + "mizhgan_128.jpg", + "mizko_128.jpg", + "mkginfo_128.jpg", + "mocabyte_128.jpg", + "mohanrohith_128.jpg", + "moscoz_128.jpg", + "motionthinks_128.jpg", + "moynihan_128.jpg", + "mr_shiznit_128.jpg", + "mr_subtle_128.jpg", + "mrebay007_128.jpg", + "mrjamesnoble_128.jpg", + "mrmartineau_128.jpg", + "mrxloka_128.jpg", + "mslarkina_128.jpg", + "msveet_128.jpg", + "mtolokonnikov_128.jpg", + "mufaddal_mw_128.jpg", + "mugukamil_128.jpg", + "muridrahhal_128.jpg", + "muringa_128.jpg", + "murrayswift_128.jpg", + "mutlu82_128.jpg", + "mutu_krish_128.jpg", + "mvdheuvel_128.jpg", + "mwarkentin_128.jpg", + "myastro_128.jpg", + "mylesb_128.jpg", + "mymyboy_128.jpg", + "n1ght_coder_128.jpg", + "n3dmax_128.jpg", + "n_tassone_128.jpg", + "nacho_128.jpg", + "naitanamoreno_128.jpg", + "namankreative_128.jpg", + "nandini_m_128.jpg", + "nasirwd_128.jpg", + "nastya_mane_128.jpg", + "nateschulte_128.jpg", + "nathalie_fs_128.jpg", + "naupintos_128.jpg", + "nbirckel_128.jpg", + "nckjrvs_128.jpg", + "necodymiconer_128.jpg", + "nehfy_128.jpg", + "nellleo_128.jpg", + "nelshd_128.jpg", + "nelsonjoyce_128.jpg", + "nemanjaivanovic_128.jpg", + "nepdud_128.jpg", + "nerdgr8_128.jpg", + "nerrsoft_128.jpg", + "nessoila_128.jpg", + "netonet_il_128.jpg", + "newbrushes_128.jpg", + "nfedoroff_128.jpg", + "nickfratter_128.jpg", + "nicklacke_128.jpg", + "nicolai_larsen_128.jpg", + "nicolasfolliot_128.jpg", + "nicoleglynn_128.jpg", + "nicollerich_128.jpg", + "nilshelmersson_128.jpg", + "nilshoenson_128.jpg", + "ninjad3m0_128.jpg", + "nitinhayaran_128.jpg", + "nomidesigns_128.jpg", + "normanbox_128.jpg", + "notbadart_128.jpg", + "noufalibrahim_128.jpg", + "noxdzine_128.jpg", + "nsamoylov_128.jpg", + "ntfblog_128.jpg", + "nutzumi_128.jpg", + "nvkznemo_128.jpg", + "nwdsha_128.jpg", + "nyancecom_128.jpg", + "oaktreemedia_128.jpg", + "okandungel_128.jpg", + "okansurreel_128.jpg", + "okcoker_128.jpg", + "oksanafrewer_128.jpg", + "okseanjay_128.jpg", + "oktayelipek_128.jpg", + "olaolusoga_128.jpg", + "olgary_128.jpg", + "omnizya_128.jpg", + "ooomz_128.jpg", + "operatino_128.jpg", + "opnsrce_128.jpg", + "orkuncaylar_128.jpg", + "oscarowusu_128.jpg", + "oskamaya_128.jpg", + "oskarlevinson_128.jpg", + "osmanince_128.jpg", + "osmond_128.jpg", + "ostirbu_128.jpg", + "osvaldas_128.jpg", + "otozk_128.jpg", + "ovall_128.jpg", + "overcloacked_128.jpg", + "overra_128.jpg", + "panchajanyag_128.jpg", + "panghal0_128.jpg", + "patrickcoombe_128.jpg", + "paulfarino_128.jpg", + "pcridesagain_128.jpg", + "peachananr_128.jpg", + "pechkinator_128.jpg", + "peejfancher_128.jpg", + "pehamondello_128.jpg", + "perfectflow_128.jpg", + "perretmagali_128.jpg", + "petar_prog_128.jpg", + "petebernardo_128.jpg", + "peter576_128.jpg", + "peterlandt_128.jpg", + "petrangr_128.jpg", + "phillapier_128.jpg", + "picard102_128.jpg", + "pierre_nel_128.jpg", + "pierrestoffe_128.jpg", + "pifagor_128.jpg", + "pixage_128.jpg", + "plasticine_128.jpg", + "plbabin_128.jpg", + "pmeissner_128.jpg", + "polarity_128.jpg", + "ponchomendivil_128.jpg", + "poormini_128.jpg", + "popey_128.jpg", + "posterjob_128.jpg", + "praveen_vijaya_128.jpg", + "prheemo_128.jpg", + "primozcigler_128.jpg", + "prinzadi_128.jpg", + "privetwagner_128.jpg", + "prrstn_128.jpg", + "psaikali_128.jpg", + "psdesignuk_128.jpg", + "puzik_128.jpg", + "pyronite_128.jpg", + "quailandquasar_128.jpg", + "r_garcia_128.jpg", + "r_oy_128.jpg", + "rachelreveley_128.jpg", + "rahmeen_128.jpg", + "ralph_lam_128.jpg", + "ramanathan_pdy_128.jpg", + "randomlies_128.jpg", + "rangafangs_128.jpg", + "raphaelnikson_128.jpg", + "raquelwilson_128.jpg", + "ratbus_128.jpg", + "rawdiggie_128.jpg", + "rdbannon_128.jpg", + "rdsaunders_128.jpg", + "reabo101_128.jpg", + "reetajayendra_128.jpg", + "rehatkathuria_128.jpg", + "reideiredale_128.jpg", + "renbyrd_128.jpg", + "rez___a_128.jpg", + "ricburton_128.jpg", + "richardgarretts_128.jpg", + "richwild_128.jpg", + "rickdt_128.jpg", + "rickyyean_128.jpg", + "rikas_128.jpg", + "ripplemdk_128.jpg", + "rmlewisuk_128.jpg", + "rob_thomas10_128.jpg", + "robbschiller_128.jpg", + "robergd_128.jpg", + "robinclediere_128.jpg", + "robinlayfield_128.jpg", + "robturlinckx_128.jpg", + "rodnylobos_128.jpg", + "rohixx_128.jpg", + "romanbulah_128.jpg", + "roxanejammet_128.jpg", + "roybarberuk_128.jpg", + "rpatey_128.jpg", + "rpeezy_128.jpg", + "rtgibbons_128.jpg", + "rtyukmaev_128.jpg", + "rude_128.jpg", + "ruehldesign_128.jpg", + "runningskull_128.jpg", + "russell_baylis_128.jpg", + "russoedu_128.jpg", + "ruzinav_128.jpg", + "rweve_128.jpg", + "ryandownie_128.jpg", + "ryanjohnson_me_128.jpg", + "ryankirkman_128.jpg", + "ryanmclaughlin_128.jpg", + "ryhanhassan_128.jpg", + "ryuchi311_128.jpg", + "s4f1_128.jpg", + "saarabpreet_128.jpg", + "sachacorazzi_128.jpg", + "sachingawas_128.jpg", + "safrankov_128.jpg", + "sainraja_128.jpg", + "salimianoff_128.jpg", + "salleedesign_128.jpg", + "salvafc_128.jpg", + "samgrover_128.jpg", + "samihah_128.jpg", + "samscouto_128.jpg", + "samuelkraft_128.jpg", + "sandywoodruff_128.jpg", + "sangdth_128.jpg", + "santi_urso_128.jpg", + "saschadroste_128.jpg", + "saschamt_128.jpg", + "sasha_shestakov_128.jpg", + "saulihirvi_128.jpg", + "sawalazar_128.jpg", + "sawrb_128.jpg", + "sbtransparent_128.jpg", + "scips_128.jpg", + "scott_riley_128.jpg", + "scottfeltham_128.jpg", + "scottgallant_128.jpg", + "scottiedude_128.jpg", + "scottkclark_128.jpg", + "scrapdnb_128.jpg", + "sdidonato_128.jpg", + "sebashton_128.jpg", + "sementiy_128.jpg", + "serefka_128.jpg", + "sergeyalmone_128.jpg", + "sergeysafonov_128.jpg", + "sethlouey_128.jpg", + "seyedhossein1_128.jpg", + "sgaurav_baghel_128.jpg", + "shadeed9_128.jpg", + "shalt0ni_128.jpg", + "shaneIxD_128.jpg", + "shanehudson_128.jpg", + "sharvin_128.jpg", + "shesgared_128.jpg", + "shinze_128.jpg", + "shoaib253_128.jpg", + "shojberg_128.jpg", + "shvelo96_128.jpg", + "silv3rgvn_128.jpg", + "silvanmuhlemann_128.jpg", + "simobenso_128.jpg", + "sindresorhus_128.jpg", + "sircalebgrove_128.jpg", + "skkirilov_128.jpg", + "slowspock_128.jpg", + "smaczny_128.jpg", + "smalonso_128.jpg", + "smenov_128.jpg", + "snowshade_128.jpg", + "snowwrite_128.jpg", + "sokaniwaal_128.jpg", + "solid_color_128.jpg", + "souperphly_128.jpg", + "souuf_128.jpg", + "sovesove_128.jpg", + "soyjavi_128.jpg", + "spacewood__128.jpg", + "spbroma_128.jpg", + "spedwig_128.jpg", + "sprayaga_128.jpg", + "sreejithexp_128.jpg", + "ssbb_me_128.jpg", + "ssiskind_128.jpg", + "sta1ex_128.jpg", + "stalewine_128.jpg", + "stan_128.jpg", + "stayuber_128.jpg", + "stefanotirloni_128.jpg", + "stefanozoffoli_128.jpg", + "stefooo_128.jpg", + "stefvdham_128.jpg", + "stephcoue_128.jpg", + "sterlingrules_128.jpg", + "stevedesigner_128.jpg", + "steynviljoen_128.jpg", + "strikewan_128.jpg", + "stushona_128.jpg", + "sulaqo_128.jpg", + "sunlandictwin_128.jpg", + "sunshinedgirl_128.jpg", + "superoutman_128.jpg", + "supervova_128.jpg", + "supjoey_128.jpg", + "suprb_128.jpg", + "sur4dye_128.jpg", + "surgeonist_128.jpg", + "suribbles_128.jpg", + "svenlen_128.jpg", + "swaplord_128.jpg", + "sweetdelisa_128.jpg", + "switmer777_128.jpg", + "swooshycueb_128.jpg", + "sydlawrence_128.jpg", + "syropian_128.jpg", + "tanveerrao_128.jpg", + "taybenlor_128.jpg", + "taylorling_128.jpg", + "tbakdesigns_128.jpg", + "teddyzetterlund_128.jpg", + "teeragit_128.jpg", + "tereshenkov_128.jpg", + "terpimost_128.jpg", + "terrorpixel_128.jpg", + "terryxlife_128.jpg", + "teylorfeliz_128.jpg", + "tgerken_128.jpg", + "tgormtx_128.jpg", + "thaisselenator__128.jpg", + "thaodang17_128.jpg", + "thatonetommy_128.jpg", + "the_purplebunny_128.jpg", + "the_winslet_128.jpg", + "thedamianhdez_128.jpg", + "thedjpetersen_128.jpg", + "thehacker_128.jpg", + "thekevinjones_128.jpg", + "themadray_128.jpg", + "themikenagle_128.jpg", + "themrdave_128.jpg", + "theonlyzeke_128.jpg", + "therealmarvin_128.jpg", + "thewillbeard_128.jpg", + "thiagovernetti_128.jpg", + "thibaut_re_128.jpg", + "thierrykoblentz_128.jpg", + "thierrymeier__128.jpg", + "thimo_cz_128.jpg", + "thinkleft_128.jpg", + "thomasgeisen_128.jpg", + "thomasschrijer_128.jpg", + "timgthomas_128.jpg", + "timmillwood_128.jpg", + "timothycd_128.jpg", + "timpetricola_128.jpg", + "tjrus_128.jpg", + "to_soham_128.jpg", + "tobysaxon_128.jpg", + "toddrew_128.jpg", + "tom_even_128.jpg", + "tomas_janousek_128.jpg", + "tonymillion_128.jpg", + "traneblow_128.jpg", + "travis_arnold_128.jpg", + "travishines_128.jpg", + "tristanlegros_128.jpg", + "trubeatto_128.jpg", + "trueblood_33_128.jpg", + "tumski_128.jpg", + "tur8le_128.jpg", + "turkutuuli_128.jpg", + "tweetubhai_128.jpg", + "twittypork_128.jpg", + "txcx_128.jpg", + "uberschizo_128.jpg", + "ultragex_128.jpg", + "umurgdk_128.jpg", + "unterdreht_128.jpg", + "urrutimeoli_128.jpg", + "uxalex_128.jpg", + "uxpiper_128.jpg", + "uxward_128.jpg", + "vanchesz_128.jpg", + "vaughanmoffitt_128.jpg", + "vc27_128.jpg", + "vicivadeline_128.jpg", + "victorDubugras_128.jpg", + "victor_haydin_128.jpg", + "victordeanda_128.jpg", + "victorerixon_128.jpg", + "victorquinn_128.jpg", + "victorstuber_128.jpg", + "vigobronx_128.jpg", + "vijaykarthik_128.jpg", + "vikashpathak18_128.jpg", + "vikasvinfotech_128.jpg", + "vimarethomas_128.jpg", + "vinciarts_128.jpg", + "vitor376_128.jpg", + "vitorleal_128.jpg", + "vivekprvr_128.jpg", + "vj_demien_128.jpg", + "vladarbatov_128.jpg", + "vladimirdevic_128.jpg", + "vladyn_128.jpg", + "vlajki_128.jpg", + "vm_f_128.jpg", + "vocino_128.jpg", + "vonachoo_128.jpg", + "vovkasolovev_128.jpg", + "vytautas_a_128.jpg", + "waghner_128.jpg", + "wake_gs_128.jpg", + "we_social_128.jpg", + "wearesavas_128.jpg", + "weavermedia_128.jpg", + "webtanya_128.jpg", + "weglov_128.jpg", + "wegotvices_128.jpg", + "wesleytrankin_128.jpg", + "wikiziner_128.jpg", + "wiljanslofstra_128.jpg", + "wim1k_128.jpg", + "wintopia_128.jpg", + "woodsman001_128.jpg", + "woodydotmx_128.jpg", + "wtrsld_128.jpg", + "xadhix_128.jpg", + "xalionmalik_128.jpg", + "xamorep_128.jpg", + "xiel_128.jpg", + "xilantra_128.jpg", + "xravil_128.jpg", + "xripunov_128.jpg", + "xtopherpaul_128.jpg", + "y2graphic_128.jpg", + "yalozhkin_128.jpg", + "yassiryahya_128.jpg", + "yayteejay_128.jpg", + "yecidsm_128.jpg", + "yehudab_128.jpg", + "yesmeck_128.jpg", + "yigitpinarbasi_128.jpg", + "zackeeler_128.jpg", + "zaki3d_128.jpg", + "zauerkraut_128.jpg", + "zforrester_128.jpg", + "zvchkelly_128.jpg" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/internet/index.js +var require_internet2 = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/internet/index.js"(exports2, module2) { + var internet = {}; + module2["exports"] = internet; + internet.free_email = require_free_email(); + internet.example_email = require_example_email(); + internet.domain_suffix = require_domain_suffix(); + internet.avatar_uri = require_avatar_uri(); + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/database/collation.js +var require_collation = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/database/collation.js"(exports2, module2) { + module2["exports"] = [ + "utf8_unicode_ci", + "utf8_general_ci", + "utf8_bin", + "ascii_bin", + "ascii_general_ci", + "cp1250_bin", + "cp1250_general_ci" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/database/column.js +var require_column = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/database/column.js"(exports2, module2) { + module2["exports"] = [ + "id", + "title", + "name", + "email", + "phone", + "token", + "group", + "category", + "password", + "comment", + "avatar", + "status", + "createdAt", + "updatedAt" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/database/engine.js +var require_engine = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/database/engine.js"(exports2, module2) { + module2["exports"] = [ + "InnoDB", + "MyISAM", + "MEMORY", + "CSV", + "BLACKHOLE", + "ARCHIVE" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/database/type.js +var require_type3 = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/database/type.js"(exports2, module2) { + module2["exports"] = [ + "int", + "varchar", + "text", + "date", + "datetime", + "tinyint", + "time", + "timestamp", + "smallint", + "mediumint", + "bigint", + "decimal", + "float", + "double", + "real", + "bit", + "boolean", + "serial", + "blob", + "binary", + "enum", + "set", + "geometry", + "point" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/database/index.js +var require_database2 = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/database/index.js"(exports2, module2) { + var database = {}; + module2["exports"] = database; + database.collation = require_collation(); + database.column = require_column(); + database.engine = require_engine(); + database.type = require_type3(); + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/lorem/words.js +var require_words = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/lorem/words.js"(exports2, module2) { + module2["exports"] = [ + "alias", + "consequatur", + "aut", + "perferendis", + "sit", + "voluptatem", + "accusantium", + "doloremque", + "aperiam", + "eaque", + "ipsa", + "quae", + "ab", + "illo", + "inventore", + "veritatis", + "et", + "quasi", + "architecto", + "beatae", + "vitae", + "dicta", + "sunt", + "explicabo", + "aspernatur", + "aut", + "odit", + "aut", + "fugit", + "sed", + "quia", + "consequuntur", + "magni", + "dolores", + "eos", + "qui", + "ratione", + "voluptatem", + "sequi", + "nesciunt", + "neque", + "dolorem", + "ipsum", + "quia", + "dolor", + "sit", + "amet", + "consectetur", + "adipisci", + "velit", + "sed", + "quia", + "non", + "numquam", + "eius", + "modi", + "tempora", + "incidunt", + "ut", + "labore", + "et", + "dolore", + "magnam", + "aliquam", + "quaerat", + "voluptatem", + "ut", + "enim", + "ad", + "minima", + "veniam", + "quis", + "nostrum", + "exercitationem", + "ullam", + "corporis", + "nemo", + "enim", + "ipsam", + "voluptatem", + "quia", + "voluptas", + "sit", + "suscipit", + "laboriosam", + "nisi", + "ut", + "aliquid", + "ex", + "ea", + "commodi", + "consequatur", + "quis", + "autem", + "vel", + "eum", + "iure", + "reprehenderit", + "qui", + "in", + "ea", + "voluptate", + "velit", + "esse", + "quam", + "nihil", + "molestiae", + "et", + "iusto", + "odio", + "dignissimos", + "ducimus", + "qui", + "blanditiis", + "praesentium", + "laudantium", + "totam", + "rem", + "voluptatum", + "deleniti", + "atque", + "corrupti", + "quos", + "dolores", + "et", + "quas", + "molestias", + "excepturi", + "sint", + "occaecati", + "cupiditate", + "non", + "provident", + "sed", + "ut", + "perspiciatis", + "unde", + "omnis", + "iste", + "natus", + "error", + "similique", + "sunt", + "in", + "culpa", + "qui", + "officia", + "deserunt", + "mollitia", + "animi", + "id", + "est", + "laborum", + "et", + "dolorum", + "fuga", + "et", + "harum", + "quidem", + "rerum", + "facilis", + "est", + "et", + "expedita", + "distinctio", + "nam", + "libero", + "tempore", + "cum", + "soluta", + "nobis", + "est", + "eligendi", + "optio", + "cumque", + "nihil", + "impedit", + "quo", + "porro", + "quisquam", + "est", + "qui", + "minus", + "id", + "quod", + "maxime", + "placeat", + "facere", + "possimus", + "omnis", + "voluptas", + "assumenda", + "est", + "omnis", + "dolor", + "repellendus", + "temporibus", + "autem", + "quibusdam", + "et", + "aut", + "consequatur", + "vel", + "illum", + "qui", + "dolorem", + "eum", + "fugiat", + "quo", + "voluptas", + "nulla", + "pariatur", + "at", + "vero", + "eos", + "et", + "accusamus", + "officiis", + "debitis", + "aut", + "rerum", + "necessitatibus", + "saepe", + "eveniet", + "ut", + "et", + "voluptates", + "repudiandae", + "sint", + "et", + "molestiae", + "non", + "recusandae", + "itaque", + "earum", + "rerum", + "hic", + "tenetur", + "a", + "sapiente", + "delectus", + "ut", + "aut", + "reiciendis", + "voluptatibus", + "maiores", + "doloribus", + "asperiores", + "repellat" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/lorem/supplemental.js +var require_supplemental = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/lorem/supplemental.js"(exports2, module2) { + module2["exports"] = [ + "abbas", + "abduco", + "abeo", + "abscido", + "absconditus", + "absens", + "absorbeo", + "absque", + "abstergo", + "absum", + "abundans", + "abutor", + "accedo", + "accendo", + "acceptus", + "accipio", + "accommodo", + "accusator", + "acer", + "acerbitas", + "acervus", + "acidus", + "acies", + "acquiro", + "acsi", + "adamo", + "adaugeo", + "addo", + "adduco", + "ademptio", + "adeo", + "adeptio", + "adfectus", + "adfero", + "adficio", + "adflicto", + "adhaero", + "adhuc", + "adicio", + "adimpleo", + "adinventitias", + "adipiscor", + "adiuvo", + "administratio", + "admiratio", + "admitto", + "admoneo", + "admoveo", + "adnuo", + "adopto", + "adsidue", + "adstringo", + "adsuesco", + "adsum", + "adulatio", + "adulescens", + "adultus", + "aduro", + "advenio", + "adversus", + "advoco", + "aedificium", + "aeger", + "aegre", + "aegrotatio", + "aegrus", + "aeneus", + "aequitas", + "aequus", + "aer", + "aestas", + "aestivus", + "aestus", + "aetas", + "aeternus", + "ager", + "aggero", + "aggredior", + "agnitio", + "agnosco", + "ago", + "ait", + "aiunt", + "alienus", + "alii", + "alioqui", + "aliqua", + "alius", + "allatus", + "alo", + "alter", + "altus", + "alveus", + "amaritudo", + "ambitus", + "ambulo", + "amicitia", + "amiculum", + "amissio", + "amita", + "amitto", + "amo", + "amor", + "amoveo", + "amplexus", + "amplitudo", + "amplus", + "ancilla", + "angelus", + "angulus", + "angustus", + "animadverto", + "animi", + "animus", + "annus", + "anser", + "ante", + "antea", + "antepono", + "antiquus", + "aperio", + "aperte", + "apostolus", + "apparatus", + "appello", + "appono", + "appositus", + "approbo", + "apto", + "aptus", + "apud", + "aqua", + "ara", + "aranea", + "arbitro", + "arbor", + "arbustum", + "arca", + "arceo", + "arcesso", + "arcus", + "argentum", + "argumentum", + "arguo", + "arma", + "armarium", + "armo", + "aro", + "ars", + "articulus", + "artificiose", + "arto", + "arx", + "ascisco", + "ascit", + "asper", + "aspicio", + "asporto", + "assentator", + "astrum", + "atavus", + "ater", + "atqui", + "atrocitas", + "atrox", + "attero", + "attollo", + "attonbitus", + "auctor", + "auctus", + "audacia", + "audax", + "audentia", + "audeo", + "audio", + "auditor", + "aufero", + "aureus", + "auris", + "aurum", + "aut", + "autem", + "autus", + "auxilium", + "avaritia", + "avarus", + "aveho", + "averto", + "avoco", + "baiulus", + "balbus", + "barba", + "bardus", + "basium", + "beatus", + "bellicus", + "bellum", + "bene", + "beneficium", + "benevolentia", + "benigne", + "bestia", + "bibo", + "bis", + "blandior", + "bonus", + "bos", + "brevis", + "cado", + "caecus", + "caelestis", + "caelum", + "calamitas", + "calcar", + "calco", + "calculus", + "callide", + "campana", + "candidus", + "canis", + "canonicus", + "canto", + "capillus", + "capio", + "capitulus", + "capto", + "caput", + "carbo", + "carcer", + "careo", + "caries", + "cariosus", + "caritas", + "carmen", + "carpo", + "carus", + "casso", + "caste", + "casus", + "catena", + "caterva", + "cattus", + "cauda", + "causa", + "caute", + "caveo", + "cavus", + "cedo", + "celebrer", + "celer", + "celo", + "cena", + "cenaculum", + "ceno", + "censura", + "centum", + "cerno", + "cernuus", + "certe", + "certo", + "certus", + "cervus", + "cetera", + "charisma", + "chirographum", + "cibo", + "cibus", + "cicuta", + "cilicium", + "cimentarius", + "ciminatio", + "cinis", + "circumvenio", + "cito", + "civis", + "civitas", + "clam", + "clamo", + "claro", + "clarus", + "claudeo", + "claustrum", + "clementia", + "clibanus", + "coadunatio", + "coaegresco", + "coepi", + "coerceo", + "cogito", + "cognatus", + "cognomen", + "cogo", + "cohaero", + "cohibeo", + "cohors", + "colligo", + "colloco", + "collum", + "colo", + "color", + "coma", + "combibo", + "comburo", + "comedo", + "comes", + "cometes", + "comis", + "comitatus", + "commemoro", + "comminor", + "commodo", + "communis", + "comparo", + "compello", + "complectus", + "compono", + "comprehendo", + "comptus", + "conatus", + "concedo", + "concido", + "conculco", + "condico", + "conduco", + "confero", + "confido", + "conforto", + "confugo", + "congregatio", + "conicio", + "coniecto", + "conitor", + "coniuratio", + "conor", + "conqueror", + "conscendo", + "conservo", + "considero", + "conspergo", + "constans", + "consuasor", + "contabesco", + "contego", + "contigo", + "contra", + "conturbo", + "conventus", + "convoco", + "copia", + "copiose", + "cornu", + "corona", + "corpus", + "correptius", + "corrigo", + "corroboro", + "corrumpo", + "coruscus", + "cotidie", + "crapula", + "cras", + "crastinus", + "creator", + "creber", + "crebro", + "credo", + "creo", + "creptio", + "crepusculum", + "cresco", + "creta", + "cribro", + "crinis", + "cruciamentum", + "crudelis", + "cruentus", + "crur", + "crustulum", + "crux", + "cubicularis", + "cubitum", + "cubo", + "cui", + "cuius", + "culpa", + "culpo", + "cultellus", + "cultura", + "cum", + "cunabula", + "cunae", + "cunctatio", + "cupiditas", + "cupio", + "cuppedia", + "cupressus", + "cur", + "cura", + "curatio", + "curia", + "curiositas", + "curis", + "curo", + "curriculum", + "currus", + "cursim", + "curso", + "cursus", + "curto", + "curtus", + "curvo", + "curvus", + "custodia", + "damnatio", + "damno", + "dapifer", + "debeo", + "debilito", + "decens", + "decerno", + "decet", + "decimus", + "decipio", + "decor", + "decretum", + "decumbo", + "dedecor", + "dedico", + "deduco", + "defaeco", + "defendo", + "defero", + "defessus", + "defetiscor", + "deficio", + "defigo", + "defleo", + "defluo", + "defungo", + "degenero", + "degero", + "degusto", + "deinde", + "delectatio", + "delego", + "deleo", + "delibero", + "delicate", + "delinquo", + "deludo", + "demens", + "demergo", + "demitto", + "demo", + "demonstro", + "demoror", + "demulceo", + "demum", + "denego", + "denique", + "dens", + "denuncio", + "denuo", + "deorsum", + "depereo", + "depono", + "depopulo", + "deporto", + "depraedor", + "deprecator", + "deprimo", + "depromo", + "depulso", + "deputo", + "derelinquo", + "derideo", + "deripio", + "desidero", + "desino", + "desipio", + "desolo", + "desparatus", + "despecto", + "despirmatio", + "infit", + "inflammatio", + "paens", + "patior", + "patria", + "patrocinor", + "patruus", + "pauci", + "paulatim", + "pauper", + "pax", + "peccatus", + "pecco", + "pecto", + "pectus", + "pecunia", + "pecus", + "peior", + "pel", + "ocer", + "socius", + "sodalitas", + "sol", + "soleo", + "solio", + "solitudo", + "solium", + "sollers", + "sollicito", + "solum", + "solus", + "solutio", + "solvo", + "somniculosus", + "somnus", + "sonitus", + "sono", + "sophismata", + "sopor", + "sordeo", + "sortitus", + "spargo", + "speciosus", + "spectaculum", + "speculum", + "sperno", + "spero", + "spes", + "spiculum", + "spiritus", + "spoliatio", + "sponte", + "stabilis", + "statim", + "statua", + "stella", + "stillicidium", + "stipes", + "stips", + "sto", + "strenuus", + "strues", + "studio", + "stultus", + "suadeo", + "suasoria", + "sub", + "subito", + "subiungo", + "sublime", + "subnecto", + "subseco", + "substantia", + "subvenio", + "succedo", + "succurro", + "sufficio", + "suffoco", + "suffragium", + "suggero", + "sui", + "sulum", + "sum", + "summa", + "summisse", + "summopere", + "sumo", + "sumptus", + "supellex", + "super", + "suppellex", + "supplanto", + "suppono", + "supra", + "surculus", + "surgo", + "sursum", + "suscipio", + "suspendo", + "sustineo", + "suus", + "synagoga", + "tabella", + "tabernus", + "tabesco", + "tabgo", + "tabula", + "taceo", + "tactus", + "taedium", + "talio", + "talis", + "talus", + "tam", + "tamdiu", + "tamen", + "tametsi", + "tamisium", + "tamquam", + "tandem", + "tantillus", + "tantum", + "tardus", + "tego", + "temeritas", + "temperantia", + "templum", + "temptatio", + "tempus", + "tenax", + "tendo", + "teneo", + "tener", + "tenuis", + "tenus", + "tepesco", + "tepidus", + "ter", + "terebro", + "teres", + "terga", + "tergeo", + "tergiversatio", + "tergo", + "tergum", + "termes", + "terminatio", + "tero", + "terra", + "terreo", + "territo", + "terror", + "tersus", + "tertius", + "testimonium", + "texo", + "textilis", + "textor", + "textus", + "thalassinus", + "theatrum", + "theca", + "thema", + "theologus", + "thermae", + "thesaurus", + "thesis", + "thorax", + "thymbra", + "thymum", + "tibi", + "timidus", + "timor", + "titulus", + "tolero", + "tollo", + "tondeo", + "tonsor", + "torqueo", + "torrens", + "tot", + "totidem", + "toties", + "totus", + "tracto", + "trado", + "traho", + "trans", + "tredecim", + "tremo", + "trepide", + "tres", + "tribuo", + "tricesimus", + "triduana", + "triginta", + "tripudio", + "tristis", + "triumphus", + "trucido", + "truculenter", + "tubineus", + "tui", + "tum", + "tumultus", + "tunc", + "turba", + "turbo", + "turpe", + "turpis", + "tutamen", + "tutis", + "tyrannus", + "uberrime", + "ubi", + "ulciscor", + "ullus", + "ulterius", + "ultio", + "ultra", + "umbra", + "umerus", + "umquam", + "una", + "unde", + "undique", + "universe", + "unus", + "urbanus", + "urbs", + "uredo", + "usitas", + "usque", + "ustilo", + "ustulo", + "usus", + "uter", + "uterque", + "utilis", + "utique", + "utor", + "utpote", + "utrimque", + "utroque", + "utrum", + "uxor", + "vaco", + "vacuus", + "vado", + "vae", + "valde", + "valens", + "valeo", + "valetudo", + "validus", + "vallum", + "vapulus", + "varietas", + "varius", + "vehemens", + "vel", + "velociter", + "velum", + "velut", + "venia", + "venio", + "ventito", + "ventosus", + "ventus", + "venustas", + "ver", + "verbera", + "verbum", + "vere", + "verecundia", + "vereor", + "vergo", + "veritas", + "vero", + "versus", + "verto", + "verumtamen", + "verus", + "vesco", + "vesica", + "vesper", + "vespillo", + "vester", + "vestigium", + "vestrum", + "vetus", + "via", + "vicinus", + "vicissitudo", + "victoria", + "victus", + "videlicet", + "video", + "viduata", + "viduo", + "vigilo", + "vigor", + "vilicus", + "vilis", + "vilitas", + "villa", + "vinco", + "vinculum", + "vindico", + "vinitor", + "vinum", + "vir", + "virga", + "virgo", + "viridis", + "viriliter", + "virtus", + "vis", + "viscus", + "vita", + "vitiosus", + "vitium", + "vito", + "vivo", + "vix", + "vobis", + "vociferor", + "voco", + "volaticus", + "volo", + "volubilis", + "voluntarius", + "volup", + "volutabrum", + "volva", + "vomer", + "vomica", + "vomito", + "vorago", + "vorax", + "voro", + "vos", + "votum", + "voveo", + "vox", + "vulariter", + "vulgaris", + "vulgivagus", + "vulgo", + "vulgus", + "vulnero", + "vulnus", + "vulpes", + "vulticulus", + "vultuosus", + "xiphias" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/lorem/index.js +var require_lorem2 = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/lorem/index.js"(exports2, module2) { + var lorem = {}; + module2["exports"] = lorem; + lorem.words = require_words(); + lorem.supplemental = require_supplemental(); + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/name/male_first_name.js +var require_male_first_name = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/name/male_first_name.js"(exports2, module2) { + module2["exports"] = [ + "James", + "John", + "Robert", + "Michael", + "William", + "David", + "Richard", + "Charles", + "Joseph", + "Thomas", + "Christopher", + "Daniel", + "Paul", + "Mark", + "Donald", + "George", + "Kenneth", + "Steven", + "Edward", + "Brian", + "Ronald", + "Anthony", + "Kevin", + "Jason", + "Matthew", + "Gary", + "Timothy", + "Jose", + "Larry", + "Jeffrey", + "Frank", + "Scott", + "Eric", + "Stephen", + "Andrew", + "Raymond", + "Gregory", + "Joshua", + "Jerry", + "Dennis", + "Walter", + "Patrick", + "Peter", + "Harold", + "Douglas", + "Henry", + "Carl", + "Arthur", + "Ryan", + "Roger", + "Joe", + "Juan", + "Jack", + "Albert", + "Jonathan", + "Justin", + "Terry", + "Gerald", + "Keith", + "Samuel", + "Willie", + "Ralph", + "Lawrence", + "Nicholas", + "Roy", + "Benjamin", + "Bruce", + "Brandon", + "Adam", + "Harry", + "Fred", + "Wayne", + "Billy", + "Steve", + "Louis", + "Jeremy", + "Aaron", + "Randy", + "Howard", + "Eugene", + "Carlos", + "Russell", + "Bobby", + "Victor", + "Martin", + "Ernest", + "Phillip", + "Todd", + "Jesse", + "Craig", + "Alan", + "Shawn", + "Clarence", + "Sean", + "Philip", + "Chris", + "Johnny", + "Earl", + "Jimmy", + "Antonio", + "Danny", + "Bryan", + "Tony", + "Luis", + "Mike", + "Stanley", + "Leonard", + "Nathan", + "Dale", + "Manuel", + "Rodney", + "Curtis", + "Norman", + "Allen", + "Marvin", + "Vincent", + "Glenn", + "Jeffery", + "Travis", + "Jeff", + "Chad", + "Jacob", + "Lee", + "Melvin", + "Alfred", + "Kyle", + "Francis", + "Bradley", + "Jesus", + "Herbert", + "Frederick", + "Ray", + "Joel", + "Edwin", + "Don", + "Eddie", + "Ricky", + "Troy", + "Randall", + "Barry", + "Alexander", + "Bernard", + "Mario", + "Leroy", + "Francisco", + "Marcus", + "Micheal", + "Theodore", + "Clifford", + "Miguel", + "Oscar", + "Jay", + "Jim", + "Tom", + "Calvin", + "Alex", + "Jon", + "Ronnie", + "Bill", + "Lloyd", + "Tommy", + "Leon", + "Derek", + "Warren", + "Darrell", + "Jerome", + "Floyd", + "Leo", + "Alvin", + "Tim", + "Wesley", + "Gordon", + "Dean", + "Greg", + "Jorge", + "Dustin", + "Pedro", + "Derrick", + "Dan", + "Lewis", + "Zachary", + "Corey", + "Herman", + "Maurice", + "Vernon", + "Roberto", + "Clyde", + "Glen", + "Hector", + "Shane", + "Ricardo", + "Sam", + "Rick", + "Lester", + "Brent", + "Ramon", + "Charlie", + "Tyler", + "Gilbert", + "Gene", + "Marc", + "Reginald", + "Ruben", + "Brett", + "Angel", + "Nathaniel", + "Rafael", + "Leslie", + "Edgar", + "Milton", + "Raul", + "Ben", + "Chester", + "Cecil", + "Duane", + "Franklin", + "Andre", + "Elmer", + "Brad", + "Gabriel", + "Ron", + "Mitchell", + "Roland", + "Arnold", + "Harvey", + "Jared", + "Adrian", + "Karl", + "Cory", + "Claude", + "Erik", + "Darryl", + "Jamie", + "Neil", + "Jessie", + "Christian", + "Javier", + "Fernando", + "Clinton", + "Ted", + "Mathew", + "Tyrone", + "Darren", + "Lonnie", + "Lance", + "Cody", + "Julio", + "Kelly", + "Kurt", + "Allan", + "Nelson", + "Guy", + "Clayton", + "Hugh", + "Max", + "Dwayne", + "Dwight", + "Armando", + "Felix", + "Jimmie", + "Everett", + "Jordan", + "Ian", + "Wallace", + "Ken", + "Bob", + "Jaime", + "Casey", + "Alfredo", + "Alberto", + "Dave", + "Ivan", + "Johnnie", + "Sidney", + "Byron", + "Julian", + "Isaac", + "Morris", + "Clifton", + "Willard", + "Daryl", + "Ross", + "Virgil", + "Andy", + "Marshall", + "Salvador", + "Perry", + "Kirk", + "Sergio", + "Marion", + "Tracy", + "Seth", + "Kent", + "Terrance", + "Rene", + "Eduardo", + "Terrence", + "Enrique", + "Freddie", + "Wade", + "Austin", + "Stuart", + "Fredrick", + "Arturo", + "Alejandro", + "Jackie", + "Joey", + "Nick", + "Luther", + "Wendell", + "Jeremiah", + "Evan", + "Julius", + "Dana", + "Donnie", + "Otis", + "Shannon", + "Trevor", + "Oliver", + "Luke", + "Homer", + "Gerard", + "Doug", + "Kenny", + "Hubert", + "Angelo", + "Shaun", + "Lyle", + "Matt", + "Lynn", + "Alfonso", + "Orlando", + "Rex", + "Carlton", + "Ernesto", + "Cameron", + "Neal", + "Pablo", + "Lorenzo", + "Omar", + "Wilbur", + "Blake", + "Grant", + "Horace", + "Roderick", + "Kerry", + "Abraham", + "Willis", + "Rickey", + "Jean", + "Ira", + "Andres", + "Cesar", + "Johnathan", + "Malcolm", + "Rudolph", + "Damon", + "Kelvin", + "Rudy", + "Preston", + "Alton", + "Archie", + "Marco", + "Wm", + "Pete", + "Randolph", + "Garry", + "Geoffrey", + "Jonathon", + "Felipe", + "Bennie", + "Gerardo", + "Ed", + "Dominic", + "Robin", + "Loren", + "Delbert", + "Colin", + "Guillermo", + "Earnest", + "Lucas", + "Benny", + "Noel", + "Spencer", + "Rodolfo", + "Myron", + "Edmund", + "Garrett", + "Salvatore", + "Cedric", + "Lowell", + "Gregg", + "Sherman", + "Wilson", + "Devin", + "Sylvester", + "Kim", + "Roosevelt", + "Israel", + "Jermaine", + "Forrest", + "Wilbert", + "Leland", + "Simon", + "Guadalupe", + "Clark", + "Irving", + "Carroll", + "Bryant", + "Owen", + "Rufus", + "Woodrow", + "Sammy", + "Kristopher", + "Mack", + "Levi", + "Marcos", + "Gustavo", + "Jake", + "Lionel", + "Marty", + "Taylor", + "Ellis", + "Dallas", + "Gilberto", + "Clint", + "Nicolas", + "Laurence", + "Ismael", + "Orville", + "Drew", + "Jody", + "Ervin", + "Dewey", + "Al", + "Wilfred", + "Josh", + "Hugo", + "Ignacio", + "Caleb", + "Tomas", + "Sheldon", + "Erick", + "Frankie", + "Stewart", + "Doyle", + "Darrel", + "Rogelio", + "Terence", + "Santiago", + "Alonzo", + "Elias", + "Bert", + "Elbert", + "Ramiro", + "Conrad", + "Pat", + "Noah", + "Grady", + "Phil", + "Cornelius", + "Lamar", + "Rolando", + "Clay", + "Percy", + "Dexter", + "Bradford", + "Merle", + "Darin", + "Amos", + "Terrell", + "Moses", + "Irvin", + "Saul", + "Roman", + "Darnell", + "Randal", + "Tommie", + "Timmy", + "Darrin", + "Winston", + "Brendan", + "Toby", + "Van", + "Abel", + "Dominick", + "Boyd", + "Courtney", + "Jan", + "Emilio", + "Elijah", + "Cary", + "Domingo", + "Santos", + "Aubrey", + "Emmett", + "Marlon", + "Emanuel", + "Jerald", + "Edmond" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/name/female_first_name.js +var require_female_first_name = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/name/female_first_name.js"(exports2, module2) { + module2["exports"] = [ + "Mary", + "Patricia", + "Linda", + "Barbara", + "Elizabeth", + "Jennifer", + "Maria", + "Susan", + "Margaret", + "Dorothy", + "Lisa", + "Nancy", + "Karen", + "Betty", + "Helen", + "Sandra", + "Donna", + "Carol", + "Ruth", + "Sharon", + "Michelle", + "Laura", + "Sarah", + "Kimberly", + "Deborah", + "Jessica", + "Shirley", + "Cynthia", + "Angela", + "Melissa", + "Brenda", + "Amy", + "Anna", + "Rebecca", + "Virginia", + "Kathleen", + "Pamela", + "Martha", + "Debra", + "Amanda", + "Stephanie", + "Carolyn", + "Christine", + "Marie", + "Janet", + "Catherine", + "Frances", + "Ann", + "Joyce", + "Diane", + "Alice", + "Julie", + "Heather", + "Teresa", + "Doris", + "Gloria", + "Evelyn", + "Jean", + "Cheryl", + "Mildred", + "Katherine", + "Joan", + "Ashley", + "Judith", + "Rose", + "Janice", + "Kelly", + "Nicole", + "Judy", + "Christina", + "Kathy", + "Theresa", + "Beverly", + "Denise", + "Tammy", + "Irene", + "Jane", + "Lori", + "Rachel", + "Marilyn", + "Andrea", + "Kathryn", + "Louise", + "Sara", + "Anne", + "Jacqueline", + "Wanda", + "Bonnie", + "Julia", + "Ruby", + "Lois", + "Tina", + "Phyllis", + "Norma", + "Paula", + "Diana", + "Annie", + "Lillian", + "Emily", + "Robin", + "Peggy", + "Crystal", + "Gladys", + "Rita", + "Dawn", + "Connie", + "Florence", + "Tracy", + "Edna", + "Tiffany", + "Carmen", + "Rosa", + "Cindy", + "Grace", + "Wendy", + "Victoria", + "Edith", + "Kim", + "Sherry", + "Sylvia", + "Josephine", + "Thelma", + "Shannon", + "Sheila", + "Ethel", + "Ellen", + "Elaine", + "Marjorie", + "Carrie", + "Charlotte", + "Monica", + "Esther", + "Pauline", + "Emma", + "Juanita", + "Anita", + "Rhonda", + "Hazel", + "Amber", + "Eva", + "Debbie", + "April", + "Leslie", + "Clara", + "Lucille", + "Jamie", + "Joanne", + "Eleanor", + "Valerie", + "Danielle", + "Megan", + "Alicia", + "Suzanne", + "Michele", + "Gail", + "Bertha", + "Darlene", + "Veronica", + "Jill", + "Erin", + "Geraldine", + "Lauren", + "Cathy", + "Joann", + "Lorraine", + "Lynn", + "Sally", + "Regina", + "Erica", + "Beatrice", + "Dolores", + "Bernice", + "Audrey", + "Yvonne", + "Annette", + "June", + "Samantha", + "Marion", + "Dana", + "Stacy", + "Ana", + "Renee", + "Ida", + "Vivian", + "Roberta", + "Holly", + "Brittany", + "Melanie", + "Loretta", + "Yolanda", + "Jeanette", + "Laurie", + "Katie", + "Kristen", + "Vanessa", + "Alma", + "Sue", + "Elsie", + "Beth", + "Jeanne", + "Vicki", + "Carla", + "Tara", + "Rosemary", + "Eileen", + "Terri", + "Gertrude", + "Lucy", + "Tonya", + "Ella", + "Stacey", + "Wilma", + "Gina", + "Kristin", + "Jessie", + "Natalie", + "Agnes", + "Vera", + "Willie", + "Charlene", + "Bessie", + "Delores", + "Melinda", + "Pearl", + "Arlene", + "Maureen", + "Colleen", + "Allison", + "Tamara", + "Joy", + "Georgia", + "Constance", + "Lillie", + "Claudia", + "Jackie", + "Marcia", + "Tanya", + "Nellie", + "Minnie", + "Marlene", + "Heidi", + "Glenda", + "Lydia", + "Viola", + "Courtney", + "Marian", + "Stella", + "Caroline", + "Dora", + "Jo", + "Vickie", + "Mattie", + "Terry", + "Maxine", + "Irma", + "Mabel", + "Marsha", + "Myrtle", + "Lena", + "Christy", + "Deanna", + "Patsy", + "Hilda", + "Gwendolyn", + "Jennie", + "Nora", + "Margie", + "Nina", + "Cassandra", + "Leah", + "Penny", + "Kay", + "Priscilla", + "Naomi", + "Carole", + "Brandy", + "Olga", + "Billie", + "Dianne", + "Tracey", + "Leona", + "Jenny", + "Felicia", + "Sonia", + "Miriam", + "Velma", + "Becky", + "Bobbie", + "Violet", + "Kristina", + "Toni", + "Misty", + "Mae", + "Shelly", + "Daisy", + "Ramona", + "Sherri", + "Erika", + "Katrina", + "Claire", + "Lindsey", + "Lindsay", + "Geneva", + "Guadalupe", + "Belinda", + "Margarita", + "Sheryl", + "Cora", + "Faye", + "Ada", + "Natasha", + "Sabrina", + "Isabel", + "Marguerite", + "Hattie", + "Harriet", + "Molly", + "Cecilia", + "Kristi", + "Brandi", + "Blanche", + "Sandy", + "Rosie", + "Joanna", + "Iris", + "Eunice", + "Angie", + "Inez", + "Lynda", + "Madeline", + "Amelia", + "Alberta", + "Genevieve", + "Monique", + "Jodi", + "Janie", + "Maggie", + "Kayla", + "Sonya", + "Jan", + "Lee", + "Kristine", + "Candace", + "Fannie", + "Maryann", + "Opal", + "Alison", + "Yvette", + "Melody", + "Luz", + "Susie", + "Olivia", + "Flora", + "Shelley", + "Kristy", + "Mamie", + "Lula", + "Lola", + "Verna", + "Beulah", + "Antoinette", + "Candice", + "Juana", + "Jeannette", + "Pam", + "Kelli", + "Hannah", + "Whitney", + "Bridget", + "Karla", + "Celia", + "Latoya", + "Patty", + "Shelia", + "Gayle", + "Della", + "Vicky", + "Lynne", + "Sheri", + "Marianne", + "Kara", + "Jacquelyn", + "Erma", + "Blanca", + "Myra", + "Leticia", + "Pat", + "Krista", + "Roxanne", + "Angelica", + "Johnnie", + "Robyn", + "Francis", + "Adrienne", + "Rosalie", + "Alexandra", + "Brooke", + "Bethany", + "Sadie", + "Bernadette", + "Traci", + "Jody", + "Kendra", + "Jasmine", + "Nichole", + "Rachael", + "Chelsea", + "Mable", + "Ernestine", + "Muriel", + "Marcella", + "Elena", + "Krystal", + "Angelina", + "Nadine", + "Kari", + "Estelle", + "Dianna", + "Paulette", + "Lora", + "Mona", + "Doreen", + "Rosemarie", + "Angel", + "Desiree", + "Antonia", + "Hope", + "Ginger", + "Janis", + "Betsy", + "Christie", + "Freda", + "Mercedes", + "Meredith", + "Lynette", + "Teri", + "Cristina", + "Eula", + "Leigh", + "Meghan", + "Sophia", + "Eloise", + "Rochelle", + "Gretchen", + "Cecelia", + "Raquel", + "Henrietta", + "Alyssa", + "Jana", + "Kelley", + "Gwen", + "Kerry", + "Jenna", + "Tricia", + "Laverne", + "Olive", + "Alexis", + "Tasha", + "Silvia", + "Elvira", + "Casey", + "Delia", + "Sophie", + "Kate", + "Patti", + "Lorena", + "Kellie", + "Sonja", + "Lila", + "Lana", + "Darla", + "May", + "Mindy", + "Essie", + "Mandy", + "Lorene", + "Elsa", + "Josefina", + "Jeannie", + "Miranda", + "Dixie", + "Lucia", + "Marta", + "Faith", + "Lela", + "Johanna", + "Shari", + "Camille", + "Tami", + "Shawna", + "Elisa", + "Ebony", + "Melba", + "Ora", + "Nettie", + "Tabitha", + "Ollie", + "Jaime", + "Winifred", + "Kristie" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/name/first_name.js +var require_first_name = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/name/first_name.js"(exports2, module2) { + module2["exports"] = [ + "Aaliyah", + "Aaron", + "Abagail", + "Abbey", + "Abbie", + "Abbigail", + "Abby", + "Abdiel", + "Abdul", + "Abdullah", + "Abe", + "Abel", + "Abelardo", + "Abigail", + "Abigale", + "Abigayle", + "Abner", + "Abraham", + "Ada", + "Adah", + "Adalberto", + "Adaline", + "Adam", + "Adan", + "Addie", + "Addison", + "Adela", + "Adelbert", + "Adele", + "Adelia", + "Adeline", + "Adell", + "Adella", + "Adelle", + "Aditya", + "Adolf", + "Adolfo", + "Adolph", + "Adolphus", + "Adonis", + "Adrain", + "Adrian", + "Adriana", + "Adrianna", + "Adriel", + "Adrien", + "Adrienne", + "Afton", + "Aglae", + "Agnes", + "Agustin", + "Agustina", + "Ahmad", + "Ahmed", + "Aida", + "Aidan", + "Aiden", + "Aileen", + "Aimee", + "Aisha", + "Aiyana", + "Akeem", + "Al", + "Alaina", + "Alan", + "Alana", + "Alanis", + "Alanna", + "Alayna", + "Alba", + "Albert", + "Alberta", + "Albertha", + "Alberto", + "Albin", + "Albina", + "Alda", + "Alden", + "Alec", + "Aleen", + "Alejandra", + "Alejandrin", + "Alek", + "Alena", + "Alene", + "Alessandra", + "Alessandro", + "Alessia", + "Aletha", + "Alex", + "Alexa", + "Alexander", + "Alexandra", + "Alexandre", + "Alexandrea", + "Alexandria", + "Alexandrine", + "Alexandro", + "Alexane", + "Alexanne", + "Alexie", + "Alexis", + "Alexys", + "Alexzander", + "Alf", + "Alfonso", + "Alfonzo", + "Alford", + "Alfred", + "Alfreda", + "Alfredo", + "Ali", + "Alia", + "Alice", + "Alicia", + "Alisa", + "Alisha", + "Alison", + "Alivia", + "Aliya", + "Aliyah", + "Aliza", + "Alize", + "Allan", + "Allen", + "Allene", + "Allie", + "Allison", + "Ally", + "Alphonso", + "Alta", + "Althea", + "Alva", + "Alvah", + "Alvena", + "Alvera", + "Alverta", + "Alvina", + "Alvis", + "Alyce", + "Alycia", + "Alysa", + "Alysha", + "Alyson", + "Alysson", + "Amalia", + "Amanda", + "Amani", + "Amara", + "Amari", + "Amaya", + "Amber", + "Ambrose", + "Amelia", + "Amelie", + "Amely", + "America", + "Americo", + "Amie", + "Amina", + "Amir", + "Amira", + "Amiya", + "Amos", + "Amparo", + "Amy", + "Amya", + "Ana", + "Anabel", + "Anabelle", + "Anahi", + "Anais", + "Anastacio", + "Anastasia", + "Anderson", + "Andre", + "Andreane", + "Andreanne", + "Andres", + "Andrew", + "Andy", + "Angel", + "Angela", + "Angelica", + "Angelina", + "Angeline", + "Angelita", + "Angelo", + "Angie", + "Angus", + "Anibal", + "Anika", + "Anissa", + "Anita", + "Aniya", + "Aniyah", + "Anjali", + "Anna", + "Annabel", + "Annabell", + "Annabelle", + "Annalise", + "Annamae", + "Annamarie", + "Anne", + "Annetta", + "Annette", + "Annie", + "Ansel", + "Ansley", + "Anthony", + "Antoinette", + "Antone", + "Antonetta", + "Antonette", + "Antonia", + "Antonietta", + "Antonina", + "Antonio", + "Antwan", + "Antwon", + "Anya", + "April", + "Ara", + "Araceli", + "Aracely", + "Arch", + "Archibald", + "Ardella", + "Arden", + "Ardith", + "Arely", + "Ari", + "Ariane", + "Arianna", + "Aric", + "Ariel", + "Arielle", + "Arjun", + "Arlene", + "Arlie", + "Arlo", + "Armand", + "Armando", + "Armani", + "Arnaldo", + "Arne", + "Arno", + "Arnold", + "Arnoldo", + "Arnulfo", + "Aron", + "Art", + "Arthur", + "Arturo", + "Arvel", + "Arvid", + "Arvilla", + "Aryanna", + "Asa", + "Asha", + "Ashlee", + "Ashleigh", + "Ashley", + "Ashly", + "Ashlynn", + "Ashton", + "Ashtyn", + "Asia", + "Assunta", + "Astrid", + "Athena", + "Aubree", + "Aubrey", + "Audie", + "Audra", + "Audreanne", + "Audrey", + "August", + "Augusta", + "Augustine", + "Augustus", + "Aurelia", + "Aurelie", + "Aurelio", + "Aurore", + "Austen", + "Austin", + "Austyn", + "Autumn", + "Ava", + "Avery", + "Avis", + "Axel", + "Ayana", + "Ayden", + "Ayla", + "Aylin", + "Baby", + "Bailee", + "Bailey", + "Barbara", + "Barney", + "Baron", + "Barrett", + "Barry", + "Bart", + "Bartholome", + "Barton", + "Baylee", + "Beatrice", + "Beau", + "Beaulah", + "Bell", + "Bella", + "Belle", + "Ben", + "Benedict", + "Benjamin", + "Bennett", + "Bennie", + "Benny", + "Benton", + "Berenice", + "Bernadette", + "Bernadine", + "Bernard", + "Bernardo", + "Berneice", + "Bernhard", + "Bernice", + "Bernie", + "Berniece", + "Bernita", + "Berry", + "Bert", + "Berta", + "Bertha", + "Bertram", + "Bertrand", + "Beryl", + "Bessie", + "Beth", + "Bethany", + "Bethel", + "Betsy", + "Bette", + "Bettie", + "Betty", + "Bettye", + "Beulah", + "Beverly", + "Bianka", + "Bill", + "Billie", + "Billy", + "Birdie", + "Blair", + "Blaise", + "Blake", + "Blanca", + "Blanche", + "Blaze", + "Bo", + "Bobbie", + "Bobby", + "Bonita", + "Bonnie", + "Boris", + "Boyd", + "Brad", + "Braden", + "Bradford", + "Bradley", + "Bradly", + "Brady", + "Braeden", + "Brain", + "Brandi", + "Brando", + "Brandon", + "Brandt", + "Brandy", + "Brandyn", + "Brannon", + "Branson", + "Brant", + "Braulio", + "Braxton", + "Brayan", + "Breana", + "Breanna", + "Breanne", + "Brenda", + "Brendan", + "Brenden", + "Brendon", + "Brenna", + "Brennan", + "Brennon", + "Brent", + "Bret", + "Brett", + "Bria", + "Brian", + "Briana", + "Brianne", + "Brice", + "Bridget", + "Bridgette", + "Bridie", + "Brielle", + "Brigitte", + "Brionna", + "Brisa", + "Britney", + "Brittany", + "Brock", + "Broderick", + "Brody", + "Brook", + "Brooke", + "Brooklyn", + "Brooks", + "Brown", + "Bruce", + "Bryana", + "Bryce", + "Brycen", + "Bryon", + "Buck", + "Bud", + "Buddy", + "Buford", + "Bulah", + "Burdette", + "Burley", + "Burnice", + "Buster", + "Cade", + "Caden", + "Caesar", + "Caitlyn", + "Cale", + "Caleb", + "Caleigh", + "Cali", + "Calista", + "Callie", + "Camden", + "Cameron", + "Camila", + "Camilla", + "Camille", + "Camren", + "Camron", + "Camryn", + "Camylle", + "Candace", + "Candelario", + "Candice", + "Candida", + "Candido", + "Cara", + "Carey", + "Carissa", + "Carlee", + "Carleton", + "Carley", + "Carli", + "Carlie", + "Carlo", + "Carlos", + "Carlotta", + "Carmel", + "Carmela", + "Carmella", + "Carmelo", + "Carmen", + "Carmine", + "Carol", + "Carolanne", + "Carole", + "Carolina", + "Caroline", + "Carolyn", + "Carolyne", + "Carrie", + "Carroll", + "Carson", + "Carter", + "Cary", + "Casandra", + "Casey", + "Casimer", + "Casimir", + "Casper", + "Cassandra", + "Cassandre", + "Cassidy", + "Cassie", + "Catalina", + "Caterina", + "Catharine", + "Catherine", + "Cathrine", + "Cathryn", + "Cathy", + "Cayla", + "Ceasar", + "Cecelia", + "Cecil", + "Cecile", + "Cecilia", + "Cedrick", + "Celestine", + "Celestino", + "Celia", + "Celine", + "Cesar", + "Chad", + "Chadd", + "Chadrick", + "Chaim", + "Chance", + "Chandler", + "Chanel", + "Chanelle", + "Charity", + "Charlene", + "Charles", + "Charley", + "Charlie", + "Charlotte", + "Chase", + "Chasity", + "Chauncey", + "Chaya", + "Chaz", + "Chelsea", + "Chelsey", + "Chelsie", + "Chesley", + "Chester", + "Chet", + "Cheyanne", + "Cheyenne", + "Chloe", + "Chris", + "Christ", + "Christa", + "Christelle", + "Christian", + "Christiana", + "Christina", + "Christine", + "Christop", + "Christophe", + "Christopher", + "Christy", + "Chyna", + "Ciara", + "Cicero", + "Cielo", + "Cierra", + "Cindy", + "Citlalli", + "Clair", + "Claire", + "Clara", + "Clarabelle", + "Clare", + "Clarissa", + "Clark", + "Claud", + "Claude", + "Claudia", + "Claudie", + "Claudine", + "Clay", + "Clemens", + "Clement", + "Clementina", + "Clementine", + "Clemmie", + "Cleo", + "Cleora", + "Cleta", + "Cletus", + "Cleve", + "Cleveland", + "Clifford", + "Clifton", + "Clint", + "Clinton", + "Clotilde", + "Clovis", + "Cloyd", + "Clyde", + "Coby", + "Cody", + "Colby", + "Cole", + "Coleman", + "Colin", + "Colleen", + "Collin", + "Colt", + "Colten", + "Colton", + "Columbus", + "Concepcion", + "Conner", + "Connie", + "Connor", + "Conor", + "Conrad", + "Constance", + "Constantin", + "Consuelo", + "Cooper", + "Cora", + "Coralie", + "Corbin", + "Cordelia", + "Cordell", + "Cordia", + "Cordie", + "Corene", + "Corine", + "Cornelius", + "Cornell", + "Corrine", + "Cortez", + "Cortney", + "Cory", + "Coty", + "Courtney", + "Coy", + "Craig", + "Crawford", + "Creola", + "Cristal", + "Cristian", + "Cristina", + "Cristobal", + "Cristopher", + "Cruz", + "Crystal", + "Crystel", + "Cullen", + "Curt", + "Curtis", + "Cydney", + "Cynthia", + "Cyril", + "Cyrus", + "Dagmar", + "Dahlia", + "Daija", + "Daisha", + "Daisy", + "Dakota", + "Dale", + "Dallas", + "Dallin", + "Dalton", + "Damaris", + "Dameon", + "Damian", + "Damien", + "Damion", + "Damon", + "Dan", + "Dana", + "Dandre", + "Dane", + "D'angelo", + "Dangelo", + "Danial", + "Daniela", + "Daniella", + "Danielle", + "Danika", + "Dannie", + "Danny", + "Dante", + "Danyka", + "Daphne", + "Daphnee", + "Daphney", + "Darby", + "Daren", + "Darian", + "Dariana", + "Darien", + "Dario", + "Darion", + "Darius", + "Darlene", + "Daron", + "Darrel", + "Darrell", + "Darren", + "Darrick", + "Darrin", + "Darrion", + "Darron", + "Darryl", + "Darwin", + "Daryl", + "Dashawn", + "Dasia", + "Dave", + "David", + "Davin", + "Davion", + "Davon", + "Davonte", + "Dawn", + "Dawson", + "Dax", + "Dayana", + "Dayna", + "Dayne", + "Dayton", + "Dean", + "Deangelo", + "Deanna", + "Deborah", + "Declan", + "Dedric", + "Dedrick", + "Dee", + "Deion", + "Deja", + "Dejah", + "Dejon", + "Dejuan", + "Delaney", + "Delbert", + "Delfina", + "Delia", + "Delilah", + "Dell", + "Della", + "Delmer", + "Delores", + "Delpha", + "Delphia", + "Delphine", + "Delta", + "Demarco", + "Demarcus", + "Demario", + "Demetris", + "Demetrius", + "Demond", + "Dena", + "Denis", + "Dennis", + "Deon", + "Deondre", + "Deontae", + "Deonte", + "Dereck", + "Derek", + "Derick", + "Deron", + "Derrick", + "Deshaun", + "Deshawn", + "Desiree", + "Desmond", + "Dessie", + "Destany", + "Destin", + "Destinee", + "Destiney", + "Destini", + "Destiny", + "Devan", + "Devante", + "Deven", + "Devin", + "Devon", + "Devonte", + "Devyn", + "Dewayne", + "Dewitt", + "Dexter", + "Diamond", + "Diana", + "Dianna", + "Diego", + "Dillan", + "Dillon", + "Dimitri", + "Dina", + "Dino", + "Dion", + "Dixie", + "Dock", + "Dolly", + "Dolores", + "Domenic", + "Domenica", + "Domenick", + "Domenico", + "Domingo", + "Dominic", + "Dominique", + "Don", + "Donald", + "Donato", + "Donavon", + "Donna", + "Donnell", + "Donnie", + "Donny", + "Dora", + "Dorcas", + "Dorian", + "Doris", + "Dorothea", + "Dorothy", + "Dorris", + "Dortha", + "Dorthy", + "Doug", + "Douglas", + "Dovie", + "Doyle", + "Drake", + "Drew", + "Duane", + "Dudley", + "Dulce", + "Duncan", + "Durward", + "Dustin", + "Dusty", + "Dwight", + "Dylan", + "Earl", + "Earlene", + "Earline", + "Earnest", + "Earnestine", + "Easter", + "Easton", + "Ebba", + "Ebony", + "Ed", + "Eda", + "Edd", + "Eddie", + "Eden", + "Edgar", + "Edgardo", + "Edison", + "Edmond", + "Edmund", + "Edna", + "Eduardo", + "Edward", + "Edwardo", + "Edwin", + "Edwina", + "Edyth", + "Edythe", + "Effie", + "Efrain", + "Efren", + "Eileen", + "Einar", + "Eino", + "Eladio", + "Elaina", + "Elbert", + "Elda", + "Eldon", + "Eldora", + "Eldred", + "Eldridge", + "Eleanora", + "Eleanore", + "Eleazar", + "Electa", + "Elena", + "Elenor", + "Elenora", + "Eleonore", + "Elfrieda", + "Eli", + "Elian", + "Eliane", + "Elias", + "Eliezer", + "Elijah", + "Elinor", + "Elinore", + "Elisa", + "Elisabeth", + "Elise", + "Eliseo", + "Elisha", + "Elissa", + "Eliza", + "Elizabeth", + "Ella", + "Ellen", + "Ellie", + "Elliot", + "Elliott", + "Ellis", + "Ellsworth", + "Elmer", + "Elmira", + "Elmo", + "Elmore", + "Elna", + "Elnora", + "Elody", + "Eloisa", + "Eloise", + "Elouise", + "Eloy", + "Elroy", + "Elsa", + "Else", + "Elsie", + "Elta", + "Elton", + "Elva", + "Elvera", + "Elvie", + "Elvis", + "Elwin", + "Elwyn", + "Elyse", + "Elyssa", + "Elza", + "Emanuel", + "Emelia", + "Emelie", + "Emely", + "Emerald", + "Emerson", + "Emery", + "Emie", + "Emil", + "Emile", + "Emilia", + "Emiliano", + "Emilie", + "Emilio", + "Emily", + "Emma", + "Emmalee", + "Emmanuel", + "Emmanuelle", + "Emmet", + "Emmett", + "Emmie", + "Emmitt", + "Emmy", + "Emory", + "Ena", + "Enid", + "Enoch", + "Enola", + "Enos", + "Enrico", + "Enrique", + "Ephraim", + "Era", + "Eriberto", + "Eric", + "Erica", + "Erich", + "Erick", + "Ericka", + "Erik", + "Erika", + "Erin", + "Erling", + "Erna", + "Ernest", + "Ernestina", + "Ernestine", + "Ernesto", + "Ernie", + "Ervin", + "Erwin", + "Eryn", + "Esmeralda", + "Esperanza", + "Esta", + "Esteban", + "Estefania", + "Estel", + "Estell", + "Estella", + "Estelle", + "Estevan", + "Esther", + "Estrella", + "Etha", + "Ethan", + "Ethel", + "Ethelyn", + "Ethyl", + "Ettie", + "Eudora", + "Eugene", + "Eugenia", + "Eula", + "Eulah", + "Eulalia", + "Euna", + "Eunice", + "Eusebio", + "Eva", + "Evalyn", + "Evan", + "Evangeline", + "Evans", + "Eve", + "Eveline", + "Evelyn", + "Everardo", + "Everett", + "Everette", + "Evert", + "Evie", + "Ewald", + "Ewell", + "Ezekiel", + "Ezequiel", + "Ezra", + "Fabian", + "Fabiola", + "Fae", + "Fannie", + "Fanny", + "Fatima", + "Faustino", + "Fausto", + "Favian", + "Fay", + "Faye", + "Federico", + "Felicia", + "Felicita", + "Felicity", + "Felipa", + "Felipe", + "Felix", + "Felton", + "Fermin", + "Fern", + "Fernando", + "Ferne", + "Fidel", + "Filiberto", + "Filomena", + "Finn", + "Fiona", + "Flavie", + "Flavio", + "Fleta", + "Fletcher", + "Flo", + "Florence", + "Florencio", + "Florian", + "Florida", + "Florine", + "Flossie", + "Floy", + "Floyd", + "Ford", + "Forest", + "Forrest", + "Foster", + "Frances", + "Francesca", + "Francesco", + "Francis", + "Francisca", + "Francisco", + "Franco", + "Frank", + "Frankie", + "Franz", + "Fred", + "Freda", + "Freddie", + "Freddy", + "Frederic", + "Frederick", + "Frederik", + "Frederique", + "Fredrick", + "Fredy", + "Freeda", + "Freeman", + "Freida", + "Frida", + "Frieda", + "Friedrich", + "Fritz", + "Furman", + "Gabe", + "Gabriel", + "Gabriella", + "Gabrielle", + "Gaetano", + "Gage", + "Gail", + "Gardner", + "Garett", + "Garfield", + "Garland", + "Garnet", + "Garnett", + "Garret", + "Garrett", + "Garrick", + "Garrison", + "Garry", + "Garth", + "Gaston", + "Gavin", + "Gay", + "Gayle", + "Gaylord", + "Gene", + "General", + "Genesis", + "Genevieve", + "Gennaro", + "Genoveva", + "Geo", + "Geoffrey", + "George", + "Georgette", + "Georgiana", + "Georgianna", + "Geovanni", + "Geovanny", + "Geovany", + "Gerald", + "Geraldine", + "Gerard", + "Gerardo", + "Gerda", + "Gerhard", + "Germaine", + "German", + "Gerry", + "Gerson", + "Gertrude", + "Gia", + "Gianni", + "Gideon", + "Gilbert", + "Gilberto", + "Gilda", + "Giles", + "Gillian", + "Gina", + "Gino", + "Giovani", + "Giovanna", + "Giovanni", + "Giovanny", + "Gisselle", + "Giuseppe", + "Gladyce", + "Gladys", + "Glen", + "Glenda", + "Glenna", + "Glennie", + "Gloria", + "Godfrey", + "Golda", + "Golden", + "Gonzalo", + "Gordon", + "Grace", + "Gracie", + "Graciela", + "Grady", + "Graham", + "Grant", + "Granville", + "Grayce", + "Grayson", + "Green", + "Greg", + "Gregg", + "Gregoria", + "Gregorio", + "Gregory", + "Greta", + "Gretchen", + "Greyson", + "Griffin", + "Grover", + "Guadalupe", + "Gudrun", + "Guido", + "Guillermo", + "Guiseppe", + "Gunnar", + "Gunner", + "Gus", + "Gussie", + "Gust", + "Gustave", + "Guy", + "Gwen", + "Gwendolyn", + "Hadley", + "Hailee", + "Hailey", + "Hailie", + "Hal", + "Haleigh", + "Haley", + "Halie", + "Halle", + "Hallie", + "Hank", + "Hanna", + "Hannah", + "Hans", + "Hardy", + "Harley", + "Harmon", + "Harmony", + "Harold", + "Harrison", + "Harry", + "Harvey", + "Haskell", + "Hassan", + "Hassie", + "Hattie", + "Haven", + "Hayden", + "Haylee", + "Hayley", + "Haylie", + "Hazel", + "Hazle", + "Heath", + "Heather", + "Heaven", + "Heber", + "Hector", + "Heidi", + "Helen", + "Helena", + "Helene", + "Helga", + "Hellen", + "Helmer", + "Heloise", + "Henderson", + "Henri", + "Henriette", + "Henry", + "Herbert", + "Herman", + "Hermann", + "Hermina", + "Herminia", + "Herminio", + "Hershel", + "Herta", + "Hertha", + "Hester", + "Hettie", + "Hilario", + "Hilbert", + "Hilda", + "Hildegard", + "Hillard", + "Hillary", + "Hilma", + "Hilton", + "Hipolito", + "Hiram", + "Hobart", + "Holden", + "Hollie", + "Hollis", + "Holly", + "Hope", + "Horace", + "Horacio", + "Hortense", + "Hosea", + "Houston", + "Howard", + "Howell", + "Hoyt", + "Hubert", + "Hudson", + "Hugh", + "Hulda", + "Humberto", + "Hunter", + "Hyman", + "Ian", + "Ibrahim", + "Icie", + "Ida", + "Idell", + "Idella", + "Ignacio", + "Ignatius", + "Ike", + "Ila", + "Ilene", + "Iliana", + "Ima", + "Imani", + "Imelda", + "Immanuel", + "Imogene", + "Ines", + "Irma", + "Irving", + "Irwin", + "Isaac", + "Isabel", + "Isabell", + "Isabella", + "Isabelle", + "Isac", + "Isadore", + "Isai", + "Isaiah", + "Isaias", + "Isidro", + "Ismael", + "Isobel", + "Isom", + "Israel", + "Issac", + "Itzel", + "Iva", + "Ivah", + "Ivory", + "Ivy", + "Izabella", + "Izaiah", + "Jabari", + "Jace", + "Jacey", + "Jacinthe", + "Jacinto", + "Jack", + "Jackeline", + "Jackie", + "Jacklyn", + "Jackson", + "Jacky", + "Jaclyn", + "Jacquelyn", + "Jacques", + "Jacynthe", + "Jada", + "Jade", + "Jaden", + "Jadon", + "Jadyn", + "Jaeden", + "Jaida", + "Jaiden", + "Jailyn", + "Jaime", + "Jairo", + "Jakayla", + "Jake", + "Jakob", + "Jaleel", + "Jalen", + "Jalon", + "Jalyn", + "Jamaal", + "Jamal", + "Jamar", + "Jamarcus", + "Jamel", + "Jameson", + "Jamey", + "Jamie", + "Jamil", + "Jamir", + "Jamison", + "Jammie", + "Jan", + "Jana", + "Janae", + "Jane", + "Janelle", + "Janessa", + "Janet", + "Janice", + "Janick", + "Janie", + "Janis", + "Janiya", + "Jannie", + "Jany", + "Jaquan", + "Jaquelin", + "Jaqueline", + "Jared", + "Jaren", + "Jarod", + "Jaron", + "Jarred", + "Jarrell", + "Jarret", + "Jarrett", + "Jarrod", + "Jarvis", + "Jasen", + "Jasmin", + "Jason", + "Jasper", + "Jaunita", + "Javier", + "Javon", + "Javonte", + "Jay", + "Jayce", + "Jaycee", + "Jayda", + "Jayde", + "Jayden", + "Jaydon", + "Jaylan", + "Jaylen", + "Jaylin", + "Jaylon", + "Jayme", + "Jayne", + "Jayson", + "Jazlyn", + "Jazmin", + "Jazmyn", + "Jazmyne", + "Jean", + "Jeanette", + "Jeanie", + "Jeanne", + "Jed", + "Jedediah", + "Jedidiah", + "Jeff", + "Jefferey", + "Jeffery", + "Jeffrey", + "Jeffry", + "Jena", + "Jenifer", + "Jennie", + "Jennifer", + "Jennings", + "Jennyfer", + "Jensen", + "Jerad", + "Jerald", + "Jeramie", + "Jeramy", + "Jerel", + "Jeremie", + "Jeremy", + "Jermain", + "Jermaine", + "Jermey", + "Jerod", + "Jerome", + "Jeromy", + "Jerrell", + "Jerrod", + "Jerrold", + "Jerry", + "Jess", + "Jesse", + "Jessica", + "Jessie", + "Jessika", + "Jessy", + "Jessyca", + "Jesus", + "Jett", + "Jettie", + "Jevon", + "Jewel", + "Jewell", + "Jillian", + "Jimmie", + "Jimmy", + "Jo", + "Joan", + "Joana", + "Joanie", + "Joanne", + "Joannie", + "Joanny", + "Joany", + "Joaquin", + "Jocelyn", + "Jodie", + "Jody", + "Joe", + "Joel", + "Joelle", + "Joesph", + "Joey", + "Johan", + "Johann", + "Johanna", + "Johathan", + "John", + "Johnathan", + "Johnathon", + "Johnnie", + "Johnny", + "Johnpaul", + "Johnson", + "Jolie", + "Jon", + "Jonas", + "Jonatan", + "Jonathan", + "Jonathon", + "Jordan", + "Jordane", + "Jordi", + "Jordon", + "Jordy", + "Jordyn", + "Jorge", + "Jose", + "Josefa", + "Josefina", + "Joseph", + "Josephine", + "Josh", + "Joshua", + "Joshuah", + "Josiah", + "Josiane", + "Josianne", + "Josie", + "Josue", + "Jovan", + "Jovani", + "Jovanny", + "Jovany", + "Joy", + "Joyce", + "Juana", + "Juanita", + "Judah", + "Judd", + "Jude", + "Judge", + "Judson", + "Judy", + "Jules", + "Julia", + "Julian", + "Juliana", + "Julianne", + "Julie", + "Julien", + "Juliet", + "Julio", + "Julius", + "June", + "Junior", + "Junius", + "Justen", + "Justice", + "Justina", + "Justine", + "Juston", + "Justus", + "Justyn", + "Juvenal", + "Juwan", + "Kacey", + "Kaci", + "Kacie", + "Kade", + "Kaden", + "Kadin", + "Kaela", + "Kaelyn", + "Kaia", + "Kailee", + "Kailey", + "Kailyn", + "Kaitlin", + "Kaitlyn", + "Kale", + "Kaleb", + "Kaleigh", + "Kaley", + "Kali", + "Kallie", + "Kameron", + "Kamille", + "Kamren", + "Kamron", + "Kamryn", + "Kane", + "Kara", + "Kareem", + "Karelle", + "Karen", + "Kari", + "Kariane", + "Karianne", + "Karina", + "Karine", + "Karl", + "Karlee", + "Karley", + "Karli", + "Karlie", + "Karolann", + "Karson", + "Kasandra", + "Kasey", + "Kassandra", + "Katarina", + "Katelin", + "Katelyn", + "Katelynn", + "Katharina", + "Katherine", + "Katheryn", + "Kathleen", + "Kathlyn", + "Kathryn", + "Kathryne", + "Katlyn", + "Katlynn", + "Katrina", + "Katrine", + "Kattie", + "Kavon", + "Kay", + "Kaya", + "Kaycee", + "Kayden", + "Kayla", + "Kaylah", + "Kaylee", + "Kayleigh", + "Kayley", + "Kayli", + "Kaylie", + "Kaylin", + "Keagan", + "Keanu", + "Keara", + "Keaton", + "Keegan", + "Keeley", + "Keely", + "Keenan", + "Keira", + "Keith", + "Kellen", + "Kelley", + "Kelli", + "Kellie", + "Kelly", + "Kelsi", + "Kelsie", + "Kelton", + "Kelvin", + "Ken", + "Kendall", + "Kendra", + "Kendrick", + "Kenna", + "Kennedi", + "Kennedy", + "Kenneth", + "Kennith", + "Kenny", + "Kenton", + "Kenya", + "Kenyatta", + "Kenyon", + "Keon", + "Keshaun", + "Keshawn", + "Keven", + "Kevin", + "Kevon", + "Keyon", + "Keyshawn", + "Khalid", + "Khalil", + "Kian", + "Kiana", + "Kianna", + "Kiara", + "Kiarra", + "Kiel", + "Kiera", + "Kieran", + "Kiley", + "Kim", + "Kimberly", + "King", + "Kip", + "Kira", + "Kirk", + "Kirsten", + "Kirstin", + "Kitty", + "Kobe", + "Koby", + "Kody", + "Kolby", + "Kole", + "Korbin", + "Korey", + "Kory", + "Kraig", + "Kris", + "Krista", + "Kristian", + "Kristin", + "Kristina", + "Kristofer", + "Kristoffer", + "Kristopher", + "Kristy", + "Krystal", + "Krystel", + "Krystina", + "Kurt", + "Kurtis", + "Kyla", + "Kyle", + "Kylee", + "Kyleigh", + "Kyler", + "Kylie", + "Kyra", + "Lacey", + "Lacy", + "Ladarius", + "Lafayette", + "Laila", + "Laisha", + "Lamar", + "Lambert", + "Lamont", + "Lance", + "Landen", + "Lane", + "Laney", + "Larissa", + "Laron", + "Larry", + "Larue", + "Laura", + "Laurel", + "Lauren", + "Laurence", + "Lauretta", + "Lauriane", + "Laurianne", + "Laurie", + "Laurine", + "Laury", + "Lauryn", + "Lavada", + "Lavern", + "Laverna", + "Laverne", + "Lavina", + "Lavinia", + "Lavon", + "Lavonne", + "Lawrence", + "Lawson", + "Layla", + "Layne", + "Lazaro", + "Lea", + "Leann", + "Leanna", + "Leanne", + "Leatha", + "Leda", + "Lee", + "Leif", + "Leila", + "Leilani", + "Lela", + "Lelah", + "Leland", + "Lelia", + "Lempi", + "Lemuel", + "Lenna", + "Lennie", + "Lenny", + "Lenora", + "Lenore", + "Leo", + "Leola", + "Leon", + "Leonard", + "Leonardo", + "Leone", + "Leonel", + "Leonie", + "Leonor", + "Leonora", + "Leopold", + "Leopoldo", + "Leora", + "Lera", + "Lesley", + "Leslie", + "Lesly", + "Lessie", + "Lester", + "Leta", + "Letha", + "Letitia", + "Levi", + "Lew", + "Lewis", + "Lexi", + "Lexie", + "Lexus", + "Lia", + "Liam", + "Liana", + "Libbie", + "Libby", + "Lila", + "Lilian", + "Liliana", + "Liliane", + "Lilla", + "Lillian", + "Lilliana", + "Lillie", + "Lilly", + "Lily", + "Lilyan", + "Lina", + "Lincoln", + "Linda", + "Lindsay", + "Lindsey", + "Linnea", + "Linnie", + "Linwood", + "Lionel", + "Lisa", + "Lisandro", + "Lisette", + "Litzy", + "Liza", + "Lizeth", + "Lizzie", + "Llewellyn", + "Lloyd", + "Logan", + "Lois", + "Lola", + "Lolita", + "Loma", + "Lon", + "London", + "Lonie", + "Lonnie", + "Lonny", + "Lonzo", + "Lora", + "Loraine", + "Loren", + "Lorena", + "Lorenz", + "Lorenza", + "Lorenzo", + "Lori", + "Lorine", + "Lorna", + "Lottie", + "Lou", + "Louie", + "Louisa", + "Lourdes", + "Louvenia", + "Lowell", + "Loy", + "Loyal", + "Loyce", + "Lucas", + "Luciano", + "Lucie", + "Lucienne", + "Lucile", + "Lucinda", + "Lucio", + "Lucious", + "Lucius", + "Lucy", + "Ludie", + "Ludwig", + "Lue", + "Luella", + "Luigi", + "Luis", + "Luisa", + "Lukas", + "Lula", + "Lulu", + "Luna", + "Lupe", + "Lura", + "Lurline", + "Luther", + "Luz", + "Lyda", + "Lydia", + "Lyla", + "Lynn", + "Lyric", + "Lysanne", + "Mabel", + "Mabelle", + "Mable", + "Mac", + "Macey", + "Maci", + "Macie", + "Mack", + "Mackenzie", + "Macy", + "Madaline", + "Madalyn", + "Maddison", + "Madeline", + "Madelyn", + "Madelynn", + "Madge", + "Madie", + "Madilyn", + "Madisen", + "Madison", + "Madisyn", + "Madonna", + "Madyson", + "Mae", + "Maegan", + "Maeve", + "Mafalda", + "Magali", + "Magdalen", + "Magdalena", + "Maggie", + "Magnolia", + "Magnus", + "Maia", + "Maida", + "Maiya", + "Major", + "Makayla", + "Makenna", + "Makenzie", + "Malachi", + "Malcolm", + "Malika", + "Malinda", + "Mallie", + "Mallory", + "Malvina", + "Mandy", + "Manley", + "Manuel", + "Manuela", + "Mara", + "Marc", + "Marcel", + "Marcelina", + "Marcelino", + "Marcella", + "Marcelle", + "Marcellus", + "Marcelo", + "Marcia", + "Marco", + "Marcos", + "Marcus", + "Margaret", + "Margarete", + "Margarett", + "Margaretta", + "Margarette", + "Margarita", + "Marge", + "Margie", + "Margot", + "Margret", + "Marguerite", + "Maria", + "Mariah", + "Mariam", + "Marian", + "Mariana", + "Mariane", + "Marianna", + "Marianne", + "Mariano", + "Maribel", + "Marie", + "Mariela", + "Marielle", + "Marietta", + "Marilie", + "Marilou", + "Marilyne", + "Marina", + "Mario", + "Marion", + "Marisa", + "Marisol", + "Maritza", + "Marjolaine", + "Marjorie", + "Marjory", + "Mark", + "Markus", + "Marlee", + "Marlen", + "Marlene", + "Marley", + "Marlin", + "Marlon", + "Marques", + "Marquis", + "Marquise", + "Marshall", + "Marta", + "Martin", + "Martina", + "Martine", + "Marty", + "Marvin", + "Mary", + "Maryam", + "Maryjane", + "Maryse", + "Mason", + "Mateo", + "Mathew", + "Mathias", + "Mathilde", + "Matilda", + "Matilde", + "Matt", + "Matteo", + "Mattie", + "Maud", + "Maude", + "Maudie", + "Maureen", + "Maurice", + "Mauricio", + "Maurine", + "Maverick", + "Mavis", + "Max", + "Maxie", + "Maxime", + "Maximilian", + "Maximillia", + "Maximillian", + "Maximo", + "Maximus", + "Maxine", + "Maxwell", + "May", + "Maya", + "Maybell", + "Maybelle", + "Maye", + "Maymie", + "Maynard", + "Mayra", + "Mazie", + "Mckayla", + "Mckenna", + "Mckenzie", + "Meagan", + "Meaghan", + "Meda", + "Megane", + "Meggie", + "Meghan", + "Mekhi", + "Melany", + "Melba", + "Melisa", + "Melissa", + "Mellie", + "Melody", + "Melvin", + "Melvina", + "Melyna", + "Melyssa", + "Mercedes", + "Meredith", + "Merl", + "Merle", + "Merlin", + "Merritt", + "Mertie", + "Mervin", + "Meta", + "Mia", + "Micaela", + "Micah", + "Michael", + "Michaela", + "Michale", + "Micheal", + "Michel", + "Michele", + "Michelle", + "Miguel", + "Mikayla", + "Mike", + "Mikel", + "Milan", + "Miles", + "Milford", + "Miller", + "Millie", + "Milo", + "Milton", + "Mina", + "Minerva", + "Minnie", + "Miracle", + "Mireille", + "Mireya", + "Misael", + "Missouri", + "Misty", + "Mitchel", + "Mitchell", + "Mittie", + "Modesta", + "Modesto", + "Mohamed", + "Mohammad", + "Mohammed", + "Moises", + "Mollie", + "Molly", + "Mona", + "Monica", + "Monique", + "Monroe", + "Monserrat", + "Monserrate", + "Montana", + "Monte", + "Monty", + "Morgan", + "Moriah", + "Morris", + "Mortimer", + "Morton", + "Mose", + "Moses", + "Moshe", + "Mossie", + "Mozell", + "Mozelle", + "Muhammad", + "Muriel", + "Murl", + "Murphy", + "Murray", + "Mustafa", + "Mya", + "Myah", + "Mylene", + "Myles", + "Myra", + "Myriam", + "Myrl", + "Myrna", + "Myron", + "Myrtice", + "Myrtie", + "Myrtis", + "Myrtle", + "Nadia", + "Nakia", + "Name", + "Nannie", + "Naomi", + "Naomie", + "Napoleon", + "Narciso", + "Nash", + "Nasir", + "Nat", + "Natalia", + "Natalie", + "Natasha", + "Nathan", + "Nathanael", + "Nathanial", + "Nathaniel", + "Nathen", + "Nayeli", + "Neal", + "Ned", + "Nedra", + "Neha", + "Neil", + "Nelda", + "Nella", + "Nelle", + "Nellie", + "Nels", + "Nelson", + "Neoma", + "Nestor", + "Nettie", + "Neva", + "Newell", + "Newton", + "Nia", + "Nicholas", + "Nicholaus", + "Nichole", + "Nick", + "Nicklaus", + "Nickolas", + "Nico", + "Nicola", + "Nicolas", + "Nicole", + "Nicolette", + "Nigel", + "Nikita", + "Nikki", + "Nikko", + "Niko", + "Nikolas", + "Nils", + "Nina", + "Noah", + "Noble", + "Noe", + "Noel", + "Noelia", + "Noemi", + "Noemie", + "Noemy", + "Nola", + "Nolan", + "Nona", + "Nora", + "Norbert", + "Norberto", + "Norene", + "Norma", + "Norris", + "Norval", + "Norwood", + "Nova", + "Novella", + "Nya", + "Nyah", + "Nyasia", + "Obie", + "Oceane", + "Ocie", + "Octavia", + "Oda", + "Odell", + "Odessa", + "Odie", + "Ofelia", + "Okey", + "Ola", + "Olaf", + "Ole", + "Olen", + "Oleta", + "Olga", + "Olin", + "Oliver", + "Ollie", + "Oma", + "Omari", + "Omer", + "Ona", + "Onie", + "Opal", + "Ophelia", + "Ora", + "Oral", + "Oran", + "Oren", + "Orie", + "Orin", + "Orion", + "Orland", + "Orlando", + "Orlo", + "Orpha", + "Orrin", + "Orval", + "Orville", + "Osbaldo", + "Osborne", + "Oscar", + "Osvaldo", + "Oswald", + "Oswaldo", + "Otha", + "Otho", + "Otilia", + "Otis", + "Ottilie", + "Ottis", + "Otto", + "Ova", + "Owen", + "Ozella", + "Pablo", + "Paige", + "Palma", + "Pamela", + "Pansy", + "Paolo", + "Paris", + "Parker", + "Pascale", + "Pasquale", + "Pat", + "Patience", + "Patricia", + "Patrick", + "Patsy", + "Pattie", + "Paul", + "Paula", + "Pauline", + "Paxton", + "Payton", + "Pearl", + "Pearlie", + "Pearline", + "Pedro", + "Peggie", + "Penelope", + "Percival", + "Percy", + "Perry", + "Pete", + "Peter", + "Petra", + "Peyton", + "Philip", + "Phoebe", + "Phyllis", + "Pierce", + "Pierre", + "Pietro", + "Pink", + "Pinkie", + "Piper", + "Polly", + "Porter", + "Precious", + "Presley", + "Preston", + "Price", + "Prince", + "Princess", + "Priscilla", + "Providenci", + "Prudence", + "Queen", + "Queenie", + "Quentin", + "Quincy", + "Quinn", + "Quinten", + "Quinton", + "Rachael", + "Rachel", + "Rachelle", + "Rae", + "Raegan", + "Rafael", + "Rafaela", + "Raheem", + "Rahsaan", + "Rahul", + "Raina", + "Raleigh", + "Ralph", + "Ramiro", + "Ramon", + "Ramona", + "Randal", + "Randall", + "Randi", + "Randy", + "Ransom", + "Raoul", + "Raphael", + "Raphaelle", + "Raquel", + "Rashad", + "Rashawn", + "Rasheed", + "Raul", + "Raven", + "Ray", + "Raymond", + "Raymundo", + "Reagan", + "Reanna", + "Reba", + "Rebeca", + "Rebecca", + "Rebeka", + "Rebekah", + "Reece", + "Reed", + "Reese", + "Regan", + "Reggie", + "Reginald", + "Reid", + "Reilly", + "Reina", + "Reinhold", + "Remington", + "Rene", + "Renee", + "Ressie", + "Reta", + "Retha", + "Retta", + "Reuben", + "Reva", + "Rex", + "Rey", + "Reyes", + "Reymundo", + "Reyna", + "Reynold", + "Rhea", + "Rhett", + "Rhianna", + "Rhiannon", + "Rhoda", + "Ricardo", + "Richard", + "Richie", + "Richmond", + "Rick", + "Rickey", + "Rickie", + "Ricky", + "Rico", + "Rigoberto", + "Riley", + "Rita", + "River", + "Robb", + "Robbie", + "Robert", + "Roberta", + "Roberto", + "Robin", + "Robyn", + "Rocio", + "Rocky", + "Rod", + "Roderick", + "Rodger", + "Rodolfo", + "Rodrick", + "Rodrigo", + "Roel", + "Rogelio", + "Roger", + "Rogers", + "Rolando", + "Rollin", + "Roma", + "Romaine", + "Roman", + "Ron", + "Ronaldo", + "Ronny", + "Roosevelt", + "Rory", + "Rosa", + "Rosalee", + "Rosalia", + "Rosalind", + "Rosalinda", + "Rosalyn", + "Rosamond", + "Rosanna", + "Rosario", + "Roscoe", + "Rose", + "Rosella", + "Roselyn", + "Rosemarie", + "Rosemary", + "Rosendo", + "Rosetta", + "Rosie", + "Rosina", + "Roslyn", + "Ross", + "Rossie", + "Rowan", + "Rowena", + "Rowland", + "Roxane", + "Roxanne", + "Roy", + "Royal", + "Royce", + "Rozella", + "Ruben", + "Rubie", + "Ruby", + "Rubye", + "Rudolph", + "Rudy", + "Rupert", + "Russ", + "Russel", + "Russell", + "Rusty", + "Ruth", + "Ruthe", + "Ruthie", + "Ryan", + "Ryann", + "Ryder", + "Rylan", + "Rylee", + "Ryleigh", + "Ryley", + "Sabina", + "Sabrina", + "Sabryna", + "Sadie", + "Sadye", + "Sage", + "Saige", + "Sallie", + "Sally", + "Salma", + "Salvador", + "Salvatore", + "Sam", + "Samanta", + "Samantha", + "Samara", + "Samir", + "Sammie", + "Sammy", + "Samson", + "Sandra", + "Sandrine", + "Sandy", + "Sanford", + "Santa", + "Santiago", + "Santina", + "Santino", + "Santos", + "Sarah", + "Sarai", + "Sarina", + "Sasha", + "Saul", + "Savanah", + "Savanna", + "Savannah", + "Savion", + "Scarlett", + "Schuyler", + "Scot", + "Scottie", + "Scotty", + "Seamus", + "Sean", + "Sebastian", + "Sedrick", + "Selena", + "Selina", + "Selmer", + "Serena", + "Serenity", + "Seth", + "Shad", + "Shaina", + "Shakira", + "Shana", + "Shane", + "Shanel", + "Shanelle", + "Shania", + "Shanie", + "Shaniya", + "Shanna", + "Shannon", + "Shanny", + "Shanon", + "Shany", + "Sharon", + "Shaun", + "Shawn", + "Shawna", + "Shaylee", + "Shayna", + "Shayne", + "Shea", + "Sheila", + "Sheldon", + "Shemar", + "Sheridan", + "Sherman", + "Sherwood", + "Shirley", + "Shyann", + "Shyanne", + "Sibyl", + "Sid", + "Sidney", + "Sienna", + "Sierra", + "Sigmund", + "Sigrid", + "Sigurd", + "Silas", + "Sim", + "Simeon", + "Simone", + "Sincere", + "Sister", + "Skye", + "Skyla", + "Skylar", + "Sofia", + "Soledad", + "Solon", + "Sonia", + "Sonny", + "Sonya", + "Sophia", + "Sophie", + "Spencer", + "Stacey", + "Stacy", + "Stan", + "Stanford", + "Stanley", + "Stanton", + "Stefan", + "Stefanie", + "Stella", + "Stephan", + "Stephania", + "Stephanie", + "Stephany", + "Stephen", + "Stephon", + "Sterling", + "Steve", + "Stevie", + "Stewart", + "Stone", + "Stuart", + "Summer", + "Sunny", + "Susan", + "Susana", + "Susanna", + "Susie", + "Suzanne", + "Sven", + "Syble", + "Sydnee", + "Sydney", + "Sydni", + "Sydnie", + "Sylvan", + "Sylvester", + "Sylvia", + "Tabitha", + "Tad", + "Talia", + "Talon", + "Tamara", + "Tamia", + "Tania", + "Tanner", + "Tanya", + "Tara", + "Taryn", + "Tate", + "Tatum", + "Tatyana", + "Taurean", + "Tavares", + "Taya", + "Taylor", + "Teagan", + "Ted", + "Telly", + "Terence", + "Teresa", + "Terrance", + "Terrell", + "Terrence", + "Terrill", + "Terry", + "Tess", + "Tessie", + "Tevin", + "Thad", + "Thaddeus", + "Thalia", + "Thea", + "Thelma", + "Theo", + "Theodora", + "Theodore", + "Theresa", + "Therese", + "Theresia", + "Theron", + "Thomas", + "Thora", + "Thurman", + "Tia", + "Tiana", + "Tianna", + "Tiara", + "Tierra", + "Tiffany", + "Tillman", + "Timmothy", + "Timmy", + "Timothy", + "Tina", + "Tito", + "Titus", + "Tobin", + "Toby", + "Tod", + "Tom", + "Tomas", + "Tomasa", + "Tommie", + "Toney", + "Toni", + "Tony", + "Torey", + "Torrance", + "Torrey", + "Toy", + "Trace", + "Tracey", + "Tracy", + "Travis", + "Travon", + "Tre", + "Tremaine", + "Tremayne", + "Trent", + "Trenton", + "Tressa", + "Tressie", + "Treva", + "Trever", + "Trevion", + "Trevor", + "Trey", + "Trinity", + "Trisha", + "Tristian", + "Tristin", + "Triston", + "Troy", + "Trudie", + "Trycia", + "Trystan", + "Turner", + "Twila", + "Tyler", + "Tyra", + "Tyree", + "Tyreek", + "Tyrel", + "Tyrell", + "Tyrese", + "Tyrique", + "Tyshawn", + "Tyson", + "Ubaldo", + "Ulices", + "Ulises", + "Una", + "Unique", + "Urban", + "Uriah", + "Uriel", + "Ursula", + "Vada", + "Valentin", + "Valentina", + "Valentine", + "Valerie", + "Vallie", + "Van", + "Vance", + "Vanessa", + "Vaughn", + "Veda", + "Velda", + "Vella", + "Velma", + "Velva", + "Vena", + "Verda", + "Verdie", + "Vergie", + "Verla", + "Verlie", + "Vern", + "Verna", + "Verner", + "Vernice", + "Vernie", + "Vernon", + "Verona", + "Veronica", + "Vesta", + "Vicenta", + "Vicente", + "Vickie", + "Vicky", + "Victor", + "Victoria", + "Vida", + "Vidal", + "Vilma", + "Vince", + "Vincent", + "Vincenza", + "Vincenzo", + "Vinnie", + "Viola", + "Violet", + "Violette", + "Virgie", + "Virgil", + "Virginia", + "Virginie", + "Vita", + "Vito", + "Viva", + "Vivian", + "Viviane", + "Vivianne", + "Vivien", + "Vivienne", + "Vladimir", + "Wade", + "Waino", + "Waldo", + "Walker", + "Wallace", + "Walter", + "Walton", + "Wanda", + "Ward", + "Warren", + "Watson", + "Wava", + "Waylon", + "Wayne", + "Webster", + "Weldon", + "Wellington", + "Wendell", + "Wendy", + "Werner", + "Westley", + "Weston", + "Whitney", + "Wilber", + "Wilbert", + "Wilburn", + "Wiley", + "Wilford", + "Wilfred", + "Wilfredo", + "Wilfrid", + "Wilhelm", + "Wilhelmine", + "Will", + "Willa", + "Willard", + "William", + "Willie", + "Willis", + "Willow", + "Willy", + "Wilma", + "Wilmer", + "Wilson", + "Wilton", + "Winfield", + "Winifred", + "Winnifred", + "Winona", + "Winston", + "Woodrow", + "Wyatt", + "Wyman", + "Xander", + "Xavier", + "Xzavier", + "Yadira", + "Yasmeen", + "Yasmin", + "Yasmine", + "Yazmin", + "Yesenia", + "Yessenia", + "Yolanda", + "Yoshiko", + "Yvette", + "Yvonne", + "Zachariah", + "Zachary", + "Zachery", + "Zack", + "Zackary", + "Zackery", + "Zakary", + "Zander", + "Zane", + "Zaria", + "Zechariah", + "Zelda", + "Zella", + "Zelma", + "Zena", + "Zetta", + "Zion", + "Zita", + "Zoe", + "Zoey", + "Zoie", + "Zoila", + "Zola", + "Zora", + "Zula" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/name/last_name.js +var require_last_name = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/name/last_name.js"(exports2, module2) { + module2["exports"] = [ + "Abbott", + "Abernathy", + "Abshire", + "Adams", + "Altenwerth", + "Anderson", + "Ankunding", + "Armstrong", + "Auer", + "Aufderhar", + "Bahringer", + "Bailey", + "Balistreri", + "Barrows", + "Bartell", + "Bartoletti", + "Barton", + "Bashirian", + "Batz", + "Bauch", + "Baumbach", + "Bayer", + "Beahan", + "Beatty", + "Bechtelar", + "Becker", + "Bednar", + "Beer", + "Beier", + "Berge", + "Bergnaum", + "Bergstrom", + "Bernhard", + "Bernier", + "Bins", + "Blanda", + "Blick", + "Block", + "Bode", + "Boehm", + "Bogan", + "Bogisich", + "Borer", + "Bosco", + "Botsford", + "Boyer", + "Boyle", + "Bradtke", + "Brakus", + "Braun", + "Breitenberg", + "Brekke", + "Brown", + "Bruen", + "Buckridge", + "Carroll", + "Carter", + "Cartwright", + "Casper", + "Cassin", + "Champlin", + "Christiansen", + "Cole", + "Collier", + "Collins", + "Conn", + "Connelly", + "Conroy", + "Considine", + "Corkery", + "Cormier", + "Corwin", + "Cremin", + "Crist", + "Crona", + "Cronin", + "Crooks", + "Cruickshank", + "Cummerata", + "Cummings", + "Dach", + "D'Amore", + "Daniel", + "Dare", + "Daugherty", + "Davis", + "Deckow", + "Denesik", + "Dibbert", + "Dickens", + "Dicki", + "Dickinson", + "Dietrich", + "Donnelly", + "Dooley", + "Douglas", + "Doyle", + "DuBuque", + "Durgan", + "Ebert", + "Effertz", + "Emard", + "Emmerich", + "Erdman", + "Ernser", + "Fadel", + "Fahey", + "Farrell", + "Fay", + "Feeney", + "Feest", + "Feil", + "Ferry", + "Fisher", + "Flatley", + "Frami", + "Franecki", + "Friesen", + "Fritsch", + "Funk", + "Gaylord", + "Gerhold", + "Gerlach", + "Gibson", + "Gislason", + "Gleason", + "Gleichner", + "Glover", + "Goldner", + "Goodwin", + "Gorczany", + "Gottlieb", + "Goyette", + "Grady", + "Graham", + "Grant", + "Green", + "Greenfelder", + "Greenholt", + "Grimes", + "Gulgowski", + "Gusikowski", + "Gutkowski", + "Gutmann", + "Haag", + "Hackett", + "Hagenes", + "Hahn", + "Haley", + "Halvorson", + "Hamill", + "Hammes", + "Hand", + "Hane", + "Hansen", + "Harber", + "Harris", + "Hartmann", + "Harvey", + "Hauck", + "Hayes", + "Heaney", + "Heathcote", + "Hegmann", + "Heidenreich", + "Heller", + "Herman", + "Hermann", + "Hermiston", + "Herzog", + "Hessel", + "Hettinger", + "Hickle", + "Hilll", + "Hills", + "Hilpert", + "Hintz", + "Hirthe", + "Hodkiewicz", + "Hoeger", + "Homenick", + "Hoppe", + "Howe", + "Howell", + "Hudson", + "Huel", + "Huels", + "Hyatt", + "Jacobi", + "Jacobs", + "Jacobson", + "Jakubowski", + "Jaskolski", + "Jast", + "Jenkins", + "Jerde", + "Johns", + "Johnson", + "Johnston", + "Jones", + "Kassulke", + "Kautzer", + "Keebler", + "Keeling", + "Kemmer", + "Kerluke", + "Kertzmann", + "Kessler", + "Kiehn", + "Kihn", + "Kilback", + "King", + "Kirlin", + "Klein", + "Kling", + "Klocko", + "Koch", + "Koelpin", + "Koepp", + "Kohler", + "Konopelski", + "Koss", + "Kovacek", + "Kozey", + "Krajcik", + "Kreiger", + "Kris", + "Kshlerin", + "Kub", + "Kuhic", + "Kuhlman", + "Kuhn", + "Kulas", + "Kunde", + "Kunze", + "Kuphal", + "Kutch", + "Kuvalis", + "Labadie", + "Lakin", + "Lang", + "Langosh", + "Langworth", + "Larkin", + "Larson", + "Leannon", + "Lebsack", + "Ledner", + "Leffler", + "Legros", + "Lehner", + "Lemke", + "Lesch", + "Leuschke", + "Lind", + "Lindgren", + "Littel", + "Little", + "Lockman", + "Lowe", + "Lubowitz", + "Lueilwitz", + "Luettgen", + "Lynch", + "Macejkovic", + "MacGyver", + "Maggio", + "Mann", + "Mante", + "Marks", + "Marquardt", + "Marvin", + "Mayer", + "Mayert", + "McClure", + "McCullough", + "McDermott", + "McGlynn", + "McKenzie", + "McLaughlin", + "Medhurst", + "Mertz", + "Metz", + "Miller", + "Mills", + "Mitchell", + "Moen", + "Mohr", + "Monahan", + "Moore", + "Morar", + "Morissette", + "Mosciski", + "Mraz", + "Mueller", + "Muller", + "Murazik", + "Murphy", + "Murray", + "Nader", + "Nicolas", + "Nienow", + "Nikolaus", + "Nitzsche", + "Nolan", + "Oberbrunner", + "O'Connell", + "O'Conner", + "O'Hara", + "O'Keefe", + "O'Kon", + "Okuneva", + "Olson", + "Ondricka", + "O'Reilly", + "Orn", + "Ortiz", + "Osinski", + "Pacocha", + "Padberg", + "Pagac", + "Parisian", + "Parker", + "Paucek", + "Pfannerstill", + "Pfeffer", + "Pollich", + "Pouros", + "Powlowski", + "Predovic", + "Price", + "Prohaska", + "Prosacco", + "Purdy", + "Quigley", + "Quitzon", + "Rath", + "Ratke", + "Rau", + "Raynor", + "Reichel", + "Reichert", + "Reilly", + "Reinger", + "Rempel", + "Renner", + "Reynolds", + "Rice", + "Rippin", + "Ritchie", + "Robel", + "Roberts", + "Rodriguez", + "Rogahn", + "Rohan", + "Rolfson", + "Romaguera", + "Roob", + "Rosenbaum", + "Rowe", + "Ruecker", + "Runolfsdottir", + "Runolfsson", + "Runte", + "Russel", + "Rutherford", + "Ryan", + "Sanford", + "Satterfield", + "Sauer", + "Sawayn", + "Schaden", + "Schaefer", + "Schamberger", + "Schiller", + "Schimmel", + "Schinner", + "Schmeler", + "Schmidt", + "Schmitt", + "Schneider", + "Schoen", + "Schowalter", + "Schroeder", + "Schulist", + "Schultz", + "Schumm", + "Schuppe", + "Schuster", + "Senger", + "Shanahan", + "Shields", + "Simonis", + "Sipes", + "Skiles", + "Smith", + "Smitham", + "Spencer", + "Spinka", + "Sporer", + "Stamm", + "Stanton", + "Stark", + "Stehr", + "Steuber", + "Stiedemann", + "Stokes", + "Stoltenberg", + "Stracke", + "Streich", + "Stroman", + "Strosin", + "Swaniawski", + "Swift", + "Terry", + "Thiel", + "Thompson", + "Tillman", + "Torp", + "Torphy", + "Towne", + "Toy", + "Trantow", + "Tremblay", + "Treutel", + "Tromp", + "Turcotte", + "Turner", + "Ullrich", + "Upton", + "Vandervort", + "Veum", + "Volkman", + "Von", + "VonRueden", + "Waelchi", + "Walker", + "Walsh", + "Walter", + "Ward", + "Waters", + "Watsica", + "Weber", + "Wehner", + "Weimann", + "Weissnat", + "Welch", + "West", + "White", + "Wiegand", + "Wilderman", + "Wilkinson", + "Will", + "Williamson", + "Willms", + "Windler", + "Wintheiser", + "Wisoky", + "Wisozk", + "Witting", + "Wiza", + "Wolf", + "Wolff", + "Wuckert", + "Wunsch", + "Wyman", + "Yost", + "Yundt", + "Zboncak", + "Zemlak", + "Ziemann", + "Zieme", + "Zulauf" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/name/binary_gender.js +var require_binary_gender = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/name/binary_gender.js"(exports2, module2) { + module2["exports"] = [ + "Female", + "Male" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/name/gender.js +var require_gender = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/name/gender.js"(exports2, module2) { + module2["exports"] = [ + "Asexual", + "Female to male trans man", + "Female to male transgender man", + "Female to male transsexual man", + "F2M", + "Gender neutral", + "Hermaphrodite", + "Intersex man", + "Intersex person", + "Intersex woman", + "Male to female trans woman", + "Male to female transgender woman", + "Male to female transsexual woman", + "Man", + "M2F", + "Polygender", + "T* man", + "T* woman", + "Two* person", + "Two-spirit person", + "Woman", + "Agender", + "Androgyne", + "Androgynes", + "Androgynous", + "Bigender", + "Cis", + "Cis Female", + "Cis Male", + "Cis Man", + "Cis Woman", + "Cisgender", + "Cisgender Female", + "Cisgender Male", + "Cisgender Man", + "Cisgender Woman", + "Female to Male", + "FTM", + "Gender Fluid", + "Gender Nonconforming", + "Gender Questioning", + "Gender Variant", + "Genderqueer", + "Intersex", + "Male to Female", + "MTF", + "Neither", + "Neutrois", + "Non-binary", + "Other", + "Pangender", + "Trans", + "Trans Female", + "Trans Male", + "Trans Man", + "Trans Person", + "Trans*Female", + "Trans*Male", + "Trans*Man", + "Trans*Person", + "Trans*Woman", + "Transexual", + "Transexual Female", + "Transexual Male", + "Transexual Man", + "Transexual Person", + "Transexual Woman", + "Transgender Female", + "Transgender Person", + "Transmasculine", + "Two-spirit" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/name/prefix.js +var require_prefix = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/name/prefix.js"(exports2, module2) { + module2["exports"] = [ + "Mr.", + "Mrs.", + "Ms.", + "Miss", + "Dr." + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/name/suffix.js +var require_suffix2 = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/name/suffix.js"(exports2, module2) { + module2["exports"] = [ + "Jr.", + "Sr.", + "I", + "II", + "III", + "IV", + "V", + "MD", + "DDS", + "PhD", + "DVM" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/name/title.js +var require_title = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/name/title.js"(exports2, module2) { + module2["exports"] = { + "descriptor": [ + "Lead", + "Senior", + "Direct", + "Corporate", + "Dynamic", + "Future", + "Product", + "National", + "Regional", + "District", + "Central", + "Global", + "Customer", + "Investor", + "Dynamic", + "International", + "Legacy", + "Forward", + "Internal", + "Human", + "Chief", + "Principal" + ], + "level": [ + "Solutions", + "Program", + "Brand", + "Security", + "Research", + "Marketing", + "Directives", + "Implementation", + "Integration", + "Functionality", + "Response", + "Paradigm", + "Tactics", + "Identity", + "Markets", + "Group", + "Division", + "Applications", + "Optimization", + "Operations", + "Infrastructure", + "Intranet", + "Communications", + "Web", + "Branding", + "Quality", + "Assurance", + "Mobility", + "Accounts", + "Data", + "Creative", + "Configuration", + "Accountability", + "Interactions", + "Factors", + "Usability", + "Metrics" + ], + "job": [ + "Supervisor", + "Associate", + "Executive", + "Liaison", + "Officer", + "Manager", + "Engineer", + "Specialist", + "Director", + "Coordinator", + "Administrator", + "Architect", + "Analyst", + "Designer", + "Planner", + "Orchestrator", + "Technician", + "Developer", + "Producer", + "Consultant", + "Assistant", + "Facilitator", + "Agent", + "Representative", + "Strategist" + ] + }; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/name/name.js +var require_name3 = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/name/name.js"(exports2, module2) { + module2["exports"] = [ + "#{prefix} #{first_name} #{last_name}", + "#{first_name} #{last_name} #{suffix}", + "#{first_name} #{last_name}", + "#{first_name} #{last_name}", + "#{male_first_name} #{last_name}", + "#{female_first_name} #{last_name}" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/name/index.js +var require_name4 = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/name/index.js"(exports2, module2) { + var name = {}; + module2["exports"] = name; + name.male_first_name = require_male_first_name(); + name.female_first_name = require_female_first_name(); + name.first_name = require_first_name(); + name.last_name = require_last_name(); + name.binary_gender = require_binary_gender(); + name.gender = require_gender(); + name.prefix = require_prefix(); + name.suffix = require_suffix2(); + name.title = require_title(); + name.name = require_name3(); + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/phone_number/formats.js +var require_formats2 = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/phone_number/formats.js"(exports2, module2) { + module2["exports"] = [ + "!##-!##-####", + "(!##) !##-####", + "1-!##-!##-####", + "!##.!##.####", + "!##-!##-####", + "(!##) !##-####", + "1-!##-!##-####", + "!##.!##.####", + "!##-!##-#### x###", + "(!##) !##-#### x###", + "1-!##-!##-#### x###", + "!##.!##.#### x###", + "!##-!##-#### x####", + "(!##) !##-#### x####", + "1-!##-!##-#### x####", + "!##.!##.#### x####", + "!##-!##-#### x#####", + "(!##) !##-#### x#####", + "1-!##-!##-#### x#####", + "!##.!##.#### x#####" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/phone_number/index.js +var require_phone_number2 = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/phone_number/index.js"(exports2, module2) { + var phone_number = {}; + module2["exports"] = phone_number; + phone_number.formats = require_formats2(); + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/cell_phone/formats.js +var require_formats3 = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/cell_phone/formats.js"(exports2, module2) { + module2["exports"] = [ + "###-###-####", + "(###) ###-####", + "1-###-###-####", + "###.###.####" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/cell_phone/index.js +var require_cell_phone = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/cell_phone/index.js"(exports2, module2) { + var cell_phone = {}; + module2["exports"] = cell_phone; + cell_phone.formats = require_formats3(); + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/business/credit_card_numbers.js +var require_credit_card_numbers = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/business/credit_card_numbers.js"(exports2, module2) { + module2["exports"] = [ + "1234-2121-1221-1211", + "1212-1221-1121-1234", + "1211-1221-1234-2201", + "1228-1221-1221-1431" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/business/credit_card_expiry_dates.js +var require_credit_card_expiry_dates = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/business/credit_card_expiry_dates.js"(exports2, module2) { + module2["exports"] = [ + "2011-10-12", + "2012-11-12", + "2015-11-11", + "2013-9-12" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/business/credit_card_types.js +var require_credit_card_types = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/business/credit_card_types.js"(exports2, module2) { + module2["exports"] = [ + "visa", + "mastercard", + "americanexpress", + "discover" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/business/index.js +var require_business = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/business/index.js"(exports2, module2) { + var business = {}; + module2["exports"] = business; + business.credit_card_numbers = require_credit_card_numbers(); + business.credit_card_expiry_dates = require_credit_card_expiry_dates(); + business.credit_card_types = require_credit_card_types(); + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/commerce/color.js +var require_color = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/commerce/color.js"(exports2, module2) { + module2["exports"] = [ + "red", + "green", + "blue", + "yellow", + "purple", + "mint green", + "teal", + "white", + "black", + "orange", + "pink", + "grey", + "maroon", + "violet", + "turquoise", + "tan", + "sky blue", + "salmon", + "plum", + "orchid", + "olive", + "magenta", + "lime", + "ivory", + "indigo", + "gold", + "fuchsia", + "cyan", + "azure", + "lavender", + "silver" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/commerce/department.js +var require_department = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/commerce/department.js"(exports2, module2) { + module2["exports"] = [ + "Books", + "Movies", + "Music", + "Games", + "Electronics", + "Computers", + "Home", + "Garden", + "Tools", + "Grocery", + "Health", + "Beauty", + "Toys", + "Kids", + "Baby", + "Clothing", + "Shoes", + "Jewelery", + "Sports", + "Outdoors", + "Automotive", + "Industrial" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/commerce/product_name.js +var require_product_name = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/commerce/product_name.js"(exports2, module2) { + module2["exports"] = { + "adjective": [ + "Small", + "Ergonomic", + "Rustic", + "Intelligent", + "Gorgeous", + "Incredible", + "Fantastic", + "Practical", + "Sleek", + "Awesome", + "Generic", + "Handcrafted", + "Handmade", + "Licensed", + "Refined", + "Unbranded", + "Tasty" + ], + "material": [ + "Steel", + "Wooden", + "Concrete", + "Plastic", + "Cotton", + "Granite", + "Rubber", + "Metal", + "Soft", + "Fresh", + "Frozen" + ], + "product": [ + "Chair", + "Car", + "Computer", + "Keyboard", + "Mouse", + "Bike", + "Ball", + "Gloves", + "Pants", + "Shirt", + "Table", + "Shoes", + "Hat", + "Towels", + "Soap", + "Tuna", + "Chicken", + "Fish", + "Cheese", + "Bacon", + "Pizza", + "Salad", + "Sausages", + "Chips" + ] + }; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/commerce/product_description.js +var require_product_description = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/commerce/product_description.js"(exports2, module2) { + module2["exports"] = [ + "Ergonomic executive chair upholstered in bonded black leather and PVC padded seat and back for all-day comfort and support", + "The automobile layout consists of a front-engine design, with transaxle-type transmissions mounted at the rear of the engine and four wheel drive", + "New ABC 13 9370, 13.3, 5th Gen CoreA5-8250U, 8GB RAM, 256GB SSD, power UHD Graphics, OS 10 Home, OS Office A & J 2016", + "The slim & simple Maple Gaming Keyboard from Dev Byte comes with a sleek body and 7- Color RGB LED Back-lighting for smart functionality", + "The Apollotech B340 is an affordable wireless mouse with reliable connectivity, 12 months battery life and modern design", + "The Nagasaki Lander is the trademarked name of several series of Nagasaki sport bikes, that started with the 1984 ABC800J", + "The Football Is Good For Training And Recreational Purposes", + "Carbonite web goalkeeper gloves are ergonomically designed to give easy fit", + "Boston's most advanced compression wear technology increases muscle oxygenation, stabilizes active muscles", + "New range of formal shirts are designed keeping you in mind. With fits and styling that will make you stand apart", + "The beautiful range of Apple Natural\xE9 that has an exciting mix of natural ingredients. With the Goodness of 100% Natural Ingredients", + "Andy shoes are designed to keeping in mind durability as well as trends, the most stylish range of shoes & sandals" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/commerce/index.js +var require_commerce2 = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/commerce/index.js"(exports2, module2) { + var commerce = {}; + module2["exports"] = commerce; + commerce.color = require_color(); + commerce.department = require_department(); + commerce.product_name = require_product_name(); + commerce.product_description = require_product_description(); + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/team/creature.js +var require_creature = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/team/creature.js"(exports2, module2) { + module2["exports"] = [ + "ants", + "bats", + "bears", + "bees", + "birds", + "buffalo", + "cats", + "chickens", + "cattle", + "dogs", + "dolphins", + "ducks", + "elephants", + "fishes", + "foxes", + "frogs", + "geese", + "goats", + "horses", + "kangaroos", + "lions", + "monkeys", + "owls", + "oxen", + "penguins", + "people", + "pigs", + "rabbits", + "sheep", + "tigers", + "whales", + "wolves", + "zebras", + "banshees", + "crows", + "black cats", + "chimeras", + "ghosts", + "conspirators", + "dragons", + "dwarves", + "elves", + "enchanters", + "exorcists", + "sons", + "foes", + "giants", + "gnomes", + "goblins", + "gooses", + "griffins", + "lycanthropes", + "nemesis", + "ogres", + "oracles", + "prophets", + "sorcerors", + "spiders", + "spirits", + "vampires", + "warlocks", + "vixens", + "werewolves", + "witches", + "worshipers", + "zombies", + "druids" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/team/name.js +var require_name5 = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/team/name.js"(exports2, module2) { + module2["exports"] = [ + "#{Address.state} #{creature}" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/team/index.js +var require_team = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/team/index.js"(exports2, module2) { + var team = {}; + module2["exports"] = team; + team.creature = require_creature(); + team.name = require_name5(); + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/hacker/abbreviation.js +var require_abbreviation = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/hacker/abbreviation.js"(exports2, module2) { + module2["exports"] = [ + "TCP", + "HTTP", + "SDD", + "RAM", + "GB", + "CSS", + "SSL", + "AGP", + "SQL", + "FTP", + "PCI", + "AI", + "ADP", + "RSS", + "XML", + "EXE", + "COM", + "HDD", + "THX", + "SMTP", + "SMS", + "USB", + "PNG", + "SAS", + "IB", + "SCSI", + "JSON", + "XSS", + "JBOD" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/hacker/adjective.js +var require_adjective2 = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/hacker/adjective.js"(exports2, module2) { + module2["exports"] = [ + "auxiliary", + "primary", + "back-end", + "digital", + "open-source", + "virtual", + "cross-platform", + "redundant", + "online", + "haptic", + "multi-byte", + "bluetooth", + "wireless", + "1080p", + "neural", + "optical", + "solid state", + "mobile" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/hacker/noun.js +var require_noun2 = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/hacker/noun.js"(exports2, module2) { + module2["exports"] = [ + "driver", + "protocol", + "bandwidth", + "panel", + "microchip", + "program", + "port", + "card", + "array", + "interface", + "system", + "sensor", + "firewall", + "hard drive", + "pixel", + "alarm", + "feed", + "monitor", + "application", + "transmitter", + "bus", + "circuit", + "capacitor", + "matrix" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/hacker/verb.js +var require_verb = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/hacker/verb.js"(exports2, module2) { + module2["exports"] = [ + "back up", + "bypass", + "hack", + "override", + "compress", + "copy", + "navigate", + "index", + "connect", + "generate", + "quantify", + "calculate", + "synthesize", + "input", + "transmit", + "program", + "reboot", + "parse" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/hacker/ingverb.js +var require_ingverb = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/hacker/ingverb.js"(exports2, module2) { + module2["exports"] = [ + "backing up", + "bypassing", + "hacking", + "overriding", + "compressing", + "copying", + "navigating", + "indexing", + "connecting", + "generating", + "quantifying", + "calculating", + "synthesizing", + "transmitting", + "programming", + "parsing" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/hacker/phrase.js +var require_phrase = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/hacker/phrase.js"(exports2, module2) { + module2["exports"] = [ + "If we {{verb}} the {{noun}}, we can get to the {{abbreviation}} {{noun}} through the {{adjective}} {{abbreviation}} {{noun}}!", + "We need to {{verb}} the {{adjective}} {{abbreviation}} {{noun}}!", + "Try to {{verb}} the {{abbreviation}} {{noun}}, maybe it will {{verb}} the {{adjective}} {{noun}}!", + "You can't {{verb}} the {{noun}} without {{ingverb}} the {{adjective}} {{abbreviation}} {{noun}}!", + "Use the {{adjective}} {{abbreviation}} {{noun}}, then you can {{verb}} the {{adjective}} {{noun}}!", + "The {{abbreviation}} {{noun}} is down, {{verb}} the {{adjective}} {{noun}} so we can {{verb}} the {{abbreviation}} {{noun}}!", + "{{ingverb}} the {{noun}} won't do anything, we need to {{verb}} the {{adjective}} {{abbreviation}} {{noun}}!", + "I'll {{verb}} the {{adjective}} {{abbreviation}} {{noun}}, that should {{noun}} the {{abbreviation}} {{noun}}!" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/hacker/index.js +var require_hacker2 = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/hacker/index.js"(exports2, module2) { + var hacker = {}; + module2["exports"] = hacker; + hacker.abbreviation = require_abbreviation(); + hacker.adjective = require_adjective2(); + hacker.noun = require_noun2(); + hacker.verb = require_verb(); + hacker.ingverb = require_ingverb(); + hacker.phrase = require_phrase(); + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/app/name.js +var require_name6 = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/app/name.js"(exports2, module2) { + module2["exports"] = [ + "Redhold", + "Treeflex", + "Trippledex", + "Kanlam", + "Bigtax", + "Daltfresh", + "Toughjoyfax", + "Mat Lam Tam", + "Otcom", + "Tres-Zap", + "Y-Solowarm", + "Tresom", + "Voltsillam", + "Biodex", + "Greenlam", + "Viva", + "Matsoft", + "Temp", + "Zoolab", + "Subin", + "Rank", + "Job", + "Stringtough", + "Tin", + "It", + "Home Ing", + "Zamit", + "Sonsing", + "Konklab", + "Alpha", + "Latlux", + "Voyatouch", + "Alphazap", + "Holdlamis", + "Zaam-Dox", + "Sub-Ex", + "Quo Lux", + "Bamity", + "Ventosanzap", + "Lotstring", + "Hatity", + "Tempsoft", + "Overhold", + "Fixflex", + "Konklux", + "Zontrax", + "Tampflex", + "Span", + "Namfix", + "Transcof", + "Stim", + "Fix San", + "Sonair", + "Stronghold", + "Fintone", + "Y-find", + "Opela", + "Lotlux", + "Ronstring", + "Zathin", + "Duobam", + "Keylex" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/app/version.js +var require_version = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/app/version.js"(exports2, module2) { + module2["exports"] = [ + "0.#.#", + "0.##", + "#.##", + "#.#", + "#.#.#" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/app/author.js +var require_author = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/app/author.js"(exports2, module2) { + module2["exports"] = [ + "#{Name.name}", + "#{Company.name}" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/app/index.js +var require_app = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/app/index.js"(exports2, module2) { + var app = {}; + module2["exports"] = app; + app.name = require_name6(); + app.version = require_version(); + app.author = require_author(); + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/finance/account_type.js +var require_account_type = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/finance/account_type.js"(exports2, module2) { + module2["exports"] = [ + "Checking", + "Savings", + "Money Market", + "Investment", + "Home Loan", + "Credit Card", + "Auto Loan", + "Personal Loan" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/finance/transaction_type.js +var require_transaction_type = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/finance/transaction_type.js"(exports2, module2) { + module2["exports"] = [ + "deposit", + "withdrawal", + "payment", + "invoice" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/finance/currency.js +var require_currency = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/finance/currency.js"(exports2, module2) { + module2["exports"] = { + "UAE Dirham": { + "code": "AED", + "symbol": "" + }, + "Afghani": { + "code": "AFN", + "symbol": "\u060B" + }, + "Lek": { + "code": "ALL", + "symbol": "Lek" + }, + "Armenian Dram": { + "code": "AMD", + "symbol": "" + }, + "Netherlands Antillian Guilder": { + "code": "ANG", + "symbol": "\u0192" + }, + "Kwanza": { + "code": "AOA", + "symbol": "" + }, + "Argentine Peso": { + "code": "ARS", + "symbol": "$" + }, + "Australian Dollar": { + "code": "AUD", + "symbol": "$" + }, + "Aruban Guilder": { + "code": "AWG", + "symbol": "\u0192" + }, + "Azerbaijanian Manat": { + "code": "AZN", + "symbol": "\u043C\u0430\u043D" + }, + "Convertible Marks": { + "code": "BAM", + "symbol": "KM" + }, + "Barbados Dollar": { + "code": "BBD", + "symbol": "$" + }, + "Taka": { + "code": "BDT", + "symbol": "" + }, + "Bulgarian Lev": { + "code": "BGN", + "symbol": "\u043B\u0432" + }, + "Bahraini Dinar": { + "code": "BHD", + "symbol": "" + }, + "Burundi Franc": { + "code": "BIF", + "symbol": "" + }, + "Bermudian Dollar (customarily known as Bermuda Dollar)": { + "code": "BMD", + "symbol": "$" + }, + "Brunei Dollar": { + "code": "BND", + "symbol": "$" + }, + "Boliviano boliviano": { + "code": "BOB", + "symbol": "Bs" + }, + "Brazilian Real": { + "code": "BRL", + "symbol": "R$" + }, + "Bahamian Dollar": { + "code": "BSD", + "symbol": "$" + }, + "Pula": { + "code": "BWP", + "symbol": "P" + }, + "Belarussian Ruble": { + "code": "BYR", + "symbol": "p." + }, + "Belize Dollar": { + "code": "BZD", + "symbol": "BZ$" + }, + "Canadian Dollar": { + "code": "CAD", + "symbol": "$" + }, + "Congolese Franc": { + "code": "CDF", + "symbol": "" + }, + "Swiss Franc": { + "code": "CHF", + "symbol": "CHF" + }, + "Chilean Peso": { + "code": "CLP", + "symbol": "$" + }, + "Yuan Renminbi": { + "code": "CNY", + "symbol": "\xA5" + }, + "Colombian Peso": { + "code": "COP", + "symbol": "$" + }, + "Costa Rican Colon": { + "code": "CRC", + "symbol": "\u20A1" + }, + "Cuban Peso": { + "code": "CUP", + "symbol": "\u20B1" + }, + "Cuban Peso Convertible": { + "code": "CUC", + "symbol": "$" + }, + "Cape Verde Escudo": { + "code": "CVE", + "symbol": "" + }, + "Czech Koruna": { + "code": "CZK", + "symbol": "K\u010D" + }, + "Djibouti Franc": { + "code": "DJF", + "symbol": "" + }, + "Danish Krone": { + "code": "DKK", + "symbol": "kr" + }, + "Dominican Peso": { + "code": "DOP", + "symbol": "RD$" + }, + "Algerian Dinar": { + "code": "DZD", + "symbol": "" + }, + "Kroon": { + "code": "EEK", + "symbol": "" + }, + "Egyptian Pound": { + "code": "EGP", + "symbol": "\xA3" + }, + "Nakfa": { + "code": "ERN", + "symbol": "" + }, + "Ethiopian Birr": { + "code": "ETB", + "symbol": "" + }, + "Euro": { + "code": "EUR", + "symbol": "\u20AC" + }, + "Fiji Dollar": { + "code": "FJD", + "symbol": "$" + }, + "Falkland Islands Pound": { + "code": "FKP", + "symbol": "\xA3" + }, + "Pound Sterling": { + "code": "GBP", + "symbol": "\xA3" + }, + "Lari": { + "code": "GEL", + "symbol": "" + }, + "Cedi": { + "code": "GHS", + "symbol": "" + }, + "Gibraltar Pound": { + "code": "GIP", + "symbol": "\xA3" + }, + "Dalasi": { + "code": "GMD", + "symbol": "" + }, + "Guinea Franc": { + "code": "GNF", + "symbol": "" + }, + "Quetzal": { + "code": "GTQ", + "symbol": "Q" + }, + "Guyana Dollar": { + "code": "GYD", + "symbol": "$" + }, + "Hong Kong Dollar": { + "code": "HKD", + "symbol": "$" + }, + "Lempira": { + "code": "HNL", + "symbol": "L" + }, + "Croatian Kuna": { + "code": "HRK", + "symbol": "kn" + }, + "Gourde": { + "code": "HTG", + "symbol": "" + }, + "Forint": { + "code": "HUF", + "symbol": "Ft" + }, + "Rupiah": { + "code": "IDR", + "symbol": "Rp" + }, + "New Israeli Sheqel": { + "code": "ILS", + "symbol": "\u20AA" + }, + "Bhutanese Ngultrum": { + "code": "BTN", + "symbol": "Nu" + }, + "Indian Rupee": { + "code": "INR", + "symbol": "\u20B9" + }, + "Iraqi Dinar": { + "code": "IQD", + "symbol": "" + }, + "Iranian Rial": { + "code": "IRR", + "symbol": "\uFDFC" + }, + "Iceland Krona": { + "code": "ISK", + "symbol": "kr" + }, + "Jamaican Dollar": { + "code": "JMD", + "symbol": "J$" + }, + "Jordanian Dinar": { + "code": "JOD", + "symbol": "" + }, + "Yen": { + "code": "JPY", + "symbol": "\xA5" + }, + "Kenyan Shilling": { + "code": "KES", + "symbol": "" + }, + "Som": { + "code": "KGS", + "symbol": "\u043B\u0432" + }, + "Riel": { + "code": "KHR", + "symbol": "\u17DB" + }, + "Comoro Franc": { + "code": "KMF", + "symbol": "" + }, + "North Korean Won": { + "code": "KPW", + "symbol": "\u20A9" + }, + "Won": { + "code": "KRW", + "symbol": "\u20A9" + }, + "Kuwaiti Dinar": { + "code": "KWD", + "symbol": "" + }, + "Cayman Islands Dollar": { + "code": "KYD", + "symbol": "$" + }, + "Tenge": { + "code": "KZT", + "symbol": "\u043B\u0432" + }, + "Kip": { + "code": "LAK", + "symbol": "\u20AD" + }, + "Lebanese Pound": { + "code": "LBP", + "symbol": "\xA3" + }, + "Sri Lanka Rupee": { + "code": "LKR", + "symbol": "\u20A8" + }, + "Liberian Dollar": { + "code": "LRD", + "symbol": "$" + }, + "Lithuanian Litas": { + "code": "LTL", + "symbol": "Lt" + }, + "Latvian Lats": { + "code": "LVL", + "symbol": "Ls" + }, + "Libyan Dinar": { + "code": "LYD", + "symbol": "" + }, + "Moroccan Dirham": { + "code": "MAD", + "symbol": "" + }, + "Moldovan Leu": { + "code": "MDL", + "symbol": "" + }, + "Malagasy Ariary": { + "code": "MGA", + "symbol": "" + }, + "Denar": { + "code": "MKD", + "symbol": "\u0434\u0435\u043D" + }, + "Kyat": { + "code": "MMK", + "symbol": "" + }, + "Tugrik": { + "code": "MNT", + "symbol": "\u20AE" + }, + "Pataca": { + "code": "MOP", + "symbol": "" + }, + "Ouguiya": { + "code": "MRO", + "symbol": "" + }, + "Mauritius Rupee": { + "code": "MUR", + "symbol": "\u20A8" + }, + "Rufiyaa": { + "code": "MVR", + "symbol": "" + }, + "Kwacha": { + "code": "MWK", + "symbol": "" + }, + "Mexican Peso": { + "code": "MXN", + "symbol": "$" + }, + "Malaysian Ringgit": { + "code": "MYR", + "symbol": "RM" + }, + "Metical": { + "code": "MZN", + "symbol": "MT" + }, + "Naira": { + "code": "NGN", + "symbol": "\u20A6" + }, + "Cordoba Oro": { + "code": "NIO", + "symbol": "C$" + }, + "Norwegian Krone": { + "code": "NOK", + "symbol": "kr" + }, + "Nepalese Rupee": { + "code": "NPR", + "symbol": "\u20A8" + }, + "New Zealand Dollar": { + "code": "NZD", + "symbol": "$" + }, + "Rial Omani": { + "code": "OMR", + "symbol": "\uFDFC" + }, + "Balboa": { + "code": "PAB", + "symbol": "B/." + }, + "Nuevo Sol": { + "code": "PEN", + "symbol": "S/." + }, + "Kina": { + "code": "PGK", + "symbol": "" + }, + "Philippine Peso": { + "code": "PHP", + "symbol": "Php" + }, + "Pakistan Rupee": { + "code": "PKR", + "symbol": "\u20A8" + }, + "Zloty": { + "code": "PLN", + "symbol": "z\u0142" + }, + "Guarani": { + "code": "PYG", + "symbol": "Gs" + }, + "Qatari Rial": { + "code": "QAR", + "symbol": "\uFDFC" + }, + "New Leu": { + "code": "RON", + "symbol": "lei" + }, + "Serbian Dinar": { + "code": "RSD", + "symbol": "\u0414\u0438\u043D." + }, + "Russian Ruble": { + "code": "RUB", + "symbol": "\u0440\u0443\u0431" + }, + "Rwanda Franc": { + "code": "RWF", + "symbol": "" + }, + "Saudi Riyal": { + "code": "SAR", + "symbol": "\uFDFC" + }, + "Solomon Islands Dollar": { + "code": "SBD", + "symbol": "$" + }, + "Seychelles Rupee": { + "code": "SCR", + "symbol": "\u20A8" + }, + "Sudanese Pound": { + "code": "SDG", + "symbol": "" + }, + "Swedish Krona": { + "code": "SEK", + "symbol": "kr" + }, + "Singapore Dollar": { + "code": "SGD", + "symbol": "$" + }, + "Saint Helena Pound": { + "code": "SHP", + "symbol": "\xA3" + }, + "Leone": { + "code": "SLL", + "symbol": "" + }, + "Somali Shilling": { + "code": "SOS", + "symbol": "S" + }, + "Surinam Dollar": { + "code": "SRD", + "symbol": "$" + }, + "Dobra": { + "code": "STN", + "symbol": "Db" + }, + "El Salvador Colon": { + "code": "SVC", + "symbol": "\u20A1" + }, + "Syrian Pound": { + "code": "SYP", + "symbol": "\xA3" + }, + "Lilangeni": { + "code": "SZL", + "symbol": "" + }, + "Baht": { + "code": "THB", + "symbol": "\u0E3F" + }, + "Somoni": { + "code": "TJS", + "symbol": "" + }, + "Manat": { + "code": "TMT", + "symbol": "" + }, + "Tunisian Dinar": { + "code": "TND", + "symbol": "" + }, + "Pa'anga": { + "code": "TOP", + "symbol": "" + }, + "Turkish Lira": { + "code": "TRY", + "symbol": "\u20BA" + }, + "Trinidad and Tobago Dollar": { + "code": "TTD", + "symbol": "TT$" + }, + "New Taiwan Dollar": { + "code": "TWD", + "symbol": "NT$" + }, + "Tanzanian Shilling": { + "code": "TZS", + "symbol": "" + }, + "Hryvnia": { + "code": "UAH", + "symbol": "\u20B4" + }, + "Uganda Shilling": { + "code": "UGX", + "symbol": "" + }, + "US Dollar": { + "code": "USD", + "symbol": "$" + }, + "Peso Uruguayo": { + "code": "UYU", + "symbol": "$U" + }, + "Uzbekistan Sum": { + "code": "UZS", + "symbol": "\u043B\u0432" + }, + "Bolivar Fuerte": { + "code": "VEF", + "symbol": "Bs" + }, + "Dong": { + "code": "VND", + "symbol": "\u20AB" + }, + "Vatu": { + "code": "VUV", + "symbol": "" + }, + "Tala": { + "code": "WST", + "symbol": "" + }, + "CFA Franc BEAC": { + "code": "XAF", + "symbol": "" + }, + "Silver": { + "code": "XAG", + "symbol": "" + }, + "Gold": { + "code": "XAU", + "symbol": "" + }, + "Bond Markets Units European Composite Unit (EURCO)": { + "code": "XBA", + "symbol": "" + }, + "European Monetary Unit (E.M.U.-6)": { + "code": "XBB", + "symbol": "" + }, + "European Unit of Account 9(E.U.A.-9)": { + "code": "XBC", + "symbol": "" + }, + "European Unit of Account 17(E.U.A.-17)": { + "code": "XBD", + "symbol": "" + }, + "East Caribbean Dollar": { + "code": "XCD", + "symbol": "$" + }, + "SDR": { + "code": "XDR", + "symbol": "" + }, + "UIC-Franc": { + "code": "XFU", + "symbol": "" + }, + "CFA Franc BCEAO": { + "code": "XOF", + "symbol": "" + }, + "Palladium": { + "code": "XPD", + "symbol": "" + }, + "CFP Franc": { + "code": "XPF", + "symbol": "" + }, + "Platinum": { + "code": "XPT", + "symbol": "" + }, + "Codes specifically reserved for testing purposes": { + "code": "XTS", + "symbol": "" + }, + "Yemeni Rial": { + "code": "YER", + "symbol": "\uFDFC" + }, + "Rand": { + "code": "ZAR", + "symbol": "R" + }, + "Lesotho Loti": { + "code": "LSL", + "symbol": "" + }, + "Namibia Dollar": { + "code": "NAD", + "symbol": "N$" + }, + "Zambian Kwacha": { + "code": "ZMK", + "symbol": "" + }, + "Zimbabwe Dollar": { + "code": "ZWL", + "symbol": "" + } + }; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/finance/credit_card/visa.js +var require_visa = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/finance/credit_card/visa.js"(exports2, module2) { + module2["exports"] = [ + "4###########L", + "4###-####-####-###L" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/finance/credit_card/mastercard.js +var require_mastercard = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/finance/credit_card/mastercard.js"(exports2, module2) { + module2["exports"] = [ + "5[1-5]##-####-####-###L", + "6771-89##-####-###L" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/finance/credit_card/discover.js +var require_discover = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/finance/credit_card/discover.js"(exports2, module2) { + module2["exports"] = [ + "6011-####-####-###L", + "65##-####-####-###L", + "64[4-9]#-####-####-###L", + "6011-62##-####-####-###L", + "65##-62##-####-####-###L", + "64[4-9]#-62##-####-####-###L" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/finance/credit_card/american_express.js +var require_american_express = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/finance/credit_card/american_express.js"(exports2, module2) { + module2["exports"] = [ + "34##-######-####L", + "37##-######-####L" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/finance/credit_card/diners_club.js +var require_diners_club = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/finance/credit_card/diners_club.js"(exports2, module2) { + module2["exports"] = [ + "30[0-5]#-######-###L", + "36##-######-###L", + "54##-####-####-###L" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/finance/credit_card/jcb.js +var require_jcb = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/finance/credit_card/jcb.js"(exports2, module2) { + module2["exports"] = [ + "3528-####-####-###L", + "3529-####-####-###L", + "35[3-8]#-####-####-###L" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/finance/credit_card/switch.js +var require_switch = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/finance/credit_card/switch.js"(exports2, module2) { + module2["exports"] = [ + "6759-####-####-###L", + "6759-####-####-####-#L", + "6759-####-####-####-##L" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/finance/credit_card/solo.js +var require_solo = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/finance/credit_card/solo.js"(exports2, module2) { + module2["exports"] = [ + "6767-####-####-###L", + "6767-####-####-####-#L", + "6767-####-####-####-##L" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/finance/credit_card/maestro.js +var require_maestro = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/finance/credit_card/maestro.js"(exports2, module2) { + module2["exports"] = [ + "5018-#{4}-#{4}-#{3}L", + "5020-#{4}-#{4}-#{3}L", + "5038-#{4}-#{4}-#{3}L", + "5893-#{4}-#{4}-#{3}L", + "6304-#{4}-#{4}-#{3}L", + "6759-#{4}-#{4}-#{3}L", + "676[1-3]-####-####-###L", + "5018#{11,15}L", + "5020#{11,15}L", + "5038#{11,15}L", + "5893#{11,15}L", + "6304#{11,15}L", + "6759#{11,15}L", + "676[1-3]#{11,15}L" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/finance/credit_card/laser.js +var require_laser = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/finance/credit_card/laser.js"(exports2, module2) { + module2["exports"] = [ + "6304###########L", + "6706###########L", + "6771###########L", + "6709###########L", + "6304#########{5,6}L", + "6706#########{5,6}L", + "6771#########{5,6}L", + "6709#########{5,6}L" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/finance/credit_card/instapayment.js +var require_instapayment = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/finance/credit_card/instapayment.js"(exports2, module2) { + module2["exports"] = [ + "63[7-9]#-####-####-###L" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/finance/credit_card/index.js +var require_credit_card = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/finance/credit_card/index.js"(exports2, module2) { + var credit_card = {}; + module2["exports"] = credit_card; + credit_card.visa = require_visa(); + credit_card.mastercard = require_mastercard(); + credit_card.discover = require_discover(); + credit_card.american_express = require_american_express(); + credit_card.diners_club = require_diners_club(); + credit_card.jcb = require_jcb(); + credit_card.switch = require_switch(); + credit_card.solo = require_solo(); + credit_card.maestro = require_maestro(); + credit_card.laser = require_laser(); + credit_card.instapayment = require_instapayment(); + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/finance/index.js +var require_finance2 = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/finance/index.js"(exports2, module2) { + var finance = {}; + module2["exports"] = finance; + finance.account_type = require_account_type(); + finance.transaction_type = require_transaction_type(); + finance.currency = require_currency(); + finance.credit_card = require_credit_card(); + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/date/month.js +var require_month = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/date/month.js"(exports2, module2) { + module2["exports"] = { + wide: [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + // Property "wide_context" is optional, if not set then "wide" will be used instead + // It is used to specify a word in context, which may differ from a stand-alone word + wide_context: [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + abbr: [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + // Property "abbr_context" is optional, if not set then "abbr" will be used instead + // It is used to specify a word in context, which may differ from a stand-alone word + abbr_context: [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ] + }; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/date/weekday.js +var require_weekday = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/date/weekday.js"(exports2, module2) { + module2["exports"] = { + wide: [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + // Property "wide_context" is optional, if not set then "wide" will be used instead + // It is used to specify a word in context, which may differ from a stand-alone word + wide_context: [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + abbr: [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ], + // Property "abbr_context" is optional, if not set then "abbr" will be used instead + // It is used to specify a word in context, which may differ from a stand-alone word + abbr_context: [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat" + ] + }; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/date/index.js +var require_date2 = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/date/index.js"(exports2, module2) { + var date = {}; + module2["exports"] = date; + date.month = require_month(); + date.weekday = require_weekday(); + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/system/directoryPaths.js +var require_directoryPaths = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/system/directoryPaths.js"(exports2, module2) { + module2["exports"] = [ + "/Applications", + "/bin", + "/boot", + "/boot/defaults", + "/dev", + "/etc", + "/etc/defaults", + "/etc/mail", + "/etc/namedb", + "/etc/periodic", + "/etc/ppp", + "/home", + "/home/user", + "/home/user/dir", + "/lib", + "/Library", + "/lost+found", + "/media", + "/mnt", + "/net", + "/Network", + "/opt", + "/opt/bin", + "/opt/include", + "/opt/lib", + "/opt/sbin", + "/opt/share", + "/private", + "/private/tmp", + "/private/var", + "/proc", + "/rescue", + "/root", + "/sbin", + "/selinux", + "/srv", + "/sys", + "/System", + "/tmp", + "/Users", + "/usr", + "/usr/X11R6", + "/usr/bin", + "/usr/include", + "/usr/lib", + "/usr/libdata", + "/usr/libexec", + "/usr/local/bin", + "/usr/local/src", + "/usr/obj", + "/usr/ports", + "/usr/sbin", + "/usr/share", + "/usr/src", + "/var", + "/var/log", + "/var/mail", + "/var/spool", + "/var/tmp", + "/var/yp" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/system/mimeTypes.js +var require_mimeTypes = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/system/mimeTypes.js"(exports2, module2) { + module2["exports"] = { + "application/1d-interleaved-parityfec": { + "source": "iana" + }, + "application/3gpdash-qoe-report+xml": { + "source": "iana" + }, + "application/3gpp-ims+xml": { + "source": "iana" + }, + "application/a2l": { + "source": "iana" + }, + "application/activemessage": { + "source": "iana" + }, + "application/alto-costmap+json": { + "source": "iana", + "compressible": true + }, + "application/alto-costmapfilter+json": { + "source": "iana", + "compressible": true + }, + "application/alto-directory+json": { + "source": "iana", + "compressible": true + }, + "application/alto-endpointcost+json": { + "source": "iana", + "compressible": true + }, + "application/alto-endpointcostparams+json": { + "source": "iana", + "compressible": true + }, + "application/alto-endpointprop+json": { + "source": "iana", + "compressible": true + }, + "application/alto-endpointpropparams+json": { + "source": "iana", + "compressible": true + }, + "application/alto-error+json": { + "source": "iana", + "compressible": true + }, + "application/alto-networkmap+json": { + "source": "iana", + "compressible": true + }, + "application/alto-networkmapfilter+json": { + "source": "iana", + "compressible": true + }, + "application/aml": { + "source": "iana" + }, + "application/andrew-inset": { + "source": "iana", + "extensions": ["ez"] + }, + "application/applefile": { + "source": "iana" + }, + "application/applixware": { + "source": "apache", + "extensions": ["aw"] + }, + "application/atf": { + "source": "iana" + }, + "application/atfx": { + "source": "iana" + }, + "application/atom+xml": { + "source": "iana", + "compressible": true, + "extensions": ["atom"] + }, + "application/atomcat+xml": { + "source": "iana", + "extensions": ["atomcat"] + }, + "application/atomdeleted+xml": { + "source": "iana" + }, + "application/atomicmail": { + "source": "iana" + }, + "application/atomsvc+xml": { + "source": "iana", + "extensions": ["atomsvc"] + }, + "application/atxml": { + "source": "iana" + }, + "application/auth-policy+xml": { + "source": "iana" + }, + "application/bacnet-xdd+zip": { + "source": "iana" + }, + "application/batch-smtp": { + "source": "iana" + }, + "application/bdoc": { + "compressible": false, + "extensions": ["bdoc"] + }, + "application/beep+xml": { + "source": "iana" + }, + "application/calendar+json": { + "source": "iana", + "compressible": true + }, + "application/calendar+xml": { + "source": "iana" + }, + "application/call-completion": { + "source": "iana" + }, + "application/cals-1840": { + "source": "iana" + }, + "application/cbor": { + "source": "iana" + }, + "application/ccmp+xml": { + "source": "iana" + }, + "application/ccxml+xml": { + "source": "iana", + "extensions": ["ccxml"] + }, + "application/cdfx+xml": { + "source": "iana" + }, + "application/cdmi-capability": { + "source": "iana", + "extensions": ["cdmia"] + }, + "application/cdmi-container": { + "source": "iana", + "extensions": ["cdmic"] + }, + "application/cdmi-domain": { + "source": "iana", + "extensions": ["cdmid"] + }, + "application/cdmi-object": { + "source": "iana", + "extensions": ["cdmio"] + }, + "application/cdmi-queue": { + "source": "iana", + "extensions": ["cdmiq"] + }, + "application/cdni": { + "source": "iana" + }, + "application/cea": { + "source": "iana" + }, + "application/cea-2018+xml": { + "source": "iana" + }, + "application/cellml+xml": { + "source": "iana" + }, + "application/cfw": { + "source": "iana" + }, + "application/cms": { + "source": "iana" + }, + "application/cnrp+xml": { + "source": "iana" + }, + "application/coap-group+json": { + "source": "iana", + "compressible": true + }, + "application/commonground": { + "source": "iana" + }, + "application/conference-info+xml": { + "source": "iana" + }, + "application/cpl+xml": { + "source": "iana" + }, + "application/csrattrs": { + "source": "iana" + }, + "application/csta+xml": { + "source": "iana" + }, + "application/cstadata+xml": { + "source": "iana" + }, + "application/csvm+json": { + "source": "iana", + "compressible": true + }, + "application/cu-seeme": { + "source": "apache", + "extensions": ["cu"] + }, + "application/cybercash": { + "source": "iana" + }, + "application/dart": { + "compressible": true + }, + "application/dash+xml": { + "source": "iana", + "extensions": ["mdp"] + }, + "application/dashdelta": { + "source": "iana" + }, + "application/davmount+xml": { + "source": "iana", + "extensions": ["davmount"] + }, + "application/dca-rft": { + "source": "iana" + }, + "application/dcd": { + "source": "iana" + }, + "application/dec-dx": { + "source": "iana" + }, + "application/dialog-info+xml": { + "source": "iana" + }, + "application/dicom": { + "source": "iana" + }, + "application/dii": { + "source": "iana" + }, + "application/dit": { + "source": "iana" + }, + "application/dns": { + "source": "iana" + }, + "application/docbook+xml": { + "source": "apache", + "extensions": ["dbk"] + }, + "application/dskpp+xml": { + "source": "iana" + }, + "application/dssc+der": { + "source": "iana", + "extensions": ["dssc"] + }, + "application/dssc+xml": { + "source": "iana", + "extensions": ["xdssc"] + }, + "application/dvcs": { + "source": "iana" + }, + "application/ecmascript": { + "source": "iana", + "compressible": true, + "extensions": ["ecma"] + }, + "application/edi-consent": { + "source": "iana" + }, + "application/edi-x12": { + "source": "iana", + "compressible": false + }, + "application/edifact": { + "source": "iana", + "compressible": false + }, + "application/emergencycalldata.comment+xml": { + "source": "iana" + }, + "application/emergencycalldata.deviceinfo+xml": { + "source": "iana" + }, + "application/emergencycalldata.providerinfo+xml": { + "source": "iana" + }, + "application/emergencycalldata.serviceinfo+xml": { + "source": "iana" + }, + "application/emergencycalldata.subscriberinfo+xml": { + "source": "iana" + }, + "application/emma+xml": { + "source": "iana", + "extensions": ["emma"] + }, + "application/emotionml+xml": { + "source": "iana" + }, + "application/encaprtp": { + "source": "iana" + }, + "application/epp+xml": { + "source": "iana" + }, + "application/epub+zip": { + "source": "iana", + "extensions": ["epub"] + }, + "application/eshop": { + "source": "iana" + }, + "application/exi": { + "source": "iana", + "extensions": ["exi"] + }, + "application/fastinfoset": { + "source": "iana" + }, + "application/fastsoap": { + "source": "iana" + }, + "application/fdt+xml": { + "source": "iana" + }, + "application/fits": { + "source": "iana" + }, + "application/font-sfnt": { + "source": "iana" + }, + "application/font-tdpfr": { + "source": "iana", + "extensions": ["pfr"] + }, + "application/font-woff": { + "source": "iana", + "compressible": false, + "extensions": ["woff"] + }, + "application/font-woff2": { + "compressible": false, + "extensions": ["woff2"] + }, + "application/framework-attributes+xml": { + "source": "iana" + }, + "application/gml+xml": { + "source": "apache", + "extensions": ["gml"] + }, + "application/gpx+xml": { + "source": "apache", + "extensions": ["gpx"] + }, + "application/gxf": { + "source": "apache", + "extensions": ["gxf"] + }, + "application/gzip": { + "source": "iana", + "compressible": false + }, + "application/h224": { + "source": "iana" + }, + "application/held+xml": { + "source": "iana" + }, + "application/http": { + "source": "iana" + }, + "application/hyperstudio": { + "source": "iana", + "extensions": ["stk"] + }, + "application/ibe-key-request+xml": { + "source": "iana" + }, + "application/ibe-pkg-reply+xml": { + "source": "iana" + }, + "application/ibe-pp-data": { + "source": "iana" + }, + "application/iges": { + "source": "iana" + }, + "application/im-iscomposing+xml": { + "source": "iana" + }, + "application/index": { + "source": "iana" + }, + "application/index.cmd": { + "source": "iana" + }, + "application/index.obj": { + "source": "iana" + }, + "application/index.response": { + "source": "iana" + }, + "application/index.vnd": { + "source": "iana" + }, + "application/inkml+xml": { + "source": "iana", + "extensions": ["ink", "inkml"] + }, + "application/iotp": { + "source": "iana" + }, + "application/ipfix": { + "source": "iana", + "extensions": ["ipfix"] + }, + "application/ipp": { + "source": "iana" + }, + "application/isup": { + "source": "iana" + }, + "application/its+xml": { + "source": "iana" + }, + "application/java-archive": { + "source": "apache", + "compressible": false, + "extensions": ["jar", "war", "ear"] + }, + "application/java-serialized-object": { + "source": "apache", + "compressible": false, + "extensions": ["ser"] + }, + "application/java-vm": { + "source": "apache", + "compressible": false, + "extensions": ["class"] + }, + "application/javascript": { + "source": "iana", + "charset": "UTF-8", + "compressible": true, + "extensions": ["js"] + }, + "application/jose": { + "source": "iana" + }, + "application/jose+json": { + "source": "iana", + "compressible": true + }, + "application/jrd+json": { + "source": "iana", + "compressible": true + }, + "application/json": { + "source": "iana", + "charset": "UTF-8", + "compressible": true, + "extensions": ["json", "map"] + }, + "application/json-patch+json": { + "source": "iana", + "compressible": true + }, + "application/json-seq": { + "source": "iana" + }, + "application/json5": { + "extensions": ["json5"] + }, + "application/jsonml+json": { + "source": "apache", + "compressible": true, + "extensions": ["jsonml"] + }, + "application/jwk+json": { + "source": "iana", + "compressible": true + }, + "application/jwk-set+json": { + "source": "iana", + "compressible": true + }, + "application/jwt": { + "source": "iana" + }, + "application/kpml-request+xml": { + "source": "iana" + }, + "application/kpml-response+xml": { + "source": "iana" + }, + "application/ld+json": { + "source": "iana", + "compressible": true, + "extensions": ["jsonld"] + }, + "application/link-format": { + "source": "iana" + }, + "application/load-control+xml": { + "source": "iana" + }, + "application/lost+xml": { + "source": "iana", + "extensions": ["lostxml"] + }, + "application/lostsync+xml": { + "source": "iana" + }, + "application/lxf": { + "source": "iana" + }, + "application/mac-binhex40": { + "source": "iana", + "extensions": ["hqx"] + }, + "application/mac-compactpro": { + "source": "apache", + "extensions": ["cpt"] + }, + "application/macwriteii": { + "source": "iana" + }, + "application/mads+xml": { + "source": "iana", + "extensions": ["mads"] + }, + "application/manifest+json": { + "charset": "UTF-8", + "compressible": true, + "extensions": ["webmanifest"] + }, + "application/marc": { + "source": "iana", + "extensions": ["mrc"] + }, + "application/marcxml+xml": { + "source": "iana", + "extensions": ["mrcx"] + }, + "application/mathematica": { + "source": "iana", + "extensions": ["ma", "nb", "mb"] + }, + "application/mathml+xml": { + "source": "iana", + "extensions": ["mathml"] + }, + "application/mathml-content+xml": { + "source": "iana" + }, + "application/mathml-presentation+xml": { + "source": "iana" + }, + "application/mbms-associated-procedure-description+xml": { + "source": "iana" + }, + "application/mbms-deregister+xml": { + "source": "iana" + }, + "application/mbms-envelope+xml": { + "source": "iana" + }, + "application/mbms-msk+xml": { + "source": "iana" + }, + "application/mbms-msk-response+xml": { + "source": "iana" + }, + "application/mbms-protection-description+xml": { + "source": "iana" + }, + "application/mbms-reception-report+xml": { + "source": "iana" + }, + "application/mbms-register+xml": { + "source": "iana" + }, + "application/mbms-register-response+xml": { + "source": "iana" + }, + "application/mbms-schedule+xml": { + "source": "iana" + }, + "application/mbms-user-service-description+xml": { + "source": "iana" + }, + "application/mbox": { + "source": "iana", + "extensions": ["mbox"] + }, + "application/media-policy-dataset+xml": { + "source": "iana" + }, + "application/media_control+xml": { + "source": "iana" + }, + "application/mediaservercontrol+xml": { + "source": "iana", + "extensions": ["mscml"] + }, + "application/merge-patch+json": { + "source": "iana", + "compressible": true + }, + "application/metalink+xml": { + "source": "apache", + "extensions": ["metalink"] + }, + "application/metalink4+xml": { + "source": "iana", + "extensions": ["meta4"] + }, + "application/mets+xml": { + "source": "iana", + "extensions": ["mets"] + }, + "application/mf4": { + "source": "iana" + }, + "application/mikey": { + "source": "iana" + }, + "application/mods+xml": { + "source": "iana", + "extensions": ["mods"] + }, + "application/moss-keys": { + "source": "iana" + }, + "application/moss-signature": { + "source": "iana" + }, + "application/mosskey-data": { + "source": "iana" + }, + "application/mosskey-request": { + "source": "iana" + }, + "application/mp21": { + "source": "iana", + "extensions": ["m21", "mp21"] + }, + "application/mp4": { + "source": "iana", + "extensions": ["mp4s", "m4p"] + }, + "application/mpeg4-generic": { + "source": "iana" + }, + "application/mpeg4-iod": { + "source": "iana" + }, + "application/mpeg4-iod-xmt": { + "source": "iana" + }, + "application/mrb-consumer+xml": { + "source": "iana" + }, + "application/mrb-publish+xml": { + "source": "iana" + }, + "application/msc-ivr+xml": { + "source": "iana" + }, + "application/msc-mixer+xml": { + "source": "iana" + }, + "application/msword": { + "source": "iana", + "compressible": false, + "extensions": ["doc", "dot"] + }, + "application/mxf": { + "source": "iana", + "extensions": ["mxf"] + }, + "application/nasdata": { + "source": "iana" + }, + "application/news-checkgroups": { + "source": "iana" + }, + "application/news-groupinfo": { + "source": "iana" + }, + "application/news-transmission": { + "source": "iana" + }, + "application/nlsml+xml": { + "source": "iana" + }, + "application/nss": { + "source": "iana" + }, + "application/ocsp-request": { + "source": "iana" + }, + "application/ocsp-response": { + "source": "iana" + }, + "application/octet-stream": { + "source": "iana", + "compressible": false, + "extensions": ["bin", "dms", "lrf", "mar", "so", "dist", "distz", "pkg", "bpk", "dump", "elc", "deploy", "exe", "dll", "deb", "dmg", "iso", "img", "msi", "msp", "msm", "buffer"] + }, + "application/oda": { + "source": "iana", + "extensions": ["oda"] + }, + "application/odx": { + "source": "iana" + }, + "application/oebps-package+xml": { + "source": "iana", + "extensions": ["opf"] + }, + "application/ogg": { + "source": "iana", + "compressible": false, + "extensions": ["ogx"] + }, + "application/omdoc+xml": { + "source": "apache", + "extensions": ["omdoc"] + }, + "application/onenote": { + "source": "apache", + "extensions": ["onetoc", "onetoc2", "onetmp", "onepkg"] + }, + "application/oxps": { + "source": "iana", + "extensions": ["oxps"] + }, + "application/p2p-overlay+xml": { + "source": "iana" + }, + "application/parityfec": { + "source": "iana" + }, + "application/patch-ops-error+xml": { + "source": "iana", + "extensions": ["xer"] + }, + "application/pdf": { + "source": "iana", + "compressible": false, + "extensions": ["pdf"] + }, + "application/pdx": { + "source": "iana" + }, + "application/pgp-encrypted": { + "source": "iana", + "compressible": false, + "extensions": ["pgp"] + }, + "application/pgp-keys": { + "source": "iana" + }, + "application/pgp-signature": { + "source": "iana", + "extensions": ["asc", "sig"] + }, + "application/pics-rules": { + "source": "apache", + "extensions": ["prf"] + }, + "application/pidf+xml": { + "source": "iana" + }, + "application/pidf-diff+xml": { + "source": "iana" + }, + "application/pkcs10": { + "source": "iana", + "extensions": ["p10"] + }, + "application/pkcs12": { + "source": "iana" + }, + "application/pkcs7-mime": { + "source": "iana", + "extensions": ["p7m", "p7c"] + }, + "application/pkcs7-signature": { + "source": "iana", + "extensions": ["p7s"] + }, + "application/pkcs8": { + "source": "iana", + "extensions": ["p8"] + }, + "application/pkix-attr-cert": { + "source": "iana", + "extensions": ["ac"] + }, + "application/pkix-cert": { + "source": "iana", + "extensions": ["cer"] + }, + "application/pkix-crl": { + "source": "iana", + "extensions": ["crl"] + }, + "application/pkix-pkipath": { + "source": "iana", + "extensions": ["pkipath"] + }, + "application/pkixcmp": { + "source": "iana", + "extensions": ["pki"] + }, + "application/pls+xml": { + "source": "iana", + "extensions": ["pls"] + }, + "application/poc-settings+xml": { + "source": "iana" + }, + "application/postscript": { + "source": "iana", + "compressible": true, + "extensions": ["ai", "eps", "ps"] + }, + "application/provenance+xml": { + "source": "iana" + }, + "application/prs.alvestrand.titrax-sheet": { + "source": "iana" + }, + "application/prs.cww": { + "source": "iana", + "extensions": ["cww"] + }, + "application/prs.hpub+zip": { + "source": "iana" + }, + "application/prs.nprend": { + "source": "iana" + }, + "application/prs.plucker": { + "source": "iana" + }, + "application/prs.rdf-xml-crypt": { + "source": "iana" + }, + "application/prs.xsf+xml": { + "source": "iana" + }, + "application/pskc+xml": { + "source": "iana", + "extensions": ["pskcxml"] + }, + "application/qsig": { + "source": "iana" + }, + "application/raptorfec": { + "source": "iana" + }, + "application/rdap+json": { + "source": "iana", + "compressible": true + }, + "application/rdf+xml": { + "source": "iana", + "compressible": true, + "extensions": ["rdf"] + }, + "application/reginfo+xml": { + "source": "iana", + "extensions": ["rif"] + }, + "application/relax-ng-compact-syntax": { + "source": "iana", + "extensions": ["rnc"] + }, + "application/remote-printing": { + "source": "iana" + }, + "application/reputon+json": { + "source": "iana", + "compressible": true + }, + "application/resource-lists+xml": { + "source": "iana", + "extensions": ["rl"] + }, + "application/resource-lists-diff+xml": { + "source": "iana", + "extensions": ["rld"] + }, + "application/rfc+xml": { + "source": "iana" + }, + "application/riscos": { + "source": "iana" + }, + "application/rlmi+xml": { + "source": "iana" + }, + "application/rls-services+xml": { + "source": "iana", + "extensions": ["rs"] + }, + "application/rpki-ghostbusters": { + "source": "iana", + "extensions": ["gbr"] + }, + "application/rpki-manifest": { + "source": "iana", + "extensions": ["mft"] + }, + "application/rpki-roa": { + "source": "iana", + "extensions": ["roa"] + }, + "application/rpki-updown": { + "source": "iana" + }, + "application/rsd+xml": { + "source": "apache", + "extensions": ["rsd"] + }, + "application/rss+xml": { + "source": "apache", + "compressible": true, + "extensions": ["rss"] + }, + "application/rtf": { + "source": "iana", + "compressible": true, + "extensions": ["rtf"] + }, + "application/rtploopback": { + "source": "iana" + }, + "application/rtx": { + "source": "iana" + }, + "application/samlassertion+xml": { + "source": "iana" + }, + "application/samlmetadata+xml": { + "source": "iana" + }, + "application/sbml+xml": { + "source": "iana", + "extensions": ["sbml"] + }, + "application/scaip+xml": { + "source": "iana" + }, + "application/scim+json": { + "source": "iana", + "compressible": true + }, + "application/scvp-cv-request": { + "source": "iana", + "extensions": ["scq"] + }, + "application/scvp-cv-response": { + "source": "iana", + "extensions": ["scs"] + }, + "application/scvp-vp-request": { + "source": "iana", + "extensions": ["spq"] + }, + "application/scvp-vp-response": { + "source": "iana", + "extensions": ["spp"] + }, + "application/sdp": { + "source": "iana", + "extensions": ["sdp"] + }, + "application/sep+xml": { + "source": "iana" + }, + "application/sep-exi": { + "source": "iana" + }, + "application/session-info": { + "source": "iana" + }, + "application/set-payment": { + "source": "iana" + }, + "application/set-payment-initiation": { + "source": "iana", + "extensions": ["setpay"] + }, + "application/set-registration": { + "source": "iana" + }, + "application/set-registration-initiation": { + "source": "iana", + "extensions": ["setreg"] + }, + "application/sgml": { + "source": "iana" + }, + "application/sgml-open-catalog": { + "source": "iana" + }, + "application/shf+xml": { + "source": "iana", + "extensions": ["shf"] + }, + "application/sieve": { + "source": "iana" + }, + "application/simple-filter+xml": { + "source": "iana" + }, + "application/simple-message-summary": { + "source": "iana" + }, + "application/simplesymbolcontainer": { + "source": "iana" + }, + "application/slate": { + "source": "iana" + }, + "application/smil": { + "source": "iana" + }, + "application/smil+xml": { + "source": "iana", + "extensions": ["smi", "smil"] + }, + "application/smpte336m": { + "source": "iana" + }, + "application/soap+fastinfoset": { + "source": "iana" + }, + "application/soap+xml": { + "source": "iana", + "compressible": true + }, + "application/sparql-query": { + "source": "iana", + "extensions": ["rq"] + }, + "application/sparql-results+xml": { + "source": "iana", + "extensions": ["srx"] + }, + "application/spirits-event+xml": { + "source": "iana" + }, + "application/sql": { + "source": "iana" + }, + "application/srgs": { + "source": "iana", + "extensions": ["gram"] + }, + "application/srgs+xml": { + "source": "iana", + "extensions": ["grxml"] + }, + "application/sru+xml": { + "source": "iana", + "extensions": ["sru"] + }, + "application/ssdl+xml": { + "source": "apache", + "extensions": ["ssdl"] + }, + "application/ssml+xml": { + "source": "iana", + "extensions": ["ssml"] + }, + "application/tamp-apex-update": { + "source": "iana" + }, + "application/tamp-apex-update-confirm": { + "source": "iana" + }, + "application/tamp-community-update": { + "source": "iana" + }, + "application/tamp-community-update-confirm": { + "source": "iana" + }, + "application/tamp-error": { + "source": "iana" + }, + "application/tamp-sequence-adjust": { + "source": "iana" + }, + "application/tamp-sequence-adjust-confirm": { + "source": "iana" + }, + "application/tamp-status-query": { + "source": "iana" + }, + "application/tamp-status-response": { + "source": "iana" + }, + "application/tamp-update": { + "source": "iana" + }, + "application/tamp-update-confirm": { + "source": "iana" + }, + "application/tar": { + "compressible": true + }, + "application/tei+xml": { + "source": "iana", + "extensions": ["tei", "teicorpus"] + }, + "application/thraud+xml": { + "source": "iana", + "extensions": ["tfi"] + }, + "application/timestamp-query": { + "source": "iana" + }, + "application/timestamp-reply": { + "source": "iana" + }, + "application/timestamped-data": { + "source": "iana", + "extensions": ["tsd"] + }, + "application/ttml+xml": { + "source": "iana" + }, + "application/tve-trigger": { + "source": "iana" + }, + "application/ulpfec": { + "source": "iana" + }, + "application/urc-grpsheet+xml": { + "source": "iana" + }, + "application/urc-ressheet+xml": { + "source": "iana" + }, + "application/urc-targetdesc+xml": { + "source": "iana" + }, + "application/urc-uisocketdesc+xml": { + "source": "iana" + }, + "application/vcard+json": { + "source": "iana", + "compressible": true + }, + "application/vcard+xml": { + "source": "iana" + }, + "application/vemmi": { + "source": "iana" + }, + "application/vividence.scriptfile": { + "source": "apache" + }, + "application/vnd.3gpp-prose+xml": { + "source": "iana" + }, + "application/vnd.3gpp-prose-pc3ch+xml": { + "source": "iana" + }, + "application/vnd.3gpp.access-transfer-events+xml": { + "source": "iana" + }, + "application/vnd.3gpp.bsf+xml": { + "source": "iana" + }, + "application/vnd.3gpp.mid-call+xml": { + "source": "iana" + }, + "application/vnd.3gpp.pic-bw-large": { + "source": "iana", + "extensions": ["plb"] + }, + "application/vnd.3gpp.pic-bw-small": { + "source": "iana", + "extensions": ["psb"] + }, + "application/vnd.3gpp.pic-bw-var": { + "source": "iana", + "extensions": ["pvb"] + }, + "application/vnd.3gpp.sms": { + "source": "iana" + }, + "application/vnd.3gpp.srvcc-ext+xml": { + "source": "iana" + }, + "application/vnd.3gpp.srvcc-info+xml": { + "source": "iana" + }, + "application/vnd.3gpp.state-and-event-info+xml": { + "source": "iana" + }, + "application/vnd.3gpp.ussd+xml": { + "source": "iana" + }, + "application/vnd.3gpp2.bcmcsinfo+xml": { + "source": "iana" + }, + "application/vnd.3gpp2.sms": { + "source": "iana" + }, + "application/vnd.3gpp2.tcap": { + "source": "iana", + "extensions": ["tcap"] + }, + "application/vnd.3m.post-it-notes": { + "source": "iana", + "extensions": ["pwn"] + }, + "application/vnd.accpac.simply.aso": { + "source": "iana", + "extensions": ["aso"] + }, + "application/vnd.accpac.simply.imp": { + "source": "iana", + "extensions": ["imp"] + }, + "application/vnd.acucobol": { + "source": "iana", + "extensions": ["acu"] + }, + "application/vnd.acucorp": { + "source": "iana", + "extensions": ["atc", "acutc"] + }, + "application/vnd.adobe.air-application-installer-package+zip": { + "source": "apache", + "extensions": ["air"] + }, + "application/vnd.adobe.flash.movie": { + "source": "iana" + }, + "application/vnd.adobe.formscentral.fcdt": { + "source": "iana", + "extensions": ["fcdt"] + }, + "application/vnd.adobe.fxp": { + "source": "iana", + "extensions": ["fxp", "fxpl"] + }, + "application/vnd.adobe.partial-upload": { + "source": "iana" + }, + "application/vnd.adobe.xdp+xml": { + "source": "iana", + "extensions": ["xdp"] + }, + "application/vnd.adobe.xfdf": { + "source": "iana", + "extensions": ["xfdf"] + }, + "application/vnd.aether.imp": { + "source": "iana" + }, + "application/vnd.ah-barcode": { + "source": "iana" + }, + "application/vnd.ahead.space": { + "source": "iana", + "extensions": ["ahead"] + }, + "application/vnd.airzip.filesecure.azf": { + "source": "iana", + "extensions": ["azf"] + }, + "application/vnd.airzip.filesecure.azs": { + "source": "iana", + "extensions": ["azs"] + }, + "application/vnd.amazon.ebook": { + "source": "apache", + "extensions": ["azw"] + }, + "application/vnd.americandynamics.acc": { + "source": "iana", + "extensions": ["acc"] + }, + "application/vnd.amiga.ami": { + "source": "iana", + "extensions": ["ami"] + }, + "application/vnd.amundsen.maze+xml": { + "source": "iana" + }, + "application/vnd.android.package-archive": { + "source": "apache", + "compressible": false, + "extensions": ["apk"] + }, + "application/vnd.anki": { + "source": "iana" + }, + "application/vnd.anser-web-certificate-issue-initiation": { + "source": "iana", + "extensions": ["cii"] + }, + "application/vnd.anser-web-funds-transfer-initiation": { + "source": "apache", + "extensions": ["fti"] + }, + "application/vnd.antix.game-component": { + "source": "iana", + "extensions": ["atx"] + }, + "application/vnd.apache.thrift.binary": { + "source": "iana" + }, + "application/vnd.apache.thrift.compact": { + "source": "iana" + }, + "application/vnd.apache.thrift.json": { + "source": "iana" + }, + "application/vnd.api+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.apple.installer+xml": { + "source": "iana", + "extensions": ["mpkg"] + }, + "application/vnd.apple.mpegurl": { + "source": "iana", + "extensions": ["m3u8"] + }, + "application/vnd.apple.pkpass": { + "compressible": false, + "extensions": ["pkpass"] + }, + "application/vnd.arastra.swi": { + "source": "iana" + }, + "application/vnd.aristanetworks.swi": { + "source": "iana", + "extensions": ["swi"] + }, + "application/vnd.artsquare": { + "source": "iana" + }, + "application/vnd.astraea-software.iota": { + "source": "iana", + "extensions": ["iota"] + }, + "application/vnd.audiograph": { + "source": "iana", + "extensions": ["aep"] + }, + "application/vnd.autopackage": { + "source": "iana" + }, + "application/vnd.avistar+xml": { + "source": "iana" + }, + "application/vnd.balsamiq.bmml+xml": { + "source": "iana" + }, + "application/vnd.balsamiq.bmpr": { + "source": "iana" + }, + "application/vnd.bekitzur-stech+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.biopax.rdf+xml": { + "source": "iana" + }, + "application/vnd.blueice.multipass": { + "source": "iana", + "extensions": ["mpm"] + }, + "application/vnd.bluetooth.ep.oob": { + "source": "iana" + }, + "application/vnd.bluetooth.le.oob": { + "source": "iana" + }, + "application/vnd.bmi": { + "source": "iana", + "extensions": ["bmi"] + }, + "application/vnd.businessobjects": { + "source": "iana", + "extensions": ["rep"] + }, + "application/vnd.cab-jscript": { + "source": "iana" + }, + "application/vnd.canon-cpdl": { + "source": "iana" + }, + "application/vnd.canon-lips": { + "source": "iana" + }, + "application/vnd.cendio.thinlinc.clientconf": { + "source": "iana" + }, + "application/vnd.century-systems.tcp_stream": { + "source": "iana" + }, + "application/vnd.chemdraw+xml": { + "source": "iana", + "extensions": ["cdxml"] + }, + "application/vnd.chipnuts.karaoke-mmd": { + "source": "iana", + "extensions": ["mmd"] + }, + "application/vnd.cinderella": { + "source": "iana", + "extensions": ["cdy"] + }, + "application/vnd.cirpack.isdn-ext": { + "source": "iana" + }, + "application/vnd.citationstyles.style+xml": { + "source": "iana" + }, + "application/vnd.claymore": { + "source": "iana", + "extensions": ["cla"] + }, + "application/vnd.cloanto.rp9": { + "source": "iana", + "extensions": ["rp9"] + }, + "application/vnd.clonk.c4group": { + "source": "iana", + "extensions": ["c4g", "c4d", "c4f", "c4p", "c4u"] + }, + "application/vnd.cluetrust.cartomobile-config": { + "source": "iana", + "extensions": ["c11amc"] + }, + "application/vnd.cluetrust.cartomobile-config-pkg": { + "source": "iana", + "extensions": ["c11amz"] + }, + "application/vnd.coffeescript": { + "source": "iana" + }, + "application/vnd.collection+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.collection.doc+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.collection.next+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.commerce-battelle": { + "source": "iana" + }, + "application/vnd.commonspace": { + "source": "iana", + "extensions": ["csp"] + }, + "application/vnd.contact.cmsg": { + "source": "iana", + "extensions": ["cdbcmsg"] + }, + "application/vnd.cosmocaller": { + "source": "iana", + "extensions": ["cmc"] + }, + "application/vnd.crick.clicker": { + "source": "iana", + "extensions": ["clkx"] + }, + "application/vnd.crick.clicker.keyboard": { + "source": "iana", + "extensions": ["clkk"] + }, + "application/vnd.crick.clicker.palette": { + "source": "iana", + "extensions": ["clkp"] + }, + "application/vnd.crick.clicker.template": { + "source": "iana", + "extensions": ["clkt"] + }, + "application/vnd.crick.clicker.wordbank": { + "source": "iana", + "extensions": ["clkw"] + }, + "application/vnd.criticaltools.wbs+xml": { + "source": "iana", + "extensions": ["wbs"] + }, + "application/vnd.ctc-posml": { + "source": "iana", + "extensions": ["pml"] + }, + "application/vnd.ctct.ws+xml": { + "source": "iana" + }, + "application/vnd.cups-pdf": { + "source": "iana" + }, + "application/vnd.cups-postscript": { + "source": "iana" + }, + "application/vnd.cups-ppd": { + "source": "iana", + "extensions": ["ppd"] + }, + "application/vnd.cups-raster": { + "source": "iana" + }, + "application/vnd.cups-raw": { + "source": "iana" + }, + "application/vnd.curl": { + "source": "iana" + }, + "application/vnd.curl.car": { + "source": "apache", + "extensions": ["car"] + }, + "application/vnd.curl.pcurl": { + "source": "apache", + "extensions": ["pcurl"] + }, + "application/vnd.cyan.dean.root+xml": { + "source": "iana" + }, + "application/vnd.cybank": { + "source": "iana" + }, + "application/vnd.dart": { + "source": "iana", + "compressible": true, + "extensions": ["dart"] + }, + "application/vnd.data-vision.rdz": { + "source": "iana", + "extensions": ["rdz"] + }, + "application/vnd.debian.binary-package": { + "source": "iana" + }, + "application/vnd.dece.data": { + "source": "iana", + "extensions": ["uvf", "uvvf", "uvd", "uvvd"] + }, + "application/vnd.dece.ttml+xml": { + "source": "iana", + "extensions": ["uvt", "uvvt"] + }, + "application/vnd.dece.unspecified": { + "source": "iana", + "extensions": ["uvx", "uvvx"] + }, + "application/vnd.dece.zip": { + "source": "iana", + "extensions": ["uvz", "uvvz"] + }, + "application/vnd.denovo.fcselayout-link": { + "source": "iana", + "extensions": ["fe_launch"] + }, + "application/vnd.desmume-movie": { + "source": "iana" + }, + "application/vnd.dir-bi.plate-dl-nosuffix": { + "source": "iana" + }, + "application/vnd.dm.delegation+xml": { + "source": "iana" + }, + "application/vnd.dna": { + "source": "iana", + "extensions": ["dna"] + }, + "application/vnd.document+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.dolby.mlp": { + "source": "apache", + "extensions": ["mlp"] + }, + "application/vnd.dolby.mobile.1": { + "source": "iana" + }, + "application/vnd.dolby.mobile.2": { + "source": "iana" + }, + "application/vnd.doremir.scorecloud-binary-document": { + "source": "iana" + }, + "application/vnd.dpgraph": { + "source": "iana", + "extensions": ["dpg"] + }, + "application/vnd.dreamfactory": { + "source": "iana", + "extensions": ["dfac"] + }, + "application/vnd.drive+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.ds-keypoint": { + "source": "apache", + "extensions": ["kpxx"] + }, + "application/vnd.dtg.local": { + "source": "iana" + }, + "application/vnd.dtg.local.flash": { + "source": "iana" + }, + "application/vnd.dtg.local.html": { + "source": "iana" + }, + "application/vnd.dvb.ait": { + "source": "iana", + "extensions": ["ait"] + }, + "application/vnd.dvb.dvbj": { + "source": "iana" + }, + "application/vnd.dvb.esgcontainer": { + "source": "iana" + }, + "application/vnd.dvb.ipdcdftnotifaccess": { + "source": "iana" + }, + "application/vnd.dvb.ipdcesgaccess": { + "source": "iana" + }, + "application/vnd.dvb.ipdcesgaccess2": { + "source": "iana" + }, + "application/vnd.dvb.ipdcesgpdd": { + "source": "iana" + }, + "application/vnd.dvb.ipdcroaming": { + "source": "iana" + }, + "application/vnd.dvb.iptv.alfec-base": { + "source": "iana" + }, + "application/vnd.dvb.iptv.alfec-enhancement": { + "source": "iana" + }, + "application/vnd.dvb.notif-aggregate-root+xml": { + "source": "iana" + }, + "application/vnd.dvb.notif-container+xml": { + "source": "iana" + }, + "application/vnd.dvb.notif-generic+xml": { + "source": "iana" + }, + "application/vnd.dvb.notif-ia-msglist+xml": { + "source": "iana" + }, + "application/vnd.dvb.notif-ia-registration-request+xml": { + "source": "iana" + }, + "application/vnd.dvb.notif-ia-registration-response+xml": { + "source": "iana" + }, + "application/vnd.dvb.notif-init+xml": { + "source": "iana" + }, + "application/vnd.dvb.pfr": { + "source": "iana" + }, + "application/vnd.dvb.service": { + "source": "iana", + "extensions": ["svc"] + }, + "application/vnd.dxr": { + "source": "iana" + }, + "application/vnd.dynageo": { + "source": "iana", + "extensions": ["geo"] + }, + "application/vnd.dzr": { + "source": "iana" + }, + "application/vnd.easykaraoke.cdgdownload": { + "source": "iana" + }, + "application/vnd.ecdis-update": { + "source": "iana" + }, + "application/vnd.ecowin.chart": { + "source": "iana", + "extensions": ["mag"] + }, + "application/vnd.ecowin.filerequest": { + "source": "iana" + }, + "application/vnd.ecowin.fileupdate": { + "source": "iana" + }, + "application/vnd.ecowin.series": { + "source": "iana" + }, + "application/vnd.ecowin.seriesrequest": { + "source": "iana" + }, + "application/vnd.ecowin.seriesupdate": { + "source": "iana" + }, + "application/vnd.emclient.accessrequest+xml": { + "source": "iana" + }, + "application/vnd.enliven": { + "source": "iana", + "extensions": ["nml"] + }, + "application/vnd.enphase.envoy": { + "source": "iana" + }, + "application/vnd.eprints.data+xml": { + "source": "iana" + }, + "application/vnd.epson.esf": { + "source": "iana", + "extensions": ["esf"] + }, + "application/vnd.epson.msf": { + "source": "iana", + "extensions": ["msf"] + }, + "application/vnd.epson.quickanime": { + "source": "iana", + "extensions": ["qam"] + }, + "application/vnd.epson.salt": { + "source": "iana", + "extensions": ["slt"] + }, + "application/vnd.epson.ssf": { + "source": "iana", + "extensions": ["ssf"] + }, + "application/vnd.ericsson.quickcall": { + "source": "iana" + }, + "application/vnd.eszigno3+xml": { + "source": "iana", + "extensions": ["es3", "et3"] + }, + "application/vnd.etsi.aoc+xml": { + "source": "iana" + }, + "application/vnd.etsi.asic-e+zip": { + "source": "iana" + }, + "application/vnd.etsi.asic-s+zip": { + "source": "iana" + }, + "application/vnd.etsi.cug+xml": { + "source": "iana" + }, + "application/vnd.etsi.iptvcommand+xml": { + "source": "iana" + }, + "application/vnd.etsi.iptvdiscovery+xml": { + "source": "iana" + }, + "application/vnd.etsi.iptvprofile+xml": { + "source": "iana" + }, + "application/vnd.etsi.iptvsad-bc+xml": { + "source": "iana" + }, + "application/vnd.etsi.iptvsad-cod+xml": { + "source": "iana" + }, + "application/vnd.etsi.iptvsad-npvr+xml": { + "source": "iana" + }, + "application/vnd.etsi.iptvservice+xml": { + "source": "iana" + }, + "application/vnd.etsi.iptvsync+xml": { + "source": "iana" + }, + "application/vnd.etsi.iptvueprofile+xml": { + "source": "iana" + }, + "application/vnd.etsi.mcid+xml": { + "source": "iana" + }, + "application/vnd.etsi.mheg5": { + "source": "iana" + }, + "application/vnd.etsi.overload-control-policy-dataset+xml": { + "source": "iana" + }, + "application/vnd.etsi.pstn+xml": { + "source": "iana" + }, + "application/vnd.etsi.sci+xml": { + "source": "iana" + }, + "application/vnd.etsi.simservs+xml": { + "source": "iana" + }, + "application/vnd.etsi.timestamp-token": { + "source": "iana" + }, + "application/vnd.etsi.tsl+xml": { + "source": "iana" + }, + "application/vnd.etsi.tsl.der": { + "source": "iana" + }, + "application/vnd.eudora.data": { + "source": "iana" + }, + "application/vnd.ezpix-album": { + "source": "iana", + "extensions": ["ez2"] + }, + "application/vnd.ezpix-package": { + "source": "iana", + "extensions": ["ez3"] + }, + "application/vnd.f-secure.mobile": { + "source": "iana" + }, + "application/vnd.fastcopy-disk-image": { + "source": "iana" + }, + "application/vnd.fdf": { + "source": "iana", + "extensions": ["fdf"] + }, + "application/vnd.fdsn.mseed": { + "source": "iana", + "extensions": ["mseed"] + }, + "application/vnd.fdsn.seed": { + "source": "iana", + "extensions": ["seed", "dataless"] + }, + "application/vnd.ffsns": { + "source": "iana" + }, + "application/vnd.filmit.zfc": { + "source": "iana" + }, + "application/vnd.fints": { + "source": "iana" + }, + "application/vnd.firemonkeys.cloudcell": { + "source": "iana" + }, + "application/vnd.flographit": { + "source": "iana", + "extensions": ["gph"] + }, + "application/vnd.fluxtime.clip": { + "source": "iana", + "extensions": ["ftc"] + }, + "application/vnd.font-fontforge-sfd": { + "source": "iana" + }, + "application/vnd.framemaker": { + "source": "iana", + "extensions": ["fm", "frame", "maker", "book"] + }, + "application/vnd.frogans.fnc": { + "source": "iana", + "extensions": ["fnc"] + }, + "application/vnd.frogans.ltf": { + "source": "iana", + "extensions": ["ltf"] + }, + "application/vnd.fsc.weblaunch": { + "source": "iana", + "extensions": ["fsc"] + }, + "application/vnd.fujitsu.oasys": { + "source": "iana", + "extensions": ["oas"] + }, + "application/vnd.fujitsu.oasys2": { + "source": "iana", + "extensions": ["oa2"] + }, + "application/vnd.fujitsu.oasys3": { + "source": "iana", + "extensions": ["oa3"] + }, + "application/vnd.fujitsu.oasysgp": { + "source": "iana", + "extensions": ["fg5"] + }, + "application/vnd.fujitsu.oasysprs": { + "source": "iana", + "extensions": ["bh2"] + }, + "application/vnd.fujixerox.art-ex": { + "source": "iana" + }, + "application/vnd.fujixerox.art4": { + "source": "iana" + }, + "application/vnd.fujixerox.ddd": { + "source": "iana", + "extensions": ["ddd"] + }, + "application/vnd.fujixerox.docuworks": { + "source": "iana", + "extensions": ["xdw"] + }, + "application/vnd.fujixerox.docuworks.binder": { + "source": "iana", + "extensions": ["xbd"] + }, + "application/vnd.fujixerox.docuworks.container": { + "source": "iana" + }, + "application/vnd.fujixerox.hbpl": { + "source": "iana" + }, + "application/vnd.fut-misnet": { + "source": "iana" + }, + "application/vnd.fuzzysheet": { + "source": "iana", + "extensions": ["fzs"] + }, + "application/vnd.genomatix.tuxedo": { + "source": "iana", + "extensions": ["txd"] + }, + "application/vnd.geo+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.geocube+xml": { + "source": "iana" + }, + "application/vnd.geogebra.file": { + "source": "iana", + "extensions": ["ggb"] + }, + "application/vnd.geogebra.tool": { + "source": "iana", + "extensions": ["ggt"] + }, + "application/vnd.geometry-explorer": { + "source": "iana", + "extensions": ["gex", "gre"] + }, + "application/vnd.geonext": { + "source": "iana", + "extensions": ["gxt"] + }, + "application/vnd.geoplan": { + "source": "iana", + "extensions": ["g2w"] + }, + "application/vnd.geospace": { + "source": "iana", + "extensions": ["g3w"] + }, + "application/vnd.gerber": { + "source": "iana" + }, + "application/vnd.globalplatform.card-content-mgt": { + "source": "iana" + }, + "application/vnd.globalplatform.card-content-mgt-response": { + "source": "iana" + }, + "application/vnd.gmx": { + "source": "iana", + "extensions": ["gmx"] + }, + "application/vnd.google-apps.document": { + "compressible": false, + "extensions": ["gdoc"] + }, + "application/vnd.google-apps.presentation": { + "compressible": false, + "extensions": ["gslides"] + }, + "application/vnd.google-apps.spreadsheet": { + "compressible": false, + "extensions": ["gsheet"] + }, + "application/vnd.google-earth.kml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["kml"] + }, + "application/vnd.google-earth.kmz": { + "source": "iana", + "compressible": false, + "extensions": ["kmz"] + }, + "application/vnd.gov.sk.e-form+xml": { + "source": "iana" + }, + "application/vnd.gov.sk.e-form+zip": { + "source": "iana" + }, + "application/vnd.gov.sk.xmldatacontainer+xml": { + "source": "iana" + }, + "application/vnd.grafeq": { + "source": "iana", + "extensions": ["gqf", "gqs"] + }, + "application/vnd.gridmp": { + "source": "iana" + }, + "application/vnd.groove-account": { + "source": "iana", + "extensions": ["gac"] + }, + "application/vnd.groove-help": { + "source": "iana", + "extensions": ["ghf"] + }, + "application/vnd.groove-identity-message": { + "source": "iana", + "extensions": ["gim"] + }, + "application/vnd.groove-injector": { + "source": "iana", + "extensions": ["grv"] + }, + "application/vnd.groove-tool-message": { + "source": "iana", + "extensions": ["gtm"] + }, + "application/vnd.groove-tool-template": { + "source": "iana", + "extensions": ["tpl"] + }, + "application/vnd.groove-vcard": { + "source": "iana", + "extensions": ["vcg"] + }, + "application/vnd.hal+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.hal+xml": { + "source": "iana", + "extensions": ["hal"] + }, + "application/vnd.handheld-entertainment+xml": { + "source": "iana", + "extensions": ["zmm"] + }, + "application/vnd.hbci": { + "source": "iana", + "extensions": ["hbci"] + }, + "application/vnd.hcl-bireports": { + "source": "iana" + }, + "application/vnd.heroku+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.hhe.lesson-player": { + "source": "iana", + "extensions": ["les"] + }, + "application/vnd.hp-hpgl": { + "source": "iana", + "extensions": ["hpgl"] + }, + "application/vnd.hp-hpid": { + "source": "iana", + "extensions": ["hpid"] + }, + "application/vnd.hp-hps": { + "source": "iana", + "extensions": ["hps"] + }, + "application/vnd.hp-jlyt": { + "source": "iana", + "extensions": ["jlt"] + }, + "application/vnd.hp-pcl": { + "source": "iana", + "extensions": ["pcl"] + }, + "application/vnd.hp-pclxl": { + "source": "iana", + "extensions": ["pclxl"] + }, + "application/vnd.httphone": { + "source": "iana" + }, + "application/vnd.hydrostatix.sof-data": { + "source": "iana", + "extensions": ["sfd-hdstx"] + }, + "application/vnd.hyperdrive+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.hzn-3d-crossword": { + "source": "iana" + }, + "application/vnd.ibm.afplinedata": { + "source": "iana" + }, + "application/vnd.ibm.electronic-media": { + "source": "iana" + }, + "application/vnd.ibm.minipay": { + "source": "iana", + "extensions": ["mpy"] + }, + "application/vnd.ibm.modcap": { + "source": "iana", + "extensions": ["afp", "listafp", "list3820"] + }, + "application/vnd.ibm.rights-management": { + "source": "iana", + "extensions": ["irm"] + }, + "application/vnd.ibm.secure-container": { + "source": "iana", + "extensions": ["sc"] + }, + "application/vnd.iccprofile": { + "source": "iana", + "extensions": ["icc", "icm"] + }, + "application/vnd.ieee.1905": { + "source": "iana" + }, + "application/vnd.igloader": { + "source": "iana", + "extensions": ["igl"] + }, + "application/vnd.immervision-ivp": { + "source": "iana", + "extensions": ["ivp"] + }, + "application/vnd.immervision-ivu": { + "source": "iana", + "extensions": ["ivu"] + }, + "application/vnd.ims.imsccv1p1": { + "source": "iana" + }, + "application/vnd.ims.imsccv1p2": { + "source": "iana" + }, + "application/vnd.ims.imsccv1p3": { + "source": "iana" + }, + "application/vnd.ims.lis.v2.result+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.ims.lti.v2.toolconsumerprofile+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.ims.lti.v2.toolproxy+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.ims.lti.v2.toolproxy.id+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.ims.lti.v2.toolsettings+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.ims.lti.v2.toolsettings.simple+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.informedcontrol.rms+xml": { + "source": "iana" + }, + "application/vnd.informix-visionary": { + "source": "iana" + }, + "application/vnd.infotech.project": { + "source": "iana" + }, + "application/vnd.infotech.project+xml": { + "source": "iana" + }, + "application/vnd.innopath.wamp.notification": { + "source": "iana" + }, + "application/vnd.insors.igm": { + "source": "iana", + "extensions": ["igm"] + }, + "application/vnd.intercon.formnet": { + "source": "iana", + "extensions": ["xpw", "xpx"] + }, + "application/vnd.intergeo": { + "source": "iana", + "extensions": ["i2g"] + }, + "application/vnd.intertrust.digibox": { + "source": "iana" + }, + "application/vnd.intertrust.nncp": { + "source": "iana" + }, + "application/vnd.intu.qbo": { + "source": "iana", + "extensions": ["qbo"] + }, + "application/vnd.intu.qfx": { + "source": "iana", + "extensions": ["qfx"] + }, + "application/vnd.iptc.g2.catalogitem+xml": { + "source": "iana" + }, + "application/vnd.iptc.g2.conceptitem+xml": { + "source": "iana" + }, + "application/vnd.iptc.g2.knowledgeitem+xml": { + "source": "iana" + }, + "application/vnd.iptc.g2.newsitem+xml": { + "source": "iana" + }, + "application/vnd.iptc.g2.newsmessage+xml": { + "source": "iana" + }, + "application/vnd.iptc.g2.packageitem+xml": { + "source": "iana" + }, + "application/vnd.iptc.g2.planningitem+xml": { + "source": "iana" + }, + "application/vnd.ipunplugged.rcprofile": { + "source": "iana", + "extensions": ["rcprofile"] + }, + "application/vnd.irepository.package+xml": { + "source": "iana", + "extensions": ["irp"] + }, + "application/vnd.is-xpr": { + "source": "iana", + "extensions": ["xpr"] + }, + "application/vnd.isac.fcs": { + "source": "iana", + "extensions": ["fcs"] + }, + "application/vnd.jam": { + "source": "iana", + "extensions": ["jam"] + }, + "application/vnd.japannet-directory-service": { + "source": "iana" + }, + "application/vnd.japannet-jpnstore-wakeup": { + "source": "iana" + }, + "application/vnd.japannet-payment-wakeup": { + "source": "iana" + }, + "application/vnd.japannet-registration": { + "source": "iana" + }, + "application/vnd.japannet-registration-wakeup": { + "source": "iana" + }, + "application/vnd.japannet-setstore-wakeup": { + "source": "iana" + }, + "application/vnd.japannet-verification": { + "source": "iana" + }, + "application/vnd.japannet-verification-wakeup": { + "source": "iana" + }, + "application/vnd.jcp.javame.midlet-rms": { + "source": "iana", + "extensions": ["rms"] + }, + "application/vnd.jisp": { + "source": "iana", + "extensions": ["jisp"] + }, + "application/vnd.joost.joda-archive": { + "source": "iana", + "extensions": ["joda"] + }, + "application/vnd.jsk.isdn-ngn": { + "source": "iana" + }, + "application/vnd.kahootz": { + "source": "iana", + "extensions": ["ktz", "ktr"] + }, + "application/vnd.kde.karbon": { + "source": "iana", + "extensions": ["karbon"] + }, + "application/vnd.kde.kchart": { + "source": "iana", + "extensions": ["chrt"] + }, + "application/vnd.kde.kformula": { + "source": "iana", + "extensions": ["kfo"] + }, + "application/vnd.kde.kivio": { + "source": "iana", + "extensions": ["flw"] + }, + "application/vnd.kde.kontour": { + "source": "iana", + "extensions": ["kon"] + }, + "application/vnd.kde.kpresenter": { + "source": "iana", + "extensions": ["kpr", "kpt"] + }, + "application/vnd.kde.kspread": { + "source": "iana", + "extensions": ["ksp"] + }, + "application/vnd.kde.kword": { + "source": "iana", + "extensions": ["kwd", "kwt"] + }, + "application/vnd.kenameaapp": { + "source": "iana", + "extensions": ["htke"] + }, + "application/vnd.kidspiration": { + "source": "iana", + "extensions": ["kia"] + }, + "application/vnd.kinar": { + "source": "iana", + "extensions": ["kne", "knp"] + }, + "application/vnd.koan": { + "source": "iana", + "extensions": ["skp", "skd", "skt", "skm"] + }, + "application/vnd.kodak-descriptor": { + "source": "iana", + "extensions": ["sse"] + }, + "application/vnd.las.las+xml": { + "source": "iana", + "extensions": ["lasxml"] + }, + "application/vnd.liberty-request+xml": { + "source": "iana" + }, + "application/vnd.llamagraphics.life-balance.desktop": { + "source": "iana", + "extensions": ["lbd"] + }, + "application/vnd.llamagraphics.life-balance.exchange+xml": { + "source": "iana", + "extensions": ["lbe"] + }, + "application/vnd.lotus-1-2-3": { + "source": "iana", + "extensions": ["123"] + }, + "application/vnd.lotus-approach": { + "source": "iana", + "extensions": ["apr"] + }, + "application/vnd.lotus-freelance": { + "source": "iana", + "extensions": ["pre"] + }, + "application/vnd.lotus-notes": { + "source": "iana", + "extensions": ["nsf"] + }, + "application/vnd.lotus-organizer": { + "source": "iana", + "extensions": ["org"] + }, + "application/vnd.lotus-screencam": { + "source": "iana", + "extensions": ["scm"] + }, + "application/vnd.lotus-wordpro": { + "source": "iana", + "extensions": ["lwp"] + }, + "application/vnd.macports.portpkg": { + "source": "iana", + "extensions": ["portpkg"] + }, + "application/vnd.mapbox-vector-tile": { + "source": "iana" + }, + "application/vnd.marlin.drm.actiontoken+xml": { + "source": "iana" + }, + "application/vnd.marlin.drm.conftoken+xml": { + "source": "iana" + }, + "application/vnd.marlin.drm.license+xml": { + "source": "iana" + }, + "application/vnd.marlin.drm.mdcf": { + "source": "iana" + }, + "application/vnd.mason+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.maxmind.maxmind-db": { + "source": "iana" + }, + "application/vnd.mcd": { + "source": "iana", + "extensions": ["mcd"] + }, + "application/vnd.medcalcdata": { + "source": "iana", + "extensions": ["mc1"] + }, + "application/vnd.mediastation.cdkey": { + "source": "iana", + "extensions": ["cdkey"] + }, + "application/vnd.meridian-slingshot": { + "source": "iana" + }, + "application/vnd.mfer": { + "source": "iana", + "extensions": ["mwf"] + }, + "application/vnd.mfmp": { + "source": "iana", + "extensions": ["mfm"] + }, + "application/vnd.micro+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.micrografx.flo": { + "source": "iana", + "extensions": ["flo"] + }, + "application/vnd.micrografx.igx": { + "source": "iana", + "extensions": ["igx"] + }, + "application/vnd.microsoft.portable-executable": { + "source": "iana" + }, + "application/vnd.miele+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.mif": { + "source": "iana", + "extensions": ["mif"] + }, + "application/vnd.minisoft-hp3000-save": { + "source": "iana" + }, + "application/vnd.mitsubishi.misty-guard.trustweb": { + "source": "iana" + }, + "application/vnd.mobius.daf": { + "source": "iana", + "extensions": ["daf"] + }, + "application/vnd.mobius.dis": { + "source": "iana", + "extensions": ["dis"] + }, + "application/vnd.mobius.mbk": { + "source": "iana", + "extensions": ["mbk"] + }, + "application/vnd.mobius.mqy": { + "source": "iana", + "extensions": ["mqy"] + }, + "application/vnd.mobius.msl": { + "source": "iana", + "extensions": ["msl"] + }, + "application/vnd.mobius.plc": { + "source": "iana", + "extensions": ["plc"] + }, + "application/vnd.mobius.txf": { + "source": "iana", + "extensions": ["txf"] + }, + "application/vnd.mophun.application": { + "source": "iana", + "extensions": ["mpn"] + }, + "application/vnd.mophun.certificate": { + "source": "iana", + "extensions": ["mpc"] + }, + "application/vnd.motorola.flexsuite": { + "source": "iana" + }, + "application/vnd.motorola.flexsuite.adsi": { + "source": "iana" + }, + "application/vnd.motorola.flexsuite.fis": { + "source": "iana" + }, + "application/vnd.motorola.flexsuite.gotap": { + "source": "iana" + }, + "application/vnd.motorola.flexsuite.kmr": { + "source": "iana" + }, + "application/vnd.motorola.flexsuite.ttc": { + "source": "iana" + }, + "application/vnd.motorola.flexsuite.wem": { + "source": "iana" + }, + "application/vnd.motorola.iprm": { + "source": "iana" + }, + "application/vnd.mozilla.xul+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xul"] + }, + "application/vnd.ms-3mfdocument": { + "source": "iana" + }, + "application/vnd.ms-artgalry": { + "source": "iana", + "extensions": ["cil"] + }, + "application/vnd.ms-asf": { + "source": "iana" + }, + "application/vnd.ms-cab-compressed": { + "source": "iana", + "extensions": ["cab"] + }, + "application/vnd.ms-color.iccprofile": { + "source": "apache" + }, + "application/vnd.ms-excel": { + "source": "iana", + "compressible": false, + "extensions": ["xls", "xlm", "xla", "xlc", "xlt", "xlw"] + }, + "application/vnd.ms-excel.addin.macroenabled.12": { + "source": "iana", + "extensions": ["xlam"] + }, + "application/vnd.ms-excel.sheet.binary.macroenabled.12": { + "source": "iana", + "extensions": ["xlsb"] + }, + "application/vnd.ms-excel.sheet.macroenabled.12": { + "source": "iana", + "extensions": ["xlsm"] + }, + "application/vnd.ms-excel.template.macroenabled.12": { + "source": "iana", + "extensions": ["xltm"] + }, + "application/vnd.ms-fontobject": { + "source": "iana", + "compressible": true, + "extensions": ["eot"] + }, + "application/vnd.ms-htmlhelp": { + "source": "iana", + "extensions": ["chm"] + }, + "application/vnd.ms-ims": { + "source": "iana", + "extensions": ["ims"] + }, + "application/vnd.ms-lrm": { + "source": "iana", + "extensions": ["lrm"] + }, + "application/vnd.ms-office.activex+xml": { + "source": "iana" + }, + "application/vnd.ms-officetheme": { + "source": "iana", + "extensions": ["thmx"] + }, + "application/vnd.ms-opentype": { + "source": "apache", + "compressible": true + }, + "application/vnd.ms-package.obfuscated-opentype": { + "source": "apache" + }, + "application/vnd.ms-pki.seccat": { + "source": "apache", + "extensions": ["cat"] + }, + "application/vnd.ms-pki.stl": { + "source": "apache", + "extensions": ["stl"] + }, + "application/vnd.ms-playready.initiator+xml": { + "source": "iana" + }, + "application/vnd.ms-powerpoint": { + "source": "iana", + "compressible": false, + "extensions": ["ppt", "pps", "pot"] + }, + "application/vnd.ms-powerpoint.addin.macroenabled.12": { + "source": "iana", + "extensions": ["ppam"] + }, + "application/vnd.ms-powerpoint.presentation.macroenabled.12": { + "source": "iana", + "extensions": ["pptm"] + }, + "application/vnd.ms-powerpoint.slide.macroenabled.12": { + "source": "iana", + "extensions": ["sldm"] + }, + "application/vnd.ms-powerpoint.slideshow.macroenabled.12": { + "source": "iana", + "extensions": ["ppsm"] + }, + "application/vnd.ms-powerpoint.template.macroenabled.12": { + "source": "iana", + "extensions": ["potm"] + }, + "application/vnd.ms-printdevicecapabilities+xml": { + "source": "iana" + }, + "application/vnd.ms-printing.printticket+xml": { + "source": "apache" + }, + "application/vnd.ms-project": { + "source": "iana", + "extensions": ["mpp", "mpt"] + }, + "application/vnd.ms-tnef": { + "source": "iana" + }, + "application/vnd.ms-windows.devicepairing": { + "source": "iana" + }, + "application/vnd.ms-windows.nwprinting.oob": { + "source": "iana" + }, + "application/vnd.ms-windows.printerpairing": { + "source": "iana" + }, + "application/vnd.ms-windows.wsd.oob": { + "source": "iana" + }, + "application/vnd.ms-wmdrm.lic-chlg-req": { + "source": "iana" + }, + "application/vnd.ms-wmdrm.lic-resp": { + "source": "iana" + }, + "application/vnd.ms-wmdrm.meter-chlg-req": { + "source": "iana" + }, + "application/vnd.ms-wmdrm.meter-resp": { + "source": "iana" + }, + "application/vnd.ms-word.document.macroenabled.12": { + "source": "iana", + "extensions": ["docm"] + }, + "application/vnd.ms-word.template.macroenabled.12": { + "source": "iana", + "extensions": ["dotm"] + }, + "application/vnd.ms-works": { + "source": "iana", + "extensions": ["wps", "wks", "wcm", "wdb"] + }, + "application/vnd.ms-wpl": { + "source": "iana", + "extensions": ["wpl"] + }, + "application/vnd.ms-xpsdocument": { + "source": "iana", + "compressible": false, + "extensions": ["xps"] + }, + "application/vnd.msa-disk-image": { + "source": "iana" + }, + "application/vnd.mseq": { + "source": "iana", + "extensions": ["mseq"] + }, + "application/vnd.msign": { + "source": "iana" + }, + "application/vnd.multiad.creator": { + "source": "iana" + }, + "application/vnd.multiad.creator.cif": { + "source": "iana" + }, + "application/vnd.music-niff": { + "source": "iana" + }, + "application/vnd.musician": { + "source": "iana", + "extensions": ["mus"] + }, + "application/vnd.muvee.style": { + "source": "iana", + "extensions": ["msty"] + }, + "application/vnd.mynfc": { + "source": "iana", + "extensions": ["taglet"] + }, + "application/vnd.ncd.control": { + "source": "iana" + }, + "application/vnd.ncd.reference": { + "source": "iana" + }, + "application/vnd.nervana": { + "source": "iana" + }, + "application/vnd.netfpx": { + "source": "iana" + }, + "application/vnd.neurolanguage.nlu": { + "source": "iana", + "extensions": ["nlu"] + }, + "application/vnd.nintendo.nitro.rom": { + "source": "iana" + }, + "application/vnd.nintendo.snes.rom": { + "source": "iana" + }, + "application/vnd.nitf": { + "source": "iana", + "extensions": ["ntf", "nitf"] + }, + "application/vnd.noblenet-directory": { + "source": "iana", + "extensions": ["nnd"] + }, + "application/vnd.noblenet-sealer": { + "source": "iana", + "extensions": ["nns"] + }, + "application/vnd.noblenet-web": { + "source": "iana", + "extensions": ["nnw"] + }, + "application/vnd.nokia.catalogs": { + "source": "iana" + }, + "application/vnd.nokia.conml+wbxml": { + "source": "iana" + }, + "application/vnd.nokia.conml+xml": { + "source": "iana" + }, + "application/vnd.nokia.iptv.config+xml": { + "source": "iana" + }, + "application/vnd.nokia.isds-radio-presets": { + "source": "iana" + }, + "application/vnd.nokia.landmark+wbxml": { + "source": "iana" + }, + "application/vnd.nokia.landmark+xml": { + "source": "iana" + }, + "application/vnd.nokia.landmarkcollection+xml": { + "source": "iana" + }, + "application/vnd.nokia.n-gage.ac+xml": { + "source": "iana" + }, + "application/vnd.nokia.n-gage.data": { + "source": "iana", + "extensions": ["ngdat"] + }, + "application/vnd.nokia.n-gage.symbian.install": { + "source": "iana", + "extensions": ["n-gage"] + }, + "application/vnd.nokia.ncd": { + "source": "iana" + }, + "application/vnd.nokia.pcd+wbxml": { + "source": "iana" + }, + "application/vnd.nokia.pcd+xml": { + "source": "iana" + }, + "application/vnd.nokia.radio-preset": { + "source": "iana", + "extensions": ["rpst"] + }, + "application/vnd.nokia.radio-presets": { + "source": "iana", + "extensions": ["rpss"] + }, + "application/vnd.novadigm.edm": { + "source": "iana", + "extensions": ["edm"] + }, + "application/vnd.novadigm.edx": { + "source": "iana", + "extensions": ["edx"] + }, + "application/vnd.novadigm.ext": { + "source": "iana", + "extensions": ["ext"] + }, + "application/vnd.ntt-local.content-share": { + "source": "iana" + }, + "application/vnd.ntt-local.file-transfer": { + "source": "iana" + }, + "application/vnd.ntt-local.ogw_remote-access": { + "source": "iana" + }, + "application/vnd.ntt-local.sip-ta_remote": { + "source": "iana" + }, + "application/vnd.ntt-local.sip-ta_tcp_stream": { + "source": "iana" + }, + "application/vnd.oasis.opendocument.chart": { + "source": "iana", + "extensions": ["odc"] + }, + "application/vnd.oasis.opendocument.chart-template": { + "source": "iana", + "extensions": ["otc"] + }, + "application/vnd.oasis.opendocument.database": { + "source": "iana", + "extensions": ["odb"] + }, + "application/vnd.oasis.opendocument.formula": { + "source": "iana", + "extensions": ["odf"] + }, + "application/vnd.oasis.opendocument.formula-template": { + "source": "iana", + "extensions": ["odft"] + }, + "application/vnd.oasis.opendocument.graphics": { + "source": "iana", + "compressible": false, + "extensions": ["odg"] + }, + "application/vnd.oasis.opendocument.graphics-template": { + "source": "iana", + "extensions": ["otg"] + }, + "application/vnd.oasis.opendocument.image": { + "source": "iana", + "extensions": ["odi"] + }, + "application/vnd.oasis.opendocument.image-template": { + "source": "iana", + "extensions": ["oti"] + }, + "application/vnd.oasis.opendocument.presentation": { + "source": "iana", + "compressible": false, + "extensions": ["odp"] + }, + "application/vnd.oasis.opendocument.presentation-template": { + "source": "iana", + "extensions": ["otp"] + }, + "application/vnd.oasis.opendocument.spreadsheet": { + "source": "iana", + "compressible": false, + "extensions": ["ods"] + }, + "application/vnd.oasis.opendocument.spreadsheet-template": { + "source": "iana", + "extensions": ["ots"] + }, + "application/vnd.oasis.opendocument.text": { + "source": "iana", + "compressible": false, + "extensions": ["odt"] + }, + "application/vnd.oasis.opendocument.text-master": { + "source": "iana", + "extensions": ["odm"] + }, + "application/vnd.oasis.opendocument.text-template": { + "source": "iana", + "extensions": ["ott"] + }, + "application/vnd.oasis.opendocument.text-web": { + "source": "iana", + "extensions": ["oth"] + }, + "application/vnd.obn": { + "source": "iana" + }, + "application/vnd.oftn.l10n+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.oipf.contentaccessdownload+xml": { + "source": "iana" + }, + "application/vnd.oipf.contentaccessstreaming+xml": { + "source": "iana" + }, + "application/vnd.oipf.cspg-hexbinary": { + "source": "iana" + }, + "application/vnd.oipf.dae.svg+xml": { + "source": "iana" + }, + "application/vnd.oipf.dae.xhtml+xml": { + "source": "iana" + }, + "application/vnd.oipf.mippvcontrolmessage+xml": { + "source": "iana" + }, + "application/vnd.oipf.pae.gem": { + "source": "iana" + }, + "application/vnd.oipf.spdiscovery+xml": { + "source": "iana" + }, + "application/vnd.oipf.spdlist+xml": { + "source": "iana" + }, + "application/vnd.oipf.ueprofile+xml": { + "source": "iana" + }, + "application/vnd.oipf.userprofile+xml": { + "source": "iana" + }, + "application/vnd.olpc-sugar": { + "source": "iana", + "extensions": ["xo"] + }, + "application/vnd.oma-scws-config": { + "source": "iana" + }, + "application/vnd.oma-scws-http-request": { + "source": "iana" + }, + "application/vnd.oma-scws-http-response": { + "source": "iana" + }, + "application/vnd.oma.bcast.associated-procedure-parameter+xml": { + "source": "iana" + }, + "application/vnd.oma.bcast.drm-trigger+xml": { + "source": "iana" + }, + "application/vnd.oma.bcast.imd+xml": { + "source": "iana" + }, + "application/vnd.oma.bcast.ltkm": { + "source": "iana" + }, + "application/vnd.oma.bcast.notification+xml": { + "source": "iana" + }, + "application/vnd.oma.bcast.provisioningtrigger": { + "source": "iana" + }, + "application/vnd.oma.bcast.sgboot": { + "source": "iana" + }, + "application/vnd.oma.bcast.sgdd+xml": { + "source": "iana" + }, + "application/vnd.oma.bcast.sgdu": { + "source": "iana" + }, + "application/vnd.oma.bcast.simple-symbol-container": { + "source": "iana" + }, + "application/vnd.oma.bcast.smartcard-trigger+xml": { + "source": "iana" + }, + "application/vnd.oma.bcast.sprov+xml": { + "source": "iana" + }, + "application/vnd.oma.bcast.stkm": { + "source": "iana" + }, + "application/vnd.oma.cab-address-book+xml": { + "source": "iana" + }, + "application/vnd.oma.cab-feature-handler+xml": { + "source": "iana" + }, + "application/vnd.oma.cab-pcc+xml": { + "source": "iana" + }, + "application/vnd.oma.cab-subs-invite+xml": { + "source": "iana" + }, + "application/vnd.oma.cab-user-prefs+xml": { + "source": "iana" + }, + "application/vnd.oma.dcd": { + "source": "iana" + }, + "application/vnd.oma.dcdc": { + "source": "iana" + }, + "application/vnd.oma.dd2+xml": { + "source": "iana", + "extensions": ["dd2"] + }, + "application/vnd.oma.drm.risd+xml": { + "source": "iana" + }, + "application/vnd.oma.group-usage-list+xml": { + "source": "iana" + }, + "application/vnd.oma.pal+xml": { + "source": "iana" + }, + "application/vnd.oma.poc.detailed-progress-report+xml": { + "source": "iana" + }, + "application/vnd.oma.poc.final-report+xml": { + "source": "iana" + }, + "application/vnd.oma.poc.groups+xml": { + "source": "iana" + }, + "application/vnd.oma.poc.invocation-descriptor+xml": { + "source": "iana" + }, + "application/vnd.oma.poc.optimized-progress-report+xml": { + "source": "iana" + }, + "application/vnd.oma.push": { + "source": "iana" + }, + "application/vnd.oma.scidm.messages+xml": { + "source": "iana" + }, + "application/vnd.oma.xcap-directory+xml": { + "source": "iana" + }, + "application/vnd.omads-email+xml": { + "source": "iana" + }, + "application/vnd.omads-file+xml": { + "source": "iana" + }, + "application/vnd.omads-folder+xml": { + "source": "iana" + }, + "application/vnd.omaloc-supl-init": { + "source": "iana" + }, + "application/vnd.openblox.game+xml": { + "source": "iana" + }, + "application/vnd.openblox.game-binary": { + "source": "iana" + }, + "application/vnd.openeye.oeb": { + "source": "iana" + }, + "application/vnd.openofficeorg.extension": { + "source": "apache", + "extensions": ["oxt"] + }, + "application/vnd.openxmlformats-officedocument.custom-properties+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.customxmlproperties+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.drawing+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.drawingml.chart+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.extended-properties+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.presentationml-template": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.presentationml.comments+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.presentationml.presentation": { + "source": "iana", + "compressible": false, + "extensions": ["pptx"] + }, + "application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.presentationml.presprops+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.presentationml.slide": { + "source": "iana", + "extensions": ["sldx"] + }, + "application/vnd.openxmlformats-officedocument.presentationml.slide+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.presentationml.slideshow": { + "source": "iana", + "extensions": ["ppsx"] + }, + "application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.presentationml.tags+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.presentationml.template": { + "source": "apache", + "extensions": ["potx"] + }, + "application/vnd.openxmlformats-officedocument.presentationml.template.main+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml-template": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": { + "source": "iana", + "compressible": false, + "extensions": ["xlsx"] + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.template": { + "source": "apache", + "extensions": ["xltx"] + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.theme+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.themeoverride+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.vmldrawing": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml-template": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.document": { + "source": "iana", + "compressible": false, + "extensions": ["docx"] + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.template": { + "source": "apache", + "extensions": ["dotx"] + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-package.core-properties+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-package.relationships+xml": { + "source": "iana" + }, + "application/vnd.oracle.resource+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.orange.indata": { + "source": "iana" + }, + "application/vnd.osa.netdeploy": { + "source": "iana" + }, + "application/vnd.osgeo.mapguide.package": { + "source": "iana", + "extensions": ["mgp"] + }, + "application/vnd.osgi.bundle": { + "source": "iana" + }, + "application/vnd.osgi.dp": { + "source": "iana", + "extensions": ["dp"] + }, + "application/vnd.osgi.subsystem": { + "source": "iana", + "extensions": ["esa"] + }, + "application/vnd.otps.ct-kip+xml": { + "source": "iana" + }, + "application/vnd.oxli.countgraph": { + "source": "iana" + }, + "application/vnd.pagerduty+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.palm": { + "source": "iana", + "extensions": ["pdb", "pqa", "oprc"] + }, + "application/vnd.panoply": { + "source": "iana" + }, + "application/vnd.paos+xml": { + "source": "iana" + }, + "application/vnd.paos.xml": { + "source": "apache" + }, + "application/vnd.pawaafile": { + "source": "iana", + "extensions": ["paw"] + }, + "application/vnd.pcos": { + "source": "iana" + }, + "application/vnd.pg.format": { + "source": "iana", + "extensions": ["str"] + }, + "application/vnd.pg.osasli": { + "source": "iana", + "extensions": ["ei6"] + }, + "application/vnd.piaccess.application-licence": { + "source": "iana" + }, + "application/vnd.picsel": { + "source": "iana", + "extensions": ["efif"] + }, + "application/vnd.pmi.widget": { + "source": "iana", + "extensions": ["wg"] + }, + "application/vnd.poc.group-advertisement+xml": { + "source": "iana" + }, + "application/vnd.pocketlearn": { + "source": "iana", + "extensions": ["plf"] + }, + "application/vnd.powerbuilder6": { + "source": "iana", + "extensions": ["pbd"] + }, + "application/vnd.powerbuilder6-s": { + "source": "iana" + }, + "application/vnd.powerbuilder7": { + "source": "iana" + }, + "application/vnd.powerbuilder7-s": { + "source": "iana" + }, + "application/vnd.powerbuilder75": { + "source": "iana" + }, + "application/vnd.powerbuilder75-s": { + "source": "iana" + }, + "application/vnd.preminet": { + "source": "iana" + }, + "application/vnd.previewsystems.box": { + "source": "iana", + "extensions": ["box"] + }, + "application/vnd.proteus.magazine": { + "source": "iana", + "extensions": ["mgz"] + }, + "application/vnd.publishare-delta-tree": { + "source": "iana", + "extensions": ["qps"] + }, + "application/vnd.pvi.ptid1": { + "source": "iana", + "extensions": ["ptid"] + }, + "application/vnd.pwg-multiplexed": { + "source": "iana" + }, + "application/vnd.pwg-xhtml-print+xml": { + "source": "iana" + }, + "application/vnd.qualcomm.brew-app-res": { + "source": "iana" + }, + "application/vnd.quark.quarkxpress": { + "source": "iana", + "extensions": ["qxd", "qxt", "qwd", "qwt", "qxl", "qxb"] + }, + "application/vnd.quobject-quoxdocument": { + "source": "iana" + }, + "application/vnd.radisys.moml+xml": { + "source": "iana" + }, + "application/vnd.radisys.msml+xml": { + "source": "iana" + }, + "application/vnd.radisys.msml-audit+xml": { + "source": "iana" + }, + "application/vnd.radisys.msml-audit-conf+xml": { + "source": "iana" + }, + "application/vnd.radisys.msml-audit-conn+xml": { + "source": "iana" + }, + "application/vnd.radisys.msml-audit-dialog+xml": { + "source": "iana" + }, + "application/vnd.radisys.msml-audit-stream+xml": { + "source": "iana" + }, + "application/vnd.radisys.msml-conf+xml": { + "source": "iana" + }, + "application/vnd.radisys.msml-dialog+xml": { + "source": "iana" + }, + "application/vnd.radisys.msml-dialog-base+xml": { + "source": "iana" + }, + "application/vnd.radisys.msml-dialog-fax-detect+xml": { + "source": "iana" + }, + "application/vnd.radisys.msml-dialog-fax-sendrecv+xml": { + "source": "iana" + }, + "application/vnd.radisys.msml-dialog-group+xml": { + "source": "iana" + }, + "application/vnd.radisys.msml-dialog-speech+xml": { + "source": "iana" + }, + "application/vnd.radisys.msml-dialog-transform+xml": { + "source": "iana" + }, + "application/vnd.rainstor.data": { + "source": "iana" + }, + "application/vnd.rapid": { + "source": "iana" + }, + "application/vnd.realvnc.bed": { + "source": "iana", + "extensions": ["bed"] + }, + "application/vnd.recordare.musicxml": { + "source": "iana", + "extensions": ["mxl"] + }, + "application/vnd.recordare.musicxml+xml": { + "source": "iana", + "extensions": ["musicxml"] + }, + "application/vnd.renlearn.rlprint": { + "source": "iana" + }, + "application/vnd.rig.cryptonote": { + "source": "iana", + "extensions": ["cryptonote"] + }, + "application/vnd.rim.cod": { + "source": "apache", + "extensions": ["cod"] + }, + "application/vnd.rn-realmedia": { + "source": "apache", + "extensions": ["rm"] + }, + "application/vnd.rn-realmedia-vbr": { + "source": "apache", + "extensions": ["rmvb"] + }, + "application/vnd.route66.link66+xml": { + "source": "iana", + "extensions": ["link66"] + }, + "application/vnd.rs-274x": { + "source": "iana" + }, + "application/vnd.ruckus.download": { + "source": "iana" + }, + "application/vnd.s3sms": { + "source": "iana" + }, + "application/vnd.sailingtracker.track": { + "source": "iana", + "extensions": ["st"] + }, + "application/vnd.sbm.cid": { + "source": "iana" + }, + "application/vnd.sbm.mid2": { + "source": "iana" + }, + "application/vnd.scribus": { + "source": "iana" + }, + "application/vnd.sealed.3df": { + "source": "iana" + }, + "application/vnd.sealed.csf": { + "source": "iana" + }, + "application/vnd.sealed.doc": { + "source": "iana" + }, + "application/vnd.sealed.eml": { + "source": "iana" + }, + "application/vnd.sealed.mht": { + "source": "iana" + }, + "application/vnd.sealed.net": { + "source": "iana" + }, + "application/vnd.sealed.ppt": { + "source": "iana" + }, + "application/vnd.sealed.tiff": { + "source": "iana" + }, + "application/vnd.sealed.xls": { + "source": "iana" + }, + "application/vnd.sealedmedia.softseal.html": { + "source": "iana" + }, + "application/vnd.sealedmedia.softseal.pdf": { + "source": "iana" + }, + "application/vnd.seemail": { + "source": "iana", + "extensions": ["see"] + }, + "application/vnd.sema": { + "source": "iana", + "extensions": ["sema"] + }, + "application/vnd.semd": { + "source": "iana", + "extensions": ["semd"] + }, + "application/vnd.semf": { + "source": "iana", + "extensions": ["semf"] + }, + "application/vnd.shana.informed.formdata": { + "source": "iana", + "extensions": ["ifm"] + }, + "application/vnd.shana.informed.formtemplate": { + "source": "iana", + "extensions": ["itp"] + }, + "application/vnd.shana.informed.interchange": { + "source": "iana", + "extensions": ["iif"] + }, + "application/vnd.shana.informed.package": { + "source": "iana", + "extensions": ["ipk"] + }, + "application/vnd.simtech-mindmapper": { + "source": "iana", + "extensions": ["twd", "twds"] + }, + "application/vnd.siren+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.smaf": { + "source": "iana", + "extensions": ["mmf"] + }, + "application/vnd.smart.notebook": { + "source": "iana" + }, + "application/vnd.smart.teacher": { + "source": "iana", + "extensions": ["teacher"] + }, + "application/vnd.software602.filler.form+xml": { + "source": "iana" + }, + "application/vnd.software602.filler.form-xml-zip": { + "source": "iana" + }, + "application/vnd.solent.sdkm+xml": { + "source": "iana", + "extensions": ["sdkm", "sdkd"] + }, + "application/vnd.spotfire.dxp": { + "source": "iana", + "extensions": ["dxp"] + }, + "application/vnd.spotfire.sfs": { + "source": "iana", + "extensions": ["sfs"] + }, + "application/vnd.sss-cod": { + "source": "iana" + }, + "application/vnd.sss-dtf": { + "source": "iana" + }, + "application/vnd.sss-ntf": { + "source": "iana" + }, + "application/vnd.stardivision.calc": { + "source": "apache", + "extensions": ["sdc"] + }, + "application/vnd.stardivision.draw": { + "source": "apache", + "extensions": ["sda"] + }, + "application/vnd.stardivision.impress": { + "source": "apache", + "extensions": ["sdd"] + }, + "application/vnd.stardivision.math": { + "source": "apache", + "extensions": ["smf"] + }, + "application/vnd.stardivision.writer": { + "source": "apache", + "extensions": ["sdw", "vor"] + }, + "application/vnd.stardivision.writer-global": { + "source": "apache", + "extensions": ["sgl"] + }, + "application/vnd.stepmania.package": { + "source": "iana", + "extensions": ["smzip"] + }, + "application/vnd.stepmania.stepchart": { + "source": "iana", + "extensions": ["sm"] + }, + "application/vnd.street-stream": { + "source": "iana" + }, + "application/vnd.sun.wadl+xml": { + "source": "iana" + }, + "application/vnd.sun.xml.calc": { + "source": "apache", + "extensions": ["sxc"] + }, + "application/vnd.sun.xml.calc.template": { + "source": "apache", + "extensions": ["stc"] + }, + "application/vnd.sun.xml.draw": { + "source": "apache", + "extensions": ["sxd"] + }, + "application/vnd.sun.xml.draw.template": { + "source": "apache", + "extensions": ["std"] + }, + "application/vnd.sun.xml.impress": { + "source": "apache", + "extensions": ["sxi"] + }, + "application/vnd.sun.xml.impress.template": { + "source": "apache", + "extensions": ["sti"] + }, + "application/vnd.sun.xml.math": { + "source": "apache", + "extensions": ["sxm"] + }, + "application/vnd.sun.xml.writer": { + "source": "apache", + "extensions": ["sxw"] + }, + "application/vnd.sun.xml.writer.global": { + "source": "apache", + "extensions": ["sxg"] + }, + "application/vnd.sun.xml.writer.template": { + "source": "apache", + "extensions": ["stw"] + }, + "application/vnd.sus-calendar": { + "source": "iana", + "extensions": ["sus", "susp"] + }, + "application/vnd.svd": { + "source": "iana", + "extensions": ["svd"] + }, + "application/vnd.swiftview-ics": { + "source": "iana" + }, + "application/vnd.symbian.install": { + "source": "apache", + "extensions": ["sis", "sisx"] + }, + "application/vnd.syncml+xml": { + "source": "iana", + "extensions": ["xsm"] + }, + "application/vnd.syncml.dm+wbxml": { + "source": "iana", + "extensions": ["bdm"] + }, + "application/vnd.syncml.dm+xml": { + "source": "iana", + "extensions": ["xdm"] + }, + "application/vnd.syncml.dm.notification": { + "source": "iana" + }, + "application/vnd.syncml.dmddf+wbxml": { + "source": "iana" + }, + "application/vnd.syncml.dmddf+xml": { + "source": "iana" + }, + "application/vnd.syncml.dmtnds+wbxml": { + "source": "iana" + }, + "application/vnd.syncml.dmtnds+xml": { + "source": "iana" + }, + "application/vnd.syncml.ds.notification": { + "source": "iana" + }, + "application/vnd.tao.intent-module-archive": { + "source": "iana", + "extensions": ["tao"] + }, + "application/vnd.tcpdump.pcap": { + "source": "iana", + "extensions": ["pcap", "cap", "dmp"] + }, + "application/vnd.tmd.mediaflex.api+xml": { + "source": "iana" + }, + "application/vnd.tml": { + "source": "iana" + }, + "application/vnd.tmobile-livetv": { + "source": "iana", + "extensions": ["tmo"] + }, + "application/vnd.trid.tpt": { + "source": "iana", + "extensions": ["tpt"] + }, + "application/vnd.triscape.mxs": { + "source": "iana", + "extensions": ["mxs"] + }, + "application/vnd.trueapp": { + "source": "iana", + "extensions": ["tra"] + }, + "application/vnd.truedoc": { + "source": "iana" + }, + "application/vnd.ubisoft.webplayer": { + "source": "iana" + }, + "application/vnd.ufdl": { + "source": "iana", + "extensions": ["ufd", "ufdl"] + }, + "application/vnd.uiq.theme": { + "source": "iana", + "extensions": ["utz"] + }, + "application/vnd.umajin": { + "source": "iana", + "extensions": ["umj"] + }, + "application/vnd.unity": { + "source": "iana", + "extensions": ["unityweb"] + }, + "application/vnd.uoml+xml": { + "source": "iana", + "extensions": ["uoml"] + }, + "application/vnd.uplanet.alert": { + "source": "iana" + }, + "application/vnd.uplanet.alert-wbxml": { + "source": "iana" + }, + "application/vnd.uplanet.bearer-choice": { + "source": "iana" + }, + "application/vnd.uplanet.bearer-choice-wbxml": { + "source": "iana" + }, + "application/vnd.uplanet.cacheop": { + "source": "iana" + }, + "application/vnd.uplanet.cacheop-wbxml": { + "source": "iana" + }, + "application/vnd.uplanet.channel": { + "source": "iana" + }, + "application/vnd.uplanet.channel-wbxml": { + "source": "iana" + }, + "application/vnd.uplanet.list": { + "source": "iana" + }, + "application/vnd.uplanet.list-wbxml": { + "source": "iana" + }, + "application/vnd.uplanet.listcmd": { + "source": "iana" + }, + "application/vnd.uplanet.listcmd-wbxml": { + "source": "iana" + }, + "application/vnd.uplanet.signal": { + "source": "iana" + }, + "application/vnd.uri-map": { + "source": "iana" + }, + "application/vnd.valve.source.material": { + "source": "iana" + }, + "application/vnd.vcx": { + "source": "iana", + "extensions": ["vcx"] + }, + "application/vnd.vd-study": { + "source": "iana" + }, + "application/vnd.vectorworks": { + "source": "iana" + }, + "application/vnd.verimatrix.vcas": { + "source": "iana" + }, + "application/vnd.vidsoft.vidconference": { + "source": "iana" + }, + "application/vnd.visio": { + "source": "iana", + "extensions": ["vsd", "vst", "vss", "vsw"] + }, + "application/vnd.visionary": { + "source": "iana", + "extensions": ["vis"] + }, + "application/vnd.vividence.scriptfile": { + "source": "iana" + }, + "application/vnd.vsf": { + "source": "iana", + "extensions": ["vsf"] + }, + "application/vnd.wap.sic": { + "source": "iana" + }, + "application/vnd.wap.slc": { + "source": "iana" + }, + "application/vnd.wap.wbxml": { + "source": "iana", + "extensions": ["wbxml"] + }, + "application/vnd.wap.wmlc": { + "source": "iana", + "extensions": ["wmlc"] + }, + "application/vnd.wap.wmlscriptc": { + "source": "iana", + "extensions": ["wmlsc"] + }, + "application/vnd.webturbo": { + "source": "iana", + "extensions": ["wtb"] + }, + "application/vnd.wfa.p2p": { + "source": "iana" + }, + "application/vnd.wfa.wsc": { + "source": "iana" + }, + "application/vnd.windows.devicepairing": { + "source": "iana" + }, + "application/vnd.wmc": { + "source": "iana" + }, + "application/vnd.wmf.bootstrap": { + "source": "iana" + }, + "application/vnd.wolfram.mathematica": { + "source": "iana" + }, + "application/vnd.wolfram.mathematica.package": { + "source": "iana" + }, + "application/vnd.wolfram.player": { + "source": "iana", + "extensions": ["nbp"] + }, + "application/vnd.wordperfect": { + "source": "iana", + "extensions": ["wpd"] + }, + "application/vnd.wqd": { + "source": "iana", + "extensions": ["wqd"] + }, + "application/vnd.wrq-hp3000-labelled": { + "source": "iana" + }, + "application/vnd.wt.stf": { + "source": "iana", + "extensions": ["stf"] + }, + "application/vnd.wv.csp+wbxml": { + "source": "iana" + }, + "application/vnd.wv.csp+xml": { + "source": "iana" + }, + "application/vnd.wv.ssp+xml": { + "source": "iana" + }, + "application/vnd.xacml+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.xara": { + "source": "iana", + "extensions": ["xar"] + }, + "application/vnd.xfdl": { + "source": "iana", + "extensions": ["xfdl"] + }, + "application/vnd.xfdl.webform": { + "source": "iana" + }, + "application/vnd.xmi+xml": { + "source": "iana" + }, + "application/vnd.xmpie.cpkg": { + "source": "iana" + }, + "application/vnd.xmpie.dpkg": { + "source": "iana" + }, + "application/vnd.xmpie.plan": { + "source": "iana" + }, + "application/vnd.xmpie.ppkg": { + "source": "iana" + }, + "application/vnd.xmpie.xlim": { + "source": "iana" + }, + "application/vnd.yamaha.hv-dic": { + "source": "iana", + "extensions": ["hvd"] + }, + "application/vnd.yamaha.hv-script": { + "source": "iana", + "extensions": ["hvs"] + }, + "application/vnd.yamaha.hv-voice": { + "source": "iana", + "extensions": ["hvp"] + }, + "application/vnd.yamaha.openscoreformat": { + "source": "iana", + "extensions": ["osf"] + }, + "application/vnd.yamaha.openscoreformat.osfpvg+xml": { + "source": "iana", + "extensions": ["osfpvg"] + }, + "application/vnd.yamaha.remote-setup": { + "source": "iana" + }, + "application/vnd.yamaha.smaf-audio": { + "source": "iana", + "extensions": ["saf"] + }, + "application/vnd.yamaha.smaf-phrase": { + "source": "iana", + "extensions": ["spf"] + }, + "application/vnd.yamaha.through-ngn": { + "source": "iana" + }, + "application/vnd.yamaha.tunnel-udpencap": { + "source": "iana" + }, + "application/vnd.yaoweme": { + "source": "iana" + }, + "application/vnd.yellowriver-custom-menu": { + "source": "iana", + "extensions": ["cmp"] + }, + "application/vnd.zul": { + "source": "iana", + "extensions": ["zir", "zirz"] + }, + "application/vnd.zzazz.deck+xml": { + "source": "iana", + "extensions": ["zaz"] + }, + "application/voicexml+xml": { + "source": "iana", + "extensions": ["vxml"] + }, + "application/vq-rtcpxr": { + "source": "iana" + }, + "application/watcherinfo+xml": { + "source": "iana" + }, + "application/whoispp-query": { + "source": "iana" + }, + "application/whoispp-response": { + "source": "iana" + }, + "application/widget": { + "source": "iana", + "extensions": ["wgt"] + }, + "application/winhlp": { + "source": "apache", + "extensions": ["hlp"] + }, + "application/wita": { + "source": "iana" + }, + "application/wordperfect5.1": { + "source": "iana" + }, + "application/wsdl+xml": { + "source": "iana", + "extensions": ["wsdl"] + }, + "application/wspolicy+xml": { + "source": "iana", + "extensions": ["wspolicy"] + }, + "application/x-7z-compressed": { + "source": "apache", + "compressible": false, + "extensions": ["7z"] + }, + "application/x-abiword": { + "source": "apache", + "extensions": ["abw"] + }, + "application/x-ace-compressed": { + "source": "apache", + "extensions": ["ace"] + }, + "application/x-amf": { + "source": "apache" + }, + "application/x-apple-diskimage": { + "source": "apache", + "extensions": ["dmg"] + }, + "application/x-authorware-bin": { + "source": "apache", + "extensions": ["aab", "x32", "u32", "vox"] + }, + "application/x-authorware-map": { + "source": "apache", + "extensions": ["aam"] + }, + "application/x-authorware-seg": { + "source": "apache", + "extensions": ["aas"] + }, + "application/x-bcpio": { + "source": "apache", + "extensions": ["bcpio"] + }, + "application/x-bdoc": { + "compressible": false, + "extensions": ["bdoc"] + }, + "application/x-bittorrent": { + "source": "apache", + "extensions": ["torrent"] + }, + "application/x-blorb": { + "source": "apache", + "extensions": ["blb", "blorb"] + }, + "application/x-bzip": { + "source": "apache", + "compressible": false, + "extensions": ["bz"] + }, + "application/x-bzip2": { + "source": "apache", + "compressible": false, + "extensions": ["bz2", "boz"] + }, + "application/x-cbr": { + "source": "apache", + "extensions": ["cbr", "cba", "cbt", "cbz", "cb7"] + }, + "application/x-cdlink": { + "source": "apache", + "extensions": ["vcd"] + }, + "application/x-cfs-compressed": { + "source": "apache", + "extensions": ["cfs"] + }, + "application/x-chat": { + "source": "apache", + "extensions": ["chat"] + }, + "application/x-chess-pgn": { + "source": "apache", + "extensions": ["pgn"] + }, + "application/x-chrome-extension": { + "extensions": ["crx"] + }, + "application/x-cocoa": { + "source": "nginx", + "extensions": ["cco"] + }, + "application/x-compress": { + "source": "apache" + }, + "application/x-conference": { + "source": "apache", + "extensions": ["nsc"] + }, + "application/x-cpio": { + "source": "apache", + "extensions": ["cpio"] + }, + "application/x-csh": { + "source": "apache", + "extensions": ["csh"] + }, + "application/x-deb": { + "compressible": false + }, + "application/x-debian-package": { + "source": "apache", + "extensions": ["deb", "udeb"] + }, + "application/x-dgc-compressed": { + "source": "apache", + "extensions": ["dgc"] + }, + "application/x-director": { + "source": "apache", + "extensions": ["dir", "dcr", "dxr", "cst", "cct", "cxt", "w3d", "fgd", "swa"] + }, + "application/x-doom": { + "source": "apache", + "extensions": ["wad"] + }, + "application/x-dtbncx+xml": { + "source": "apache", + "extensions": ["ncx"] + }, + "application/x-dtbook+xml": { + "source": "apache", + "extensions": ["dtb"] + }, + "application/x-dtbresource+xml": { + "source": "apache", + "extensions": ["res"] + }, + "application/x-dvi": { + "source": "apache", + "compressible": false, + "extensions": ["dvi"] + }, + "application/x-envoy": { + "source": "apache", + "extensions": ["evy"] + }, + "application/x-eva": { + "source": "apache", + "extensions": ["eva"] + }, + "application/x-font-bdf": { + "source": "apache", + "extensions": ["bdf"] + }, + "application/x-font-dos": { + "source": "apache" + }, + "application/x-font-framemaker": { + "source": "apache" + }, + "application/x-font-ghostscript": { + "source": "apache", + "extensions": ["gsf"] + }, + "application/x-font-libgrx": { + "source": "apache" + }, + "application/x-font-linux-psf": { + "source": "apache", + "extensions": ["psf"] + }, + "application/x-font-otf": { + "source": "apache", + "compressible": true, + "extensions": ["otf"] + }, + "application/x-font-pcf": { + "source": "apache", + "extensions": ["pcf"] + }, + "application/x-font-snf": { + "source": "apache", + "extensions": ["snf"] + }, + "application/x-font-speedo": { + "source": "apache" + }, + "application/x-font-sunos-news": { + "source": "apache" + }, + "application/x-font-ttf": { + "source": "apache", + "compressible": true, + "extensions": ["ttf", "ttc"] + }, + "application/x-font-type1": { + "source": "apache", + "extensions": ["pfa", "pfb", "pfm", "afm"] + }, + "application/x-font-vfont": { + "source": "apache" + }, + "application/x-freearc": { + "source": "apache", + "extensions": ["arc"] + }, + "application/x-futuresplash": { + "source": "apache", + "extensions": ["spl"] + }, + "application/x-gca-compressed": { + "source": "apache", + "extensions": ["gca"] + }, + "application/x-glulx": { + "source": "apache", + "extensions": ["ulx"] + }, + "application/x-gnumeric": { + "source": "apache", + "extensions": ["gnumeric"] + }, + "application/x-gramps-xml": { + "source": "apache", + "extensions": ["gramps"] + }, + "application/x-gtar": { + "source": "apache", + "extensions": ["gtar"] + }, + "application/x-gzip": { + "source": "apache" + }, + "application/x-hdf": { + "source": "apache", + "extensions": ["hdf"] + }, + "application/x-httpd-php": { + "compressible": true, + "extensions": ["php"] + }, + "application/x-install-instructions": { + "source": "apache", + "extensions": ["install"] + }, + "application/x-iso9660-image": { + "source": "apache", + "extensions": ["iso"] + }, + "application/x-java-archive-diff": { + "source": "nginx", + "extensions": ["jardiff"] + }, + "application/x-java-jnlp-file": { + "source": "apache", + "compressible": false, + "extensions": ["jnlp"] + }, + "application/x-javascript": { + "compressible": true + }, + "application/x-latex": { + "source": "apache", + "compressible": false, + "extensions": ["latex"] + }, + "application/x-lua-bytecode": { + "extensions": ["luac"] + }, + "application/x-lzh-compressed": { + "source": "apache", + "extensions": ["lzh", "lha"] + }, + "application/x-makeself": { + "source": "nginx", + "extensions": ["run"] + }, + "application/x-mie": { + "source": "apache", + "extensions": ["mie"] + }, + "application/x-mobipocket-ebook": { + "source": "apache", + "extensions": ["prc", "mobi"] + }, + "application/x-mpegurl": { + "compressible": false + }, + "application/x-ms-application": { + "source": "apache", + "extensions": ["application"] + }, + "application/x-ms-shortcut": { + "source": "apache", + "extensions": ["lnk"] + }, + "application/x-ms-wmd": { + "source": "apache", + "extensions": ["wmd"] + }, + "application/x-ms-wmz": { + "source": "apache", + "extensions": ["wmz"] + }, + "application/x-ms-xbap": { + "source": "apache", + "extensions": ["xbap"] + }, + "application/x-msaccess": { + "source": "apache", + "extensions": ["mdb"] + }, + "application/x-msbinder": { + "source": "apache", + "extensions": ["obd"] + }, + "application/x-mscardfile": { + "source": "apache", + "extensions": ["crd"] + }, + "application/x-msclip": { + "source": "apache", + "extensions": ["clp"] + }, + "application/x-msdos-program": { + "extensions": ["exe"] + }, + "application/x-msdownload": { + "source": "apache", + "extensions": ["exe", "dll", "com", "bat", "msi"] + }, + "application/x-msmediaview": { + "source": "apache", + "extensions": ["mvb", "m13", "m14"] + }, + "application/x-msmetafile": { + "source": "apache", + "extensions": ["wmf", "wmz", "emf", "emz"] + }, + "application/x-msmoney": { + "source": "apache", + "extensions": ["mny"] + }, + "application/x-mspublisher": { + "source": "apache", + "extensions": ["pub"] + }, + "application/x-msschedule": { + "source": "apache", + "extensions": ["scd"] + }, + "application/x-msterminal": { + "source": "apache", + "extensions": ["trm"] + }, + "application/x-mswrite": { + "source": "apache", + "extensions": ["wri"] + }, + "application/x-netcdf": { + "source": "apache", + "extensions": ["nc", "cdf"] + }, + "application/x-ns-proxy-autoconfig": { + "compressible": true, + "extensions": ["pac"] + }, + "application/x-nzb": { + "source": "apache", + "extensions": ["nzb"] + }, + "application/x-perl": { + "source": "nginx", + "extensions": ["pl", "pm"] + }, + "application/x-pilot": { + "source": "nginx", + "extensions": ["prc", "pdb"] + }, + "application/x-pkcs12": { + "source": "apache", + "compressible": false, + "extensions": ["p12", "pfx"] + }, + "application/x-pkcs7-certificates": { + "source": "apache", + "extensions": ["p7b", "spc"] + }, + "application/x-pkcs7-certreqresp": { + "source": "apache", + "extensions": ["p7r"] + }, + "application/x-rar-compressed": { + "source": "apache", + "compressible": false, + "extensions": ["rar"] + }, + "application/x-redhat-package-manager": { + "source": "nginx", + "extensions": ["rpm"] + }, + "application/x-research-info-systems": { + "source": "apache", + "extensions": ["ris"] + }, + "application/x-sea": { + "source": "nginx", + "extensions": ["sea"] + }, + "application/x-sh": { + "source": "apache", + "compressible": true, + "extensions": ["sh"] + }, + "application/x-shar": { + "source": "apache", + "extensions": ["shar"] + }, + "application/x-shockwave-flash": { + "source": "apache", + "compressible": false, + "extensions": ["swf"] + }, + "application/x-silverlight-app": { + "source": "apache", + "extensions": ["xap"] + }, + "application/x-sql": { + "source": "apache", + "extensions": ["sql"] + }, + "application/x-stuffit": { + "source": "apache", + "compressible": false, + "extensions": ["sit"] + }, + "application/x-stuffitx": { + "source": "apache", + "extensions": ["sitx"] + }, + "application/x-subrip": { + "source": "apache", + "extensions": ["srt"] + }, + "application/x-sv4cpio": { + "source": "apache", + "extensions": ["sv4cpio"] + }, + "application/x-sv4crc": { + "source": "apache", + "extensions": ["sv4crc"] + }, + "application/x-t3vm-image": { + "source": "apache", + "extensions": ["t3"] + }, + "application/x-tads": { + "source": "apache", + "extensions": ["gam"] + }, + "application/x-tar": { + "source": "apache", + "compressible": true, + "extensions": ["tar"] + }, + "application/x-tcl": { + "source": "apache", + "extensions": ["tcl", "tk"] + }, + "application/x-tex": { + "source": "apache", + "extensions": ["tex"] + }, + "application/x-tex-tfm": { + "source": "apache", + "extensions": ["tfm"] + }, + "application/x-texinfo": { + "source": "apache", + "extensions": ["texinfo", "texi"] + }, + "application/x-tgif": { + "source": "apache", + "extensions": ["obj"] + }, + "application/x-ustar": { + "source": "apache", + "extensions": ["ustar"] + }, + "application/x-wais-source": { + "source": "apache", + "extensions": ["src"] + }, + "application/x-web-app-manifest+json": { + "compressible": true, + "extensions": ["webapp"] + }, + "application/x-www-form-urlencoded": { + "source": "iana", + "compressible": true + }, + "application/x-x509-ca-cert": { + "source": "apache", + "extensions": ["der", "crt", "pem"] + }, + "application/x-xfig": { + "source": "apache", + "extensions": ["fig"] + }, + "application/x-xliff+xml": { + "source": "apache", + "extensions": ["xlf"] + }, + "application/x-xpinstall": { + "source": "apache", + "compressible": false, + "extensions": ["xpi"] + }, + "application/x-xz": { + "source": "apache", + "extensions": ["xz"] + }, + "application/x-zmachine": { + "source": "apache", + "extensions": ["z1", "z2", "z3", "z4", "z5", "z6", "z7", "z8"] + }, + "application/x400-bp": { + "source": "iana" + }, + "application/xacml+xml": { + "source": "iana" + }, + "application/xaml+xml": { + "source": "apache", + "extensions": ["xaml"] + }, + "application/xcap-att+xml": { + "source": "iana" + }, + "application/xcap-caps+xml": { + "source": "iana" + }, + "application/xcap-diff+xml": { + "source": "iana", + "extensions": ["xdf"] + }, + "application/xcap-el+xml": { + "source": "iana" + }, + "application/xcap-error+xml": { + "source": "iana" + }, + "application/xcap-ns+xml": { + "source": "iana" + }, + "application/xcon-conference-info+xml": { + "source": "iana" + }, + "application/xcon-conference-info-diff+xml": { + "source": "iana" + }, + "application/xenc+xml": { + "source": "iana", + "extensions": ["xenc"] + }, + "application/xhtml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xhtml", "xht"] + }, + "application/xhtml-voice+xml": { + "source": "apache" + }, + "application/xml": { + "source": "iana", + "compressible": true, + "extensions": ["xml", "xsl", "xsd"] + }, + "application/xml-dtd": { + "source": "iana", + "compressible": true, + "extensions": ["dtd"] + }, + "application/xml-external-parsed-entity": { + "source": "iana" + }, + "application/xml-patch+xml": { + "source": "iana" + }, + "application/xmpp+xml": { + "source": "iana" + }, + "application/xop+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xop"] + }, + "application/xproc+xml": { + "source": "apache", + "extensions": ["xpl"] + }, + "application/xslt+xml": { + "source": "iana", + "extensions": ["xslt"] + }, + "application/xspf+xml": { + "source": "apache", + "extensions": ["xspf"] + }, + "application/xv+xml": { + "source": "iana", + "extensions": ["mxml", "xhvml", "xvml", "xvm"] + }, + "application/yang": { + "source": "iana", + "extensions": ["yang"] + }, + "application/yin+xml": { + "source": "iana", + "extensions": ["yin"] + }, + "application/zip": { + "source": "iana", + "compressible": false, + "extensions": ["zip"] + }, + "application/zlib": { + "source": "iana" + }, + "audio/1d-interleaved-parityfec": { + "source": "iana" + }, + "audio/32kadpcm": { + "source": "iana" + }, + "audio/3gpp": { + "source": "iana" + }, + "audio/3gpp2": { + "source": "iana" + }, + "audio/ac3": { + "source": "iana" + }, + "audio/adpcm": { + "source": "apache", + "extensions": ["adp"] + }, + "audio/amr": { + "source": "iana" + }, + "audio/amr-wb": { + "source": "iana" + }, + "audio/amr-wb+": { + "source": "iana" + }, + "audio/aptx": { + "source": "iana" + }, + "audio/asc": { + "source": "iana" + }, + "audio/atrac-advanced-lossless": { + "source": "iana" + }, + "audio/atrac-x": { + "source": "iana" + }, + "audio/atrac3": { + "source": "iana" + }, + "audio/basic": { + "source": "iana", + "compressible": false, + "extensions": ["au", "snd"] + }, + "audio/bv16": { + "source": "iana" + }, + "audio/bv32": { + "source": "iana" + }, + "audio/clearmode": { + "source": "iana" + }, + "audio/cn": { + "source": "iana" + }, + "audio/dat12": { + "source": "iana" + }, + "audio/dls": { + "source": "iana" + }, + "audio/dsr-es201108": { + "source": "iana" + }, + "audio/dsr-es202050": { + "source": "iana" + }, + "audio/dsr-es202211": { + "source": "iana" + }, + "audio/dsr-es202212": { + "source": "iana" + }, + "audio/dv": { + "source": "iana" + }, + "audio/dvi4": { + "source": "iana" + }, + "audio/eac3": { + "source": "iana" + }, + "audio/encaprtp": { + "source": "iana" + }, + "audio/evrc": { + "source": "iana" + }, + "audio/evrc-qcp": { + "source": "iana" + }, + "audio/evrc0": { + "source": "iana" + }, + "audio/evrc1": { + "source": "iana" + }, + "audio/evrcb": { + "source": "iana" + }, + "audio/evrcb0": { + "source": "iana" + }, + "audio/evrcb1": { + "source": "iana" + }, + "audio/evrcnw": { + "source": "iana" + }, + "audio/evrcnw0": { + "source": "iana" + }, + "audio/evrcnw1": { + "source": "iana" + }, + "audio/evrcwb": { + "source": "iana" + }, + "audio/evrcwb0": { + "source": "iana" + }, + "audio/evrcwb1": { + "source": "iana" + }, + "audio/evs": { + "source": "iana" + }, + "audio/fwdred": { + "source": "iana" + }, + "audio/g711-0": { + "source": "iana" + }, + "audio/g719": { + "source": "iana" + }, + "audio/g722": { + "source": "iana" + }, + "audio/g7221": { + "source": "iana" + }, + "audio/g723": { + "source": "iana" + }, + "audio/g726-16": { + "source": "iana" + }, + "audio/g726-24": { + "source": "iana" + }, + "audio/g726-32": { + "source": "iana" + }, + "audio/g726-40": { + "source": "iana" + }, + "audio/g728": { + "source": "iana" + }, + "audio/g729": { + "source": "iana" + }, + "audio/g7291": { + "source": "iana" + }, + "audio/g729d": { + "source": "iana" + }, + "audio/g729e": { + "source": "iana" + }, + "audio/gsm": { + "source": "iana" + }, + "audio/gsm-efr": { + "source": "iana" + }, + "audio/gsm-hr-08": { + "source": "iana" + }, + "audio/ilbc": { + "source": "iana" + }, + "audio/ip-mr_v2.5": { + "source": "iana" + }, + "audio/isac": { + "source": "apache" + }, + "audio/l16": { + "source": "iana" + }, + "audio/l20": { + "source": "iana" + }, + "audio/l24": { + "source": "iana", + "compressible": false + }, + "audio/l8": { + "source": "iana" + }, + "audio/lpc": { + "source": "iana" + }, + "audio/midi": { + "source": "apache", + "extensions": ["mid", "midi", "kar", "rmi"] + }, + "audio/mobile-xmf": { + "source": "iana" + }, + "audio/mp4": { + "source": "iana", + "compressible": false, + "extensions": ["mp4a", "m4a"] + }, + "audio/mp4a-latm": { + "source": "iana" + }, + "audio/mpa": { + "source": "iana" + }, + "audio/mpa-robust": { + "source": "iana" + }, + "audio/mpeg": { + "source": "iana", + "compressible": false, + "extensions": ["mpga", "mp2", "mp2a", "mp3", "m2a", "m3a"] + }, + "audio/mpeg4-generic": { + "source": "iana" + }, + "audio/musepack": { + "source": "apache" + }, + "audio/ogg": { + "source": "iana", + "compressible": false, + "extensions": ["oga", "ogg", "spx"] + }, + "audio/opus": { + "source": "iana" + }, + "audio/parityfec": { + "source": "iana" + }, + "audio/pcma": { + "source": "iana" + }, + "audio/pcma-wb": { + "source": "iana" + }, + "audio/pcmu": { + "source": "iana" + }, + "audio/pcmu-wb": { + "source": "iana" + }, + "audio/prs.sid": { + "source": "iana" + }, + "audio/qcelp": { + "source": "iana" + }, + "audio/raptorfec": { + "source": "iana" + }, + "audio/red": { + "source": "iana" + }, + "audio/rtp-enc-aescm128": { + "source": "iana" + }, + "audio/rtp-midi": { + "source": "iana" + }, + "audio/rtploopback": { + "source": "iana" + }, + "audio/rtx": { + "source": "iana" + }, + "audio/s3m": { + "source": "apache", + "extensions": ["s3m"] + }, + "audio/silk": { + "source": "apache", + "extensions": ["sil"] + }, + "audio/smv": { + "source": "iana" + }, + "audio/smv-qcp": { + "source": "iana" + }, + "audio/smv0": { + "source": "iana" + }, + "audio/sp-midi": { + "source": "iana" + }, + "audio/speex": { + "source": "iana" + }, + "audio/t140c": { + "source": "iana" + }, + "audio/t38": { + "source": "iana" + }, + "audio/telephone-event": { + "source": "iana" + }, + "audio/tone": { + "source": "iana" + }, + "audio/uemclip": { + "source": "iana" + }, + "audio/ulpfec": { + "source": "iana" + }, + "audio/vdvi": { + "source": "iana" + }, + "audio/vmr-wb": { + "source": "iana" + }, + "audio/vnd.3gpp.iufp": { + "source": "iana" + }, + "audio/vnd.4sb": { + "source": "iana" + }, + "audio/vnd.audiokoz": { + "source": "iana" + }, + "audio/vnd.celp": { + "source": "iana" + }, + "audio/vnd.cisco.nse": { + "source": "iana" + }, + "audio/vnd.cmles.radio-events": { + "source": "iana" + }, + "audio/vnd.cns.anp1": { + "source": "iana" + }, + "audio/vnd.cns.inf1": { + "source": "iana" + }, + "audio/vnd.dece.audio": { + "source": "iana", + "extensions": ["uva", "uvva"] + }, + "audio/vnd.digital-winds": { + "source": "iana", + "extensions": ["eol"] + }, + "audio/vnd.dlna.adts": { + "source": "iana" + }, + "audio/vnd.dolby.heaac.1": { + "source": "iana" + }, + "audio/vnd.dolby.heaac.2": { + "source": "iana" + }, + "audio/vnd.dolby.mlp": { + "source": "iana" + }, + "audio/vnd.dolby.mps": { + "source": "iana" + }, + "audio/vnd.dolby.pl2": { + "source": "iana" + }, + "audio/vnd.dolby.pl2x": { + "source": "iana" + }, + "audio/vnd.dolby.pl2z": { + "source": "iana" + }, + "audio/vnd.dolby.pulse.1": { + "source": "iana" + }, + "audio/vnd.dra": { + "source": "iana", + "extensions": ["dra"] + }, + "audio/vnd.dts": { + "source": "iana", + "extensions": ["dts"] + }, + "audio/vnd.dts.hd": { + "source": "iana", + "extensions": ["dtshd"] + }, + "audio/vnd.dvb.file": { + "source": "iana" + }, + "audio/vnd.everad.plj": { + "source": "iana" + }, + "audio/vnd.hns.audio": { + "source": "iana" + }, + "audio/vnd.lucent.voice": { + "source": "iana", + "extensions": ["lvp"] + }, + "audio/vnd.ms-playready.media.pya": { + "source": "iana", + "extensions": ["pya"] + }, + "audio/vnd.nokia.mobile-xmf": { + "source": "iana" + }, + "audio/vnd.nortel.vbk": { + "source": "iana" + }, + "audio/vnd.nuera.ecelp4800": { + "source": "iana", + "extensions": ["ecelp4800"] + }, + "audio/vnd.nuera.ecelp7470": { + "source": "iana", + "extensions": ["ecelp7470"] + }, + "audio/vnd.nuera.ecelp9600": { + "source": "iana", + "extensions": ["ecelp9600"] + }, + "audio/vnd.octel.sbc": { + "source": "iana" + }, + "audio/vnd.qcelp": { + "source": "iana" + }, + "audio/vnd.rhetorex.32kadpcm": { + "source": "iana" + }, + "audio/vnd.rip": { + "source": "iana", + "extensions": ["rip"] + }, + "audio/vnd.rn-realaudio": { + "compressible": false + }, + "audio/vnd.sealedmedia.softseal.mpeg": { + "source": "iana" + }, + "audio/vnd.vmx.cvsd": { + "source": "iana" + }, + "audio/vnd.wave": { + "compressible": false + }, + "audio/vorbis": { + "source": "iana", + "compressible": false + }, + "audio/vorbis-config": { + "source": "iana" + }, + "audio/wav": { + "compressible": false, + "extensions": ["wav"] + }, + "audio/wave": { + "compressible": false, + "extensions": ["wav"] + }, + "audio/webm": { + "source": "apache", + "compressible": false, + "extensions": ["weba"] + }, + "audio/x-aac": { + "source": "apache", + "compressible": false, + "extensions": ["aac"] + }, + "audio/x-aiff": { + "source": "apache", + "extensions": ["aif", "aiff", "aifc"] + }, + "audio/x-caf": { + "source": "apache", + "compressible": false, + "extensions": ["caf"] + }, + "audio/x-flac": { + "source": "apache", + "extensions": ["flac"] + }, + "audio/x-m4a": { + "source": "nginx", + "extensions": ["m4a"] + }, + "audio/x-matroska": { + "source": "apache", + "extensions": ["mka"] + }, + "audio/x-mpegurl": { + "source": "apache", + "extensions": ["m3u"] + }, + "audio/x-ms-wax": { + "source": "apache", + "extensions": ["wax"] + }, + "audio/x-ms-wma": { + "source": "apache", + "extensions": ["wma"] + }, + "audio/x-pn-realaudio": { + "source": "apache", + "extensions": ["ram", "ra"] + }, + "audio/x-pn-realaudio-plugin": { + "source": "apache", + "extensions": ["rmp"] + }, + "audio/x-realaudio": { + "source": "nginx", + "extensions": ["ra"] + }, + "audio/x-tta": { + "source": "apache" + }, + "audio/x-wav": { + "source": "apache", + "extensions": ["wav"] + }, + "audio/xm": { + "source": "apache", + "extensions": ["xm"] + }, + "chemical/x-cdx": { + "source": "apache", + "extensions": ["cdx"] + }, + "chemical/x-cif": { + "source": "apache", + "extensions": ["cif"] + }, + "chemical/x-cmdf": { + "source": "apache", + "extensions": ["cmdf"] + }, + "chemical/x-cml": { + "source": "apache", + "extensions": ["cml"] + }, + "chemical/x-csml": { + "source": "apache", + "extensions": ["csml"] + }, + "chemical/x-pdb": { + "source": "apache" + }, + "chemical/x-xyz": { + "source": "apache", + "extensions": ["xyz"] + }, + "font/opentype": { + "compressible": true, + "extensions": ["otf"] + }, + "image/bmp": { + "source": "apache", + "compressible": true, + "extensions": ["bmp"] + }, + "image/cgm": { + "source": "iana", + "extensions": ["cgm"] + }, + "image/fits": { + "source": "iana" + }, + "image/g3fax": { + "source": "iana", + "extensions": ["g3"] + }, + "image/gif": { + "source": "iana", + "compressible": false, + "extensions": ["gif"] + }, + "image/ief": { + "source": "iana", + "extensions": ["ief"] + }, + "image/jp2": { + "source": "iana" + }, + "image/jpeg": { + "source": "iana", + "compressible": false, + "extensions": ["jpeg", "jpg", "jpe"] + }, + "image/jpm": { + "source": "iana" + }, + "image/jpx": { + "source": "iana" + }, + "image/ktx": { + "source": "iana", + "extensions": ["ktx"] + }, + "image/naplps": { + "source": "iana" + }, + "image/pjpeg": { + "compressible": false + }, + "image/png": { + "source": "iana", + "compressible": false, + "extensions": ["png"] + }, + "image/prs.btif": { + "source": "iana", + "extensions": ["btif"] + }, + "image/prs.pti": { + "source": "iana" + }, + "image/pwg-raster": { + "source": "iana" + }, + "image/sgi": { + "source": "apache", + "extensions": ["sgi"] + }, + "image/svg+xml": { + "source": "iana", + "compressible": true, + "extensions": ["svg", "svgz"] + }, + "image/t38": { + "source": "iana" + }, + "image/tiff": { + "source": "iana", + "compressible": false, + "extensions": ["tiff", "tif"] + }, + "image/tiff-fx": { + "source": "iana" + }, + "image/vnd.adobe.photoshop": { + "source": "iana", + "compressible": true, + "extensions": ["psd"] + }, + "image/vnd.airzip.accelerator.azv": { + "source": "iana" + }, + "image/vnd.cns.inf2": { + "source": "iana" + }, + "image/vnd.dece.graphic": { + "source": "iana", + "extensions": ["uvi", "uvvi", "uvg", "uvvg"] + }, + "image/vnd.djvu": { + "source": "iana", + "extensions": ["djvu", "djv"] + }, + "image/vnd.dvb.subtitle": { + "source": "iana", + "extensions": ["sub"] + }, + "image/vnd.dwg": { + "source": "iana", + "extensions": ["dwg"] + }, + "image/vnd.dxf": { + "source": "iana", + "extensions": ["dxf"] + }, + "image/vnd.fastbidsheet": { + "source": "iana", + "extensions": ["fbs"] + }, + "image/vnd.fpx": { + "source": "iana", + "extensions": ["fpx"] + }, + "image/vnd.fst": { + "source": "iana", + "extensions": ["fst"] + }, + "image/vnd.fujixerox.edmics-mmr": { + "source": "iana", + "extensions": ["mmr"] + }, + "image/vnd.fujixerox.edmics-rlc": { + "source": "iana", + "extensions": ["rlc"] + }, + "image/vnd.globalgraphics.pgb": { + "source": "iana" + }, + "image/vnd.microsoft.icon": { + "source": "iana" + }, + "image/vnd.mix": { + "source": "iana" + }, + "image/vnd.mozilla.apng": { + "source": "iana" + }, + "image/vnd.ms-modi": { + "source": "iana", + "extensions": ["mdi"] + }, + "image/vnd.ms-photo": { + "source": "apache", + "extensions": ["wdp"] + }, + "image/vnd.net-fpx": { + "source": "iana", + "extensions": ["npx"] + }, + "image/vnd.radiance": { + "source": "iana" + }, + "image/vnd.sealed.png": { + "source": "iana" + }, + "image/vnd.sealedmedia.softseal.gif": { + "source": "iana" + }, + "image/vnd.sealedmedia.softseal.jpg": { + "source": "iana" + }, + "image/vnd.svf": { + "source": "iana" + }, + "image/vnd.tencent.tap": { + "source": "iana" + }, + "image/vnd.valve.source.texture": { + "source": "iana" + }, + "image/vnd.wap.wbmp": { + "source": "iana", + "extensions": ["wbmp"] + }, + "image/vnd.xiff": { + "source": "iana", + "extensions": ["xif"] + }, + "image/vnd.zbrush.pcx": { + "source": "iana" + }, + "image/webp": { + "source": "apache", + "extensions": ["webp"] + }, + "image/x-3ds": { + "source": "apache", + "extensions": ["3ds"] + }, + "image/x-cmu-raster": { + "source": "apache", + "extensions": ["ras"] + }, + "image/x-cmx": { + "source": "apache", + "extensions": ["cmx"] + }, + "image/x-freehand": { + "source": "apache", + "extensions": ["fh", "fhc", "fh4", "fh5", "fh7"] + }, + "image/x-icon": { + "source": "apache", + "compressible": true, + "extensions": ["ico"] + }, + "image/x-jng": { + "source": "nginx", + "extensions": ["jng"] + }, + "image/x-mrsid-image": { + "source": "apache", + "extensions": ["sid"] + }, + "image/x-ms-bmp": { + "source": "nginx", + "compressible": true, + "extensions": ["bmp"] + }, + "image/x-pcx": { + "source": "apache", + "extensions": ["pcx"] + }, + "image/x-pict": { + "source": "apache", + "extensions": ["pic", "pct"] + }, + "image/x-portable-anymap": { + "source": "apache", + "extensions": ["pnm"] + }, + "image/x-portable-bitmap": { + "source": "apache", + "extensions": ["pbm"] + }, + "image/x-portable-graymap": { + "source": "apache", + "extensions": ["pgm"] + }, + "image/x-portable-pixmap": { + "source": "apache", + "extensions": ["ppm"] + }, + "image/x-rgb": { + "source": "apache", + "extensions": ["rgb"] + }, + "image/x-tga": { + "source": "apache", + "extensions": ["tga"] + }, + "image/x-xbitmap": { + "source": "apache", + "extensions": ["xbm"] + }, + "image/x-xcf": { + "compressible": false + }, + "image/x-xpixmap": { + "source": "apache", + "extensions": ["xpm"] + }, + "image/x-xwindowdump": { + "source": "apache", + "extensions": ["xwd"] + }, + "message/cpim": { + "source": "iana" + }, + "message/delivery-status": { + "source": "iana" + }, + "message/disposition-notification": { + "source": "iana" + }, + "message/external-body": { + "source": "iana" + }, + "message/feedback-report": { + "source": "iana" + }, + "message/global": { + "source": "iana" + }, + "message/global-delivery-status": { + "source": "iana" + }, + "message/global-disposition-notification": { + "source": "iana" + }, + "message/global-headers": { + "source": "iana" + }, + "message/http": { + "source": "iana", + "compressible": false + }, + "message/imdn+xml": { + "source": "iana", + "compressible": true + }, + "message/news": { + "source": "iana" + }, + "message/partial": { + "source": "iana", + "compressible": false + }, + "message/rfc822": { + "source": "iana", + "compressible": true, + "extensions": ["eml", "mime"] + }, + "message/s-http": { + "source": "iana" + }, + "message/sip": { + "source": "iana" + }, + "message/sipfrag": { + "source": "iana" + }, + "message/tracking-status": { + "source": "iana" + }, + "message/vnd.si.simp": { + "source": "iana" + }, + "message/vnd.wfa.wsc": { + "source": "iana" + }, + "model/iges": { + "source": "iana", + "compressible": false, + "extensions": ["igs", "iges"] + }, + "model/mesh": { + "source": "iana", + "compressible": false, + "extensions": ["msh", "mesh", "silo"] + }, + "model/vnd.collada+xml": { + "source": "iana", + "extensions": ["dae"] + }, + "model/vnd.dwf": { + "source": "iana", + "extensions": ["dwf"] + }, + "model/vnd.flatland.3dml": { + "source": "iana" + }, + "model/vnd.gdl": { + "source": "iana", + "extensions": ["gdl"] + }, + "model/vnd.gs-gdl": { + "source": "apache" + }, + "model/vnd.gs.gdl": { + "source": "iana" + }, + "model/vnd.gtw": { + "source": "iana", + "extensions": ["gtw"] + }, + "model/vnd.moml+xml": { + "source": "iana" + }, + "model/vnd.mts": { + "source": "iana", + "extensions": ["mts"] + }, + "model/vnd.opengex": { + "source": "iana" + }, + "model/vnd.parasolid.transmit.binary": { + "source": "iana" + }, + "model/vnd.parasolid.transmit.text": { + "source": "iana" + }, + "model/vnd.valve.source.compiled-map": { + "source": "iana" + }, + "model/vnd.vtu": { + "source": "iana", + "extensions": ["vtu"] + }, + "model/vrml": { + "source": "iana", + "compressible": false, + "extensions": ["wrl", "vrml"] + }, + "model/x3d+binary": { + "source": "apache", + "compressible": false, + "extensions": ["x3db", "x3dbz"] + }, + "model/x3d+fastinfoset": { + "source": "iana" + }, + "model/x3d+vrml": { + "source": "apache", + "compressible": false, + "extensions": ["x3dv", "x3dvz"] + }, + "model/x3d+xml": { + "source": "iana", + "compressible": true, + "extensions": ["x3d", "x3dz"] + }, + "model/x3d-vrml": { + "source": "iana" + }, + "multipart/alternative": { + "source": "iana", + "compressible": false + }, + "multipart/appledouble": { + "source": "iana" + }, + "multipart/byteranges": { + "source": "iana" + }, + "multipart/digest": { + "source": "iana" + }, + "multipart/encrypted": { + "source": "iana", + "compressible": false + }, + "multipart/form-data": { + "source": "iana", + "compressible": false + }, + "multipart/header-set": { + "source": "iana" + }, + "multipart/mixed": { + "source": "iana", + "compressible": false + }, + "multipart/parallel": { + "source": "iana" + }, + "multipart/related": { + "source": "iana", + "compressible": false + }, + "multipart/report": { + "source": "iana" + }, + "multipart/signed": { + "source": "iana", + "compressible": false + }, + "multipart/voice-message": { + "source": "iana" + }, + "multipart/x-mixed-replace": { + "source": "iana" + }, + "text/1d-interleaved-parityfec": { + "source": "iana" + }, + "text/cache-manifest": { + "source": "iana", + "compressible": true, + "extensions": ["appcache", "manifest"] + }, + "text/calendar": { + "source": "iana", + "extensions": ["ics", "ifb"] + }, + "text/calender": { + "compressible": true + }, + "text/cmd": { + "compressible": true + }, + "text/coffeescript": { + "extensions": ["coffee", "litcoffee"] + }, + "text/css": { + "source": "iana", + "compressible": true, + "extensions": ["css"] + }, + "text/csv": { + "source": "iana", + "compressible": true, + "extensions": ["csv"] + }, + "text/csv-schema": { + "source": "iana" + }, + "text/directory": { + "source": "iana" + }, + "text/dns": { + "source": "iana" + }, + "text/ecmascript": { + "source": "iana" + }, + "text/encaprtp": { + "source": "iana" + }, + "text/enriched": { + "source": "iana" + }, + "text/fwdred": { + "source": "iana" + }, + "text/grammar-ref-list": { + "source": "iana" + }, + "text/hjson": { + "extensions": ["hjson"] + }, + "text/html": { + "source": "iana", + "compressible": true, + "extensions": ["html", "htm", "shtml"] + }, + "text/jade": { + "extensions": ["jade"] + }, + "text/javascript": { + "source": "iana", + "compressible": true + }, + "text/jcr-cnd": { + "source": "iana" + }, + "text/jsx": { + "compressible": true, + "extensions": ["jsx"] + }, + "text/less": { + "extensions": ["less"] + }, + "text/markdown": { + "source": "iana" + }, + "text/mathml": { + "source": "nginx", + "extensions": ["mml"] + }, + "text/mizar": { + "source": "iana" + }, + "text/n3": { + "source": "iana", + "compressible": true, + "extensions": ["n3"] + }, + "text/parameters": { + "source": "iana" + }, + "text/parityfec": { + "source": "iana" + }, + "text/plain": { + "source": "iana", + "compressible": true, + "extensions": ["txt", "text", "conf", "def", "list", "log", "in", "ini"] + }, + "text/provenance-notation": { + "source": "iana" + }, + "text/prs.fallenstein.rst": { + "source": "iana" + }, + "text/prs.lines.tag": { + "source": "iana", + "extensions": ["dsc"] + }, + "text/raptorfec": { + "source": "iana" + }, + "text/red": { + "source": "iana" + }, + "text/rfc822-headers": { + "source": "iana" + }, + "text/richtext": { + "source": "iana", + "compressible": true, + "extensions": ["rtx"] + }, + "text/rtf": { + "source": "iana", + "compressible": true, + "extensions": ["rtf"] + }, + "text/rtp-enc-aescm128": { + "source": "iana" + }, + "text/rtploopback": { + "source": "iana" + }, + "text/rtx": { + "source": "iana" + }, + "text/sgml": { + "source": "iana", + "extensions": ["sgml", "sgm"] + }, + "text/stylus": { + "extensions": ["stylus", "styl"] + }, + "text/t140": { + "source": "iana" + }, + "text/tab-separated-values": { + "source": "iana", + "compressible": true, + "extensions": ["tsv"] + }, + "text/troff": { + "source": "iana", + "extensions": ["t", "tr", "roff", "man", "me", "ms"] + }, + "text/turtle": { + "source": "iana", + "extensions": ["ttl"] + }, + "text/ulpfec": { + "source": "iana" + }, + "text/uri-list": { + "source": "iana", + "compressible": true, + "extensions": ["uri", "uris", "urls"] + }, + "text/vcard": { + "source": "iana", + "compressible": true, + "extensions": ["vcard"] + }, + "text/vnd.a": { + "source": "iana" + }, + "text/vnd.abc": { + "source": "iana" + }, + "text/vnd.curl": { + "source": "iana", + "extensions": ["curl"] + }, + "text/vnd.curl.dcurl": { + "source": "apache", + "extensions": ["dcurl"] + }, + "text/vnd.curl.mcurl": { + "source": "apache", + "extensions": ["mcurl"] + }, + "text/vnd.curl.scurl": { + "source": "apache", + "extensions": ["scurl"] + }, + "text/vnd.debian.copyright": { + "source": "iana" + }, + "text/vnd.dmclientscript": { + "source": "iana" + }, + "text/vnd.dvb.subtitle": { + "source": "iana", + "extensions": ["sub"] + }, + "text/vnd.esmertec.theme-descriptor": { + "source": "iana" + }, + "text/vnd.fly": { + "source": "iana", + "extensions": ["fly"] + }, + "text/vnd.fmi.flexstor": { + "source": "iana", + "extensions": ["flx"] + }, + "text/vnd.graphviz": { + "source": "iana", + "extensions": ["gv"] + }, + "text/vnd.in3d.3dml": { + "source": "iana", + "extensions": ["3dml"] + }, + "text/vnd.in3d.spot": { + "source": "iana", + "extensions": ["spot"] + }, + "text/vnd.iptc.newsml": { + "source": "iana" + }, + "text/vnd.iptc.nitf": { + "source": "iana" + }, + "text/vnd.latex-z": { + "source": "iana" + }, + "text/vnd.motorola.reflex": { + "source": "iana" + }, + "text/vnd.ms-mediapackage": { + "source": "iana" + }, + "text/vnd.net2phone.commcenter.command": { + "source": "iana" + }, + "text/vnd.radisys.msml-basic-layout": { + "source": "iana" + }, + "text/vnd.si.uricatalogue": { + "source": "iana" + }, + "text/vnd.sun.j2me.app-descriptor": { + "source": "iana", + "extensions": ["jad"] + }, + "text/vnd.trolltech.linguist": { + "source": "iana" + }, + "text/vnd.wap.si": { + "source": "iana" + }, + "text/vnd.wap.sl": { + "source": "iana" + }, + "text/vnd.wap.wml": { + "source": "iana", + "extensions": ["wml"] + }, + "text/vnd.wap.wmlscript": { + "source": "iana", + "extensions": ["wmls"] + }, + "text/vtt": { + "charset": "UTF-8", + "compressible": true, + "extensions": ["vtt"] + }, + "text/x-asm": { + "source": "apache", + "extensions": ["s", "asm"] + }, + "text/x-c": { + "source": "apache", + "extensions": ["c", "cc", "cxx", "cpp", "h", "hh", "dic"] + }, + "text/x-component": { + "source": "nginx", + "extensions": ["htc"] + }, + "text/x-fortran": { + "source": "apache", + "extensions": ["f", "for", "f77", "f90"] + }, + "text/x-gwt-rpc": { + "compressible": true + }, + "text/x-handlebars-template": { + "extensions": ["hbs"] + }, + "text/x-java-source": { + "source": "apache", + "extensions": ["java"] + }, + "text/x-jquery-tmpl": { + "compressible": true + }, + "text/x-lua": { + "extensions": ["lua"] + }, + "text/x-markdown": { + "compressible": true, + "extensions": ["markdown", "md", "mkd"] + }, + "text/x-nfo": { + "source": "apache", + "extensions": ["nfo"] + }, + "text/x-opml": { + "source": "apache", + "extensions": ["opml"] + }, + "text/x-pascal": { + "source": "apache", + "extensions": ["p", "pas"] + }, + "text/x-processing": { + "compressible": true, + "extensions": ["pde"] + }, + "text/x-sass": { + "extensions": ["sass"] + }, + "text/x-scss": { + "extensions": ["scss"] + }, + "text/x-setext": { + "source": "apache", + "extensions": ["etx"] + }, + "text/x-sfv": { + "source": "apache", + "extensions": ["sfv"] + }, + "text/x-suse-ymp": { + "compressible": true, + "extensions": ["ymp"] + }, + "text/x-uuencode": { + "source": "apache", + "extensions": ["uu"] + }, + "text/x-vcalendar": { + "source": "apache", + "extensions": ["vcs"] + }, + "text/x-vcard": { + "source": "apache", + "extensions": ["vcf"] + }, + "text/xml": { + "source": "iana", + "compressible": true, + "extensions": ["xml"] + }, + "text/xml-external-parsed-entity": { + "source": "iana" + }, + "text/yaml": { + "extensions": ["yaml", "yml"] + }, + "video/1d-interleaved-parityfec": { + "source": "apache" + }, + "video/3gpp": { + "source": "apache", + "extensions": ["3gp", "3gpp"] + }, + "video/3gpp-tt": { + "source": "apache" + }, + "video/3gpp2": { + "source": "apache", + "extensions": ["3g2"] + }, + "video/bmpeg": { + "source": "apache" + }, + "video/bt656": { + "source": "apache" + }, + "video/celb": { + "source": "apache" + }, + "video/dv": { + "source": "apache" + }, + "video/h261": { + "source": "apache", + "extensions": ["h261"] + }, + "video/h263": { + "source": "apache", + "extensions": ["h263"] + }, + "video/h263-1998": { + "source": "apache" + }, + "video/h263-2000": { + "source": "apache" + }, + "video/h264": { + "source": "apache", + "extensions": ["h264"] + }, + "video/h264-rcdo": { + "source": "apache" + }, + "video/h264-svc": { + "source": "apache" + }, + "video/jpeg": { + "source": "apache", + "extensions": ["jpgv"] + }, + "video/jpeg2000": { + "source": "apache" + }, + "video/jpm": { + "source": "apache", + "extensions": ["jpm", "jpgm"] + }, + "video/mj2": { + "source": "apache", + "extensions": ["mj2", "mjp2"] + }, + "video/mp1s": { + "source": "apache" + }, + "video/mp2p": { + "source": "apache" + }, + "video/mp2t": { + "source": "apache", + "extensions": ["ts"] + }, + "video/mp4": { + "source": "apache", + "compressible": false, + "extensions": ["mp4", "mp4v", "mpg4"] + }, + "video/mp4v-es": { + "source": "apache" + }, + "video/mpeg": { + "source": "apache", + "compressible": false, + "extensions": ["mpeg", "mpg", "mpe", "m1v", "m2v"] + }, + "video/mpeg4-generic": { + "source": "apache" + }, + "video/mpv": { + "source": "apache" + }, + "video/nv": { + "source": "apache" + }, + "video/ogg": { + "source": "apache", + "compressible": false, + "extensions": ["ogv"] + }, + "video/parityfec": { + "source": "apache" + }, + "video/pointer": { + "source": "apache" + }, + "video/quicktime": { + "source": "apache", + "compressible": false, + "extensions": ["qt", "mov"] + }, + "video/raw": { + "source": "apache" + }, + "video/rtp-enc-aescm128": { + "source": "apache" + }, + "video/rtx": { + "source": "apache" + }, + "video/smpte292m": { + "source": "apache" + }, + "video/ulpfec": { + "source": "apache" + }, + "video/vc1": { + "source": "apache" + }, + "video/vnd.cctv": { + "source": "apache" + }, + "video/vnd.dece.hd": { + "source": "apache", + "extensions": ["uvh", "uvvh"] + }, + "video/vnd.dece.mobile": { + "source": "apache", + "extensions": ["uvm", "uvvm"] + }, + "video/vnd.dece.mp4": { + "source": "apache" + }, + "video/vnd.dece.pd": { + "source": "apache", + "extensions": ["uvp", "uvvp"] + }, + "video/vnd.dece.sd": { + "source": "apache", + "extensions": ["uvs", "uvvs"] + }, + "video/vnd.dece.video": { + "source": "apache", + "extensions": ["uvv", "uvvv"] + }, + "video/vnd.directv.mpeg": { + "source": "apache" + }, + "video/vnd.directv.mpeg-tts": { + "source": "apache" + }, + "video/vnd.dlna.mpeg-tts": { + "source": "apache" + }, + "video/vnd.dvb.file": { + "source": "apache", + "extensions": ["dvb"] + }, + "video/vnd.fvt": { + "source": "apache", + "extensions": ["fvt"] + }, + "video/vnd.hns.video": { + "source": "apache" + }, + "video/vnd.iptvforum.1dparityfec-1010": { + "source": "apache" + }, + "video/vnd.iptvforum.1dparityfec-2005": { + "source": "apache" + }, + "video/vnd.iptvforum.2dparityfec-1010": { + "source": "apache" + }, + "video/vnd.iptvforum.2dparityfec-2005": { + "source": "apache" + }, + "video/vnd.iptvforum.ttsavc": { + "source": "apache" + }, + "video/vnd.iptvforum.ttsmpeg2": { + "source": "apache" + }, + "video/vnd.motorola.video": { + "source": "apache" + }, + "video/vnd.motorola.videop": { + "source": "apache" + }, + "video/vnd.mpegurl": { + "source": "apache", + "extensions": ["mxu", "m4u"] + }, + "video/vnd.ms-playready.media.pyv": { + "source": "apache", + "extensions": ["pyv"] + }, + "video/vnd.nokia.interleaved-multimedia": { + "source": "apache" + }, + "video/vnd.nokia.videovoip": { + "source": "apache" + }, + "video/vnd.objectvideo": { + "source": "apache" + }, + "video/vnd.sealed.mpeg1": { + "source": "apache" + }, + "video/vnd.sealed.mpeg4": { + "source": "apache" + }, + "video/vnd.sealed.swf": { + "source": "apache" + }, + "video/vnd.sealedmedia.softseal.mov": { + "source": "apache" + }, + "video/vnd.uvvu.mp4": { + "source": "apache", + "extensions": ["uvu", "uvvu"] + }, + "video/vnd.vivo": { + "source": "apache", + "extensions": ["viv"] + }, + "video/webm": { + "source": "apache", + "compressible": false, + "extensions": ["webm"] + }, + "video/x-f4v": { + "source": "apache", + "extensions": ["f4v"] + }, + "video/x-fli": { + "source": "apache", + "extensions": ["fli"] + }, + "video/x-flv": { + "source": "apache", + "compressible": false, + "extensions": ["flv"] + }, + "video/x-m4v": { + "source": "apache", + "extensions": ["m4v"] + }, + "video/x-matroska": { + "source": "apache", + "compressible": false, + "extensions": ["mkv", "mk3d", "mks"] + }, + "video/x-mng": { + "source": "apache", + "extensions": ["mng"] + }, + "video/x-ms-asf": { + "source": "apache", + "extensions": ["asf", "asx"] + }, + "video/x-ms-vob": { + "source": "apache", + "extensions": ["vob"] + }, + "video/x-ms-wm": { + "source": "apache", + "extensions": ["wm"] + }, + "video/x-ms-wmv": { + "source": "apache", + "compressible": false, + "extensions": ["wmv"] + }, + "video/x-ms-wmx": { + "source": "apache", + "extensions": ["wmx"] + }, + "video/x-ms-wvx": { + "source": "apache", + "extensions": ["wvx"] + }, + "video/x-msvideo": { + "source": "apache", + "extensions": ["avi"] + }, + "video/x-sgi-movie": { + "source": "apache", + "extensions": ["movie"] + }, + "video/x-smv": { + "source": "apache", + "extensions": ["smv"] + }, + "x-conference/x-cooltalk": { + "source": "apache", + "extensions": ["ice"] + }, + "x-shader/x-fragment": { + "compressible": true + }, + "x-shader/x-vertex": { + "compressible": true + } + }; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/system/index.js +var require_system2 = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/system/index.js"(exports2, module2) { + var system = {}; + module2["exports"] = system; + system.directoryPaths = require_directoryPaths(); + system.mimeTypes = require_mimeTypes(); + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/vehicle/manufacturer.js +var require_manufacturer = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/vehicle/manufacturer.js"(exports2, module2) { + module2["exports"] = [ + "Aston Martin", + "Audi", + "Bentley", + "BMW", + "Bugatti", + "Cadillac", + "Chevrolet", + "Chrysler", + "Dodge", + "Ferrari", + "Fiat", + "Ford", + "Honda", + "Hyundai", + "Jaguar", + "Jeep", + "Kia", + "Lamborghini", + "Land Rover", + "Maserati", + "Mazda", + "Mercedes Benz", + "Mini", + "Nissan", + "Polestar", + "Porsche", + "Rolls Royce", + "Smart", + "Tesla", + "Toyota", + "Volkswagen", + "Volvo" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/vehicle/model.js +var require_model = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/vehicle/model.js"(exports2, module2) { + module2["exports"] = [ + "Fiesta", + "Focus", + "Taurus", + "Mustang", + "Explorer", + "Expedition", + "F-150", + "Model T", + "Ranchero", + "Volt", + "Cruze", + "Malibu", + "Impala", + "Camaro", + "Corvette", + "Colorado", + "Silverado", + "El Camino", + "CTS", + "XTS", + "ATS", + "Escalade", + "Alpine", + "Charger", + "LeBaron", + "PT Cruiser", + "Challenger", + "Durango", + "Grand Caravan", + "Wrangler", + "Grand Cherokee", + "Roadster", + "Model S", + "Model 3", + "Camry", + "Prius", + "Land Cruiser", + "Accord", + "Civic", + "Element", + "Sentra", + "Altima", + "A8", + "A4", + "Beetle", + "Jetta", + "Golf", + "911", + "Spyder", + "Countach", + "Mercielago", + "Aventador", + "1", + "2", + "Fortwo", + "V90", + "XC90", + "CX-9" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/vehicle/vehicle_type.js +var require_vehicle_type = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/vehicle/vehicle_type.js"(exports2, module2) { + module2["exports"] = [ + "Cargo Van", + "Convertible", + "Coupe", + "Crew Cab Pickup", + "Extended Cab Pickup", + "Hatchback", + "Minivan", + "Passenger Van", + "SUV", + "Sedan", + "Wagon" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/vehicle/fuel.js +var require_fuel = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/vehicle/fuel.js"(exports2, module2) { + module2["exports"] = [ + "Diesel", + "Electric", + "Gasoline", + "Hybrid" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/vehicle/bicycle.js +var require_bicycle = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/vehicle/bicycle.js"(exports2, module2) { + module2["exports"] = [ + "Adventure Road Bicycle", + "BMX Bicycle", + "City Bicycle", + "Cruiser Bicycle", + "Cyclocross Bicycle", + "Dual-Sport Bicycle", + "Fitness Bicycle", + "Flat-Foot Comfort Bicycle", + "Folding Bicycle", + "Hybrid Bicycle", + "Mountain Bicycle", + "Recumbent Bicycle", + "Road Bicycle", + "Tandem Bicycle", + "Touring Bicycle", + "Track/Fixed-Gear Bicycle", + "Triathlon/Time Trial Bicycle", + "Tricycle" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/vehicle/index.js +var require_vehicle2 = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/vehicle/index.js"(exports2, module2) { + var vehicle = {}; + module2["exports"] = vehicle; + vehicle.manufacturer = require_manufacturer(); + vehicle.model = require_model(); + vehicle.type = require_vehicle_type(); + vehicle.fuel = require_fuel(); + vehicle.bicycle = require_bicycle(); + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/music/genre.js +var require_genre = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/music/genre.js"(exports2, module2) { + module2["exports"] = [ + "Rock", + "Metal", + "Pop", + "Electronic", + "Folk", + "World", + "Country", + "Jazz", + "Funk", + "Soul", + "Hip Hop", + "Classical", + "Latin", + "Reggae", + "Stage And Screen", + "Blues", + "Non Music", + "Rap" + ]; + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/music/index.js +var require_music2 = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/music/index.js"(exports2, module2) { + var music = {}; + module2["exports"] = music; + music.genre = require_genre(); + } +}); + +// ../../node_modules/@faker-js/faker/lib/locales/en/index.js +var require_en = __commonJS({ + "../../node_modules/@faker-js/faker/lib/locales/en/index.js"(exports2, module2) { + var en = {}; + module2["exports"] = en; + en.title = "English"; + en.separator = " & "; + en.address = require_address2(); + en.animal = require_animal2(); + en.company = require_company2(); + en.internet = require_internet2(); + en.database = require_database2(); + en.lorem = require_lorem2(); + en.name = require_name4(); + en.phone_number = require_phone_number2(); + en.cell_phone = require_cell_phone(); + en.business = require_business(); + en.commerce = require_commerce2(); + en.team = require_team(); + en.hacker = require_hacker2(); + en.app = require_app(); + en.finance = require_finance2(); + en.date = require_date2(); + en.system = require_system2(); + en.vehicle = require_vehicle2(); + en.music = require_music2(); + } +}); + +// ../../node_modules/@faker-js/faker/locale/en.js +var require_en2 = __commonJS({ + "../../node_modules/@faker-js/faker/locale/en.js"(exports2, module2) { + var Faker = require_lib4(); + var faker = new Faker({ locale: "en", localeFallback: "en" }); + faker.locales["en"] = require_en(); + module2["exports"] = faker; + } +}); + +// ../../node_modules/postman-collection/lib/superstring/dynamic-variables.js +var require_dynamic_variables = __commonJS({ + "../../node_modules/postman-collection/lib/superstring/dynamic-variables.js"(exports2, module2) { + var faker = require_en2(); + var uuid = (init_esm_node(), __toCommonJS(esm_node_exports)); + var LOCALES = [ + "af", + "am", + "an", + "ar", + "ast", + "az", + "be", + "bg", + "bh", + "bn", + "br", + "bs", + "ca", + "ceb", + "ckb", + "co", + "cs", + "cy", + "da", + "de", + "el", + "en", + "eo", + "es", + "et", + "eu", + "fa", + "fi", + "fil", + "fo", + "fr", + "fy", + "ga", + "gd", + "gl", + "gn", + "gu", + "ha", + "haw", + "he", + "hi", + "hmn", + "hr", + "ht", + "hu", + "hy", + "ia", + "id", + "ig", + "is", + "it", + "ja", + "jv", + "ka", + "kk", + "km", + "kn", + "ko", + "ku", + "ky", + "la", + "lb", + "ln", + "lo", + "lt", + "lv", + "mg", + "mi", + "mk", + "ml", + "mn", + "mo", + "mr", + "ms", + "mt", + "my", + "nb", + "ne", + "nl", + "nn", + "no", + "ny", + "oc", + "om", + "or", + "pa", + "pl", + "ps", + "pt", + "qu", + "rm", + "ro", + "ru", + "sd", + "sh", + "si", + "sk", + "sl", + "sm", + "sn", + "so", + "sq", + "sr", + "st", + "su", + "sv", + "sw", + "ta", + "te", + "tg", + "th", + "ti", + "tk", + "to", + "tr", + "tt", + "tw", + "ug", + "uk", + "ur", + "uz", + "vi", + "wa", + "xh", + "yi", + "yo", + "zh", + "zu" + ]; + var DIRECTORY_PATHS = [ + "/Applications", + "/bin", + "/boot", + "/boot/defaults", + "/dev", + "/etc", + "/etc/defaults", + "/etc/mail", + "/etc/namedb", + "/etc/periodic", + "/etc/ppp", + "/home", + "/home/user", + "/home/user/dir", + "/lib", + "/Library", + "/lost+found", + "/media", + "/mnt", + "/net", + "/Network", + "/opt", + "/opt/bin", + "/opt/include", + "/opt/lib", + "/opt/sbin", + "/opt/share", + "/private", + "/private/tmp", + "/private/var", + "/proc", + "/rescue", + "/root", + "/sbin", + "/selinux", + "/srv", + "/sys", + "/System", + "/tmp", + "/Users", + "/usr", + "/usr/X11R6", + "/usr/bin", + "/usr/include", + "/usr/lib", + "/usr/libdata", + "/usr/libexec", + "/usr/local/bin", + "/usr/local/src", + "/usr/obj", + "/usr/ports", + "/usr/sbin", + "/usr/share", + "/usr/src", + "/var", + "/var/log", + "/var/mail", + "/var/spool", + "/var/tmp", + "/var/yp" + ]; + var dynamicGenerators = { + $guid: { + description: "A v4 style guid", + generator: function() { + return uuid.v4(); + } + }, + $timestamp: { + description: "The current timestamp", + generator: function() { + return Math.round(Date.now() / 1e3); + } + }, + $isoTimestamp: { + description: "The current ISO timestamp at zero UTC", + generator: function() { + return (/* @__PURE__ */ new Date()).toISOString(); + } + }, + $randomInt: { + description: "A random integer between 0 and 1000", + generator: function() { + return ~~(Math.random() * (1e3 + 1)); + } + }, + // faker.phone.phoneNumber returns phone number with or without + // extension randomly. this only returns a phone number without extension. + $randomPhoneNumber: { + description: "A random 10-digit phone number", + generator: function() { + return faker.phone.phoneNumberFormat(0); + } + }, + // faker.phone.phoneNumber returns phone number with or without + // extension randomly. this only returns a phone number with extension. + $randomPhoneNumberExt: { + description: "A random phone number with extension (12 digits)", + generator: function() { + return faker.datatype.number({ min: 1, max: 99 }) + "-" + faker.phone.phoneNumberFormat(0); + } + }, + // faker's random.locale only returns 'en'. this returns from a list of + // random locales + $randomLocale: { + description: "A random two-letter language code (ISO 639-1)", + generator: function() { + return faker.random.arrayElement(LOCALES); + } + }, + // fakers' random.words returns random number of words between 1, 3. + // this returns number of words between 2, 5. + $randomWords: { + description: "Some random words", + generator: function() { + var words = [], count = faker.datatype.number({ min: 2, max: 5 }), i; + for (i = 0; i < count; i++) { + words.push(faker.random.word()); + } + return words.join(" "); + } + }, + // faker's system.filePath retuns nothing. this returns a path for a file. + $randomFilePath: { + description: "A random file path", + generator: function() { + return dynamicGenerators.$randomDirectoryPath.generator() + "/" + faker.system.fileName(); + } + }, + // faker's system.directoryPath retuns nothing. this returns a path for + // a directory. + $randomDirectoryPath: { + description: "A random directory path", + generator: function() { + return faker.random.arrayElement(DIRECTORY_PATHS); + } + }, + $randomCity: { + description: "A random city name", + generator: faker.address.city + }, + $randomStreetName: { + description: "A random street name", + generator: faker.address.streetName + }, + $randomStreetAddress: { + description: "A random street address (e.g. 1234 Main Street)", + generator: faker.address.streetAddress + }, + $randomCountry: { + description: "A random country", + generator: faker.address.country + }, + $randomCountryCode: { + description: "A random 2-letter country code (ISO 3166-1 alpha-2)", + generator: faker.address.countryCode + }, + $randomLatitude: { + description: "A random latitude coordinate", + generator: faker.address.latitude + }, + $randomLongitude: { + description: "A random longitude coordinate", + generator: faker.address.longitude + }, + $randomColor: { + description: "A random color", + generator: faker.commerce.color + }, + $randomDepartment: { + description: "A random commerce category (e.g. electronics, clothing)", + generator: faker.commerce.department + }, + $randomProductName: { + description: "A random product name (e.g. handmade concrete tuna)", + generator: faker.commerce.productName + }, + $randomProductAdjective: { + description: "A random product adjective (e.g. tasty, eco-friendly)", + generator: faker.commerce.productAdjective + }, + $randomProductMaterial: { + description: "A random product material (e.g. steel, plastic, leather)", + generator: faker.commerce.productMaterial + }, + $randomProduct: { + description: "A random product (e.g. shoes, table, chair)", + generator: faker.commerce.product + }, + $randomCompanyName: { + description: "A random company name", + generator: faker.company.companyName + }, + $randomCompanySuffix: { + description: "A random company suffix (e.g. Inc, LLC, Group)", + generator: faker.company.companySuffix + }, + $randomCatchPhrase: { + description: "A random catchphrase", + generator: faker.company.catchPhrase + }, + $randomBs: { + description: "A random phrase of business speak", + generator: faker.company.bs + }, + $randomCatchPhraseAdjective: { + description: "A random catchphrase adjective", + generator: faker.company.catchPhraseAdjective + }, + $randomCatchPhraseDescriptor: { + description: "A random catchphrase descriptor", + generator: faker.company.catchPhraseDescriptor + }, + $randomCatchPhraseNoun: { + description: "Randomly generates a catchphrase noun", + generator: faker.company.catchPhraseNoun + }, + $randomBsAdjective: { + description: "A random business speak adjective", + generator: faker.company.bsAdjective + }, + $randomBsBuzz: { + description: "A random business speak buzzword", + generator: faker.company.bsBuzz + }, + $randomBsNoun: { + description: "A random business speak noun", + generator: faker.company.bsNoun + }, + $randomDatabaseColumn: { + description: "A random database column name (e.g. updatedAt, token, group)", + generator: faker.database.column + }, + $randomDatabaseType: { + description: "A random database type (e.g. tiny int, double, point)", + generator: faker.database.type + }, + $randomDatabaseCollation: { + description: "A random database collation (e.g. cp1250_bin)", + generator: faker.database.collation + }, + $randomDatabaseEngine: { + description: "A random database engine (e.g. Memory, Archive, InnoDB)", + generator: faker.database.engine + }, + $randomDatePast: { + description: "A random past datetime", + generator: faker.date.past + }, + $randomDateFuture: { + description: "A random future datetime", + generator: faker.date.future + }, + $randomDateRecent: { + description: "A random recent datetime", + generator: faker.date.recent + }, + $randomMonth: { + description: "A random month", + generator: faker.date.month + }, + $randomWeekday: { + description: "A random weekday", + generator: faker.date.weekday + }, + $randomBankAccount: { + description: "A random 8-digit bank account number", + generator: faker.finance.account + }, + $randomBankAccountName: { + description: "A random bank account name (e.g. savings account, checking account)", + generator: faker.finance.accountName + }, + $randomCreditCardMask: { + description: "A random masked credit card number", + generator: faker.finance.mask + }, + $randomPrice: { + description: "A random price between 0.00 and 1000.00", + generator: faker.finance.amount + }, + $randomTransactionType: { + description: "A random transaction type (e.g. invoice, payment, deposit)", + generator: faker.finance.transactionType + }, + $randomCurrencyCode: { + description: "A random 3-letter currency code (ISO-4217)", + generator: faker.finance.currencyCode + }, + $randomCurrencyName: { + description: "A random currency name", + generator: faker.finance.currencyName + }, + $randomCurrencySymbol: { + description: "A random currency symbol", + generator: faker.finance.currencySymbol + }, + $randomBitcoin: { + description: "A random bitcoin address", + generator: faker.finance.bitcoinAddress + }, + $randomBankAccountIban: { + description: "A random 15-31 character IBAN (International Bank Account Number)", + generator: faker.finance.iban + }, + $randomBankAccountBic: { + description: "A random BIC (Bank Identifier Code)", + generator: faker.finance.bic + }, + $randomAbbreviation: { + description: "A random abbreviation", + generator: faker.hacker.abbreviation + }, + $randomAdjective: { + description: "A random adjective", + generator: faker.hacker.adjective + }, + $randomNoun: { + description: "A random noun", + generator: faker.hacker.noun + }, + $randomVerb: { + description: "A random verb", + generator: faker.hacker.verb + }, + $randomIngverb: { + description: "A random verb ending in \u201C-ing\u201D", + generator: faker.hacker.ingverb + }, + $randomPhrase: { + description: "A random phrase", + generator: faker.hacker.phrase + }, + $randomAvatarImage: { + description: "A random avatar image", + generator: () => { + return faker.random.arrayElement([ + // eslint-disable-next-line max-len + `https://cloudflare-ipfs.com/ipfs/Qmd3W5DuhgHirLHGVixi6V76LhCkZUz6pnFt5AJBiyvHye/avatar/${faker.datatype.number(1249)}.jpg`, + `https://avatars.githubusercontent.com/u/${faker.datatype.number(1e8)}` + ]); + } + }, + $randomImageUrl: { + description: "A URL for a random image", + generator: faker.image.imageUrl + }, + $randomAbstractImage: { + description: "A URL for a random abstract image", + generator: faker.image.abstract + }, + $randomAnimalsImage: { + description: "A URL for a random animal image", + generator: faker.image.animals + }, + $randomBusinessImage: { + description: "A URL for a random stock business image", + generator: faker.image.business + }, + $randomCatsImage: { + description: "A URL for a random cat image", + generator: faker.image.cats + }, + $randomCityImage: { + description: "A URL for a random city image", + generator: faker.image.city + }, + $randomFoodImage: { + description: "A URL for a random food image", + generator: faker.image.food + }, + $randomNightlifeImage: { + description: "A URL for a random nightlife image", + generator: faker.image.nightlife + }, + $randomFashionImage: { + description: "A URL for a random fashion image", + generator: faker.image.fashion + }, + $randomPeopleImage: { + description: "A URL for a random image of a person", + generator: faker.image.people + }, + $randomNatureImage: { + description: "A URL for a random nature image", + generator: faker.image.nature + }, + $randomSportsImage: { + description: "A URL for a random sports image", + generator: faker.image.sports + }, + $randomTransportImage: { + description: "A URL for a random transportation image", + generator: faker.image.transport + }, + $randomImageDataUri: { + description: "A random image data URI", + generator: faker.image.dataUri + }, + $randomEmail: { + description: "A random email address", + generator: faker.internet.email + }, + $randomExampleEmail: { + description: "A random email address from an \u201Cexample\u201D domain (e.g. ben@example.com)", + generator: faker.internet.exampleEmail + }, + $randomUserName: { + description: "A random username", + generator: faker.internet.userName + }, + $randomProtocol: { + description: "A random internet protocol", + generator: faker.internet.protocol + }, + $randomUrl: { + description: "A random URL", + generator: faker.internet.url + }, + $randomDomainName: { + description: "A random domain name (e.g. gracie.biz, trevor.info)", + generator: faker.internet.domainName + }, + $randomDomainSuffix: { + description: "A random domain suffix (e.g. .com, .net, .org)", + generator: faker.internet.domainSuffix + }, + $randomDomainWord: { + description: "A random unqualified domain name (a name with no dots)", + generator: faker.internet.domainWord + }, + $randomIP: { + description: "A random IPv4 address", + generator: faker.internet.ip + }, + $randomIPV6: { + description: "A random IPv6 address", + generator: faker.internet.ipv6 + }, + $randomUserAgent: { + description: "A random user agent", + generator: faker.internet.userAgent + }, + $randomHexColor: { + description: "A random hex value", + generator: faker.internet.color + }, + $randomMACAddress: { + description: "A random MAC address", + generator: faker.internet.mac + }, + $randomPassword: { + description: "A random 15-character alpha-numeric password", + generator: faker.internet.password + }, + $randomLoremWord: { + description: "A random word of lorem ipsum text", + generator: faker.lorem.word + }, + $randomLoremWords: { + description: "Some random words of lorem ipsum text", + generator: faker.lorem.words + }, + $randomLoremSentence: { + description: "A random sentence of lorem ipsum text", + generator: faker.lorem.sentence + }, + $randomLoremSlug: { + description: "A random lorem ipsum URL slug", + generator: faker.lorem.slug + }, + $randomLoremSentences: { + description: "A random 2-6 sentences of lorem ipsum text", + generator: faker.lorem.sentences + }, + $randomLoremParagraph: { + description: "A random paragraph of lorem ipsum text", + generator: faker.lorem.paragraph + }, + $randomLoremParagraphs: { + description: "3 random paragraphs of lorem ipsum text", + generator: faker.lorem.paragraphs + }, + $randomLoremText: { + description: "A random amount of lorem ipsum text", + generator: faker.lorem.text + }, + $randomLoremLines: { + description: "1-5 random lines of lorem ipsum", + generator: faker.lorem.lines + }, + $randomFirstName: { + description: "A random first name", + generator: faker.name.firstName + }, + $randomLastName: { + description: "A random last name", + generator: faker.name.lastName + }, + $randomFullName: { + description: "A random first and last name", + generator: faker.name.findName + }, + $randomJobTitle: { + description: "A random job title (e.g. senior software developer)", + generator: faker.name.jobTitle + }, + $randomNamePrefix: { + description: "A random name prefix (e.g. Mr., Mrs., Dr.)", + generator: faker.name.prefix + }, + $randomNameSuffix: { + description: "A random name suffix (e.g. Jr., MD, PhD)", + generator: faker.name.suffix + }, + $randomJobDescriptor: { + description: "A random job descriptor (e.g., senior, chief, corporate, etc.)", + generator: faker.name.jobDescriptor + }, + $randomJobArea: { + description: "A random job area (e.g. branding, functionality, usability)", + generator: faker.name.jobArea + }, + $randomJobType: { + description: "A random job type (e.g. supervisor, manager, coordinator, etc.)", + generator: faker.name.jobType + }, + $randomUUID: { + description: "A random 36-character UUID", + generator: faker.datatype.uuid + }, + $randomBoolean: { + description: "A random boolean value (true/false)", + generator: faker.datatype.boolean + }, + $randomWord: { + description: "A random word", + generator: faker.random.word + }, + $randomAlphaNumeric: { + description: "A random alpha-numeric character", + generator: faker.random.alphaNumeric + }, + $randomFileName: { + description: "A random file name (includes uncommon extensions)", + generator: faker.system.fileName + }, + $randomCommonFileName: { + description: "A random file name", + generator: faker.system.commonFileName + }, + $randomMimeType: { + description: "A random MIME type", + generator: faker.system.mimeType + }, + $randomCommonFileType: { + description: "A random, common file type (e.g., video, text, image, etc.)", + generator: faker.system.commonFileType + }, + $randomCommonFileExt: { + description: "A random, common file extension (.doc, .jpg, etc.)", + generator: faker.system.commonFileExt + }, + $randomFileType: { + description: "A random file type (includes uncommon file types)", + generator: faker.system.fileType + }, + $randomFileExt: { + description: "A random file extension (includes uncommon extensions)", + generator: faker.system.fileExt + }, + $randomSemver: { + description: "A random semantic version number", + generator: faker.system.semver + } + }; + module2.exports = dynamicGenerators; + } +}); + +// ../../node_modules/postman-collection/lib/superstring/index.js +var require_superstring = __commonJS({ + "../../node_modules/postman-collection/lib/superstring/index.js"(exports2, module2) { + var _2 = require_util2().lodash; + var dynamicVariables = require_dynamic_variables(); + var E = ""; + var SuperString; + var Substitutor; + SuperString = function SuperString2(value) { + this.value = _2.isString(value) ? value : _2.isFunction(value.toString) && value.toString() || E; + this.substitutions = 0; + this.replacements = 0; + }; + _2.assign( + SuperString.prototype, + /** @lends SuperString.prototype */ + { + /** + * Equivalent to string replace but performs additional tracking of the number of tokens replaced + * + * @param {RegExp|String} regex - + * @param {Function|String} fn - + * @returns {SuperString} + */ + replace(regex, fn) { + var replacements = 0; + this.value = this.value.replace(regex, _2.isFunction(fn) ? function() { + replacements += 1; + return fn.apply(this, arguments); + } : ( + // this case is returned when replacer is not a function (ensures we do not need to check it) + /* istanbul ignore next */ + function() { + replacements += 1; + return fn; + } + )); + this.replacements = replacements; + replacements && (this.substitutions += 1); + return this; + }, + /** + * @returns {String} + */ + toString() { + return this.value; + }, + /** + * @returns {String} + */ + valueOf() { + return this.value; + } + } + ); + Substitutor = function(variables, defaults) { + defaults && variables.push(defaults); + this.variables = variables; + }; + _2.assign( + Substitutor.prototype, + /** @lends Substitutor.prototype */ + { + /** + * Find a key from the array of variable objects provided to the substitutor + * + * @param {String} key - + * @returns {*} + */ + find(key) { + var arr = this.variables, obj, value, i, ii; + for (i = 0, ii = arr.length; i < ii; i++) { + obj = arr[i]; + if (!(obj && _2.isObject(obj))) { + continue; + } + if (obj.constructor._postman_propertyName === "VariableList") { + value = obj.oneNormalizedVariable(key); + if (value && !value.disabled) { + return value; + } + } else if (_2.has(obj, key)) { + return obj[key]; + } + } + }, + /** + * @param {String} value - + * @returns {String} + */ + parse(value) { + value = new SuperString(value); + var replacer = Substitutor.replacer(this); + do { + value = value.replace(Substitutor.REGEX_EXTRACT_VARS, replacer); + } while (value.replacements && value.substitutions < Substitutor.VARS_SUBREPLACE_LIMIT); + return value; + } + } + ); + _2.assign( + Substitutor, + /** @lends Substitutor */ + { + /** + * Regular expression to be used in {String}.replace for extracting variable substitutions + * + * @readOnly + * @type {RegExp} + */ + REGEX_EXTRACT_VARS: /\{\{([^{}]*?)}}/g, + /** + * Defines the number of times the variable substitution mechanism will repeat until all tokens are resolved + * + * @type {Number} + */ + VARS_SUBREPLACE_LIMIT: 19, + /** + * Maintain a list of types that are native + * + * @readOnly + * @enum {String} + */ + NATIVETYPES: { + string: true, + number: true, + boolean: true + }, + /** + * Holds the default variables that Postman supports. + * + * @type {Object} + */ + DEFAULT_VARS: {}, + /** + * Create an instance of a substitutor or reuse one + * + * @param {Array|Substitutor} variables - + * @param {Object=} defaults An object containing default variables to substitute + * @returns {Substitutor} + */ + box: function(variables, defaults) { + return variables instanceof Substitutor ? variables : new Substitutor(variables, defaults); + }, + /** + * Checks whether a variable is instance of substitutor + * + * @param {*} subject - + * @returns {Boolean} + */ + isInstance: function(subject) { + return subject instanceof Substitutor; + }, + /** + * Get an instance of a function that is useful to be passed to a string replace function for extracting tokens + * and replacing by substitutions + * + * @private + * @param {Substitutor} substitutor - + * @returns {Function} + */ + replacer: function(substitutor) { + return function(match, token) { + var r = substitutor.find(token); + r && _2.isFunction(r) && (r = r()); + r && _2.isFunction(r.toString) && (r = r.toString()); + return Substitutor.NATIVETYPES[typeof r] ? r : match; + }; + } + } + ); + _2.forOwn(dynamicVariables, function(variable, name) { + Substitutor.DEFAULT_VARS[name] = variable.generator; + }); + module2.exports = { + SuperString, + Substitutor + }; + } +}); + +// ../../node_modules/postman-collection/lib/collection/property.js +var require_property = __commonJS({ + "../../node_modules/postman-collection/lib/collection/property.js"(exports2, module2) { + var _2 = require_util2().lodash; + var uuid = (init_esm_node(), __toCommonJS(esm_node_exports)); + var PropertyBase = require_property_base().PropertyBase; + var Description = require_description().Description; + var Substitutor = require_superstring().Substitutor; + var DISABLED = "disabled"; + var DESCRIPTION = "description"; + var REGEX_EXTRACT_VARS = Substitutor.REGEX_EXTRACT_VARS; + var Property; + function _findSubstitutions(value, seen = /* @__PURE__ */ new Set(), result = /* @__PURE__ */ new Set()) { + if (!value || seen.has(value)) { + return result; + } + if (Array.isArray(value)) { + seen.add(value); + for (let i = 0, ii = value.length; i < ii; i++) { + _findSubstitutions(value[i], seen, result); + } + } else if (typeof value === "object") { + seen.add(value); + for (const key in value) { + if (Object.hasOwnProperty.call(value, key)) { + _findSubstitutions(value[key], seen, result); + } + } + } else if (typeof value === "string") { + let match; + while ((match = REGEX_EXTRACT_VARS.exec(value)) !== null) { + result.add(match[0].slice(2, -2)); + } + } + return result; + } + _2.inherit( + /** + * The Property class forms the base of all postman collection SDK elements. This is to be used only for SDK + * development or to extend the SDK with additional functionalities. All SDK classes (constructors) that are + * supposed to be identifyable (i.e. ones that can have a `name` and `id`) are derived from this class. + * + * For more information on what is the structure of the `definition` the function parameter, have a look at + * {@link Property.definition}. + * + * > This is intended to be a private class except for those who want to extend the SDK itself and add more + * > functionalities. + * + * @constructor + * @extends {PropertyBase} + * + * @param {Property.definition=} [definition] Every constructor inherited from `Property` is required to call the + * super constructor function. This implies that construction parameters of every inherited member is propagated + * to be sent up to this point. + * + * @see Property.definition + */ + Property = function PostmanProperty(definition) { + Property.super_.apply(this, arguments); + var src = definition && definition.info || definition, id; + id = src && src.id || this.id || this._ && this._.postman_id || this._postman_propertyRequiresId && uuid.v4(); + id && (this.id = id); + src && src.name && (this.name = src.name); + definition && _2.has(definition, DISABLED) && (this.disabled = Boolean(definition.disabled)); + _2.has(src, DESCRIPTION) && (this.description = _2.createDefined(src, DESCRIPTION, Description, this.description)); + }, + PropertyBase + ); + _2.assign( + Property.prototype, + /** @lends Property.prototype */ + { + /** + * This function allows to describe the property for the purpose of detailed identification or documentation + * generation. This function sets or updates the `description` child-property of this property. + * + * @param {String} content The content of the description can be provided here as a string. Note that it is expected + * that if the content is formatted in any other way than simple text, it should be specified in the subsequent + * `type` parameter. + * @param {String=} [type="text/plain"] The type of the content. + * + * @example Add a description to an instance of Collection + * var Collection = require('postman-collection').Collection, + * mycollection; + * + * // create a blank collection + * myCollection = new Collection(); + * myCollection.describe('Hey! This is a cool collection.'); + * + * console.log(myCollection.description.toString()); // read the description + */ + describe(content, type) { + (Description.isDescription(this.description) ? this.description : this.description = new Description()).update(content, type); + }, + /** + * Returns an object representation of the Property with its variable references substituted. + * + * @example Resolve an object using variable definitions from itself and its parents + * property.toObjectResolved(); + * + * @example Resolve an object using variable definitions on a different object + * property.toObjectResolved(item); + * + * @example Resolve an object using variables definitions as a flat list of variables + * property.toObjectResolved(null, [variablesDefinition1, variablesDefinition1], {ignoreOwnVariables: true}); + * + * @private + * @draft + * @param {?Item|ItemGroup=} [scope] - One can specifically provide an item or group with `.variables`. In + * the event one is not provided, the variables are taken from this object or one from the parent tree. + * @param {Array} overrides - additional objects to lookup for variable values + * @param {Object} [options] - + * @param {Boolean} [options.ignoreOwnVariables] - if set to true, `.variables` on self(or scope) + * will not be used for variable resolution. Only variables in `overrides` will be used for resolution. + * @returns {Object|undefined} + * @throws {Error} If `variables` cannot be resolved up the parent chain. + */ + toObjectResolved(scope, overrides, options) { + var ignoreOwnVariables = options && options.ignoreOwnVariables, variableSourceObj, variables, reference; + reference = this.toJSON(); + _2.isArray(reference.variable) && delete reference.variable; + if (ignoreOwnVariables) { + return Property.replaceSubstitutionsIn(reference, overrides); + } + variableSourceObj = scope || this; + do { + variables = variableSourceObj.variables; + variableSourceObj = variableSourceObj.__parent; + } while (!variables && variableSourceObj); + if (!variables) { + throw Error("Unable to resolve variables. Require a List type property for variable auto resolution."); + } + return variables.substitute(reference, overrides); + }, + /** + * Returns all the substitutions (variables) that are needed (or referenced) in this property (recursively). + * + * @returns {String[]} + * + * @example + * // returns ['host', 'path1'] + * prop.findSubstitutions({request: 'https://{{host}}/{{path1}}-action/'}); + * + * @see {Property.findSubstitutions} + */ + findSubstitutions() { + return Property.findSubstitutions(this.toJSON()); + } + } + ); + _2.assign( + Property, + /** @lends Property */ + { + /** + * Defines the name of this property for internal use. + * + * @private + * @readOnly + * @type {String} + */ + _postman_propertyName: "Property", + /** + * This function accepts a string followed by a number of variable sources as arguments. One or more variable + * sources can be provided and it will use the one that has the value in left-to-right order. + * + * @param {String} str - + * @param {VariableList|Object|Array.} variables - + * @returns {String} + */ + // @todo: improve algorithm via variable replacement caching + replaceSubstitutions: function(str, variables) { + if (!(str && _2.isString(str))) { + return str; + } + !Substitutor.isInstance(variables) && !_2.isArray(variables) && (variables = _2.tail(arguments)); + return Substitutor.box(variables, Substitutor.DEFAULT_VARS).parse(str).toString(); + }, + /** + * This function accepts an object followed by a number of variable sources as arguments. One or more variable + * sources can be provided and it will use the one that has the value in left-to-right order. + * + * @param {Object} obj - + * @param {Array.} variables - + * @returns {Object} + */ + replaceSubstitutionsIn: function(obj, variables) { + if (!(obj && _2.isObject(obj))) { + return obj; + } + variables = Substitutor.box(variables, Substitutor.DEFAULT_VARS); + var customizer = function(objectValue, sourceValue) { + objectValue = objectValue || {}; + if (!_2.isString(sourceValue)) { + _2.forOwn(sourceValue, function(value, key) { + sourceValue[key] = customizer(objectValue[key], value); + }); + return sourceValue; + } + return this.replaceSubstitutions(sourceValue, variables); + }.bind(this); + return _2.mergeWith({}, obj, customizer); + }, + /** + * This function recursively traverses a variable and detects all instances of variable replacements + * within the string of the object + * + * @param {*} obj Any JS variable within which we are trying to discover {{variables}} + * @returns {String[]} + * + * @example + * // returns ['host', 'path1'] + * Property.findSubstitutions({request: 'https://{{host}}/{{path1}}-action/'}); + * + * @todo + * - tonne of scope for performance optimizations + * - accept a reference variable scope so that substitutions can be applied to find recursive + * replacements (e.g. {{hello-{{hi}}-var}}) + */ + findSubstitutions: function(obj) { + return Array.from(_findSubstitutions(obj)); + } + } + ); + module2.exports = { + Property + }; + } +}); + +// ../../node_modules/postman-collection/lib/collection/property-list.js +var require_property_list = __commonJS({ + "../../node_modules/postman-collection/lib/collection/property-list.js"(exports2, module2) { + var _2 = require_util2().lodash; + var PropertyBase = require_property_base().PropertyBase; + var __PARENT = "__parent"; + var DEFAULT_INDEX_ATTR = "id"; + var DEFAULT_INDEXCASE_ATTR = false; + var DEFAULT_INDEXMULTI_ATTR = false; + var PropertyList; + _2.inherit( + /** + * @constructor + * @param {Function} type - + * @param {Object} parent - + * @param {Array} populate - + */ + PropertyList = function PostmanPropertyList(type, parent, populate) { + PropertyList.super_.call(this); + this.setParent(parent); + _2.assign( + this, + /** @lends PropertyList.prototype */ + { + /** + * @private + * @type {Array} + */ + members: this.members || [], + /** + * @private + * @type {Object} + * @note This should not be used, and it's not guaranteed to be in sync with the actual list of members. + */ + reference: this.reference || {}, + /** + * @private + * @type {Function} + */ + Type: type + } + ); + _2.getOwn(type, "_postman_propertyIndexKey") && (this._postman_listIndexKey = type._postman_propertyIndexKey); + _2.getOwn(type, "_postman_propertyIndexCaseInsensitive") && (this._postman_listIndexCaseInsensitive = type._postman_propertyIndexCaseInsensitive); + _2.getOwn(type, "_postman_propertyAllowsMultipleValues") && (this._postman_listAllowsMultipleValues = type._postman_propertyAllowsMultipleValues); + populate && this.populate(populate); + }, + PropertyBase + ); + _2.assign( + PropertyList.prototype, + /** @lends PropertyList.prototype */ + { + /** + * Indicates that this element contains a number of other elements. + * + * @private + */ + _postman_propertyIsList: true, + /** + * Holds the attribute to index this PropertyList by. Default: 'id' + * + * @private + * @type {String} + */ + _postman_listIndexKey: DEFAULT_INDEX_ATTR, + /** + * Holds the attribute whether indexing of this list is case sensitive or not + * + * @private + * @type {String} + */ + _postman_listIndexCaseInsensitive: DEFAULT_INDEXCASE_ATTR, + /** + * Holds the attribute whether exporting the index retains duplicate index items + * + * @private + * @type {String} + */ + _postman_listAllowsMultipleValues: DEFAULT_INDEXMULTI_ATTR, + /** + * Insert an element at the end of this list. When a reference member specified via second parameter is found, the + * member is inserted at an index before the reference member. + * + * @param {PropertyList.Type} item - + * @param {PropertyList.Type|String} [before] - + */ + insert: function(item, before) { + if (!_2.isObject(item)) { + return; + } + var duplicate = this.indexOf(item), index; + PropertyList.isPropertyList(item[__PARENT]) && item[__PARENT] !== this && item[__PARENT].remove(item); + _2.assignHidden(item, __PARENT, this); + duplicate > -1 && this.members.splice(duplicate, 1); + before && (before = this.indexOf(before)); + before > -1 ? this.members.splice(before, 0, item) : this.members.push(item); + if ((index = item[this._postman_listIndexKey]) && (index = String(index))) { + this._postman_listIndexCaseInsensitive && (index = index.toLowerCase()); + if (this._postman_listAllowsMultipleValues && Object.hasOwnProperty.call(this.reference, index)) { + !_2.isArray(this.reference[index]) && (this.reference[index] = [this.reference[index]]); + this.reference[index].push(item); + } else { + this.reference[index] = item; + } + } + }, + /** + * Insert an element at the end of this list. When a reference member specified via second parameter is found, the + * member is inserted at an index after the reference member. + * + * @param {PropertyList.Type} item - + * @param {PropertyList.Type|String} [after] - + */ + insertAfter: function(item, after) { + return this.insert(item, this.idx(this.indexOf(after) + 1)); + }, + /** + * Adds or moves an item to the end of this list. + * + * @param {PropertyList.Type} item - + */ + append: function(item) { + return this.insert(item); + }, + /** + * Adds or moves an item to the beginning of this list. + * + * @param {PropertyList.Type} item - + */ + prepend: function(item) { + return this.insert(item, this.idx(0)); + }, + /** + * Add an item or item definition to this list. + * + * @param {Object|PropertyList.Type} item - + * @todo + * - remove item from original parent if already it has a parent + * - validate that the original parent's constructor matches this parent's constructor + */ + add: function(item) { + if (_2.isNull(item) || _2.isUndefined(item) || _2.isNaN(item)) { + return; + } + this.insert(item.constructor === this.Type ? item : ( + // if the property has a create static function, use it. + // eslint-disable-next-line prefer-spread + _2.has(this.Type, "create") ? this.Type.create.apply(this.Type, arguments) : new this.Type(item) + )); + }, + /** + * Add an item or update an existing item + * + * @param {PropertyList.Type} item - + * @returns {?Boolean} + */ + upsert: function(item) { + if (_2.isNil(item) || _2.isNaN(item)) { + return null; + } + var indexer = this._postman_listIndexKey, existing = this.one(item[indexer]); + if (existing) { + if (!_2.isFunction(existing.update)) { + throw new Error("collection: unable to upsert into a list of Type that does not support .update()"); + } + existing.update(item); + return false; + } + this.add(item); + return true; + }, + /** + * Removes all elements from the PropertyList for which the predicate returns truthy. + * + * @param {Function|String|PropertyList.Type} predicate - + * @param {Object} context Optional context to bind the predicate to. + */ + remove: function(predicate, context) { + var match; + !context && (context = this); + if (_2.isString(predicate)) { + match = this._postman_listIndexCaseInsensitive ? predicate.toLowerCase() : predicate; + predicate = function(item) { + var id = item[this._postman_listIndexKey]; + this._postman_listIndexCaseInsensitive && (id = id.toLowerCase()); + return id === match; + }.bind(this); + } else if (predicate instanceof this.Type) { + match = predicate; + predicate = function(item) { + return item === match; + }; + } + _2.isFunction(predicate) && _2.remove(this.members, function(item) { + var index; + if (predicate.apply(context, arguments)) { + if ((index = item[this._postman_listIndexKey]) && (index = String(index))) { + this._postman_listIndexCaseInsensitive && (index = index.toLowerCase()); + if (this._postman_listAllowsMultipleValues && _2.isArray(this.reference[index])) { + _2.remove(this.reference[index], function(each) { + return each === item; + }); + this.reference[index].length === 0 && delete this.reference[index]; + this.reference[index].length === 1 && (this.reference[index] = this.reference[index][0]); + } else { + delete this.reference[index]; + } + } + delete item[__PARENT]; + return true; + } + }.bind(this)); + }, + /** + * Removes all items in the list + */ + clear: function() { + this.all().forEach(PropertyList._unlinkItemFromParent); + this.members.length = 0; + Object.keys(this.reference).forEach(function(key) { + delete this.reference[key]; + }.bind(this)); + }, + /** + * Load one or more items + * + * @param {Object|Array} items - + */ + populate: function(items) { + _2.isString(items) && _2.isFunction(this.Type.parse) && (items = this.Type.parse(items)); + _2.forEach(_2.isArray(items) ? items : ( + // if population is not an array, we send this as single item in an array or send each property separately + // if the core Type supports Type.create + _2.isPlainObject(items) && _2.has(this.Type, "create") ? items : [items] + ), this.add.bind(this)); + }, + /** + * Clears the list and adds new items. + * + * @param {Object|Array} items - + */ + repopulate: function(items) { + this.clear(); + this.populate(items); + }, + /** + * Add or update values from a source list. + * + * @param {PropertyList|Array} source - + * @param {Boolean} [prune=false] Setting this to `true` will cause the extra items from the list to be deleted + */ + assimilate: function(source, prune) { + var members = PropertyList.isPropertyList(source) ? source.members : source, list = this, indexer = list._postman_listIndexKey, sourceKeys = {}; + if (!_2.isArray(members)) { + return; + } + members.forEach(function(item) { + if (!(item && _2.has(item, indexer))) { + return; + } + list.upsert(item); + sourceKeys[item[indexer]] = true; + }); + if (prune) { + _2.forEach(list.reference, function(value, key) { + if (_2.has(sourceKeys, key)) { + return; + } + list.remove(key); + }); + } + }, + /** + * Returns a map of all items. + * + * @returns {Object} + */ + all: function() { + return _2.clone(this.members); + }, + /** + * Get Item in this list by `ID` reference. If multiple values are allowed, the last value is returned. + * + * @param {String} id - + * @returns {PropertyList.Type} + */ + one: function(id) { + var val = this.reference[this._postman_listIndexCaseInsensitive ? String(id).toLowerCase() : id]; + if (this._postman_listAllowsMultipleValues && Array.isArray(val)) { + return val.length ? val[val.length - 1] : ( + /* istanbul ignore next */ + void 0 + ); + } + return val; + }, + /** + * Get the value of an item in this list. This is similar to {@link PropertyList.one} barring the fact that it + * returns the value of the underlying type of the list content instead of the item itself. + * + * @param {String|Function} key - + * @returns {PropertyList.Type|*} + */ + get: function(key) { + var member = this.one(key); + if (!member) { + return; + } + return member.valueOf(); + }, + /** + * Iterate on each item of this list. + * + * @param {Function} iterator - + * @param {Object} context - + */ + each: function(iterator, context) { + _2.forEach(this.members, _2.isFunction(iterator) ? iterator.bind(context || this.__parent) : iterator); + }, + /** + * @param {Function} rule - + * @param {Object} context - + */ + filter: function(rule, context) { + return _2.filter(this.members, _2.isFunction(rule) && _2.isObject(context) ? rule.bind(context) : rule); + }, + /** + * Find an item within the item group + * + * @param {Function} rule - + * @param {Object} [context] - + * @returns {Item|ItemGroup} + */ + find: function(rule, context) { + return _2.find(this.members, _2.isFunction(rule) && _2.isObject(context) ? rule.bind(context) : rule); + }, + /** + * Iterates over the property list. + * + * @param {Function} iterator Function to call on each item. + * @param {Object} context Optional context, defaults to the PropertyList itself. + */ + map: function(iterator, context) { + return _2.map(this.members, _2.isFunction(iterator) ? iterator.bind(context || this) : iterator); + }, + /** + * Iterates over the property list and accumulates the result. + * + * @param {Function} iterator Function to call on each item. + * @param {*} accumulator Accumulator initial value + * @param {Object} context Optional context, defaults to the PropertyList itself. + */ + reduce: function(iterator, accumulator, context) { + return _2.reduce( + this.members, + _2.isFunction(iterator) ? iterator.bind(context || this) : ( + /* istanbul ignore next */ + iterator + ), + accumulator + ); + }, + /** + * Returns the length of the PropertyList + * + * @returns {Number} + */ + count: function() { + return this.members.length; + }, + /** + * Get a member of this list by it's index + * + * @param {Number} index - + * @returns {PropertyList.Type} + */ + idx: function(index) { + return this.members[index]; + }, + /** + * Find the index of an item in this list + * + * @param {String|Object} item - + * @returns {Number} + */ + indexOf: function(item) { + return this.members.indexOf(_2.isString(item) ? item = this.one(item) : item); + }, + /** + * Check whether an item exists in this list + * + * @param {String|PropertyList.Type} item - + * @param {*=} value - + * @returns {Boolean} + */ + has: function(item, value) { + var match, val, i; + match = _2.isString(item) ? this.reference[this._postman_listIndexCaseInsensitive ? item.toLowerCase() : item] : this.filter(function(member) { + return member === item; + }); + if (!match) { + return false; + } + if (arguments.length === 1) { + return Boolean(_2.isArray(match) ? match.length : match); + } + if (this._postman_listAllowsMultipleValues && _2.isArray(match)) { + for (i = 0; i < match.length; i++) { + val = _2.isFunction(match[i].valueOf) ? match[i].valueOf() : ( + /* istanbul ignore next */ + match[i] + ); + if (val === value) { + return true; + } + } + return false; + } + _2.isFunction(match.valueOf) && (match = match.valueOf()); + return match === value; + }, + /** + * Iterates over all parents of the property list + * + * @param {Function} iterator - + * @param {Object=} [context] - + */ + eachParent: function(iterator, context) { + if (!_2.isFunction(iterator)) { + return; + } + !context && (context = this); + var parent = this.__parent, prev; + while (parent) { + iterator.call(context, parent, prev); + prev = parent; + parent = parent.__parent; + } + }, + /** + * Converts a list of Properties into an object where key is `_postman_propertyIndexKey` and value is determined + * by the `valueOf` function + * + * @param {?Boolean} [excludeDisabled=false] - When set to true, disabled properties are excluded from the resultant + * object. + * @param {?Boolean} [caseSensitive] - When set to true, properties are treated strictly as per their original + * case. The default value for this property also depends on the case insensitivity definition of the current + * property. + * @param {?Boolean} [multiValue=false] - When set to true, only the first value of a multi valued property is + * returned. + * @param {Boolean} [sanitizeKeys=false] - When set to true, properties with falsy keys are removed. + * @todo Change the function signature to an object of options instead of the current structure. + * @returns {Object} + */ + toObject: function(excludeDisabled, caseSensitive, multiValue, sanitizeKeys) { + var obj = {}, key = this._postman_listIndexKey, sanitiseKeys = this._postman_sanitizeKeys || sanitizeKeys, sensitive = !this._postman_listIndexCaseInsensitive || caseSensitive, multivalue = this._postman_listAllowsMultipleValues || multiValue; + this.each(function(member) { + if (!member || !_2.has(member, key) || excludeDisabled && member.disabled || sanitiseKeys && !member[key]) { + return; + } + var prop = sensitive ? member[key] : String(member[key]).toLowerCase(); + if (multivalue && _2.has(obj, prop)) { + !Array.isArray(obj[prop]) && (obj[prop] = [obj[prop]]); + obj[prop].push(member.valueOf()); + } else { + obj[prop] = member.valueOf(); + } + }); + return obj; + }, + /** + * Adds ability to convert a list to a string provided it's underlying format has unparse function defined. + * + * @returns {String} + */ + toString: function() { + if (this.Type.unparse) { + return this.Type.unparse(this.members); + } + return this.constructor ? this.constructor.prototype.toString.call(this) : ""; + }, + toJSON: function() { + if (!this.count()) { + return []; + } + return _2.map(this.members, function(member) { + if (!_2.isEmpty(member) && _2.isFunction(member.toJSON)) { + return member.toJSON(); + } + return _2.reduce(member, function(accumulator, value, key) { + if (value === void 0) { + return accumulator; + } + if (value && value._postman_propertyIsList && !value._postman_proprtyIsSerialisedAsPlural && _2.endsWith(key, "s")) { + key = key.slice(0, -1); + } + if (value && _2.isFunction(value.toJSON)) { + accumulator[key] = value.toJSON(); + return accumulator; + } + if (_2.isString(value)) { + accumulator[key] = value; + return accumulator; + } + accumulator[key] = _2.cloneElement(value); + return accumulator; + }, {}); + }); + } + } + ); + _2.assign( + PropertyList, + /** @lends PropertyList */ + { + /** + * Defines the name of this property for internal use. + * + * @private + * @readOnly + * @type {String} + */ + _postman_propertyName: "PropertyList", + /** + * Removes child-parent links for the provided PropertyList member. + * + * @param {Property} item - The property for which to perform parent de-linking. + * @private + */ + _unlinkItemFromParent: function(item) { + item.__parent && delete item.__parent; + }, + /** + * Checks whether an object is a PropertyList + * + * @param {*} obj - + * @returns {Boolean} + */ + isPropertyList: function(obj) { + return Boolean(obj) && (obj instanceof PropertyList || _2.inSuperChain(obj.constructor, "_postman_propertyName", PropertyList._postman_propertyName)); + } + } + ); + module2.exports = { + PropertyList + }; + } +}); + +// ../../node_modules/postman-url-encoder/parser/replacement-tracker.js +var require_replacement_tracker = __commonJS({ + "../../node_modules/postman-url-encoder/parser/replacement-tracker.js"(exports2, module2) { + var ReplacementTracker = class { + constructor() { + this.replacements = []; + this._offset = 0; + this._length = 0; + } + /** + * Add new replacement to track. + * + * @param {String} value - + * @param {Number} index - + */ + add(value, index) { + this.replacements.push({ + value, + index: index - this._offset + }); + this._offset += value.length - 1; + this._length++; + } + /** + * Returns the total number of replacements. + * + * @returns {Number} + */ + count() { + return this._length; + } + /** + * Finds the lower index of replacement position for a given value using inexact + * binary search. + * + * @private + * @param {Number} index - + * @returns {Number} + */ + _findLowerIndex(index) { + let length = this.count(), start = 0, end = length - 1, mid; + while (start <= end) { + mid = start + end >> 1; + if (this.replacements[mid].index >= index) { + end = mid - 1; + } else { + start = mid + 1; + } + } + return start >= length ? -1 : start; + } + /** + * Patches a given string by apply all the applicable replacements done in the + * given range. + * + * @private + * @param {String} input - + * @param {Number} beginIndex - + * @param {Number} endIndex - + * @returns {String} + */ + _applyInString(input, beginIndex, endIndex) { + let index, replacement, replacementIndex, replacementValue, offset = 0, length = this.count(); + if (!input || (index = this._findLowerIndex(beginIndex)) === -1) { + return input; + } + do { + replacement = this.replacements[index]; + replacementIndex = replacement.index; + replacementValue = replacement.value; + if (replacementIndex >= endIndex) { + break; + } + replacementIndex = offset + replacementIndex - beginIndex; + input = input.slice(0, replacementIndex) + replacementValue + input.slice(replacementIndex + 1); + offset += replacementValue.length - 1; + } while (++index < length); + return input; + } + /** + * Patches a given string or array of strings by apply all the applicable + * replacements done in the given range. + * + * @param {String|String[]} input - + * @param {Number} beginIndex - + * @param {Number} endIndex - + * @returns {String|String[]} + */ + apply(input, beginIndex, endIndex) { + let i, ii, length, _endIndex, _beginIndex, value = input; + if (typeof input === "string") { + return this._applyInString(input, beginIndex, endIndex); + } + _beginIndex = beginIndex; + for (i = 0, ii = input.length; i < ii; ++i) { + value = input[i]; + _endIndex = _beginIndex + (length = value.length); + input[i] = this._applyInString(value, _beginIndex, _endIndex); + _beginIndex += length + 1; + } + return input; + } + }; + module2.exports = ReplacementTracker; + } +}); + +// ../../node_modules/postman-url-encoder/parser/index.js +var require_parser = __commonJS({ + "../../node_modules/postman-url-encoder/parser/index.js"(exports2, module2) { + var ReplacementTracker = require_replacement_tracker(); + var REGEX_ALL_BACKSLASHES = /\\/g; + var REGEX_LEADING_SLASHES = /^\/+/; + var REGEX_ALL_VARIABLES = /{{[^{}]*[.:/?#@&\]][^{}]*}}/g; + var HASH_SEPARATOR = "#"; + var PATH_SEPARATOR = "/"; + var PORT_SEPARATOR = ":"; + var AUTH_SEPARATOR = "@"; + var QUERY_SEPARATOR = "?"; + var DOMAIN_SEPARATOR = "."; + var PROTOCOL_SEPARATOR = "://"; + var AUTH_SEGMENTS_SEPARATOR = ":"; + var QUERY_SEGMENTS_SEPARATOR = "&"; + var E = ""; + var STRING = "string"; + var FILE_PROTOCOL = "file"; + var SAFE_REPLACE_CHAR = "_"; + var CLOSING_SQUARE_BRACKET = "]"; + var URL_PROPERTIES_ORDER = ["protocol", "auth", "host", "port", "path", "query", "hash"]; + function normalizeVariables(str, replacements) { + let normalizedString = E, pointer = 0, variable, match, index; + while ((match = REGEX_ALL_VARIABLES.exec(str)) !== null) { + variable = match[0]; + index = match.index; + normalizedString += str.slice(pointer, index) + SAFE_REPLACE_CHAR; + replacements.add(variable, index); + pointer = index + variable.length; + } + if (pointer === 0) { + return str; + } + if (pointer < str.length) { + normalizedString += str.slice(pointer); + } + return normalizedString; + } + function applyReplacements(url, replacements) { + let i, ii, prop; + for (i = 0, ii = URL_PROPERTIES_ORDER.length; i < ii; ++i) { + prop = url[URL_PROPERTIES_ORDER[i]]; + if (!(prop && prop.value)) { + continue; + } + prop.value = replacements.apply(prop.value, prop.beginIndex, prop.endIndex); + } + return url; + } + function parse2(urlString) { + let url = { + protocol: { value: void 0, beginIndex: 0, endIndex: 0 }, + auth: { value: void 0, beginIndex: 0, endIndex: 0 }, + host: { value: void 0, beginIndex: 0, endIndex: 0 }, + port: { value: void 0, beginIndex: 0, endIndex: 0 }, + path: { value: void 0, beginIndex: 0, endIndex: 0 }, + query: { value: void 0, beginIndex: 0, endIndex: 0 }, + hash: { value: void 0, beginIndex: 0, endIndex: 0 } + }, parsedUrl = { + raw: urlString, + protocol: void 0, + auth: void 0, + host: void 0, + port: void 0, + path: void 0, + query: void 0, + hash: void 0 + }, replacements = new ReplacementTracker(), pointer = 0, _length, length, index, port; + if (!(urlString && typeof urlString === STRING)) { + return parsedUrl; + } + parsedUrl.raw = urlString = urlString.trimLeft(); + urlString = normalizeVariables(urlString, replacements); + length = urlString.length; + if ((index = urlString.indexOf(HASH_SEPARATOR)) !== -1) { + url.hash.value = urlString.slice(index + 1); + url.hash.beginIndex = pointer + index + 1; + url.hash.endIndex = pointer + length; + urlString = urlString.slice(0, length = index); + } + if ((index = urlString.indexOf(QUERY_SEPARATOR)) !== -1) { + url.query.value = urlString.slice(index + 1).split(QUERY_SEGMENTS_SEPARATOR); + url.query.beginIndex = pointer + index + 1; + url.query.endIndex = pointer + length; + urlString = urlString.slice(0, length = index); + } + urlString = urlString.replace(REGEX_ALL_BACKSLASHES, PATH_SEPARATOR); + if ((index = urlString.indexOf(PROTOCOL_SEPARATOR)) !== -1) { + url.protocol.value = urlString.slice(0, index); + url.protocol.beginIndex = pointer; + url.protocol.endIndex = pointer + index; + urlString = urlString.slice(index + 3); + length -= index + 3; + pointer += index + 3; + _length = length; + urlString = urlString.replace( + REGEX_LEADING_SLASHES, + url.protocol.value.toLowerCase() === FILE_PROTOCOL ? ( + // file:////path -> file:///path + PATH_SEPARATOR + ) : ( + // protocol:////host/path -> protocol://host/path + E + ) + ); + length = urlString.length; + pointer += _length - length; + } + if ((index = urlString.indexOf(PATH_SEPARATOR)) !== -1) { + url.path.value = urlString.slice(index + 1).split(PATH_SEPARATOR); + url.path.beginIndex = pointer + index + 1; + url.path.endIndex = pointer + length; + urlString = urlString.slice(0, length = index); + } + if ((index = urlString.lastIndexOf(AUTH_SEPARATOR)) !== -1) { + url.auth.value = urlString.slice(0, index); + url.auth.beginIndex = pointer; + url.auth.endIndex = pointer + index; + urlString = urlString.slice(index + 1); + length -= index + 1; + pointer += index + 1; + if ((index = url.auth.value.indexOf(AUTH_SEGMENTS_SEPARATOR)) !== -1) { + url.auth.value = [url.auth.value.slice(0, index), url.auth.value.slice(index + 1)]; + } else { + url.auth.value = [url.auth.value]; + } + } + if ((index = urlString.lastIndexOf(PORT_SEPARATOR)) !== -1 && // eslint-disable-next-line lodash/prefer-includes + (port = urlString.slice(index + 1)).indexOf(CLOSING_SQUARE_BRACKET) === -1) { + url.port.value = port; + url.port.beginIndex = pointer + index + 1; + url.port.endIndex = pointer + length; + urlString = urlString.slice(0, length = index); + } + if (urlString) { + url.host.value = urlString.split(DOMAIN_SEPARATOR); + url.host.beginIndex = pointer; + url.host.endIndex = pointer + length; + } + replacements.count() && applyReplacements(url, replacements); + parsedUrl.protocol = url.protocol.value; + parsedUrl.auth = url.auth.value; + parsedUrl.host = url.host.value; + parsedUrl.port = url.port.value; + parsedUrl.path = url.path.value; + parsedUrl.query = url.query.value; + parsedUrl.hash = url.hash.value; + return parsedUrl; + } + module2.exports = { + parse: parse2 + }; + } +}); + +// ../../node_modules/postman-collection/lib/collection/query-param.js +var require_query_param = __commonJS({ + "../../node_modules/postman-collection/lib/collection/query-param.js"(exports2, module2) { + var _2 = require_util2().lodash; + var Property = require_property().Property; + var PropertyList = require_property_list().PropertyList; + var E = ""; + var AMPERSAND = "&"; + var STRING = "string"; + var EQUALS = "="; + var EMPTY = ""; + var HASH = "#"; + var REGEX_HASH = /#/g; + var REGEX_EQUALS = /=/g; + var REGEX_AMPERSAND = /&/g; + var REGEX_EXTRACT_VARS = /{{[^{}]*[&#=][^{}]*}}/g; + var QueryParam; + var encodeReservedChars = function(str, encodeEquals) { + if (!str) { + return str; + } + str.indexOf(AMPERSAND) !== -1 && (str = str.replace(REGEX_AMPERSAND, "%26")); + str.indexOf(HASH) !== -1 && (str = str.replace(REGEX_HASH, "%23")); + encodeEquals && str.indexOf(EQUALS) !== -1 && (str = str.replace(REGEX_EQUALS, "%3D")); + return str; + }; + var normalizeParam = function(str, encodeEquals) { + if (!(str && typeof str === STRING)) { + return str; + } + if (str.indexOf(AMPERSAND) === -1 && str.indexOf(HASH) === -1) { + if (!(encodeEquals && str.indexOf(EQUALS) !== -1)) { + return str; + } + } + var normalizedString = "", pointer = 0, variable, match, index; + while ((match = REGEX_EXTRACT_VARS.exec(str)) !== null) { + variable = match[0]; + index = match.index; + normalizedString += encodeReservedChars(str.slice(pointer, index), encodeEquals) + variable; + pointer = index + variable.length; + } + if (pointer < str.length) { + normalizedString += encodeReservedChars(str.slice(pointer), encodeEquals); + } + return normalizedString; + }; + _2.inherit( + /** + * Represents a URL query parameter, which can exist in request URL or POST data. + * + * @constructor + * @extends {Property} + * @param {FormParam.definition|String} options Pass the initial definition of the query parameter. In case of + * string, the query parameter is parsed using {@link QueryParam.parseSingle}. + */ + QueryParam = function PostmanQueryParam(options) { + QueryParam.super_.apply(this, arguments); + this.update(options); + }, + Property + ); + _2.assign( + QueryParam.prototype, + /** @lends QueryParam.prototype */ + { + /** + * Converts the QueryParameter to a single param string. + * + * @returns {String} + */ + toString() { + return QueryParam.unparseSingle(this); + }, + /** + * Updates the key and value of the query parameter + * + * @param {String|Object} param - + * @param {String} param.key - + * @param {String=} [param.value] - + */ + update(param) { + _2.assign( + this, + /** @lends QueryParam.prototype */ + _2.isString(param) ? QueryParam.parseSingle(param) : { + key: _2.get(param, "key"), + // we do not replace falsey with blank string since null has a meaning + value: _2.get(param, "value") + } + ); + _2.has(param, "system") && (this.system = param.system); + }, + valueOf() { + return _2.isString(this.value) ? this.value : EMPTY; + } + } + ); + _2.assign( + QueryParam, + /** @lends QueryParam */ + { + /** + * Defines the name of this property for internal use. + * + * @private + * @readOnly + * @type {String} + */ + _postman_propertyName: "QueryParam", + /** + * Declare the list index key, so that property lists of query parameters work correctly + * + * @type {String} + */ + _postman_propertyIndexKey: "key", + /** + * Query params can have multiple values, so set this to true. + * + * @type {Boolean} + */ + _postman_propertyAllowsMultipleValues: true, + /** + * Parse a query string into an array of objects, where each object contains a key and a value. + * + * @param {String} query - + * @returns {Array} + */ + parse: function(query) { + return _2.isString(query) ? query.split(AMPERSAND).map(QueryParam.parseSingle) : []; + }, + /** + * Parses a single query parameter. + * + * @param {String} param - + * @param {Number} idx - + * @param {String[]} all - array of all params, in case this is being called while parsing multiple params. + * @returns {{key: String|null, value: String|null}} + */ + parseSingle: function(param, idx, all) { + if (param === EMPTY && // if param is empty + _2.isNumber(idx) && // this and the next condition ensures that this is part of a map call + _2.isArray(all) && idx !== (all && all.length - 1)) { + return { key: null, value: null }; + } + var index = typeof param === STRING ? param.indexOf(EQUALS) : -1, paramObj = {}; + if (index < 0) { + paramObj.key = param.substr(0, param.length); + paramObj.value = null; + } else { + paramObj.key = param.substr(0, index); + paramObj.value = param.substr(index + 1); + } + return paramObj; + }, + /** + * Create a query string from array of parameters (or object of key-values). + * + * @note Disabled parameters are excluded. + * + * @param {Array|Object} params - + * @returns {String} + */ + unparse: function(params) { + if (!params) { + return EMPTY; + } + var str, firstEnabledParam = true; + if (!_2.isArray(params) && !PropertyList.isPropertyList(params)) { + return _2.reduce(params, function(result, value, key) { + result && (result += AMPERSAND); + return result + QueryParam.unparseSingle({ key, value }); + }, EMPTY); + } + str = params.reduce(function(result, param) { + if (param.disabled === true) { + return result; + } + if (firstEnabledParam) { + firstEnabledParam = false; + } else { + result += AMPERSAND; + } + return result + QueryParam.unparseSingle(param); + }, EMPTY); + return str; + }, + /** + * Takes a query param and converts to string + * + * @param {Object} obj - + * @returns {String} + */ + unparseSingle: function(obj) { + if (!obj) { + return EMPTY; + } + var key = obj.key, value = obj.value, result; + if (typeof key === STRING) { + result = normalizeParam(key, true); + } else { + result = E; + } + if (typeof value === STRING) { + result += EQUALS + normalizeParam(value); + } + return result; + } + } + ); + module2.exports = { + QueryParam + }; + } +}); + +// ../../node_modules/postman-collection/lib/collection/variable.js +var require_variable = __commonJS({ + "../../node_modules/postman-collection/lib/collection/variable.js"(exports2, module2) { + var _2 = require_util2().lodash; + var Property = require_property().Property; + var E = ""; + var ANY = "any"; + var NULL = "null"; + var STRING = "string"; + var Variable; + _2.inherit( + /** + * A variable inside a collection is similar to variables in any programming construct. The variable has an + * identifier name (provided by its id) and a value. A variable is optionally accompanied by a variable type. One + * or more variables can be associated with a collection and can be referred from anywhere else in the collection + * using the double-brace {{variable-id}} format. Properties can then use the `.toObjectResolved` function to + * procure an object representation of the property with all variable references replaced by corresponding values. + * + * @constructor + * @extends {Property} + * @param {Variable.definition=} [definition] - Specify the initial value and type of the variable. + */ + Variable = function PostmanVariable(definition) { + Variable.super_.apply(this, arguments); + var indexer = this.constructor._postman_propertyIndexKey; + _2.assign( + this, + /** @lends Variable.prototype */ + { + /** + * @type {Variable.types} + */ + type: ANY, + /** + * @type {*} + */ + value: void 0 + } + ); + if (!_2.isNil(definition)) { + _2.has(definition, indexer) && (this[indexer] = definition[indexer]); + this.update(definition); + } + }, + Property + ); + _2.assign( + Variable.prototype, + /** @lends Variable.prototype */ + { + /** + * Gets the value of the variable. + * + * @returns {Variable.types} + */ + get() { + return _2.isFunction(this.value) ? this.castOut(this.value()) : this.castOut(this.value); + }, + /** + * Sets the value of the variable. + * + * @param {*} value - + */ + set(value) { + this.value = _2.isFunction(value) ? value : this.castIn(value); + }, + /** + * An alias of this.get and this.set. + * + * @param {*=} [value] - + * @returns {*} + */ + valueOf(value) { + arguments.length && this.set(value); + return this.get(); + }, + /** + * Returns the stringified value of the variable. + * + * @returns {String} + */ + toString() { + var value = this.valueOf(); + if (value === null) { + return NULL; + } + return !_2.isNil(value) && _2.isFunction(value.toString) ? value.toString() : E; + }, + /** + * Typecasts a value to the {@link Variable.types} of this {@link Variable}. Returns the value of the variable + * converted to the type specified in {@link Variable#type}. + * + * @param {*} value - + * @returns {*} + */ + cast(value) { + return this.castOut(value); + }, + /** + * Typecasts a value to the {@link Variable.types} of this {@link Variable}. Returns the value of the variable + * converted to the type specified in {@link Variable#type}. + * + * @private + * @param {*} value - + * @returns {*} + */ + castIn(value) { + var handler = Variable.types[this.type] || Variable.types.any; + return _2.isFunction(handler) ? handler(value) : handler.in(value); + }, + /** + * Typecasts a value from the {@link Variable.types} of this {@link Variable}. Returns the value of the variable + * converted to the type specified in {@link Variable#type}. + * + * @private + * @param {*} value - + * @returns {*} + */ + castOut(value) { + var handler = Variable.types[this.type] || Variable.types.any; + return _2.isFunction(handler) ? handler(value) : handler.out(value); + }, + /** + * Sets or gets the type of the value. + * + * @param {String} typeName - + * @param {Boolean} _noCast - + * @returns {String} - returns the current type of the variable from the list of {@link Variable.types} + */ + valueType(typeName, _noCast) { + !_2.isNil(typeName) && (typeName = typeName.toString().toLowerCase()); + if (!Variable.types[typeName]) { + return this.type || ANY; + } + this.type = typeName; + var interstitialCastValue; + if (!(_noCast || _2.isFunction(this.value))) { + interstitialCastValue = this.get(); + this.set(interstitialCastValue); + interstitialCastValue = null; + } + return this.type; + }, + /** + * Updates the type and value of a variable from an object or JSON definition of the variable. + * + * @param {Variable.definition} options - + */ + update(options) { + if (!_2.isObject(options)) { + return; + } + _2.has(options, "type") && this.valueType(options.type, _2.has(options, "value")); + _2.has(options, "value") && this.set(options.value); + _2.has(options, "system") && (this.system = options.system); + _2.has(options, "disabled") && (this.disabled = options.disabled); + _2.has(options, "description") && this.describe(options.description); + } + } + ); + _2.assign( + Variable, + /** @lends Variable */ + { + /** + * Defines the name of this property for internal use. + * + * @private + * @readOnly + * @type {String} + */ + _postman_propertyName: "Variable", + /** + * Specify the key to be used while indexing this object + * + * @private + * @readOnly + * @type {String} + */ + _postman_propertyIndexKey: "key", + /** + * The possible supported types of a variable is defined here. The keys defined here are the possible values of + * {@link Variable#type}. + * + * Additional variable types can be supported by adding the type-casting function to this enumeration. + * + * @enum {Function} + * @readonly + */ + types: { + /** + * When a variable's `type` is set to "string", it ensures that {@link Variable#get} converts the value of the + * variable to a string before returning the data. + */ + string: String, + /** + * A boolean type of variable can either be set to `true` or `false`. Any other value set is converted to + * Boolean when procured from {@link Variable#get}. + */ + boolean: Boolean, + /** + * A "number" type variable ensures that the value is always represented as a number. A non-number type value + * is returned as `NaN`. + */ + number: Number, + /** + * A "array" type value stores Array data format + */ + array: { + /** + * @param {Array} val - + * @returns {String} + */ + in(val) { + var value; + try { + value = typeof val === STRING ? val : JSON.stringify(val); + } catch (e) { + value = NULL; + } + return value; + }, + /** + * A "array" type value stores Array data format + * + * @param {String} val - + * @returns {Object} + */ + out(val) { + var value; + try { + value = JSON.parse(val); + } catch (e) { + value = void 0; + } + return Array.isArray(value) ? value : void 0; + } + }, + /** + * A "object" type value stores Object data format + */ + object: { + /** + * @param {Object} val - + * @returns {String} + */ + in(val) { + var value; + try { + value = typeof val === STRING ? val : JSON.stringify(val); + } catch (e) { + value = NULL; + } + return value; + }, + /** + * A "object" type value stores Object data format + * + * @param {String} val - + * @returns {Object} + */ + out(val) { + var value; + try { + value = JSON.parse(val); + } catch (e) { + value = void 0; + } + return value instanceof Object && !Array.isArray(value) ? value : void 0; + } + }, + /** + * Free-form type of a value. This is the default for any variable, unless specified otherwise. It ensures that + * the variable can store data in any type and no conversion is done while using {@link Variable#get}. + */ + any: { + /** + * @param {*} val - + * @returns {*} + */ + in(val) { + return val; + }, + /** + * @param {*} val - + * @returns {*} + */ + out(val) { + return val; + } + } + }, + /** + * @param {*} obj - + * @returns {Boolean} + */ + isVariable: function(obj) { + return Boolean(obj) && (obj instanceof Variable || _2.inSuperChain(obj.constructor, "_postman_propertyName", Variable._postman_propertyName)); + } + } + ); + module2.exports = { + Variable + }; + } +}); + +// ../../node_modules/postman-collection/lib/collection/variable-list.js +var require_variable_list = __commonJS({ + "../../node_modules/postman-collection/lib/collection/variable-list.js"(exports2, module2) { + var _2 = require_util2().lodash; + var PropertyList = require_property_list().PropertyList; + var Property = require_property().Property; + var Variable = require_variable().Variable; + var VariableList; + _2.inherit( + /** + * @constructor + * @extends {PropertyList} + * + * @param {Property} parent - + * @param {Object|Array} populate - + */ + VariableList = function PostmanVariableList(parent, populate) { + VariableList.super_.call(this, Variable, parent, populate); + }, + PropertyList + ); + _2.assign( + VariableList.prototype, + /** @lends VariableList.prototype */ + { + /** + * Replaces the variable tokens inside a string with its actual values. + * + * @param {String} str - + * @param {Object} [overrides] - additional objects to lookup for variable values + * @returns {String} + */ + replace(str, overrides) { + return Property.replaceSubstitutions(str, this, overrides); + }, + /** + * Recursively replace strings in an object with instances of variables. Note that it clones the original object. If + * the `mutate` param is set to true, then it replaces the same object instead of creating a new one. + * + * @param {Array|Object} obj - + * @param {?Array=} [overrides] - additional objects to lookup for variable values + * @param {Boolean=} [mutate=false] - + * @returns {Array|Object} + */ + substitute(obj, overrides, mutate) { + var resolutionQueue = [], variableSource = { + variables: this, + __parent: this.__parent + }; + do { + variableSource.variables && resolutionQueue.push(variableSource.variables); + variableSource = variableSource.__parent; + } while (variableSource); + variableSource = null; + return Property.replaceSubstitutionsIn(obj, _2.union(resolutionQueue, overrides), mutate); + }, + /** + * Using this function, one can sync the values of this variable list from a reference object. + * + * @param {Object} obj - + * @param {Boolean=} track - + * @param {Boolean} [prune=true] - + * + * @returns {Object} + */ + syncFromObject(obj, track, prune) { + var list = this, ops = track && { + created: [], + updated: [], + deleted: [] + }, indexer = list._postman_listIndexKey, tmp; + if (!_2.isObject(obj)) { + return ops; + } + _2.forOwn(obj, function(value, key) { + if (list.has(key)) { + list.one(key).set(value); + ops && ops.updated.push(key); + } else { + tmp = { value }; + tmp[indexer] = key; + list.add(tmp); + tmp = null; + ops && ops.created.push(key); + } + }); + if (prune !== false) { + _2.forEach(list.reference, function(value, key) { + if (_2.has(obj, key)) { + return; + } + list.remove(key); + ops && ops.deleted.push(key); + }); + } + return ops; + }, + /** + * Transfer all variables from this list to an object + * + * @param {Object=} [obj] - + * @returns {Object} + */ + syncToObject(obj) { + var list = this; + !_2.isObject(obj) && (obj = {}); + _2.forEach(obj, function(value, key) { + !_2.has(list.reference, key) && delete obj[key]; + }); + list.each(function(variable) { + obj[variable.key] = variable.valueOf(); + }); + return obj; + }, + /** + * Fetches a variable and normalize its reference if disabled. + * This updates the disabled variable `reference` in VariableList with its + * last enabled duplicate(if found) in the `members` list. + * + * @private + * @param {String} variableName - The name of the variable to get + * @returns {Variable} - In case of duplicates, returns last enabled + */ + oneNormalizedVariable(variableName) { + var indexKey = this._postman_listIndexKey, variable = this.reference[variableName], i; + if (variable && !variable.disabled) { + return variable; + } + for (i = this.members.length - 1; i >= 0; i--) { + variable = this.members[i]; + if (variable[indexKey] === variableName && !variable.disabled) { + this.reference[variableName] = variable; + break; + } + } + return this.reference[variableName]; + } + } + ); + _2.assign( + VariableList, + /** @lends VariableList */ + { + /** + * Defines the name of this property for internal use. + * + * @private + * @readOnly + * @type {String} + * + * @note that this is directly accessed only in case of VariableList from _.findValue lodash util mixin + */ + _postman_propertyName: "VariableList", + /** + * Checks whether an object is a VariableList + * + * @param {*} obj - + * @returns {Boolean} + */ + isVariableList: function(obj) { + return Boolean(obj) && (obj instanceof VariableList || _2.inSuperChain(obj.constructor, "_postman_propertyName", VariableList._postman_propertyName)); + } + } + ); + module2.exports = { + VariableList + }; + } +}); + +// ../../node_modules/postman-collection/lib/collection/url.js +var require_url = __commonJS({ + "../../node_modules/postman-collection/lib/collection/url.js"(exports2, module2) { + var _2 = require_util2().lodash; + var url_parse = require_parser().parse; + var PropertyBase = require_property_base().PropertyBase; + var QueryParam = require_query_param().QueryParam; + var PropertyList = require_property_list().PropertyList; + var VariableList = require_variable_list().VariableList; + var E = ""; + var STRING = "string"; + var FUNCTION = "function"; + var PROTOCOL_HTTPS = "https"; + var PROTOCOL_HTTP = "http"; + var HTTPS_PORT = "443"; + var HTTP_PORT = "80"; + var PATH_SEPARATOR = "/"; + var PATH_VARIABLE_SEPARATOR = "."; + var PATH_VARIABLE_IDENTIFIER = ":"; + var PORT_SEPARATOR = ":"; + var DOMAIN_SEPARATOR = "."; + var PROTOCOL_SEPARATOR = "://"; + var AUTH_SEPARATOR = ":"; + var AUTH_CREDENTIALS_SEPARATOR = "@"; + var QUERY_SEPARATOR = "?"; + var SEARCH_SEPARATOR = "#"; + var DEFAULT_PROTOCOL = PROTOCOL_HTTP + PROTOCOL_SEPARATOR; + var MATCH_1 = "$1"; + var regexes = { + trimPath: /^\/((.+))$/, + splitDomain: /\.(?![^{]*\}{2})/g + }; + var parsePathVariable = function(pathSegment) { + if (String(pathSegment).startsWith(PATH_VARIABLE_IDENTIFIER)) { + const separatorIndex = pathSegment.indexOf(PATH_VARIABLE_SEPARATOR); + return pathSegment.slice(1, separatorIndex === -1 ? void 0 : separatorIndex) || null; + } + return null; + }; + var Url; + _2.inherit( + /** + * Defines a URL. + * + * @constructor + * @extends {PropertyBase} + * @param {Object|String} options - + */ + Url = function PostmanUrl(options) { + Url.super_.apply(this, arguments); + this.update(options); + }, + PropertyBase + ); + _2.assign( + Url.prototype, + /** @lends Url.prototype */ + { + /** + * Set a URL. + * + * @draft + * @param {String|Object} url - + */ + update(url) { + !url && (url = E); + var parsedUrl = _2.isString(url) ? Url.parse(url) : url, auth = parsedUrl.auth, protocol = parsedUrl.protocol, port = parsedUrl.port, path = parsedUrl.path, hash = parsedUrl.hash, host = parsedUrl.host, query = parsedUrl.query, variable = parsedUrl.variable; + if (query) { + if (_2.isString(query)) { + query = QueryParam.parse(query); + } + if (!_2.isArray(query) && _2.keys(query).length) { + query = _2.map(_2.keys(query), function(key) { + return { + key, + value: query[key] + }; + }); + } + } + if (_2.isArray(variable)) { + variable = _2.map(variable, function(v) { + _2.isObject(v) && (v.key = v.key || v.id); + return v; + }); + } + if (_2.isString(path)) { + path && (path = path.replace(regexes.trimPath, MATCH_1)); + path = path ? path === PATH_SEPARATOR ? [E] : path.split(PATH_SEPARATOR) : void 0; + } + _2.isString(host) && (host = host.split(regexes.splitDomain)); + _2.assign( + this, + /** @lends Url.prototype */ + { + /** + * @type {{ user: String, password: String }} + */ + auth, + /** + * @type {String} + */ + protocol, + /** + * @type {String} + */ + port, + /** + * @type {Array} + */ + path, + /** + * @type {String} + */ + hash, + /** + * @type {Array} + */ + host, + /** + * @type {PropertyList} + * + * @todo consider setting this as undefined in v4 otherwise it's + * difficult to detect URL like `localhost/?`. + * currently it's replying upon a single member with empty key. + */ + query: new PropertyList(QueryParam, this, query || []), + /** + * @type {VariableList} + */ + variables: new VariableList(this, variable || []) + } + ); + }, + /** + * Add query parameters to the URL. + * + * @param {Object|String} params Key value pairs to add to the URL. + */ + addQueryParams(params) { + params = _2.isString(params) ? QueryParam.parse(params) : params; + this.query.populate(params); + }, + /** + * Removes query parameters from the URL. + * + * @param {Array|Array|String} params Params should be an array of strings, or an array of + * actual query parameters, or a string containing the parameter key. + * @note Input should *not* be a query string. + */ + removeQueryParams(params) { + params = _2.isArray(params) ? _2.map(params, function(param) { + return param.key ? param.key : param; + }) : [params]; + this.query.remove(function(param) { + return _2.includes(params, param.key); + }); + }, + /** + * @private + * @deprecated discontinued in v4.0 + */ + getRaw() { + throw new Error("`Url#getRaw` has been discontinued, use `Url#toString` instead."); + }, + /** + * Unparses a {PostmanUrl} into a string. + * + * @param {Boolean=} forceProtocol - Forces the URL to have a protocol + * @returns {String} + */ + toString(forceProtocol) { + var rawUrl = E, protocol = this.protocol, queryString, authString; + forceProtocol && !protocol && (protocol = DEFAULT_PROTOCOL); + if (protocol) { + rawUrl += _2.endsWith(protocol, PROTOCOL_SEPARATOR) ? protocol : protocol + PROTOCOL_SEPARATOR; + } + if (this.auth) { + if (typeof this.auth.user === STRING) { + authString = this.auth.user; + } + if (typeof this.auth.password === STRING) { + !authString && (authString = E); + authString += AUTH_SEPARATOR + this.auth.password; + } + if (typeof authString === STRING) { + rawUrl += authString + AUTH_CREDENTIALS_SEPARATOR; + } + } + if (this.host) { + rawUrl += this.getHost(); + } + if (typeof _2.get(this.port, "toString") === FUNCTION) { + rawUrl += PORT_SEPARATOR + this.port.toString(); + } + if (this.path) { + rawUrl += this.getPath(); + } + if (this.query && this.query.count()) { + queryString = this.getQueryString(); + if (queryString === E) { + queryString = this.query.find(function(param) { + return !(param && param.disabled); + }) && E; + } + if (typeof queryString === STRING) { + rawUrl += QUERY_SEPARATOR + queryString; + } + } + if (typeof this.hash === STRING) { + rawUrl += SEARCH_SEPARATOR + this.hash; + } + return rawUrl; + }, + /** + * Returns the request path, with a leading '/'. + * + * @param {?Boolean=} [unresolved=false] - + * @returns {String} + */ + getPath(unresolved) { + if (unresolved) { + return PATH_SEPARATOR + this.path.join(PATH_SEPARATOR); + } + var self2 = this, segments; + segments = _2.transform(this.path, function(res, segment) { + const variableKey = parsePathVariable(segment), variableValue = self2.variables.get(variableKey); + if (variableValue && typeof variableValue === STRING) { + segment = variableValue + segment.slice(variableKey.length + 1); + } + res.push(segment); + }, []); + return PATH_SEPARATOR + segments.join(PATH_SEPARATOR); + }, + /** + * Returns the stringified query string for this URL. + * + * @returns {String} + */ + getQueryString() { + if (!this.query.count()) { + return E; + } + return QueryParam.unparse(this.query.all()); + }, + /** + * Returns the complete path, including the query string. + * + * @returns {*|String} + * @example /something/postman?hi=notbye + */ + getPathWithQuery() { + var path = this.getPath(), queryString = this.getQueryString(); + if (queryString) { + path += QUERY_SEPARATOR + queryString; + } + return path; + }, + /** + * Returns the host part of the URL + * + * @returns {String} + */ + getHost() { + if (!this.host) { + return E; + } + return _2.isArray(this.host) ? this.host.join(DOMAIN_SEPARATOR) : this.host.toString(); + }, + /** + * Returns the host *and* port (if any), separated by a ":" + * + * @param {?Boolean} [forcePort=false] - forces the port to be added even for the protocol default ones (89, 443) + * @returns {String} + */ + getRemote(forcePort) { + var host = this.getHost(), port = this.port && this.port.toString(); + if (forcePort && !port) { + port = this.protocol && this.protocol === PROTOCOL_HTTPS ? HTTPS_PORT : HTTP_PORT; + } + return port ? host + PORT_SEPARATOR + port : host; + }, + /** + * Returns a OAuth1.0-a compatible representation of the request URL, also called "Base URL". + * For details, http://oauth.net/core/1.0a/#anchor13 + * + * todo: should we ignore the auth parameters of the URL or not? (the standard does not mention them) + * we currently are. + * + * @private + * @returns {String} + * + * @deprecated since v3.5 in favour of getBaseUrl + * @note not discontinue yet because it's used in Twitter APIs public collections + */ + getOAuth1BaseUrl() { + var protocol = this.protocol || PROTOCOL_HTTP, port = this.port ? this.port.toString() : void 0, host = (port === HTTP_PORT || port === HTTPS_PORT || port === void 0) && this.host.join(DOMAIN_SEPARATOR) || this.host.join(DOMAIN_SEPARATOR) + PORT_SEPARATOR + port, path = this.getPath(); + protocol = _2.endsWith(protocol, PROTOCOL_SEPARATOR) ? protocol : protocol + PROTOCOL_SEPARATOR; + return protocol.toLowerCase() + host.toLowerCase() + path; + } + } + ); + _2.assign( + Url, + /** @lends Url */ + { + /** + * Defines the name of this property for internal use. + * + * @private + * @readOnly + * @type {String} + */ + _postman_propertyName: "Url", + /** + * Parses a string to a PostmanUrl, decomposing the URL into it's constituent parts, + * such as path, host, port, etc. + * + * @param {String} url - + * @returns {Object} + */ + parse: function(url) { + url = url_parse(url); + var pathVariables, pathVariableKeys = {}; + if (url.auth) { + url.auth = { + user: url.auth[0], + password: url.auth[1] + }; + } + if (url.query) { + url.query = url.query.map(QueryParam.parseSingle); + } + pathVariables = _2.transform(url.path, function(res, segment) { + if ((segment = parsePathVariable(segment)) && !pathVariableKeys[segment]) { + pathVariableKeys[segment] = true; + res.push({ key: segment }); + } + }, []); + url.variable = pathVariables.length ? pathVariables : void 0; + return url; + }, + /** + * Checks whether an object is a Url + * + * @param {*} obj - + * @returns {Boolean} + */ + isUrl: function(obj) { + return Boolean(obj) && (obj instanceof Url || _2.inSuperChain(obj.constructor, "_postman_propertyName", Url._postman_propertyName)); + } + } + ); + module2.exports = { + Url + }; + } +}); + +// ../../node_modules/postman-collection/lib/collection/script.js +var require_script = __commonJS({ + "../../node_modules/postman-collection/lib/collection/script.js"(exports2, module2) { + var _2 = require_util2().lodash; + var Property = require_property().Property; + var Url = require_url().Url; + var Script; + var SCRIPT_NEWLINE_PATTERN = /\r?\n/g; + _2.inherit( + /** + * Postman scripts that are executed upon events on a collection / request such as test and pre request. + * + * @constructor + * @extends {Property} + * + * @param {Object} options - + */ + Script = function PostmanScript(options) { + Script.super_.apply(this, arguments); + options && this.update(options); + }, + Property + ); + _2.assign( + Script.prototype, + /** @lends Script.prototype */ + { + /** + * Defines whether this property instances requires an id + * + * @private + * @readOnly + * @type {Boolean} + */ + _postman_propertyRequiresId: true, + /** + * Converts the script lines array to a single source string. + * + * @returns {String} + */ + toSource: function() { + return this.exec ? this.exec.join("\n") : void 0; + }, + /** + * Updates the properties of a Script. + * + * @param {Object} [options] - + * @param {String} [options.type] Script type + * @param {String} [options.src] Script source url + * @param {String[]|String} [options.exec] Script to execute + * @param {Packages} [options.packages] Packages required by the script + */ + update: function(options) { + (_2.isString(options) || _2.isArray(options)) && (options = { exec: options }); + if (!options) { + return; + } + this.type = options.type || "text/javascript"; + this.packages = options.packages; + _2.has(options, "src") && /** + * @augments {Script.prototype} + * @type {Url} + */ + (this.src = new Url(options.src)); + if (!this.src && _2.has(options, "exec")) { + this.exec = _2.isString(options.exec) ? options.exec.split(SCRIPT_NEWLINE_PATTERN) : _2.isArray(options.exec) ? options.exec : void 0; + } + }, + /** + * Checks if the script is empty i.e does not have any code to execute. + * + * @returns {Boolean} + */ + isEmpty: function() { + return _2.isEmpty(_2.trim(this.toSource())); + } + } + ); + _2.assign( + Script, + /** @lends Script */ + { + /** + * Defines the name of this property for internal use. + * + * @private + * @readOnly + * @type {String} + */ + _postman_propertyName: "Script", + /** + * Check whether an object is an instance of {@link ItemGroup}. + * + * @param {*} obj - + * @returns {Boolean} + */ + isScript: function(obj) { + return Boolean(obj) && (obj instanceof Script || _2.inSuperChain(obj.constructor, "_postman_propertyName", Script._postman_propertyName)); + } + } + ); + module2.exports = { + Script + }; + } +}); + +// ../../node_modules/postman-collection/lib/collection/event.js +var require_event = __commonJS({ + "../../node_modules/postman-collection/lib/collection/event.js"(exports2, module2) { + var _2 = require_util2().lodash; + var Property = require_property().Property; + var Script = require_script().Script; + var Event; + _2.inherit( + /** + * A Postman event definition that refers to an event to be listened to and a script reference or definition to be + * executed. + * + * @constructor + * @extends {Property} + * + * @param {Event.definition} definition Pass the initial definition of the event as the options parameter. + */ + Event = function PostmanEvent(definition) { + Event.super_.call(this, definition); + definition && this.update(definition); + }, + Property + ); + _2.assign( + Event.prototype, + /** @lends Event.prototype */ + { + /** + * Update an event. + * + * @param {Event.definition} definition - + */ + update(definition) { + if (!definition) { + return; + } + var result, script = definition.script; + if (Script.isScript(script)) { + result = script; + } else if (_2.isArray(script) || _2.isString(script)) { + result = new Script({ exec: script }); + } else if (_2.isObject(script)) { + result = new Script(script); + } + _2.mergeDefined( + this, + /** @lends Event.prototype */ + { + /** + * Name of the event that this instance is intended to listen to. + * + * @type {String} + */ + listen: _2.isString(definition.listen) ? definition.listen : void 0, + /** + * The script that is to be executed when this event is triggered. + * + * @type {Script} + */ + script: result + } + ); + } + } + ); + _2.assign( + Event, + /** @lends Event */ + { + /** + * Defines the name of this property for internal use. + * + * @private + * @readOnly + * @type {String} + */ + _postman_propertyName: "Event", + /** + * Check whether an object is an instance of {@link Event}. + * + * @param {*} obj - + * @returns {Boolean} + */ + isEvent: function isPostmanEvent(obj) { + return Boolean(obj) && (obj instanceof Event || _2.inSuperChain(obj.constructor, "_postman_propertyName", Event._postman_propertyName)); + } + } + ); + module2.exports = { + Event + }; + } +}); + +// ../../node_modules/postman-collection/lib/collection/event-list.js +var require_event_list = __commonJS({ + "../../node_modules/postman-collection/lib/collection/event-list.js"(exports2, module2) { + var _2 = require_util2().lodash; + var PropertyList = require_property_list().PropertyList; + var Event = require_event().Event; + var EventList; + _2.inherit( + /** + * A type of {@link PropertyList}, EventList handles resolving events from parents. If an {@link ItemGroup} contains + * a set of events, each {@link Item} in that group will inherit those events from its parent, and so on. + * + * @constructor + * @param {Object} parent - + * @param {Object[]} populate - + * @extends {PropertyList} + * + * This is useful when we need to have a common test across all requests. + */ + EventList = function PostmanEventList(parent, populate) { + EventList.super_.call(this, Event, parent, populate); + }, + PropertyList + ); + _2.assign( + EventList.prototype, + /** @lends EventList.prototype */ + { + /** + * Returns an array of listeners filtered by the listener name + * + * @note + * If one needs to access disabled events, use {@link PropertyList#all} or + * any other similar {@link PropertyList} method. + * + * @param {String} name - + * @returns {Array} + */ + listeners(name) { + var all; + all = this.listenersOwn(name); + this.eachParent(function(parent) { + var parentEvents; + parent !== this.__parent && EventList.isEventList(parent.events) && (parentEvents = parent.events.listenersOwn(name)) && parentEvents.length && all.unshift.apply(all, parentEvents); + }, this); + return all; + }, + /** + * Returns all events with specific listeners only within this list. Refer to {@link EventList#listeners} for + * procuring all inherited events + * + * @param {string} name - + * @returns {Array} + */ + listenersOwn(name) { + return this.filter(function(event) { + return !event.disabled && event.listen === name; + }); + } + } + ); + _2.assign( + EventList, + /** @lends EventList */ + { + /** + * Defines the name of this property for internal use. + * + * @private + * @readOnly + * @type {String} + */ + _postman_propertyName: "EventList", + /** + * Checks if the given object is an EventList. + * + * @param {*} obj - + * @returns {Boolean} + */ + isEventList: function(obj) { + return Boolean(obj) && (obj instanceof EventList || _2.inSuperChain(obj.constructor, "_postman_propertyName", EventList._postman_propertyName)); + } + } + ); + module2.exports = { + EventList + }; + } +}); + +// ../../node_modules/postman-collection/lib/url-pattern/url-match-pattern.js +var require_url_match_pattern = __commonJS({ + "../../node_modules/postman-collection/lib/url-pattern/url-match-pattern.js"(exports2, module2) { + var _2 = require_util2().lodash; + var Property = require_property().Property; + var Url = require_url().Url; + var STRING = "string"; + var UNDEFINED = "undefined"; + var MATCH_ALL = "*"; + var PREFIX_DELIMITER = "^"; + var PROTOCOL_DELIMITER = "+"; + var POSTFIX_DELIMITER = "$"; + var MATCH_ALL_URLS = ""; + var ALLOWED_PROTOCOLS = ["http", "https", "file", "ftp"]; + var ALLOWED_PROTOCOLS_REGEX = ALLOWED_PROTOCOLS.join("|"); + var DEFAULT_PROTOCOL_PORT = { + ftp: "21", + http: "80", + https: "443" + }; + var regexes = { + escapeMatcher: /[.+^${}()|[\]\\]/g, + escapeMatchReplacement: "\\$&", + questionmarkMatcher: /\?/g, + questionmarkReplacment: ".", + starMatcher: "*", + starReplacement: ".*", + // @todo match valid HOST name + // @note PATH is required(can be empty '/' or '/*') i.e, {PROTOCOL}://{HOST}/ + patternSplit: "^((" + ALLOWED_PROTOCOLS_REGEX + "|\\*)(\\+(" + ALLOWED_PROTOCOLS_REGEX + "))*)://(\\*|\\*\\.[^*/:]+|[^*/:]+)(:\\*|:\\d+)?(/.*)$" + }; + var UrlMatchPattern; + _2.inherit( + /** + * UrlMatchPattern allows to create rules to define Urls to match for. + * It is based on Google's Match Pattern - https://developer.chrome.com/extensions/match_patterns + * + * @constructor + * @extends {Property} + * @param {UrlMatchPattern.definition} options - + * + * @example An example UrlMatchPattern + * var matchPattern = new UrlMatchPattern('https://*.google.com/*'); + */ + UrlMatchPattern = function UrlMatchPattern2(options) { + if (_2.isString(options)) { + options = { pattern: options }; + } + UrlMatchPattern2.super_.apply(this, arguments); + _2.assign( + this, + /** @lends UrlMatchPattern */ + { + /** + * The url match pattern string + * + * @type {String} + */ + pattern: MATCH_ALL_URLS + } + ); + this.update(options); + }, + Property + ); + _2.assign( + UrlMatchPattern.prototype, + /** @lends UrlMatchPattern.prototype */ + { + /** + * Assigns the given properties to the UrlMatchPattern. + * + * @param {{ pattern: (string) }} options - + */ + update(options) { + _2.has(options, "pattern") && (_2.isString(options.pattern) && !_2.isEmpty(options.pattern)) && (this.pattern = options.pattern); + this._matchPatternObject = this.createMatchPattern(); + }, + /** + * Used to generate the match regex object from the match string we have. + * + * @private + * @returns {*} Match regex object + */ + createMatchPattern() { + var matchPattern = this.pattern, match = matchPattern.match(regexes.patternSplit); + if (!match) { + return; + } + return { + protocols: _2.uniq(match[1].split(PROTOCOL_DELIMITER)), + host: match[5], + port: match[6] && match[6].substr(1), + // remove leading `:` + path: this.globPatternToRegexp(match[7]) + }; + }, + /** + * Converts a given glob pattern into a regular expression. + * + * @private + * @param {String} pattern Glob pattern string + * @returns {RegExp=} + */ + globPatternToRegexp(pattern) { + pattern = pattern.replace(regexes.escapeMatcher, regexes.escapeMatchReplacement); + pattern = pattern.replace(regexes.questionmarkMatcher, regexes.questionmarkReplacment); + pattern = pattern.replace(regexes.starMatcher, regexes.starReplacement); + return new RegExp(PREFIX_DELIMITER + pattern + POSTFIX_DELIMITER); + }, + /** + * Tests if the given protocol string, is allowed by the pattern. + * + * @param {String=} protocol The protocol to be checked if the pattern allows. + * @returns {Boolean=} + */ + testProtocol(protocol) { + var matchRegexObject = this._matchPatternObject; + return _2.includes(ALLOWED_PROTOCOLS, protocol) && (_2.includes(matchRegexObject.protocols, MATCH_ALL) || _2.includes(matchRegexObject.protocols, protocol)); + }, + /** + * Returns the protocols supported + * + * @returns {Array.} + */ + getProtocols() { + return _2.get(this, "_matchPatternObject.protocols") || []; + }, + /** + * Tests if the given host string, is allowed by the pattern. + * + * @param {String=} host The host to be checked if the pattern allows. + * @returns {Boolean=} + */ + testHost(host) { + var matchRegexObject = this._matchPatternObject; + return this.matchAnyHost(matchRegexObject) || this.matchAbsoluteHostPattern(matchRegexObject, host) || this.matchSuffixHostPattern(matchRegexObject, host); + }, + /** + * Checks whether the matchRegexObject has the MATCH_ALL host. + * + * @private + * @param {Object=} matchRegexObject The regex object generated by the createMatchPattern function. + * @returns {Boolean} + */ + matchAnyHost(matchRegexObject) { + return matchRegexObject.host === MATCH_ALL; + }, + /** + * Check for the (*.foo.bar.com) kind of matches with the remote provided. + * + * @private + * @param {Object=} matchRegexObject The regex object generated by the createMatchPattern function. + * @param {String=} remote The remote url (host+port) of the url for which the hostpattern needs to checked + * @returns {Boolean} + */ + matchSuffixHostPattern(matchRegexObject, remote) { + var hostSuffix = matchRegexObject.host.substr(2); + return matchRegexObject.host[0] === MATCH_ALL && (remote === hostSuffix || remote.endsWith("." + hostSuffix)); + }, + /** + * Check for the absolute host match. + * + * @private + * @param {Object=} matchRegexObject The regex object generated by the createMatchPattern function. + * @param {String=} remote The remote url, host+port of the url for which the hostpattern needs to checked + * @returns {Boolean} + */ + matchAbsoluteHostPattern(matchRegexObject, remote) { + return matchRegexObject.host === remote; + }, + /** + * Tests if the current pattern allows the given port. + * + * @param {String} port The port to be checked if the pattern allows. + * @param {String} protocol Protocol to refer default port. + * @returns {Boolean} + */ + testPort(port, protocol) { + var portRegex = this._matchPatternObject.port, defaultPort = protocol && DEFAULT_PROTOCOL_PORT[protocol]; + if (typeof port === UNDEFINED && typeof portRegex === UNDEFINED) { + return true; + } + port && typeof port !== STRING && (port = String(port)); + !port && (port = defaultPort); + !portRegex && (portRegex = defaultPort); + return portRegex === MATCH_ALL || portRegex === port; + }, + /** + * Tests if the current pattern allows the given path. + * + * @param {String=} path The path to be checked if the pattern allows. + * @returns {Boolean=} + */ + testPath(path) { + var matchRegexObject = this._matchPatternObject; + return !_2.isEmpty(path.match(matchRegexObject.path)); + }, + /** + * Tests the url string with the match pattern provided. + * Follows the https://developer.chrome.com/extensions/match_patterns pattern for pattern validation and matching + * + * @param {String=} urlStr The url string for which the proxy match needs to be done. + * @returns {Boolean=} + */ + test(urlStr) { + if (this.pattern === MATCH_ALL_URLS) { + return true; + } + if (_2.isEmpty(this._matchPatternObject)) { + return false; + } + const url = new Url(urlStr); + return this.testProtocol(url.protocol) && this.testHost(url.getHost()) && this.testPort(url.port, url.protocol) && this.testPath(url.getPath()); + }, + /** + * Returns a string representation of the match pattern + * + * @returns {String} pattern + */ + toString() { + return String(this.pattern); + }, + /** + * Returns the JSON representation. + * + * @returns {{ pattern: (String) }} + */ + toJSON() { + var pattern; + pattern = this.toString(); + return { pattern }; + } + } + ); + _2.assign( + UrlMatchPattern, + /** @lends UrlMatchPattern */ + { + /** + * Defines the name of this property for internal use + * + * @private + * @readOnly + * @type {String} + */ + _postman_propertyName: "UrlMatchPattern", + /** + * Multiple protocols in the match pattern should be separated by this string + * + * @readOnly + * @type {String} + */ + PROTOCOL_DELIMITER, + /** + * String representation for matching all urls - + * + * @readOnly + * @type {String} + */ + MATCH_ALL_URLS + } + ); + module2.exports = { + UrlMatchPattern + }; + } +}); + +// ../../node_modules/postman-collection/lib/url-pattern/url-match-pattern-list.js +var require_url_match_pattern_list = __commonJS({ + "../../node_modules/postman-collection/lib/url-pattern/url-match-pattern-list.js"(exports2, module2) { + var _2 = require_util2().lodash; + var PropertyList = require_property_list().PropertyList; + var Url = require_url().Url; + var UrlMatchPattern = require_url_match_pattern().UrlMatchPattern; + var MATCH_ALL_URLS = UrlMatchPattern.MATCH_ALL_URLS; + var UrlMatchPatternList; + _2.inherit( + /** + * UrlMatchPattern is a list of UrlMatchPatterns. + * This allows you to test for any url over a list of match patterns. + * + * @constructor + * @extends {PropertyList} + * + * @param {Object} parent - + * @param {String[]} list - + * @example An example UrlMatchPatternList + * var matchPatternList = new UrlMatchPatternList(['https://*.google.com/*']); + */ + UrlMatchPatternList = function(parent, list) { + UrlMatchPatternList.super_.call(this, UrlMatchPattern, parent, list); + }, + PropertyList + ); + _2.assign( + UrlMatchPatternList.prototype, + /** @lends UrlMatchPatternList.prototype */ + { + /** + * Allows this property to be serialised into its plural form. + * This is here because Property.prototype.toJSON() tries to singularise + * the keys which are PropertyLists. + * i.e. when a property has a key - `matches = new PropertyList()`, + * toJSON on the property tries to singularise 'matches' and ends up with 'matche'. + * + * @private + * @readOnly + * @type {String} + */ + _postman_proprtyIsSerialisedAsPlural: true, + /** + * Tests the url string with the match pattern list provided to see if it matches any of it. + * Follows the https://developer.chrome.com/extensions/match_patterns pattern for pattern validation and matching + * + * @param {String=} [urlStr] The url string for which the proxy match needs to be done. + * @returns {Boolean=} + */ + test: function(urlStr) { + var url, matchAllUrlsPattern, matchedSpecificPattern; + matchAllUrlsPattern = this.find(function(urlMatchPattern) { + return urlMatchPattern.pattern === MATCH_ALL_URLS; + }); + if (_2.isObject(matchAllUrlsPattern)) { + return true; + } + url = new Url(urlStr); + matchedSpecificPattern = this.find(function(urlMatchPattern) { + var matchRegexObject = urlMatchPattern._matchPatternObject; + if (_2.isEmpty(matchRegexObject)) { + return false; + } + return urlMatchPattern.testProtocol(url.protocol) && urlMatchPattern.testHost(url.getHost()) && urlMatchPattern.testPort(url.port, url.protocol) && urlMatchPattern.testPath(url.getPath()); + }); + return Boolean(matchedSpecificPattern); + } + } + ); + _2.assign( + UrlMatchPatternList, + /** @lends UrlMatchPatternList */ + { + /** + * Defines the name of this property for internal use + * + * @private + * @readOnly + * @type {String} + */ + _postman_propertyName: "UrlMatchPatternList" + } + ); + module2.exports = { + UrlMatchPatternList + }; + } +}); + +// ../../node_modules/postman-collection/lib/collection/proxy-config.js +var require_proxy_config = __commonJS({ + "../../node_modules/postman-collection/lib/collection/proxy-config.js"(exports2, module2) { + var _2 = require_util2().lodash; + var Property = require_property().Property; + var PropertyList = require_property_list().PropertyList; + var Url = require_url().Url; + var UrlMatchPattern = require_url_match_pattern().UrlMatchPattern; + var UrlMatchPatternList = require_url_match_pattern_list().UrlMatchPatternList; + var ProxyConfig; + var PROTOCOL_DELIMITER = UrlMatchPattern.PROTOCOL_DELIMITER; + var E = ""; + var COLON = ":"; + var DEFAULT_PORT = 8080; + var PROTOCOL_HOST_SEPARATOR = "://"; + var MATCH_ALL_HOST_AND_PATH = "*:*/*"; + var AUTH_CREDENTIALS_SEPARATOR = "@"; + var DEFAULT_PROTOCOL = "http"; + var ALLOWED_PROTOCOLS = ["http", "https"]; + var DEFAULT_PATTERN = ALLOWED_PROTOCOLS.join(PROTOCOL_DELIMITER) + PROTOCOL_HOST_SEPARATOR + MATCH_ALL_HOST_AND_PATH; + _2.inherit( + /** + * A ProxyConfig definition that represents the proxy configuration for an url match. + * Properties can then use the `.toObjectResolved` function to procure an object representation of the property with + * all the variable references replaced by corresponding values. + * + * @constructor + * @extends {Property} + * @param {ProxyConfig.definition=} [options] - Specifies object with props matches, server and tunnel. + * + * @example Create a new ProxyConfig + * var ProxyConfig = require('postman-collection').ProxyConfig, + * myProxyConfig = new ProxyConfig({ + * host: 'proxy.com', + * match: 'http+https://example.com/*', + * port: 8080, + * tunnel: true, + * disabled: false, + * authenticate: true, + * username: 'proxy_username', + * password: 'proxy_password' + * }); + */ + ProxyConfig = function ProxyConfig2(options) { + ProxyConfig2.super_.call(this, options); + _2.assign( + this, + /** @lends ProxyConfig */ + { + /** + * The proxy server host or ip + * + * @type {String} + */ + host: E, + /** + * The url mach for which the proxy has been associated with. + * + * @type {String} + */ + match: new UrlMatchPattern(DEFAULT_PATTERN), + /** + * The proxy server port number + * + * @type {Number} + */ + port: DEFAULT_PORT, + /** + * This represents whether the tunneling needs to done while proxying this request. + * + * @type Boolean + */ + tunnel: false, + /** + * Proxy bypass list + * + * @type {UrlMatchPatternList} + */ + bypass: void 0, + /** + * Enable proxy authentication + * + * @type {Boolean} + */ + authenticate: false, + /** + * Proxy auth username + * + * @type {String} + */ + username: void 0, + /** + * Proxy auth password + * + * @type {String} + */ + password: void 0 + } + ); + this.update(options); + }, + Property + ); + _2.assign( + ProxyConfig.prototype, + /** @lends ProxyConfig.prototype */ + { + /** + * Defines whether this property instances requires an id + * + * @private + * @readOnly + * @type {Boolean} + */ + _postman_propertyRequiresId: true, + /** + * Updates the properties of the proxy object based on the options provided. + * + * @param {ProxyConfig.definition} options The proxy object structure. + */ + update: function(options) { + if (!_2.isObject(options)) { + return; + } + var parsedUrl, port = _2.get(options, "port") >> 0; + if (_2.isString(options.host)) { + parsedUrl = new Url(options.host); + this.host = parsedUrl.getHost(); + } + _2.isString(options.match) && (this.match = new UrlMatchPattern(options.match)); + _2.isString(_2.get(options, "match.pattern")) && (this.match = new UrlMatchPattern(options.match.pattern)); + port && (this.port = port); + _2.isBoolean(options.tunnel) && (this.tunnel = options.tunnel); + _2.isBoolean(options.disabled) && (this.disabled = options.disabled); + _2.isBoolean(options.authenticate) && (this.authenticate = options.authenticate); + _2.isString(options.username) && (this.username = options.username); + _2.isString(options.password) && (this.password = options.password); + if (Array.isArray(options.bypass)) { + this.bypass = new UrlMatchPatternList(null, options.bypass); + } else if (PropertyList.isPropertyList(options.bypass)) { + this.bypass = new UrlMatchPatternList(null, options.bypass.all()); + } + }, + /** + * Updates the protocols in the match pattern + * + * @param {Array.} protocols The array of protocols + */ + updateProtocols: function(protocols) { + if (!protocols) { + return; + } + var updatedProtocols, hostAndPath = _2.split(this.match.pattern, PROTOCOL_HOST_SEPARATOR)[1]; + if (!hostAndPath) { + return; + } + updatedProtocols = _2.intersection(ALLOWED_PROTOCOLS, _2.castArray(protocols)); + _2.isEmpty(updatedProtocols) && (updatedProtocols = ALLOWED_PROTOCOLS); + this.match.update({ + pattern: updatedProtocols.join(PROTOCOL_DELIMITER) + PROTOCOL_HOST_SEPARATOR + hostAndPath + }); + }, + /** + * Tests the url string with the match provided. + * Follows the https://developer.chrome.com/extensions/match_patterns pattern for pattern validation and matching + * + * @param {String=} [urlStr] The url string for which the proxy match needs to be done. + */ + test: function(urlStr) { + var protocol = Url.isUrl(urlStr) ? urlStr.protocol : Url.parse(urlStr || E).protocol || E; + if (_2.isEmpty(protocol)) { + protocol = DEFAULT_PROTOCOL; + urlStr = protocol + PROTOCOL_HOST_SEPARATOR + urlStr; + } + if (!_2.includes(ALLOWED_PROTOCOLS, protocol)) { + return false; + } + if (this.bypass && this.bypass.test(urlStr)) { + return false; + } + return this.match.test(urlStr); + }, + /** + * Returns the proxy server url. + * + * @returns {String} + */ + getProxyUrl: function() { + var auth = E; + if (this.authenticate) { + auth = encodeURIComponent(this.username || E); + if (this.password) { + auth += COLON + encodeURIComponent(this.password); + } + if (auth) { + auth += AUTH_CREDENTIALS_SEPARATOR; + } + } + return DEFAULT_PROTOCOL + PROTOCOL_HOST_SEPARATOR + auth + this.host + COLON + this.port; + }, + /** + * Returns the protocols supported. + * + * @returns {Array.} + */ + getProtocols: function() { + return this.match.getProtocols(); + } + } + ); + _2.assign( + ProxyConfig, + /** @lends ProxyConfig */ + { + /** + * Defines the name of this property for internal use. + * + * @private + * @readOnly + * @type {String} + */ + _postman_propertyName: "ProxyConfig", + /** + * Check whether an object is an instance of PostmanItem. + * + * @param {*} obj - + * @returns {Boolean} + */ + isProxyConfig: function(obj) { + return Boolean(obj) && (obj instanceof ProxyConfig || _2.inSuperChain(obj.constructor, "_postman_propertyName", ProxyConfig._postman_propertyName)); + } + } + ); + module2.exports = { + ProxyConfig, + ALLOWED_PROTOCOLS, + DEFAULT_PATTERN + }; + } +}); + +// ../../node_modules/postman-collection/lib/collection/certificate.js +var require_certificate = __commonJS({ + "../../node_modules/postman-collection/lib/collection/certificate.js"(exports2, module2) { + var _2 = require_util2().lodash; + var Property = require_property().Property; + var PropertyBase = require_property_base().PropertyBase; + var Url = require_url().Url; + var UrlMatchPatternList = require_url_match_pattern_list().UrlMatchPatternList; + var STRING = "string"; + var HTTPS = "https"; + var Certificate; + _2.inherit( + /** + * A Certificate definition that represents the ssl certificate + * to be used for an url. + * Properties can then use the `.toObjectResolved` function to procure an object representation of the property with + * all the variable references replaced by corresponding values. + * + * @constructor + * @extends {Property} + * + * @param {Certificate.definition=} [options] Object with matches, key, cert and passphrase + * + * @example Create a new Certificate + * + * var Certificate = require('postman-collection').Certificate, + * certificate = new Certificate({ + * name: 'Certificate for example.com', + * matches: ['example.com'], + * key: { src: '/User/path/to/certificate/key' }, + * cert: { src: '/User/path/to/certificate' }, + * passphrase: 'iampassphrase' + * }); + */ + Certificate = function Certificate2(options) { + Certificate2.super_.apply(this, arguments); + this.update(options); + }, + Property + ); + _2.assign( + Certificate.prototype, + /** @lends Certificate.prototype */ + { + /** + * Ensure all object have id + * + * @private + */ + _postman_propertyRequiresId: true, + /** + * Updates the certificate with the given properties. + * + * @param {Certificate.definition=} [options] Object with matches, key, cert and passphrase + */ + update: function(options) { + if (!_2.isObject(options)) { + return; + } + _2.mergeDefined( + this, + /** @lends Certificate.prototype */ + { + /** + * Unique identifier + * + * @type {String} + */ + id: options.id, + /** + * Name for user reference + * + * @type {String} + */ + name: options.name, + /** + * List of match pattern + * + * @type {UrlMatchPatternList} + */ + matches: options.matches && new UrlMatchPatternList({}, options.matches), + /** + * Private Key + * + * @type {{ src: (string) }} + */ + key: _2.isObject(options.key) ? options.key : { src: options.key }, + /** + * Certificate + * + * @type {{ src: (string) }} + */ + cert: _2.isObject(options.cert) ? options.cert : { src: options.cert }, + /** + * PFX or PKCS12 Certificate + * + * @type {{ src: (string) }} + */ + pfx: _2.isObject(options.pfx) ? options.pfx : { src: options.pfx }, + /** + * passphrase + * + * @type {Object} + */ + passphrase: options.passphrase + } + ); + }, + /** + * Checks if the certificate can be applied to a given url + * + * @param {String|Url} url The url string for which the certificate is checked for match. + */ + canApplyTo: function(url) { + if (_2.isEmpty(url)) { + return false; + } + typeof url === STRING && (url = new Url(url)); + if (url.protocol !== HTTPS) { + return false; + } + return this.matches.test(url); + }, + /** + * Allows the serialization of a {@link Certificate} + * + * This is overridden, in order to ensure that certificate contents are not accidentally serialized, + * which can be a security risk. + */ + toJSON: function() { + var obj = PropertyBase.toJSON(this); + _2.unset(obj, "key.value"); + _2.unset(obj, "cert.value"); + _2.unset(obj, "pfx.value"); + return obj; + } + } + ); + _2.assign( + Certificate, + /** @lends Certificate */ + { + /** + * Defines the name of this property for internal use + * + * @private + * @readOnly + * @type {String} + */ + _postman_propertyName: "Certificate", + /** + * Specify the key to be used while indexing this object + * + * @private + * @readOnly + * @type {String} + */ + _postman_propertyIndexKey: "id", + /** + * Checks if the given object is a Certificate + * + * @param {*} obj - + * @returns {Boolean} + */ + isCertificate: function(obj) { + return Boolean(obj) && (obj instanceof Certificate || _2.inSuperChain(obj.constructor, "_postman_propertyName", Certificate._postman_propertyName)); + } + } + ); + module2.exports = { + Certificate + }; + } +}); + +// ../../node_modules/postman-collection/lib/collection/header.js +var require_header = __commonJS({ + "../../node_modules/postman-collection/lib/collection/header.js"(exports2, module2) { + var util = require_util2(); + var _2 = util.lodash; + var E = ""; + var SPC = " "; + var CRLF = "\r\n"; + var HEADER_KV_SEPARATOR = ":"; + var Property = require_property().Property; + var PropertyList = require_property_list().PropertyList; + var Header; + _2.inherit( + /** + * Represents an HTTP header, for requests or for responses. + * + * @constructor + * @extends {Property} + * + * @param {Header.definition|String} options - Pass the header definition as an object or the value of the header. + * If the value is passed as a string, it should either be in `name:value` format or the second "name" parameter + * should be used to pass the name as string + * @param {String} [name] - optional override the header name or use when the first parameter is the header value as + * string. + * + * @example Parse a string of headers into an array of Header objects + * var Header = require('postman-collection').Header, + * headerString = 'Content-Type: application/json\nUser-Agent: MyClientLibrary/2.0\n'; + * + * var rawHeaders = Header.parse(headerString); + * console.log(rawHeaders); // [{ 'Content-Type': 'application/json', 'User-Agent': 'MyClientLibrary/2.0' }] + * + * var headers = rawHeaders.map(function (h) { + * return new Header(h); + * }); + * + * function assert(condition, message) { + * if (!condition) { + * message = message || "Assertion failed"; + * if (typeof Error !== "undefined") { + * throw new Error(message); + * } + * throw message; //fallback + * } + * else { + * console.log("Assertion passed"); + * } + * } + * + * assert(headerString.trim() === Header.unparse(headers).trim()); + */ + Header = function PostmanHeader(options, name) { + if (_2.isString(options)) { + options = _2.isString(name) ? { key: name, value: options } : Header.parseSingle(options); + } + Header.super_.apply(this, arguments); + this.update(options); + }, + Property + ); + _2.assign( + Header.prototype, + /** @lends Header.prototype */ + { + /** + * Converts the header to a single header string. + * + * @returns {String} + */ + toString() { + return this.key + ": " + this.value; + }, + /** + * Return the value of this header. + * + * @returns {String} + */ + valueOf() { + return this.value; + }, + /** + * Assigns the given properties to the Header + * + * @param {Object} options - + * @todo check for allowed characters in header key-value or store encoded. + */ + update(options) { + this.key = _2.get(options, "key") || E; + this.value = _2.get(options, "value", E); + _2.has(options, "system") && (this.system = options.system); + _2.has(options, "disabled") && (this.disabled = options.disabled); + } + } + ); + _2.assign( + Header, + /** @lends Header */ + { + /** + * Defines the name of this property for internal use. + * + * @private + * @readOnly + * @type {String} + */ + _postman_propertyName: "Header", + /** + * Specify the key to be used while indexing this object + * + * @private + * @readOnly + * @type {String} + */ + _postman_propertyIndexKey: "key", + /** + * Specifies whether the index lookup of this property, when in a list is case insensitive or not + * + * @private + * @readOnly + * @type {boolean} + */ + _postman_propertyIndexCaseInsensitive: true, + /** + * Since each header may have multiple possible values, this is set to true. + * + * @private + * @readOnly + * @type {Boolean} + */ + _postman_propertyAllowsMultipleValues: true, + /** + * Parses a multi line header string into an array of {@link Header.definition}. + * + * @param {String} headerString - + * @returns {Array} + */ + parse: function(headerString) { + var headers = [], regexes = { + header: /^(\S+):(.*)$/gm, + fold: /\r\n([ \t])/g, + trim: /^\s*(.*\S)?\s*$/ + // eslint-disable-line security/detect-unsafe-regex + }, match = regexes.header.exec(headerString); + headerString = headerString.toString().replace(regexes.fold, "$1"); + while (match) { + headers.push({ + key: match[1], + value: match[2].replace(regexes.trim, "$1") + }); + match = regexes.header.exec(headerString); + } + return headers; + }, + /** + * Parses a single Header. + * + * @param {String} header - + * @returns {{key: String, value: String}} + */ + parseSingle: function(header) { + if (!_2.isString(header)) { + return { key: E, value: E }; + } + var index = header.indexOf(HEADER_KV_SEPARATOR), key, value; + index < 0 && (index = header.length); + key = header.substr(0, index); + value = header.substr(index + 1); + return { + key: _2.trim(key), + value: _2.trim(value) + }; + }, + /** + * Stringifies an Array or {@link PropertyList} of Headers into a single string. + * + * @note Disabled headers are excluded. + * + * @param {Array|PropertyList
} headers - + * @param {String=} [separator='\r\n'] - Specify a string for separating each header + * @returns {String} + */ + unparse: function(headers, separator = CRLF) { + if (!_2.isArray(headers) && !PropertyList.isPropertyList(headers)) { + return E; + } + return headers.reduce(function(acc, header) { + if (header && !header.disabled) { + acc += Header.unparseSingle(header) + separator; + } + return acc; + }, E); + }, + /** + * Unparses a single Header. + * + * @param {String} header - + * @returns {String} + */ + unparseSingle: function(header) { + if (!_2.isObject(header)) { + return E; + } + return header.key + HEADER_KV_SEPARATOR + SPC + header.value; + }, + /** + * Check whether an object is an instance of PostmanHeader. + * + * @param {*} obj - + * @returns {Boolean} + */ + isHeader: function(obj) { + return Boolean(obj) && (obj instanceof Header || _2.inSuperChain(obj.constructor, "_postman_propertyName", Header._postman_propertyName)); + }, + /* eslint-disable jsdoc/check-param-names */ + /** + * Create a new header instance + * + * @param {Header.definition|String} [value] - Pass the header definition as an object or the value of the header. + * If the value is passed as a string, it should either be in `name:value` format or the second "name" parameter + * should be used to pass the name as string + * @param {String} [name] - optional override the header name or use when the first parameter is the header value as + * string. + * @returns {Header} + */ + create: function() { + var args = Array.prototype.slice.call(arguments); + args.unshift(Header); + return new (Header.bind.apply(Header, args))(); + } + /* eslint-enable jsdoc/check-param-names */ + } + ); + module2.exports = { + Header + }; + } +}); + +// ../../node_modules/postman-collection/lib/collection/header-list.js +var require_header_list = __commonJS({ + "../../node_modules/postman-collection/lib/collection/header-list.js"(exports2, module2) { + var _2 = require_util2().lodash; + var PropertyList = require_property_list().PropertyList; + var Header = require_header().Header; + var PROP_NAME = "_postman_propertyName"; + var HeaderList; + _2.inherit( + /** + * Contains a list of header elements + * + * @constructor + * @param {Object} parent - + * @param {Header[]} headers - + * @extends {PropertyList} + */ + HeaderList = function(parent, headers) { + HeaderList.super_.call(this, Header, parent, headers); + }, + PropertyList + ); + _2.assign( + HeaderList.prototype, + /** @lends HeaderList.prototype */ + { + /** + * Gets size of a list of headers excluding standard header prefix. + * + * @returns {Number} + */ + contentSize() { + if (!this.count()) { + return 0; + } + return Header.unparse(this).length; + } + } + ); + _2.assign( + HeaderList, + /** @lends HeaderList */ + { + /** + * Defines the name of this property for internal use. + * + * @private + * @readOnly + * @type {String} + */ + _postman_propertyName: "HeaderList", + /** + * Checks if the given object is a HeaderList + * + * @param {*} obj - + * @returns {Boolean} + */ + isHeaderList: function(obj) { + return Boolean(obj) && (obj instanceof HeaderList || _2.inSuperChain(obj.constructor, PROP_NAME, HeaderList._postman_propertyName)); + } + } + ); + module2.exports = { + HeaderList + }; + } +}); + +// ../../node_modules/postman-collection/lib/collection/form-param.js +var require_form_param = __commonJS({ + "../../node_modules/postman-collection/lib/collection/form-param.js"(exports2, module2) { + var _2 = require_util2().lodash; + var Property = require_property().Property; + var PropertyBase = require_property_base().PropertyBase; + var FormParam; + _2.inherit( + /** + * Represents a Form Data parameter, which can exist in request body. + * + * @constructor + * @param {FormParam.definition} options Pass the initial definition of the form data parameter. + */ + FormParam = function PostmanFormParam(options = {}) { + FormParam.super_.apply(this, arguments); + this.key = options.key || ""; + this.value = options.value || ""; + this.type = options.type; + this.src = options.src; + this.contentType = options.contentType; + this.fileName = options.fileName; + }, + Property + ); + _2.assign( + FormParam.prototype, + /** @lends FormParam.prototype */ + { + /** + * Converts the FormParameter to a single param string. + * + * @returns {String} + */ + toString() { + return this.key + "=" + this.value; + }, + /** + * Returns the value of the form parameter (if any). + * + * @returns {*|String} + */ + valueOf() { + return this.value; + }, + /** + * Convert the form-param to JSON compatible plain object. + * + * @returns {Object} + */ + toJSON() { + var obj = PropertyBase.toJSON(this); + if (obj.type === "file" && (typeof obj.value !== "string" || !obj.value)) { + _2.unset(obj, "value"); + } + return obj; + } + } + ); + _2.assign( + FormParam, + /** @lends FormParam */ + { + /** + * Defines the name of this property for internal use. + * + * @private + * @readOnly + * @type {String} + */ + _postman_propertyName: "FormParam", + /** + * Declare the list index key, so that property lists of form parameters work correctly + * + * @type {String} + */ + _postman_propertyIndexKey: "key", + /** + * Form params can have multiple values, so set this to true. + * + * @type {Boolean} + */ + _postman_propertyAllowsMultipleValues: true, + /** + * Parse a form data string into an array of objects, where each object contains a key and a value. + * + * @todo implement this, not implemented yet. + * @param formdata {String} + * @returns {Array} + */ + parse: _2.noop + } + ); + module2.exports = { + FormParam + }; + } +}); + +// ../../node_modules/postman-collection/lib/collection/request-body.js +var require_request_body = __commonJS({ + "../../node_modules/postman-collection/lib/collection/request-body.js"(exports2, module2) { + var _2 = require_util2().lodash; + var PropertyBase = require_property_base().PropertyBase; + var PropertyList = require_property_list().PropertyList; + var QueryParam = require_query_param().QueryParam; + var FormParam = require_form_param().FormParam; + var EMPTY = ""; + var RequestBody; + _2.inherit( + /** + * RequestBody holds data related to the request body. By default, it provides a nice wrapper for url-encoded, + * form-data, and raw types of request bodies. + * + * @constructor + * @extends {PropertyBase} + * + * @param {Object} options - + */ + RequestBody = function PostmanRequestBody(options) { + RequestBody.super_.apply(this, arguments); + if (!options) { + return; + } + this.update(options); + }, + PropertyBase + ); + _2.assign( + RequestBody.prototype, + /** @lends RequestBody.prototype */ + { + /** + * Set the content of this request data + * + * @param {Object} options - + */ + update(options) { + _2.isString(options) && (options = { mode: "raw", raw: options }); + if (!options.mode) { + return; + } + var mode = RequestBody.MODES[options.mode.toString().toLowerCase()] || RequestBody.MODES.raw, urlencoded = options.urlencoded, formdata = options.formdata, graphql = options.graphql, file = options.file, raw = options.raw; + if (options.urlencoded) { + _2.isString(options.urlencoded) && (urlencoded = QueryParam.parse(options.urlencoded)); + urlencoded = new PropertyList(QueryParam, this, urlencoded); + } + if (options.formdata) { + formdata = new PropertyList(FormParam, this, options.formdata); + } + if (options.graphql) { + graphql = { + query: graphql.query, + operationName: graphql.operationName, + variables: graphql.variables + }; + } + _2.isString(options.file) && (file = { src: file }); + mode === RequestBody.MODES.raw && !raw && (raw = ""); + mode === RequestBody.MODES.urlencoded && !urlencoded && (urlencoded = new PropertyList(QueryParam, this, [])); + mode === RequestBody.MODES.formdata && !formdata && (formdata = new PropertyList(FormParam, this, [])); + mode === RequestBody.MODES.graphql && !graphql && (graphql = {}); + _2.assign( + this, + /** @lends RequestBody.prototype */ + { + /** + * Indicates the type of request data to use. + * + * @type {String} + */ + mode, + /** + * If the request has raw body data associated with it, the data is held in this field. + * + * @type {String} + */ + raw, + /** + * Any URL encoded body params go here. + * + * @type {PropertyList} + */ + urlencoded, + /** + * Form data parameters for this request are held in this field. + * + * @type {PropertyList} + */ + formdata, + /** + * Holds a reference to a file which should be read as the RequestBody. It can be a file path (when used + * with Node) or a unique ID (when used with the browser). + * + * @note The reference stored here should be resolved by a resolver function (which should be provided to + * the Postman Runtime). + */ + file, + /** + * If the request has raw graphql data associated with it, the data is held in this field. + * + * @type {Object} + */ + graphql, + /** + * If the request has body Options associated with it, the data is held in this field. + * + * @type {Object} + */ + options: _2.isObject(options.options) ? options.options : void 0, + /** + * Indicates whether to include body in request or not. + * + * @type {Boolean} + */ + disabled: options.disabled + } + ); + }, + /** + * Stringifies and returns the request body. + * + * @note FormData is not supported yet. + * @returns {*} + */ + toString() { + if (this.mode === RequestBody.MODES.formdata || this.mode === RequestBody.MODES.file) { + return EMPTY; + } + if (this.mode === RequestBody.MODES.urlencoded) { + return PropertyList.isPropertyList(this.urlencoded) ? QueryParam.unparse(this.urlencoded.all()) : this.urlencoded && _2.isFunction(this.urlencoded.toString) ? this.urlencoded.toString() : EMPTY; + } + if (this.mode === RequestBody.MODES.raw) { + return this.raw && _2.isFunction(this.raw.toString) ? this.raw.toString() : EMPTY; + } + return EMPTY; + }, + /** + * If the request body is set to a mode, but does not contain data, then we should not be sending it. + * + * @returns {Boolean} + */ + isEmpty() { + var mode = this.mode, data = mode && this[mode]; + if (!data) { + return true; + } + if (mode === RequestBody.MODES.file) { + return !(data.src || data.content); + } + if (_2.isString(data)) { + return data.length === 0; + } + if (_2.isFunction(data.count)) { + return data.count() === 0; + } + return _2.isEmpty(data); + }, + /** + * Convert the request body to JSON compatible plain object + * + * @returns {Object} + */ + toJSON() { + var obj = PropertyBase.toJSON(this); + if (obj.file && obj.file.content && typeof obj.file.content !== "string") { + _2.unset(obj, "file.content"); + } + return obj; + } + } + ); + _2.assign( + RequestBody, + /** @lends RequestBody **/ + { + /** + * Defines the name of this property for internal use. + * + * @private + * @readOnly + * @type {String} + */ + _postman_propertyName: "RequestBody", + /** + * @enum {string} MODES + */ + MODES: { + file: "file", + formdata: "formdata", + graphql: "graphql", + raw: "raw", + urlencoded: "urlencoded" + } + } + ); + module2.exports = { + RequestBody + }; + } +}); + +// ../../node_modules/postman-collection/lib/collection/request-auth.js +var require_request_auth = __commonJS({ + "../../node_modules/postman-collection/lib/collection/request-auth.js"(exports2, module2) { + var _2 = require_util2().lodash; + var Property = require_property().Property; + var VariableList = require_variable_list().VariableList; + var RequestAuth; + _2.inherit( + /** + * A Postman Auth definition that comprehensively represents different types of auth mechanisms available. + * + * @constructor + * @extends {Property} + * + * @param {RequestAuth.definition} options Pass the initial definition of the Auth. + * @param {Property|PropertyList=} [parent] optionally pass the parent of this auth. aides variable resolution. + * + * @example Creating a request with two auth data and one selected + * var auth = new RequestAuth({ + * type: 'digest', + * + * basic: [ + * { key: "username", value: "postman" }, + * { key: "password", value: "secrets" } + * ], + * digest: [ + * { key: "nonce", value: "aef54cde" }, + * { key: "realm", value: "items.x" } + * ] + * }); + * + * // change the selected auth + * auth.use('basic'); + */ + RequestAuth = function PostmanRequestAuth(options, parent) { + RequestAuth.super_.call(this, options); + parent && this.setParent(parent); + if (_2.has(options, "type")) { + this.use(options.type); + } + _2.forEach(_2.omit(options, "type"), this.update.bind(this)); + }, + Property + ); + _2.assign( + RequestAuth.prototype, + /** @lends RequestAuth.prototype */ + { + /** + * Update the parameters of a specific authentication type. If none is provided then it uses the one marked as to be + * used. + * + * @param {VariableList|Array|Object} options - + * @param {String=} [type=this.type] - + */ + update(options, type) { + if (!_2.isObject(options)) { + return; + } + if (!type) { + type = this.type; + } + if (!RequestAuth.isValidType(type)) { + return; + } + var parameters = this[type]; + if (!VariableList.isVariableList(parameters)) { + parameters = this[type] = new VariableList(this); + parameters._postman_requestAuthType = type; + } + if (_2.isArray(options) || VariableList.isVariableList(options)) { + parameters.assimilate(options); + } else { + parameters.syncFromObject(options, false, false); + } + }, + /** + * Sets the authentication type to be used by this item. + * + * @param {String} type - + * @param {VariableList|Array|Object} options - note that options set here would replace all existing + * options for the particular auth + */ + use(type, options) { + if (!RequestAuth.isValidType(type)) { + return; + } + this.type = type; + var parameters = this[type]; + if (!VariableList.isVariableList(parameters)) { + parameters = this[type] = new VariableList(this); + } + if (_2.isArray(options) || VariableList.isVariableList(options)) { + parameters.assimilate(options); + } else { + parameters.syncFromObject(options, false, false); + } + }, + /** + * @private + * @deprecated discontinued in v4.0 + */ + current() { + throw new Error("`Request#current` has been discontinued, use `Request#parameters` instead."); + }, + /** + * Returns the parameters of the selected auth type + * + * @returns {VariableList} + */ + parameters() { + return this[this.type]; + }, + /** + * Clears the definition of an auth type. + * + * @param {String} type - + */ + clear(type) { + if (!(RequestAuth.isValidType(type) && VariableList.isVariableList(this[type]))) { + return; + } + this[type].clear(); + if (type !== this.type) { + delete this[type]; + } + } + } + ); + _2.assign( + RequestAuth, + /** @lends RequestAuth */ + { + /** + * Defines the name of this property for internal use. + * + * @private + * @readOnly + * @type {String} + */ + _postman_propertyName: "RequestAuth", + /** + * Determines whether an authentication type name is valid or not + * + * @param {String} type - + * @returns {Boolean} + */ + isValidType: function(type) { + return _2.isString(type) && type !== "type"; + } + } + ); + module2.exports = { + RequestAuth + }; + } +}); + +// ../../node_modules/postman-collection/lib/collection/request.js +var require_request2 = __commonJS({ + "../../node_modules/postman-collection/lib/collection/request.js"(exports2, module2) { + var util = require_util2(); + var _2 = util.lodash; + var PropertyBase = require_property_base().PropertyBase; + var Property = require_property().Property; + var Url = require_url().Url; + var ProxyConfig = require_proxy_config().ProxyConfig; + var Certificate = require_certificate().Certificate; + var HeaderList = require_header_list().HeaderList; + var RequestBody = require_request_body().RequestBody; + var RequestAuth = require_request_auth().RequestAuth; + var Request; + var DEFAULT_REQ_METHOD = "GET"; + var CONTENT_LENGTH = "Content-Length"; + var SP = " "; + var CRLF = "\r\n"; + var HTTP_X_X = "HTTP/X.X"; + var supportsBuffer = typeof Buffer !== "undefined" && _2.isFunction(Buffer.byteLength); + var SIZE_SOURCE = { + computed: "COMPUTED", + contentLength: "CONTENT-LENGTH" + }; + _2.inherit( + /** + * A Postman HTTP request object. + * + * @constructor + * @extends {Property} + * @param {Request.definition} options - + */ + Request = function PostmanRequest(options) { + Request.super_.apply(this, arguments); + typeof options === "string" && (options = { + url: options + }); + _2.assign( + this, + /** @lends Request.prototype */ + { + /** + * @type {Url} + */ + url: new Url(), + /** + * @type {HeaderList} + */ + headers: new HeaderList(this, options && options.header), + // Although a similar check is being done in the .update call below, this handles falsy options as well. + /** + * @type {String} + * @todo: Clean this up + */ + // the negated condition is required to keep DEFAULT_REQ_METHOD as a fallback + method: _2.has(options, "method") && !_2.isNil(options.method) ? String(options.method).toUpperCase() : DEFAULT_REQ_METHOD + } + ); + this.update(options); + }, + Property + ); + _2.assign( + Request.prototype, + /** @lends Request.prototype */ + { + /** + * Updates the different properties of the request. + * + * @param {Request.definition} options - + */ + update: function(options) { + if (!options) { + return; + } + _2.has(options, "url") && this.url.update(options.url); + options.header && this.headers.repopulate(options.header); + _2.has(options, "method") && (this.method = _2.isNil(options.method) ? DEFAULT_REQ_METHOD : String(options.method).toUpperCase()); + _2.mergeDefined( + this, + /** @lends Request.prototype */ + { + /** + * @type {RequestBody|undefined} + */ + body: _2.createDefined(options, "body", RequestBody), + // auth is a special case, empty RequestAuth should not be created for falsy values + // to allow inheritance from parent + /** + * @type {RequestAuth} + */ + auth: options.auth ? new RequestAuth(options.auth) : void 0, + /** + * @type {ProxyConfig} + */ + proxy: options.proxy && new ProxyConfig(options.proxy), + /** + * @type {Certificate|undefined} + */ + certificate: options.certificate && new Certificate(options.certificate) + } + ); + }, + /** + * Sets authentication method for the request + * + * @param {?String|RequestAuth.definition} type - + * @param {VariableList=} [options] - + * + * @note This function was previously (in v2 of SDK) used to clone request and populate headers. Now it is used to + * only set auth information to request + * + * @note that ItemGroup#authorizeUsing depends on this function + */ + authorizeUsing: function(type, options) { + if (_2.isObject(type) && _2.isNil(options)) { + options = _2.omit(type, "type"); + type = type.type; + } + if (type === null) { + _2.has(this, "auth") && delete this.auth; + return; + } + if (!RequestAuth.isValidType(type)) { + return; + } + if (!this.auth) { + this.auth = new RequestAuth(null, this); + } else { + this.auth.clear(type); + } + this.auth.use(type, options); + }, + /** + * Returns an object where the key is a header name and value is the header value. + * + * @param {Object=} options - + * @param {Boolean} options.ignoreCase When set to "true", will ensure that all the header keys are lower case. + * @param {Boolean} options.enabled Only get the enabled headers + * @param {Boolean} options.multiValue When set to "true", duplicate header values will be stored in an array + * @param {Boolean} options.sanitizeKeys When set to "true", headers with falsy keys are removed + * @returns {Object} + * @note If multiple headers are present in the same collection with same name, but different case + * (E.g "x-forward-port" and "X-Forward-Port", and `options.ignoreCase` is set to true, + * the values will be stored in an array. + */ + getHeaders: function getHeaders(options) { + !options && (options = {}); + return this.headers.toObject(options.enabled, !options.ignoreCase, options.multiValue, options.sanitizeKeys); + }, + /** + * Calls the given callback on each Header object contained within the request. + * + * @param {Function} callback - + */ + forEachHeader: function forEachHeader(callback) { + this.headers.all().forEach(function(header) { + return callback(header, this); + }, this); + }, + /** + * Adds a header to the PropertyList of headers. + * + * @param {Header| {key: String, value: String}} header Can be a {Header} object, or a raw header object. + */ + addHeader: function(header) { + this.headers.add(header); + }, + /** + * Removes a header from the request. + * + * @param {String|Header} toRemove A header object to remove, or a string containing the header key. + * @param {Object} options - + * @param {Boolean} options.ignoreCase If set to true, ignores case while removing the header. + */ + removeHeader: function(toRemove, options) { + toRemove = _2.isString(toRemove) ? toRemove : toRemove.key; + options = options || {}; + if (!toRemove) { + return; + } + options.ignoreCase && (toRemove = toRemove.toLowerCase()); + this.headers.remove(function(header) { + var key = options.ignoreCase ? header.key.toLowerCase() : header.key; + return key === toRemove; + }); + }, + /** + * Updates or inserts the given header. + * + * @param {Object} header - + */ + upsertHeader: function(header) { + if (!(header && header.key)) { + return; + } + var existing = this.headers.find({ key: header.key }); + if (!existing) { + return this.headers.add(header); + } + existing.value = header.value; + }, + /** + * Add query parameters to the request. + * + * @todo: Rename this? + * @param {Array|String} params - + */ + addQueryParams: function(params) { + this.url.addQueryParams(params); + }, + /** + * Removes parameters passed in params. + * + * @param {String|Array} params - + */ + removeQueryParams: function(params) { + this.url.removeQueryParams(params); + }, + /** + * Get the request size by computing the headers and body or using the + * actual content length header once the request is sent. + * + * @returns {Object} + */ + size: function() { + var contentLength = this.headers.get(CONTENT_LENGTH), requestTarget = this.url.getPathWithQuery(), bodyString, sizeInfo = { + body: 0, + header: 0, + total: 0, + source: SIZE_SOURCE.computed + }; + if (contentLength && util.isNumeric(contentLength)) { + sizeInfo.body = parseInt(contentLength, 10); + sizeInfo.source = SIZE_SOURCE.contentLength; + } else if (this.body) { + bodyString = this.body.toString(); + sizeInfo.body = supportsBuffer ? Buffer.byteLength(bodyString) : ( + /* istanbul ignore next */ + bodyString.length + ); + } + sizeInfo.header = (this.method + SP + requestTarget + SP + HTTP_X_X + CRLF + CRLF).length + this.headers.contentSize(); + sizeInfo.total = (sizeInfo.body || 0) + sizeInfo.header; + return sizeInfo; + }, + /** + * Converts the Request to a plain JavaScript object, which is also how the request is + * represented in a collection file. + * + * @returns {{url: (*|String), method: *, header: (undefined|*), body: *, auth: *, certificate: *}} + */ + toJSON: function() { + var obj = PropertyBase.toJSON(this); + if (_2.isArray(obj.header) && !obj.header.length) { + delete obj.header; + } + return obj; + }, + /** + * Creates a clone of this request + * + * @returns {Request} + */ + clone: function() { + return new Request(this.toJSON()); + } + } + ); + _2.assign( + Request, + /** @lends Request */ + { + /** + * Defines the name of this property for internal use. + * + * @private + * @readOnly + * @type {String} + */ + _postman_propertyName: "Request", + /** + * Check whether an object is an instance of {@link ItemGroup}. + * + * @param {*} obj - + * @returns {Boolean} + */ + isRequest: function(obj) { + return Boolean(obj) && (obj instanceof Request || _2.inSuperChain(obj.constructor, "_postman_propertyName", Request._postman_propertyName)); + } + } + ); + module2.exports = { + Request + }; + } +}); + +// ../../node_modules/http-reasons/db.json +var require_db = __commonJS({ + "../../node_modules/http-reasons/db.json"(exports2, module2) { + module2.exports = { + "100": { + name: "Continue", + detail: "This means that the server has received the request headers, and that the client should proceed to send the request body (in the case of a request for which a body needs to be sent; for example, a POST request). If the request body is large, sending it to a server when a request has already been rejected based upon inappropriate headers is inefficient. To have a server check if the request could be accepted based on the request's headers alone, a client must send Expect: 100-continue as a header in its initial request and check if a 100 Continue status code is received in response before continuing (or receive 417 Expectation Failed and not continue)." + }, + "101": { + name: "Switching Protocols", + detail: "This means the requester has asked the server to switch protocols and the server is acknowledging that it will do so." + }, + "102": { + name: "Processing (WebDAV) (RFC 2518)", + detail: "As a WebDAV request may contain many sub-requests involving file operations, it may take a long time to complete the request. This code indicates that the server has received and is processing the request, but no response is available yet. This prevents the client from timing out and assuming the request was lost." + }, + "103": { + name: "Checkpoint", + detail: "This code is used in the Resumable HTTP Requests Proposal to resume aborted PUT or POST requests." + }, + "122": { + name: "Request-URI too long", + detail: "This is a non-standard IE7-only code which means the URI is longer than a maximum of 2083 characters." + }, + "200": { + name: "OK", + detail: "Standard response for successful HTTP requests. The actual response will depend on the request method used. In a GET request, the response will contain an entity corresponding to the requested resource. In a POST request the response will contain an entity describing or containing the result of the action." + }, + "201": { + name: "Created", + detail: "The request has been fulfilled and resulted in a new resource being created." + }, + "202": { + name: "Accepted", + detail: "The request has been accepted for processing, but the processing has not been completed. The request might or might not eventually be acted upon, as it might be disallowed when processing actually takes place." + }, + "203": { + name: "Non-Authoritative Information (since HTTP/1.1)", + detail: "The server successfully processed the request, but is returning information that may be from another source." + }, + "204": { + name: "No Content", + detail: "The server successfully processed the request, but is not returning any content." + }, + "205": { + name: "Reset Content", + detail: "The server successfully processed the request, but is not returning any content. Unlike a 204 response, this response requires that the requester reset the document view." + }, + "206": { + name: "Partial Content", + detail: "The server is delivering only part of the resource due to a range header sent by the client. The range header is used by tools like wget to enable resuming of interrupted downloads, or split a download into multiple simultaneous streams" + }, + "207": { + name: "Multi-Status (WebDAV) (RFC 4918)", + detail: "The message body that follows is an XML message and can contain a number of separate response codes, depending on how many sub-requests were made." + }, + "208": { + name: "Already Reported (WebDAV) (RFC 5842)", + detail: "The members of a DAV binding have already been enumerated in a previous reply to this request, and are not being included again." + }, + "226": { + name: "IM Used (RFC 3229)", + detail: "The server has fulfilled a GET request for the resource, and the response is a representation of the result of one or more instance-manipulations applied to the current instance. " + }, + "300": { + name: "Multiple Choices", + detail: "Indicates multiple options for the resource that the client may follow. It, for instance, could be used to present different format options for video, list files with different extensions, or word sense disambiguation." + }, + "301": { + name: "Moved Permanently", + detail: "This and all future requests should be directed to the given URI." + }, + "302": { + name: "Found", + detail: 'This is an example of industrial practice contradicting the standard. HTTP/1.0 specification (RFC 1945) required the client to perform a temporary redirect (the original describing phrase was "Moved Temporarily"), but popular browsers implemented 302 with the functionality of a 303. Therefore, HTTP/1.1 added status codes 303 and 307 to distinguish between the two behaviours. However, some Web applications and frameworks use the 302 status code as if it were the 303.' + }, + "303": { + name: "See Other", + detail: "The response to the request can be found under another URI using a GET method. When received in response to a POST (or PUT/DELETE), it should be assumed that the server has received the data and the redirect should be issued with a separate GET message." + }, + "304": { + name: "Not Modified", + detail: "Indicates the resource has not been modified since last requested. Typically, the HTTP client provides a header like the If-Modified-Since header to provide a time against which to compare. Using this saves bandwidth and reprocessing on both the server and client, as only the header data must be sent and received in comparison to the entirety of the page being re-processed by the server, then sent again using more bandwidth of the server and client." + }, + "305": { + name: "Use Proxy (since HTTP/1.1)", + detail: "Many HTTP clients (such as Mozilla and Internet Explorer) do not correctly handle responses with this status code, primarily for security reasons." + }, + "306": { + name: "Switch Proxy", + detail: 'No longer used. Originally meant "Subsequent requests should use the specified proxy."' + }, + "307": { + name: "Temporary Redirect (since HTTP/1.1)", + detail: "In this occasion, the request should be repeated with another URI, but future requests can still use the original URI. In contrast to 303, the request method should not be changed when reissuing the original request. For instance, a POST request must be repeated using another POST request." + }, + "308": { + name: "Resume Incomplete", + detail: "This code is used in the Resumable HTTP Requests Proposal to resume aborted PUT or POST requests." + }, + "400": { + name: "Bad Request", + detail: "The request cannot be fulfilled due to bad syntax." + }, + "401": { + name: "Unauthorized", + detail: "Similar to 403 Forbidden, but specifically for use when authentication is possible but has failed or not yet been provided. The response must include a WWW-Authenticate header field containing a challenge applicable to the requested resource." + }, + "402": { + name: "Payment Required", + detail: `Reserved for future use. The original intention was that this code might be used as part of some form of digital cash or micropayment scheme, but that has not happened, and this code is not usually used. As an example of its use, however, Apple's MobileMe service generates a 402 error ("httpStatusCode:402" in the Mac OS X Console log) if the MobileMe account is delinquent.` + }, + "403": { + name: "Forbidden", + detail: "The request was a legal request, but the server is refusing to respond to it. Unlike a 401 Unauthorized response, authenticating will make no difference." + }, + "404": { + name: "Not Found", + detail: "The requested resource could not be found but may be available again in the future. Subsequent requests by the client are permissible." + }, + "405": { + name: "Method Not Allowed", + detail: "A request was made of a resource using a request method not supported by that resource; for example, using GET on a form which requires data to be presented via POST, or using PUT on a read-only resource." + }, + "406": { + name: "Not Acceptable", + detail: "The requested resource is only capable of generating content not acceptable according to the Accept headers sent in the request." + }, + "407": { + name: "Proxy Authentication Required", + detail: "The client must first authenticate itself with the proxy." + }, + "408": { + name: "Request Timeout", + detail: 'The server timed out waiting for the request. According to W3 HTTP specifications: "The client did not produce a request within the time that the server was prepared to wait. The client MAY repeat the request without modifications at any later time."' + }, + "409": { + name: "Conflict", + detail: "Indicates that the request could not be processed because of conflict in the request, such as an edit conflict." + }, + "410": { + name: "Gone", + detail: 'Indicates that the resource requested is no longer available and will not be available again. This should be used when a resource has been intentionally removed and the resource should be purged. Upon receiving a 410 status code, the client should not request the resource again in the future. Clients such as search engines should remove the resource from their indices. Most use cases do not require clients and search engines to purge the resource, and a "404 Not Found" may be used instead.' + }, + "411": { + name: "Length Required", + detail: "The request did not specify the length of its content, which is required by the requested resource." + }, + "412": { + name: "Precondition Failed", + detail: "The server does not meet one of the preconditions that the requester put on the request." + }, + "413": { + name: "Request Entity Too Large", + detail: "The request is larger than the server is willing or able to process." + }, + "414": { + name: "Request-URI Too Long", + detail: "The URI provided was too long for the server to process." + }, + "415": { + name: "Unsupported Media Type", + detail: "The request entity has a media type which the server or resource does not support. For example, the client uploads an image as image/svg+xml, but the server requires that images use a different format." + }, + "416": { + name: "Requested Range Not Satisfiable", + detail: "The client has asked for a portion of the file, but the server cannot supply that portion. For example, if the client asked for a part of the file that lies beyond the end of the file." + }, + "417": { + name: "Expectation Failed", + detail: "The server cannot meet the requirements of the Expect request-header field." + }, + "418": { + name: "I'm a teapot (RFC 2324)", + detail: "This code was defined in 1998 as one of the traditional IETF April Fools' jokes, in RFC 2324, Hyper Text Coffee Pot Control Protocol, and is not expected to be implemented by actual HTTP servers. However, known implementations do exist." + }, + "422": { + name: "Unprocessable Entity (WebDAV) (RFC 4918)", + detail: "The request was well-formed but was unable to be followed due to semantic errors." + }, + "423": { + name: "Locked (WebDAV) (RFC 4918)", + detail: "The resource that is being accessed is locked." + }, + "424": { + name: "Failed Dependency (WebDAV) (RFC 4918)", + detail: "The request failed due to failure of a previous request (e.g. a PROPPATCH)." + }, + "425": { + name: "Unordered Collection (RFC 3648)", + detail: 'Defined in drafts of "WebDAV Advanced Collections Protocol",[14] but not present in "Web Distributed Authoring and Versioning (WebDAV) Ordered Collections Protocol".[15]' + }, + "426": { + name: "Upgrade Required (RFC 2817)", + detail: "The client should switch to a different protocol such as TLS/1.0." + }, + "428": { + name: "Precondition Required", + detail: `The origin server requires the request to be conditional. Intended to prevent "the 'lost update' problem, where a client GETs a resource's state, modifies it, and PUTs it back to the server, when meanwhile a third party has modified the state on the server, leading to a conflict."[17] Proposed in an Internet-Draft.` + }, + "429": { + name: "Too Many Requests", + detail: "The user has sent too many requests in a given amount of time. Intended for use with rate limiting schemes. Proposed in an Internet-Draft." + }, + "431": { + name: "Request Header Fields Too Large", + detail: "The server is unwilling to process the request because either an individual header field, or all the header fields collectively, are too large. Proposed in an Internet-Draft." + }, + "444": { + name: "No Response", + detail: "An nginx HTTP server extension. The server returns no information to the client and closes the connection (useful as a deterrent for malware)." + }, + "449": { + name: "Retry With", + detail: "A Microsoft extension. The request should be retried after performing the appropriate action." + }, + "450": { + name: "Blocked by Windows Parental Controls", + detail: "A Microsoft extension. This error is given when Windows Parental Controls are turned on and are blocking access to the given webpage." + }, + "499": { + name: "Client Closed Request", + detail: "An Nginx HTTP server extension. This code is introduced to log the case when the connection is closed by client while HTTP server is processing its request, making server unable to send the HTTP header back." + }, + "500": { + name: "Internal Server Error", + detail: "A generic error message, given when no more specific message is suitable." + }, + "501": { + name: "Not Implemented", + detail: "The server either does not recognise the request method, or it lacks the ability to fulfill the request." + }, + "502": { + name: "Bad Gateway", + detail: "The server was acting as a gateway or proxy and received an invalid response from the upstream server." + }, + "503": { + name: "Service Unavailable", + detail: "The server is currently unavailable (because it is overloaded or down for maintenance). Generally, this is a temporary state." + }, + "504": { + name: "Gateway Timeout", + detail: "The server was acting as a gateway or proxy and did not receive a timely response from the upstream server." + }, + "505": { + name: "HTTP Version Not Supported", + detail: "The server does not support the HTTP protocol version used in the request." + }, + "506": { + name: "Variant Also Negotiates (RFC 2295)", + detail: "Transparent content negotiation for the request results in a circular reference.[21]" + }, + "507": { + name: "Insufficient Storage (WebDAV) (RFC 4918)", + detail: "The server is unable to store the representation needed to complete the request." + }, + "508": { + name: "Loop Detected (WebDAV) (RFC 5842)", + detail: "The server detected an infinite loop while processing the request (sent in lieu of 208)." + }, + "509": { + name: "Bandwidth Limit Exceeded (Apache bw/limited extension)", + detail: "This status code, while used by many servers, is not specified in any RFCs." + }, + "510": { + name: "Not Extended (RFC 2774)", + detail: "Further extensions to the request are required for the server to fulfill it.[22]" + }, + "511": { + name: "Network Authentication Required", + detail: 'The client needs to authenticate to gain network access. Intended for use by intercepting proxies used to control access to the network (e.g. "captive portals" used to require agreement to Terms of Service before granting full Internet access via a Wi-Fi hotspot). Proposed in an Internet-Draft.' + }, + "598": { + name: "Network read timeout error", + detail: "This status code is not specified in any RFCs, but is used by some HTTP proxies to signal a network read timeout behind the proxy to a client in front of the proxy." + }, + "599": { + name: "Network connect timeout error[23]", + detail: "This status code is not specified in any RFCs, but is used by some HTTP proxies to signal a network connect timeout behind the proxy to a client in front of the proxy." + } + }; + } +}); + +// ../../node_modules/http-reasons/index.js +var require_http_reasons = __commonJS({ + "../../node_modules/http-reasons/index.js"(exports2, module2) { + var db = require_db(); + module2.exports = { + /** + * @param {String|Number} code + * @returns {Object} - {name:String, detail:String} + */ + lookup: function httpCodeLookup(code) { + return db[code] || {}; + } + }; + } +}); + +// ../../node_modules/liquid-json/vendor/unicode.js +var require_unicode = __commonJS({ + "../../node_modules/liquid-json/vendor/unicode.js"(exports2, module2) { + var Uni = module2.exports; + module2.exports.isWhiteSpace = function isWhiteSpace(x) { + return x === " " || x === "\xA0" || x === "\uFEFF" || x >= " " && x <= "\r" || x === "\u1680" || x === "\u180E" || x >= "\u2000" && x <= "\u200A" || x === "\u2028" || x === "\u2029" || x === "\u202F" || x === "\u205F" || x === "\u3000"; + }; + module2.exports.isWhiteSpaceJSON = function isWhiteSpaceJSON(x) { + return x === " " || x === " " || x === "\n" || x === "\r"; + }; + module2.exports.isLineTerminator = function isLineTerminator(x) { + return x === "\n" || x === "\r" || x === "\u2028" || x === "\u2029"; + }; + module2.exports.isLineTerminatorJSON = function isLineTerminatorJSON(x) { + return x === "\n" || x === "\r"; + }; + module2.exports.isIdentifierStart = function isIdentifierStart(x) { + return x === "$" || x === "_" || x >= "A" && x <= "Z" || x >= "a" && x <= "z" || x >= "\x80" && Uni.NonAsciiIdentifierStart.test(x); + }; + module2.exports.isIdentifierPart = function isIdentifierPart(x) { + return x === "$" || x === "_" || x >= "A" && x <= "Z" || x >= "a" && x <= "z" || x >= "0" && x <= "9" || x >= "\x80" && Uni.NonAsciiIdentifierPart.test(x); + }; + module2.exports.NonAsciiIdentifierStart = /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F0\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/; + module2.exports.NonAsciiIdentifierPart = /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0\u08A2-\u08AC\u08E4-\u08FE\u0900-\u0963\u0966-\u096F\u0971-\u0977\u0979-\u097F\u0981-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C01-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58\u0C59\u0C60-\u0C63\u0C66-\u0C6F\u0C82\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D02\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D60-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F0\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191C\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1D00-\u1DE6\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA697\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7B\uAA80-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE26\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/; + } +}); + +// ../../node_modules/liquid-json/vendor/parse.js +var require_parse2 = __commonJS({ + "../../node_modules/liquid-json/vendor/parse.js"(exports2, module2) { + var Uni = require_unicode(); + function isHexDigit(x) { + return x >= "0" && x <= "9" || x >= "A" && x <= "F" || x >= "a" && x <= "f"; + } + function isOctDigit(x) { + return x >= "0" && x <= "7"; + } + function isDecDigit(x) { + return x >= "0" && x <= "9"; + } + var unescapeMap = { + "'": "'", + '"': '"', + "\\": "\\", + "b": "\b", + "f": "\f", + "n": "\n", + "r": "\r", + "t": " ", + "v": "\v", + "/": "/" + }; + function formatError(input, msg, position, lineno, column, json5) { + var result = msg + " at " + (lineno + 1) + ":" + (column + 1), tmppos = position - column - 1, srcline = "", underline = ""; + var isLineTerminator = json5 ? Uni.isLineTerminator : Uni.isLineTerminatorJSON; + if (tmppos < position - 70) { + tmppos = position - 70; + } + while (1) { + var chr = input[++tmppos]; + if (isLineTerminator(chr) || tmppos === input.length) { + if (position >= tmppos) { + underline += "^"; + } + break; + } + srcline += chr; + if (position === tmppos) { + underline += "^"; + } else if (position > tmppos) { + underline += input[tmppos] === " " ? " " : " "; + } + if (srcline.length > 78) break; + } + return result + "\n" + srcline + "\n" + underline; + } + function parse2(input, options) { + var json5 = !(options.mode === "json" || options.legacy); + var isLineTerminator = json5 ? Uni.isLineTerminator : Uni.isLineTerminatorJSON; + var isWhiteSpace = json5 ? Uni.isWhiteSpace : Uni.isWhiteSpaceJSON; + var length = input.length, lineno = 0, linestart = 0, position = 0, stack = []; + var tokenStart = function() { + }; + var tokenEnd = function(v) { + return v; + }; + if (options._tokenize) { + ; + (function() { + var start = null; + tokenStart = function() { + if (start !== null) throw Error("internal error, token overlap"); + start = position; + }; + tokenEnd = function(v, type) { + if (start != position) { + var hash = { + raw: input.substr(start, position - start), + type, + stack: stack.slice(0) + }; + if (v !== void 0) hash.value = v; + options._tokenize.call(null, hash); + } + start = null; + return v; + }; + })(); + } + function fail(msg) { + var column = position - linestart; + if (!msg) { + if (position < length) { + var token = "'" + JSON.stringify(input[position]).replace(/^"|"$/g, "").replace(/'/g, "\\'").replace(/\\"/g, '"') + "'"; + if (!msg) msg = "Unexpected token " + token; + } else { + if (!msg) msg = "Unexpected end of input"; + } + } + var error = SyntaxError(formatError(input, msg, position, lineno, column, json5)); + error.row = lineno + 1; + error.column = column + 1; + throw error; + } + function newline(chr) { + if (chr === "\r" && input[position] === "\n") position++; + linestart = position; + lineno++; + } + function parseGeneric() { + var result; + while (position < length) { + tokenStart(); + var chr = input[position++]; + if (chr === '"' || chr === "'" && json5) { + return tokenEnd(parseString(chr), "literal"); + } else if (chr === "{") { + tokenEnd(void 0, "separator"); + return parseObject(); + } else if (chr === "[") { + tokenEnd(void 0, "separator"); + return parseArray(); + } else if (chr === "-" || chr === "." || isDecDigit(chr) || json5 && (chr === "+" || chr === "I" || chr === "N")) { + return tokenEnd(parseNumber(), "literal"); + } else if (chr === "n") { + parseKeyword("null"); + return tokenEnd(null, "literal"); + } else if (chr === "t") { + parseKeyword("true"); + return tokenEnd(true, "literal"); + } else if (chr === "f") { + parseKeyword("false"); + return tokenEnd(false, "literal"); + } else { + position--; + return tokenEnd(void 0); + } + } + } + function parseKey() { + var result; + while (position < length) { + tokenStart(); + var chr = input[position++]; + if (chr === '"' || chr === "'" && json5) { + return tokenEnd(parseString(chr), "key"); + } else if (chr === "{") { + tokenEnd(void 0, "separator"); + return parseObject(); + } else if (chr === "[") { + tokenEnd(void 0, "separator"); + return parseArray(); + } else if (chr === "." || isDecDigit(chr)) { + return tokenEnd(parseNumber(true), "key"); + } else if (json5 && Uni.isIdentifierStart(chr) || chr === "\\" && input[position] === "u") { + var rollback = position - 1; + var result = parseIdentifier(); + if (result === void 0) { + position = rollback; + return tokenEnd(void 0); + } else { + return tokenEnd(result, "key"); + } + } else { + position--; + return tokenEnd(void 0); + } + } + } + function skipWhiteSpace() { + tokenStart(); + while (position < length) { + var chr = input[position++]; + if (isLineTerminator(chr)) { + position--; + tokenEnd(void 0, "whitespace"); + tokenStart(); + position++; + newline(chr); + tokenEnd(void 0, "newline"); + tokenStart(); + } else if (isWhiteSpace(chr)) { + } else if (chr === "/" && json5 && (input[position] === "/" || input[position] === "*")) { + position--; + tokenEnd(void 0, "whitespace"); + tokenStart(); + position++; + skipComment(input[position++] === "*"); + tokenEnd(void 0, "comment"); + tokenStart(); + } else { + position--; + break; + } + } + return tokenEnd(void 0, "whitespace"); + } + function skipComment(multi) { + while (position < length) { + var chr = input[position++]; + if (isLineTerminator(chr)) { + if (!multi) { + position--; + return; + } + newline(chr); + } else if (chr === "*" && multi) { + if (input[position] === "/") { + position++; + return; + } + } else { + } + } + if (multi) { + fail("Unclosed multiline comment"); + } + } + function parseKeyword(keyword) { + var _pos = position; + var len = keyword.length; + for (var i = 1; i < len; i++) { + if (position >= length || keyword[i] != input[position]) { + position = _pos - 1; + fail(); + } + position++; + } + } + function parseObject() { + var result = options.null_prototype ? /* @__PURE__ */ Object.create(null) : {}, empty_object = {}, is_non_empty = false; + while (position < length) { + skipWhiteSpace(); + var item1 = parseKey(); + skipWhiteSpace(); + tokenStart(); + var chr = input[position++]; + tokenEnd(void 0, "separator"); + if (chr === "}" && item1 === void 0) { + if (!json5 && is_non_empty) { + position--; + fail("Trailing comma in object"); + } + return result; + } else if (chr === ":" && item1 !== void 0) { + skipWhiteSpace(); + stack.push(item1); + var item2 = parseGeneric(); + stack.pop(); + if (item2 === void 0) fail("No value found for key " + item1); + if (typeof item1 !== "string") { + if (!json5 || typeof item1 !== "number") { + fail("Wrong key type: " + item1); + } + } + if ((item1 in empty_object || empty_object[item1] != null) && options.reserved_keys !== "replace") { + if (options.reserved_keys === "throw") { + fail("Reserved key: " + item1); + } else { + } + } else { + if (typeof options.reviver === "function") { + item2 = options.reviver.call(null, item1, item2); + } + if (item2 !== void 0) { + is_non_empty = true; + Object.defineProperty(result, item1, { + value: item2, + enumerable: true, + configurable: true, + writable: true + }); + } + } + skipWhiteSpace(); + tokenStart(); + var chr = input[position++]; + tokenEnd(void 0, "separator"); + if (chr === ",") { + continue; + } else if (chr === "}") { + return result; + } else { + fail(); + } + } else { + position--; + fail(); + } + } + fail(); + } + function parseArray() { + var result = []; + while (position < length) { + skipWhiteSpace(); + stack.push(result.length); + var item = parseGeneric(); + stack.pop(); + skipWhiteSpace(); + tokenStart(); + var chr = input[position++]; + tokenEnd(void 0, "separator"); + if (item !== void 0) { + if (typeof options.reviver === "function") { + item = options.reviver.call(null, String(result.length), item); + } + if (item === void 0) { + result.length++; + item = true; + } else { + result.push(item); + } + } + if (chr === ",") { + if (item === void 0) { + fail("Elisions are not supported"); + } + } else if (chr === "]") { + if (!json5 && item === void 0 && result.length) { + position--; + fail("Trailing comma in array"); + } + return result; + } else { + position--; + fail(); + } + } + } + function parseNumber() { + position--; + var start = position, chr = input[position++], t; + var to_num = function(is_octal2) { + var str = input.substr(start, position - start); + if (is_octal2) { + var result = parseInt(str.replace(/^0o?/, ""), 8); + } else { + var result = Number(str); + } + if (Number.isNaN(result)) { + position--; + fail('Bad numeric literal - "' + input.substr(start, position - start + 1) + '"'); + } else if (!json5 && !str.match(/^-?(0|[1-9][0-9]*)(\.[0-9]+)?(e[+-]?[0-9]+)?$/i)) { + position--; + fail('Non-json numeric literal - "' + input.substr(start, position - start + 1) + '"'); + } else { + return result; + } + }; + if (chr === "-" || chr === "+" && json5) chr = input[position++]; + if (chr === "N" && json5) { + parseKeyword("NaN"); + return NaN; + } + if (chr === "I" && json5) { + parseKeyword("Infinity"); + return to_num(); + } + if (chr >= "1" && chr <= "9") { + while (position < length && isDecDigit(input[position])) position++; + chr = input[position++]; + } + if (chr === "0") { + chr = input[position++]; + var is_octal = chr === "o" || chr === "O" || isOctDigit(chr); + var is_hex = chr === "x" || chr === "X"; + if (json5 && (is_octal || is_hex)) { + while (position < length && (is_hex ? isHexDigit : isOctDigit)(input[position])) position++; + var sign = 1; + if (input[start] === "-") { + sign = -1; + start++; + } else if (input[start] === "+") { + start++; + } + return sign * to_num(is_octal); + } + } + if (chr === ".") { + while (position < length && isDecDigit(input[position])) position++; + chr = input[position++]; + } + if (chr === "e" || chr === "E") { + chr = input[position++]; + if (chr === "-" || chr === "+") position++; + while (position < length && isDecDigit(input[position])) position++; + chr = input[position++]; + } + position--; + return to_num(); + } + function parseIdentifier() { + position--; + var result = ""; + while (position < length) { + var chr = input[position++]; + if (chr === "\\" && input[position] === "u" && isHexDigit(input[position + 1]) && isHexDigit(input[position + 2]) && isHexDigit(input[position + 3]) && isHexDigit(input[position + 4])) { + chr = String.fromCharCode(parseInt(input.substr(position + 1, 4), 16)); + position += 5; + } + if (result.length) { + if (Uni.isIdentifierPart(chr)) { + result += chr; + } else { + position--; + return result; + } + } else { + if (Uni.isIdentifierStart(chr)) { + result += chr; + } else { + return void 0; + } + } + } + fail(); + } + function parseString(endChar) { + var result = ""; + while (position < length) { + var chr = input[position++]; + if (chr === endChar) { + return result; + } else if (chr === "\\") { + if (position >= length) fail(); + chr = input[position++]; + if (unescapeMap[chr] && (json5 || chr != "v" && chr != "'")) { + result += unescapeMap[chr]; + } else if (json5 && isLineTerminator(chr)) { + newline(chr); + } else if (chr === "u" || chr === "x" && json5) { + var off = chr === "u" ? 4 : 2; + for (var i = 0; i < off; i++) { + if (position >= length) fail(); + if (!isHexDigit(input[position])) fail("Bad escape sequence"); + position++; + } + result += String.fromCharCode(parseInt(input.substr(position - off, off), 16)); + } else if (json5 && isOctDigit(chr)) { + if (chr < "4" && isOctDigit(input[position]) && isOctDigit(input[position + 1])) { + var digits = 3; + } else if (isOctDigit(input[position])) { + var digits = 2; + } else { + var digits = 1; + } + position += digits - 1; + result += String.fromCharCode(parseInt(input.substr(position - digits, digits), 8)); + } else if (json5) { + result += chr; + } else { + position--; + fail(); + } + } else if (isLineTerminator(chr)) { + fail(); + } else { + if (!json5 && chr.charCodeAt(0) < 32) { + position--; + fail("Unexpected control character"); + } + result += chr; + } + } + fail(); + } + skipWhiteSpace(); + var return_value = parseGeneric(); + if (return_value !== void 0 || position < length) { + skipWhiteSpace(); + if (position >= length) { + if (typeof options.reviver === "function") { + return_value = options.reviver.call(null, "", return_value); + } + return return_value; + } else { + fail(); + } + } else { + if (position) { + fail("No data, only a whitespace"); + } else { + fail("No data, empty input"); + } + } + } + module2.exports.parse = function parseJSON(input, options) { + if (typeof options === "function") { + options = { + reviver: options + }; + } + if (input === void 0) { + return void 0; + } + if (typeof input !== "string") input = String(input); + if (options == null) options = {}; + if (options.reserved_keys == null) options.reserved_keys = "ignore"; + if (options.reserved_keys === "throw" || options.reserved_keys === "ignore") { + if (options.null_prototype == null) { + options.null_prototype = true; + } + } + try { + return parse2(input, options); + } catch (err) { + if (err instanceof SyntaxError && err.row != null && err.column != null) { + var old_err = err; + err = SyntaxError(old_err.message); + err.column = old_err.column; + err.row = old_err.row; + } + throw err; + } + }; + module2.exports.tokenize = function tokenizeJSON(input, options) { + if (options == null) options = {}; + options._tokenize = function(smth) { + if (options._addstack) smth.stack.unshift.apply(smth.stack, options._addstack); + tokens.push(smth); + }; + var tokens = []; + tokens.data = module2.exports.parse(input, options); + return tokens; + }; + } +}); + +// ../../node_modules/liquid-json/lib/bomb.js +var require_bomb = __commonJS({ + "../../node_modules/liquid-json/lib/bomb.js"(exports2, module2) { + var bomb = { + /** + * @private + * @type {Object} + */ + code: { + // @todo: could be shifted to outside the bomb object + FEFF: 65279, + BBBF: 48063, + FE: 254, + FF: 255, + EF: 239, + BB: 187, + BF: 191 + }, + /** + * Checks whether string has BOM + * @param {String} str An input string that is tested for the presence of BOM + * + * @returns {Number} If greater than 0, implies that a BOM of returned length was found. Else, zero is returned. + */ + indexOfBOM: function(str) { + if (typeof str !== "string") { + return 0; + } + if (str.charCodeAt(0) === bomb.code.FEFF || str.charCodeAt(0) === bomb.code.BBBF) { + return 1; + } + if (str.charCodeAt(0) === bomb.code.FE && str.charCodeAt(1) === bomb.code.FF) { + return 2; + } + if (str.charCodeAt(0) === bomb.code.FF && str.charCodeAt(1) === bomb.code.FE) { + return 2; + } + if (str.charCodeAt(0) === bomb.code.EF && str.charCodeAt(1) === bomb.code.BB && str.charCodeAt(2) === bomb.code.BF) { + return 3; + } + return 0; + }, + /** + * Trim BOM from a string + * + * @param {String} str An input string that is tested for the presence of BOM + * @returns {String} The input string stripped of any BOM, if found. If the input is not a string, it is returned as + * is. + */ + trim: function(str) { + var pos = bomb.indexOfBOM(str); + return pos ? str.slice(pos) : str; + } + }; + module2.exports = bomb; + } +}); + +// ../../node_modules/liquid-json/lib/index.js +var require_lib5 = __commonJS({ + "../../node_modules/liquid-json/lib/index.js"(exports2, module2) { + var fallback = require_parse2(); + var bomb = require_bomb(); + var FALLBACK_MODE = "json"; + var ERROR_NAME = "JSONError"; + var parse2; + parse2 = function(str, reviver, strict) { + var bomMarkerIndex = bomb.indexOfBOM(str); + if (bomMarkerIndex) { + if (strict) { + throw SyntaxError("Unexpected byte order mark found in first " + bomMarkerIndex + " character(s)"); + } + str = str.slice(bomMarkerIndex); + } + try { + return JSON.parse(str, reviver); + } catch (err) { + fallback.parse(str, { + mode: FALLBACK_MODE, + reviver + }); + throw err; + } + }; + module2.exports = { + parse: function(str, reviver, relaxed) { + if (typeof reviver === "boolean" && relaxed === null) { + relaxed = reviver; + reviver = null; + } + try { + return parse2(str, reviver, relaxed); + } catch (err) { + err.name = ERROR_NAME; + throw err; + } + }, + stringify: function() { + try { + return JSON.stringify.apply(JSON, arguments); + } catch (err) { + err.name = ERROR_NAME; + throw err; + } + } + }; + } +}); + +// ../../node_modules/liquid-json/index.js +var require_liquid_json = __commonJS({ + "../../node_modules/liquid-json/index.js"(exports2, module2) { + module2.exports = require_lib5(); + } +}); + +// ../../node_modules/postman-collection/lib/collection/cookie.js +var require_cookie = __commonJS({ + "../../node_modules/postman-collection/lib/collection/cookie.js"(exports2, module2) { + var _2 = require_util2().lodash; + var PropertyBase = require_property_base().PropertyBase; + var PropertyList = require_property_list().PropertyList; + var E = ""; + var EQ = "="; + var PAIR_SPLIT_REGEX = /; */; + var COOKIES_SEPARATOR = "; "; + var cookieAttributes = { + httponly: "httpOnly", + secure: "secure", + domain: "domain", + path: "path", + "max-age": "maxAge", + session: "session", + expires: "expires" + }; + var Cookie; + _2.inherit( + /** + * A Postman Cookie definition that comprehensively represents an HTTP Cookie. + * + * @constructor + * @extends {PropertyBase} + * + * @param {Cookie.definition} [options] Pass the initial definition of the Cookie. + * @example Create a new Cookie + * var Cookie = require('postman-collection').Cookie, + * myCookie = new Cookie({ + * name: 'my-cookie-name', + * expires: '1464769543832', // UNIX timestamp, in *milliseconds* + * maxAge: '300', // In seconds. In this case, the Cookie is valid for 5 minutes + * domain: 'something.example.com', + * path: '/', + * secure: false, + * httpOnly: true, + * session: false, + * value: 'my-cookie-value', + * extensions: [{ + * key: 'Priority', + * value: 'HIGH' + * }] + * }); + * + * @example Parse a Cookie Header + * var Cookie = require('postman-collection').Cookie, + * rawHeader = 'myCookie=myValue;Path=/;Expires=Sun, 04-Feb-2018 14:18:27 GMT;Secure;HttpOnly;Priority=HIGH' + * myCookie = new Cookie(rawHeader); + * + * console.log(myCookie.toJSON()); + */ + Cookie = function PostmanCookie(options) { + Cookie.super_.call(this, options); + _2.isString(options) && (options = Cookie.parse(options)); + options && this.update(options); + }, + PropertyBase + ); + _2.assign( + Cookie.prototype, + /** @lends Cookie.prototype */ + { + update(options) { + _2.mergeDefined( + this, + /** @lends Cookie.prototype */ + { + /** + * The name of the cookie. + * + * @type {String} + */ + name: _2.choose(options.name, options.key), + /** + * Expires sets an expiry date for when a cookie gets deleted. It should either be a date object or + * timestamp string of date. + * + * @type {Date|String} + * + * @note + * The value for this option is a date in the format Wdy, DD-Mon-YYYY HH:MM:SS GMT such as + * "Sat, 02 May 2009 23:38:25 GMT". Without the expires option, a cookie has a lifespan of a single session. + * A session is defined as finished when the browser is shut down, so session cookies exist only while the + * browser remains open. If the expires option is set to a date that appears in the past, then the cookie is + * immediately deleted in browser. + * + * @todo Accept date object and convert stringified date (timestamp only) to date object + * @todo Consider using Infinity as a default + */ + expires: _2.isString(options.expires) ? new Date(options.expires) : options.expires, + /** + * Max-age sets the time in seconds for when a cookie will be deleted. + * + * @type {Number} + */ + maxAge: _2.has(options, "maxAge") ? Number(options.maxAge) : void 0, + /** + * Indicates the domain(s) for which the cookie should be sent. + * + * @type {String} + * + * @note + * By default, domain is set to the host name of the page setting the cookie, so the cookie value is sent + * whenever a request is made to the same host name. The value set for the domain option must be part of the + * host name that is sending the Set-Cookie header. The SDK does not perform this check, but the underlying + * client that actually sends the request could do it automatically. + */ + domain: options.domain, + /** + * @type {String} + * + * @note + * On server, the default value for the path option is the path of the URL that sent the Set-Cookie header. + */ + path: options.path, + /** + * A secure cookie will only be sent to the server when a request is made using SSL and the HTTPS protocol. + * The idea that the contents of the cookie are of high value and could be potentially damaging to transmit + * as clear text. + * + * @type {Boolean} + */ + secure: _2.has(options, "secure") ? Boolean(options.secure) : void 0, + /** + * The idea behind HTTP-only cookies is to instruct a browser that a cookie should never be accessible via + * JavaScript through the document.cookie property. This feature was designed as a security measure to help + * prevent cross-site scripting (XSS) attacks perpetrated by stealing cookies via JavaScript. + * + * @type {Boolean} + */ + httpOnly: _2.has(options, "httpOnly") ? Boolean(options.httpOnly) : void 0, + /** + * @type {Boolean} + */ + hostOnly: _2.has(options, "hostOnly") ? Boolean(options.hostOnly) : void 0, + /** + * Indicates whether this is a Session Cookie. + * + * @type {Boolean} + */ + session: _2.has(options, "session") ? Boolean(options.session) : void 0, + /** + * @note The commonly held belief is that cookie values must be URL-encoded, but this is a fallacy even + * though it is the de facto implementation. The original specification indicates that only three types of + * characters must be encoded: semicolon, comma, and white space. The specification indicates that URL + * encoding may be used but stops short of requiring it. The RFC makes no mention of encoding whatsoever. + * Still, almost all implementations perform some sort of URL encoding on cookie values. + * @type {String} + */ + value: options.value ? _2.ensureEncoded(options.value) : void 0, + /** + * Any extra parameters that are not strictly a part of the Cookie spec go here. + * + * @type {Array} + */ + extensions: options.extensions || void 0 + } + ); + }, + /** + * Get the value of this cookie. + * + * @returns {String} + */ + valueOf() { + try { + return decodeURIComponent(this.value); + } catch (error) { + return this.value; + } + }, + /** + * Converts the Cookie to a single Set-Cookie header string. + * + * @returns {String} + */ + toString() { + var str = Cookie.unparseSingle(this); + if (this.expires && this.expires instanceof Date) { + if (!Number.isNaN(this.expires.getTime())) { + str += "; Expires=" + this.expires.toUTCString(); + } + } else if (this.expires) { + str += "; Expires=" + this.expires; + } + if (this.maxAge && this.maxAge !== Infinity) { + str += "; Max-Age=" + this.maxAge; + } + if (this.domain && !this.hostOnly) { + str += "; Domain=" + this.domain; + } + if (this.path) { + str += "; Path=" + this.path; + } + if (this.secure) { + str += "; Secure"; + } + if (this.httpOnly) { + str += "; HttpOnly"; + } + if (this.extensions) { + this.extensions.forEach(({ key, value }) => { + str += `; ${key}`; + str += value === true ? "" : `=${value}`; + }); + } + return str; + } + } + ); + _2.assign( + Cookie, + /** @lends Cookie */ + { + /** + * Defines the name of this property for internal use. + * + * @private + * @readOnly + * @type {String} + */ + _postman_propertyName: "Cookie", + // define behaviour of this object when put in list + _postman_propertyIndexKey: "name", + _postman_propertyIndexCaseInsensitive: true, + _postman_propertyAllowsMultipleValues: true, + /** + * Check whether an object is an instance of PostmanCookie. + * + * @param {*} obj - + * @returns {Boolean} + */ + isCookie: function(obj) { + return Boolean(obj) && (obj instanceof Cookie || _2.inSuperChain(obj.constructor, "_postman_propertyName", Cookie._postman_propertyName)); + }, + /** + * Stringifies an Array or {@link PropertyList} of Cookies into a single string. + * + * @param {Cookie[]} cookies - List of cookie definition object + * @returns {String} + */ + unparse: function(cookies) { + if (!_2.isArray(cookies) && !PropertyList.isPropertyList(cookies)) { + return E; + } + return cookies.map(Cookie.unparseSingle).join(COOKIES_SEPARATOR); + }, + /** + * Unparses a single Cookie. + * + * @param {Cookie} cookie - Cookie definition object + * @returns {String} + */ + unparseSingle: function(cookie) { + if (!_2.isObject(cookie)) { + return E; + } + var value = _2.isNil(cookie.value) ? E : cookie.value; + if (!cookie.name) { + return value; + } + return cookie.name + EQ + value; + }, + /** + * Cookie header parser + * + * @param {String} str - + * @returns {*} A plain cookie options object, use it to create a new Cookie + */ + parse: function(str) { + if (!_2.isString(str)) { + return str; + } + var obj = {}, pairs = str.split(PAIR_SPLIT_REGEX), nameval; + nameval = Cookie.splitParam(pairs.shift()); + obj.key = nameval.key; + obj.value = nameval.value; + pairs.forEach(function(pair) { + var keyval = Cookie.splitParam(pair), value = keyval.value, keyLower = keyval.key.toLowerCase(); + if (cookieAttributes[keyLower]) { + obj[cookieAttributes[keyLower]] = value; + } else { + obj.extensions = obj.extensions || []; + obj.extensions.push(keyval); + } + }); + if (!obj.domain) { + obj.hostOnly = true; + } + return obj; + }, + /** + * Converts the Cookie to a single Set-Cookie header string. + * + * @param {Cookie} cookie - Cookie definition object + * @returns {String} + */ + stringify: function(cookie) { + return Cookie.prototype.toString.call(cookie); + }, + /** + * Splits a Cookie parameter into a key and a value + * + * @private + * @param {String} param - + * @returns {{key: *, value: (Boolean|*)}} + */ + splitParam: function(param) { + var split = param.split("="), key, value; + key = split[0].trim(); + value = _2.isString(split[1]) ? split[1].trim() : true; + if (_2.isString(value) && value[0] === '"') { + value = value.slice(1, -1); + } + return { key, value }; + } + } + ); + module2.exports = { + Cookie + }; + } +}); + +// ../../node_modules/postman-collection/lib/collection/cookie-list.js +var require_cookie_list = __commonJS({ + "../../node_modules/postman-collection/lib/collection/cookie-list.js"(exports2, module2) { + var _2 = require_util2().lodash; + var PropertyList = require_property_list().PropertyList; + var Cookie = require_cookie().Cookie; + var CookieList; + _2.inherit( + /** + * Contains a list of header elements + * + * @constructor + * @param {Object} parent - + * @param {Object[]} cookies - + * @extends {PropertyList} + */ + CookieList = function(parent, cookies) { + CookieList.super_.call(this, Cookie, parent, cookies); + }, + PropertyList + ); + _2.assign( + CookieList, + /** @lends CookieList */ + { + /** + * Defines the name of this property for internal use. + * + * @private + * @readOnly + * @type {String} + */ + _postman_propertyName: "CookieList", + /** + * Checks if the given object is a CookieList + * + * @param {*} obj - + * @returns {Boolean} + */ + isCookieList: function(obj) { + return Boolean(obj) && (obj instanceof CookieList || _2.inSuperChain(obj.constructor, "_postman_propertyName", CookieList._postman_propertyName)); + } + } + ); + module2.exports = { + CookieList + }; + } +}); + +// ../../node_modules/file-type/index.js +var require_file_type = __commonJS({ + "../../node_modules/file-type/index.js"(exports2, module2) { + "use strict"; + module2.exports = function(buf) { + if (!(buf && buf.length > 1)) { + return null; + } + if (buf[0] === 255 && buf[1] === 216 && buf[2] === 255) { + return { + ext: "jpg", + mime: "image/jpeg" + }; + } + if (buf[0] === 137 && buf[1] === 80 && buf[2] === 78 && buf[3] === 71) { + return { + ext: "png", + mime: "image/png" + }; + } + if (buf[0] === 71 && buf[1] === 73 && buf[2] === 70) { + return { + ext: "gif", + mime: "image/gif" + }; + } + if (buf[8] === 87 && buf[9] === 69 && buf[10] === 66 && buf[11] === 80) { + return { + ext: "webp", + mime: "image/webp" + }; + } + if (buf[0] === 70 && buf[1] === 76 && buf[2] === 73 && buf[3] === 70) { + return { + ext: "flif", + mime: "image/flif" + }; + } + if ((buf[0] === 73 && buf[1] === 73 && buf[2] === 42 && buf[3] === 0 || buf[0] === 77 && buf[1] === 77 && buf[2] === 0 && buf[3] === 42) && buf[8] === 67 && buf[9] === 82) { + return { + ext: "cr2", + mime: "image/x-canon-cr2" + }; + } + if (buf[0] === 73 && buf[1] === 73 && buf[2] === 42 && buf[3] === 0 || buf[0] === 77 && buf[1] === 77 && buf[2] === 0 && buf[3] === 42) { + return { + ext: "tif", + mime: "image/tiff" + }; + } + if (buf[0] === 66 && buf[1] === 77) { + return { + ext: "bmp", + mime: "image/bmp" + }; + } + if (buf[0] === 73 && buf[1] === 73 && buf[2] === 188) { + return { + ext: "jxr", + mime: "image/vnd.ms-photo" + }; + } + if (buf[0] === 56 && buf[1] === 66 && buf[2] === 80 && buf[3] === 83) { + return { + ext: "psd", + mime: "image/vnd.adobe.photoshop" + }; + } + if (buf[0] === 80 && buf[1] === 75 && buf[2] === 3 && buf[3] === 4 && buf[30] === 109 && buf[31] === 105 && buf[32] === 109 && buf[33] === 101 && buf[34] === 116 && buf[35] === 121 && buf[36] === 112 && buf[37] === 101 && buf[38] === 97 && buf[39] === 112 && buf[40] === 112 && buf[41] === 108 && buf[42] === 105 && buf[43] === 99 && buf[44] === 97 && buf[45] === 116 && buf[46] === 105 && buf[47] === 111 && buf[48] === 110 && buf[49] === 47 && buf[50] === 101 && buf[51] === 112 && buf[52] === 117 && buf[53] === 98 && buf[54] === 43 && buf[55] === 122 && buf[56] === 105 && buf[57] === 112) { + return { + ext: "epub", + mime: "application/epub+zip" + }; + } + if (buf[0] === 80 && buf[1] === 75 && buf[2] === 3 && buf[3] === 4 && buf[30] === 77 && buf[31] === 69 && buf[32] === 84 && buf[33] === 65 && buf[34] === 45 && buf[35] === 73 && buf[36] === 78 && buf[37] === 70 && buf[38] === 47 && buf[39] === 109 && buf[40] === 111 && buf[41] === 122 && buf[42] === 105 && buf[43] === 108 && buf[44] === 108 && buf[45] === 97 && buf[46] === 46 && buf[47] === 114 && buf[48] === 115 && buf[49] === 97) { + return { + ext: "xpi", + mime: "application/x-xpinstall" + }; + } + if (buf[0] === 80 && buf[1] === 75 && (buf[2] === 3 || buf[2] === 5 || buf[2] === 7) && (buf[3] === 4 || buf[3] === 6 || buf[3] === 8)) { + return { + ext: "zip", + mime: "application/zip" + }; + } + if (buf[257] === 117 && buf[258] === 115 && buf[259] === 116 && buf[260] === 97 && buf[261] === 114) { + return { + ext: "tar", + mime: "application/x-tar" + }; + } + if (buf[0] === 82 && buf[1] === 97 && buf[2] === 114 && buf[3] === 33 && buf[4] === 26 && buf[5] === 7 && (buf[6] === 0 || buf[6] === 1)) { + return { + ext: "rar", + mime: "application/x-rar-compressed" + }; + } + if (buf[0] === 31 && buf[1] === 139 && buf[2] === 8) { + return { + ext: "gz", + mime: "application/gzip" + }; + } + if (buf[0] === 66 && buf[1] === 90 && buf[2] === 104) { + return { + ext: "bz2", + mime: "application/x-bzip2" + }; + } + if (buf[0] === 55 && buf[1] === 122 && buf[2] === 188 && buf[3] === 175 && buf[4] === 39 && buf[5] === 28) { + return { + ext: "7z", + mime: "application/x-7z-compressed" + }; + } + if (buf[0] === 120 && buf[1] === 1) { + return { + ext: "dmg", + mime: "application/x-apple-diskimage" + }; + } + if (buf[0] === 0 && buf[1] === 0 && buf[2] === 0 && (buf[3] === 24 || buf[3] === 32) && buf[4] === 102 && buf[5] === 116 && buf[6] === 121 && buf[7] === 112 || buf[0] === 51 && buf[1] === 103 && buf[2] === 112 && buf[3] === 53 || buf[0] === 0 && buf[1] === 0 && buf[2] === 0 && buf[3] === 28 && buf[4] === 102 && buf[5] === 116 && buf[6] === 121 && buf[7] === 112 && buf[8] === 109 && buf[9] === 112 && buf[10] === 52 && buf[11] === 50 && buf[16] === 109 && buf[17] === 112 && buf[18] === 52 && buf[19] === 49 && buf[20] === 109 && buf[21] === 112 && buf[22] === 52 && buf[23] === 50 && buf[24] === 105 && buf[25] === 115 && buf[26] === 111 && buf[27] === 109 || buf[0] === 0 && buf[1] === 0 && buf[2] === 0 && buf[3] === 28 && buf[4] === 102 && buf[5] === 116 && buf[6] === 121 && buf[7] === 112 && buf[8] === 105 && buf[9] === 115 && buf[10] === 111 && buf[11] === 109 || buf[0] === 0 && buf[1] === 0 && buf[2] === 0 && buf[3] === 28 && buf[4] === 102 && buf[5] === 116 && buf[6] === 121 && buf[7] === 112 && buf[8] === 109 && buf[9] === 112 && buf[10] === 52 && buf[11] === 50 && buf[12] === 0 && buf[13] === 0 && buf[14] === 0 && buf[15] === 0) { + return { + ext: "mp4", + mime: "video/mp4" + }; + } + if (buf[0] === 0 && buf[1] === 0 && buf[2] === 0 && buf[3] === 28 && buf[4] === 102 && buf[5] === 116 && buf[6] === 121 && buf[7] === 112 && buf[8] === 77 && buf[9] === 52 && buf[10] === 86) { + return { + ext: "m4v", + mime: "video/x-m4v" + }; + } + if (buf[0] === 77 && buf[1] === 84 && buf[2] === 104 && buf[3] === 100) { + return { + ext: "mid", + mime: "audio/midi" + }; + } + if (buf[31] === 109 && buf[32] === 97 && buf[33] === 116 && buf[34] === 114 && buf[35] === 111 && buf[36] === 115 && buf[37] === 107 && buf[38] === 97) { + return { + ext: "mkv", + mime: "video/x-matroska" + }; + } + if (buf[0] === 26 && buf[1] === 69 && buf[2] === 223 && buf[3] === 163) { + return { + ext: "webm", + mime: "video/webm" + }; + } + if (buf[0] === 0 && buf[1] === 0 && buf[2] === 0 && buf[3] === 20 && buf[4] === 102 && buf[5] === 116 && buf[6] === 121 && buf[7] === 112) { + return { + ext: "mov", + mime: "video/quicktime" + }; + } + if (buf[0] === 82 && buf[1] === 73 && buf[2] === 70 && buf[3] === 70 && buf[8] === 65 && buf[9] === 86 && buf[10] === 73) { + return { + ext: "avi", + mime: "video/x-msvideo" + }; + } + if (buf[0] === 48 && buf[1] === 38 && buf[2] === 178 && buf[3] === 117 && buf[4] === 142 && buf[5] === 102 && buf[6] === 207 && buf[7] === 17 && buf[8] === 166 && buf[9] === 217) { + return { + ext: "wmv", + mime: "video/x-ms-wmv" + }; + } + if (buf[0] === 0 && buf[1] === 0 && buf[2] === 1 && buf[3].toString(16)[0] === "b") { + return { + ext: "mpg", + mime: "video/mpeg" + }; + } + if (buf[0] === 73 && buf[1] === 68 && buf[2] === 51 || buf[0] === 255 && buf[1] === 251) { + return { + ext: "mp3", + mime: "audio/mpeg" + }; + } + if (buf[4] === 102 && buf[5] === 116 && buf[6] === 121 && buf[7] === 112 && buf[8] === 77 && buf[9] === 52 && buf[10] === 65 || buf[0] === 77 && buf[1] === 52 && buf[2] === 65 && buf[3] === 32) { + return { + ext: "m4a", + mime: "audio/m4a" + }; + } + if (buf[28] === 79 && buf[29] === 112 && buf[30] === 117 && buf[31] === 115 && buf[32] === 72 && buf[33] === 101 && buf[34] === 97 && buf[35] === 100) { + return { + ext: "opus", + mime: "audio/opus" + }; + } + if (buf[0] === 79 && buf[1] === 103 && buf[2] === 103 && buf[3] === 83) { + return { + ext: "ogg", + mime: "audio/ogg" + }; + } + if (buf[0] === 102 && buf[1] === 76 && buf[2] === 97 && buf[3] === 67) { + return { + ext: "flac", + mime: "audio/x-flac" + }; + } + if (buf[0] === 82 && buf[1] === 73 && buf[2] === 70 && buf[3] === 70 && buf[8] === 87 && buf[9] === 65 && buf[10] === 86 && buf[11] === 69) { + return { + ext: "wav", + mime: "audio/x-wav" + }; + } + if (buf[0] === 35 && buf[1] === 33 && buf[2] === 65 && buf[3] === 77 && buf[4] === 82 && buf[5] === 10) { + return { + ext: "amr", + mime: "audio/amr" + }; + } + if (buf[0] === 37 && buf[1] === 80 && buf[2] === 68 && buf[3] === 70) { + return { + ext: "pdf", + mime: "application/pdf" + }; + } + if (buf[0] === 77 && buf[1] === 90) { + return { + ext: "exe", + mime: "application/x-msdownload" + }; + } + if ((buf[0] === 67 || buf[0] === 70) && buf[1] === 87 && buf[2] === 83) { + return { + ext: "swf", + mime: "application/x-shockwave-flash" + }; + } + if (buf[0] === 123 && buf[1] === 92 && buf[2] === 114 && buf[3] === 116 && buf[4] === 102) { + return { + ext: "rtf", + mime: "application/rtf" + }; + } + if (buf[0] === 119 && buf[1] === 79 && buf[2] === 70 && buf[3] === 70 && (buf[4] === 0 && buf[5] === 1 && buf[6] === 0 && buf[7] === 0 || buf[4] === 79 && buf[5] === 84 && buf[6] === 84 && buf[7] === 79)) { + return { + ext: "woff", + mime: "application/font-woff" + }; + } + if (buf[0] === 119 && buf[1] === 79 && buf[2] === 70 && buf[3] === 50 && (buf[4] === 0 && buf[5] === 1 && buf[6] === 0 && buf[7] === 0 || buf[4] === 79 && buf[5] === 84 && buf[6] === 84 && buf[7] === 79)) { + return { + ext: "woff2", + mime: "application/font-woff" + }; + } + if (buf[34] === 76 && buf[35] === 80 && (buf[8] === 0 && buf[9] === 0 && buf[10] === 1 || buf[8] === 1 && buf[9] === 0 && buf[10] === 2 || buf[8] === 2 && buf[9] === 0 && buf[10] === 2)) { + return { + ext: "eot", + mime: "application/octet-stream" + }; + } + if (buf[0] === 0 && buf[1] === 1 && buf[2] === 0 && buf[3] === 0 && buf[4] === 0) { + return { + ext: "ttf", + mime: "application/font-sfnt" + }; + } + if (buf[0] === 79 && buf[1] === 84 && buf[2] === 84 && buf[3] === 79 && buf[4] === 0) { + return { + ext: "otf", + mime: "application/font-sfnt" + }; + } + if (buf[0] === 0 && buf[1] === 0 && buf[2] === 1 && buf[3] === 0) { + return { + ext: "ico", + mime: "image/x-icon" + }; + } + if (buf[0] === 70 && buf[1] === 76 && buf[2] === 86 && buf[3] === 1) { + return { + ext: "flv", + mime: "video/x-flv" + }; + } + if (buf[0] === 37 && buf[1] === 33) { + return { + ext: "ps", + mime: "application/postscript" + }; + } + if (buf[0] === 253 && buf[1] === 55 && buf[2] === 122 && buf[3] === 88 && buf[4] === 90 && buf[5] === 0) { + return { + ext: "xz", + mime: "application/x-xz" + }; + } + if (buf[0] === 83 && buf[1] === 81 && buf[2] === 76 && buf[3] === 105) { + return { + ext: "sqlite", + mime: "application/x-sqlite3" + }; + } + if (buf[0] === 78 && buf[1] === 69 && buf[2] === 83 && buf[3] === 26) { + return { + ext: "nes", + mime: "application/x-nintendo-nes-rom" + }; + } + if (buf[0] === 67 && buf[1] === 114 && buf[2] === 50 && buf[3] === 52) { + return { + ext: "crx", + mime: "application/x-google-chrome-extension" + }; + } + if (buf[0] === 77 && buf[1] === 83 && buf[2] === 67 && buf[3] === 70 || buf[0] === 73 && buf[1] === 83 && buf[2] === 99 && buf[3] === 40) { + return { + ext: "cab", + mime: "application/vnd.ms-cab-compressed" + }; + } + if (buf[0] === 33 && buf[1] === 60 && buf[2] === 97 && buf[3] === 114 && buf[4] === 99 && buf[5] === 104 && buf[6] === 62 && buf[7] === 10 && buf[8] === 100 && buf[9] === 101 && buf[10] === 98 && buf[11] === 105 && buf[12] === 97 && buf[13] === 110 && buf[14] === 45 && buf[15] === 98 && buf[16] === 105 && buf[17] === 110 && buf[18] === 97 && buf[19] === 114 && buf[20] === 121) { + return { + ext: "deb", + mime: "application/x-deb" + }; + } + if (buf[0] === 33 && buf[1] === 60 && buf[2] === 97 && buf[3] === 114 && buf[4] === 99 && buf[5] === 104 && buf[6] === 62) { + return { + ext: "ar", + mime: "application/x-unix-archive" + }; + } + if (buf[0] === 237 && buf[1] === 171 && buf[2] === 238 && buf[3] === 219) { + return { + ext: "rpm", + mime: "application/x-rpm" + }; + } + if (buf[0] === 31 && buf[1] === 160 || buf[0] === 31 && buf[1] === 157) { + return { + ext: "Z", + mime: "application/x-compress" + }; + } + if (buf[0] === 76 && buf[1] === 90 && buf[2] === 73 && buf[3] === 80) { + return { + ext: "lz", + mime: "application/x-lzip" + }; + } + if (buf[0] === 208 && buf[1] === 207 && buf[2] === 17 && buf[3] === 224 && buf[4] === 161 && buf[5] === 177 && buf[6] === 26 && buf[7] === 225) { + return { + ext: "msi", + mime: "application/x-msi" + }; + } + return null; + }; + } +}); + +// ../../node_modules/mime-db/db.json +var require_db2 = __commonJS({ + "../../node_modules/mime-db/db.json"(exports2, module2) { + module2.exports = { + "application/1d-interleaved-parityfec": { + source: "iana" + }, + "application/3gpdash-qoe-report+xml": { + source: "iana", + charset: "UTF-8", + compressible: true + }, + "application/3gpp-ims+xml": { + source: "iana", + compressible: true + }, + "application/3gpphal+json": { + source: "iana", + compressible: true + }, + "application/3gpphalforms+json": { + source: "iana", + compressible: true + }, + "application/a2l": { + source: "iana" + }, + "application/ace+cbor": { + source: "iana" + }, + "application/activemessage": { + source: "iana" + }, + "application/activity+json": { + source: "iana", + compressible: true + }, + "application/alto-costmap+json": { + source: "iana", + compressible: true + }, + "application/alto-costmapfilter+json": { + source: "iana", + compressible: true + }, + "application/alto-directory+json": { + source: "iana", + compressible: true + }, + "application/alto-endpointcost+json": { + source: "iana", + compressible: true + }, + "application/alto-endpointcostparams+json": { + source: "iana", + compressible: true + }, + "application/alto-endpointprop+json": { + source: "iana", + compressible: true + }, + "application/alto-endpointpropparams+json": { + source: "iana", + compressible: true + }, + "application/alto-error+json": { + source: "iana", + compressible: true + }, + "application/alto-networkmap+json": { + source: "iana", + compressible: true + }, + "application/alto-networkmapfilter+json": { + source: "iana", + compressible: true + }, + "application/alto-updatestreamcontrol+json": { + source: "iana", + compressible: true + }, + "application/alto-updatestreamparams+json": { + source: "iana", + compressible: true + }, + "application/aml": { + source: "iana" + }, + "application/andrew-inset": { + source: "iana", + extensions: ["ez"] + }, + "application/applefile": { + source: "iana" + }, + "application/applixware": { + source: "apache", + extensions: ["aw"] + }, + "application/at+jwt": { + source: "iana" + }, + "application/atf": { + source: "iana" + }, + "application/atfx": { + source: "iana" + }, + "application/atom+xml": { + source: "iana", + compressible: true, + extensions: ["atom"] + }, + "application/atomcat+xml": { + source: "iana", + compressible: true, + extensions: ["atomcat"] + }, + "application/atomdeleted+xml": { + source: "iana", + compressible: true, + extensions: ["atomdeleted"] + }, + "application/atomicmail": { + source: "iana" + }, + "application/atomsvc+xml": { + source: "iana", + compressible: true, + extensions: ["atomsvc"] + }, + "application/atsc-dwd+xml": { + source: "iana", + compressible: true, + extensions: ["dwd"] + }, + "application/atsc-dynamic-event-message": { + source: "iana" + }, + "application/atsc-held+xml": { + source: "iana", + compressible: true, + extensions: ["held"] + }, + "application/atsc-rdt+json": { + source: "iana", + compressible: true + }, + "application/atsc-rsat+xml": { + source: "iana", + compressible: true, + extensions: ["rsat"] + }, + "application/atxml": { + source: "iana" + }, + "application/auth-policy+xml": { + source: "iana", + compressible: true + }, + "application/bacnet-xdd+zip": { + source: "iana", + compressible: false + }, + "application/batch-smtp": { + source: "iana" + }, + "application/bdoc": { + compressible: false, + extensions: ["bdoc"] + }, + "application/beep+xml": { + source: "iana", + charset: "UTF-8", + compressible: true + }, + "application/calendar+json": { + source: "iana", + compressible: true + }, + "application/calendar+xml": { + source: "iana", + compressible: true, + extensions: ["xcs"] + }, + "application/call-completion": { + source: "iana" + }, + "application/cals-1840": { + source: "iana" + }, + "application/captive+json": { + source: "iana", + compressible: true + }, + "application/cbor": { + source: "iana" + }, + "application/cbor-seq": { + source: "iana" + }, + "application/cccex": { + source: "iana" + }, + "application/ccmp+xml": { + source: "iana", + compressible: true + }, + "application/ccxml+xml": { + source: "iana", + compressible: true, + extensions: ["ccxml"] + }, + "application/cdfx+xml": { + source: "iana", + compressible: true, + extensions: ["cdfx"] + }, + "application/cdmi-capability": { + source: "iana", + extensions: ["cdmia"] + }, + "application/cdmi-container": { + source: "iana", + extensions: ["cdmic"] + }, + "application/cdmi-domain": { + source: "iana", + extensions: ["cdmid"] + }, + "application/cdmi-object": { + source: "iana", + extensions: ["cdmio"] + }, + "application/cdmi-queue": { + source: "iana", + extensions: ["cdmiq"] + }, + "application/cdni": { + source: "iana" + }, + "application/cea": { + source: "iana" + }, + "application/cea-2018+xml": { + source: "iana", + compressible: true + }, + "application/cellml+xml": { + source: "iana", + compressible: true + }, + "application/cfw": { + source: "iana" + }, + "application/city+json": { + source: "iana", + compressible: true + }, + "application/clr": { + source: "iana" + }, + "application/clue+xml": { + source: "iana", + compressible: true + }, + "application/clue_info+xml": { + source: "iana", + compressible: true + }, + "application/cms": { + source: "iana" + }, + "application/cnrp+xml": { + source: "iana", + compressible: true + }, + "application/coap-group+json": { + source: "iana", + compressible: true + }, + "application/coap-payload": { + source: "iana" + }, + "application/commonground": { + source: "iana" + }, + "application/conference-info+xml": { + source: "iana", + compressible: true + }, + "application/cose": { + source: "iana" + }, + "application/cose-key": { + source: "iana" + }, + "application/cose-key-set": { + source: "iana" + }, + "application/cpl+xml": { + source: "iana", + compressible: true, + extensions: ["cpl"] + }, + "application/csrattrs": { + source: "iana" + }, + "application/csta+xml": { + source: "iana", + compressible: true + }, + "application/cstadata+xml": { + source: "iana", + compressible: true + }, + "application/csvm+json": { + source: "iana", + compressible: true + }, + "application/cu-seeme": { + source: "apache", + extensions: ["cu"] + }, + "application/cwt": { + source: "iana" + }, + "application/cybercash": { + source: "iana" + }, + "application/dart": { + compressible: true + }, + "application/dash+xml": { + source: "iana", + compressible: true, + extensions: ["mpd"] + }, + "application/dash-patch+xml": { + source: "iana", + compressible: true, + extensions: ["mpp"] + }, + "application/dashdelta": { + source: "iana" + }, + "application/davmount+xml": { + source: "iana", + compressible: true, + extensions: ["davmount"] + }, + "application/dca-rft": { + source: "iana" + }, + "application/dcd": { + source: "iana" + }, + "application/dec-dx": { + source: "iana" + }, + "application/dialog-info+xml": { + source: "iana", + compressible: true + }, + "application/dicom": { + source: "iana" + }, + "application/dicom+json": { + source: "iana", + compressible: true + }, + "application/dicom+xml": { + source: "iana", + compressible: true + }, + "application/dii": { + source: "iana" + }, + "application/dit": { + source: "iana" + }, + "application/dns": { + source: "iana" + }, + "application/dns+json": { + source: "iana", + compressible: true + }, + "application/dns-message": { + source: "iana" + }, + "application/docbook+xml": { + source: "apache", + compressible: true, + extensions: ["dbk"] + }, + "application/dots+cbor": { + source: "iana" + }, + "application/dskpp+xml": { + source: "iana", + compressible: true + }, + "application/dssc+der": { + source: "iana", + extensions: ["dssc"] + }, + "application/dssc+xml": { + source: "iana", + compressible: true, + extensions: ["xdssc"] + }, + "application/dvcs": { + source: "iana" + }, + "application/ecmascript": { + source: "iana", + compressible: true, + extensions: ["es", "ecma"] + }, + "application/edi-consent": { + source: "iana" + }, + "application/edi-x12": { + source: "iana", + compressible: false + }, + "application/edifact": { + source: "iana", + compressible: false + }, + "application/efi": { + source: "iana" + }, + "application/elm+json": { + source: "iana", + charset: "UTF-8", + compressible: true + }, + "application/elm+xml": { + source: "iana", + compressible: true + }, + "application/emergencycalldata.cap+xml": { + source: "iana", + charset: "UTF-8", + compressible: true + }, + "application/emergencycalldata.comment+xml": { + source: "iana", + compressible: true + }, + "application/emergencycalldata.control+xml": { + source: "iana", + compressible: true + }, + "application/emergencycalldata.deviceinfo+xml": { + source: "iana", + compressible: true + }, + "application/emergencycalldata.ecall.msd": { + source: "iana" + }, + "application/emergencycalldata.providerinfo+xml": { + source: "iana", + compressible: true + }, + "application/emergencycalldata.serviceinfo+xml": { + source: "iana", + compressible: true + }, + "application/emergencycalldata.subscriberinfo+xml": { + source: "iana", + compressible: true + }, + "application/emergencycalldata.veds+xml": { + source: "iana", + compressible: true + }, + "application/emma+xml": { + source: "iana", + compressible: true, + extensions: ["emma"] + }, + "application/emotionml+xml": { + source: "iana", + compressible: true, + extensions: ["emotionml"] + }, + "application/encaprtp": { + source: "iana" + }, + "application/epp+xml": { + source: "iana", + compressible: true + }, + "application/epub+zip": { + source: "iana", + compressible: false, + extensions: ["epub"] + }, + "application/eshop": { + source: "iana" + }, + "application/exi": { + source: "iana", + extensions: ["exi"] + }, + "application/expect-ct-report+json": { + source: "iana", + compressible: true + }, + "application/express": { + source: "iana", + extensions: ["exp"] + }, + "application/fastinfoset": { + source: "iana" + }, + "application/fastsoap": { + source: "iana" + }, + "application/fdt+xml": { + source: "iana", + compressible: true, + extensions: ["fdt"] + }, + "application/fhir+json": { + source: "iana", + charset: "UTF-8", + compressible: true + }, + "application/fhir+xml": { + source: "iana", + charset: "UTF-8", + compressible: true + }, + "application/fido.trusted-apps+json": { + compressible: true + }, + "application/fits": { + source: "iana" + }, + "application/flexfec": { + source: "iana" + }, + "application/font-sfnt": { + source: "iana" + }, + "application/font-tdpfr": { + source: "iana", + extensions: ["pfr"] + }, + "application/font-woff": { + source: "iana", + compressible: false + }, + "application/framework-attributes+xml": { + source: "iana", + compressible: true + }, + "application/geo+json": { + source: "iana", + compressible: true, + extensions: ["geojson"] + }, + "application/geo+json-seq": { + source: "iana" + }, + "application/geopackage+sqlite3": { + source: "iana" + }, + "application/geoxacml+xml": { + source: "iana", + compressible: true + }, + "application/gltf-buffer": { + source: "iana" + }, + "application/gml+xml": { + source: "iana", + compressible: true, + extensions: ["gml"] + }, + "application/gpx+xml": { + source: "apache", + compressible: true, + extensions: ["gpx"] + }, + "application/gxf": { + source: "apache", + extensions: ["gxf"] + }, + "application/gzip": { + source: "iana", + compressible: false, + extensions: ["gz"] + }, + "application/h224": { + source: "iana" + }, + "application/held+xml": { + source: "iana", + compressible: true + }, + "application/hjson": { + extensions: ["hjson"] + }, + "application/http": { + source: "iana" + }, + "application/hyperstudio": { + source: "iana", + extensions: ["stk"] + }, + "application/ibe-key-request+xml": { + source: "iana", + compressible: true + }, + "application/ibe-pkg-reply+xml": { + source: "iana", + compressible: true + }, + "application/ibe-pp-data": { + source: "iana" + }, + "application/iges": { + source: "iana" + }, + "application/im-iscomposing+xml": { + source: "iana", + charset: "UTF-8", + compressible: true + }, + "application/index": { + source: "iana" + }, + "application/index.cmd": { + source: "iana" + }, + "application/index.obj": { + source: "iana" + }, + "application/index.response": { + source: "iana" + }, + "application/index.vnd": { + source: "iana" + }, + "application/inkml+xml": { + source: "iana", + compressible: true, + extensions: ["ink", "inkml"] + }, + "application/iotp": { + source: "iana" + }, + "application/ipfix": { + source: "iana", + extensions: ["ipfix"] + }, + "application/ipp": { + source: "iana" + }, + "application/isup": { + source: "iana" + }, + "application/its+xml": { + source: "iana", + compressible: true, + extensions: ["its"] + }, + "application/java-archive": { + source: "apache", + compressible: false, + extensions: ["jar", "war", "ear"] + }, + "application/java-serialized-object": { + source: "apache", + compressible: false, + extensions: ["ser"] + }, + "application/java-vm": { + source: "apache", + compressible: false, + extensions: ["class"] + }, + "application/javascript": { + source: "iana", + charset: "UTF-8", + compressible: true, + extensions: ["js", "mjs"] + }, + "application/jf2feed+json": { + source: "iana", + compressible: true + }, + "application/jose": { + source: "iana" + }, + "application/jose+json": { + source: "iana", + compressible: true + }, + "application/jrd+json": { + source: "iana", + compressible: true + }, + "application/jscalendar+json": { + source: "iana", + compressible: true + }, + "application/json": { + source: "iana", + charset: "UTF-8", + compressible: true, + extensions: ["json", "map"] + }, + "application/json-patch+json": { + source: "iana", + compressible: true + }, + "application/json-seq": { + source: "iana" + }, + "application/json5": { + extensions: ["json5"] + }, + "application/jsonml+json": { + source: "apache", + compressible: true, + extensions: ["jsonml"] + }, + "application/jwk+json": { + source: "iana", + compressible: true + }, + "application/jwk-set+json": { + source: "iana", + compressible: true + }, + "application/jwt": { + source: "iana" + }, + "application/kpml-request+xml": { + source: "iana", + compressible: true + }, + "application/kpml-response+xml": { + source: "iana", + compressible: true + }, + "application/ld+json": { + source: "iana", + compressible: true, + extensions: ["jsonld"] + }, + "application/lgr+xml": { + source: "iana", + compressible: true, + extensions: ["lgr"] + }, + "application/link-format": { + source: "iana" + }, + "application/load-control+xml": { + source: "iana", + compressible: true + }, + "application/lost+xml": { + source: "iana", + compressible: true, + extensions: ["lostxml"] + }, + "application/lostsync+xml": { + source: "iana", + compressible: true + }, + "application/lpf+zip": { + source: "iana", + compressible: false + }, + "application/lxf": { + source: "iana" + }, + "application/mac-binhex40": { + source: "iana", + extensions: ["hqx"] + }, + "application/mac-compactpro": { + source: "apache", + extensions: ["cpt"] + }, + "application/macwriteii": { + source: "iana" + }, + "application/mads+xml": { + source: "iana", + compressible: true, + extensions: ["mads"] + }, + "application/manifest+json": { + source: "iana", + charset: "UTF-8", + compressible: true, + extensions: ["webmanifest"] + }, + "application/marc": { + source: "iana", + extensions: ["mrc"] + }, + "application/marcxml+xml": { + source: "iana", + compressible: true, + extensions: ["mrcx"] + }, + "application/mathematica": { + source: "iana", + extensions: ["ma", "nb", "mb"] + }, + "application/mathml+xml": { + source: "iana", + compressible: true, + extensions: ["mathml"] + }, + "application/mathml-content+xml": { + source: "iana", + compressible: true + }, + "application/mathml-presentation+xml": { + source: "iana", + compressible: true + }, + "application/mbms-associated-procedure-description+xml": { + source: "iana", + compressible: true + }, + "application/mbms-deregister+xml": { + source: "iana", + compressible: true + }, + "application/mbms-envelope+xml": { + source: "iana", + compressible: true + }, + "application/mbms-msk+xml": { + source: "iana", + compressible: true + }, + "application/mbms-msk-response+xml": { + source: "iana", + compressible: true + }, + "application/mbms-protection-description+xml": { + source: "iana", + compressible: true + }, + "application/mbms-reception-report+xml": { + source: "iana", + compressible: true + }, + "application/mbms-register+xml": { + source: "iana", + compressible: true + }, + "application/mbms-register-response+xml": { + source: "iana", + compressible: true + }, + "application/mbms-schedule+xml": { + source: "iana", + compressible: true + }, + "application/mbms-user-service-description+xml": { + source: "iana", + compressible: true + }, + "application/mbox": { + source: "iana", + extensions: ["mbox"] + }, + "application/media-policy-dataset+xml": { + source: "iana", + compressible: true, + extensions: ["mpf"] + }, + "application/media_control+xml": { + source: "iana", + compressible: true + }, + "application/mediaservercontrol+xml": { + source: "iana", + compressible: true, + extensions: ["mscml"] + }, + "application/merge-patch+json": { + source: "iana", + compressible: true + }, + "application/metalink+xml": { + source: "apache", + compressible: true, + extensions: ["metalink"] + }, + "application/metalink4+xml": { + source: "iana", + compressible: true, + extensions: ["meta4"] + }, + "application/mets+xml": { + source: "iana", + compressible: true, + extensions: ["mets"] + }, + "application/mf4": { + source: "iana" + }, + "application/mikey": { + source: "iana" + }, + "application/mipc": { + source: "iana" + }, + "application/missing-blocks+cbor-seq": { + source: "iana" + }, + "application/mmt-aei+xml": { + source: "iana", + compressible: true, + extensions: ["maei"] + }, + "application/mmt-usd+xml": { + source: "iana", + compressible: true, + extensions: ["musd"] + }, + "application/mods+xml": { + source: "iana", + compressible: true, + extensions: ["mods"] + }, + "application/moss-keys": { + source: "iana" + }, + "application/moss-signature": { + source: "iana" + }, + "application/mosskey-data": { + source: "iana" + }, + "application/mosskey-request": { + source: "iana" + }, + "application/mp21": { + source: "iana", + extensions: ["m21", "mp21"] + }, + "application/mp4": { + source: "iana", + extensions: ["mp4s", "m4p"] + }, + "application/mpeg4-generic": { + source: "iana" + }, + "application/mpeg4-iod": { + source: "iana" + }, + "application/mpeg4-iod-xmt": { + source: "iana" + }, + "application/mrb-consumer+xml": { + source: "iana", + compressible: true + }, + "application/mrb-publish+xml": { + source: "iana", + compressible: true + }, + "application/msc-ivr+xml": { + source: "iana", + charset: "UTF-8", + compressible: true + }, + "application/msc-mixer+xml": { + source: "iana", + charset: "UTF-8", + compressible: true + }, + "application/msword": { + source: "iana", + compressible: false, + extensions: ["doc", "dot"] + }, + "application/mud+json": { + source: "iana", + compressible: true + }, + "application/multipart-core": { + source: "iana" + }, + "application/mxf": { + source: "iana", + extensions: ["mxf"] + }, + "application/n-quads": { + source: "iana", + extensions: ["nq"] + }, + "application/n-triples": { + source: "iana", + extensions: ["nt"] + }, + "application/nasdata": { + source: "iana" + }, + "application/news-checkgroups": { + source: "iana", + charset: "US-ASCII" + }, + "application/news-groupinfo": { + source: "iana", + charset: "US-ASCII" + }, + "application/news-transmission": { + source: "iana" + }, + "application/nlsml+xml": { + source: "iana", + compressible: true + }, + "application/node": { + source: "iana", + extensions: ["cjs"] + }, + "application/nss": { + source: "iana" + }, + "application/oauth-authz-req+jwt": { + source: "iana" + }, + "application/oblivious-dns-message": { + source: "iana" + }, + "application/ocsp-request": { + source: "iana" + }, + "application/ocsp-response": { + source: "iana" + }, + "application/octet-stream": { + source: "iana", + compressible: false, + extensions: ["bin", "dms", "lrf", "mar", "so", "dist", "distz", "pkg", "bpk", "dump", "elc", "deploy", "exe", "dll", "deb", "dmg", "iso", "img", "msi", "msp", "msm", "buffer"] + }, + "application/oda": { + source: "iana", + extensions: ["oda"] + }, + "application/odm+xml": { + source: "iana", + compressible: true + }, + "application/odx": { + source: "iana" + }, + "application/oebps-package+xml": { + source: "iana", + compressible: true, + extensions: ["opf"] + }, + "application/ogg": { + source: "iana", + compressible: false, + extensions: ["ogx"] + }, + "application/omdoc+xml": { + source: "apache", + compressible: true, + extensions: ["omdoc"] + }, + "application/onenote": { + source: "apache", + extensions: ["onetoc", "onetoc2", "onetmp", "onepkg"] + }, + "application/opc-nodeset+xml": { + source: "iana", + compressible: true + }, + "application/oscore": { + source: "iana" + }, + "application/oxps": { + source: "iana", + extensions: ["oxps"] + }, + "application/p21": { + source: "iana" + }, + "application/p21+zip": { + source: "iana", + compressible: false + }, + "application/p2p-overlay+xml": { + source: "iana", + compressible: true, + extensions: ["relo"] + }, + "application/parityfec": { + source: "iana" + }, + "application/passport": { + source: "iana" + }, + "application/patch-ops-error+xml": { + source: "iana", + compressible: true, + extensions: ["xer"] + }, + "application/pdf": { + source: "iana", + compressible: false, + extensions: ["pdf"] + }, + "application/pdx": { + source: "iana" + }, + "application/pem-certificate-chain": { + source: "iana" + }, + "application/pgp-encrypted": { + source: "iana", + compressible: false, + extensions: ["pgp"] + }, + "application/pgp-keys": { + source: "iana", + extensions: ["asc"] + }, + "application/pgp-signature": { + source: "iana", + extensions: ["asc", "sig"] + }, + "application/pics-rules": { + source: "apache", + extensions: ["prf"] + }, + "application/pidf+xml": { + source: "iana", + charset: "UTF-8", + compressible: true + }, + "application/pidf-diff+xml": { + source: "iana", + charset: "UTF-8", + compressible: true + }, + "application/pkcs10": { + source: "iana", + extensions: ["p10"] + }, + "application/pkcs12": { + source: "iana" + }, + "application/pkcs7-mime": { + source: "iana", + extensions: ["p7m", "p7c"] + }, + "application/pkcs7-signature": { + source: "iana", + extensions: ["p7s"] + }, + "application/pkcs8": { + source: "iana", + extensions: ["p8"] + }, + "application/pkcs8-encrypted": { + source: "iana" + }, + "application/pkix-attr-cert": { + source: "iana", + extensions: ["ac"] + }, + "application/pkix-cert": { + source: "iana", + extensions: ["cer"] + }, + "application/pkix-crl": { + source: "iana", + extensions: ["crl"] + }, + "application/pkix-pkipath": { + source: "iana", + extensions: ["pkipath"] + }, + "application/pkixcmp": { + source: "iana", + extensions: ["pki"] + }, + "application/pls+xml": { + source: "iana", + compressible: true, + extensions: ["pls"] + }, + "application/poc-settings+xml": { + source: "iana", + charset: "UTF-8", + compressible: true + }, + "application/postscript": { + source: "iana", + compressible: true, + extensions: ["ai", "eps", "ps"] + }, + "application/ppsp-tracker+json": { + source: "iana", + compressible: true + }, + "application/problem+json": { + source: "iana", + compressible: true + }, + "application/problem+xml": { + source: "iana", + compressible: true + }, + "application/provenance+xml": { + source: "iana", + compressible: true, + extensions: ["provx"] + }, + "application/prs.alvestrand.titrax-sheet": { + source: "iana" + }, + "application/prs.cww": { + source: "iana", + extensions: ["cww"] + }, + "application/prs.cyn": { + source: "iana", + charset: "7-BIT" + }, + "application/prs.hpub+zip": { + source: "iana", + compressible: false + }, + "application/prs.nprend": { + source: "iana" + }, + "application/prs.plucker": { + source: "iana" + }, + "application/prs.rdf-xml-crypt": { + source: "iana" + }, + "application/prs.xsf+xml": { + source: "iana", + compressible: true + }, + "application/pskc+xml": { + source: "iana", + compressible: true, + extensions: ["pskcxml"] + }, + "application/pvd+json": { + source: "iana", + compressible: true + }, + "application/qsig": { + source: "iana" + }, + "application/raml+yaml": { + compressible: true, + extensions: ["raml"] + }, + "application/raptorfec": { + source: "iana" + }, + "application/rdap+json": { + source: "iana", + compressible: true + }, + "application/rdf+xml": { + source: "iana", + compressible: true, + extensions: ["rdf", "owl"] + }, + "application/reginfo+xml": { + source: "iana", + compressible: true, + extensions: ["rif"] + }, + "application/relax-ng-compact-syntax": { + source: "iana", + extensions: ["rnc"] + }, + "application/remote-printing": { + source: "iana" + }, + "application/reputon+json": { + source: "iana", + compressible: true + }, + "application/resource-lists+xml": { + source: "iana", + compressible: true, + extensions: ["rl"] + }, + "application/resource-lists-diff+xml": { + source: "iana", + compressible: true, + extensions: ["rld"] + }, + "application/rfc+xml": { + source: "iana", + compressible: true + }, + "application/riscos": { + source: "iana" + }, + "application/rlmi+xml": { + source: "iana", + compressible: true + }, + "application/rls-services+xml": { + source: "iana", + compressible: true, + extensions: ["rs"] + }, + "application/route-apd+xml": { + source: "iana", + compressible: true, + extensions: ["rapd"] + }, + "application/route-s-tsid+xml": { + source: "iana", + compressible: true, + extensions: ["sls"] + }, + "application/route-usd+xml": { + source: "iana", + compressible: true, + extensions: ["rusd"] + }, + "application/rpki-ghostbusters": { + source: "iana", + extensions: ["gbr"] + }, + "application/rpki-manifest": { + source: "iana", + extensions: ["mft"] + }, + "application/rpki-publication": { + source: "iana" + }, + "application/rpki-roa": { + source: "iana", + extensions: ["roa"] + }, + "application/rpki-updown": { + source: "iana" + }, + "application/rsd+xml": { + source: "apache", + compressible: true, + extensions: ["rsd"] + }, + "application/rss+xml": { + source: "apache", + compressible: true, + extensions: ["rss"] + }, + "application/rtf": { + source: "iana", + compressible: true, + extensions: ["rtf"] + }, + "application/rtploopback": { + source: "iana" + }, + "application/rtx": { + source: "iana" + }, + "application/samlassertion+xml": { + source: "iana", + compressible: true + }, + "application/samlmetadata+xml": { + source: "iana", + compressible: true + }, + "application/sarif+json": { + source: "iana", + compressible: true + }, + "application/sarif-external-properties+json": { + source: "iana", + compressible: true + }, + "application/sbe": { + source: "iana" + }, + "application/sbml+xml": { + source: "iana", + compressible: true, + extensions: ["sbml"] + }, + "application/scaip+xml": { + source: "iana", + compressible: true + }, + "application/scim+json": { + source: "iana", + compressible: true + }, + "application/scvp-cv-request": { + source: "iana", + extensions: ["scq"] + }, + "application/scvp-cv-response": { + source: "iana", + extensions: ["scs"] + }, + "application/scvp-vp-request": { + source: "iana", + extensions: ["spq"] + }, + "application/scvp-vp-response": { + source: "iana", + extensions: ["spp"] + }, + "application/sdp": { + source: "iana", + extensions: ["sdp"] + }, + "application/secevent+jwt": { + source: "iana" + }, + "application/senml+cbor": { + source: "iana" + }, + "application/senml+json": { + source: "iana", + compressible: true + }, + "application/senml+xml": { + source: "iana", + compressible: true, + extensions: ["senmlx"] + }, + "application/senml-etch+cbor": { + source: "iana" + }, + "application/senml-etch+json": { + source: "iana", + compressible: true + }, + "application/senml-exi": { + source: "iana" + }, + "application/sensml+cbor": { + source: "iana" + }, + "application/sensml+json": { + source: "iana", + compressible: true + }, + "application/sensml+xml": { + source: "iana", + compressible: true, + extensions: ["sensmlx"] + }, + "application/sensml-exi": { + source: "iana" + }, + "application/sep+xml": { + source: "iana", + compressible: true + }, + "application/sep-exi": { + source: "iana" + }, + "application/session-info": { + source: "iana" + }, + "application/set-payment": { + source: "iana" + }, + "application/set-payment-initiation": { + source: "iana", + extensions: ["setpay"] + }, + "application/set-registration": { + source: "iana" + }, + "application/set-registration-initiation": { + source: "iana", + extensions: ["setreg"] + }, + "application/sgml": { + source: "iana" + }, + "application/sgml-open-catalog": { + source: "iana" + }, + "application/shf+xml": { + source: "iana", + compressible: true, + extensions: ["shf"] + }, + "application/sieve": { + source: "iana", + extensions: ["siv", "sieve"] + }, + "application/simple-filter+xml": { + source: "iana", + compressible: true + }, + "application/simple-message-summary": { + source: "iana" + }, + "application/simplesymbolcontainer": { + source: "iana" + }, + "application/sipc": { + source: "iana" + }, + "application/slate": { + source: "iana" + }, + "application/smil": { + source: "iana" + }, + "application/smil+xml": { + source: "iana", + compressible: true, + extensions: ["smi", "smil"] + }, + "application/smpte336m": { + source: "iana" + }, + "application/soap+fastinfoset": { + source: "iana" + }, + "application/soap+xml": { + source: "iana", + compressible: true + }, + "application/sparql-query": { + source: "iana", + extensions: ["rq"] + }, + "application/sparql-results+xml": { + source: "iana", + compressible: true, + extensions: ["srx"] + }, + "application/spdx+json": { + source: "iana", + compressible: true + }, + "application/spirits-event+xml": { + source: "iana", + compressible: true + }, + "application/sql": { + source: "iana" + }, + "application/srgs": { + source: "iana", + extensions: ["gram"] + }, + "application/srgs+xml": { + source: "iana", + compressible: true, + extensions: ["grxml"] + }, + "application/sru+xml": { + source: "iana", + compressible: true, + extensions: ["sru"] + }, + "application/ssdl+xml": { + source: "apache", + compressible: true, + extensions: ["ssdl"] + }, + "application/ssml+xml": { + source: "iana", + compressible: true, + extensions: ["ssml"] + }, + "application/stix+json": { + source: "iana", + compressible: true + }, + "application/swid+xml": { + source: "iana", + compressible: true, + extensions: ["swidtag"] + }, + "application/tamp-apex-update": { + source: "iana" + }, + "application/tamp-apex-update-confirm": { + source: "iana" + }, + "application/tamp-community-update": { + source: "iana" + }, + "application/tamp-community-update-confirm": { + source: "iana" + }, + "application/tamp-error": { + source: "iana" + }, + "application/tamp-sequence-adjust": { + source: "iana" + }, + "application/tamp-sequence-adjust-confirm": { + source: "iana" + }, + "application/tamp-status-query": { + source: "iana" + }, + "application/tamp-status-response": { + source: "iana" + }, + "application/tamp-update": { + source: "iana" + }, + "application/tamp-update-confirm": { + source: "iana" + }, + "application/tar": { + compressible: true + }, + "application/taxii+json": { + source: "iana", + compressible: true + }, + "application/td+json": { + source: "iana", + compressible: true + }, + "application/tei+xml": { + source: "iana", + compressible: true, + extensions: ["tei", "teicorpus"] + }, + "application/tetra_isi": { + source: "iana" + }, + "application/thraud+xml": { + source: "iana", + compressible: true, + extensions: ["tfi"] + }, + "application/timestamp-query": { + source: "iana" + }, + "application/timestamp-reply": { + source: "iana" + }, + "application/timestamped-data": { + source: "iana", + extensions: ["tsd"] + }, + "application/tlsrpt+gzip": { + source: "iana" + }, + "application/tlsrpt+json": { + source: "iana", + compressible: true + }, + "application/tnauthlist": { + source: "iana" + }, + "application/token-introspection+jwt": { + source: "iana" + }, + "application/toml": { + compressible: true, + extensions: ["toml"] + }, + "application/trickle-ice-sdpfrag": { + source: "iana" + }, + "application/trig": { + source: "iana", + extensions: ["trig"] + }, + "application/ttml+xml": { + source: "iana", + compressible: true, + extensions: ["ttml"] + }, + "application/tve-trigger": { + source: "iana" + }, + "application/tzif": { + source: "iana" + }, + "application/tzif-leap": { + source: "iana" + }, + "application/ubjson": { + compressible: false, + extensions: ["ubj"] + }, + "application/ulpfec": { + source: "iana" + }, + "application/urc-grpsheet+xml": { + source: "iana", + compressible: true + }, + "application/urc-ressheet+xml": { + source: "iana", + compressible: true, + extensions: ["rsheet"] + }, + "application/urc-targetdesc+xml": { + source: "iana", + compressible: true, + extensions: ["td"] + }, + "application/urc-uisocketdesc+xml": { + source: "iana", + compressible: true + }, + "application/vcard+json": { + source: "iana", + compressible: true + }, + "application/vcard+xml": { + source: "iana", + compressible: true + }, + "application/vemmi": { + source: "iana" + }, + "application/vividence.scriptfile": { + source: "apache" + }, + "application/vnd.1000minds.decision-model+xml": { + source: "iana", + compressible: true, + extensions: ["1km"] + }, + "application/vnd.3gpp-prose+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp-prose-pc3ch+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp-v2x-local-service-information": { + source: "iana" + }, + "application/vnd.3gpp.5gnas": { + source: "iana" + }, + "application/vnd.3gpp.access-transfer-events+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.bsf+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.gmop+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.gtpc": { + source: "iana" + }, + "application/vnd.3gpp.interworking-data": { + source: "iana" + }, + "application/vnd.3gpp.lpp": { + source: "iana" + }, + "application/vnd.3gpp.mc-signalling-ear": { + source: "iana" + }, + "application/vnd.3gpp.mcdata-affiliation-command+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.mcdata-info+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.mcdata-payload": { + source: "iana" + }, + "application/vnd.3gpp.mcdata-service-config+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.mcdata-signalling": { + source: "iana" + }, + "application/vnd.3gpp.mcdata-ue-config+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.mcdata-user-profile+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.mcptt-affiliation-command+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.mcptt-floor-request+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.mcptt-info+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.mcptt-location-info+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.mcptt-mbms-usage-info+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.mcptt-service-config+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.mcptt-signed+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.mcptt-ue-config+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.mcptt-ue-init-config+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.mcptt-user-profile+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.mcvideo-affiliation-command+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.mcvideo-affiliation-info+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.mcvideo-info+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.mcvideo-location-info+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.mcvideo-mbms-usage-info+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.mcvideo-service-config+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.mcvideo-transmission-request+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.mcvideo-ue-config+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.mcvideo-user-profile+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.mid-call+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.ngap": { + source: "iana" + }, + "application/vnd.3gpp.pfcp": { + source: "iana" + }, + "application/vnd.3gpp.pic-bw-large": { + source: "iana", + extensions: ["plb"] + }, + "application/vnd.3gpp.pic-bw-small": { + source: "iana", + extensions: ["psb"] + }, + "application/vnd.3gpp.pic-bw-var": { + source: "iana", + extensions: ["pvb"] + }, + "application/vnd.3gpp.s1ap": { + source: "iana" + }, + "application/vnd.3gpp.sms": { + source: "iana" + }, + "application/vnd.3gpp.sms+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.srvcc-ext+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.srvcc-info+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.state-and-event-info+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.ussd+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp2.bcmcsinfo+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp2.sms": { + source: "iana" + }, + "application/vnd.3gpp2.tcap": { + source: "iana", + extensions: ["tcap"] + }, + "application/vnd.3lightssoftware.imagescal": { + source: "iana" + }, + "application/vnd.3m.post-it-notes": { + source: "iana", + extensions: ["pwn"] + }, + "application/vnd.accpac.simply.aso": { + source: "iana", + extensions: ["aso"] + }, + "application/vnd.accpac.simply.imp": { + source: "iana", + extensions: ["imp"] + }, + "application/vnd.acucobol": { + source: "iana", + extensions: ["acu"] + }, + "application/vnd.acucorp": { + source: "iana", + extensions: ["atc", "acutc"] + }, + "application/vnd.adobe.air-application-installer-package+zip": { + source: "apache", + compressible: false, + extensions: ["air"] + }, + "application/vnd.adobe.flash.movie": { + source: "iana" + }, + "application/vnd.adobe.formscentral.fcdt": { + source: "iana", + extensions: ["fcdt"] + }, + "application/vnd.adobe.fxp": { + source: "iana", + extensions: ["fxp", "fxpl"] + }, + "application/vnd.adobe.partial-upload": { + source: "iana" + }, + "application/vnd.adobe.xdp+xml": { + source: "iana", + compressible: true, + extensions: ["xdp"] + }, + "application/vnd.adobe.xfdf": { + source: "iana", + extensions: ["xfdf"] + }, + "application/vnd.aether.imp": { + source: "iana" + }, + "application/vnd.afpc.afplinedata": { + source: "iana" + }, + "application/vnd.afpc.afplinedata-pagedef": { + source: "iana" + }, + "application/vnd.afpc.cmoca-cmresource": { + source: "iana" + }, + "application/vnd.afpc.foca-charset": { + source: "iana" + }, + "application/vnd.afpc.foca-codedfont": { + source: "iana" + }, + "application/vnd.afpc.foca-codepage": { + source: "iana" + }, + "application/vnd.afpc.modca": { + source: "iana" + }, + "application/vnd.afpc.modca-cmtable": { + source: "iana" + }, + "application/vnd.afpc.modca-formdef": { + source: "iana" + }, + "application/vnd.afpc.modca-mediummap": { + source: "iana" + }, + "application/vnd.afpc.modca-objectcontainer": { + source: "iana" + }, + "application/vnd.afpc.modca-overlay": { + source: "iana" + }, + "application/vnd.afpc.modca-pagesegment": { + source: "iana" + }, + "application/vnd.age": { + source: "iana", + extensions: ["age"] + }, + "application/vnd.ah-barcode": { + source: "iana" + }, + "application/vnd.ahead.space": { + source: "iana", + extensions: ["ahead"] + }, + "application/vnd.airzip.filesecure.azf": { + source: "iana", + extensions: ["azf"] + }, + "application/vnd.airzip.filesecure.azs": { + source: "iana", + extensions: ["azs"] + }, + "application/vnd.amadeus+json": { + source: "iana", + compressible: true + }, + "application/vnd.amazon.ebook": { + source: "apache", + extensions: ["azw"] + }, + "application/vnd.amazon.mobi8-ebook": { + source: "iana" + }, + "application/vnd.americandynamics.acc": { + source: "iana", + extensions: ["acc"] + }, + "application/vnd.amiga.ami": { + source: "iana", + extensions: ["ami"] + }, + "application/vnd.amundsen.maze+xml": { + source: "iana", + compressible: true + }, + "application/vnd.android.ota": { + source: "iana" + }, + "application/vnd.android.package-archive": { + source: "apache", + compressible: false, + extensions: ["apk"] + }, + "application/vnd.anki": { + source: "iana" + }, + "application/vnd.anser-web-certificate-issue-initiation": { + source: "iana", + extensions: ["cii"] + }, + "application/vnd.anser-web-funds-transfer-initiation": { + source: "apache", + extensions: ["fti"] + }, + "application/vnd.antix.game-component": { + source: "iana", + extensions: ["atx"] + }, + "application/vnd.apache.arrow.file": { + source: "iana" + }, + "application/vnd.apache.arrow.stream": { + source: "iana" + }, + "application/vnd.apache.thrift.binary": { + source: "iana" + }, + "application/vnd.apache.thrift.compact": { + source: "iana" + }, + "application/vnd.apache.thrift.json": { + source: "iana" + }, + "application/vnd.api+json": { + source: "iana", + compressible: true + }, + "application/vnd.aplextor.warrp+json": { + source: "iana", + compressible: true + }, + "application/vnd.apothekende.reservation+json": { + source: "iana", + compressible: true + }, + "application/vnd.apple.installer+xml": { + source: "iana", + compressible: true, + extensions: ["mpkg"] + }, + "application/vnd.apple.keynote": { + source: "iana", + extensions: ["key"] + }, + "application/vnd.apple.mpegurl": { + source: "iana", + extensions: ["m3u8"] + }, + "application/vnd.apple.numbers": { + source: "iana", + extensions: ["numbers"] + }, + "application/vnd.apple.pages": { + source: "iana", + extensions: ["pages"] + }, + "application/vnd.apple.pkpass": { + compressible: false, + extensions: ["pkpass"] + }, + "application/vnd.arastra.swi": { + source: "iana" + }, + "application/vnd.aristanetworks.swi": { + source: "iana", + extensions: ["swi"] + }, + "application/vnd.artisan+json": { + source: "iana", + compressible: true + }, + "application/vnd.artsquare": { + source: "iana" + }, + "application/vnd.astraea-software.iota": { + source: "iana", + extensions: ["iota"] + }, + "application/vnd.audiograph": { + source: "iana", + extensions: ["aep"] + }, + "application/vnd.autopackage": { + source: "iana" + }, + "application/vnd.avalon+json": { + source: "iana", + compressible: true + }, + "application/vnd.avistar+xml": { + source: "iana", + compressible: true + }, + "application/vnd.balsamiq.bmml+xml": { + source: "iana", + compressible: true, + extensions: ["bmml"] + }, + "application/vnd.balsamiq.bmpr": { + source: "iana" + }, + "application/vnd.banana-accounting": { + source: "iana" + }, + "application/vnd.bbf.usp.error": { + source: "iana" + }, + "application/vnd.bbf.usp.msg": { + source: "iana" + }, + "application/vnd.bbf.usp.msg+json": { + source: "iana", + compressible: true + }, + "application/vnd.bekitzur-stech+json": { + source: "iana", + compressible: true + }, + "application/vnd.bint.med-content": { + source: "iana" + }, + "application/vnd.biopax.rdf+xml": { + source: "iana", + compressible: true + }, + "application/vnd.blink-idb-value-wrapper": { + source: "iana" + }, + "application/vnd.blueice.multipass": { + source: "iana", + extensions: ["mpm"] + }, + "application/vnd.bluetooth.ep.oob": { + source: "iana" + }, + "application/vnd.bluetooth.le.oob": { + source: "iana" + }, + "application/vnd.bmi": { + source: "iana", + extensions: ["bmi"] + }, + "application/vnd.bpf": { + source: "iana" + }, + "application/vnd.bpf3": { + source: "iana" + }, + "application/vnd.businessobjects": { + source: "iana", + extensions: ["rep"] + }, + "application/vnd.byu.uapi+json": { + source: "iana", + compressible: true + }, + "application/vnd.cab-jscript": { + source: "iana" + }, + "application/vnd.canon-cpdl": { + source: "iana" + }, + "application/vnd.canon-lips": { + source: "iana" + }, + "application/vnd.capasystems-pg+json": { + source: "iana", + compressible: true + }, + "application/vnd.cendio.thinlinc.clientconf": { + source: "iana" + }, + "application/vnd.century-systems.tcp_stream": { + source: "iana" + }, + "application/vnd.chemdraw+xml": { + source: "iana", + compressible: true, + extensions: ["cdxml"] + }, + "application/vnd.chess-pgn": { + source: "iana" + }, + "application/vnd.chipnuts.karaoke-mmd": { + source: "iana", + extensions: ["mmd"] + }, + "application/vnd.ciedi": { + source: "iana" + }, + "application/vnd.cinderella": { + source: "iana", + extensions: ["cdy"] + }, + "application/vnd.cirpack.isdn-ext": { + source: "iana" + }, + "application/vnd.citationstyles.style+xml": { + source: "iana", + compressible: true, + extensions: ["csl"] + }, + "application/vnd.claymore": { + source: "iana", + extensions: ["cla"] + }, + "application/vnd.cloanto.rp9": { + source: "iana", + extensions: ["rp9"] + }, + "application/vnd.clonk.c4group": { + source: "iana", + extensions: ["c4g", "c4d", "c4f", "c4p", "c4u"] + }, + "application/vnd.cluetrust.cartomobile-config": { + source: "iana", + extensions: ["c11amc"] + }, + "application/vnd.cluetrust.cartomobile-config-pkg": { + source: "iana", + extensions: ["c11amz"] + }, + "application/vnd.coffeescript": { + source: "iana" + }, + "application/vnd.collabio.xodocuments.document": { + source: "iana" + }, + "application/vnd.collabio.xodocuments.document-template": { + source: "iana" + }, + "application/vnd.collabio.xodocuments.presentation": { + source: "iana" + }, + "application/vnd.collabio.xodocuments.presentation-template": { + source: "iana" + }, + "application/vnd.collabio.xodocuments.spreadsheet": { + source: "iana" + }, + "application/vnd.collabio.xodocuments.spreadsheet-template": { + source: "iana" + }, + "application/vnd.collection+json": { + source: "iana", + compressible: true + }, + "application/vnd.collection.doc+json": { + source: "iana", + compressible: true + }, + "application/vnd.collection.next+json": { + source: "iana", + compressible: true + }, + "application/vnd.comicbook+zip": { + source: "iana", + compressible: false + }, + "application/vnd.comicbook-rar": { + source: "iana" + }, + "application/vnd.commerce-battelle": { + source: "iana" + }, + "application/vnd.commonspace": { + source: "iana", + extensions: ["csp"] + }, + "application/vnd.contact.cmsg": { + source: "iana", + extensions: ["cdbcmsg"] + }, + "application/vnd.coreos.ignition+json": { + source: "iana", + compressible: true + }, + "application/vnd.cosmocaller": { + source: "iana", + extensions: ["cmc"] + }, + "application/vnd.crick.clicker": { + source: "iana", + extensions: ["clkx"] + }, + "application/vnd.crick.clicker.keyboard": { + source: "iana", + extensions: ["clkk"] + }, + "application/vnd.crick.clicker.palette": { + source: "iana", + extensions: ["clkp"] + }, + "application/vnd.crick.clicker.template": { + source: "iana", + extensions: ["clkt"] + }, + "application/vnd.crick.clicker.wordbank": { + source: "iana", + extensions: ["clkw"] + }, + "application/vnd.criticaltools.wbs+xml": { + source: "iana", + compressible: true, + extensions: ["wbs"] + }, + "application/vnd.cryptii.pipe+json": { + source: "iana", + compressible: true + }, + "application/vnd.crypto-shade-file": { + source: "iana" + }, + "application/vnd.cryptomator.encrypted": { + source: "iana" + }, + "application/vnd.cryptomator.vault": { + source: "iana" + }, + "application/vnd.ctc-posml": { + source: "iana", + extensions: ["pml"] + }, + "application/vnd.ctct.ws+xml": { + source: "iana", + compressible: true + }, + "application/vnd.cups-pdf": { + source: "iana" + }, + "application/vnd.cups-postscript": { + source: "iana" + }, + "application/vnd.cups-ppd": { + source: "iana", + extensions: ["ppd"] + }, + "application/vnd.cups-raster": { + source: "iana" + }, + "application/vnd.cups-raw": { + source: "iana" + }, + "application/vnd.curl": { + source: "iana" + }, + "application/vnd.curl.car": { + source: "apache", + extensions: ["car"] + }, + "application/vnd.curl.pcurl": { + source: "apache", + extensions: ["pcurl"] + }, + "application/vnd.cyan.dean.root+xml": { + source: "iana", + compressible: true + }, + "application/vnd.cybank": { + source: "iana" + }, + "application/vnd.cyclonedx+json": { + source: "iana", + compressible: true + }, + "application/vnd.cyclonedx+xml": { + source: "iana", + compressible: true + }, + "application/vnd.d2l.coursepackage1p0+zip": { + source: "iana", + compressible: false + }, + "application/vnd.d3m-dataset": { + source: "iana" + }, + "application/vnd.d3m-problem": { + source: "iana" + }, + "application/vnd.dart": { + source: "iana", + compressible: true, + extensions: ["dart"] + }, + "application/vnd.data-vision.rdz": { + source: "iana", + extensions: ["rdz"] + }, + "application/vnd.datapackage+json": { + source: "iana", + compressible: true + }, + "application/vnd.dataresource+json": { + source: "iana", + compressible: true + }, + "application/vnd.dbf": { + source: "iana", + extensions: ["dbf"] + }, + "application/vnd.debian.binary-package": { + source: "iana" + }, + "application/vnd.dece.data": { + source: "iana", + extensions: ["uvf", "uvvf", "uvd", "uvvd"] + }, + "application/vnd.dece.ttml+xml": { + source: "iana", + compressible: true, + extensions: ["uvt", "uvvt"] + }, + "application/vnd.dece.unspecified": { + source: "iana", + extensions: ["uvx", "uvvx"] + }, + "application/vnd.dece.zip": { + source: "iana", + extensions: ["uvz", "uvvz"] + }, + "application/vnd.denovo.fcselayout-link": { + source: "iana", + extensions: ["fe_launch"] + }, + "application/vnd.desmume.movie": { + source: "iana" + }, + "application/vnd.dir-bi.plate-dl-nosuffix": { + source: "iana" + }, + "application/vnd.dm.delegation+xml": { + source: "iana", + compressible: true + }, + "application/vnd.dna": { + source: "iana", + extensions: ["dna"] + }, + "application/vnd.document+json": { + source: "iana", + compressible: true + }, + "application/vnd.dolby.mlp": { + source: "apache", + extensions: ["mlp"] + }, + "application/vnd.dolby.mobile.1": { + source: "iana" + }, + "application/vnd.dolby.mobile.2": { + source: "iana" + }, + "application/vnd.doremir.scorecloud-binary-document": { + source: "iana" + }, + "application/vnd.dpgraph": { + source: "iana", + extensions: ["dpg"] + }, + "application/vnd.dreamfactory": { + source: "iana", + extensions: ["dfac"] + }, + "application/vnd.drive+json": { + source: "iana", + compressible: true + }, + "application/vnd.ds-keypoint": { + source: "apache", + extensions: ["kpxx"] + }, + "application/vnd.dtg.local": { + source: "iana" + }, + "application/vnd.dtg.local.flash": { + source: "iana" + }, + "application/vnd.dtg.local.html": { + source: "iana" + }, + "application/vnd.dvb.ait": { + source: "iana", + extensions: ["ait"] + }, + "application/vnd.dvb.dvbisl+xml": { + source: "iana", + compressible: true + }, + "application/vnd.dvb.dvbj": { + source: "iana" + }, + "application/vnd.dvb.esgcontainer": { + source: "iana" + }, + "application/vnd.dvb.ipdcdftnotifaccess": { + source: "iana" + }, + "application/vnd.dvb.ipdcesgaccess": { + source: "iana" + }, + "application/vnd.dvb.ipdcesgaccess2": { + source: "iana" + }, + "application/vnd.dvb.ipdcesgpdd": { + source: "iana" + }, + "application/vnd.dvb.ipdcroaming": { + source: "iana" + }, + "application/vnd.dvb.iptv.alfec-base": { + source: "iana" + }, + "application/vnd.dvb.iptv.alfec-enhancement": { + source: "iana" + }, + "application/vnd.dvb.notif-aggregate-root+xml": { + source: "iana", + compressible: true + }, + "application/vnd.dvb.notif-container+xml": { + source: "iana", + compressible: true + }, + "application/vnd.dvb.notif-generic+xml": { + source: "iana", + compressible: true + }, + "application/vnd.dvb.notif-ia-msglist+xml": { + source: "iana", + compressible: true + }, + "application/vnd.dvb.notif-ia-registration-request+xml": { + source: "iana", + compressible: true + }, + "application/vnd.dvb.notif-ia-registration-response+xml": { + source: "iana", + compressible: true + }, + "application/vnd.dvb.notif-init+xml": { + source: "iana", + compressible: true + }, + "application/vnd.dvb.pfr": { + source: "iana" + }, + "application/vnd.dvb.service": { + source: "iana", + extensions: ["svc"] + }, + "application/vnd.dxr": { + source: "iana" + }, + "application/vnd.dynageo": { + source: "iana", + extensions: ["geo"] + }, + "application/vnd.dzr": { + source: "iana" + }, + "application/vnd.easykaraoke.cdgdownload": { + source: "iana" + }, + "application/vnd.ecdis-update": { + source: "iana" + }, + "application/vnd.ecip.rlp": { + source: "iana" + }, + "application/vnd.eclipse.ditto+json": { + source: "iana", + compressible: true + }, + "application/vnd.ecowin.chart": { + source: "iana", + extensions: ["mag"] + }, + "application/vnd.ecowin.filerequest": { + source: "iana" + }, + "application/vnd.ecowin.fileupdate": { + source: "iana" + }, + "application/vnd.ecowin.series": { + source: "iana" + }, + "application/vnd.ecowin.seriesrequest": { + source: "iana" + }, + "application/vnd.ecowin.seriesupdate": { + source: "iana" + }, + "application/vnd.efi.img": { + source: "iana" + }, + "application/vnd.efi.iso": { + source: "iana" + }, + "application/vnd.emclient.accessrequest+xml": { + source: "iana", + compressible: true + }, + "application/vnd.enliven": { + source: "iana", + extensions: ["nml"] + }, + "application/vnd.enphase.envoy": { + source: "iana" + }, + "application/vnd.eprints.data+xml": { + source: "iana", + compressible: true + }, + "application/vnd.epson.esf": { + source: "iana", + extensions: ["esf"] + }, + "application/vnd.epson.msf": { + source: "iana", + extensions: ["msf"] + }, + "application/vnd.epson.quickanime": { + source: "iana", + extensions: ["qam"] + }, + "application/vnd.epson.salt": { + source: "iana", + extensions: ["slt"] + }, + "application/vnd.epson.ssf": { + source: "iana", + extensions: ["ssf"] + }, + "application/vnd.ericsson.quickcall": { + source: "iana" + }, + "application/vnd.espass-espass+zip": { + source: "iana", + compressible: false + }, + "application/vnd.eszigno3+xml": { + source: "iana", + compressible: true, + extensions: ["es3", "et3"] + }, + "application/vnd.etsi.aoc+xml": { + source: "iana", + compressible: true + }, + "application/vnd.etsi.asic-e+zip": { + source: "iana", + compressible: false + }, + "application/vnd.etsi.asic-s+zip": { + source: "iana", + compressible: false + }, + "application/vnd.etsi.cug+xml": { + source: "iana", + compressible: true + }, + "application/vnd.etsi.iptvcommand+xml": { + source: "iana", + compressible: true + }, + "application/vnd.etsi.iptvdiscovery+xml": { + source: "iana", + compressible: true + }, + "application/vnd.etsi.iptvprofile+xml": { + source: "iana", + compressible: true + }, + "application/vnd.etsi.iptvsad-bc+xml": { + source: "iana", + compressible: true + }, + "application/vnd.etsi.iptvsad-cod+xml": { + source: "iana", + compressible: true + }, + "application/vnd.etsi.iptvsad-npvr+xml": { + source: "iana", + compressible: true + }, + "application/vnd.etsi.iptvservice+xml": { + source: "iana", + compressible: true + }, + "application/vnd.etsi.iptvsync+xml": { + source: "iana", + compressible: true + }, + "application/vnd.etsi.iptvueprofile+xml": { + source: "iana", + compressible: true + }, + "application/vnd.etsi.mcid+xml": { + source: "iana", + compressible: true + }, + "application/vnd.etsi.mheg5": { + source: "iana" + }, + "application/vnd.etsi.overload-control-policy-dataset+xml": { + source: "iana", + compressible: true + }, + "application/vnd.etsi.pstn+xml": { + source: "iana", + compressible: true + }, + "application/vnd.etsi.sci+xml": { + source: "iana", + compressible: true + }, + "application/vnd.etsi.simservs+xml": { + source: "iana", + compressible: true + }, + "application/vnd.etsi.timestamp-token": { + source: "iana" + }, + "application/vnd.etsi.tsl+xml": { + source: "iana", + compressible: true + }, + "application/vnd.etsi.tsl.der": { + source: "iana" + }, + "application/vnd.eu.kasparian.car+json": { + source: "iana", + compressible: true + }, + "application/vnd.eudora.data": { + source: "iana" + }, + "application/vnd.evolv.ecig.profile": { + source: "iana" + }, + "application/vnd.evolv.ecig.settings": { + source: "iana" + }, + "application/vnd.evolv.ecig.theme": { + source: "iana" + }, + "application/vnd.exstream-empower+zip": { + source: "iana", + compressible: false + }, + "application/vnd.exstream-package": { + source: "iana" + }, + "application/vnd.ezpix-album": { + source: "iana", + extensions: ["ez2"] + }, + "application/vnd.ezpix-package": { + source: "iana", + extensions: ["ez3"] + }, + "application/vnd.f-secure.mobile": { + source: "iana" + }, + "application/vnd.familysearch.gedcom+zip": { + source: "iana", + compressible: false + }, + "application/vnd.fastcopy-disk-image": { + source: "iana" + }, + "application/vnd.fdf": { + source: "iana", + extensions: ["fdf"] + }, + "application/vnd.fdsn.mseed": { + source: "iana", + extensions: ["mseed"] + }, + "application/vnd.fdsn.seed": { + source: "iana", + extensions: ["seed", "dataless"] + }, + "application/vnd.ffsns": { + source: "iana" + }, + "application/vnd.ficlab.flb+zip": { + source: "iana", + compressible: false + }, + "application/vnd.filmit.zfc": { + source: "iana" + }, + "application/vnd.fints": { + source: "iana" + }, + "application/vnd.firemonkeys.cloudcell": { + source: "iana" + }, + "application/vnd.flographit": { + source: "iana", + extensions: ["gph"] + }, + "application/vnd.fluxtime.clip": { + source: "iana", + extensions: ["ftc"] + }, + "application/vnd.font-fontforge-sfd": { + source: "iana" + }, + "application/vnd.framemaker": { + source: "iana", + extensions: ["fm", "frame", "maker", "book"] + }, + "application/vnd.frogans.fnc": { + source: "iana", + extensions: ["fnc"] + }, + "application/vnd.frogans.ltf": { + source: "iana", + extensions: ["ltf"] + }, + "application/vnd.fsc.weblaunch": { + source: "iana", + extensions: ["fsc"] + }, + "application/vnd.fujifilm.fb.docuworks": { + source: "iana" + }, + "application/vnd.fujifilm.fb.docuworks.binder": { + source: "iana" + }, + "application/vnd.fujifilm.fb.docuworks.container": { + source: "iana" + }, + "application/vnd.fujifilm.fb.jfi+xml": { + source: "iana", + compressible: true + }, + "application/vnd.fujitsu.oasys": { + source: "iana", + extensions: ["oas"] + }, + "application/vnd.fujitsu.oasys2": { + source: "iana", + extensions: ["oa2"] + }, + "application/vnd.fujitsu.oasys3": { + source: "iana", + extensions: ["oa3"] + }, + "application/vnd.fujitsu.oasysgp": { + source: "iana", + extensions: ["fg5"] + }, + "application/vnd.fujitsu.oasysprs": { + source: "iana", + extensions: ["bh2"] + }, + "application/vnd.fujixerox.art-ex": { + source: "iana" + }, + "application/vnd.fujixerox.art4": { + source: "iana" + }, + "application/vnd.fujixerox.ddd": { + source: "iana", + extensions: ["ddd"] + }, + "application/vnd.fujixerox.docuworks": { + source: "iana", + extensions: ["xdw"] + }, + "application/vnd.fujixerox.docuworks.binder": { + source: "iana", + extensions: ["xbd"] + }, + "application/vnd.fujixerox.docuworks.container": { + source: "iana" + }, + "application/vnd.fujixerox.hbpl": { + source: "iana" + }, + "application/vnd.fut-misnet": { + source: "iana" + }, + "application/vnd.futoin+cbor": { + source: "iana" + }, + "application/vnd.futoin+json": { + source: "iana", + compressible: true + }, + "application/vnd.fuzzysheet": { + source: "iana", + extensions: ["fzs"] + }, + "application/vnd.genomatix.tuxedo": { + source: "iana", + extensions: ["txd"] + }, + "application/vnd.gentics.grd+json": { + source: "iana", + compressible: true + }, + "application/vnd.geo+json": { + source: "iana", + compressible: true + }, + "application/vnd.geocube+xml": { + source: "iana", + compressible: true + }, + "application/vnd.geogebra.file": { + source: "iana", + extensions: ["ggb"] + }, + "application/vnd.geogebra.slides": { + source: "iana" + }, + "application/vnd.geogebra.tool": { + source: "iana", + extensions: ["ggt"] + }, + "application/vnd.geometry-explorer": { + source: "iana", + extensions: ["gex", "gre"] + }, + "application/vnd.geonext": { + source: "iana", + extensions: ["gxt"] + }, + "application/vnd.geoplan": { + source: "iana", + extensions: ["g2w"] + }, + "application/vnd.geospace": { + source: "iana", + extensions: ["g3w"] + }, + "application/vnd.gerber": { + source: "iana" + }, + "application/vnd.globalplatform.card-content-mgt": { + source: "iana" + }, + "application/vnd.globalplatform.card-content-mgt-response": { + source: "iana" + }, + "application/vnd.gmx": { + source: "iana", + extensions: ["gmx"] + }, + "application/vnd.google-apps.document": { + compressible: false, + extensions: ["gdoc"] + }, + "application/vnd.google-apps.presentation": { + compressible: false, + extensions: ["gslides"] + }, + "application/vnd.google-apps.spreadsheet": { + compressible: false, + extensions: ["gsheet"] + }, + "application/vnd.google-earth.kml+xml": { + source: "iana", + compressible: true, + extensions: ["kml"] + }, + "application/vnd.google-earth.kmz": { + source: "iana", + compressible: false, + extensions: ["kmz"] + }, + "application/vnd.gov.sk.e-form+xml": { + source: "iana", + compressible: true + }, + "application/vnd.gov.sk.e-form+zip": { + source: "iana", + compressible: false + }, + "application/vnd.gov.sk.xmldatacontainer+xml": { + source: "iana", + compressible: true + }, + "application/vnd.grafeq": { + source: "iana", + extensions: ["gqf", "gqs"] + }, + "application/vnd.gridmp": { + source: "iana" + }, + "application/vnd.groove-account": { + source: "iana", + extensions: ["gac"] + }, + "application/vnd.groove-help": { + source: "iana", + extensions: ["ghf"] + }, + "application/vnd.groove-identity-message": { + source: "iana", + extensions: ["gim"] + }, + "application/vnd.groove-injector": { + source: "iana", + extensions: ["grv"] + }, + "application/vnd.groove-tool-message": { + source: "iana", + extensions: ["gtm"] + }, + "application/vnd.groove-tool-template": { + source: "iana", + extensions: ["tpl"] + }, + "application/vnd.groove-vcard": { + source: "iana", + extensions: ["vcg"] + }, + "application/vnd.hal+json": { + source: "iana", + compressible: true + }, + "application/vnd.hal+xml": { + source: "iana", + compressible: true, + extensions: ["hal"] + }, + "application/vnd.handheld-entertainment+xml": { + source: "iana", + compressible: true, + extensions: ["zmm"] + }, + "application/vnd.hbci": { + source: "iana", + extensions: ["hbci"] + }, + "application/vnd.hc+json": { + source: "iana", + compressible: true + }, + "application/vnd.hcl-bireports": { + source: "iana" + }, + "application/vnd.hdt": { + source: "iana" + }, + "application/vnd.heroku+json": { + source: "iana", + compressible: true + }, + "application/vnd.hhe.lesson-player": { + source: "iana", + extensions: ["les"] + }, + "application/vnd.hl7cda+xml": { + source: "iana", + charset: "UTF-8", + compressible: true + }, + "application/vnd.hl7v2+xml": { + source: "iana", + charset: "UTF-8", + compressible: true + }, + "application/vnd.hp-hpgl": { + source: "iana", + extensions: ["hpgl"] + }, + "application/vnd.hp-hpid": { + source: "iana", + extensions: ["hpid"] + }, + "application/vnd.hp-hps": { + source: "iana", + extensions: ["hps"] + }, + "application/vnd.hp-jlyt": { + source: "iana", + extensions: ["jlt"] + }, + "application/vnd.hp-pcl": { + source: "iana", + extensions: ["pcl"] + }, + "application/vnd.hp-pclxl": { + source: "iana", + extensions: ["pclxl"] + }, + "application/vnd.httphone": { + source: "iana" + }, + "application/vnd.hydrostatix.sof-data": { + source: "iana", + extensions: ["sfd-hdstx"] + }, + "application/vnd.hyper+json": { + source: "iana", + compressible: true + }, + "application/vnd.hyper-item+json": { + source: "iana", + compressible: true + }, + "application/vnd.hyperdrive+json": { + source: "iana", + compressible: true + }, + "application/vnd.hzn-3d-crossword": { + source: "iana" + }, + "application/vnd.ibm.afplinedata": { + source: "iana" + }, + "application/vnd.ibm.electronic-media": { + source: "iana" + }, + "application/vnd.ibm.minipay": { + source: "iana", + extensions: ["mpy"] + }, + "application/vnd.ibm.modcap": { + source: "iana", + extensions: ["afp", "listafp", "list3820"] + }, + "application/vnd.ibm.rights-management": { + source: "iana", + extensions: ["irm"] + }, + "application/vnd.ibm.secure-container": { + source: "iana", + extensions: ["sc"] + }, + "application/vnd.iccprofile": { + source: "iana", + extensions: ["icc", "icm"] + }, + "application/vnd.ieee.1905": { + source: "iana" + }, + "application/vnd.igloader": { + source: "iana", + extensions: ["igl"] + }, + "application/vnd.imagemeter.folder+zip": { + source: "iana", + compressible: false + }, + "application/vnd.imagemeter.image+zip": { + source: "iana", + compressible: false + }, + "application/vnd.immervision-ivp": { + source: "iana", + extensions: ["ivp"] + }, + "application/vnd.immervision-ivu": { + source: "iana", + extensions: ["ivu"] + }, + "application/vnd.ims.imsccv1p1": { + source: "iana" + }, + "application/vnd.ims.imsccv1p2": { + source: "iana" + }, + "application/vnd.ims.imsccv1p3": { + source: "iana" + }, + "application/vnd.ims.lis.v2.result+json": { + source: "iana", + compressible: true + }, + "application/vnd.ims.lti.v2.toolconsumerprofile+json": { + source: "iana", + compressible: true + }, + "application/vnd.ims.lti.v2.toolproxy+json": { + source: "iana", + compressible: true + }, + "application/vnd.ims.lti.v2.toolproxy.id+json": { + source: "iana", + compressible: true + }, + "application/vnd.ims.lti.v2.toolsettings+json": { + source: "iana", + compressible: true + }, + "application/vnd.ims.lti.v2.toolsettings.simple+json": { + source: "iana", + compressible: true + }, + "application/vnd.informedcontrol.rms+xml": { + source: "iana", + compressible: true + }, + "application/vnd.informix-visionary": { + source: "iana" + }, + "application/vnd.infotech.project": { + source: "iana" + }, + "application/vnd.infotech.project+xml": { + source: "iana", + compressible: true + }, + "application/vnd.innopath.wamp.notification": { + source: "iana" + }, + "application/vnd.insors.igm": { + source: "iana", + extensions: ["igm"] + }, + "application/vnd.intercon.formnet": { + source: "iana", + extensions: ["xpw", "xpx"] + }, + "application/vnd.intergeo": { + source: "iana", + extensions: ["i2g"] + }, + "application/vnd.intertrust.digibox": { + source: "iana" + }, + "application/vnd.intertrust.nncp": { + source: "iana" + }, + "application/vnd.intu.qbo": { + source: "iana", + extensions: ["qbo"] + }, + "application/vnd.intu.qfx": { + source: "iana", + extensions: ["qfx"] + }, + "application/vnd.iptc.g2.catalogitem+xml": { + source: "iana", + compressible: true + }, + "application/vnd.iptc.g2.conceptitem+xml": { + source: "iana", + compressible: true + }, + "application/vnd.iptc.g2.knowledgeitem+xml": { + source: "iana", + compressible: true + }, + "application/vnd.iptc.g2.newsitem+xml": { + source: "iana", + compressible: true + }, + "application/vnd.iptc.g2.newsmessage+xml": { + source: "iana", + compressible: true + }, + "application/vnd.iptc.g2.packageitem+xml": { + source: "iana", + compressible: true + }, + "application/vnd.iptc.g2.planningitem+xml": { + source: "iana", + compressible: true + }, + "application/vnd.ipunplugged.rcprofile": { + source: "iana", + extensions: ["rcprofile"] + }, + "application/vnd.irepository.package+xml": { + source: "iana", + compressible: true, + extensions: ["irp"] + }, + "application/vnd.is-xpr": { + source: "iana", + extensions: ["xpr"] + }, + "application/vnd.isac.fcs": { + source: "iana", + extensions: ["fcs"] + }, + "application/vnd.iso11783-10+zip": { + source: "iana", + compressible: false + }, + "application/vnd.jam": { + source: "iana", + extensions: ["jam"] + }, + "application/vnd.japannet-directory-service": { + source: "iana" + }, + "application/vnd.japannet-jpnstore-wakeup": { + source: "iana" + }, + "application/vnd.japannet-payment-wakeup": { + source: "iana" + }, + "application/vnd.japannet-registration": { + source: "iana" + }, + "application/vnd.japannet-registration-wakeup": { + source: "iana" + }, + "application/vnd.japannet-setstore-wakeup": { + source: "iana" + }, + "application/vnd.japannet-verification": { + source: "iana" + }, + "application/vnd.japannet-verification-wakeup": { + source: "iana" + }, + "application/vnd.jcp.javame.midlet-rms": { + source: "iana", + extensions: ["rms"] + }, + "application/vnd.jisp": { + source: "iana", + extensions: ["jisp"] + }, + "application/vnd.joost.joda-archive": { + source: "iana", + extensions: ["joda"] + }, + "application/vnd.jsk.isdn-ngn": { + source: "iana" + }, + "application/vnd.kahootz": { + source: "iana", + extensions: ["ktz", "ktr"] + }, + "application/vnd.kde.karbon": { + source: "iana", + extensions: ["karbon"] + }, + "application/vnd.kde.kchart": { + source: "iana", + extensions: ["chrt"] + }, + "application/vnd.kde.kformula": { + source: "iana", + extensions: ["kfo"] + }, + "application/vnd.kde.kivio": { + source: "iana", + extensions: ["flw"] + }, + "application/vnd.kde.kontour": { + source: "iana", + extensions: ["kon"] + }, + "application/vnd.kde.kpresenter": { + source: "iana", + extensions: ["kpr", "kpt"] + }, + "application/vnd.kde.kspread": { + source: "iana", + extensions: ["ksp"] + }, + "application/vnd.kde.kword": { + source: "iana", + extensions: ["kwd", "kwt"] + }, + "application/vnd.kenameaapp": { + source: "iana", + extensions: ["htke"] + }, + "application/vnd.kidspiration": { + source: "iana", + extensions: ["kia"] + }, + "application/vnd.kinar": { + source: "iana", + extensions: ["kne", "knp"] + }, + "application/vnd.koan": { + source: "iana", + extensions: ["skp", "skd", "skt", "skm"] + }, + "application/vnd.kodak-descriptor": { + source: "iana", + extensions: ["sse"] + }, + "application/vnd.las": { + source: "iana" + }, + "application/vnd.las.las+json": { + source: "iana", + compressible: true + }, + "application/vnd.las.las+xml": { + source: "iana", + compressible: true, + extensions: ["lasxml"] + }, + "application/vnd.laszip": { + source: "iana" + }, + "application/vnd.leap+json": { + source: "iana", + compressible: true + }, + "application/vnd.liberty-request+xml": { + source: "iana", + compressible: true + }, + "application/vnd.llamagraphics.life-balance.desktop": { + source: "iana", + extensions: ["lbd"] + }, + "application/vnd.llamagraphics.life-balance.exchange+xml": { + source: "iana", + compressible: true, + extensions: ["lbe"] + }, + "application/vnd.logipipe.circuit+zip": { + source: "iana", + compressible: false + }, + "application/vnd.loom": { + source: "iana" + }, + "application/vnd.lotus-1-2-3": { + source: "iana", + extensions: ["123"] + }, + "application/vnd.lotus-approach": { + source: "iana", + extensions: ["apr"] + }, + "application/vnd.lotus-freelance": { + source: "iana", + extensions: ["pre"] + }, + "application/vnd.lotus-notes": { + source: "iana", + extensions: ["nsf"] + }, + "application/vnd.lotus-organizer": { + source: "iana", + extensions: ["org"] + }, + "application/vnd.lotus-screencam": { + source: "iana", + extensions: ["scm"] + }, + "application/vnd.lotus-wordpro": { + source: "iana", + extensions: ["lwp"] + }, + "application/vnd.macports.portpkg": { + source: "iana", + extensions: ["portpkg"] + }, + "application/vnd.mapbox-vector-tile": { + source: "iana", + extensions: ["mvt"] + }, + "application/vnd.marlin.drm.actiontoken+xml": { + source: "iana", + compressible: true + }, + "application/vnd.marlin.drm.conftoken+xml": { + source: "iana", + compressible: true + }, + "application/vnd.marlin.drm.license+xml": { + source: "iana", + compressible: true + }, + "application/vnd.marlin.drm.mdcf": { + source: "iana" + }, + "application/vnd.mason+json": { + source: "iana", + compressible: true + }, + "application/vnd.maxar.archive.3tz+zip": { + source: "iana", + compressible: false + }, + "application/vnd.maxmind.maxmind-db": { + source: "iana" + }, + "application/vnd.mcd": { + source: "iana", + extensions: ["mcd"] + }, + "application/vnd.medcalcdata": { + source: "iana", + extensions: ["mc1"] + }, + "application/vnd.mediastation.cdkey": { + source: "iana", + extensions: ["cdkey"] + }, + "application/vnd.meridian-slingshot": { + source: "iana" + }, + "application/vnd.mfer": { + source: "iana", + extensions: ["mwf"] + }, + "application/vnd.mfmp": { + source: "iana", + extensions: ["mfm"] + }, + "application/vnd.micro+json": { + source: "iana", + compressible: true + }, + "application/vnd.micrografx.flo": { + source: "iana", + extensions: ["flo"] + }, + "application/vnd.micrografx.igx": { + source: "iana", + extensions: ["igx"] + }, + "application/vnd.microsoft.portable-executable": { + source: "iana" + }, + "application/vnd.microsoft.windows.thumbnail-cache": { + source: "iana" + }, + "application/vnd.miele+json": { + source: "iana", + compressible: true + }, + "application/vnd.mif": { + source: "iana", + extensions: ["mif"] + }, + "application/vnd.minisoft-hp3000-save": { + source: "iana" + }, + "application/vnd.mitsubishi.misty-guard.trustweb": { + source: "iana" + }, + "application/vnd.mobius.daf": { + source: "iana", + extensions: ["daf"] + }, + "application/vnd.mobius.dis": { + source: "iana", + extensions: ["dis"] + }, + "application/vnd.mobius.mbk": { + source: "iana", + extensions: ["mbk"] + }, + "application/vnd.mobius.mqy": { + source: "iana", + extensions: ["mqy"] + }, + "application/vnd.mobius.msl": { + source: "iana", + extensions: ["msl"] + }, + "application/vnd.mobius.plc": { + source: "iana", + extensions: ["plc"] + }, + "application/vnd.mobius.txf": { + source: "iana", + extensions: ["txf"] + }, + "application/vnd.mophun.application": { + source: "iana", + extensions: ["mpn"] + }, + "application/vnd.mophun.certificate": { + source: "iana", + extensions: ["mpc"] + }, + "application/vnd.motorola.flexsuite": { + source: "iana" + }, + "application/vnd.motorola.flexsuite.adsi": { + source: "iana" + }, + "application/vnd.motorola.flexsuite.fis": { + source: "iana" + }, + "application/vnd.motorola.flexsuite.gotap": { + source: "iana" + }, + "application/vnd.motorola.flexsuite.kmr": { + source: "iana" + }, + "application/vnd.motorola.flexsuite.ttc": { + source: "iana" + }, + "application/vnd.motorola.flexsuite.wem": { + source: "iana" + }, + "application/vnd.motorola.iprm": { + source: "iana" + }, + "application/vnd.mozilla.xul+xml": { + source: "iana", + compressible: true, + extensions: ["xul"] + }, + "application/vnd.ms-3mfdocument": { + source: "iana" + }, + "application/vnd.ms-artgalry": { + source: "iana", + extensions: ["cil"] + }, + "application/vnd.ms-asf": { + source: "iana" + }, + "application/vnd.ms-cab-compressed": { + source: "iana", + extensions: ["cab"] + }, + "application/vnd.ms-color.iccprofile": { + source: "apache" + }, + "application/vnd.ms-excel": { + source: "iana", + compressible: false, + extensions: ["xls", "xlm", "xla", "xlc", "xlt", "xlw"] + }, + "application/vnd.ms-excel.addin.macroenabled.12": { + source: "iana", + extensions: ["xlam"] + }, + "application/vnd.ms-excel.sheet.binary.macroenabled.12": { + source: "iana", + extensions: ["xlsb"] + }, + "application/vnd.ms-excel.sheet.macroenabled.12": { + source: "iana", + extensions: ["xlsm"] + }, + "application/vnd.ms-excel.template.macroenabled.12": { + source: "iana", + extensions: ["xltm"] + }, + "application/vnd.ms-fontobject": { + source: "iana", + compressible: true, + extensions: ["eot"] + }, + "application/vnd.ms-htmlhelp": { + source: "iana", + extensions: ["chm"] + }, + "application/vnd.ms-ims": { + source: "iana", + extensions: ["ims"] + }, + "application/vnd.ms-lrm": { + source: "iana", + extensions: ["lrm"] + }, + "application/vnd.ms-office.activex+xml": { + source: "iana", + compressible: true + }, + "application/vnd.ms-officetheme": { + source: "iana", + extensions: ["thmx"] + }, + "application/vnd.ms-opentype": { + source: "apache", + compressible: true + }, + "application/vnd.ms-outlook": { + compressible: false, + extensions: ["msg"] + }, + "application/vnd.ms-package.obfuscated-opentype": { + source: "apache" + }, + "application/vnd.ms-pki.seccat": { + source: "apache", + extensions: ["cat"] + }, + "application/vnd.ms-pki.stl": { + source: "apache", + extensions: ["stl"] + }, + "application/vnd.ms-playready.initiator+xml": { + source: "iana", + compressible: true + }, + "application/vnd.ms-powerpoint": { + source: "iana", + compressible: false, + extensions: ["ppt", "pps", "pot"] + }, + "application/vnd.ms-powerpoint.addin.macroenabled.12": { + source: "iana", + extensions: ["ppam"] + }, + "application/vnd.ms-powerpoint.presentation.macroenabled.12": { + source: "iana", + extensions: ["pptm"] + }, + "application/vnd.ms-powerpoint.slide.macroenabled.12": { + source: "iana", + extensions: ["sldm"] + }, + "application/vnd.ms-powerpoint.slideshow.macroenabled.12": { + source: "iana", + extensions: ["ppsm"] + }, + "application/vnd.ms-powerpoint.template.macroenabled.12": { + source: "iana", + extensions: ["potm"] + }, + "application/vnd.ms-printdevicecapabilities+xml": { + source: "iana", + compressible: true + }, + "application/vnd.ms-printing.printticket+xml": { + source: "apache", + compressible: true + }, + "application/vnd.ms-printschematicket+xml": { + source: "iana", + compressible: true + }, + "application/vnd.ms-project": { + source: "iana", + extensions: ["mpp", "mpt"] + }, + "application/vnd.ms-tnef": { + source: "iana" + }, + "application/vnd.ms-windows.devicepairing": { + source: "iana" + }, + "application/vnd.ms-windows.nwprinting.oob": { + source: "iana" + }, + "application/vnd.ms-windows.printerpairing": { + source: "iana" + }, + "application/vnd.ms-windows.wsd.oob": { + source: "iana" + }, + "application/vnd.ms-wmdrm.lic-chlg-req": { + source: "iana" + }, + "application/vnd.ms-wmdrm.lic-resp": { + source: "iana" + }, + "application/vnd.ms-wmdrm.meter-chlg-req": { + source: "iana" + }, + "application/vnd.ms-wmdrm.meter-resp": { + source: "iana" + }, + "application/vnd.ms-word.document.macroenabled.12": { + source: "iana", + extensions: ["docm"] + }, + "application/vnd.ms-word.template.macroenabled.12": { + source: "iana", + extensions: ["dotm"] + }, + "application/vnd.ms-works": { + source: "iana", + extensions: ["wps", "wks", "wcm", "wdb"] + }, + "application/vnd.ms-wpl": { + source: "iana", + extensions: ["wpl"] + }, + "application/vnd.ms-xpsdocument": { + source: "iana", + compressible: false, + extensions: ["xps"] + }, + "application/vnd.msa-disk-image": { + source: "iana" + }, + "application/vnd.mseq": { + source: "iana", + extensions: ["mseq"] + }, + "application/vnd.msign": { + source: "iana" + }, + "application/vnd.multiad.creator": { + source: "iana" + }, + "application/vnd.multiad.creator.cif": { + source: "iana" + }, + "application/vnd.music-niff": { + source: "iana" + }, + "application/vnd.musician": { + source: "iana", + extensions: ["mus"] + }, + "application/vnd.muvee.style": { + source: "iana", + extensions: ["msty"] + }, + "application/vnd.mynfc": { + source: "iana", + extensions: ["taglet"] + }, + "application/vnd.nacamar.ybrid+json": { + source: "iana", + compressible: true + }, + "application/vnd.ncd.control": { + source: "iana" + }, + "application/vnd.ncd.reference": { + source: "iana" + }, + "application/vnd.nearst.inv+json": { + source: "iana", + compressible: true + }, + "application/vnd.nebumind.line": { + source: "iana" + }, + "application/vnd.nervana": { + source: "iana" + }, + "application/vnd.netfpx": { + source: "iana" + }, + "application/vnd.neurolanguage.nlu": { + source: "iana", + extensions: ["nlu"] + }, + "application/vnd.nimn": { + source: "iana" + }, + "application/vnd.nintendo.nitro.rom": { + source: "iana" + }, + "application/vnd.nintendo.snes.rom": { + source: "iana" + }, + "application/vnd.nitf": { + source: "iana", + extensions: ["ntf", "nitf"] + }, + "application/vnd.noblenet-directory": { + source: "iana", + extensions: ["nnd"] + }, + "application/vnd.noblenet-sealer": { + source: "iana", + extensions: ["nns"] + }, + "application/vnd.noblenet-web": { + source: "iana", + extensions: ["nnw"] + }, + "application/vnd.nokia.catalogs": { + source: "iana" + }, + "application/vnd.nokia.conml+wbxml": { + source: "iana" + }, + "application/vnd.nokia.conml+xml": { + source: "iana", + compressible: true + }, + "application/vnd.nokia.iptv.config+xml": { + source: "iana", + compressible: true + }, + "application/vnd.nokia.isds-radio-presets": { + source: "iana" + }, + "application/vnd.nokia.landmark+wbxml": { + source: "iana" + }, + "application/vnd.nokia.landmark+xml": { + source: "iana", + compressible: true + }, + "application/vnd.nokia.landmarkcollection+xml": { + source: "iana", + compressible: true + }, + "application/vnd.nokia.n-gage.ac+xml": { + source: "iana", + compressible: true, + extensions: ["ac"] + }, + "application/vnd.nokia.n-gage.data": { + source: "iana", + extensions: ["ngdat"] + }, + "application/vnd.nokia.n-gage.symbian.install": { + source: "iana", + extensions: ["n-gage"] + }, + "application/vnd.nokia.ncd": { + source: "iana" + }, + "application/vnd.nokia.pcd+wbxml": { + source: "iana" + }, + "application/vnd.nokia.pcd+xml": { + source: "iana", + compressible: true + }, + "application/vnd.nokia.radio-preset": { + source: "iana", + extensions: ["rpst"] + }, + "application/vnd.nokia.radio-presets": { + source: "iana", + extensions: ["rpss"] + }, + "application/vnd.novadigm.edm": { + source: "iana", + extensions: ["edm"] + }, + "application/vnd.novadigm.edx": { + source: "iana", + extensions: ["edx"] + }, + "application/vnd.novadigm.ext": { + source: "iana", + extensions: ["ext"] + }, + "application/vnd.ntt-local.content-share": { + source: "iana" + }, + "application/vnd.ntt-local.file-transfer": { + source: "iana" + }, + "application/vnd.ntt-local.ogw_remote-access": { + source: "iana" + }, + "application/vnd.ntt-local.sip-ta_remote": { + source: "iana" + }, + "application/vnd.ntt-local.sip-ta_tcp_stream": { + source: "iana" + }, + "application/vnd.oasis.opendocument.chart": { + source: "iana", + extensions: ["odc"] + }, + "application/vnd.oasis.opendocument.chart-template": { + source: "iana", + extensions: ["otc"] + }, + "application/vnd.oasis.opendocument.database": { + source: "iana", + extensions: ["odb"] + }, + "application/vnd.oasis.opendocument.formula": { + source: "iana", + extensions: ["odf"] + }, + "application/vnd.oasis.opendocument.formula-template": { + source: "iana", + extensions: ["odft"] + }, + "application/vnd.oasis.opendocument.graphics": { + source: "iana", + compressible: false, + extensions: ["odg"] + }, + "application/vnd.oasis.opendocument.graphics-template": { + source: "iana", + extensions: ["otg"] + }, + "application/vnd.oasis.opendocument.image": { + source: "iana", + extensions: ["odi"] + }, + "application/vnd.oasis.opendocument.image-template": { + source: "iana", + extensions: ["oti"] + }, + "application/vnd.oasis.opendocument.presentation": { + source: "iana", + compressible: false, + extensions: ["odp"] + }, + "application/vnd.oasis.opendocument.presentation-template": { + source: "iana", + extensions: ["otp"] + }, + "application/vnd.oasis.opendocument.spreadsheet": { + source: "iana", + compressible: false, + extensions: ["ods"] + }, + "application/vnd.oasis.opendocument.spreadsheet-template": { + source: "iana", + extensions: ["ots"] + }, + "application/vnd.oasis.opendocument.text": { + source: "iana", + compressible: false, + extensions: ["odt"] + }, + "application/vnd.oasis.opendocument.text-master": { + source: "iana", + extensions: ["odm"] + }, + "application/vnd.oasis.opendocument.text-template": { + source: "iana", + extensions: ["ott"] + }, + "application/vnd.oasis.opendocument.text-web": { + source: "iana", + extensions: ["oth"] + }, + "application/vnd.obn": { + source: "iana" + }, + "application/vnd.ocf+cbor": { + source: "iana" + }, + "application/vnd.oci.image.manifest.v1+json": { + source: "iana", + compressible: true + }, + "application/vnd.oftn.l10n+json": { + source: "iana", + compressible: true + }, + "application/vnd.oipf.contentaccessdownload+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oipf.contentaccessstreaming+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oipf.cspg-hexbinary": { + source: "iana" + }, + "application/vnd.oipf.dae.svg+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oipf.dae.xhtml+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oipf.mippvcontrolmessage+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oipf.pae.gem": { + source: "iana" + }, + "application/vnd.oipf.spdiscovery+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oipf.spdlist+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oipf.ueprofile+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oipf.userprofile+xml": { + source: "iana", + compressible: true + }, + "application/vnd.olpc-sugar": { + source: "iana", + extensions: ["xo"] + }, + "application/vnd.oma-scws-config": { + source: "iana" + }, + "application/vnd.oma-scws-http-request": { + source: "iana" + }, + "application/vnd.oma-scws-http-response": { + source: "iana" + }, + "application/vnd.oma.bcast.associated-procedure-parameter+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oma.bcast.drm-trigger+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oma.bcast.imd+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oma.bcast.ltkm": { + source: "iana" + }, + "application/vnd.oma.bcast.notification+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oma.bcast.provisioningtrigger": { + source: "iana" + }, + "application/vnd.oma.bcast.sgboot": { + source: "iana" + }, + "application/vnd.oma.bcast.sgdd+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oma.bcast.sgdu": { + source: "iana" + }, + "application/vnd.oma.bcast.simple-symbol-container": { + source: "iana" + }, + "application/vnd.oma.bcast.smartcard-trigger+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oma.bcast.sprov+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oma.bcast.stkm": { + source: "iana" + }, + "application/vnd.oma.cab-address-book+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oma.cab-feature-handler+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oma.cab-pcc+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oma.cab-subs-invite+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oma.cab-user-prefs+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oma.dcd": { + source: "iana" + }, + "application/vnd.oma.dcdc": { + source: "iana" + }, + "application/vnd.oma.dd2+xml": { + source: "iana", + compressible: true, + extensions: ["dd2"] + }, + "application/vnd.oma.drm.risd+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oma.group-usage-list+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oma.lwm2m+cbor": { + source: "iana" + }, + "application/vnd.oma.lwm2m+json": { + source: "iana", + compressible: true + }, + "application/vnd.oma.lwm2m+tlv": { + source: "iana" + }, + "application/vnd.oma.pal+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oma.poc.detailed-progress-report+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oma.poc.final-report+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oma.poc.groups+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oma.poc.invocation-descriptor+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oma.poc.optimized-progress-report+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oma.push": { + source: "iana" + }, + "application/vnd.oma.scidm.messages+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oma.xcap-directory+xml": { + source: "iana", + compressible: true + }, + "application/vnd.omads-email+xml": { + source: "iana", + charset: "UTF-8", + compressible: true + }, + "application/vnd.omads-file+xml": { + source: "iana", + charset: "UTF-8", + compressible: true + }, + "application/vnd.omads-folder+xml": { + source: "iana", + charset: "UTF-8", + compressible: true + }, + "application/vnd.omaloc-supl-init": { + source: "iana" + }, + "application/vnd.onepager": { + source: "iana" + }, + "application/vnd.onepagertamp": { + source: "iana" + }, + "application/vnd.onepagertamx": { + source: "iana" + }, + "application/vnd.onepagertat": { + source: "iana" + }, + "application/vnd.onepagertatp": { + source: "iana" + }, + "application/vnd.onepagertatx": { + source: "iana" + }, + "application/vnd.openblox.game+xml": { + source: "iana", + compressible: true, + extensions: ["obgx"] + }, + "application/vnd.openblox.game-binary": { + source: "iana" + }, + "application/vnd.openeye.oeb": { + source: "iana" + }, + "application/vnd.openofficeorg.extension": { + source: "apache", + extensions: ["oxt"] + }, + "application/vnd.openstreetmap.data+xml": { + source: "iana", + compressible: true, + extensions: ["osm"] + }, + "application/vnd.opentimestamps.ots": { + source: "iana" + }, + "application/vnd.openxmlformats-officedocument.custom-properties+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.customxmlproperties+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.drawing+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.drawingml.chart+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.extended-properties+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.presentationml.comments+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.presentationml.presentation": { + source: "iana", + compressible: false, + extensions: ["pptx"] + }, + "application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.presentationml.presprops+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.presentationml.slide": { + source: "iana", + extensions: ["sldx"] + }, + "application/vnd.openxmlformats-officedocument.presentationml.slide+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.presentationml.slideshow": { + source: "iana", + extensions: ["ppsx"] + }, + "application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.presentationml.tags+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.presentationml.template": { + source: "iana", + extensions: ["potx"] + }, + "application/vnd.openxmlformats-officedocument.presentationml.template.main+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": { + source: "iana", + compressible: false, + extensions: ["xlsx"] + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.template": { + source: "iana", + extensions: ["xltx"] + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.theme+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.themeoverride+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.vmldrawing": { + source: "iana" + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.document": { + source: "iana", + compressible: false, + extensions: ["docx"] + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.template": { + source: "iana", + extensions: ["dotx"] + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-package.core-properties+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-package.relationships+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oracle.resource+json": { + source: "iana", + compressible: true + }, + "application/vnd.orange.indata": { + source: "iana" + }, + "application/vnd.osa.netdeploy": { + source: "iana" + }, + "application/vnd.osgeo.mapguide.package": { + source: "iana", + extensions: ["mgp"] + }, + "application/vnd.osgi.bundle": { + source: "iana" + }, + "application/vnd.osgi.dp": { + source: "iana", + extensions: ["dp"] + }, + "application/vnd.osgi.subsystem": { + source: "iana", + extensions: ["esa"] + }, + "application/vnd.otps.ct-kip+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oxli.countgraph": { + source: "iana" + }, + "application/vnd.pagerduty+json": { + source: "iana", + compressible: true + }, + "application/vnd.palm": { + source: "iana", + extensions: ["pdb", "pqa", "oprc"] + }, + "application/vnd.panoply": { + source: "iana" + }, + "application/vnd.paos.xml": { + source: "iana" + }, + "application/vnd.patentdive": { + source: "iana" + }, + "application/vnd.patientecommsdoc": { + source: "iana" + }, + "application/vnd.pawaafile": { + source: "iana", + extensions: ["paw"] + }, + "application/vnd.pcos": { + source: "iana" + }, + "application/vnd.pg.format": { + source: "iana", + extensions: ["str"] + }, + "application/vnd.pg.osasli": { + source: "iana", + extensions: ["ei6"] + }, + "application/vnd.piaccess.application-licence": { + source: "iana" + }, + "application/vnd.picsel": { + source: "iana", + extensions: ["efif"] + }, + "application/vnd.pmi.widget": { + source: "iana", + extensions: ["wg"] + }, + "application/vnd.poc.group-advertisement+xml": { + source: "iana", + compressible: true + }, + "application/vnd.pocketlearn": { + source: "iana", + extensions: ["plf"] + }, + "application/vnd.powerbuilder6": { + source: "iana", + extensions: ["pbd"] + }, + "application/vnd.powerbuilder6-s": { + source: "iana" + }, + "application/vnd.powerbuilder7": { + source: "iana" + }, + "application/vnd.powerbuilder7-s": { + source: "iana" + }, + "application/vnd.powerbuilder75": { + source: "iana" + }, + "application/vnd.powerbuilder75-s": { + source: "iana" + }, + "application/vnd.preminet": { + source: "iana" + }, + "application/vnd.previewsystems.box": { + source: "iana", + extensions: ["box"] + }, + "application/vnd.proteus.magazine": { + source: "iana", + extensions: ["mgz"] + }, + "application/vnd.psfs": { + source: "iana" + }, + "application/vnd.publishare-delta-tree": { + source: "iana", + extensions: ["qps"] + }, + "application/vnd.pvi.ptid1": { + source: "iana", + extensions: ["ptid"] + }, + "application/vnd.pwg-multiplexed": { + source: "iana" + }, + "application/vnd.pwg-xhtml-print+xml": { + source: "iana", + compressible: true + }, + "application/vnd.qualcomm.brew-app-res": { + source: "iana" + }, + "application/vnd.quarantainenet": { + source: "iana" + }, + "application/vnd.quark.quarkxpress": { + source: "iana", + extensions: ["qxd", "qxt", "qwd", "qwt", "qxl", "qxb"] + }, + "application/vnd.quobject-quoxdocument": { + source: "iana" + }, + "application/vnd.radisys.moml+xml": { + source: "iana", + compressible: true + }, + "application/vnd.radisys.msml+xml": { + source: "iana", + compressible: true + }, + "application/vnd.radisys.msml-audit+xml": { + source: "iana", + compressible: true + }, + "application/vnd.radisys.msml-audit-conf+xml": { + source: "iana", + compressible: true + }, + "application/vnd.radisys.msml-audit-conn+xml": { + source: "iana", + compressible: true + }, + "application/vnd.radisys.msml-audit-dialog+xml": { + source: "iana", + compressible: true + }, + "application/vnd.radisys.msml-audit-stream+xml": { + source: "iana", + compressible: true + }, + "application/vnd.radisys.msml-conf+xml": { + source: "iana", + compressible: true + }, + "application/vnd.radisys.msml-dialog+xml": { + source: "iana", + compressible: true + }, + "application/vnd.radisys.msml-dialog-base+xml": { + source: "iana", + compressible: true + }, + "application/vnd.radisys.msml-dialog-fax-detect+xml": { + source: "iana", + compressible: true + }, + "application/vnd.radisys.msml-dialog-fax-sendrecv+xml": { + source: "iana", + compressible: true + }, + "application/vnd.radisys.msml-dialog-group+xml": { + source: "iana", + compressible: true + }, + "application/vnd.radisys.msml-dialog-speech+xml": { + source: "iana", + compressible: true + }, + "application/vnd.radisys.msml-dialog-transform+xml": { + source: "iana", + compressible: true + }, + "application/vnd.rainstor.data": { + source: "iana" + }, + "application/vnd.rapid": { + source: "iana" + }, + "application/vnd.rar": { + source: "iana", + extensions: ["rar"] + }, + "application/vnd.realvnc.bed": { + source: "iana", + extensions: ["bed"] + }, + "application/vnd.recordare.musicxml": { + source: "iana", + extensions: ["mxl"] + }, + "application/vnd.recordare.musicxml+xml": { + source: "iana", + compressible: true, + extensions: ["musicxml"] + }, + "application/vnd.renlearn.rlprint": { + source: "iana" + }, + "application/vnd.resilient.logic": { + source: "iana" + }, + "application/vnd.restful+json": { + source: "iana", + compressible: true + }, + "application/vnd.rig.cryptonote": { + source: "iana", + extensions: ["cryptonote"] + }, + "application/vnd.rim.cod": { + source: "apache", + extensions: ["cod"] + }, + "application/vnd.rn-realmedia": { + source: "apache", + extensions: ["rm"] + }, + "application/vnd.rn-realmedia-vbr": { + source: "apache", + extensions: ["rmvb"] + }, + "application/vnd.route66.link66+xml": { + source: "iana", + compressible: true, + extensions: ["link66"] + }, + "application/vnd.rs-274x": { + source: "iana" + }, + "application/vnd.ruckus.download": { + source: "iana" + }, + "application/vnd.s3sms": { + source: "iana" + }, + "application/vnd.sailingtracker.track": { + source: "iana", + extensions: ["st"] + }, + "application/vnd.sar": { + source: "iana" + }, + "application/vnd.sbm.cid": { + source: "iana" + }, + "application/vnd.sbm.mid2": { + source: "iana" + }, + "application/vnd.scribus": { + source: "iana" + }, + "application/vnd.sealed.3df": { + source: "iana" + }, + "application/vnd.sealed.csf": { + source: "iana" + }, + "application/vnd.sealed.doc": { + source: "iana" + }, + "application/vnd.sealed.eml": { + source: "iana" + }, + "application/vnd.sealed.mht": { + source: "iana" + }, + "application/vnd.sealed.net": { + source: "iana" + }, + "application/vnd.sealed.ppt": { + source: "iana" + }, + "application/vnd.sealed.tiff": { + source: "iana" + }, + "application/vnd.sealed.xls": { + source: "iana" + }, + "application/vnd.sealedmedia.softseal.html": { + source: "iana" + }, + "application/vnd.sealedmedia.softseal.pdf": { + source: "iana" + }, + "application/vnd.seemail": { + source: "iana", + extensions: ["see"] + }, + "application/vnd.seis+json": { + source: "iana", + compressible: true + }, + "application/vnd.sema": { + source: "iana", + extensions: ["sema"] + }, + "application/vnd.semd": { + source: "iana", + extensions: ["semd"] + }, + "application/vnd.semf": { + source: "iana", + extensions: ["semf"] + }, + "application/vnd.shade-save-file": { + source: "iana" + }, + "application/vnd.shana.informed.formdata": { + source: "iana", + extensions: ["ifm"] + }, + "application/vnd.shana.informed.formtemplate": { + source: "iana", + extensions: ["itp"] + }, + "application/vnd.shana.informed.interchange": { + source: "iana", + extensions: ["iif"] + }, + "application/vnd.shana.informed.package": { + source: "iana", + extensions: ["ipk"] + }, + "application/vnd.shootproof+json": { + source: "iana", + compressible: true + }, + "application/vnd.shopkick+json": { + source: "iana", + compressible: true + }, + "application/vnd.shp": { + source: "iana" + }, + "application/vnd.shx": { + source: "iana" + }, + "application/vnd.sigrok.session": { + source: "iana" + }, + "application/vnd.simtech-mindmapper": { + source: "iana", + extensions: ["twd", "twds"] + }, + "application/vnd.siren+json": { + source: "iana", + compressible: true + }, + "application/vnd.smaf": { + source: "iana", + extensions: ["mmf"] + }, + "application/vnd.smart.notebook": { + source: "iana" + }, + "application/vnd.smart.teacher": { + source: "iana", + extensions: ["teacher"] + }, + "application/vnd.snesdev-page-table": { + source: "iana" + }, + "application/vnd.software602.filler.form+xml": { + source: "iana", + compressible: true, + extensions: ["fo"] + }, + "application/vnd.software602.filler.form-xml-zip": { + source: "iana" + }, + "application/vnd.solent.sdkm+xml": { + source: "iana", + compressible: true, + extensions: ["sdkm", "sdkd"] + }, + "application/vnd.spotfire.dxp": { + source: "iana", + extensions: ["dxp"] + }, + "application/vnd.spotfire.sfs": { + source: "iana", + extensions: ["sfs"] + }, + "application/vnd.sqlite3": { + source: "iana" + }, + "application/vnd.sss-cod": { + source: "iana" + }, + "application/vnd.sss-dtf": { + source: "iana" + }, + "application/vnd.sss-ntf": { + source: "iana" + }, + "application/vnd.stardivision.calc": { + source: "apache", + extensions: ["sdc"] + }, + "application/vnd.stardivision.draw": { + source: "apache", + extensions: ["sda"] + }, + "application/vnd.stardivision.impress": { + source: "apache", + extensions: ["sdd"] + }, + "application/vnd.stardivision.math": { + source: "apache", + extensions: ["smf"] + }, + "application/vnd.stardivision.writer": { + source: "apache", + extensions: ["sdw", "vor"] + }, + "application/vnd.stardivision.writer-global": { + source: "apache", + extensions: ["sgl"] + }, + "application/vnd.stepmania.package": { + source: "iana", + extensions: ["smzip"] + }, + "application/vnd.stepmania.stepchart": { + source: "iana", + extensions: ["sm"] + }, + "application/vnd.street-stream": { + source: "iana" + }, + "application/vnd.sun.wadl+xml": { + source: "iana", + compressible: true, + extensions: ["wadl"] + }, + "application/vnd.sun.xml.calc": { + source: "apache", + extensions: ["sxc"] + }, + "application/vnd.sun.xml.calc.template": { + source: "apache", + extensions: ["stc"] + }, + "application/vnd.sun.xml.draw": { + source: "apache", + extensions: ["sxd"] + }, + "application/vnd.sun.xml.draw.template": { + source: "apache", + extensions: ["std"] + }, + "application/vnd.sun.xml.impress": { + source: "apache", + extensions: ["sxi"] + }, + "application/vnd.sun.xml.impress.template": { + source: "apache", + extensions: ["sti"] + }, + "application/vnd.sun.xml.math": { + source: "apache", + extensions: ["sxm"] + }, + "application/vnd.sun.xml.writer": { + source: "apache", + extensions: ["sxw"] + }, + "application/vnd.sun.xml.writer.global": { + source: "apache", + extensions: ["sxg"] + }, + "application/vnd.sun.xml.writer.template": { + source: "apache", + extensions: ["stw"] + }, + "application/vnd.sus-calendar": { + source: "iana", + extensions: ["sus", "susp"] + }, + "application/vnd.svd": { + source: "iana", + extensions: ["svd"] + }, + "application/vnd.swiftview-ics": { + source: "iana" + }, + "application/vnd.sycle+xml": { + source: "iana", + compressible: true + }, + "application/vnd.syft+json": { + source: "iana", + compressible: true + }, + "application/vnd.symbian.install": { + source: "apache", + extensions: ["sis", "sisx"] + }, + "application/vnd.syncml+xml": { + source: "iana", + charset: "UTF-8", + compressible: true, + extensions: ["xsm"] + }, + "application/vnd.syncml.dm+wbxml": { + source: "iana", + charset: "UTF-8", + extensions: ["bdm"] + }, + "application/vnd.syncml.dm+xml": { + source: "iana", + charset: "UTF-8", + compressible: true, + extensions: ["xdm"] + }, + "application/vnd.syncml.dm.notification": { + source: "iana" + }, + "application/vnd.syncml.dmddf+wbxml": { + source: "iana" + }, + "application/vnd.syncml.dmddf+xml": { + source: "iana", + charset: "UTF-8", + compressible: true, + extensions: ["ddf"] + }, + "application/vnd.syncml.dmtnds+wbxml": { + source: "iana" + }, + "application/vnd.syncml.dmtnds+xml": { + source: "iana", + charset: "UTF-8", + compressible: true + }, + "application/vnd.syncml.ds.notification": { + source: "iana" + }, + "application/vnd.tableschema+json": { + source: "iana", + compressible: true + }, + "application/vnd.tao.intent-module-archive": { + source: "iana", + extensions: ["tao"] + }, + "application/vnd.tcpdump.pcap": { + source: "iana", + extensions: ["pcap", "cap", "dmp"] + }, + "application/vnd.think-cell.ppttc+json": { + source: "iana", + compressible: true + }, + "application/vnd.tmd.mediaflex.api+xml": { + source: "iana", + compressible: true + }, + "application/vnd.tml": { + source: "iana" + }, + "application/vnd.tmobile-livetv": { + source: "iana", + extensions: ["tmo"] + }, + "application/vnd.tri.onesource": { + source: "iana" + }, + "application/vnd.trid.tpt": { + source: "iana", + extensions: ["tpt"] + }, + "application/vnd.triscape.mxs": { + source: "iana", + extensions: ["mxs"] + }, + "application/vnd.trueapp": { + source: "iana", + extensions: ["tra"] + }, + "application/vnd.truedoc": { + source: "iana" + }, + "application/vnd.ubisoft.webplayer": { + source: "iana" + }, + "application/vnd.ufdl": { + source: "iana", + extensions: ["ufd", "ufdl"] + }, + "application/vnd.uiq.theme": { + source: "iana", + extensions: ["utz"] + }, + "application/vnd.umajin": { + source: "iana", + extensions: ["umj"] + }, + "application/vnd.unity": { + source: "iana", + extensions: ["unityweb"] + }, + "application/vnd.uoml+xml": { + source: "iana", + compressible: true, + extensions: ["uoml"] + }, + "application/vnd.uplanet.alert": { + source: "iana" + }, + "application/vnd.uplanet.alert-wbxml": { + source: "iana" + }, + "application/vnd.uplanet.bearer-choice": { + source: "iana" + }, + "application/vnd.uplanet.bearer-choice-wbxml": { + source: "iana" + }, + "application/vnd.uplanet.cacheop": { + source: "iana" + }, + "application/vnd.uplanet.cacheop-wbxml": { + source: "iana" + }, + "application/vnd.uplanet.channel": { + source: "iana" + }, + "application/vnd.uplanet.channel-wbxml": { + source: "iana" + }, + "application/vnd.uplanet.list": { + source: "iana" + }, + "application/vnd.uplanet.list-wbxml": { + source: "iana" + }, + "application/vnd.uplanet.listcmd": { + source: "iana" + }, + "application/vnd.uplanet.listcmd-wbxml": { + source: "iana" + }, + "application/vnd.uplanet.signal": { + source: "iana" + }, + "application/vnd.uri-map": { + source: "iana" + }, + "application/vnd.valve.source.material": { + source: "iana" + }, + "application/vnd.vcx": { + source: "iana", + extensions: ["vcx"] + }, + "application/vnd.vd-study": { + source: "iana" + }, + "application/vnd.vectorworks": { + source: "iana" + }, + "application/vnd.vel+json": { + source: "iana", + compressible: true + }, + "application/vnd.verimatrix.vcas": { + source: "iana" + }, + "application/vnd.veritone.aion+json": { + source: "iana", + compressible: true + }, + "application/vnd.veryant.thin": { + source: "iana" + }, + "application/vnd.ves.encrypted": { + source: "iana" + }, + "application/vnd.vidsoft.vidconference": { + source: "iana" + }, + "application/vnd.visio": { + source: "iana", + extensions: ["vsd", "vst", "vss", "vsw"] + }, + "application/vnd.visionary": { + source: "iana", + extensions: ["vis"] + }, + "application/vnd.vividence.scriptfile": { + source: "iana" + }, + "application/vnd.vsf": { + source: "iana", + extensions: ["vsf"] + }, + "application/vnd.wap.sic": { + source: "iana" + }, + "application/vnd.wap.slc": { + source: "iana" + }, + "application/vnd.wap.wbxml": { + source: "iana", + charset: "UTF-8", + extensions: ["wbxml"] + }, + "application/vnd.wap.wmlc": { + source: "iana", + extensions: ["wmlc"] + }, + "application/vnd.wap.wmlscriptc": { + source: "iana", + extensions: ["wmlsc"] + }, + "application/vnd.webturbo": { + source: "iana", + extensions: ["wtb"] + }, + "application/vnd.wfa.dpp": { + source: "iana" + }, + "application/vnd.wfa.p2p": { + source: "iana" + }, + "application/vnd.wfa.wsc": { + source: "iana" + }, + "application/vnd.windows.devicepairing": { + source: "iana" + }, + "application/vnd.wmc": { + source: "iana" + }, + "application/vnd.wmf.bootstrap": { + source: "iana" + }, + "application/vnd.wolfram.mathematica": { + source: "iana" + }, + "application/vnd.wolfram.mathematica.package": { + source: "iana" + }, + "application/vnd.wolfram.player": { + source: "iana", + extensions: ["nbp"] + }, + "application/vnd.wordperfect": { + source: "iana", + extensions: ["wpd"] + }, + "application/vnd.wqd": { + source: "iana", + extensions: ["wqd"] + }, + "application/vnd.wrq-hp3000-labelled": { + source: "iana" + }, + "application/vnd.wt.stf": { + source: "iana", + extensions: ["stf"] + }, + "application/vnd.wv.csp+wbxml": { + source: "iana" + }, + "application/vnd.wv.csp+xml": { + source: "iana", + compressible: true + }, + "application/vnd.wv.ssp+xml": { + source: "iana", + compressible: true + }, + "application/vnd.xacml+json": { + source: "iana", + compressible: true + }, + "application/vnd.xara": { + source: "iana", + extensions: ["xar"] + }, + "application/vnd.xfdl": { + source: "iana", + extensions: ["xfdl"] + }, + "application/vnd.xfdl.webform": { + source: "iana" + }, + "application/vnd.xmi+xml": { + source: "iana", + compressible: true + }, + "application/vnd.xmpie.cpkg": { + source: "iana" + }, + "application/vnd.xmpie.dpkg": { + source: "iana" + }, + "application/vnd.xmpie.plan": { + source: "iana" + }, + "application/vnd.xmpie.ppkg": { + source: "iana" + }, + "application/vnd.xmpie.xlim": { + source: "iana" + }, + "application/vnd.yamaha.hv-dic": { + source: "iana", + extensions: ["hvd"] + }, + "application/vnd.yamaha.hv-script": { + source: "iana", + extensions: ["hvs"] + }, + "application/vnd.yamaha.hv-voice": { + source: "iana", + extensions: ["hvp"] + }, + "application/vnd.yamaha.openscoreformat": { + source: "iana", + extensions: ["osf"] + }, + "application/vnd.yamaha.openscoreformat.osfpvg+xml": { + source: "iana", + compressible: true, + extensions: ["osfpvg"] + }, + "application/vnd.yamaha.remote-setup": { + source: "iana" + }, + "application/vnd.yamaha.smaf-audio": { + source: "iana", + extensions: ["saf"] + }, + "application/vnd.yamaha.smaf-phrase": { + source: "iana", + extensions: ["spf"] + }, + "application/vnd.yamaha.through-ngn": { + source: "iana" + }, + "application/vnd.yamaha.tunnel-udpencap": { + source: "iana" + }, + "application/vnd.yaoweme": { + source: "iana" + }, + "application/vnd.yellowriver-custom-menu": { + source: "iana", + extensions: ["cmp"] + }, + "application/vnd.youtube.yt": { + source: "iana" + }, + "application/vnd.zul": { + source: "iana", + extensions: ["zir", "zirz"] + }, + "application/vnd.zzazz.deck+xml": { + source: "iana", + compressible: true, + extensions: ["zaz"] + }, + "application/voicexml+xml": { + source: "iana", + compressible: true, + extensions: ["vxml"] + }, + "application/voucher-cms+json": { + source: "iana", + compressible: true + }, + "application/vq-rtcpxr": { + source: "iana" + }, + "application/wasm": { + source: "iana", + compressible: true, + extensions: ["wasm"] + }, + "application/watcherinfo+xml": { + source: "iana", + compressible: true, + extensions: ["wif"] + }, + "application/webpush-options+json": { + source: "iana", + compressible: true + }, + "application/whoispp-query": { + source: "iana" + }, + "application/whoispp-response": { + source: "iana" + }, + "application/widget": { + source: "iana", + extensions: ["wgt"] + }, + "application/winhlp": { + source: "apache", + extensions: ["hlp"] + }, + "application/wita": { + source: "iana" + }, + "application/wordperfect5.1": { + source: "iana" + }, + "application/wsdl+xml": { + source: "iana", + compressible: true, + extensions: ["wsdl"] + }, + "application/wspolicy+xml": { + source: "iana", + compressible: true, + extensions: ["wspolicy"] + }, + "application/x-7z-compressed": { + source: "apache", + compressible: false, + extensions: ["7z"] + }, + "application/x-abiword": { + source: "apache", + extensions: ["abw"] + }, + "application/x-ace-compressed": { + source: "apache", + extensions: ["ace"] + }, + "application/x-amf": { + source: "apache" + }, + "application/x-apple-diskimage": { + source: "apache", + extensions: ["dmg"] + }, + "application/x-arj": { + compressible: false, + extensions: ["arj"] + }, + "application/x-authorware-bin": { + source: "apache", + extensions: ["aab", "x32", "u32", "vox"] + }, + "application/x-authorware-map": { + source: "apache", + extensions: ["aam"] + }, + "application/x-authorware-seg": { + source: "apache", + extensions: ["aas"] + }, + "application/x-bcpio": { + source: "apache", + extensions: ["bcpio"] + }, + "application/x-bdoc": { + compressible: false, + extensions: ["bdoc"] + }, + "application/x-bittorrent": { + source: "apache", + extensions: ["torrent"] + }, + "application/x-blorb": { + source: "apache", + extensions: ["blb", "blorb"] + }, + "application/x-bzip": { + source: "apache", + compressible: false, + extensions: ["bz"] + }, + "application/x-bzip2": { + source: "apache", + compressible: false, + extensions: ["bz2", "boz"] + }, + "application/x-cbr": { + source: "apache", + extensions: ["cbr", "cba", "cbt", "cbz", "cb7"] + }, + "application/x-cdlink": { + source: "apache", + extensions: ["vcd"] + }, + "application/x-cfs-compressed": { + source: "apache", + extensions: ["cfs"] + }, + "application/x-chat": { + source: "apache", + extensions: ["chat"] + }, + "application/x-chess-pgn": { + source: "apache", + extensions: ["pgn"] + }, + "application/x-chrome-extension": { + extensions: ["crx"] + }, + "application/x-cocoa": { + source: "nginx", + extensions: ["cco"] + }, + "application/x-compress": { + source: "apache" + }, + "application/x-conference": { + source: "apache", + extensions: ["nsc"] + }, + "application/x-cpio": { + source: "apache", + extensions: ["cpio"] + }, + "application/x-csh": { + source: "apache", + extensions: ["csh"] + }, + "application/x-deb": { + compressible: false + }, + "application/x-debian-package": { + source: "apache", + extensions: ["deb", "udeb"] + }, + "application/x-dgc-compressed": { + source: "apache", + extensions: ["dgc"] + }, + "application/x-director": { + source: "apache", + extensions: ["dir", "dcr", "dxr", "cst", "cct", "cxt", "w3d", "fgd", "swa"] + }, + "application/x-doom": { + source: "apache", + extensions: ["wad"] + }, + "application/x-dtbncx+xml": { + source: "apache", + compressible: true, + extensions: ["ncx"] + }, + "application/x-dtbook+xml": { + source: "apache", + compressible: true, + extensions: ["dtb"] + }, + "application/x-dtbresource+xml": { + source: "apache", + compressible: true, + extensions: ["res"] + }, + "application/x-dvi": { + source: "apache", + compressible: false, + extensions: ["dvi"] + }, + "application/x-envoy": { + source: "apache", + extensions: ["evy"] + }, + "application/x-eva": { + source: "apache", + extensions: ["eva"] + }, + "application/x-font-bdf": { + source: "apache", + extensions: ["bdf"] + }, + "application/x-font-dos": { + source: "apache" + }, + "application/x-font-framemaker": { + source: "apache" + }, + "application/x-font-ghostscript": { + source: "apache", + extensions: ["gsf"] + }, + "application/x-font-libgrx": { + source: "apache" + }, + "application/x-font-linux-psf": { + source: "apache", + extensions: ["psf"] + }, + "application/x-font-pcf": { + source: "apache", + extensions: ["pcf"] + }, + "application/x-font-snf": { + source: "apache", + extensions: ["snf"] + }, + "application/x-font-speedo": { + source: "apache" + }, + "application/x-font-sunos-news": { + source: "apache" + }, + "application/x-font-type1": { + source: "apache", + extensions: ["pfa", "pfb", "pfm", "afm"] + }, + "application/x-font-vfont": { + source: "apache" + }, + "application/x-freearc": { + source: "apache", + extensions: ["arc"] + }, + "application/x-futuresplash": { + source: "apache", + extensions: ["spl"] + }, + "application/x-gca-compressed": { + source: "apache", + extensions: ["gca"] + }, + "application/x-glulx": { + source: "apache", + extensions: ["ulx"] + }, + "application/x-gnumeric": { + source: "apache", + extensions: ["gnumeric"] + }, + "application/x-gramps-xml": { + source: "apache", + extensions: ["gramps"] + }, + "application/x-gtar": { + source: "apache", + extensions: ["gtar"] + }, + "application/x-gzip": { + source: "apache" + }, + "application/x-hdf": { + source: "apache", + extensions: ["hdf"] + }, + "application/x-httpd-php": { + compressible: true, + extensions: ["php"] + }, + "application/x-install-instructions": { + source: "apache", + extensions: ["install"] + }, + "application/x-iso9660-image": { + source: "apache", + extensions: ["iso"] + }, + "application/x-iwork-keynote-sffkey": { + extensions: ["key"] + }, + "application/x-iwork-numbers-sffnumbers": { + extensions: ["numbers"] + }, + "application/x-iwork-pages-sffpages": { + extensions: ["pages"] + }, + "application/x-java-archive-diff": { + source: "nginx", + extensions: ["jardiff"] + }, + "application/x-java-jnlp-file": { + source: "apache", + compressible: false, + extensions: ["jnlp"] + }, + "application/x-javascript": { + compressible: true + }, + "application/x-keepass2": { + extensions: ["kdbx"] + }, + "application/x-latex": { + source: "apache", + compressible: false, + extensions: ["latex"] + }, + "application/x-lua-bytecode": { + extensions: ["luac"] + }, + "application/x-lzh-compressed": { + source: "apache", + extensions: ["lzh", "lha"] + }, + "application/x-makeself": { + source: "nginx", + extensions: ["run"] + }, + "application/x-mie": { + source: "apache", + extensions: ["mie"] + }, + "application/x-mobipocket-ebook": { + source: "apache", + extensions: ["prc", "mobi"] + }, + "application/x-mpegurl": { + compressible: false + }, + "application/x-ms-application": { + source: "apache", + extensions: ["application"] + }, + "application/x-ms-shortcut": { + source: "apache", + extensions: ["lnk"] + }, + "application/x-ms-wmd": { + source: "apache", + extensions: ["wmd"] + }, + "application/x-ms-wmz": { + source: "apache", + extensions: ["wmz"] + }, + "application/x-ms-xbap": { + source: "apache", + extensions: ["xbap"] + }, + "application/x-msaccess": { + source: "apache", + extensions: ["mdb"] + }, + "application/x-msbinder": { + source: "apache", + extensions: ["obd"] + }, + "application/x-mscardfile": { + source: "apache", + extensions: ["crd"] + }, + "application/x-msclip": { + source: "apache", + extensions: ["clp"] + }, + "application/x-msdos-program": { + extensions: ["exe"] + }, + "application/x-msdownload": { + source: "apache", + extensions: ["exe", "dll", "com", "bat", "msi"] + }, + "application/x-msmediaview": { + source: "apache", + extensions: ["mvb", "m13", "m14"] + }, + "application/x-msmetafile": { + source: "apache", + extensions: ["wmf", "wmz", "emf", "emz"] + }, + "application/x-msmoney": { + source: "apache", + extensions: ["mny"] + }, + "application/x-mspublisher": { + source: "apache", + extensions: ["pub"] + }, + "application/x-msschedule": { + source: "apache", + extensions: ["scd"] + }, + "application/x-msterminal": { + source: "apache", + extensions: ["trm"] + }, + "application/x-mswrite": { + source: "apache", + extensions: ["wri"] + }, + "application/x-netcdf": { + source: "apache", + extensions: ["nc", "cdf"] + }, + "application/x-ns-proxy-autoconfig": { + compressible: true, + extensions: ["pac"] + }, + "application/x-nzb": { + source: "apache", + extensions: ["nzb"] + }, + "application/x-perl": { + source: "nginx", + extensions: ["pl", "pm"] + }, + "application/x-pilot": { + source: "nginx", + extensions: ["prc", "pdb"] + }, + "application/x-pkcs12": { + source: "apache", + compressible: false, + extensions: ["p12", "pfx"] + }, + "application/x-pkcs7-certificates": { + source: "apache", + extensions: ["p7b", "spc"] + }, + "application/x-pkcs7-certreqresp": { + source: "apache", + extensions: ["p7r"] + }, + "application/x-pki-message": { + source: "iana" + }, + "application/x-rar-compressed": { + source: "apache", + compressible: false, + extensions: ["rar"] + }, + "application/x-redhat-package-manager": { + source: "nginx", + extensions: ["rpm"] + }, + "application/x-research-info-systems": { + source: "apache", + extensions: ["ris"] + }, + "application/x-sea": { + source: "nginx", + extensions: ["sea"] + }, + "application/x-sh": { + source: "apache", + compressible: true, + extensions: ["sh"] + }, + "application/x-shar": { + source: "apache", + extensions: ["shar"] + }, + "application/x-shockwave-flash": { + source: "apache", + compressible: false, + extensions: ["swf"] + }, + "application/x-silverlight-app": { + source: "apache", + extensions: ["xap"] + }, + "application/x-sql": { + source: "apache", + extensions: ["sql"] + }, + "application/x-stuffit": { + source: "apache", + compressible: false, + extensions: ["sit"] + }, + "application/x-stuffitx": { + source: "apache", + extensions: ["sitx"] + }, + "application/x-subrip": { + source: "apache", + extensions: ["srt"] + }, + "application/x-sv4cpio": { + source: "apache", + extensions: ["sv4cpio"] + }, + "application/x-sv4crc": { + source: "apache", + extensions: ["sv4crc"] + }, + "application/x-t3vm-image": { + source: "apache", + extensions: ["t3"] + }, + "application/x-tads": { + source: "apache", + extensions: ["gam"] + }, + "application/x-tar": { + source: "apache", + compressible: true, + extensions: ["tar"] + }, + "application/x-tcl": { + source: "apache", + extensions: ["tcl", "tk"] + }, + "application/x-tex": { + source: "apache", + extensions: ["tex"] + }, + "application/x-tex-tfm": { + source: "apache", + extensions: ["tfm"] + }, + "application/x-texinfo": { + source: "apache", + extensions: ["texinfo", "texi"] + }, + "application/x-tgif": { + source: "apache", + extensions: ["obj"] + }, + "application/x-ustar": { + source: "apache", + extensions: ["ustar"] + }, + "application/x-virtualbox-hdd": { + compressible: true, + extensions: ["hdd"] + }, + "application/x-virtualbox-ova": { + compressible: true, + extensions: ["ova"] + }, + "application/x-virtualbox-ovf": { + compressible: true, + extensions: ["ovf"] + }, + "application/x-virtualbox-vbox": { + compressible: true, + extensions: ["vbox"] + }, + "application/x-virtualbox-vbox-extpack": { + compressible: false, + extensions: ["vbox-extpack"] + }, + "application/x-virtualbox-vdi": { + compressible: true, + extensions: ["vdi"] + }, + "application/x-virtualbox-vhd": { + compressible: true, + extensions: ["vhd"] + }, + "application/x-virtualbox-vmdk": { + compressible: true, + extensions: ["vmdk"] + }, + "application/x-wais-source": { + source: "apache", + extensions: ["src"] + }, + "application/x-web-app-manifest+json": { + compressible: true, + extensions: ["webapp"] + }, + "application/x-www-form-urlencoded": { + source: "iana", + compressible: true + }, + "application/x-x509-ca-cert": { + source: "iana", + extensions: ["der", "crt", "pem"] + }, + "application/x-x509-ca-ra-cert": { + source: "iana" + }, + "application/x-x509-next-ca-cert": { + source: "iana" + }, + "application/x-xfig": { + source: "apache", + extensions: ["fig"] + }, + "application/x-xliff+xml": { + source: "apache", + compressible: true, + extensions: ["xlf"] + }, + "application/x-xpinstall": { + source: "apache", + compressible: false, + extensions: ["xpi"] + }, + "application/x-xz": { + source: "apache", + extensions: ["xz"] + }, + "application/x-zmachine": { + source: "apache", + extensions: ["z1", "z2", "z3", "z4", "z5", "z6", "z7", "z8"] + }, + "application/x400-bp": { + source: "iana" + }, + "application/xacml+xml": { + source: "iana", + compressible: true + }, + "application/xaml+xml": { + source: "apache", + compressible: true, + extensions: ["xaml"] + }, + "application/xcap-att+xml": { + source: "iana", + compressible: true, + extensions: ["xav"] + }, + "application/xcap-caps+xml": { + source: "iana", + compressible: true, + extensions: ["xca"] + }, + "application/xcap-diff+xml": { + source: "iana", + compressible: true, + extensions: ["xdf"] + }, + "application/xcap-el+xml": { + source: "iana", + compressible: true, + extensions: ["xel"] + }, + "application/xcap-error+xml": { + source: "iana", + compressible: true + }, + "application/xcap-ns+xml": { + source: "iana", + compressible: true, + extensions: ["xns"] + }, + "application/xcon-conference-info+xml": { + source: "iana", + compressible: true + }, + "application/xcon-conference-info-diff+xml": { + source: "iana", + compressible: true + }, + "application/xenc+xml": { + source: "iana", + compressible: true, + extensions: ["xenc"] + }, + "application/xhtml+xml": { + source: "iana", + compressible: true, + extensions: ["xhtml", "xht"] + }, + "application/xhtml-voice+xml": { + source: "apache", + compressible: true + }, + "application/xliff+xml": { + source: "iana", + compressible: true, + extensions: ["xlf"] + }, + "application/xml": { + source: "iana", + compressible: true, + extensions: ["xml", "xsl", "xsd", "rng"] + }, + "application/xml-dtd": { + source: "iana", + compressible: true, + extensions: ["dtd"] + }, + "application/xml-external-parsed-entity": { + source: "iana" + }, + "application/xml-patch+xml": { + source: "iana", + compressible: true + }, + "application/xmpp+xml": { + source: "iana", + compressible: true + }, + "application/xop+xml": { + source: "iana", + compressible: true, + extensions: ["xop"] + }, + "application/xproc+xml": { + source: "apache", + compressible: true, + extensions: ["xpl"] + }, + "application/xslt+xml": { + source: "iana", + compressible: true, + extensions: ["xsl", "xslt"] + }, + "application/xspf+xml": { + source: "apache", + compressible: true, + extensions: ["xspf"] + }, + "application/xv+xml": { + source: "iana", + compressible: true, + extensions: ["mxml", "xhvml", "xvml", "xvm"] + }, + "application/yang": { + source: "iana", + extensions: ["yang"] + }, + "application/yang-data+json": { + source: "iana", + compressible: true + }, + "application/yang-data+xml": { + source: "iana", + compressible: true + }, + "application/yang-patch+json": { + source: "iana", + compressible: true + }, + "application/yang-patch+xml": { + source: "iana", + compressible: true + }, + "application/yin+xml": { + source: "iana", + compressible: true, + extensions: ["yin"] + }, + "application/zip": { + source: "iana", + compressible: false, + extensions: ["zip"] + }, + "application/zlib": { + source: "iana" + }, + "application/zstd": { + source: "iana" + }, + "audio/1d-interleaved-parityfec": { + source: "iana" + }, + "audio/32kadpcm": { + source: "iana" + }, + "audio/3gpp": { + source: "iana", + compressible: false, + extensions: ["3gpp"] + }, + "audio/3gpp2": { + source: "iana" + }, + "audio/aac": { + source: "iana" + }, + "audio/ac3": { + source: "iana" + }, + "audio/adpcm": { + source: "apache", + extensions: ["adp"] + }, + "audio/amr": { + source: "iana", + extensions: ["amr"] + }, + "audio/amr-wb": { + source: "iana" + }, + "audio/amr-wb+": { + source: "iana" + }, + "audio/aptx": { + source: "iana" + }, + "audio/asc": { + source: "iana" + }, + "audio/atrac-advanced-lossless": { + source: "iana" + }, + "audio/atrac-x": { + source: "iana" + }, + "audio/atrac3": { + source: "iana" + }, + "audio/basic": { + source: "iana", + compressible: false, + extensions: ["au", "snd"] + }, + "audio/bv16": { + source: "iana" + }, + "audio/bv32": { + source: "iana" + }, + "audio/clearmode": { + source: "iana" + }, + "audio/cn": { + source: "iana" + }, + "audio/dat12": { + source: "iana" + }, + "audio/dls": { + source: "iana" + }, + "audio/dsr-es201108": { + source: "iana" + }, + "audio/dsr-es202050": { + source: "iana" + }, + "audio/dsr-es202211": { + source: "iana" + }, + "audio/dsr-es202212": { + source: "iana" + }, + "audio/dv": { + source: "iana" + }, + "audio/dvi4": { + source: "iana" + }, + "audio/eac3": { + source: "iana" + }, + "audio/encaprtp": { + source: "iana" + }, + "audio/evrc": { + source: "iana" + }, + "audio/evrc-qcp": { + source: "iana" + }, + "audio/evrc0": { + source: "iana" + }, + "audio/evrc1": { + source: "iana" + }, + "audio/evrcb": { + source: "iana" + }, + "audio/evrcb0": { + source: "iana" + }, + "audio/evrcb1": { + source: "iana" + }, + "audio/evrcnw": { + source: "iana" + }, + "audio/evrcnw0": { + source: "iana" + }, + "audio/evrcnw1": { + source: "iana" + }, + "audio/evrcwb": { + source: "iana" + }, + "audio/evrcwb0": { + source: "iana" + }, + "audio/evrcwb1": { + source: "iana" + }, + "audio/evs": { + source: "iana" + }, + "audio/flexfec": { + source: "iana" + }, + "audio/fwdred": { + source: "iana" + }, + "audio/g711-0": { + source: "iana" + }, + "audio/g719": { + source: "iana" + }, + "audio/g722": { + source: "iana" + }, + "audio/g7221": { + source: "iana" + }, + "audio/g723": { + source: "iana" + }, + "audio/g726-16": { + source: "iana" + }, + "audio/g726-24": { + source: "iana" + }, + "audio/g726-32": { + source: "iana" + }, + "audio/g726-40": { + source: "iana" + }, + "audio/g728": { + source: "iana" + }, + "audio/g729": { + source: "iana" + }, + "audio/g7291": { + source: "iana" + }, + "audio/g729d": { + source: "iana" + }, + "audio/g729e": { + source: "iana" + }, + "audio/gsm": { + source: "iana" + }, + "audio/gsm-efr": { + source: "iana" + }, + "audio/gsm-hr-08": { + source: "iana" + }, + "audio/ilbc": { + source: "iana" + }, + "audio/ip-mr_v2.5": { + source: "iana" + }, + "audio/isac": { + source: "apache" + }, + "audio/l16": { + source: "iana" + }, + "audio/l20": { + source: "iana" + }, + "audio/l24": { + source: "iana", + compressible: false + }, + "audio/l8": { + source: "iana" + }, + "audio/lpc": { + source: "iana" + }, + "audio/melp": { + source: "iana" + }, + "audio/melp1200": { + source: "iana" + }, + "audio/melp2400": { + source: "iana" + }, + "audio/melp600": { + source: "iana" + }, + "audio/mhas": { + source: "iana" + }, + "audio/midi": { + source: "apache", + extensions: ["mid", "midi", "kar", "rmi"] + }, + "audio/mobile-xmf": { + source: "iana", + extensions: ["mxmf"] + }, + "audio/mp3": { + compressible: false, + extensions: ["mp3"] + }, + "audio/mp4": { + source: "iana", + compressible: false, + extensions: ["m4a", "mp4a"] + }, + "audio/mp4a-latm": { + source: "iana" + }, + "audio/mpa": { + source: "iana" + }, + "audio/mpa-robust": { + source: "iana" + }, + "audio/mpeg": { + source: "iana", + compressible: false, + extensions: ["mpga", "mp2", "mp2a", "mp3", "m2a", "m3a"] + }, + "audio/mpeg4-generic": { + source: "iana" + }, + "audio/musepack": { + source: "apache" + }, + "audio/ogg": { + source: "iana", + compressible: false, + extensions: ["oga", "ogg", "spx", "opus"] + }, + "audio/opus": { + source: "iana" + }, + "audio/parityfec": { + source: "iana" + }, + "audio/pcma": { + source: "iana" + }, + "audio/pcma-wb": { + source: "iana" + }, + "audio/pcmu": { + source: "iana" + }, + "audio/pcmu-wb": { + source: "iana" + }, + "audio/prs.sid": { + source: "iana" + }, + "audio/qcelp": { + source: "iana" + }, + "audio/raptorfec": { + source: "iana" + }, + "audio/red": { + source: "iana" + }, + "audio/rtp-enc-aescm128": { + source: "iana" + }, + "audio/rtp-midi": { + source: "iana" + }, + "audio/rtploopback": { + source: "iana" + }, + "audio/rtx": { + source: "iana" + }, + "audio/s3m": { + source: "apache", + extensions: ["s3m"] + }, + "audio/scip": { + source: "iana" + }, + "audio/silk": { + source: "apache", + extensions: ["sil"] + }, + "audio/smv": { + source: "iana" + }, + "audio/smv-qcp": { + source: "iana" + }, + "audio/smv0": { + source: "iana" + }, + "audio/sofa": { + source: "iana" + }, + "audio/sp-midi": { + source: "iana" + }, + "audio/speex": { + source: "iana" + }, + "audio/t140c": { + source: "iana" + }, + "audio/t38": { + source: "iana" + }, + "audio/telephone-event": { + source: "iana" + }, + "audio/tetra_acelp": { + source: "iana" + }, + "audio/tetra_acelp_bb": { + source: "iana" + }, + "audio/tone": { + source: "iana" + }, + "audio/tsvcis": { + source: "iana" + }, + "audio/uemclip": { + source: "iana" + }, + "audio/ulpfec": { + source: "iana" + }, + "audio/usac": { + source: "iana" + }, + "audio/vdvi": { + source: "iana" + }, + "audio/vmr-wb": { + source: "iana" + }, + "audio/vnd.3gpp.iufp": { + source: "iana" + }, + "audio/vnd.4sb": { + source: "iana" + }, + "audio/vnd.audiokoz": { + source: "iana" + }, + "audio/vnd.celp": { + source: "iana" + }, + "audio/vnd.cisco.nse": { + source: "iana" + }, + "audio/vnd.cmles.radio-events": { + source: "iana" + }, + "audio/vnd.cns.anp1": { + source: "iana" + }, + "audio/vnd.cns.inf1": { + source: "iana" + }, + "audio/vnd.dece.audio": { + source: "iana", + extensions: ["uva", "uvva"] + }, + "audio/vnd.digital-winds": { + source: "iana", + extensions: ["eol"] + }, + "audio/vnd.dlna.adts": { + source: "iana" + }, + "audio/vnd.dolby.heaac.1": { + source: "iana" + }, + "audio/vnd.dolby.heaac.2": { + source: "iana" + }, + "audio/vnd.dolby.mlp": { + source: "iana" + }, + "audio/vnd.dolby.mps": { + source: "iana" + }, + "audio/vnd.dolby.pl2": { + source: "iana" + }, + "audio/vnd.dolby.pl2x": { + source: "iana" + }, + "audio/vnd.dolby.pl2z": { + source: "iana" + }, + "audio/vnd.dolby.pulse.1": { + source: "iana" + }, + "audio/vnd.dra": { + source: "iana", + extensions: ["dra"] + }, + "audio/vnd.dts": { + source: "iana", + extensions: ["dts"] + }, + "audio/vnd.dts.hd": { + source: "iana", + extensions: ["dtshd"] + }, + "audio/vnd.dts.uhd": { + source: "iana" + }, + "audio/vnd.dvb.file": { + source: "iana" + }, + "audio/vnd.everad.plj": { + source: "iana" + }, + "audio/vnd.hns.audio": { + source: "iana" + }, + "audio/vnd.lucent.voice": { + source: "iana", + extensions: ["lvp"] + }, + "audio/vnd.ms-playready.media.pya": { + source: "iana", + extensions: ["pya"] + }, + "audio/vnd.nokia.mobile-xmf": { + source: "iana" + }, + "audio/vnd.nortel.vbk": { + source: "iana" + }, + "audio/vnd.nuera.ecelp4800": { + source: "iana", + extensions: ["ecelp4800"] + }, + "audio/vnd.nuera.ecelp7470": { + source: "iana", + extensions: ["ecelp7470"] + }, + "audio/vnd.nuera.ecelp9600": { + source: "iana", + extensions: ["ecelp9600"] + }, + "audio/vnd.octel.sbc": { + source: "iana" + }, + "audio/vnd.presonus.multitrack": { + source: "iana" + }, + "audio/vnd.qcelp": { + source: "iana" + }, + "audio/vnd.rhetorex.32kadpcm": { + source: "iana" + }, + "audio/vnd.rip": { + source: "iana", + extensions: ["rip"] + }, + "audio/vnd.rn-realaudio": { + compressible: false + }, + "audio/vnd.sealedmedia.softseal.mpeg": { + source: "iana" + }, + "audio/vnd.vmx.cvsd": { + source: "iana" + }, + "audio/vnd.wave": { + compressible: false + }, + "audio/vorbis": { + source: "iana", + compressible: false + }, + "audio/vorbis-config": { + source: "iana" + }, + "audio/wav": { + compressible: false, + extensions: ["wav"] + }, + "audio/wave": { + compressible: false, + extensions: ["wav"] + }, + "audio/webm": { + source: "apache", + compressible: false, + extensions: ["weba"] + }, + "audio/x-aac": { + source: "apache", + compressible: false, + extensions: ["aac"] + }, + "audio/x-aiff": { + source: "apache", + extensions: ["aif", "aiff", "aifc"] + }, + "audio/x-caf": { + source: "apache", + compressible: false, + extensions: ["caf"] + }, + "audio/x-flac": { + source: "apache", + extensions: ["flac"] + }, + "audio/x-m4a": { + source: "nginx", + extensions: ["m4a"] + }, + "audio/x-matroska": { + source: "apache", + extensions: ["mka"] + }, + "audio/x-mpegurl": { + source: "apache", + extensions: ["m3u"] + }, + "audio/x-ms-wax": { + source: "apache", + extensions: ["wax"] + }, + "audio/x-ms-wma": { + source: "apache", + extensions: ["wma"] + }, + "audio/x-pn-realaudio": { + source: "apache", + extensions: ["ram", "ra"] + }, + "audio/x-pn-realaudio-plugin": { + source: "apache", + extensions: ["rmp"] + }, + "audio/x-realaudio": { + source: "nginx", + extensions: ["ra"] + }, + "audio/x-tta": { + source: "apache" + }, + "audio/x-wav": { + source: "apache", + extensions: ["wav"] + }, + "audio/xm": { + source: "apache", + extensions: ["xm"] + }, + "chemical/x-cdx": { + source: "apache", + extensions: ["cdx"] + }, + "chemical/x-cif": { + source: "apache", + extensions: ["cif"] + }, + "chemical/x-cmdf": { + source: "apache", + extensions: ["cmdf"] + }, + "chemical/x-cml": { + source: "apache", + extensions: ["cml"] + }, + "chemical/x-csml": { + source: "apache", + extensions: ["csml"] + }, + "chemical/x-pdb": { + source: "apache" + }, + "chemical/x-xyz": { + source: "apache", + extensions: ["xyz"] + }, + "font/collection": { + source: "iana", + extensions: ["ttc"] + }, + "font/otf": { + source: "iana", + compressible: true, + extensions: ["otf"] + }, + "font/sfnt": { + source: "iana" + }, + "font/ttf": { + source: "iana", + compressible: true, + extensions: ["ttf"] + }, + "font/woff": { + source: "iana", + extensions: ["woff"] + }, + "font/woff2": { + source: "iana", + extensions: ["woff2"] + }, + "image/aces": { + source: "iana", + extensions: ["exr"] + }, + "image/apng": { + compressible: false, + extensions: ["apng"] + }, + "image/avci": { + source: "iana", + extensions: ["avci"] + }, + "image/avcs": { + source: "iana", + extensions: ["avcs"] + }, + "image/avif": { + source: "iana", + compressible: false, + extensions: ["avif"] + }, + "image/bmp": { + source: "iana", + compressible: true, + extensions: ["bmp"] + }, + "image/cgm": { + source: "iana", + extensions: ["cgm"] + }, + "image/dicom-rle": { + source: "iana", + extensions: ["drle"] + }, + "image/emf": { + source: "iana", + extensions: ["emf"] + }, + "image/fits": { + source: "iana", + extensions: ["fits"] + }, + "image/g3fax": { + source: "iana", + extensions: ["g3"] + }, + "image/gif": { + source: "iana", + compressible: false, + extensions: ["gif"] + }, + "image/heic": { + source: "iana", + extensions: ["heic"] + }, + "image/heic-sequence": { + source: "iana", + extensions: ["heics"] + }, + "image/heif": { + source: "iana", + extensions: ["heif"] + }, + "image/heif-sequence": { + source: "iana", + extensions: ["heifs"] + }, + "image/hej2k": { + source: "iana", + extensions: ["hej2"] + }, + "image/hsj2": { + source: "iana", + extensions: ["hsj2"] + }, + "image/ief": { + source: "iana", + extensions: ["ief"] + }, + "image/jls": { + source: "iana", + extensions: ["jls"] + }, + "image/jp2": { + source: "iana", + compressible: false, + extensions: ["jp2", "jpg2"] + }, + "image/jpeg": { + source: "iana", + compressible: false, + extensions: ["jpeg", "jpg", "jpe"] + }, + "image/jph": { + source: "iana", + extensions: ["jph"] + }, + "image/jphc": { + source: "iana", + extensions: ["jhc"] + }, + "image/jpm": { + source: "iana", + compressible: false, + extensions: ["jpm"] + }, + "image/jpx": { + source: "iana", + compressible: false, + extensions: ["jpx", "jpf"] + }, + "image/jxr": { + source: "iana", + extensions: ["jxr"] + }, + "image/jxra": { + source: "iana", + extensions: ["jxra"] + }, + "image/jxrs": { + source: "iana", + extensions: ["jxrs"] + }, + "image/jxs": { + source: "iana", + extensions: ["jxs"] + }, + "image/jxsc": { + source: "iana", + extensions: ["jxsc"] + }, + "image/jxsi": { + source: "iana", + extensions: ["jxsi"] + }, + "image/jxss": { + source: "iana", + extensions: ["jxss"] + }, + "image/ktx": { + source: "iana", + extensions: ["ktx"] + }, + "image/ktx2": { + source: "iana", + extensions: ["ktx2"] + }, + "image/naplps": { + source: "iana" + }, + "image/pjpeg": { + compressible: false + }, + "image/png": { + source: "iana", + compressible: false, + extensions: ["png"] + }, + "image/prs.btif": { + source: "iana", + extensions: ["btif"] + }, + "image/prs.pti": { + source: "iana", + extensions: ["pti"] + }, + "image/pwg-raster": { + source: "iana" + }, + "image/sgi": { + source: "apache", + extensions: ["sgi"] + }, + "image/svg+xml": { + source: "iana", + compressible: true, + extensions: ["svg", "svgz"] + }, + "image/t38": { + source: "iana", + extensions: ["t38"] + }, + "image/tiff": { + source: "iana", + compressible: false, + extensions: ["tif", "tiff"] + }, + "image/tiff-fx": { + source: "iana", + extensions: ["tfx"] + }, + "image/vnd.adobe.photoshop": { + source: "iana", + compressible: true, + extensions: ["psd"] + }, + "image/vnd.airzip.accelerator.azv": { + source: "iana", + extensions: ["azv"] + }, + "image/vnd.cns.inf2": { + source: "iana" + }, + "image/vnd.dece.graphic": { + source: "iana", + extensions: ["uvi", "uvvi", "uvg", "uvvg"] + }, + "image/vnd.djvu": { + source: "iana", + extensions: ["djvu", "djv"] + }, + "image/vnd.dvb.subtitle": { + source: "iana", + extensions: ["sub"] + }, + "image/vnd.dwg": { + source: "iana", + extensions: ["dwg"] + }, + "image/vnd.dxf": { + source: "iana", + extensions: ["dxf"] + }, + "image/vnd.fastbidsheet": { + source: "iana", + extensions: ["fbs"] + }, + "image/vnd.fpx": { + source: "iana", + extensions: ["fpx"] + }, + "image/vnd.fst": { + source: "iana", + extensions: ["fst"] + }, + "image/vnd.fujixerox.edmics-mmr": { + source: "iana", + extensions: ["mmr"] + }, + "image/vnd.fujixerox.edmics-rlc": { + source: "iana", + extensions: ["rlc"] + }, + "image/vnd.globalgraphics.pgb": { + source: "iana" + }, + "image/vnd.microsoft.icon": { + source: "iana", + compressible: true, + extensions: ["ico"] + }, + "image/vnd.mix": { + source: "iana" + }, + "image/vnd.mozilla.apng": { + source: "iana" + }, + "image/vnd.ms-dds": { + compressible: true, + extensions: ["dds"] + }, + "image/vnd.ms-modi": { + source: "iana", + extensions: ["mdi"] + }, + "image/vnd.ms-photo": { + source: "apache", + extensions: ["wdp"] + }, + "image/vnd.net-fpx": { + source: "iana", + extensions: ["npx"] + }, + "image/vnd.pco.b16": { + source: "iana", + extensions: ["b16"] + }, + "image/vnd.radiance": { + source: "iana" + }, + "image/vnd.sealed.png": { + source: "iana" + }, + "image/vnd.sealedmedia.softseal.gif": { + source: "iana" + }, + "image/vnd.sealedmedia.softseal.jpg": { + source: "iana" + }, + "image/vnd.svf": { + source: "iana" + }, + "image/vnd.tencent.tap": { + source: "iana", + extensions: ["tap"] + }, + "image/vnd.valve.source.texture": { + source: "iana", + extensions: ["vtf"] + }, + "image/vnd.wap.wbmp": { + source: "iana", + extensions: ["wbmp"] + }, + "image/vnd.xiff": { + source: "iana", + extensions: ["xif"] + }, + "image/vnd.zbrush.pcx": { + source: "iana", + extensions: ["pcx"] + }, + "image/webp": { + source: "apache", + extensions: ["webp"] + }, + "image/wmf": { + source: "iana", + extensions: ["wmf"] + }, + "image/x-3ds": { + source: "apache", + extensions: ["3ds"] + }, + "image/x-cmu-raster": { + source: "apache", + extensions: ["ras"] + }, + "image/x-cmx": { + source: "apache", + extensions: ["cmx"] + }, + "image/x-freehand": { + source: "apache", + extensions: ["fh", "fhc", "fh4", "fh5", "fh7"] + }, + "image/x-icon": { + source: "apache", + compressible: true, + extensions: ["ico"] + }, + "image/x-jng": { + source: "nginx", + extensions: ["jng"] + }, + "image/x-mrsid-image": { + source: "apache", + extensions: ["sid"] + }, + "image/x-ms-bmp": { + source: "nginx", + compressible: true, + extensions: ["bmp"] + }, + "image/x-pcx": { + source: "apache", + extensions: ["pcx"] + }, + "image/x-pict": { + source: "apache", + extensions: ["pic", "pct"] + }, + "image/x-portable-anymap": { + source: "apache", + extensions: ["pnm"] + }, + "image/x-portable-bitmap": { + source: "apache", + extensions: ["pbm"] + }, + "image/x-portable-graymap": { + source: "apache", + extensions: ["pgm"] + }, + "image/x-portable-pixmap": { + source: "apache", + extensions: ["ppm"] + }, + "image/x-rgb": { + source: "apache", + extensions: ["rgb"] + }, + "image/x-tga": { + source: "apache", + extensions: ["tga"] + }, + "image/x-xbitmap": { + source: "apache", + extensions: ["xbm"] + }, + "image/x-xcf": { + compressible: false + }, + "image/x-xpixmap": { + source: "apache", + extensions: ["xpm"] + }, + "image/x-xwindowdump": { + source: "apache", + extensions: ["xwd"] + }, + "message/cpim": { + source: "iana" + }, + "message/delivery-status": { + source: "iana" + }, + "message/disposition-notification": { + source: "iana", + extensions: [ + "disposition-notification" + ] + }, + "message/external-body": { + source: "iana" + }, + "message/feedback-report": { + source: "iana" + }, + "message/global": { + source: "iana", + extensions: ["u8msg"] + }, + "message/global-delivery-status": { + source: "iana", + extensions: ["u8dsn"] + }, + "message/global-disposition-notification": { + source: "iana", + extensions: ["u8mdn"] + }, + "message/global-headers": { + source: "iana", + extensions: ["u8hdr"] + }, + "message/http": { + source: "iana", + compressible: false + }, + "message/imdn+xml": { + source: "iana", + compressible: true + }, + "message/news": { + source: "iana" + }, + "message/partial": { + source: "iana", + compressible: false + }, + "message/rfc822": { + source: "iana", + compressible: true, + extensions: ["eml", "mime"] + }, + "message/s-http": { + source: "iana" + }, + "message/sip": { + source: "iana" + }, + "message/sipfrag": { + source: "iana" + }, + "message/tracking-status": { + source: "iana" + }, + "message/vnd.si.simp": { + source: "iana" + }, + "message/vnd.wfa.wsc": { + source: "iana", + extensions: ["wsc"] + }, + "model/3mf": { + source: "iana", + extensions: ["3mf"] + }, + "model/e57": { + source: "iana" + }, + "model/gltf+json": { + source: "iana", + compressible: true, + extensions: ["gltf"] + }, + "model/gltf-binary": { + source: "iana", + compressible: true, + extensions: ["glb"] + }, + "model/iges": { + source: "iana", + compressible: false, + extensions: ["igs", "iges"] + }, + "model/mesh": { + source: "iana", + compressible: false, + extensions: ["msh", "mesh", "silo"] + }, + "model/mtl": { + source: "iana", + extensions: ["mtl"] + }, + "model/obj": { + source: "iana", + extensions: ["obj"] + }, + "model/step": { + source: "iana" + }, + "model/step+xml": { + source: "iana", + compressible: true, + extensions: ["stpx"] + }, + "model/step+zip": { + source: "iana", + compressible: false, + extensions: ["stpz"] + }, + "model/step-xml+zip": { + source: "iana", + compressible: false, + extensions: ["stpxz"] + }, + "model/stl": { + source: "iana", + extensions: ["stl"] + }, + "model/vnd.collada+xml": { + source: "iana", + compressible: true, + extensions: ["dae"] + }, + "model/vnd.dwf": { + source: "iana", + extensions: ["dwf"] + }, + "model/vnd.flatland.3dml": { + source: "iana" + }, + "model/vnd.gdl": { + source: "iana", + extensions: ["gdl"] + }, + "model/vnd.gs-gdl": { + source: "apache" + }, + "model/vnd.gs.gdl": { + source: "iana" + }, + "model/vnd.gtw": { + source: "iana", + extensions: ["gtw"] + }, + "model/vnd.moml+xml": { + source: "iana", + compressible: true + }, + "model/vnd.mts": { + source: "iana", + extensions: ["mts"] + }, + "model/vnd.opengex": { + source: "iana", + extensions: ["ogex"] + }, + "model/vnd.parasolid.transmit.binary": { + source: "iana", + extensions: ["x_b"] + }, + "model/vnd.parasolid.transmit.text": { + source: "iana", + extensions: ["x_t"] + }, + "model/vnd.pytha.pyox": { + source: "iana" + }, + "model/vnd.rosette.annotated-data-model": { + source: "iana" + }, + "model/vnd.sap.vds": { + source: "iana", + extensions: ["vds"] + }, + "model/vnd.usdz+zip": { + source: "iana", + compressible: false, + extensions: ["usdz"] + }, + "model/vnd.valve.source.compiled-map": { + source: "iana", + extensions: ["bsp"] + }, + "model/vnd.vtu": { + source: "iana", + extensions: ["vtu"] + }, + "model/vrml": { + source: "iana", + compressible: false, + extensions: ["wrl", "vrml"] + }, + "model/x3d+binary": { + source: "apache", + compressible: false, + extensions: ["x3db", "x3dbz"] + }, + "model/x3d+fastinfoset": { + source: "iana", + extensions: ["x3db"] + }, + "model/x3d+vrml": { + source: "apache", + compressible: false, + extensions: ["x3dv", "x3dvz"] + }, + "model/x3d+xml": { + source: "iana", + compressible: true, + extensions: ["x3d", "x3dz"] + }, + "model/x3d-vrml": { + source: "iana", + extensions: ["x3dv"] + }, + "multipart/alternative": { + source: "iana", + compressible: false + }, + "multipart/appledouble": { + source: "iana" + }, + "multipart/byteranges": { + source: "iana" + }, + "multipart/digest": { + source: "iana" + }, + "multipart/encrypted": { + source: "iana", + compressible: false + }, + "multipart/form-data": { + source: "iana", + compressible: false + }, + "multipart/header-set": { + source: "iana" + }, + "multipart/mixed": { + source: "iana" + }, + "multipart/multilingual": { + source: "iana" + }, + "multipart/parallel": { + source: "iana" + }, + "multipart/related": { + source: "iana", + compressible: false + }, + "multipart/report": { + source: "iana" + }, + "multipart/signed": { + source: "iana", + compressible: false + }, + "multipart/vnd.bint.med-plus": { + source: "iana" + }, + "multipart/voice-message": { + source: "iana" + }, + "multipart/x-mixed-replace": { + source: "iana" + }, + "text/1d-interleaved-parityfec": { + source: "iana" + }, + "text/cache-manifest": { + source: "iana", + compressible: true, + extensions: ["appcache", "manifest"] + }, + "text/calendar": { + source: "iana", + extensions: ["ics", "ifb"] + }, + "text/calender": { + compressible: true + }, + "text/cmd": { + compressible: true + }, + "text/coffeescript": { + extensions: ["coffee", "litcoffee"] + }, + "text/cql": { + source: "iana" + }, + "text/cql-expression": { + source: "iana" + }, + "text/cql-identifier": { + source: "iana" + }, + "text/css": { + source: "iana", + charset: "UTF-8", + compressible: true, + extensions: ["css"] + }, + "text/csv": { + source: "iana", + compressible: true, + extensions: ["csv"] + }, + "text/csv-schema": { + source: "iana" + }, + "text/directory": { + source: "iana" + }, + "text/dns": { + source: "iana" + }, + "text/ecmascript": { + source: "iana" + }, + "text/encaprtp": { + source: "iana" + }, + "text/enriched": { + source: "iana" + }, + "text/fhirpath": { + source: "iana" + }, + "text/flexfec": { + source: "iana" + }, + "text/fwdred": { + source: "iana" + }, + "text/gff3": { + source: "iana" + }, + "text/grammar-ref-list": { + source: "iana" + }, + "text/html": { + source: "iana", + compressible: true, + extensions: ["html", "htm", "shtml"] + }, + "text/jade": { + extensions: ["jade"] + }, + "text/javascript": { + source: "iana", + compressible: true + }, + "text/jcr-cnd": { + source: "iana" + }, + "text/jsx": { + compressible: true, + extensions: ["jsx"] + }, + "text/less": { + compressible: true, + extensions: ["less"] + }, + "text/markdown": { + source: "iana", + compressible: true, + extensions: ["markdown", "md"] + }, + "text/mathml": { + source: "nginx", + extensions: ["mml"] + }, + "text/mdx": { + compressible: true, + extensions: ["mdx"] + }, + "text/mizar": { + source: "iana" + }, + "text/n3": { + source: "iana", + charset: "UTF-8", + compressible: true, + extensions: ["n3"] + }, + "text/parameters": { + source: "iana", + charset: "UTF-8" + }, + "text/parityfec": { + source: "iana" + }, + "text/plain": { + source: "iana", + compressible: true, + extensions: ["txt", "text", "conf", "def", "list", "log", "in", "ini"] + }, + "text/provenance-notation": { + source: "iana", + charset: "UTF-8" + }, + "text/prs.fallenstein.rst": { + source: "iana" + }, + "text/prs.lines.tag": { + source: "iana", + extensions: ["dsc"] + }, + "text/prs.prop.logic": { + source: "iana" + }, + "text/raptorfec": { + source: "iana" + }, + "text/red": { + source: "iana" + }, + "text/rfc822-headers": { + source: "iana" + }, + "text/richtext": { + source: "iana", + compressible: true, + extensions: ["rtx"] + }, + "text/rtf": { + source: "iana", + compressible: true, + extensions: ["rtf"] + }, + "text/rtp-enc-aescm128": { + source: "iana" + }, + "text/rtploopback": { + source: "iana" + }, + "text/rtx": { + source: "iana" + }, + "text/sgml": { + source: "iana", + extensions: ["sgml", "sgm"] + }, + "text/shaclc": { + source: "iana" + }, + "text/shex": { + source: "iana", + extensions: ["shex"] + }, + "text/slim": { + extensions: ["slim", "slm"] + }, + "text/spdx": { + source: "iana", + extensions: ["spdx"] + }, + "text/strings": { + source: "iana" + }, + "text/stylus": { + extensions: ["stylus", "styl"] + }, + "text/t140": { + source: "iana" + }, + "text/tab-separated-values": { + source: "iana", + compressible: true, + extensions: ["tsv"] + }, + "text/troff": { + source: "iana", + extensions: ["t", "tr", "roff", "man", "me", "ms"] + }, + "text/turtle": { + source: "iana", + charset: "UTF-8", + extensions: ["ttl"] + }, + "text/ulpfec": { + source: "iana" + }, + "text/uri-list": { + source: "iana", + compressible: true, + extensions: ["uri", "uris", "urls"] + }, + "text/vcard": { + source: "iana", + compressible: true, + extensions: ["vcard"] + }, + "text/vnd.a": { + source: "iana" + }, + "text/vnd.abc": { + source: "iana" + }, + "text/vnd.ascii-art": { + source: "iana" + }, + "text/vnd.curl": { + source: "iana", + extensions: ["curl"] + }, + "text/vnd.curl.dcurl": { + source: "apache", + extensions: ["dcurl"] + }, + "text/vnd.curl.mcurl": { + source: "apache", + extensions: ["mcurl"] + }, + "text/vnd.curl.scurl": { + source: "apache", + extensions: ["scurl"] + }, + "text/vnd.debian.copyright": { + source: "iana", + charset: "UTF-8" + }, + "text/vnd.dmclientscript": { + source: "iana" + }, + "text/vnd.dvb.subtitle": { + source: "iana", + extensions: ["sub"] + }, + "text/vnd.esmertec.theme-descriptor": { + source: "iana", + charset: "UTF-8" + }, + "text/vnd.familysearch.gedcom": { + source: "iana", + extensions: ["ged"] + }, + "text/vnd.ficlab.flt": { + source: "iana" + }, + "text/vnd.fly": { + source: "iana", + extensions: ["fly"] + }, + "text/vnd.fmi.flexstor": { + source: "iana", + extensions: ["flx"] + }, + "text/vnd.gml": { + source: "iana" + }, + "text/vnd.graphviz": { + source: "iana", + extensions: ["gv"] + }, + "text/vnd.hans": { + source: "iana" + }, + "text/vnd.hgl": { + source: "iana" + }, + "text/vnd.in3d.3dml": { + source: "iana", + extensions: ["3dml"] + }, + "text/vnd.in3d.spot": { + source: "iana", + extensions: ["spot"] + }, + "text/vnd.iptc.newsml": { + source: "iana" + }, + "text/vnd.iptc.nitf": { + source: "iana" + }, + "text/vnd.latex-z": { + source: "iana" + }, + "text/vnd.motorola.reflex": { + source: "iana" + }, + "text/vnd.ms-mediapackage": { + source: "iana" + }, + "text/vnd.net2phone.commcenter.command": { + source: "iana" + }, + "text/vnd.radisys.msml-basic-layout": { + source: "iana" + }, + "text/vnd.senx.warpscript": { + source: "iana" + }, + "text/vnd.si.uricatalogue": { + source: "iana" + }, + "text/vnd.sosi": { + source: "iana" + }, + "text/vnd.sun.j2me.app-descriptor": { + source: "iana", + charset: "UTF-8", + extensions: ["jad"] + }, + "text/vnd.trolltech.linguist": { + source: "iana", + charset: "UTF-8" + }, + "text/vnd.wap.si": { + source: "iana" + }, + "text/vnd.wap.sl": { + source: "iana" + }, + "text/vnd.wap.wml": { + source: "iana", + extensions: ["wml"] + }, + "text/vnd.wap.wmlscript": { + source: "iana", + extensions: ["wmls"] + }, + "text/vtt": { + source: "iana", + charset: "UTF-8", + compressible: true, + extensions: ["vtt"] + }, + "text/x-asm": { + source: "apache", + extensions: ["s", "asm"] + }, + "text/x-c": { + source: "apache", + extensions: ["c", "cc", "cxx", "cpp", "h", "hh", "dic"] + }, + "text/x-component": { + source: "nginx", + extensions: ["htc"] + }, + "text/x-fortran": { + source: "apache", + extensions: ["f", "for", "f77", "f90"] + }, + "text/x-gwt-rpc": { + compressible: true + }, + "text/x-handlebars-template": { + extensions: ["hbs"] + }, + "text/x-java-source": { + source: "apache", + extensions: ["java"] + }, + "text/x-jquery-tmpl": { + compressible: true + }, + "text/x-lua": { + extensions: ["lua"] + }, + "text/x-markdown": { + compressible: true, + extensions: ["mkd"] + }, + "text/x-nfo": { + source: "apache", + extensions: ["nfo"] + }, + "text/x-opml": { + source: "apache", + extensions: ["opml"] + }, + "text/x-org": { + compressible: true, + extensions: ["org"] + }, + "text/x-pascal": { + source: "apache", + extensions: ["p", "pas"] + }, + "text/x-processing": { + compressible: true, + extensions: ["pde"] + }, + "text/x-sass": { + extensions: ["sass"] + }, + "text/x-scss": { + extensions: ["scss"] + }, + "text/x-setext": { + source: "apache", + extensions: ["etx"] + }, + "text/x-sfv": { + source: "apache", + extensions: ["sfv"] + }, + "text/x-suse-ymp": { + compressible: true, + extensions: ["ymp"] + }, + "text/x-uuencode": { + source: "apache", + extensions: ["uu"] + }, + "text/x-vcalendar": { + source: "apache", + extensions: ["vcs"] + }, + "text/x-vcard": { + source: "apache", + extensions: ["vcf"] + }, + "text/xml": { + source: "iana", + compressible: true, + extensions: ["xml"] + }, + "text/xml-external-parsed-entity": { + source: "iana" + }, + "text/yaml": { + compressible: true, + extensions: ["yaml", "yml"] + }, + "video/1d-interleaved-parityfec": { + source: "iana" + }, + "video/3gpp": { + source: "iana", + extensions: ["3gp", "3gpp"] + }, + "video/3gpp-tt": { + source: "iana" + }, + "video/3gpp2": { + source: "iana", + extensions: ["3g2"] + }, + "video/av1": { + source: "iana" + }, + "video/bmpeg": { + source: "iana" + }, + "video/bt656": { + source: "iana" + }, + "video/celb": { + source: "iana" + }, + "video/dv": { + source: "iana" + }, + "video/encaprtp": { + source: "iana" + }, + "video/ffv1": { + source: "iana" + }, + "video/flexfec": { + source: "iana" + }, + "video/h261": { + source: "iana", + extensions: ["h261"] + }, + "video/h263": { + source: "iana", + extensions: ["h263"] + }, + "video/h263-1998": { + source: "iana" + }, + "video/h263-2000": { + source: "iana" + }, + "video/h264": { + source: "iana", + extensions: ["h264"] + }, + "video/h264-rcdo": { + source: "iana" + }, + "video/h264-svc": { + source: "iana" + }, + "video/h265": { + source: "iana" + }, + "video/iso.segment": { + source: "iana", + extensions: ["m4s"] + }, + "video/jpeg": { + source: "iana", + extensions: ["jpgv"] + }, + "video/jpeg2000": { + source: "iana" + }, + "video/jpm": { + source: "apache", + extensions: ["jpm", "jpgm"] + }, + "video/jxsv": { + source: "iana" + }, + "video/mj2": { + source: "iana", + extensions: ["mj2", "mjp2"] + }, + "video/mp1s": { + source: "iana" + }, + "video/mp2p": { + source: "iana" + }, + "video/mp2t": { + source: "iana", + extensions: ["ts"] + }, + "video/mp4": { + source: "iana", + compressible: false, + extensions: ["mp4", "mp4v", "mpg4"] + }, + "video/mp4v-es": { + source: "iana" + }, + "video/mpeg": { + source: "iana", + compressible: false, + extensions: ["mpeg", "mpg", "mpe", "m1v", "m2v"] + }, + "video/mpeg4-generic": { + source: "iana" + }, + "video/mpv": { + source: "iana" + }, + "video/nv": { + source: "iana" + }, + "video/ogg": { + source: "iana", + compressible: false, + extensions: ["ogv"] + }, + "video/parityfec": { + source: "iana" + }, + "video/pointer": { + source: "iana" + }, + "video/quicktime": { + source: "iana", + compressible: false, + extensions: ["qt", "mov"] + }, + "video/raptorfec": { + source: "iana" + }, + "video/raw": { + source: "iana" + }, + "video/rtp-enc-aescm128": { + source: "iana" + }, + "video/rtploopback": { + source: "iana" + }, + "video/rtx": { + source: "iana" + }, + "video/scip": { + source: "iana" + }, + "video/smpte291": { + source: "iana" + }, + "video/smpte292m": { + source: "iana" + }, + "video/ulpfec": { + source: "iana" + }, + "video/vc1": { + source: "iana" + }, + "video/vc2": { + source: "iana" + }, + "video/vnd.cctv": { + source: "iana" + }, + "video/vnd.dece.hd": { + source: "iana", + extensions: ["uvh", "uvvh"] + }, + "video/vnd.dece.mobile": { + source: "iana", + extensions: ["uvm", "uvvm"] + }, + "video/vnd.dece.mp4": { + source: "iana" + }, + "video/vnd.dece.pd": { + source: "iana", + extensions: ["uvp", "uvvp"] + }, + "video/vnd.dece.sd": { + source: "iana", + extensions: ["uvs", "uvvs"] + }, + "video/vnd.dece.video": { + source: "iana", + extensions: ["uvv", "uvvv"] + }, + "video/vnd.directv.mpeg": { + source: "iana" + }, + "video/vnd.directv.mpeg-tts": { + source: "iana" + }, + "video/vnd.dlna.mpeg-tts": { + source: "iana" + }, + "video/vnd.dvb.file": { + source: "iana", + extensions: ["dvb"] + }, + "video/vnd.fvt": { + source: "iana", + extensions: ["fvt"] + }, + "video/vnd.hns.video": { + source: "iana" + }, + "video/vnd.iptvforum.1dparityfec-1010": { + source: "iana" + }, + "video/vnd.iptvforum.1dparityfec-2005": { + source: "iana" + }, + "video/vnd.iptvforum.2dparityfec-1010": { + source: "iana" + }, + "video/vnd.iptvforum.2dparityfec-2005": { + source: "iana" + }, + "video/vnd.iptvforum.ttsavc": { + source: "iana" + }, + "video/vnd.iptvforum.ttsmpeg2": { + source: "iana" + }, + "video/vnd.motorola.video": { + source: "iana" + }, + "video/vnd.motorola.videop": { + source: "iana" + }, + "video/vnd.mpegurl": { + source: "iana", + extensions: ["mxu", "m4u"] + }, + "video/vnd.ms-playready.media.pyv": { + source: "iana", + extensions: ["pyv"] + }, + "video/vnd.nokia.interleaved-multimedia": { + source: "iana" + }, + "video/vnd.nokia.mp4vr": { + source: "iana" + }, + "video/vnd.nokia.videovoip": { + source: "iana" + }, + "video/vnd.objectvideo": { + source: "iana" + }, + "video/vnd.radgamettools.bink": { + source: "iana" + }, + "video/vnd.radgamettools.smacker": { + source: "iana" + }, + "video/vnd.sealed.mpeg1": { + source: "iana" + }, + "video/vnd.sealed.mpeg4": { + source: "iana" + }, + "video/vnd.sealed.swf": { + source: "iana" + }, + "video/vnd.sealedmedia.softseal.mov": { + source: "iana" + }, + "video/vnd.uvvu.mp4": { + source: "iana", + extensions: ["uvu", "uvvu"] + }, + "video/vnd.vivo": { + source: "iana", + extensions: ["viv"] + }, + "video/vnd.youtube.yt": { + source: "iana" + }, + "video/vp8": { + source: "iana" + }, + "video/vp9": { + source: "iana" + }, + "video/webm": { + source: "apache", + compressible: false, + extensions: ["webm"] + }, + "video/x-f4v": { + source: "apache", + extensions: ["f4v"] + }, + "video/x-fli": { + source: "apache", + extensions: ["fli"] + }, + "video/x-flv": { + source: "apache", + compressible: false, + extensions: ["flv"] + }, + "video/x-m4v": { + source: "apache", + extensions: ["m4v"] + }, + "video/x-matroska": { + source: "apache", + compressible: false, + extensions: ["mkv", "mk3d", "mks"] + }, + "video/x-mng": { + source: "apache", + extensions: ["mng"] + }, + "video/x-ms-asf": { + source: "apache", + extensions: ["asf", "asx"] + }, + "video/x-ms-vob": { + source: "apache", + extensions: ["vob"] + }, + "video/x-ms-wm": { + source: "apache", + extensions: ["wm"] + }, + "video/x-ms-wmv": { + source: "apache", + compressible: false, + extensions: ["wmv"] + }, + "video/x-ms-wmx": { + source: "apache", + extensions: ["wmx"] + }, + "video/x-ms-wvx": { + source: "apache", + extensions: ["wvx"] + }, + "video/x-msvideo": { + source: "apache", + extensions: ["avi"] + }, + "video/x-sgi-movie": { + source: "apache", + extensions: ["movie"] + }, + "video/x-smv": { + source: "apache", + extensions: ["smv"] + }, + "x-conference/x-cooltalk": { + source: "apache", + extensions: ["ice"] + }, + "x-shader/x-fragment": { + compressible: true + }, + "x-shader/x-vertex": { + compressible: true + } + }; + } +}); + +// ../../node_modules/mime-db/index.js +var require_mime_db = __commonJS({ + "../../node_modules/mime-db/index.js"(exports2, module2) { + module2.exports = require_db2(); + } +}); + +// ../../node_modules/mime-types/index.js +var require_mime_types = __commonJS({ + "../../node_modules/mime-types/index.js"(exports2) { + "use strict"; + var db = require_mime_db(); + var extname = require("path").extname; + var EXTRACT_TYPE_REGEXP = /^\s*([^;\s]*)(?:;|\s|$)/; + var TEXT_TYPE_REGEXP = /^text\//i; + exports2.charset = charset; + exports2.charsets = { lookup: charset }; + exports2.contentType = contentType; + exports2.extension = extension; + exports2.extensions = /* @__PURE__ */ Object.create(null); + exports2.lookup = lookup; + exports2.types = /* @__PURE__ */ Object.create(null); + populateMaps(exports2.extensions, exports2.types); + function charset(type) { + if (!type || typeof type !== "string") { + return false; + } + var match = EXTRACT_TYPE_REGEXP.exec(type); + var mime = match && db[match[1].toLowerCase()]; + if (mime && mime.charset) { + return mime.charset; + } + if (match && TEXT_TYPE_REGEXP.test(match[1])) { + return "UTF-8"; + } + return false; + } + function contentType(str) { + if (!str || typeof str !== "string") { + return false; + } + var mime = str.indexOf("/") === -1 ? exports2.lookup(str) : str; + if (!mime) { + return false; + } + if (mime.indexOf("charset") === -1) { + var charset2 = exports2.charset(mime); + if (charset2) mime += "; charset=" + charset2.toLowerCase(); + } + return mime; + } + function extension(type) { + if (!type || typeof type !== "string") { + return false; + } + var match = EXTRACT_TYPE_REGEXP.exec(type); + var exts = match && exports2.extensions[match[1].toLowerCase()]; + if (!exts || !exts.length) { + return false; + } + return exts[0]; + } + function lookup(path) { + if (!path || typeof path !== "string") { + return false; + } + var extension2 = extname("x." + path).toLowerCase().substr(1); + if (!extension2) { + return false; + } + return exports2.types[extension2] || false; + } + function populateMaps(extensions, types) { + var preference = ["nginx", "apache", void 0, "iana"]; + Object.keys(db).forEach(function forEachMimeType(type) { + var mime = db[type]; + var exts = mime.extensions; + if (!exts || !exts.length) { + return; + } + extensions[type] = exts; + for (var i = 0; i < exts.length; i++) { + var extension2 = exts[i]; + if (types[extension2]) { + var from = preference.indexOf(db[types[extension2]].source); + var to = preference.indexOf(mime.source); + if (types[extension2] !== "application/octet-stream" && (from > to || from === to && types[extension2].substr(0, 12) === "application/")) { + continue; + } + } + types[extension2] = type; + } + }); + } + } +}); + +// ../../node_modules/mime-format/db.json +var require_db3 = __commonJS({ + "../../node_modules/mime-format/db.json"(exports2, module2) { + module2.exports = { + "application/x-www-form-urlencoded": { + type: "text", + format: "plain" + }, + "application/pdf": { + type: "embed", + format: "pdf" + }, + "application/ecmascript": { + type: "text", + format: "script" + }, + "application/javascript": { + type: "text", + format: "script" + }, + "application/json": { + type: "text", + format: "json" + }, + "application/json5": { + type: "text", + format: "json" + }, + "application/jwt": { + type: "text", + format: "jwt" + }, + "application/xml": { + type: "text", + format: "xml" + }, + "application/xml-dtd": { + type: "text", + format: "xml" + }, + "application/xml+dtd": { + type: "text", + format: "xml" + }, + "application/xml-external-parsed-entity": { + type: "text", + format: "xml" + }, + "application/xml-patch+xml": { + type: "text", + format: "xml" + }, + "application/3gpdash-qoe-report+xml": { + type: "text", + format: "xml" + }, + "application/3gpp-ims+xml": { + type: "text", + format: "xml" + }, + "application/atom+xml": { + type: "text", + format: "xml" + }, + "application/atomcat+xml": { + type: "text", + format: "xml" + }, + "application/atomdeleted+xml": { + type: "text", + format: "xml" + }, + "application/atomsvc+xml": { + type: "text", + format: "xml" + }, + "application/auth-policy+xml": { + type: "text", + format: "xml" + }, + "application/beep+xml": { + type: "text", + format: "xml" + }, + "application/calendar+xml": { + type: "text", + format: "xml" + }, + "application/ccmp+xml": { + type: "text", + format: "xml" + }, + "application/ccxml+xml": { + type: "text", + format: "xml" + }, + "application/cdfx+xml": { + type: "text", + format: "xml" + }, + "application/cea-2018+xml": { + type: "text", + format: "xml" + }, + "application/cellml+xml": { + type: "text", + format: "xml" + }, + "application/cnrp+xml": { + type: "text", + format: "xml" + }, + "application/conference-info+xml": { + type: "text", + format: "xml" + }, + "application/cpl+xml": { + type: "text", + format: "xml" + }, + "application/csta+xml": { + type: "text", + format: "xml" + }, + "application/cstadata+xml": { + type: "text", + format: "xml" + }, + "application/dash+xml": { + type: "text", + format: "xml" + }, + "application/davmount+xml": { + type: "text", + format: "xml" + }, + "application/dialog-info+xml": { + type: "text", + format: "xml" + }, + "application/docbook+xml": { + type: "text", + format: "xml" + }, + "application/dskpp+xml": { + type: "text", + format: "xml" + }, + "application/dssc+xml": { + type: "text", + format: "xml" + }, + "application/emergencycalldata.comment+xml": { + type: "text", + format: "xml" + }, + "application/emergencycalldata.deviceinfo+xml": { + type: "text", + format: "xml" + }, + "application/emergencycalldata.providerinfo+xml": { + type: "text", + format: "xml" + }, + "application/emergencycalldata.serviceinfo+xml": { + type: "text", + format: "xml" + }, + "application/emergencycalldata.subscriberinfo+xml": { + type: "text", + format: "xml" + }, + "application/emma+xml": { + type: "text", + format: "xml" + }, + "application/emotionml+xml": { + type: "text", + format: "xml" + }, + "application/epp+xml": { + type: "text", + format: "xml" + }, + "application/fdt+xml": { + type: "text", + format: "xml" + }, + "application/framework-attributes+xml": { + type: "text", + format: "xml" + }, + "application/gml+xml": { + type: "text", + format: "xml" + }, + "application/gpx+xml": { + type: "text", + format: "xml" + }, + "application/held+xml": { + type: "text", + format: "xml" + }, + "application/ibe-key-request+xml": { + type: "text", + format: "xml" + }, + "application/ibe-pkg-reply+xml": { + type: "text", + format: "xml" + }, + "application/im-iscomposing+xml": { + type: "text", + format: "xml" + }, + "application/inkml+xml": { + type: "text", + format: "xml" + }, + "application/its+xml": { + type: "text", + format: "xml" + }, + "application/kpml-request+xml": { + type: "text", + format: "xml" + }, + "application/kpml-response+xml": { + type: "text", + format: "xml" + }, + "application/load-control+xml": { + type: "text", + format: "xml" + }, + "application/lost+xml": { + type: "text", + format: "xml" + }, + "application/lostsync+xml": { + type: "text", + format: "xml" + }, + "application/mads+xml": { + type: "text", + format: "xml" + }, + "application/marcxml+xml": { + type: "text", + format: "xml" + }, + "application/mathml+xml": { + type: "text", + format: "xml" + }, + "application/mathml-content+xml": { + type: "text", + format: "xml" + }, + "application/mathml-presentation+xml": { + type: "text", + format: "xml" + }, + "application/mbms-associated-procedure-description+xml": { + type: "text", + format: "xml" + }, + "application/mbms-deregister+xml": { + type: "text", + format: "xml" + }, + "application/mbms-envelope+xml": { + type: "text", + format: "xml" + }, + "application/mbms-msk+xml": { + type: "text", + format: "xml" + }, + "application/mbms-msk-response+xml": { + type: "text", + format: "xml" + }, + "application/mbms-protection-description+xml": { + type: "text", + format: "xml" + }, + "application/mbms-reception-report+xml": { + type: "text", + format: "xml" + }, + "application/mbms-register+xml": { + type: "text", + format: "xml" + }, + "application/mbms-register-response+xml": { + type: "text", + format: "xml" + }, + "application/mbms-schedule+xml": { + type: "text", + format: "xml" + }, + "application/mbms-user-service-description+xml": { + type: "text", + format: "xml" + }, + "application/media-policy-dataset+xml": { + type: "text", + format: "xml" + }, + "application/media_control+xml": { + type: "text", + format: "xml" + }, + "application/mediaservercontrol+xml": { + type: "text", + format: "xml" + }, + "application/metalink+xml": { + type: "text", + format: "xml" + }, + "application/metalink4+xml": { + type: "text", + format: "xml" + }, + "application/mets+xml": { + type: "text", + format: "xml" + }, + "application/mods+xml": { + type: "text", + format: "xml" + }, + "application/mrb-consumer+xml": { + type: "text", + format: "xml" + }, + "application/mrb-publish+xml": { + type: "text", + format: "xml" + }, + "application/msc-ivr+xml": { + type: "text", + format: "xml" + }, + "application/msc-mixer+xml": { + type: "text", + format: "xml" + }, + "application/nlsml+xml": { + type: "text", + format: "xml" + }, + "application/oebps-package+xml": { + type: "text", + format: "xml" + }, + "application/omdoc+xml": { + type: "text", + format: "xml" + }, + "application/p2p-overlay+xml": { + type: "text", + format: "xml" + }, + "application/patch-ops-error+xml": { + type: "text", + format: "xml" + }, + "application/pidf+xml": { + type: "text", + format: "xml" + }, + "application/pidf-diff+xml": { + type: "text", + format: "xml" + }, + "application/pls+xml": { + type: "text", + format: "xml" + }, + "application/poc-settings+xml": { + type: "text", + format: "xml" + }, + "application/problem+xml": { + type: "text", + format: "xml" + }, + "application/provenance+xml": { + type: "text", + format: "xml" + }, + "application/prs.xsf+xml": { + type: "text", + format: "xml" + }, + "application/pskc+xml": { + type: "text", + format: "xml" + }, + "application/rdf+xml": { + type: "text", + format: "xml" + }, + "application/reginfo+xml": { + type: "text", + format: "xml" + }, + "application/resource-lists+xml": { + type: "text", + format: "xml" + }, + "application/resource-lists-diff+xml": { + type: "text", + format: "xml" + }, + "application/rfc+xml": { + type: "text", + format: "xml" + }, + "application/rlmi+xml": { + type: "text", + format: "xml" + }, + "application/rls-services+xml": { + type: "text", + format: "xml" + }, + "application/rsd+xml": { + type: "text", + format: "xml" + }, + "application/rss+xml": { + type: "text", + format: "xml" + }, + "application/samlassertion+xml": { + type: "text", + format: "xml" + }, + "application/samlmetadata+xml": { + type: "text", + format: "xml" + }, + "application/sbml+xml": { + type: "text", + format: "xml" + }, + "application/scaip+xml": { + type: "text", + format: "xml" + }, + "application/sep+xml": { + type: "text", + format: "xml" + }, + "application/shf+xml": { + type: "text", + format: "xml" + }, + "application/simple-filter+xml": { + type: "text", + format: "xml" + }, + "application/smil+xml": { + type: "text", + format: "xml" + }, + "application/soap+xml": { + type: "text", + format: "xml" + }, + "application/sparql-results+xml": { + type: "text", + format: "xml" + }, + "application/spirits-event+xml": { + type: "text", + format: "xml" + }, + "application/srgs+xml": { + type: "text", + format: "xml" + }, + "application/sru+xml": { + type: "text", + format: "xml" + }, + "application/ssdl+xml": { + type: "text", + format: "xml" + }, + "application/ssml+xml": { + type: "text", + format: "xml" + }, + "application/tei+xml": { + type: "text", + format: "xml" + }, + "application/thraud+xml": { + type: "text", + format: "xml" + }, + "application/ttml+xml": { + type: "text", + format: "xml" + }, + "application/urc-grpsheet+xml": { + type: "text", + format: "xml" + }, + "application/urc-ressheet+xml": { + type: "text", + format: "xml" + }, + "application/urc-targetdesc+xml": { + type: "text", + format: "xml" + }, + "application/urc-uisocketdesc+xml": { + type: "text", + format: "xml" + }, + "application/vcard+xml": { + type: "text", + format: "xml" + }, + "application/vnd.3gpp-prose+xml": { + type: "text", + format: "xml" + }, + "application/vnd.3gpp-prose-pc3ch+xml": { + type: "text", + format: "xml" + }, + "application/vnd.3gpp.access-transfer-events+xml": { + type: "text", + format: "xml" + }, + "application/vnd.3gpp.bsf+xml": { + type: "text", + format: "xml" + }, + "application/vnd.3gpp.mid-call+xml": { + type: "text", + format: "xml" + }, + "application/vnd.3gpp.sms+xml": { + type: "text", + format: "xml" + }, + "application/vnd.3gpp.srvcc-ext+xml": { + type: "text", + format: "xml" + }, + "application/vnd.3gpp.srvcc-info+xml": { + type: "text", + format: "xml" + }, + "application/vnd.3gpp.state-and-event-info+xml": { + type: "text", + format: "xml" + }, + "application/vnd.3gpp.ussd+xml": { + type: "text", + format: "xml" + }, + "application/vnd.3gpp2.bcmcsinfo+xml": { + type: "text", + format: "xml" + }, + "application/vnd.adobe.xdp+xml": { + type: "text", + format: "xml" + }, + "application/vnd.amundsen.maze+xml": { + type: "text", + format: "xml" + }, + "application/vnd.apple.installer+xml": { + type: "text", + format: "xml" + }, + "application/vnd.avistar+xml": { + type: "text", + format: "xml" + }, + "application/vnd.balsamiq.bmml+xml": { + type: "text", + format: "xml" + }, + "application/vnd.biopax.rdf+xml": { + type: "text", + format: "xml" + }, + "application/vnd.chemdraw+xml": { + type: "text", + format: "xml" + }, + "application/vnd.citationstyles.style+xml": { + type: "text", + format: "xml" + }, + "application/vnd.criticaltools.wbs+xml": { + type: "text", + format: "xml" + }, + "application/vnd.ctct.ws+xml": { + type: "text", + format: "xml" + }, + "application/vnd.cyan.dean.root+xml": { + type: "text", + format: "xml" + }, + "application/vnd.dece.ttml+xml": { + type: "text", + format: "xml" + }, + "application/vnd.dm.delegation+xml": { + type: "text", + format: "xml" + }, + "application/vnd.dvb.notif-aggregate-root+xml": { + type: "text", + format: "xml" + }, + "application/vnd.dvb.notif-container+xml": { + type: "text", + format: "xml" + }, + "application/vnd.dvb.notif-generic+xml": { + type: "text", + format: "xml" + }, + "application/vnd.dvb.notif-ia-msglist+xml": { + type: "text", + format: "xml" + }, + "application/vnd.dvb.notif-ia-registration-request+xml": { + type: "text", + format: "xml" + }, + "application/vnd.dvb.notif-ia-registration-response+xml": { + type: "text", + format: "xml" + }, + "application/vnd.dvb.notif-init+xml": { + type: "text", + format: "xml" + }, + "application/vnd.emclient.accessrequest+xml": { + type: "text", + format: "xml" + }, + "application/vnd.eprints.data+xml": { + type: "text", + format: "xml" + }, + "application/vnd.eszigno3+xml": { + type: "text", + format: "xml" + }, + "application/vnd.etsi.aoc+xml": { + type: "text", + format: "xml" + }, + "application/vnd.etsi.cug+xml": { + type: "text", + format: "xml" + }, + "application/vnd.etsi.iptvcommand+xml": { + type: "text", + format: "xml" + }, + "application/vnd.etsi.iptvdiscovery+xml": { + type: "text", + format: "xml" + }, + "application/vnd.etsi.iptvprofile+xml": { + type: "text", + format: "xml" + }, + "application/vnd.etsi.iptvsad-bc+xml": { + type: "text", + format: "xml" + }, + "application/vnd.etsi.iptvsad-cod+xml": { + type: "text", + format: "xml" + }, + "application/vnd.etsi.iptvsad-npvr+xml": { + type: "text", + format: "xml" + }, + "application/vnd.etsi.iptvservice+xml": { + type: "text", + format: "xml" + }, + "application/vnd.etsi.iptvsync+xml": { + type: "text", + format: "xml" + }, + "application/vnd.etsi.iptvueprofile+xml": { + type: "text", + format: "xml" + }, + "application/vnd.etsi.mcid+xml": { + type: "text", + format: "xml" + }, + "application/vnd.etsi.overload-control-policy-dataset+xml": { + type: "text", + format: "xml" + }, + "application/vnd.etsi.pstn+xml": { + type: "text", + format: "xml" + }, + "application/vnd.etsi.sci+xml": { + type: "text", + format: "xml" + }, + "application/vnd.etsi.simservs+xml": { + type: "text", + format: "xml" + }, + "application/vnd.etsi.tsl+xml": { + type: "text", + format: "xml" + }, + "application/vnd.geocube+xml": { + type: "text", + format: "xml" + }, + "application/vnd.google-earth.kml+xml": { + type: "text", + format: "xml" + }, + "application/vnd.gov.sk.e-form+xml": { + type: "text", + format: "xml" + }, + "application/vnd.gov.sk.xmldatacontainer+xml": { + type: "text", + format: "xml" + }, + "application/vnd.hal+xml": { + type: "text", + format: "xml" + }, + "application/vnd.handheld-entertainment+xml": { + type: "text", + format: "xml" + }, + "application/vnd.informedcontrol.rms+xml": { + type: "text", + format: "xml" + }, + "application/vnd.infotech.project+xml": { + type: "text", + format: "xml" + }, + "application/vnd.iptc.g2.catalogitem+xml": { + type: "text", + format: "xml" + }, + "application/vnd.iptc.g2.conceptitem+xml": { + type: "text", + format: "xml" + }, + "application/vnd.iptc.g2.knowledgeitem+xml": { + type: "text", + format: "xml" + }, + "application/vnd.iptc.g2.newsitem+xml": { + type: "text", + format: "xml" + }, + "application/vnd.iptc.g2.newsmessage+xml": { + type: "text", + format: "xml" + }, + "application/vnd.iptc.g2.packageitem+xml": { + type: "text", + format: "xml" + }, + "application/vnd.iptc.g2.planningitem+xml": { + type: "text", + format: "xml" + }, + "application/vnd.irepository.package+xml": { + type: "text", + format: "xml" + }, + "application/vnd.las.las+xml": { + type: "text", + format: "xml" + }, + "application/vnd.liberty-request+xml": { + type: "text", + format: "xml" + }, + "application/vnd.llamagraphics.life-balance.exchange+xml": { + type: "text", + format: "xml" + }, + "application/vnd.marlin.drm.actiontoken+xml": { + type: "text", + format: "xml" + }, + "application/vnd.marlin.drm.conftoken+xml": { + type: "text", + format: "xml" + }, + "application/vnd.marlin.drm.license+xml": { + type: "text", + format: "xml" + }, + "application/vnd.mozilla.xul+xml": { + type: "text", + format: "xml" + }, + "application/vnd.ms-office.activex+xml": { + type: "text", + format: "xml" + }, + "application/vnd.ms-playready.initiator+xml": { + type: "text", + format: "xml" + }, + "application/vnd.ms-printdevicecapabilities+xml": { + type: "text", + format: "xml" + }, + "application/vnd.ms-printing.printticket+xml": { + type: "text", + format: "xml" + }, + "application/vnd.ms-printschematicket+xml": { + type: "text", + format: "xml" + }, + "application/vnd.nokia.conml+xml": { + type: "text", + format: "xml" + }, + "application/vnd.nokia.iptv.config+xml": { + type: "text", + format: "xml" + }, + "application/vnd.nokia.landmark+xml": { + type: "text", + format: "xml" + }, + "application/vnd.nokia.landmarkcollection+xml": { + type: "text", + format: "xml" + }, + "application/vnd.nokia.n-gage.ac+xml": { + type: "text", + format: "xml" + }, + "application/vnd.nokia.pcd+xml": { + type: "text", + format: "xml" + }, + "application/vnd.oipf.contentaccessdownload+xml": { + type: "text", + format: "xml" + }, + "application/vnd.oipf.contentaccessstreaming+xml": { + type: "text", + format: "xml" + }, + "application/vnd.oipf.dae.svg+xml": { + type: "text", + format: "xml" + }, + "application/vnd.oipf.dae.xhtml+xml": { + type: "text", + format: "xml" + }, + "application/vnd.oipf.mippvcontrolmessage+xml": { + type: "text", + format: "xml" + }, + "application/vnd.oipf.spdiscovery+xml": { + type: "text", + format: "xml" + }, + "application/vnd.oipf.spdlist+xml": { + type: "text", + format: "xml" + }, + "application/vnd.oipf.ueprofile+xml": { + type: "text", + format: "xml" + }, + "application/vnd.oipf.userprofile+xml": { + type: "text", + format: "xml" + }, + "application/vnd.oma.bcast.associated-procedure-parameter+xml": { + type: "text", + format: "xml" + }, + "application/vnd.oma.bcast.drm-trigger+xml": { + type: "text", + format: "xml" + }, + "application/vnd.oma.bcast.imd+xml": { + type: "text", + format: "xml" + }, + "application/vnd.oma.bcast.notification+xml": { + type: "text", + format: "xml" + }, + "application/vnd.oma.bcast.sgdd+xml": { + type: "text", + format: "xml" + }, + "application/vnd.oma.bcast.smartcard-trigger+xml": { + type: "text", + format: "xml" + }, + "application/vnd.oma.bcast.sprov+xml": { + type: "text", + format: "xml" + }, + "application/vnd.oma.cab-address-book+xml": { + type: "text", + format: "xml" + }, + "application/vnd.oma.cab-feature-handler+xml": { + type: "text", + format: "xml" + }, + "application/vnd.oma.cab-pcc+xml": { + type: "text", + format: "xml" + }, + "application/vnd.oma.cab-subs-invite+xml": { + type: "text", + format: "xml" + }, + "application/vnd.oma.cab-user-prefs+xml": { + type: "text", + format: "xml" + }, + "application/vnd.oma.dd2+xml": { + type: "text", + format: "xml" + }, + "application/vnd.oma.drm.risd+xml": { + type: "text", + format: "xml" + }, + "application/vnd.oma.group-usage-list+xml": { + type: "text", + format: "xml" + }, + "application/vnd.oma.pal+xml": { + type: "text", + format: "xml" + }, + "application/vnd.oma.poc.detailed-progress-report+xml": { + type: "text", + format: "xml" + }, + "application/vnd.oma.poc.final-report+xml": { + type: "text", + format: "xml" + }, + "application/vnd.oma.poc.groups+xml": { + type: "text", + format: "xml" + }, + "application/vnd.oma.poc.invocation-descriptor+xml": { + type: "text", + format: "xml" + }, + "application/vnd.oma.poc.optimized-progress-report+xml": { + type: "text", + format: "xml" + }, + "application/vnd.oma.scidm.messages+xml": { + type: "text", + format: "xml" + }, + "application/vnd.oma.xcap-directory+xml": { + type: "text", + format: "xml" + }, + "application/vnd.omads-email+xml": { + type: "text", + format: "xml" + }, + "application/vnd.omads-file+xml": { + type: "text", + format: "xml" + }, + "application/vnd.omads-folder+xml": { + type: "text", + format: "xml" + }, + "application/vnd.openblox.game+xml": { + type: "text", + format: "xml" + }, + "application/vnd.openxmlformats-officedocument.custom-properties+xml": { + type: "text", + format: "xml" + }, + "application/vnd.openxmlformats-officedocument.customxmlproperties+xml": { + type: "text", + format: "xml" + }, + "application/vnd.openxmlformats-officedocument.drawing+xml": { + type: "text", + format: "xml" + }, + "application/vnd.openxmlformats-officedocument.drawingml.chart+xml": { + type: "text", + format: "xml" + }, + "application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml": { + type: "text", + format: "xml" + }, + "application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml": { + type: "text", + format: "xml" + }, + "application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml": { + type: "text", + format: "xml" + }, + "application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml": { + type: "text", + format: "xml" + }, + "application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml": { + type: "text", + format: "xml" + }, + "application/vnd.openxmlformats-officedocument.extended-properties+xml": { + type: "text", + format: "xml" + }, + "application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml": { + type: "text", + format: "xml" + }, + "application/vnd.openxmlformats-officedocument.presentationml.comments+xml": { + type: "text", + format: "xml" + }, + "application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml": { + type: "text", + format: "xml" + }, + "application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml": { + type: "text", + format: "xml" + }, + "application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml": { + type: "text", + format: "xml" + }, + "application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml": { + type: "text", + format: "xml" + }, + "application/vnd.openxmlformats-officedocument.presentationml.presprops+xml": { + type: "text", + format: "xml" + }, + "application/vnd.openxmlformats-officedocument.presentationml.slide+xml": { + type: "text", + format: "xml" + }, + "application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml": { + type: "text", + format: "xml" + }, + "application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml": { + type: "text", + format: "xml" + }, + "application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml": { + type: "text", + format: "xml" + }, + "application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml": { + type: "text", + format: "xml" + }, + "application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml": { + type: "text", + format: "xml" + }, + "application/vnd.openxmlformats-officedocument.presentationml.tags+xml": { + type: "text", + format: "xml" + }, + "application/vnd.openxmlformats-officedocument.presentationml.template.main+xml": { + type: "text", + format: "xml" + }, + "application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml": { + type: "text", + format: "xml" + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml": { + type: "text", + format: "xml" + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml": { + type: "text", + format: "xml" + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml": { + type: "text", + format: "xml" + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml": { + type: "text", + format: "xml" + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml": { + type: "text", + format: "xml" + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml": { + type: "text", + format: "xml" + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml": { + type: "text", + format: "xml" + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml": { + type: "text", + format: "xml" + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml": { + type: "text", + format: "xml" + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml": { + type: "text", + format: "xml" + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml": { + type: "text", + format: "xml" + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml": { + type: "text", + format: "xml" + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml": { + type: "text", + format: "xml" + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml": { + type: "text", + format: "xml" + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml": { + type: "text", + format: "xml" + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml": { + type: "text", + format: "xml" + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml": { + type: "text", + format: "xml" + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml": { + type: "text", + format: "xml" + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml": { + type: "text", + format: "xml" + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml": { + type: "text", + format: "xml" + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml": { + type: "text", + format: "xml" + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml": { + type: "text", + format: "xml" + }, + "application/vnd.openxmlformats-officedocument.theme+xml": { + type: "text", + format: "xml" + }, + "application/vnd.openxmlformats-officedocument.themeoverride+xml": { + type: "text", + format: "xml" + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml": { + type: "text", + format: "xml" + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml": { + type: "text", + format: "xml" + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml": { + type: "text", + format: "xml" + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml": { + type: "text", + format: "xml" + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml": { + type: "text", + format: "xml" + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml": { + type: "text", + format: "xml" + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml": { + type: "text", + format: "xml" + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml": { + type: "text", + format: "xml" + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml": { + type: "text", + format: "xml" + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml": { + type: "text", + format: "xml" + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml": { + type: "text", + format: "xml" + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml": { + type: "text", + format: "xml" + }, + "application/vnd.openxmlformats-package.core-properties+xml": { + type: "text", + format: "xml" + }, + "application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml": { + type: "text", + format: "xml" + }, + "application/vnd.openxmlformats-package.relationships+xml": { + type: "text", + format: "xml" + }, + "application/vnd.otps.ct-kip+xml": { + type: "text", + format: "xml" + }, + "application/vnd.paos+xml": { + type: "text", + format: "xml" + }, + "application/vnd.poc.group-advertisement+xml": { + type: "text", + format: "xml" + }, + "application/vnd.pwg-xhtml-print+xml": { + type: "text", + format: "xml" + }, + "application/vnd.radisys.moml+xml": { + type: "text", + format: "xml" + }, + "application/vnd.radisys.msml+xml": { + type: "text", + format: "xml" + }, + "application/vnd.radisys.msml-audit+xml": { + type: "text", + format: "xml" + }, + "application/vnd.radisys.msml-audit-conf+xml": { + type: "text", + format: "xml" + }, + "application/vnd.radisys.msml-audit-conn+xml": { + type: "text", + format: "xml" + }, + "application/vnd.radisys.msml-audit-dialog+xml": { + type: "text", + format: "xml" + }, + "application/vnd.radisys.msml-audit-stream+xml": { + type: "text", + format: "xml" + }, + "application/vnd.radisys.msml-conf+xml": { + type: "text", + format: "xml" + }, + "application/vnd.radisys.msml-dialog+xml": { + type: "text", + format: "xml" + }, + "application/vnd.radisys.msml-dialog-base+xml": { + type: "text", + format: "xml" + }, + "application/vnd.radisys.msml-dialog-fax-detect+xml": { + type: "text", + format: "xml" + }, + "application/vnd.radisys.msml-dialog-fax-sendrecv+xml": { + type: "text", + format: "xml" + }, + "application/vnd.radisys.msml-dialog-group+xml": { + type: "text", + format: "xml" + }, + "application/vnd.radisys.msml-dialog-speech+xml": { + type: "text", + format: "xml" + }, + "application/vnd.radisys.msml-dialog-transform+xml": { + type: "text", + format: "xml" + }, + "application/vnd.recordare.musicxml+xml": { + type: "text", + format: "xml" + }, + "application/vnd.route66.link66+xml": { + type: "text", + format: "xml" + }, + "application/vnd.software602.filler.form+xml": { + type: "text", + format: "xml" + }, + "application/vnd.solent.sdkm+xml": { + type: "text", + format: "xml" + }, + "application/vnd.sun.wadl+xml": { + type: "text", + format: "xml" + }, + "application/vnd.syncml+xml": { + type: "text", + format: "xml" + }, + "application/vnd.syncml.dm+xml": { + type: "text", + format: "xml" + }, + "application/vnd.syncml.dmddf+xml": { + type: "text", + format: "xml" + }, + "application/vnd.syncml.dmtnds+xml": { + type: "text", + format: "xml" + }, + "application/vnd.tmd.mediaflex.api+xml": { + type: "text", + format: "xml" + }, + "application/vnd.uoml+xml": { + type: "text", + format: "xml" + }, + "application/vnd.wv.csp+xml": { + type: "text", + format: "xml" + }, + "application/vnd.wv.ssp+xml": { + type: "text", + format: "xml" + }, + "application/vnd.xmi+xml": { + type: "text", + format: "xml" + }, + "application/vnd.yamaha.openscoreformat.osfpvg+xml": { + type: "text", + format: "xml" + }, + "application/vnd.zzazz.deck+xml": { + type: "text", + format: "xml" + }, + "application/voicexml+xml": { + type: "text", + format: "xml" + }, + "application/watcherinfo+xml": { + type: "text", + format: "xml" + }, + "application/wsdl+xml": { + type: "text", + format: "xml" + }, + "application/wspolicy+xml": { + type: "text", + format: "xml" + }, + "application/x-dtbncx+xml": { + type: "text", + format: "xml" + }, + "application/x-dtbook+xml": { + type: "text", + format: "xml" + }, + "application/x-dtbresource+xml": { + type: "text", + format: "xml" + }, + "application/x-xliff+xml": { + type: "text", + format: "xml" + }, + "application/xacml+xml": { + type: "text", + format: "xml" + }, + "application/xaml+xml": { + type: "text", + format: "xml" + }, + "application/xcap-att+xml": { + type: "text", + format: "xml" + }, + "application/xcap-caps+xml": { + type: "text", + format: "xml" + }, + "application/xcap-diff+xml": { + type: "text", + format: "xml" + }, + "application/xcap-el+xml": { + type: "text", + format: "xml" + }, + "application/xcap-error+xml": { + type: "text", + format: "xml" + }, + "application/xcap-ns+xml": { + type: "text", + format: "xml" + }, + "application/xcon-conference-info+xml": { + type: "text", + format: "xml" + }, + "application/xcon-conference-info-diff+xml": { + type: "text", + format: "xml" + }, + "application/xenc+xml": { + type: "text", + format: "xml" + }, + "application/xhtml+xml": { + type: "text", + format: "xml" + }, + "application/xhtml-voice+xml": { + type: "text", + format: "xml" + }, + "application/xmpp+xml": { + type: "text", + format: "xml" + }, + "application/xop+xml": { + type: "text", + format: "xml" + }, + "application/xproc+xml": { + type: "text", + format: "xml" + }, + "application/xslt+xml": { + type: "text", + format: "xml" + }, + "application/xspf+xml": { + type: "text", + format: "xml" + }, + "application/xv+xml": { + type: "text", + format: "xml" + }, + "application/yin+xml": { + type: "text", + format: "xml" + }, + "message/imdn+xml": { + type: "text", + format: "xml" + }, + "model/vnd.collada+xml": { + type: "text", + format: "xml" + }, + "model/vnd.moml+xml": { + type: "text", + format: "xml" + }, + "model/x3d+xml": { + type: "text", + format: "xml" + }, + "application/alto-costmap+json": { + type: "text", + format: "json" + }, + "application/alto-costmapfilter+json": { + type: "text", + format: "json" + }, + "application/alto-directory+json": { + type: "text", + format: "json" + }, + "application/alto-endpointcost+json": { + type: "text", + format: "json" + }, + "application/alto-endpointcostparams+json": { + type: "text", + format: "json" + }, + "application/alto-endpointprop+json": { + type: "text", + format: "json" + }, + "application/alto-endpointpropparams+json": { + type: "text", + format: "json" + }, + "application/alto-error+json": { + type: "text", + format: "json" + }, + "application/alto-networkmap+json": { + type: "text", + format: "json" + }, + "application/alto-networkmapfilter+json": { + type: "text", + format: "json" + }, + "application/calendar+json": { + type: "text", + format: "json" + }, + "application/coap-group+json": { + type: "text", + format: "json" + }, + "application/csvm+json": { + type: "text", + format: "json" + }, + "application/jose+json": { + type: "text", + format: "json" + }, + "application/jrd+json": { + type: "text", + format: "json" + }, + "application/json-patch+json": { + type: "text", + format: "json" + }, + "application/jsonml+json": { + type: "text", + format: "json" + }, + "application/jwk+json": { + type: "text", + format: "json" + }, + "application/jwk-set+json": { + type: "text", + format: "json" + }, + "application/ld+json": { + type: "text", + format: "json" + }, + "application/manifest+json": { + type: "text", + format: "json" + }, + "application/merge-patch+json": { + type: "text", + format: "json" + }, + "application/ppsp-tracker+json": { + type: "text", + format: "json" + }, + "application/problem+json": { + type: "text", + format: "json" + }, + "application/rdap+json": { + type: "text", + format: "json" + }, + "application/reputon+json": { + type: "text", + format: "json" + }, + "application/scim+json": { + type: "text", + format: "json" + }, + "application/vcard+json": { + type: "text", + format: "json" + }, + "application/vnd.api+json": { + type: "text", + format: "json" + }, + "application/vnd.bekitzur-stech+json": { + type: "text", + format: "json" + }, + "application/vnd.collection+json": { + type: "text", + format: "json" + }, + "application/vnd.collection.doc+json": { + type: "text", + format: "json" + }, + "application/vnd.collection.next+json": { + type: "text", + format: "json" + }, + "application/vnd.coreos.ignition+json": { + type: "text", + format: "json" + }, + "application/vnd.document+json": { + type: "text", + format: "json" + }, + "application/vnd.drive+json": { + type: "text", + format: "json" + }, + "application/vnd.geo+json": { + type: "text", + format: "json" + }, + "application/vnd.hal+json": { + type: "text", + format: "json" + }, + "application/vnd.heroku+json": { + type: "text", + format: "json" + }, + "application/vnd.hyperdrive+json": { + type: "text", + format: "json" + }, + "application/vnd.ims.lis.v2.result+json": { + type: "text", + format: "json" + }, + "application/vnd.ims.lti.v2.toolconsumerprofile+json": { + type: "text", + format: "json" + }, + "application/vnd.ims.lti.v2.toolproxy+json": { + type: "text", + format: "json" + }, + "application/vnd.ims.lti.v2.toolproxy.id+json": { + type: "text", + format: "json" + }, + "application/vnd.ims.lti.v2.toolsettings+json": { + type: "text", + format: "json" + }, + "application/vnd.ims.lti.v2.toolsettings.simple+json": { + type: "text", + format: "json" + }, + "application/vnd.mason+json": { + type: "text", + format: "json" + }, + "application/vnd.micro+json": { + type: "text", + format: "json" + }, + "application/vnd.miele+json": { + type: "text", + format: "json" + }, + "application/vnd.oftn.l10n+json": { + type: "text", + format: "json" + }, + "application/vnd.oracle.resource+json": { + type: "text", + format: "json" + }, + "application/vnd.pagerduty+json": { + type: "text", + format: "json" + }, + "application/vnd.siren+json": { + type: "text", + format: "json" + }, + "application/vnd.vel+json": { + type: "text", + format: "json" + }, + "application/vnd.xacml+json": { + type: "text", + format: "json" + }, + "application/x-web-app-manifest+json": { + type: "text", + format: "json" + }, + "application/ogg": { + type: "audio", + format: "ogg" + } + }; + } +}); + +// ../../node_modules/charset/index.js +var require_charset = __commonJS({ + "../../node_modules/charset/index.js"(exports2, module2) { + "use strict"; + var CHARTSET_RE = /(?:charset|encoding)\s{0,10}=\s{0,10}['"]? {0,10}([\w\-]{1,100})/i; + module2.exports = charset; + function charset(obj, data, peekSize) { + let matchs = null; + let end = 0; + if (data) { + peekSize = peekSize || 512; + end = data.length > peekSize ? peekSize : data.length; + } + let contentType = obj; + if (contentType && typeof contentType !== "string") { + let headers = obj; + if (obj.headers) { + headers = obj.headers; + } + contentType = headers["content-type"] || headers["Content-Type"]; + } + if (contentType) { + matchs = CHARTSET_RE.exec(contentType); + } + if (!matchs && end > 0) { + contentType = data.slice(0, end).toString(); + matchs = CHARTSET_RE.exec(contentType); + } + let cs = null; + if (matchs) { + cs = matchs[1].toLowerCase(); + if (cs === "utf-8") { + cs = "utf8"; + } + } + return cs; + } + } +}); + +// ../../node_modules/mime-format/index.js +var require_mime_format = __commonJS({ + "../../node_modules/mime-format/index.js"(exports2, module2) { + var db = require_db3(); + var SEP = "/"; + var E = ""; + var TEXT = "text"; + var RAW = "raw"; + var UNKNOWN = "unknown"; + var PLAIN = "plain"; + var AUDIO_VIDEO_IMAGE_TEXT = /(audio|video|image|text)/; + var JSON_XML_SCRIPT_SIBLINGS = /(jsonp|json|xml|html|yaml|vml|webml|script)/; + var AUDIO_VIDEO_IMAGE_TEXT_SUBTYPE = /\/[^\/]*(audio|video|image|text)/; + var APPLICATION_MESSAGE_MULTIPART = /(application|message|multipart)/; + module2.exports = { + /** + * Attempts to guess the format by analysing mime type and not a db lookup + * @private + * @param {String} mime - contentType header value + * @returns {Object} + */ + guess: function(mime) { + var info = { + type: UNKNOWN, + format: RAW, + guessed: true + }, match, base; + base = (base = mime.split(SEP)) && base[0] || E; + match = base.match(AUDIO_VIDEO_IMAGE_TEXT); + if (match && match[1]) { + info.type = info.format = match[1]; + if (info.type === TEXT) { + match = mime.match(JSON_XML_SCRIPT_SIBLINGS); + info.format = match && match[1] || PLAIN; + } + return info; + } + match = mime.match(JSON_XML_SCRIPT_SIBLINGS); + if (match && match[1]) { + info.type = TEXT; + info.format = match[1]; + return info; + } + match = mime.match(AUDIO_VIDEO_IMAGE_TEXT_SUBTYPE); + if (match && match[1]) { + info.type = info.format = match[1]; + return info; + } + match = base.match(APPLICATION_MESSAGE_MULTIPART); + if (match && match[1]) { + info.type = match[1]; + info.format = RAW; + return info; + } + info.orphan = true; + return info; + }, + /** + * Finds the mime-format of the provided Content-Type + * @param {String} mime - Content-Type for which you want to find the mime format. e.g application/xml. + * @returns {Object} + * @example Basic usage + * mimeFormat.lookup('application/xml'); + * + * // Output + * // { + * // "type": "text", + * // "format": "xml" + * // } + * + * @example Content-Type with charset + * mimeFormat.lookup('application/xml; charset=gBk'); + * + * // Output + * // { + * // "type": "text", + * // "format": "xml", + * // "charset": "gBk" + * // } + * + * @example Unknown Content-Type + * mimeFormat.lookup('random/abc'); + * + * // Output + * // { + * // "type": "unknown", + * // "format": "raw", + * // "guessed": true, + * // "orphan": true + * // } + * + */ + lookup: function mimeFormatLookup(mime) { + var charset = require_charset()(mime), result; + mime = String(mime).toLowerCase().replace(/\s/g, E).replace(/^([^;]+).*$/g, "$1"); + result = db[mime]; + result = result ? Object.assign({}, result) : module2.exports.guess(mime); + result && charset && (result.charset = charset); + result && (result.source = mime); + return result; + } + }; + } +}); + +// ../../node_modules/postman-collection/lib/content-info/index.js +var require_content_info = __commonJS({ + "../../node_modules/postman-collection/lib/content-info/index.js"(exports2, module2) { + var util = require_util2(); + var _2 = util.lodash; + var fileType = require_file_type(); + var mimeType = require_mime_types(); + var mimeFormat = require_mime_format(); + var E = ""; + var DOT = "."; + var QUESTION_MARK = "?"; + var DOUBLE_QUOTES = '"'; + var TOKEN_$1 = "$1"; + var BINARY = "binary"; + var CHARSET_UTF8 = "utf8"; + var CONTENT_TYPE_TEXT_PLAIN = "text/plain"; + var HEADERS = { + CONTENT_TYPE: "Content-Type", + CONTENT_DISPOSITION: "Content-Disposition" + }; + var DEFAULT_RESPONSE_FILENAME = "response"; + var supportsBuffer = typeof Buffer !== "undefined" && _2.isFunction(Buffer.byteLength); + var regexes = { + /** + * RegExp for extracting filename from content-disposition header + * + * RFC 2616 grammar + * parameter = token "=" ( token | quoted-string ) + * token = 1* + * separators = "(" | ")" | "<" | ">" | "@" + * | "," | ";" | ":" | "\" | <"> + * | "/" | "[" | "]" | "?" | "=" + * | "{" | "}" | SP | HT + * quoted-string = ( <"> *(qdtext | quoted-pair ) <"> ) + * qdtext = > + * quoted-pair = "\" CHAR + * CHAR = + * TEXT = + * LWS = [CRLF] 1*( SP | HT ) + * CRLF = CR LF + * CR = + * LF = + * SP = + * HT = + * CTL = + * OCTET = + * + * egHeader: inline; filename=testResponse.json + * egHeader: inline; filename="test Response.json" + * Reference: https://github.com/jshttp/content-disposition + */ + // eslint-disable-next-line max-len + fileNameRegex: /;[ \t]*(?:filename)[ \t]*=[ \t]*("(?:[\x20!\x23-\x5b\x5d-\x7e\x80-\xff]|\\[\x20-\x7e])*"|[!#$%&'*+.0-9A-Z^_`a-z|~-]+)[ \t]*/, + /** + * RegExp for extracting filename* from content-disposition header + * + * RFC 5987 grammar + * parameter = reg-parameter / ext-parameter + * ext-parameter = parmname "*" LWSP "=" LWSP ext-value + * parmname = 1*attr-char + * ext-value = charset "'" [ language ] "'" value-chars + ; like RFC 2231's + ; (see [RFC2231], Section 7) + * charset = "UTF-8" / "ISO-8859-1" / mime-charset + * mime-charset = 1*mime-charsetc + * mime-charsetc = ALPHA / DIGIT + / "!" / "#" / "$" / "%" / "&" + / "+" / "-" / "^" / "_" / "`" + / "{" / "}" / "~" + ; as in Section 2.3 of [RFC2978] + ; except that the single quote is not included + ; SHOULD be registered in the IANA charset registry + * language = + * value-chars = *( pct-encoded / attr-char ) + * pct-encoded = "%" HEXDIG HEXDIG + ; see [RFC3986], Section 2.1 + * attr-char = ALPHA / DIGIT + / "!" / "#" / "$" / "&" / "+" / "-" / "." + / "^" / "_" / "`" / "|" / "~" + ; token except ( "*" / "'" / "%" ) + * + * egHeader: attachment;filename*=utf-8''%E4%BD%A0%E5%A5%BD.txt + * Reference: https://github.com/jshttp/content-disposition + */ + // eslint-disable-next-line max-len, security/detect-unsafe-regex + encodedFileNameRegex: /;[ \t]*(?:filename\*)[ \t]*=[ \t]*([A-Za-z0-9!#$%&+\-^_`{}~]+)'.*'((?:%[0-9A-Fa-f]{2}|[A-Za-z0-9!#$&+.^_`|~-])+)[ \t]*/, + /** + * RegExp to match quoted-pair in RFC 2616 + * + * quoted-pair = "\" CHAR + * CHAR = + */ + quotedPairRegex: /\\([ -~])/g, + /** + * Regex to match all the hexadecimal number inside encoded string + */ + hexCharMatchRegex: /%([0-9A-Fa-f]{2})/g, + /** + * Regex to match non-latin characters + */ + nonLatinCharMatchRegex: /[^\x20-\x7e\xa0-\xff]/g + }; + var decodeHexcode = function(str, hex) { + return String.fromCharCode(parseInt(hex, 16)); + }; + var characterDecoders = { + /** + * Replaces non-latin characters with '?' + * + * @private + * @param {String} val - Input encoded string + * @returns {String} - String with latin characters + */ + "iso-8859-1"(val) { + return val.replace(regexes.nonLatinCharMatchRegex, QUESTION_MARK); + }, + /** + * Decodes the given string with utf-8 character set + * + * @private + * @param {?String} encodedString - Input encoded string + * @returns {?String} - String with decoded character with utf-8 + */ + "utf-8"(encodedString) { + if (!supportsBuffer) { + return; + } + return Buffer.from(encodedString, BINARY).toString(CHARSET_UTF8); + } + }; + var decodeFileName = function(encodedFileName, charset) { + if (!encodedFileName) { + return; + } + if (!characterDecoders[charset]) { + return; + } + return characterDecoders[charset](encodedFileName.replace(regexes.hexCharMatchRegex, decodeHexcode)); + }; + var getMimeInfo = function(contentType, response) { + var normalized, detected, detectedExtension; + if (!contentType) { + detected = fileType(response); + detected && (contentType = detected.mime) && (detectedExtension = detected.ext); + } + if (!contentType) { + contentType = CONTENT_TYPE_TEXT_PLAIN; + } + normalized = mimeFormat.lookup(contentType); + return { + contentType: normalized.source, + mimeType: normalized.type, + // sanitized mime type base + mimeFormat: normalized.format, + // format specific to the type returned + charset: normalized.charset || CHARSET_UTF8, + extension: detectedExtension || mimeType.extension(normalized.source) || E + }; + }; + var getFileNameFromDispositionHeader = function(dispositionHeader) { + if (!dispositionHeader) { + return; + } + var encodedFileName, fileName; + encodedFileName = regexes.encodedFileNameRegex.exec(dispositionHeader); + if (encodedFileName) { + fileName = decodeFileName(encodedFileName[2], encodedFileName[1]); + } + if (!fileName) { + fileName = regexes.fileNameRegex.exec(dispositionHeader); + fileName && (fileName = fileName[1]); + if (fileName && fileName[0] === DOUBLE_QUOTES) { + fileName = fileName.substr(1, fileName.length - 2).replace(regexes.quotedPairRegex, TOKEN_$1); + } + } + return fileName; + }; + module2.exports = { + /** + * Extracts content related information from response. + * Includes response mime information, character set and file name. + * + * @private + * @param {Response} response - response instance + * @returns {Response.ResponseContentInfo} - Return contentInfo of the response + */ + contentInfo(response) { + var contentType = response.headers.get(HEADERS.CONTENT_TYPE), contentDisposition = response.headers.get(HEADERS.CONTENT_DISPOSITION), mimeInfo = getMimeInfo(contentType, response.stream || response.body), fileName = getFileNameFromDispositionHeader(contentDisposition), fileExtension = mimeInfo.extension, contentInfo = {}; + if (!fileName) { + fileName = DEFAULT_RESPONSE_FILENAME; + fileExtension && (fileName += DOT + fileExtension); + } + mimeInfo.contentType && (contentInfo.contentType = mimeInfo.contentType); + mimeInfo.mimeType && (contentInfo.mimeType = mimeInfo.mimeType); + mimeInfo.mimeFormat && (contentInfo.mimeFormat = mimeInfo.mimeFormat); + mimeInfo.charset && (contentInfo.charset = mimeInfo.charset); + fileExtension && (contentInfo.fileExtension = fileExtension); + fileName && (contentInfo.fileName = fileName); + return contentInfo; + }, + // regexes are extracted for vulnerability tests + regexes + }; + } +}); + +// ../../node_modules/postman-collection/lib/collection/response.js +var require_response = __commonJS({ + "../../node_modules/postman-collection/lib/collection/response.js"(exports2, module2) { + var util = require_util2(); + var _2 = util.lodash; + var httpReasons = require_http_reasons(); + var LJSON = require_liquid_json(); + var Property = require_property().Property; + var PropertyBase = require_property_base().PropertyBase; + var Request = require_request2().Request; + var CookieList = require_cookie_list().CookieList; + var HeaderList = require_header_list().HeaderList; + var contentInfo = require_content_info().contentInfo; + var E = ""; + var HEADER = "header"; + var BODY = "body"; + var GZIP = "gzip"; + var CONTENT_ENCODING = "Content-Encoding"; + var CONTENT_LENGTH = "Content-Length"; + var BASE64 = "base64"; + var STREAM_TYPE_BUFFER = "Buffer"; + var STREAM_TYPE_BASE64 = "Base64"; + var FUNCTION = "function"; + var STRING = "string"; + var HTTP_X_X = "HTTP/X.X"; + var SP = " "; + var CRLF = "\r\n"; + var REGEX_JSONP_LEFT = /^[^{(].*\(/; + var REGEX_JSONP_RIGHT = /\)[^}].*$|\)$/; + var stripJSONP = function(str) { + return str.replace(REGEX_JSONP_LEFT, E).replace(REGEX_JSONP_RIGHT, E); + }; + var supportsBuffer = typeof Buffer !== "undefined" && _2.isFunction(Buffer.byteLength); + var normalizeStream = function(stream) { + if (!stream) { + return; + } + if (stream.type === STREAM_TYPE_BUFFER && _2.isArray(stream.data)) { + return typeof Buffer === FUNCTION ? Buffer.from(stream.data) : new Uint8Array(stream.data).buffer; + } + if (stream.type === STREAM_TYPE_BASE64 && typeof stream.data === STRING) { + return Buffer.from(stream.data, BASE64); + } + return stream; + }; + var Response; + _2.inherit( + /** + * Response holds data related to the request body. By default, it provides a nice wrapper for url-encoded, + * form-data, and raw types of request bodies. + * + * @constructor + * @extends {Property} + * + * @param {Response.definition} options - + */ + Response = function PostmanResponse(options) { + Response.super_.apply(this, arguments); + this.update(options || {}); + }, + Property + ); + _2.assign( + Response.prototype, + /** @lends Response.prototype */ + { + update(options) { + const stream = normalizeStream(options.stream); + _2.mergeDefined(this._details = _2.clone(httpReasons.lookup(options.code)), { + name: _2.choose(options.reason, options.status), + code: options.code, + standardName: this._details.name + }); + _2.mergeDefined( + this, + /** @lends Response.prototype */ + { + /** + * @type {Request} + */ + originalRequest: options.originalRequest ? new Request(options.originalRequest) : void 0, + /** + * @type {String} + */ + status: this._details.name, + /** + * @type {Number} + */ + code: options.code, + /** + * @type {HeaderList} + */ + headers: new HeaderList(this, options.header), + /** + * @type {String} + */ + body: options.body, + /** + * @private + * + * @type {Buffer|UInt8Array} + */ + stream: options.body && _2.isObject(options.body) ? options.body : stream, + /** + * @type {CookieList} + */ + cookies: new CookieList(this, options.cookie), + /** + * Time taken for the request to complete. + * + * @type {Number} + */ + responseTime: options.responseTime, + /** + * @private + * @type {Number} + */ + responseSize: stream && stream.byteLength, + /** + * @private + * @type {Number} + */ + downloadedBytes: options.downloadedBytes + } + ); + } + } + ); + _2.assign( + Response.prototype, + /** @lends Response.prototype */ + { + /** + * Defines that this property requires an ID field + * + * @private + * @readOnly + */ + _postman_propertyRequiresId: true, + /** + * Convert this response into a JSON serializable object. The _details meta property is omitted. + * + * @returns {Object} + * + * @todo consider switching to a different response buffer (stream) representation as Buffer.toJSON + * appears to cause multiple performance issues. + */ + toJSON: function() { + var response = PropertyBase.toJSON(this); + response._details && delete response._details; + return response; + }, + /** + * Get the http response reason phrase based on the current response code. + * + * @returns {String|undefined} + */ + reason: function() { + return this.status || httpReasons.lookup(this.code).name; + }, + /** + * Creates a JSON representation of the current response details, and returns it. + * + * @returns {Object} A set of response details, including the custom server reason. + * @private + */ + details: function() { + if (!this._details || this._details.code !== this.code) { + this._details = _2.clone(httpReasons.lookup(this.code)); + this._details.code = this.code; + this._details.standardName = this._details.name; + } + return _2.clone(this._details); + }, + /** + * Get the response body as a string/text. + * + * @returns {String|undefined} + */ + text: function() { + return this.stream ? util.bufferOrArrayBufferToString(this.stream, this.contentInfo().charset) : this.body; + }, + /** + * Get the response body as a JavaScript object. Note that it throws an error if the response is not a valid JSON + * + * @param {Function=} [reviver] - + * @param {Boolean} [strict=false] Specify whether JSON parsing will be strict. This will fail on comments and BOM + * @example + * // assuming that the response is stored in a collection instance `myCollection` + * var response = myCollection.items.one('some request').responses.idx(0), + * jsonBody; + * try { + * jsonBody = response.json(); + * } + * catch (e) { + * console.log("There was an error parsing JSON ", e); + * } + * // log the root-level keys in the response JSON. + * console.log('All keys in json response: ' + Object.keys(json)); + * + * @returns {Object} + */ + json: function(reviver, strict) { + return LJSON.parse(this.text(), reviver, strict); + }, + /** + * Get the JSON from response body that returns JSONP response. + * + * @param {Function=} [reviver] - + * @param {Boolean} [strict=false] Specify whether JSON parsing will be strict. This will fail on comments and BOM + * + * @throws {JSONError} when response body is empty + */ + jsonp: function(reviver, strict) { + return LJSON.parse(stripJSONP(this.text() || /* istanbul ignore next */ + E), reviver, strict); + }, + /** + * Extracts mime type, format, charset, extension and filename of the response content + * A fallback of default filename is given, if filename is not present in content-disposition header + * + * @returns {Response.ResponseContentInfo} - contentInfo for the response + */ + contentInfo: function() { + return contentInfo(this); + }, + /** + * @private + * @deprecated discontinued in v4.0 + */ + mime: function() { + throw new Error("`Response#mime` has been discontinued, use `Response#contentInfo` instead."); + }, + /** + * Converts the response to a dataURI that can be used for storage or serialisation. The data URI is formed using + * the following syntax `data:;baseg4, `. + * + * @returns {String} + * @todo write unit tests + */ + dataURI: function() { + const { contentType } = this.contentInfo(); + if (!contentType) { + return E; + } + return `data:${contentType};base64, ` + (!_2.isNil(this.stream) && util.bufferOrArrayBufferToBase64(this.stream) || !_2.isNil(this.body) && util.btoa(this.body) || E); + }, + /** + * @typedef Response.sizeInfo + * @property {Number} body - size of the response body in bytes + * @property {Number} header - size of the response header in bytes + * @property {Number} total - total size of the response body and header in bytes + */ + /** + * Get the response size by computing the same from content length header or + * using the actual response body. + * + * @returns {Response.sizeInfo} - Response size object + */ + size: function() { + const sizeInfo = { + body: 0, + header: 0, + total: 0 + }, contentLength = this.headers.get(CONTENT_LENGTH); + if (util.isNumeric(this.downloadedBytes)) { + sizeInfo.body = this.downloadedBytes; + } else if (contentLength && util.isNumeric(contentLength)) { + sizeInfo.body = _2.parseInt(contentLength, 10); + } else if (this.stream && util.isNumeric(this.stream.byteLength)) { + sizeInfo.body = this.stream.byteLength; + } else if (!_2.isNil(this.body)) { + sizeInfo.body = supportsBuffer ? Buffer.byteLength(this.body.toString()) : ( + /* istanbul ignore next */ + this.body.toString().length + ); + } + sizeInfo.header = (HTTP_X_X + SP + this.code + SP + this.reason() + CRLF + CRLF).length + this.headers.contentSize(); + sizeInfo.total = (sizeInfo.body || 0) + sizeInfo.header; + return sizeInfo; + }, + /** + * Returns the response encoding defined as header or detected from body. + * + * @private + * @returns {Object} - {format: string, source: string} + */ + encoding: function() { + var contentEncoding = this.headers.get(CONTENT_ENCODING), body = this.stream || this.body, source; + if (contentEncoding) { + source = HEADER; + } else if (body) { + if (body[0] === 31 && body[1] === 139 && body[2] === 8) { + contentEncoding = GZIP; + } + if (contentEncoding) { + source = BODY; + } + } + return { + format: contentEncoding, + source + }; + } + } + ); + _2.assign( + Response, + /** @lends Response */ + { + /** + * Defines the name of this property for internal use. + * + * @private + * @readOnly + * @type {String} + */ + _postman_propertyName: "Response", + /** + * Check whether an object is an instance of {@link ItemGroup}. + * + * @param {*} obj - + * @returns {Boolean} + */ + isResponse: function(obj) { + return Boolean(obj) && (obj instanceof Response || _2.inSuperChain(obj.constructor, "_postman_propertyName", Response._postman_propertyName)); + }, + /** + * Converts the response object from the request module to the postman responseBody format + * + * @param {Object} response The response object, as received from the request module + * @param {Object} cookies - + * @returns {Object} The transformed responseBody + * @todo Add a key: `originalRequest` to the returned object as well, referring to response.request + */ + createFromNode: function(response, cookies) { + return new Response({ + cookie: cookies, + body: response.body.toString(), + stream: response.body, + header: response.headers, + code: response.statusCode, + status: response.statusMessage, + responseTime: response.elapsedTime + }); + }, + /** + * @private + * @deprecated discontinued in v4.0 + */ + mimeInfo: function() { + throw new Error("`Response.mimeInfo` has been discontinued, use `Response#contentInfo` instead."); + }, + /** + * Returns the durations of each request phase in milliseconds + * + * @typedef Response.timings + * @property {Number} start - timestamp of the request sent from the client (in Unix Epoch milliseconds) + * @property {Object} offset - event timestamps in millisecond resolution relative to start + * @property {Number} offset.request - timestamp of the start of the request + * @property {Number} offset.socket - timestamp when the socket is assigned to the request + * @property {Number} offset.lookup - timestamp when the DNS has been resolved + * @property {Number} offset.connect - timestamp when the server acknowledges the TCP connection + * @property {Number} offset.secureConnect - timestamp when secure handshaking process is completed + * @property {Number} offset.response - timestamp when the first bytes are received from the server + * @property {Number} offset.end - timestamp when the last bytes of the response are received + * @property {Number} offset.done - timestamp when the response is received at the client + * + * @note If there were redirects, the properties reflect the timings + * of the final request in the redirect chain + * + * @param {Response.timings} timings - + * @returns {Object} + * + * @example Output + * Request.timingPhases(timings); + * { + * prepare: Number, // duration of request preparation + * wait: Number, // duration of socket initialization + * dns: Number, // duration of DNS lookup + * tcp: Number, // duration of TCP connection + * secureHandshake: Number, // duration of secure handshake + * firstByte: Number, // duration of HTTP server response + * download: Number, // duration of HTTP download + * process: Number, // duration of response processing + * total: Number // duration entire HTTP round-trip + * } + * + * @note if there were redirects, the properties reflect the timings of the + * final request in the redirect chain. + */ + timingPhases: function(timings) { + if (!(timings && timings.offset)) { + return; + } + var phases, offset = timings.offset; + phases = { + prepare: offset.request, + wait: offset.socket - offset.request, + dns: offset.lookup - offset.socket, + tcp: offset.connect - offset.lookup, + firstByte: offset.response - offset.connect, + download: offset.end - offset.response, + process: offset.done - offset.end, + total: offset.done + }; + if (offset.secureConnect) { + phases.secureHandshake = offset.secureConnect - offset.connect; + phases.firstByte = offset.response - offset.secureConnect; + } + return phases; + } + } + ); + module2.exports = { + Response + }; + } +}); + +// ../../node_modules/postman-collection/lib/collection/item.js +var require_item = __commonJS({ + "../../node_modules/postman-collection/lib/collection/item.js"(exports2, module2) { + var _2 = require_util2().lodash; + var Property = require_property().Property; + var PropertyList = require_property_list().PropertyList; + var EventList = require_event_list().EventList; + var Request = require_request2().Request; + var RequestAuth = require_request_auth().RequestAuth; + var Response = require_response().Response; + var Item; + var OBJECT = "object"; + var STRING = "string"; + var extractAuth = function(entity) { + var auth; + return entity && (auth = entity.auth) && RequestAuth.isValidType(auth.type) ? auth : void 0; + }; + var extractProtocolProfileBehavior = function(entity) { + var protocolProfileBehavior = entity && entity.protocolProfileBehavior; + return typeof protocolProfileBehavior === OBJECT ? protocolProfileBehavior : {}; + }; + _2.inherit( + /** + * A Postman Collection Item that holds your request definition, responses and other stuff. An Item essentially is + * a HTTP request definition along with the sample responses and test scripts clubbed together. One or more of these + * items can be grouped together and placed in an {@link ItemGroup} and as such forms a {@link Collection} of + * requests. + * + * @constructor + * @extends {Property} + * + * @param {Item.definition=} [definition] While creating a new instance of Item, one can provide the initial + * configuration of the item with the the request it sends, the expected sample responses, tests, etc + * + * @example Add a new Item to a folder in a collection instance + * var Collection = require('postman-collection').Collection, + * Item = require('postman-collection').Item, + * myCollection; + * + * myCollection = new Collection({ + * "item": [{ + * "id": "my-folder-1", + * "name": "The solo folder in this collection", + * "item": [] // blank array indicates this is a folder + * }] + * }); // create a collection with an empty folder + * // add a request to "my-folder-1" that sends a GET request + * myCollection.items.one("my-folder-1").items.add(new Item({ + * "name": "Send a GET request", + * "id": "my-get-request", + * "request": { + * "url": "https://postman-echo.com/get", + * "method": "GET" + * } + * })); + */ + Item = function PostmanItem(definition) { + Item.super_.apply(this, arguments); + _2.mergeDefined( + this, + /** @lends Item.prototype */ + { + /** + * The instance of the {@link Request} object inside an Item defines the HTTP request that is supposed to be + * sent. It further contains the request method, url, request body, etc. + * + * @type {Request} + */ + request: definition && new Request(definition.request), + /** + * An Item also contains a list of sample responses that is expected when the request defined in the item is + * executed. The sample responses are useful in elaborating API usage and is also useful for other + * integrations that use the sample responses to do something - say a mock service. + * + * @type {PropertyList} + */ + responses: new PropertyList(Response, this, definition && definition.response), + /** + * Events are a set of of {@link Script}s that are executed when certain activities are triggered on an + * Item. For example, on defining an event that listens to the "test" event, would cause the associated + * script of the event to be executed when the test runs. + * + * @type {EventList} + * + * @example Add a script to be executed on "prerequest" event + * var Collection = require('postman-collection').Collection, + * Item = require('postman-collection').Item, + * myCollection; + * + * myCollection = new Collection({ + * "item": [{ + * "name": "Send a GET request", + * "id": "my-get-request", + * "request": { + * "url": "https://postman-echo.com/get", + * "method": "GET" + * } + * }] + * }); // create a collection with one request + * + * // add a pre-request script to the event list + * myCollection.items.one('my-get-request').events.add({ + * "listen": "prerequest", + * "script": { + * "type": "text/javascript", + * "exec": "console.log(new Date())" + * } + * }); + */ + events: new EventList(this, definition && definition.event), + /** + * Set of configurations used to alter the usual behavior of sending the request. + * + * @type {Object} + */ + protocolProfileBehavior: definition && typeof definition.protocolProfileBehavior === OBJECT ? definition.protocolProfileBehavior : void 0 + } + ); + }, + Property + ); + _2.assign( + Item.prototype, + /** @lends Item.prototype */ + { + /** + * Defines whether this property instances requires an id + * + * @private + * @readOnly + * @type {Boolean} + */ + _postman_propertyRequiresId: true, + /** + * Fetches applicable AuthType from the current item. + * + * @returns {RequestAuth} + * + * @note Since v3.0 release, this returns the entire auth RequestAuth, instead of just the parameters + * + * @todo Deprecate this and use getAuthResolved instead + */ + getAuth: function() { + var requestAuth; + return (requestAuth = extractAuth(this.request)) ? requestAuth : this.findInParents("auth", extractAuth); + }, + /** + * Fetches protocol profile behavior for the current Item + * + * @private + * @returns {Object} + * + * @note This will not inherit protocol profile behaviors from parent, + * use `getProtocolProfileBehaviorResolved` to achieve that behavior. + */ + getProtocolProfileBehavior: function() { + return extractProtocolProfileBehavior(this); + }, + /** + * Fetches protocol profile behavior applicable for the current Item, + * inherited from parent ItemGroup(s). + * + * @private + * @returns {Object} + */ + getProtocolProfileBehaviorResolved: function() { + var protocolProfileBehavior = extractProtocolProfileBehavior(this); + this.forEachParent({ withRoot: true }, function(entity) { + protocolProfileBehavior = { + ...extractProtocolProfileBehavior(entity), + ...protocolProfileBehavior + }; + }); + return protocolProfileBehavior; + }, + /** + * Set or update protocol profile behavior for the current Item. + * + * @example Set or update protocol profile behavior + * item.setProtocolProfileBehavior('strictSSL', false); + * + * @private + * @param {String} key - protocol profile behavior name + * @param {*} value - protocol profile behavior value + * @returns {Item} + */ + setProtocolProfileBehavior: function(key, value) { + if (typeof key !== STRING) { + return this; + } + !this.protocolProfileBehavior && (this.protocolProfileBehavior = {}); + this.protocolProfileBehavior[key] = value; + return this; + }, + /** + * Unset or delete protocol profile behavior for the current Item. + * + * @example Unset protocol profile behavior + * item.unsetProtocolProfileBehavior('strictSSL'); + * + * @private + * @param {String} key - protocol profile behavior name to unset + * @returns {Item} + */ + unsetProtocolProfileBehavior: function(key) { + if (!(typeof this.protocolProfileBehavior === OBJECT && typeof key === STRING)) { + return this; + } + if (_2.has(this.protocolProfileBehavior, key)) { + delete this.protocolProfileBehavior[key]; + } + return this; + }, + /** + * Returns {@link Event}s corresponding to a particular event name. If no name is given, returns all events. This + * is useful when you want to trigger all associated scripts for an event. + * + * @param {String} name - one of the available event types such as `test`, `prerequest`, `postrequest`, etc. + * @returns {Array} + * + * @example Get all events for an item and evaluate their scripts + * var fs = require('fs'), // needed to read JSON file from disk + * Collection = require('postman-collection').Collection, + * myCollection; + * + * // Load a collection to memory from a JSON file on disk (say, sample-collection.json) + * myCollection = new Collection(JSON.stringify(fs.readFileSync('sample-collection.json').toString())); + * + * // assuming the collection has a request called "my-request-1" in root, we get it's test events + * myCollection.items.one("my-request-1").getEvents("test").forEach(function (event) { + * event.script && eval(event.script.toSource()); + * }); + * + * @todo decide appropriate verb names based on the fact that it gets events for a specific listener name + * @draft + */ + getEvents: function(name) { + if (!name) { + return this.events.all(); + } + return this.events.filter(function(ev) { + return ev.listen === name; + }); + }, + /** + * Sets authentication method for the request within this item + * + * @param {?String|RequestAuth.definition} type - + * @param {VariableList=} [options] - + * + * @note This function was previously (in v2 of SDK) used to clone request and populate headers. Now it is used to + * only set auth information to request + */ + authorizeRequestUsing: function(type, options) { + if (!this.request) { + this.request = new Request(); + } + return this.request.authorizeUsing(type, options); + }, + /** + * Returns the path of the item + * + * @returns {Array} + */ + getPath: function() { + const path = [], pushItem = (item) => { + path.push(item.name); + }; + pushItem(this); + this.forEachParent({ withRoot: true }, pushItem); + return path.reverse(); + } + } + ); + _2.assign( + Item, + /** @lends Item */ + { + /** + * Defines the name of this property for internal use. + * + * @private + * @readOnly + * @type {String} + */ + _postman_propertyName: "Item", + /** + * Check whether an object is an instance of PostmanItem. + * + * @param {*} obj - + * @returns {Boolean} + */ + isItem: function(obj) { + return Boolean(obj) && (obj instanceof Item || _2.inSuperChain(obj.constructor, "_postman_propertyName", Item._postman_propertyName)); + } + } + ); + module2.exports = { + Item + }; + } +}); + +// ../../node_modules/postman-collection/lib/collection/item-group.js +var require_item_group = __commonJS({ + "../../node_modules/postman-collection/lib/collection/item-group.js"(exports2, module2) { + var _2 = require_util2().lodash; + var Property = require_property().Property; + var PropertyList = require_property_list().PropertyList; + var EventList = require_event_list().EventList; + var Item = require_item().Item; + var Request = require_request2().Request; + var RequestAuth = require_request_auth().RequestAuth; + var ItemGroup; + var OBJECT = "object"; + _2.inherit( + /** + * An ItemGroup represents a composite list of {@link Item} or ItemGroup. In terms of Postman App, ItemGroup + * represents a "Folder". This allows one to group Items into subsets that can have their own meaning. An + * ItemGroup also allows one to define a subset of common properties to be applied to each Item within it. For + * example, a `test` event defined on an ItemGroup is executed while testing any Item that belongs to that group. + * Similarly, ItemGroups can have a common {@RequestAuth} defined so that every {@link Request}, when processed, + * requires to be authenticated using the `auth` defined in the group. + * + * Essentially, {@link Collection} too is a special type of ItemGroup ;-). + * + * @constructor + * @extends {Property} + * + * @param {ItemGroup.definition=} [definition] While creating a new instance of ItemGroup, one can provide the + * initial configuration of the item group with the requests it contains, the authentication applied to all + * requests, events that the requests responds to, etc. + * + * @example Add a new ItemGroup to a collection instance + * var Collection = require('postman-collection').Collection, + * ItemGroup = require('postman-collection').ItemGroup, + * myCollection; + * + * myCollection = new Collection(); // create an empty collection + * myCollection.items.add(new ItemGroup({ // add a folder called "blank folder" + * "name": "This is a blank folder" + * })); + */ + ItemGroup = function PostmanItemGroup(definition) { + ItemGroup.super_.apply(this, arguments); + _2.mergeDefined( + this, + /** @lends ItemGroup.prototype */ + { + /** + * This is a {@link PropertyList} that holds the list of {@link Item}s or {@link ItemGroup}s belonging to a + * {@link Collection} or to an {@link ItemGroup}. Operation on an individual item in this list can be + * performed using various functions available to a {@link PropertyList}. + * + * @type {PropertyList<(Item|ItemGroup)>} + * + * @example Fetch empty ItemGroups in a list loaded from a file + * var fs = require('fs'), // needed to read JSON file from disk + * Collection = require('postman-collection').Collection, + * myCollection, + * emptyGroups; + + * // Load a collection to memory from a JSON file on disk (say, sample-collection.json) + * myCollection = new Collection(JSON.stringify(fs.readFileSync('sample-collection.json').toString())); + * + * // Filter items in Collection root that is an empty ItemGroup + * emptyGroups = myCollection.items.filter(function (item) { + * return item && item.items && (item.items.count() === 0); + * }); + * + * // Log the emptyGroups array to check it's contents + * console.log(emptyGroups); + */ + items: new PropertyList(ItemGroup._createNewGroupOrItem, this, definition && definition.item), + /** + * One can define the default authentication method required for every item that belongs to this list. + * Individual {@link Request}s can override this in their own definitions. More on how to define an + * authentication method is outlined in the {@link RequestAuth} property. + * + * @type {RequestAuth} + * + * @example Define an entire ItemGroup (folder) or Collection to follow Basic Auth + * var fs = require('fs'), + * Collection = require('postman-collection').Collection, + * RequestAuth = require('postman-collection').RequestAuth, + * mycollection; + * + * // Create a collection having two requests + * myCollection = new Collection(); + * myCollection.items.add([ + * { name: 'GET Request', request: 'https://postman-echo.com/get?auth=basic' }, + * { name: 'PUT Request', request: 'https://postman-echo.com/put?auth=basic' } + * ]); + * + * // Add basic auth to the Collection, to be applied on all requests. + * myCollection.auth = new RequestAuth({ + * type: 'basic', + * username: 'postman', + * password: 'password' + * }); + */ + // auth is a special case, empty RequestAuth should not be created for falsy values + // to allow inheritance from parent + auth: definition && definition.auth ? new RequestAuth(definition.auth) : void 0, + /** + * In this list, one can define the {@link Script}s to be executed when an event is triggered. Events are + * triggered before certain actions are taken on a Collection, Request, etc. For example, executing a + * request causes the `prerequest` and the `test` events to be triggered. + * + * @type {EventList} + * @memberOf Collection.prototype + * + * @example Executing a common test script for all requests in a collection + * var fs = require('fs'), // needed to read JSON file from disk + * Collection = require('postman-collection').Collection, + * myCollection; + * + * // Load a collection to memory from a JSON file on disk (say, sample-collection.json) + * myCollection = new Collection(JSON.stringify(fs.readFileSync('sample-collection.json').toString())); + * + * // Add an event listener to the collection that listens to the `test` event. + * myCollection.events.add({ + * listen: 'test', + * script: { + * exec: 'tests["Status code is 200"] = (responseCode.code === 200)' + * } + * }); + */ + events: new EventList(this, definition && definition.event), + /** + * Set of configurations used to alter the usual behavior of sending the request. + * + * @type {Object} + * @property {Boolean} disableBodyPruning Disable body pruning for request methods like GET, HEAD etc. + */ + protocolProfileBehavior: definition && typeof definition.protocolProfileBehavior === OBJECT ? definition.protocolProfileBehavior : void 0 + } + ); + }, + Property + ); + _2.assign( + ItemGroup.prototype, + /** @lends ItemGroup.prototype */ + { + /** + * Defines that this property requires an ID field + * + * @private + * @readonly + */ + _postman_propertyRequiresId: true, + /** + * Calls the callback for each item belonging to itself. If any ItemGroups are encountered, + * they will call the callback on their own Items. + * + * @private + * @param {Function} callback - + */ + forEachItem: function forEachItem(callback) { + this.items.each(function(item) { + return ItemGroup.isItemGroup(item) ? item.forEachItem(callback) : callback(item, this); + }, this); + }, + /** + * Calls the callback for each itemgroup belonging to itself. All ItemGroups encountered will also, + * call the callback on their own ItemGroups + * + * @private + * @param {Function} callback - + */ + forEachItemGroup: function forEachItemGroup(callback) { + this.items.each(function(item) { + if (ItemGroup.isItemGroup(item)) { + item.forEachItemGroup(callback); + callback(item, this); + } + }, this); + }, + /** + * Finds the first item with the given name or id in the current ItemGroup. + * + * @param {String} idOrName - + */ + oneDeep: function(idOrName) { + if (!_2.isString(idOrName)) { + return; + } + var item; + this.items.each(function(eachItem) { + if (eachItem.id === idOrName || eachItem.name === idOrName) { + item = eachItem; + return false; + } + if (ItemGroup.isItemGroup(eachItem)) { + item = eachItem.oneDeep(idOrName); + return !item; + } + }); + return item; + }, + /** + * Fetches protocol profile behavior for the current ItemGroup + * + * @private + * @returns {Object} + * + * @note This will not inherit protocol profile behaviors from parent, + * use `getProtocolProfileBehaviorResolved` to achieve that behavior. + */ + getProtocolProfileBehavior: Item.prototype.getProtocolProfileBehavior, + /** + * Fetches protocol profile behavior applicable for the current ItemGroup, + * inherited from parent ItemGroups(s). + * + * @private + * @returns {Object} + */ + getProtocolProfileBehaviorResolved: Item.prototype.getProtocolProfileBehaviorResolved, + /** + * Set or update protocol profile behavior for the current ItemGroup. + * + * @example Set or update protocol profile behavior + * itemGroup.setProtocolProfileBehavior('strictSSL', false); + * + * @private + * @param {String} key - protocol profile behavior name + * @param {*} value - protocol profile behavior value + * @returns {ItemGroup} + */ + setProtocolProfileBehavior: Item.prototype.setProtocolProfileBehavior, + /** + * Unset or delete protocol profile behavior for the current ItemGroup. + * + * @example Unset protocol profile behavior + * itemGroup.unsetProtocolProfileBehavior('strictSSL'); + * + * @private + * @param {String} key - protocol profile behavior name to unset + * @returns {ItemGroup} + */ + unsetProtocolProfileBehavior: Item.prototype.unsetProtocolProfileBehavior, + /** + * Sets authentication method for all the items within this group + * + * @param {?String|RequestAuth.definition} type + * @param {VariableList=} [options] + * + * @note This function was previously (in v2 of SDK) used to clone request and populate headers. Now it is used to + * only set auth information to request + */ + authorizeRequestsUsing: Request.prototype.authorizeUsing + } + ); + _2.assign( + ItemGroup, + /** @lends ItemGroup */ + { + /** + * Defines the name of this property for internal use. + * + * @private + * @readOnly + * @type {String} + */ + _postman_propertyName: "ItemGroup", + /** + * Iterator function to update an itemgroup's item array with appropriate objects from definition. + * + * @private + * @this {ItemGroup} + * @param {Object} item - the definition of an item or group + * @returns {ItemGroup|Item} + * @note + * This function is intended to be used in scope of an instance of a {@link ItemGroup). + */ + _createNewGroupOrItem: function(item) { + if (Item.isItem(item) || ItemGroup.isItemGroup(item)) { + return item; + } + return item && item.item ? new ItemGroup(item) : new Item(item); + }, + /** + * Check whether an object is an instance of {@link ItemGroup}. + * + * @param {*} obj - + * @returns {Boolean} + */ + isItemGroup: function(obj) { + return Boolean(obj) && (obj instanceof ItemGroup || _2.inSuperChain(obj.constructor, "_postman_propertyName", ItemGroup._postman_propertyName)); + } + } + ); + module2.exports = { + ItemGroup + }; + } +}); + +// ../../node_modules/semver/internal/constants.js +var require_constants = __commonJS({ + "../../node_modules/semver/internal/constants.js"(exports2, module2) { + var SEMVER_SPEC_VERSION = "2.0.0"; + var MAX_LENGTH = 256; + var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */ + 9007199254740991; + var MAX_SAFE_COMPONENT_LENGTH = 16; + var MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6; + var RELEASE_TYPES = [ + "major", + "premajor", + "minor", + "preminor", + "patch", + "prepatch", + "prerelease" + ]; + module2.exports = { + MAX_LENGTH, + MAX_SAFE_COMPONENT_LENGTH, + MAX_SAFE_BUILD_LENGTH, + MAX_SAFE_INTEGER, + RELEASE_TYPES, + SEMVER_SPEC_VERSION, + FLAG_INCLUDE_PRERELEASE: 1, + FLAG_LOOSE: 2 + }; + } +}); + +// ../../node_modules/semver/internal/debug.js +var require_debug = __commonJS({ + "../../node_modules/semver/internal/debug.js"(exports2, module2) { + var debug = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => { + }; + module2.exports = debug; + } +}); + +// ../../node_modules/semver/internal/re.js +var require_re = __commonJS({ + "../../node_modules/semver/internal/re.js"(exports2, module2) { + var { + MAX_SAFE_COMPONENT_LENGTH, + MAX_SAFE_BUILD_LENGTH, + MAX_LENGTH + } = require_constants(); + var debug = require_debug(); + exports2 = module2.exports = {}; + var re = exports2.re = []; + var safeRe = exports2.safeRe = []; + var src = exports2.src = []; + var t = exports2.t = {}; + var R = 0; + var LETTERDASHNUMBER = "[a-zA-Z0-9-]"; + var safeRegexReplacements = [ + ["\\s", 1], + ["\\d", MAX_LENGTH], + [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH] + ]; + var makeSafeRegex = (value) => { + for (const [token, max] of safeRegexReplacements) { + value = value.split(`${token}*`).join(`${token}{0,${max}}`).split(`${token}+`).join(`${token}{1,${max}}`); + } + return value; + }; + var createToken = (name, value, isGlobal) => { + const safe = makeSafeRegex(value); + const index = R++; + debug(name, index, value); + t[name] = index; + src[index] = value; + re[index] = new RegExp(value, isGlobal ? "g" : void 0); + safeRe[index] = new RegExp(safe, isGlobal ? "g" : void 0); + }; + createToken("NUMERICIDENTIFIER", "0|[1-9]\\d*"); + createToken("NUMERICIDENTIFIERLOOSE", "\\d+"); + createToken("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`); + createToken("MAINVERSION", `(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})`); + createToken("MAINVERSIONLOOSE", `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})`); + createToken("PRERELEASEIDENTIFIER", `(?:${src[t.NUMERICIDENTIFIER]}|${src[t.NONNUMERICIDENTIFIER]})`); + createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src[t.NUMERICIDENTIFIERLOOSE]}|${src[t.NONNUMERICIDENTIFIER]})`); + createToken("PRERELEASE", `(?:-(${src[t.PRERELEASEIDENTIFIER]}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`); + createToken("PRERELEASELOOSE", `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`); + createToken("BUILDIDENTIFIER", `${LETTERDASHNUMBER}+`); + createToken("BUILD", `(?:\\+(${src[t.BUILDIDENTIFIER]}(?:\\.${src[t.BUILDIDENTIFIER]})*))`); + createToken("FULLPLAIN", `v?${src[t.MAINVERSION]}${src[t.PRERELEASE]}?${src[t.BUILD]}?`); + createToken("FULL", `^${src[t.FULLPLAIN]}$`); + createToken("LOOSEPLAIN", `[v=\\s]*${src[t.MAINVERSIONLOOSE]}${src[t.PRERELEASELOOSE]}?${src[t.BUILD]}?`); + createToken("LOOSE", `^${src[t.LOOSEPLAIN]}$`); + createToken("GTLT", "((?:<|>)?=?)"); + createToken("XRANGEIDENTIFIERLOOSE", `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`); + createToken("XRANGEIDENTIFIER", `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`); + createToken("XRANGEPLAIN", `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:${src[t.PRERELEASE]})?${src[t.BUILD]}?)?)?`); + createToken("XRANGEPLAINLOOSE", `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:${src[t.PRERELEASELOOSE]})?${src[t.BUILD]}?)?)?`); + createToken("XRANGE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`); + createToken("XRANGELOOSE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`); + createToken("COERCEPLAIN", `${"(^|[^\\d])(\\d{1,"}${MAX_SAFE_COMPONENT_LENGTH}})(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`); + createToken("COERCE", `${src[t.COERCEPLAIN]}(?:$|[^\\d])`); + createToken("COERCEFULL", src[t.COERCEPLAIN] + `(?:${src[t.PRERELEASE]})?(?:${src[t.BUILD]})?(?:$|[^\\d])`); + createToken("COERCERTL", src[t.COERCE], true); + createToken("COERCERTLFULL", src[t.COERCEFULL], true); + createToken("LONETILDE", "(?:~>?)"); + createToken("TILDETRIM", `(\\s*)${src[t.LONETILDE]}\\s+`, true); + exports2.tildeTrimReplace = "$1~"; + createToken("TILDE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`); + createToken("TILDELOOSE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`); + createToken("LONECARET", "(?:\\^)"); + createToken("CARETTRIM", `(\\s*)${src[t.LONECARET]}\\s+`, true); + exports2.caretTrimReplace = "$1^"; + createToken("CARET", `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`); + createToken("CARETLOOSE", `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`); + createToken("COMPARATORLOOSE", `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`); + createToken("COMPARATOR", `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`); + createToken("COMPARATORTRIM", `(\\s*)${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true); + exports2.comparatorTrimReplace = "$1$2$3"; + createToken("HYPHENRANGE", `^\\s*(${src[t.XRANGEPLAIN]})\\s+-\\s+(${src[t.XRANGEPLAIN]})\\s*$`); + createToken("HYPHENRANGELOOSE", `^\\s*(${src[t.XRANGEPLAINLOOSE]})\\s+-\\s+(${src[t.XRANGEPLAINLOOSE]})\\s*$`); + createToken("STAR", "(<|>)?=?\\s*\\*"); + createToken("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$"); + createToken("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$"); + } +}); + +// ../../node_modules/semver/internal/parse-options.js +var require_parse_options = __commonJS({ + "../../node_modules/semver/internal/parse-options.js"(exports2, module2) { + var looseOption = Object.freeze({ loose: true }); + var emptyOpts = Object.freeze({}); + var parseOptions = (options) => { + if (!options) { + return emptyOpts; + } + if (typeof options !== "object") { + return looseOption; + } + return options; + }; + module2.exports = parseOptions; + } +}); + +// ../../node_modules/semver/internal/identifiers.js +var require_identifiers = __commonJS({ + "../../node_modules/semver/internal/identifiers.js"(exports2, module2) { + var numeric = /^[0-9]+$/; + var 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; + }; + var rcompareIdentifiers = (a, b) => compareIdentifiers(b, a); + module2.exports = { + compareIdentifiers, + rcompareIdentifiers + }; + } +}); + +// ../../node_modules/semver/classes/semver.js +var require_semver = __commonJS({ + "../../node_modules/semver/classes/semver.js"(exports2, module2) { + var debug = require_debug(); + var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants(); + var { safeRe: re, t } = require_re(); + var parseOptions = require_parse_options(); + var { compareIdentifiers } = require_identifiers(); + var SemVer = class _SemVer { + constructor(version2, options) { + options = parseOptions(options); + if (version2 instanceof _SemVer) { + if (version2.loose === !!options.loose && version2.includePrerelease === !!options.includePrerelease) { + return version2; + } else { + version2 = version2.version; + } + } else if (typeof version2 !== "string") { + throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version2}".`); + } + if (version2.length > MAX_LENGTH) { + throw new TypeError( + `version is longer than ${MAX_LENGTH} characters` + ); + } + debug("SemVer", version2, options); + this.options = options; + this.loose = !!options.loose; + this.includePrerelease = !!options.includePrerelease; + const m = version2.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]); + if (!m) { + throw new TypeError(`Invalid Version: ${version2}`); + } + this.raw = version2; + this.major = +m[1]; + this.minor = +m[2]; + this.patch = +m[3]; + if (this.major > MAX_SAFE_INTEGER || this.major < 0) { + throw new TypeError("Invalid major version"); + } + if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) { + throw new TypeError("Invalid minor version"); + } + if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) { + throw new TypeError("Invalid patch version"); + } + if (!m[4]) { + this.prerelease = []; + } else { + this.prerelease = m[4].split(".").map((id) => { + if (/^[0-9]+$/.test(id)) { + const num = +id; + if (num >= 0 && num < MAX_SAFE_INTEGER) { + return num; + } + } + return id; + }); + } + this.build = m[5] ? m[5].split(".") : []; + this.format(); + } + format() { + this.version = `${this.major}.${this.minor}.${this.patch}`; + if (this.prerelease.length) { + this.version += `-${this.prerelease.join(".")}`; + } + return this.version; + } + toString() { + return this.version; + } + compare(other) { + debug("SemVer.compare", this.version, this.options, other); + if (!(other instanceof _SemVer)) { + if (typeof other === "string" && other === this.version) { + return 0; + } + other = new _SemVer(other, this.options); + } + if (other.version === this.version) { + return 0; + } + return this.compareMain(other) || this.comparePre(other); + } + compareMain(other) { + if (!(other instanceof _SemVer)) { + other = new _SemVer(other, this.options); + } + 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); + } + if (this.prerelease.length && !other.prerelease.length) { + return -1; + } else if (!this.prerelease.length && other.prerelease.length) { + return 1; + } else if (!this.prerelease.length && !other.prerelease.length) { + return 0; + } + let i = 0; + do { + const a = this.prerelease[i]; + const b = other.prerelease[i]; + debug("prerelease compare", i, a, b); + if (a === void 0 && b === void 0) { + return 0; + } else if (b === void 0) { + return 1; + } else if (a === void 0) { + return -1; + } else if (a === b) { + continue; + } else { + return compareIdentifiers(a, b); + } + } while (++i); + } + compareBuild(other) { + if (!(other instanceof _SemVer)) { + other = new _SemVer(other, this.options); + } + let i = 0; + do { + const a = this.build[i]; + const b = other.build[i]; + debug("build compare", i, a, b); + if (a === void 0 && b === void 0) { + return 0; + } else if (b === void 0) { + return 1; + } else if (a === void 0) { + return -1; + } else if (a === b) { + continue; + } else { + return compareIdentifiers(a, b); + } + } while (++i); + } + // 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) { + switch (release) { + case "premajor": + this.prerelease.length = 0; + this.patch = 0; + this.minor = 0; + this.major++; + this.inc("pre", identifier, identifierBase); + break; + case "preminor": + this.prerelease.length = 0; + this.patch = 0; + this.minor++; + this.inc("pre", identifier, identifierBase); + break; + case "prepatch": + this.prerelease.length = 0; + this.inc("patch", identifier, identifierBase); + this.inc("pre", identifier, identifierBase); + break; + case "prerelease": + if (this.prerelease.length === 0) { + this.inc("patch", identifier, identifierBase); + } + this.inc("pre", identifier, identifierBase); + break; + case "major": + if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) { + this.major++; + } + this.minor = 0; + this.patch = 0; + this.prerelease = []; + break; + case "minor": + if (this.patch !== 0 || this.prerelease.length === 0) { + this.minor++; + } + this.patch = 0; + this.prerelease = []; + break; + case "patch": + if (this.prerelease.length === 0) { + this.patch++; + } + this.prerelease = []; + break; + case "pre": { + const base = Number(identifierBase) ? 1 : 0; + if (!identifier && identifierBase === false) { + throw new Error("invalid increment argument: identifier is empty"); + } + if (this.prerelease.length === 0) { + this.prerelease = [base]; + } else { + let i = this.prerelease.length; + while (--i >= 0) { + if (typeof this.prerelease[i] === "number") { + this.prerelease[i]++; + i = -2; + } + } + if (i === -1) { + if (identifier === this.prerelease.join(".") && identifierBase === false) { + throw new Error("invalid increment argument: identifier already exists"); + } + this.prerelease.push(base); + } + } + if (identifier) { + let prerelease = [identifier, base]; + if (identifierBase === false) { + prerelease = [identifier]; + } + if (compareIdentifiers(this.prerelease[0], identifier) === 0) { + if (isNaN(this.prerelease[1])) { + this.prerelease = prerelease; + } + } else { + this.prerelease = prerelease; + } + } + break; + } + default: + throw new Error(`invalid increment argument: ${release}`); + } + this.raw = this.format(); + if (this.build.length) { + this.raw += `+${this.build.join(".")}`; + } + return this; + } + }; + module2.exports = SemVer; + } +}); + +// ../../node_modules/semver/functions/parse.js +var require_parse3 = __commonJS({ + "../../node_modules/semver/functions/parse.js"(exports2, module2) { + var SemVer = require_semver(); + var parse2 = (version2, options, throwErrors = false) => { + if (version2 instanceof SemVer) { + return version2; + } + try { + return new SemVer(version2, options); + } catch (er) { + if (!throwErrors) { + return null; + } + throw er; + } + }; + module2.exports = parse2; + } +}); + +// ../../node_modules/semver/functions/valid.js +var require_valid = __commonJS({ + "../../node_modules/semver/functions/valid.js"(exports2, module2) { + var parse2 = require_parse3(); + var valid = (version2, options) => { + const v = parse2(version2, options); + return v ? v.version : null; + }; + module2.exports = valid; + } +}); + +// ../../node_modules/semver/functions/clean.js +var require_clean = __commonJS({ + "../../node_modules/semver/functions/clean.js"(exports2, module2) { + var parse2 = require_parse3(); + var clean = (version2, options) => { + const s = parse2(version2.trim().replace(/^[=v]+/, ""), options); + return s ? s.version : null; + }; + module2.exports = clean; + } +}); + +// ../../node_modules/semver/functions/inc.js +var require_inc = __commonJS({ + "../../node_modules/semver/functions/inc.js"(exports2, module2) { + var SemVer = require_semver(); + var inc = (version2, release, options, identifier, identifierBase) => { + if (typeof options === "string") { + identifierBase = identifier; + identifier = options; + options = void 0; + } + try { + return new SemVer( + version2 instanceof SemVer ? version2.version : version2, + options + ).inc(release, identifier, identifierBase).version; + } catch (er) { + return null; + } + }; + module2.exports = inc; + } +}); + +// ../../node_modules/semver/functions/diff.js +var require_diff = __commonJS({ + "../../node_modules/semver/functions/diff.js"(exports2, module2) { + var parse2 = require_parse3(); + var diff = (version1, version2) => { + const v12 = parse2(version1, null, true); + const v2 = parse2(version2, null, true); + const comparison = v12.compare(v2); + if (comparison === 0) { + return null; + } + const v1Higher = comparison > 0; + const highVersion = v1Higher ? v12 : v2; + const lowVersion = v1Higher ? v2 : v12; + const highHasPre = !!highVersion.prerelease.length; + const lowHasPre = !!lowVersion.prerelease.length; + if (lowHasPre && !highHasPre) { + if (!lowVersion.patch && !lowVersion.minor) { + return "major"; + } + if (highVersion.patch) { + return "patch"; + } + if (highVersion.minor) { + return "minor"; + } + return "major"; + } + const prefix = highHasPre ? "pre" : ""; + if (v12.major !== v2.major) { + return prefix + "major"; + } + if (v12.minor !== v2.minor) { + return prefix + "minor"; + } + if (v12.patch !== v2.patch) { + return prefix + "patch"; + } + return "prerelease"; + }; + module2.exports = diff; + } +}); + +// ../../node_modules/semver/functions/major.js +var require_major = __commonJS({ + "../../node_modules/semver/functions/major.js"(exports2, module2) { + var SemVer = require_semver(); + var major = (a, loose) => new SemVer(a, loose).major; + module2.exports = major; + } +}); + +// ../../node_modules/semver/functions/minor.js +var require_minor = __commonJS({ + "../../node_modules/semver/functions/minor.js"(exports2, module2) { + var SemVer = require_semver(); + var minor = (a, loose) => new SemVer(a, loose).minor; + module2.exports = minor; + } +}); + +// ../../node_modules/semver/functions/patch.js +var require_patch = __commonJS({ + "../../node_modules/semver/functions/patch.js"(exports2, module2) { + var SemVer = require_semver(); + var patch = (a, loose) => new SemVer(a, loose).patch; + module2.exports = patch; + } +}); + +// ../../node_modules/semver/functions/prerelease.js +var require_prerelease = __commonJS({ + "../../node_modules/semver/functions/prerelease.js"(exports2, module2) { + var parse2 = require_parse3(); + var prerelease = (version2, options) => { + const parsed = parse2(version2, options); + return parsed && parsed.prerelease.length ? parsed.prerelease : null; + }; + module2.exports = prerelease; + } +}); + +// ../../node_modules/semver/functions/compare.js +var require_compare = __commonJS({ + "../../node_modules/semver/functions/compare.js"(exports2, module2) { + var SemVer = require_semver(); + var compare = (a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose)); + module2.exports = compare; + } +}); + +// ../../node_modules/semver/functions/rcompare.js +var require_rcompare = __commonJS({ + "../../node_modules/semver/functions/rcompare.js"(exports2, module2) { + var compare = require_compare(); + var rcompare = (a, b, loose) => compare(b, a, loose); + module2.exports = rcompare; + } +}); + +// ../../node_modules/semver/functions/compare-loose.js +var require_compare_loose = __commonJS({ + "../../node_modules/semver/functions/compare-loose.js"(exports2, module2) { + var compare = require_compare(); + var compareLoose = (a, b) => compare(a, b, true); + module2.exports = compareLoose; + } +}); + +// ../../node_modules/semver/functions/compare-build.js +var require_compare_build = __commonJS({ + "../../node_modules/semver/functions/compare-build.js"(exports2, module2) { + var SemVer = require_semver(); + var compareBuild = (a, b, loose) => { + const versionA = new SemVer(a, loose); + const versionB = new SemVer(b, loose); + return versionA.compare(versionB) || versionA.compareBuild(versionB); + }; + module2.exports = compareBuild; + } +}); + +// ../../node_modules/semver/functions/sort.js +var require_sort = __commonJS({ + "../../node_modules/semver/functions/sort.js"(exports2, module2) { + var compareBuild = require_compare_build(); + var sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose)); + module2.exports = sort; + } +}); + +// ../../node_modules/semver/functions/rsort.js +var require_rsort = __commonJS({ + "../../node_modules/semver/functions/rsort.js"(exports2, module2) { + var compareBuild = require_compare_build(); + var rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose)); + module2.exports = rsort; + } +}); + +// ../../node_modules/semver/functions/gt.js +var require_gt = __commonJS({ + "../../node_modules/semver/functions/gt.js"(exports2, module2) { + var compare = require_compare(); + var gt = (a, b, loose) => compare(a, b, loose) > 0; + module2.exports = gt; + } +}); + +// ../../node_modules/semver/functions/lt.js +var require_lt = __commonJS({ + "../../node_modules/semver/functions/lt.js"(exports2, module2) { + var compare = require_compare(); + var lt = (a, b, loose) => compare(a, b, loose) < 0; + module2.exports = lt; + } +}); + +// ../../node_modules/semver/functions/eq.js +var require_eq = __commonJS({ + "../../node_modules/semver/functions/eq.js"(exports2, module2) { + var compare = require_compare(); + var eq = (a, b, loose) => compare(a, b, loose) === 0; + module2.exports = eq; + } +}); + +// ../../node_modules/semver/functions/neq.js +var require_neq = __commonJS({ + "../../node_modules/semver/functions/neq.js"(exports2, module2) { + var compare = require_compare(); + var neq = (a, b, loose) => compare(a, b, loose) !== 0; + module2.exports = neq; + } +}); + +// ../../node_modules/semver/functions/gte.js +var require_gte = __commonJS({ + "../../node_modules/semver/functions/gte.js"(exports2, module2) { + var compare = require_compare(); + var gte = (a, b, loose) => compare(a, b, loose) >= 0; + module2.exports = gte; + } +}); + +// ../../node_modules/semver/functions/lte.js +var require_lte = __commonJS({ + "../../node_modules/semver/functions/lte.js"(exports2, module2) { + var compare = require_compare(); + var lte = (a, b, loose) => compare(a, b, loose) <= 0; + module2.exports = lte; + } +}); + +// ../../node_modules/semver/functions/cmp.js +var require_cmp = __commonJS({ + "../../node_modules/semver/functions/cmp.js"(exports2, module2) { + var eq = require_eq(); + var neq = require_neq(); + var gt = require_gt(); + var gte = require_gte(); + var lt = require_lt(); + var lte = require_lte(); + var 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}`); + } + }; + module2.exports = cmp; + } +}); + +// ../../node_modules/semver/functions/coerce.js +var require_coerce = __commonJS({ + "../../node_modules/semver/functions/coerce.js"(exports2, module2) { + var SemVer = require_semver(); + var parse2 = require_parse3(); + var { safeRe: re, t } = require_re(); + var coerce = (version2, options) => { + if (version2 instanceof SemVer) { + return version2; + } + if (typeof version2 === "number") { + version2 = String(version2); + } + if (typeof version2 !== "string") { + return null; + } + options = options || {}; + let match = null; + if (!options.rtl) { + match = version2.match(options.includePrerelease ? re[t.COERCEFULL] : re[t.COERCE]); + } else { + const coerceRtlRegex = options.includePrerelease ? re[t.COERCERTLFULL] : re[t.COERCERTL]; + let next; + while ((next = coerceRtlRegex.exec(version2)) && (!match || match.index + match[0].length !== version2.length)) { + if (!match || next.index + next[0].length !== match.index + match[0].length) { + match = next; + } + coerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length; + } + coerceRtlRegex.lastIndex = -1; + } + if (match === null) { + return null; + } + const major = match[2]; + 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 parse2(`${major}.${minor}.${patch}${prerelease}${build}`, options); + }; + module2.exports = coerce; + } +}); + +// ../../node_modules/semver/internal/lrucache.js +var require_lrucache = __commonJS({ + "../../node_modules/semver/internal/lrucache.js"(exports2, module2) { + var LRUCache = class { + constructor() { + this.max = 1e3; + this.map = /* @__PURE__ */ new Map(); + } + get(key) { + const value = this.map.get(key); + if (value === void 0) { + return void 0; + } else { + 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 !== void 0) { + if (this.map.size >= this.max) { + const firstKey = this.map.keys().next().value; + this.delete(firstKey); + } + this.map.set(key, value); + } + return this; + } + }; + module2.exports = LRUCache; + } +}); + +// ../../node_modules/semver/classes/range.js +var require_range = __commonJS({ + "../../node_modules/semver/classes/range.js"(exports2, module2) { + var SPACE_CHARACTERS = /\s+/g; + var Range = class _Range { + constructor(range, options) { + options = parseOptions(options); + if (range instanceof _Range) { + if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) { + return range; + } else { + return new _Range(range.raw, options); + } + } + if (range instanceof Comparator) { + this.raw = range.value; + this.set = [[range]]; + this.formatted = void 0; + return this; + } + this.options = options; + this.loose = !!options.loose; + this.includePrerelease = !!options.includePrerelease; + this.raw = range.trim().replace(SPACE_CHARACTERS, " "); + this.set = this.raw.split("||").map((r) => this.parseRange(r.trim())).filter((c) => c.length); + if (!this.set.length) { + throw new TypeError(`Invalid SemVer Range: ${this.raw}`); + } + if (this.set.length > 1) { + const first = this.set[0]; + this.set = this.set.filter((c) => !isNullSet(c[0])); + if (this.set.length === 0) { + this.set = [first]; + } else if (this.set.length > 1) { + for (const c of this.set) { + if (c.length === 1 && isAny(c[0])) { + this.set = [c]; + break; + } + } + } + } + this.formatted = void 0; + } + get range() { + if (this.formatted === void 0) { + this.formatted = ""; + for (let i = 0; i < this.set.length; i++) { + if (i > 0) { + this.formatted += "||"; + } + const comps = this.set[i]; + for (let k = 0; k < comps.length; k++) { + if (k > 0) { + this.formatted += " "; + } + this.formatted += comps[k].toString().trim(); + } + } + } + return this.formatted; + } + format() { + return this.range; + } + toString() { + return this.range; + } + parseRange(range) { + 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; + const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE]; + range = range.replace(hr, hyphenReplace(this.options.includePrerelease)); + debug("hyphen replace", range); + range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace); + debug("comparator trim", range); + range = range.replace(re[t.TILDETRIM], tildeTrimReplace); + debug("tilde trim", range); + range = range.replace(re[t.CARETTRIM], caretTrimReplace); + debug("caret trim", range); + let rangeList = range.split(" ").map((comp) => parseComparator(comp, this.options)).join(" ").split(/\s+/).map((comp) => replaceGTE0(comp, this.options)); + if (loose) { + rangeList = rangeList.filter((comp) => { + debug("loose invalid filter", comp, this.options); + return !!comp.match(re[t.COMPARATORLOOSE]); + }); + } + debug("range list", rangeList); + const rangeMap = /* @__PURE__ */ new Map(); + const comparators = rangeList.map((comp) => new Comparator(comp, this.options)); + for (const comp of comparators) { + if (isNullSet(comp)) { + return [comp]; + } + rangeMap.set(comp.value, comp); + } + if (rangeMap.size > 1 && rangeMap.has("")) { + rangeMap.delete(""); + } + const result = [...rangeMap.values()]; + cache.set(memoKey, result); + return result; + } + intersects(range, options) { + if (!(range instanceof _Range)) { + throw new TypeError("a Range is required"); + } + return this.set.some((thisComparators) => { + return isSatisfiable(thisComparators, options) && range.set.some((rangeComparators) => { + return isSatisfiable(rangeComparators, options) && thisComparators.every((thisComparator) => { + return rangeComparators.every((rangeComparator) => { + return thisComparator.intersects(rangeComparator, options); + }); + }); + }); + }); + } + // if ANY of the sets match ALL of its comparators, then pass + test(version2) { + if (!version2) { + return false; + } + if (typeof version2 === "string") { + try { + version2 = new SemVer(version2, this.options); + } catch (er) { + return false; + } + } + for (let i = 0; i < this.set.length; i++) { + if (testSet(this.set[i], version2, this.options)) { + return true; + } + } + return false; + } + }; + module2.exports = Range; + var LRU = require_lrucache(); + var cache = new LRU(); + var parseOptions = require_parse_options(); + var Comparator = require_comparator(); + var debug = require_debug(); + var SemVer = require_semver(); + var { + safeRe: re, + t, + comparatorTrimReplace, + tildeTrimReplace, + caretTrimReplace + } = require_re(); + var { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require_constants(); + var isNullSet = (c) => c.value === "<0.0.0-0"; + var isAny = (c) => c.value === ""; + var 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; + }; + var 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; + }; + var isX = (id) => !id || id.toLowerCase() === "x" || id === "*"; + var replaceTildes = (comp, options) => { + return comp.trim().split(/\s+/).map((c) => replaceTilde(c, options)).join(" "); + }; + var replaceTilde = (comp, options) => { + const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE]; + return comp.replace(r, (_2, M, m, p, pr) => { + debug("tilde", comp, _2, 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)) { + 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 { + ret = `>=${M}.${m}.${p} <${M}.${+m + 1}.0-0`; + } + debug("tilde return", ret); + return ret; + }); + }; + var replaceCarets = (comp, options) => { + return comp.trim().split(/\s+/).map((c) => replaceCaret(c, options)).join(" "); + }; + var 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, (_2, M, m, p, pr) => { + debug("caret", comp, _2, 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; + }); + }; + var replaceXRanges = (comp, options) => { + debug("replaceXRanges", comp, options); + return comp.split(/\s+/).map((c) => replaceXRange(c, options)).join(" "); + }; + var 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 = ""; + } + pr = options.includePrerelease ? "-0" : ""; + if (xM) { + if (gtlt === ">" || gtlt === "<") { + ret = "<0.0.0-0"; + } else { + ret = "*"; + } + } else if (gtlt && anyX) { + if (xm) { + m = 0; + } + p = 0; + if (gtlt === ">") { + gtlt = ">="; + if (xm) { + M = +M + 1; + m = 0; + p = 0; + } else { + m = +m + 1; + p = 0; + } + } else if (gtlt === "<=") { + gtlt = "<"; + if (xm) { + M = +M + 1; + } else { + m = +m + 1; + } + } + if (gtlt === "<") { + pr = "-0"; + } + ret = `${gtlt + M}.${m}.${p}${pr}`; + } else if (xm) { + ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`; + } else if (xp) { + ret = `>=${M}.${m}.0${pr} <${M}.${+m + 1}.0-0`; + } + debug("xRange return", ret); + return ret; + }); + }; + var replaceStars = (comp, options) => { + debug("replaceStars", comp, options); + return comp.trim().replace(re[t.STAR], ""); + }; + var replaceGTE0 = (comp, options) => { + debug("replaceGTE0", comp, options); + return comp.trim().replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], ""); + }; + var 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(); + }; + var testSet = (set, version2, options) => { + for (let i = 0; i < set.length; i++) { + if (!set[i].test(version2)) { + return false; + } + } + if (version2.prerelease.length && !options.includePrerelease) { + for (let i = 0; i < set.length; i++) { + debug(set[i].semver); + if (set[i].semver === Comparator.ANY) { + continue; + } + if (set[i].semver.prerelease.length > 0) { + const allowed = set[i].semver; + if (allowed.major === version2.major && allowed.minor === version2.minor && allowed.patch === version2.patch) { + return true; + } + } + } + return false; + } + return true; + }; + } +}); + +// ../../node_modules/semver/classes/comparator.js +var require_comparator = __commonJS({ + "../../node_modules/semver/classes/comparator.js"(exports2, module2) { + var ANY = Symbol("SemVer ANY"); + var Comparator = class _Comparator { + static get ANY() { + return ANY; + } + constructor(comp, options) { + options = parseOptions(options); + if (comp instanceof _Comparator) { + if (comp.loose === !!options.loose) { + return comp; + } else { + comp = comp.value; + } + } + comp = comp.trim().split(/\s+/).join(" "); + debug("comparator", comp, options); + this.options = options; + this.loose = !!options.loose; + this.parse(comp); + if (this.semver === ANY) { + this.value = ""; + } else { + this.value = this.operator + this.semver.version; + } + debug("comp", this); + } + parse(comp) { + const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]; + const m = comp.match(r); + if (!m) { + throw new TypeError(`Invalid comparator: ${comp}`); + } + this.operator = m[1] !== void 0 ? m[1] : ""; + if (this.operator === "=") { + this.operator = ""; + } + if (!m[2]) { + this.semver = ANY; + } else { + this.semver = new SemVer(m[2], this.options.loose); + } + } + toString() { + return this.value; + } + test(version2) { + debug("Comparator.test", version2, this.options.loose); + if (this.semver === ANY || version2 === ANY) { + return true; + } + if (typeof version2 === "string") { + try { + version2 = new SemVer(version2, this.options); + } catch (er) { + return false; + } + } + return cmp(version2, this.operator, this.semver, this.options); + } + intersects(comp, options) { + if (!(comp instanceof _Comparator)) { + throw new TypeError("a Comparator is required"); + } + if (this.operator === "") { + if (this.value === "") { + return true; + } + return new Range(comp.value, options).test(this.value); + } else if (comp.operator === "") { + if (comp.value === "") { + return true; + } + return new Range(this.value, options).test(comp.semver); + } + options = parseOptions(options); + if (options.includePrerelease && (this.value === "<0.0.0-0" || comp.value === "<0.0.0-0")) { + return false; + } + if (!options.includePrerelease && (this.value.startsWith("<0.0.0") || comp.value.startsWith("<0.0.0"))) { + return false; + } + if (this.operator.startsWith(">") && comp.operator.startsWith(">")) { + return true; + } + if (this.operator.startsWith("<") && comp.operator.startsWith("<")) { + return true; + } + if (this.semver.version === comp.semver.version && this.operator.includes("=") && comp.operator.includes("=")) { + return true; + } + if (cmp(this.semver, "<", comp.semver, options) && this.operator.startsWith(">") && comp.operator.startsWith("<")) { + return true; + } + if (cmp(this.semver, ">", comp.semver, options) && this.operator.startsWith("<") && comp.operator.startsWith(">")) { + return true; + } + return false; + } + }; + module2.exports = Comparator; + var parseOptions = require_parse_options(); + var { safeRe: re, t } = require_re(); + var cmp = require_cmp(); + var debug = require_debug(); + var SemVer = require_semver(); + var Range = require_range(); + } +}); + +// ../../node_modules/semver/functions/satisfies.js +var require_satisfies = __commonJS({ + "../../node_modules/semver/functions/satisfies.js"(exports2, module2) { + var Range = require_range(); + var satisfies = (version2, range, options) => { + try { + range = new Range(range, options); + } catch (er) { + return false; + } + return range.test(version2); + }; + module2.exports = satisfies; + } +}); + +// ../../node_modules/semver/ranges/to-comparators.js +var require_to_comparators = __commonJS({ + "../../node_modules/semver/ranges/to-comparators.js"(exports2, module2) { + var Range = require_range(); + var toComparators = (range, options) => new Range(range, options).set.map((comp) => comp.map((c) => c.value).join(" ").trim().split(" ")); + module2.exports = toComparators; + } +}); + +// ../../node_modules/semver/ranges/max-satisfying.js +var require_max_satisfying = __commonJS({ + "../../node_modules/semver/ranges/max-satisfying.js"(exports2, module2) { + var SemVer = require_semver(); + var Range = require_range(); + var maxSatisfying = (versions, range, options) => { + let max = null; + let maxSV = null; + let rangeObj = null; + try { + rangeObj = new Range(range, options); + } catch (er) { + return null; + } + versions.forEach((v) => { + if (rangeObj.test(v)) { + if (!max || maxSV.compare(v) === -1) { + max = v; + maxSV = new SemVer(max, options); + } + } + }); + return max; + }; + module2.exports = maxSatisfying; + } +}); + +// ../../node_modules/semver/ranges/min-satisfying.js +var require_min_satisfying = __commonJS({ + "../../node_modules/semver/ranges/min-satisfying.js"(exports2, module2) { + var SemVer = require_semver(); + var Range = require_range(); + var minSatisfying = (versions, range, options) => { + let min = null; + let minSV = null; + let rangeObj = null; + try { + rangeObj = new Range(range, options); + } catch (er) { + return null; + } + versions.forEach((v) => { + if (rangeObj.test(v)) { + if (!min || minSV.compare(v) === 1) { + min = v; + minSV = new SemVer(min, options); + } + } + }); + return min; + }; + module2.exports = minSatisfying; + } +}); + +// ../../node_modules/semver/ranges/min-version.js +var require_min_version = __commonJS({ + "../../node_modules/semver/ranges/min-version.js"(exports2, module2) { + var SemVer = require_semver(); + var Range = require_range(); + var gt = require_gt(); + var minVersion = (range, loose) => { + range = new Range(range, loose); + let minver = new SemVer("0.0.0"); + if (range.test(minver)) { + return minver; + } + minver = new SemVer("0.0.0-0"); + if (range.test(minver)) { + return minver; + } + minver = null; + for (let i = 0; i < range.set.length; ++i) { + const comparators = range.set[i]; + let setMin = null; + comparators.forEach((comparator) => { + const compver = new SemVer(comparator.semver.version); + switch (comparator.operator) { + case ">": + if (compver.prerelease.length === 0) { + compver.patch++; + } else { + compver.prerelease.push(0); + } + compver.raw = compver.format(); + case "": + case ">=": + if (!setMin || gt(compver, setMin)) { + setMin = compver; + } + break; + case "<": + case "<=": + break; + 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; + }; + module2.exports = minVersion; + } +}); + +// ../../node_modules/semver/ranges/valid.js +var require_valid2 = __commonJS({ + "../../node_modules/semver/ranges/valid.js"(exports2, module2) { + var Range = require_range(); + var validRange = (range, options) => { + try { + return new Range(range, options).range || "*"; + } catch (er) { + return null; + } + }; + module2.exports = validRange; + } +}); + +// ../../node_modules/semver/ranges/outside.js +var require_outside = __commonJS({ + "../../node_modules/semver/ranges/outside.js"(exports2, module2) { + var SemVer = require_semver(); + var Comparator = require_comparator(); + var { ANY } = Comparator; + var Range = require_range(); + var satisfies = require_satisfies(); + var gt = require_gt(); + var lt = require_lt(); + var lte = require_lte(); + var gte = require_gte(); + var outside = (version2, range, hilo, options) => { + version2 = new SemVer(version2, options); + range = new Range(range, options); + let gtfn, ltefn, ltfn, comp, ecomp; + switch (hilo) { + case ">": + gtfn = gt; + ltefn = lte; + ltfn = lt; + comp = ">"; + ecomp = ">="; + break; + case "<": + gtfn = lt; + ltefn = gte; + ltfn = gt; + comp = "<"; + ecomp = "<="; + break; + default: + throw new TypeError('Must provide a hilo val of "<" or ">"'); + } + if (satisfies(version2, range, options)) { + return false; + } + for (let i = 0; i < range.set.length; ++i) { + const comparators = range.set[i]; + let high = null; + let low = null; + comparators.forEach((comparator) => { + if (comparator.semver === ANY) { + comparator = new Comparator(">=0.0.0"); + } + high = high || comparator; + low = low || comparator; + if (gtfn(comparator.semver, high.semver, options)) { + high = comparator; + } else if (ltfn(comparator.semver, low.semver, options)) { + low = comparator; + } + }); + if (high.operator === comp || high.operator === ecomp) { + return false; + } + if ((!low.operator || low.operator === comp) && ltefn(version2, low.semver)) { + return false; + } else if (low.operator === ecomp && ltfn(version2, low.semver)) { + return false; + } + } + return true; + }; + module2.exports = outside; + } +}); + +// ../../node_modules/semver/ranges/gtr.js +var require_gtr = __commonJS({ + "../../node_modules/semver/ranges/gtr.js"(exports2, module2) { + var outside = require_outside(); + var gtr = (version2, range, options) => outside(version2, range, ">", options); + module2.exports = gtr; + } +}); + +// ../../node_modules/semver/ranges/ltr.js +var require_ltr = __commonJS({ + "../../node_modules/semver/ranges/ltr.js"(exports2, module2) { + var outside = require_outside(); + var ltr = (version2, range, options) => outside(version2, range, "<", options); + module2.exports = ltr; + } +}); + +// ../../node_modules/semver/ranges/intersects.js +var require_intersects = __commonJS({ + "../../node_modules/semver/ranges/intersects.js"(exports2, module2) { + var Range = require_range(); + var intersects = (r1, r2, options) => { + r1 = new Range(r1, options); + r2 = new Range(r2, options); + return r1.intersects(r2, options); + }; + module2.exports = intersects; + } +}); + +// ../../node_modules/semver/ranges/simplify.js +var require_simplify = __commonJS({ + "../../node_modules/semver/ranges/simplify.js"(exports2, module2) { + var satisfies = require_satisfies(); + var compare = require_compare(); + module2.exports = (versions, range, options) => { + const set = []; + let first = null; + let prev = null; + const v = versions.sort((a, b) => compare(a, b, options)); + for (const version2 of v) { + const included = satisfies(version2, range, options); + if (included) { + prev = version2; + if (!first) { + first = version2; + } + } 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; + }; + } +}); + +// ../../node_modules/semver/ranges/subset.js +var require_subset = __commonJS({ + "../../node_modules/semver/ranges/subset.js"(exports2, module2) { + var Range = require_range(); + var Comparator = require_comparator(); + var { ANY } = Comparator; + var satisfies = require_satisfies(); + var compare = require_compare(); + var subset = (sub, dom, options = {}) => { + if (sub === dom) { + return true; + } + sub = new Range(sub, options); + dom = new Range(dom, options); + let sawNonNull = false; + OUTER: for (const simpleSub of sub.set) { + for (const simpleDom of dom.set) { + const isSub = simpleSubset(simpleSub, simpleDom, options); + sawNonNull = sawNonNull || isSub !== null; + if (isSub) { + continue OUTER; + } + } + if (sawNonNull) { + return false; + } + } + return true; + }; + var minimumVersionWithPreRelease = [new Comparator(">=0.0.0-0")]; + var minimumVersion = [new Comparator(">=0.0.0")]; + var simpleSubset = (sub, dom, options) => { + if (sub === dom) { + return true; + } + if (sub.length === 1 && sub[0].semver === ANY) { + if (dom.length === 1 && dom[0].semver === ANY) { + return true; + } else if (options.includePrerelease) { + sub = minimumVersionWithPreRelease; + } else { + sub = minimumVersion; + } + } + if (dom.length === 1 && dom[0].semver === ANY) { + if (options.includePrerelease) { + return true; + } else { + dom = minimumVersion; + } + } + const eqSet = /* @__PURE__ */ new Set(); + let gt, lt; + for (const c of sub) { + if (c.operator === ">" || c.operator === ">=") { + gt = higherGT(gt, c, options); + } else if (c.operator === "<" || c.operator === "<=") { + lt = lowerLT(lt, c, options); + } else { + eqSet.add(c.semver); + } + } + if (eqSet.size > 1) { + return null; + } + let gtltComp; + if (gt && lt) { + gtltComp = compare(gt.semver, lt.semver, options); + if (gtltComp > 0) { + return null; + } else if (gtltComp === 0 && (gt.operator !== ">=" || lt.operator !== "<=")) { + return null; + } + } + for (const eq of eqSet) { + if (gt && !satisfies(eq, String(gt), options)) { + return null; + } + if (lt && !satisfies(eq, String(lt), options)) { + return null; + } + for (const c of dom) { + if (!satisfies(eq, String(c), options)) { + return false; + } + } + return true; + } + let higher, lower; + let hasDomLT, hasDomGT; + let needDomLTPre = lt && !options.includePrerelease && lt.semver.prerelease.length ? lt.semver : false; + let needDomGTPre = gt && !options.includePrerelease && gt.semver.prerelease.length ? gt.semver : false; + if (needDomLTPre && needDomLTPre.prerelease.length === 1 && lt.operator === "<" && needDomLTPre.prerelease[0] === 0) { + needDomLTPre = false; + } + for (const c of dom) { + hasDomGT = hasDomGT || c.operator === ">" || c.operator === ">="; + hasDomLT = hasDomLT || c.operator === "<" || c.operator === "<="; + if (gt) { + if (needDomGTPre) { + if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomGTPre.major && c.semver.minor === needDomGTPre.minor && c.semver.patch === needDomGTPre.patch) { + needDomGTPre = false; + } + } + if (c.operator === ">" || c.operator === ">=") { + higher = higherGT(gt, c, options); + if (higher === c && higher !== gt) { + return false; + } + } else if (gt.operator === ">=" && !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 (gt && hasDomLT && !lt && gtltComp !== 0) { + return false; + } + if (lt && hasDomGT && !gt && gtltComp !== 0) { + return false; + } + if (needDomGTPre || needDomLTPre) { + return false; + } + return true; + }; + var 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; + }; + var 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; + }; + module2.exports = subset; + } +}); + +// ../../node_modules/semver/index.js +var require_semver2 = __commonJS({ + "../../node_modules/semver/index.js"(exports2, module2) { + var internalRe = require_re(); + var constants = require_constants(); + var SemVer = require_semver(); + var identifiers = require_identifiers(); + var parse2 = require_parse3(); + var valid = require_valid(); + var clean = require_clean(); + var inc = require_inc(); + var diff = require_diff(); + var major = require_major(); + var minor = require_minor(); + var patch = require_patch(); + var prerelease = require_prerelease(); + var compare = require_compare(); + var rcompare = require_rcompare(); + var compareLoose = require_compare_loose(); + var compareBuild = require_compare_build(); + var sort = require_sort(); + var rsort = require_rsort(); + var gt = require_gt(); + var lt = require_lt(); + var eq = require_eq(); + var neq = require_neq(); + var gte = require_gte(); + var lte = require_lte(); + var cmp = require_cmp(); + var coerce = require_coerce(); + var Comparator = require_comparator(); + var Range = require_range(); + var satisfies = require_satisfies(); + var toComparators = require_to_comparators(); + var maxSatisfying = require_max_satisfying(); + var minSatisfying = require_min_satisfying(); + var minVersion = require_min_version(); + var validRange = require_valid2(); + var outside = require_outside(); + var gtr = require_gtr(); + var ltr = require_ltr(); + var intersects = require_intersects(); + var simplifyRange = require_simplify(); + var subset = require_subset(); + module2.exports = { + parse: parse2, + 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 + }; + } +}); + +// ../../node_modules/postman-collection/lib/collection/version.js +var require_version2 = __commonJS({ + "../../node_modules/postman-collection/lib/collection/version.js"(exports2, module2) { + var _2 = require_util2().lodash; + var semver = require_semver2(); + var PropertyBase = require_property_base().PropertyBase; + var Version; + _2.inherit( + /** + * Defines a Version. + * + * @constructor + * @extends {PropertyBase} + * @param {Version.definition} definition - + */ + Version = function PostmanPropertyVersion(definition) { + if (!definition) { + return; + } + this.set(definition); + }, + PropertyBase + ); + _2.assign( + Version.prototype, + /** @lends Version.prototype */ + { + /** + * Set the version value as string or object with separate components of version + * + * @draft + * @param {object|string} value - + */ + set(value) { + var ver = semver.parse(value) || value || {}; + _2.assign( + this, + /** @lends Version.prototype */ + { + /** + * The raw URL string. If {@link Version#set} is called with a string parameter, the string is saved here + * before parsing various Version components. + * + * @type {String} + */ + raw: ver.raw, + /** + * @type {String} + */ + major: ver.major, + /** + * @type {String} + */ + minor: ver.minor, + /** + * @type {String} + */ + patch: ver.patch, + /** + * @type {String} + */ + prerelease: ver.prerelease && ver.prerelease.join && ver.prerelease.join() || ver.prerelease, + /** + * @type {String} + */ + build: ver.build && ver.build.join && ver.build.join() || ver.build, + /** + * @type {String} + */ + string: ver.version + } + ); + }, + toString() { + return this.string || this.raw; + } + } + ); + _2.assign( + Version, + /** @lends Version */ + { + /** + * Defines the name of this property for internal use. + * + * @private + * @readOnly + * @type {String} + */ + _postman_propertyName: "Version" + } + ); + module2.exports = { + Version + }; + } +}); + +// ../../node_modules/postman-collection/lib/collection/collection.js +var require_collection = __commonJS({ + "../../node_modules/postman-collection/lib/collection/collection.js"(exports2, module2) { + var _2 = require_util2().lodash; + var ItemGroup = require_item_group().ItemGroup; + var VariableList = require_variable_list().VariableList; + var Version = require_version2().Version; + var Collection; + var SCHEMA_URL = "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"; + _2.inherit( + /** + * Create or load an instance of [Postman Collection](https://www.getpostman.com/docs/collections) as a JavaScript + * object that can be manipulated easily. + * + * A collection lets you group individual requests together. These requests can be further organized into folders to + * accurately mirror your API. Requests can also store sample responses when saved in a collection. You can add + * metadata like name and description too so that all the information that a developer needs to use your API is + * available easily. + * + * @constructor + * @extends {ItemGroup} + * + * @param {Collection.definition=} [definition] - Pass the initial definition of the collection (name, id, etc) as + * the `definition` parameter. The definition object is structured exactly as the collection format as defined in + * [https://www.schema.getpostman.com/](https://www.schema.getpostman.com/). This parameter is optional. That + * implies that you can create an empty instance of collection and add requests and other properties in order to + * build a new collection. + * @param {Array=} [environments] - The collection instance constructor accepts the second parameter as an + * array of environment objects. Environments objects store variable definitions that are inherited by + * {@link Collection#variables}. These environment variables are usually the ones that are exported from the Postman + * App to use them with different collections. Refer to Postman + * [documentation on environment variables](https://www.getpostman.com/docs/environments). + * + * @example Load a Collection JSON file from disk + * var fs = require('fs'), // needed to read JSON file from disk + * pretty = function (obj) { // function to neatly log the collection object to console + * return require('util').inspect(obj, {colors: true}); + * }, + * Collection = require('postman-collection').Collection, + * myCollection; + * + * // Load a collection to memory from a JSON file on disk (say, sample-collection.json) + * myCollection = new Collection(JSON.stringify(fs.readFileSync('sample-collection.json').toString())); + * + * // log items at root level of the collection + * console.log(pretty(myCollection)); + * + * @example Create a blank collection and write to file + * var fs = require('fs'), + * Collection = require('postman-collection').Collection, + * mycollection; + * + * myCollection = new Collection({ + * info: { + * name: "my Collection" + * } + * }); + * + * // log the collection to console to see its contents + * fs.writeFileSync('myCollection.postman_collection', JSON.stringify(myCollection, null, 2)); + */ + Collection = function PostmanCollection(definition, environments) { + Collection.super_.call(this, definition); + _2.assign( + this, + /** @lends Collection.prototype */ + { + /** + * The `variables` property holds a list of variables that are associated with a Collection. These variables + * are stored within a collection so that they can be re-used and replaced in rest of the collection. For + * example, if one has a variable named `port` with value `8080`, then one can write a request {@link Url} + * as `http://localhost:{{port}}/my/endpoint` and that will be replaced to form + * `http://localhost:8080/my/endpoint`. **Collection Variables** are like + * [environment variables](https://www.getpostman.com/docs/environments), but stored locally within a + * collection. + * + * @type {VariableList} + * + * @example Creating a collection with variables + * var fs = require('fs'), + * Collection = require('postman-collection').Collection, + * mycollection; + * + * // Create a new empty collection. + * myCollection = new Collection(); + * + * // Add a variable to the collection + * myCollection.variables.add({ + * id: 'apiBaseUrl', + * value: 'http://timeapi.org', + * type: 'string' + * }); + * + * //Add a request that uses the variable that we just added. + * myCollection.items.add({ + * id: 'utc-time-now', + * name: 'Get the current time in UTC', + * request: '{{apiBaseUrl}}/utc/now' + * }); + */ + variables: new VariableList(this, definition && definition.variable, environments), + /** + * The `version` key in collection is used to express the version of the collection. It is useful in either + * tracking development iteration of an API server or the version of an API itself. It can also be used to + * represent the number of iterations of the collection as it is updated through its lifetime. + * + * Version is expressed in [semver](http://semver.org/) format. + * + * @type {Version} + * @optional + * + * @see {@link http://semver.org/} + */ + version: definition && definition.info && definition.info.version ? new Version(definition.info.version) : void 0 + } + ); + }, + ItemGroup + ); + _2.assign( + Collection.prototype, + /** @lends Collection.prototype */ + { + /** + * Using this function, one can sync the values of collection variables from a reference object. + * + * @param {Object} obj - + * @param {Boolean=} [track] - + * + * @returns {Object} + */ + syncVariablesFrom(obj, track) { + return this.variables.syncFromObject(obj, track); + }, + /** + * Transfer the variables in this scope to an object + * + * @param {Object=} [obj] - + * + * @returns {Object} + */ + syncVariablesTo(obj) { + return this.variables.syncToObject(obj); + }, + /** + * Convert the collection to JSON compatible plain object + * + * @returns {Object} + */ + toJSON() { + var json = ItemGroup.prototype.toJSON.apply(this); + json.info = { + _postman_id: this.id, + name: this.name, + version: this.version, + schema: SCHEMA_URL + }; + delete json.id; + delete json.name; + delete json.version; + if (_2.has(json, "description")) { + json.info.description = this.description; + delete json.description; + } + return json; + } + } + ); + _2.assign( + Collection, + /** @lends Collection */ + { + /** + * Defines the name of this property for internal use. + * + * @private + * @readOnly + * @type {String} + */ + _postman_propertyName: "Collection", + /** + * Check whether an object is an instance of {@link ItemGroup}. + * + * @param {*} obj - + * @returns {Boolean} + */ + isCollection: function(obj) { + return Boolean(obj) && (obj instanceof Collection || _2.inSuperChain(obj.constructor, "_postman_propertyName", Collection._postman_propertyName)); + } + } + ); + module2.exports = { + Collection + }; + } +}); + +// ../../node_modules/openapi-to-postmanv2/lib/options.js +var require_options = __commonJS({ + "../../node_modules/openapi-to-postmanv2/lib/options.js"(exports2, module2) { + var { filterOptionsByVersion } = require_versionUtils(); + var _2 = require_lodash(); + var VALID_MODES = ["document", "use"]; + var VERSION30 = "3.0"; + var VERSION31 = "3.1"; + var VERSION20 = "2.0"; + var SUPPORTED_VERSIONS = [VERSION20, VERSION30, VERSION31]; + var MODULE_VERSION = { + V1: "v1", + V2: "v2" + }; + function handleArguments(args) { + let mode = "document", criteria = { version: VERSION30 }; + args.forEach((argument) => { + if (typeof argument === "object" && Object.keys(argument).length > 0) { + criteria = argument.hasOwnProperty("version") && SUPPORTED_VERSIONS.includes(argument.version) ? Object.assign(criteria, argument) : Object.assign(argument, criteria); + } else if (VALID_MODES.includes(argument)) { + mode = argument; + } + }); + return { mode, criteria }; + } + module2.exports = { + // default options + // if mode=document, returns an array of name/id/default etc. + /** + * name - human-readable name for the option + * id - key to pass the option with + * type - boolean or enum for now + * default - the value that's assumed if not specified + * availableOptions - allowed values (only for type=enum) + * description - human-readable description of the item + * external - whether the option is settable via the API + * usage - array of supported types of usage (i.e. CONVERSION, VALIDATION) + * + * @param {string} [mode='document'] Describes use-case. 'document' will return an array + * with all options being described. 'use' will return the default values of all options + * @param {Object} criteria Decribes required criteria for options to be returned. + * @param {string} criteria.version The version of the OpenAPI spec to be converted + * (can be one of '2.0', '3.0', '3.1') + * @param {string} criteria.moduleVersion The version of the module (can be one of 'v1' or 'v2') + * @param {Array} criteria.usage The usage of the option (values can be one of 'CONVERSION', 'VALIDATION') + * @param {boolean} criteria.external Whether the option is exposed to Postman App UI or not + * @returns {mixed} An array or object (depending on mode) that describes available options + */ + getOptions: function(mode = "document", criteria = {}) { + const resolvedArguments = handleArguments([mode, criteria]); + mode = resolvedArguments.mode; + criteria = resolvedArguments.criteria; + let optsArray = [ + { + name: "Naming requests", + id: "requestNameSource", + type: "enum", + default: "Fallback", + availableOptions: ["URL", "Fallback"], + description: "Determines how the requests inside the generated collection will be named. If \u201CFallback\u201D is selected, the request will be named after one of the following schema values: `summary`, `operationId`, `description`, `url`.", + external: true, + usage: ["CONVERSION", "VALIDATION"], + supportedIn: [VERSION20, VERSION30, VERSION31], + supportedModuleVersion: [MODULE_VERSION.V2, MODULE_VERSION.V1] + }, + { + name: "Set indent character", + id: "indentCharacter", + type: "enum", + default: "Space", + availableOptions: ["Space", "Tab"], + description: "Option for setting indentation character.", + external: true, + usage: ["CONVERSION"], + supportedIn: [VERSION20, VERSION30, VERSION31], + supportedModuleVersion: [MODULE_VERSION.V2, MODULE_VERSION.V1] + }, + { + name: "Collapse redundant folders", + id: "collapseFolders", + type: "boolean", + default: true, + description: "Importing will collapse all folders that have only one child element and lack persistent folder-level data.", + external: true, + usage: ["CONVERSION"], + supportedIn: [VERSION20, VERSION30, VERSION31], + supportedModuleVersion: [MODULE_VERSION.V1] + }, + { + name: "Optimize conversion", + id: "optimizeConversion", + type: "boolean", + default: true, + description: "Optimizes conversion for large specification, disabling this option might affect the performance of conversion.", + external: true, + usage: ["CONVERSION"], + supportedIn: [VERSION20, VERSION30, VERSION31], + supportedModuleVersion: [MODULE_VERSION.V1] + }, + { + name: "Request parameter generation", + id: "requestParametersResolution", + type: "enum", + default: "Schema", + availableOptions: ["Example", "Schema"], + description: "Select whether to generate the request parameters based on the [schema](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#schemaObject) or the [example](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#exampleObject) in the schema.", + external: true, + usage: ["CONVERSION"], + supportedIn: [VERSION20, VERSION30, VERSION31], + supportedModuleVersion: [MODULE_VERSION.V1] + }, + { + name: "Response parameter generation", + id: "exampleParametersResolution", + type: "enum", + default: "Example", + availableOptions: ["Example", "Schema"], + description: "Select whether to generate the response parameters based on the [schema](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#schemaObject) or the [example](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#exampleObject) in the schema.", + external: true, + usage: ["CONVERSION"], + supportedIn: [VERSION20, VERSION30, VERSION31], + supportedModuleVersion: [MODULE_VERSION.V1] + }, + { + name: "Disabled Parameter validation", + id: "disabledParametersValidation", + type: "boolean", + default: true, + description: "Whether disabled parameters of collection should be validated", + external: false, + usage: ["VALIDATION"], + supportedIn: [VERSION20, VERSION30, VERSION31], + supportedModuleVersion: [MODULE_VERSION.V2, MODULE_VERSION.V1] + }, + { + name: "Parameter generation", + id: "parametersResolution", + type: "enum", + default: "Schema", + availableOptions: ["Example", "Schema"], + description: "Select whether to generate the request and response parameters based on the [schema](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#schemaObject) or the [example](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#exampleObject) in the schema.", + external: true, + usage: ["CONVERSION"], + supportedIn: [VERSION20, VERSION30, VERSION31], + supportedModuleVersion: [MODULE_VERSION.V2, MODULE_VERSION.V1] + }, + { + name: "Folder organization", + id: "folderStrategy", + type: "enum", + default: "Paths", + availableOptions: ["Paths", "Tags"], + description: "Select whether to create folders according to the spec\u2019s paths or tags.", + external: true, + usage: ["CONVERSION"], + supportedIn: [VERSION20, VERSION30, VERSION31], + supportedModuleVersion: [MODULE_VERSION.V2, MODULE_VERSION.V1] + }, + { + name: "Enable Schema Faking", + id: "schemaFaker", + type: "boolean", + default: true, + description: "Whether or not schemas should be faked.", + external: false, + usage: ["CONVERSION"], + supportedIn: [VERSION20, VERSION30, VERSION31], + supportedModuleVersion: [MODULE_VERSION.V2, MODULE_VERSION.V1] + }, + { + name: "Schema resolution nesting limit", + id: "stackLimit", + type: "integer", + default: 10, + description: 'Number of nesting limit till which schema resolution will happen. Increasing this limit may result in more time to convert collection depending on complexity of specification. (To make sure this option works correctly "optimizeConversion" option needs to be disabled)', + external: false, + usage: ["CONVERSION"], + supportedIn: [VERSION20, VERSION30, VERSION31], + supportedModuleVersion: [MODULE_VERSION.V2, MODULE_VERSION.V1] + }, + { + name: "Include auth info in example requests", + id: "includeAuthInfoInExample", + type: "boolean", + default: true, + description: "Select whether to include authentication parameters in the example request.", + external: true, + usage: ["CONVERSION"], + supportedIn: [VERSION20, VERSION30, VERSION31], + supportedModuleVersion: [MODULE_VERSION.V2, MODULE_VERSION.V1] + }, + { + name: "Short error messages during request <> schema validation", + id: "shortValidationErrors", + type: "boolean", + default: false, + description: "Whether detailed error messages are required for request <> schema validation operations.", + external: true, + usage: ["VALIDATION"], + supportedIn: [VERSION30, VERSION31], + supportedModuleVersion: [MODULE_VERSION.V2, MODULE_VERSION.V1] + }, + { + name: "Properties to ignore during validation", + id: "validationPropertiesToIgnore", + type: "array", + default: [], + description: "Specific properties (parts of a request/response pair) to ignore during validation. Must be sent as an array of strings. Valid inputs in the array: PATHVARIABLE, QUERYPARAM, HEADER, BODY, RESPONSE_HEADER, RESPONSE_BODY", + external: true, + usage: ["VALIDATION"], + supportedIn: [VERSION30, VERSION31], + supportedModuleVersion: [MODULE_VERSION.V2, MODULE_VERSION.V1] + }, + { + name: "Whether MISSING_IN_SCHEMA mismatches should be returned", + id: "showMissingInSchemaErrors", + type: "boolean", + default: false, + description: "MISSING_IN_SCHEMA indicates that an extra parameter was included in the request. For most use cases, this need not be considered an error.", + external: true, + usage: ["VALIDATION"], + supportedIn: [VERSION30, VERSION31], + supportedModuleVersion: [MODULE_VERSION.V2, MODULE_VERSION.V1] + }, + { + name: "Show detailed body validation messages", + id: "detailedBlobValidation", + type: "boolean", + default: false, + description: "Determines whether to show detailed mismatch information for application/json content in the request/response body.", + external: true, + usage: ["VALIDATION"], + supportedIn: [VERSION30, VERSION31], + supportedModuleVersion: [MODULE_VERSION.V2, MODULE_VERSION.V1] + }, + { + name: "Suggest fixes if available", + id: "suggestAvailableFixes", + type: "boolean", + default: false, + description: "Whether to provide fixes for patching corresponding mismatches.", + external: true, + usage: ["VALIDATION"], + supportedIn: [VERSION30, VERSION31], + supportedModuleVersion: [MODULE_VERSION.V2, MODULE_VERSION.V1] + }, + { + name: "Show Metadata validation messages", + id: "validateMetadata", + type: "boolean", + default: false, + description: "Whether to show mismatches for incorrect name and description of request", + external: true, + usage: ["VALIDATION"], + supportedIn: [VERSION30, VERSION31], + supportedModuleVersion: [MODULE_VERSION.V2, MODULE_VERSION.V1] + }, + { + name: "Ignore mismatch for unresolved postman variables", + id: "ignoreUnresolvedVariables", + type: "boolean", + default: false, + description: "Whether to ignore mismatches resulting from unresolved variables in the Postman request", + external: true, + usage: ["VALIDATION"], + supportedIn: [VERSION30, VERSION31], + supportedModuleVersion: [MODULE_VERSION.V2, MODULE_VERSION.V1] + }, + { + name: "Enable strict request matching", + id: "strictRequestMatching", + type: "boolean", + default: false, + description: "Whether requests should be strictly matched with schema operations. Setting to true will not include any matches where the URL path segments don't match exactly.", + external: true, + usage: ["VALIDATION"], + supportedIn: [VERSION30, VERSION31], + supportedModuleVersion: [MODULE_VERSION.V2, MODULE_VERSION.V1] + }, + { + name: "Allow matching of Path variables present in URL", + id: "allowUrlPathVarMatching", + type: "boolean", + default: false, + description: "Whether to allow matching path variables that are available as part of URL itself in the collection request", + external: true, + supportedIn: [VERSION30, VERSION31], + usage: ["VALIDATION"], + supportedModuleVersion: [MODULE_VERSION.V2, MODULE_VERSION.V1] + }, + { + name: "Enable optional parameters", + id: "enableOptionalParameters", + type: "boolean", + default: true, + description: "Optional parameters aren't selected in the collection. Once enabled they will be selected in the collection and request as well.", + external: true, + usage: ["CONVERSION"], + supportedIn: [VERSION20, VERSION30, VERSION31], + supportedModuleVersion: [MODULE_VERSION.V2, MODULE_VERSION.V1] + }, + { + name: "Keep implicit headers", + id: "keepImplicitHeaders", + type: "boolean", + default: false, + description: "Whether to keep implicit headers from the OpenAPI specification, which are removed by default.", + external: true, + usage: ["CONVERSION"], + supportedIn: [VERSION20, VERSION30, VERSION31], + supportedModuleVersion: [MODULE_VERSION.V2, MODULE_VERSION.V1] + }, + { + name: "Include webhooks", + id: "includeWebhooks", + type: "boolean", + default: false, + description: "Select whether to include Webhooks in the generated collection", + external: false, + usage: ["CONVERSION"], + supportedIn: [VERSION31], + supportedModuleVersion: [MODULE_VERSION.V2, MODULE_VERSION.V1] + }, + { + name: "Include Reference map", + id: "includeReferenceMap", + type: "boolean", + default: false, + description: "Whether or not to include reference map or not as part of output", + external: false, + usage: ["BUNDLE"], + supportedIn: [VERSION20, VERSION30, VERSION31], + supportedModuleVersion: [MODULE_VERSION.V2, MODULE_VERSION.V1] + }, + { + name: "Include deprecated properties", + id: "includeDeprecated", + type: "boolean", + default: true, + description: "Select whether to include deprecated operations, parameters, and properties in generated collection or not", + external: true, + usage: ["CONVERSION", "VALIDATION"], + supportedIn: [VERSION20, VERSION30, VERSION31], + supportedModuleVersion: [MODULE_VERSION.V2, MODULE_VERSION.V1] + }, + { + name: "Always inherit authentication", + id: "alwaysInheritAuthentication", + type: "boolean", + default: false, + description: "Whether authentication details should be included on every request, or always inherited from the collection.", + external: true, + usage: ["CONVERSION"], + supportedIn: [VERSION20, VERSION30, VERSION31], + supportedModuleVersion: [MODULE_VERSION.V2, MODULE_VERSION.V1] + }, + { + name: "Select request body type", + id: "preferredRequestBodyType", + type: "enum", + default: "first-listed", + availableOptions: ["x-www-form-urlencoded", "form-data", "raw", "first-listed"], + description: 'When there are multiple content-types defined in the request body of OpenAPI, the conversion selects the preferred option content-type as request body.If "first-listed" is set, the first content-type defined in the OpenAPI spec will be selected.', + external: false, + usage: ["CONVERSION"], + supportedIn: [VERSION20, VERSION30, VERSION31], + supportedModuleVersion: [MODULE_VERSION.V2] + } + ]; + optsArray = _2.filter(optsArray, (option) => { + if (option.disabled) { + return false; + } + if (_2.isObject(criteria)) { + if (typeof criteria.external === "boolean" && option.external !== criteria.external) { + return false; + } + if (_2.isArray(criteria.usage)) { + if (_2.difference(criteria.usage, option.usage).length === criteria.usage.length) { + return false; + } + } + criteria.moduleVersion = _2.has(criteria, "moduleVersion") ? criteria.moduleVersion : MODULE_VERSION.V2; + if (!_2.includes(option.supportedModuleVersion, criteria.moduleVersion)) { + return false; + } + } + return true; + }); + if (mode === "use") { + let defOptions = {}; + optsArray = filterOptionsByVersion(optsArray, criteria.version); + _2.each(optsArray, (opt) => { + if (opt.id === "indentCharacter") { + defOptions[opt.id] = opt.default === "tab" ? " " : " "; + } else { + defOptions[opt.id] = opt.default; + } + }); + return defOptions; + } + return optsArray; + } + }; + } +}); + +// ../../node_modules/openapi-to-postmanv2/assets/validationRequestListSchema.json +var require_validationRequestListSchema = __commonJS({ + "../../node_modules/openapi-to-postmanv2/assets/validationRequestListSchema.json"(exports2, module2) { + module2.exports = { + type: "array", + title: "RequestList", + items: { + type: "object", + title: "Item", + properties: { + id: { + type: "string" + }, + request: { + type: "object", + title: "Request", + properties: { + url: { + oneOf: [ + { + type: "object", + properties: { + raw: { + type: "string" + }, + protocol: { + type: "string" + }, + host: { + title: "Host", + oneOf: [ + { + type: "string" + }, + { + type: "array", + items: { + type: "string" + } + } + ] + }, + path: { + oneOf: [ + { + type: "string" + }, + { + type: "array", + items: { + oneOf: [ + { + type: "string" + }, + { + type: "object", + properties: { + type: { + type: "string" + }, + value: { + type: "string" + } + } + } + ] + } + } + ] + }, + port: { + type: "string" + }, + query: { + type: "array", + items: { + type: "object", + title: "QueryParam", + properties: { + key: { + type: [ + "string", + "null" + ] + }, + value: { + type: [ + "string", + "null" + ] + }, + disabled: { + type: "boolean", + default: false, + description: "If set to true, the current query parameter will not be sent with the request." + } + } + } + }, + hash: { + type: "string" + } + } + }, + { + type: "string" + } + ] + }, + method: { + type: "string" + }, + header: { + type: "array", + items: { + type: "object", + properties: { + key: { + type: "string" + }, + value: { + type: "string" + } + }, + required: ["key", "value"] + } + }, + body: { + oneOf: [ + { + type: "object", + description: "This field contains the data usually contained in the request body.", + properties: { + mode: { + description: "Only raw supported for now", + enum: [ + "raw", + "urlencoded", + "formdata", + "graphql", + "file" + ] + }, + raw: { + type: "string" + }, + graphql: { + type: "object" + }, + urlencoded: { + type: "array", + items: { + type: "object", + title: "UrlEncodedParameter", + properties: { + key: { + type: "string" + }, + value: { + type: "string" + } + }, + required: [ + "key" + ] + } + }, + formdata: { + type: "array", + items: { + type: "object", + title: "FormParameter", + oneOf: [ + { + properties: { + key: { + type: "string" + }, + value: { + type: "string" + }, + type: { + type: "string", + const: "text" + }, + contentType: { + type: "string", + description: "Override Content-Type header of this form data entity." + } + }, + required: [ + "key" + ] + }, + { + properties: { + key: { + type: "string" + }, + src: { + type: [ + "array", + "string", + "null" + ] + }, + disabled: { + type: "boolean", + default: false, + description: "When set to true, prevents this form data entity from being sent." + }, + type: { + type: "string", + const: "file" + }, + contentType: { + type: "string", + description: "Override Content-Type header of this form data entity." + } + }, + required: [ + "key" + ] + } + ] + } + } + } + }, + { + type: "null" + } + ] + } + } + }, + response: { + type: "array", + title: "Responses", + items: { + $schema: "http://json-schema.org/draft-07/schema#", + title: "Response", + properties: { + id: { + type: "string" + }, + header: { + type: "array", + title: "Headers", + items: { + type: "object", + properties: { + key: { + type: "string" + }, + value: { + type: "string" + } + }, + required: ["key", "value"] + } + }, + body: { + type: [ + "null", + "string" + ] + }, + code: { + type: "integer" + } + }, + required: ["id", "code"] + } + } + }, + required: [ + "id", + "request" + ] + } + }; + } +}); + +// ../../node_modules/openapi-to-postmanv2/lib/utils.js +var require_utils2 = __commonJS({ + "../../node_modules/openapi-to-postmanv2/lib/utils.js"(exports2, module2) { + var _2 = require_lodash(); + var COLLECTION_NAME = "Imported from OpenAPI"; + module2.exports = { + // merge userOptions over defaultOptions + mergeOptions: function(defaultOptions, userOptions) { + let retVal = {}; + for (let id in defaultOptions) { + if (defaultOptions.hasOwnProperty(id)) { + if (userOptions[id] === void 0) { + retVal[id] = defaultOptions[id].default; + if (defaultOptions[id].type === "enum" && _2.isString(retVal[id])) { + retVal[id] = _2.toLower(defaultOptions[id].default); + } + continue; + } + switch (defaultOptions[id].type) { + case "boolean": + if (typeof userOptions[id] === defaultOptions[id].type) { + retVal[id] = userOptions[id]; + } else { + retVal[id] = defaultOptions[id].default; + } + break; + case "enum": + if (defaultOptions[id].availableOptions.includes(userOptions[id]) || _2.isString(userOptions[id]) && _2.map(defaultOptions[id].availableOptions, _2.toLower).includes(_2.toLower(userOptions[id]))) { + retVal[id] = userOptions[id]; + } else { + retVal[id] = defaultOptions[id].default; + } + _2.isString(retVal[id]) && (retVal[id] = _2.toLower(retVal[id])); + break; + case "array": + retVal[id] = userOptions[id]; + if (typeof retVal[id] === "string") { + try { + retVal[id] = JSON.parse(userOptions[id]); + } catch (e) { + retVal[id] = defaultOptions[id].default; + } + } + if (!Array.isArray(retVal[id])) { + retVal[id] = defaultOptions[id].default; + } + break; + case "integer": + if (_2.isSafeInteger(userOptions[id])) { + retVal[id] = userOptions[id]; + } else { + retVal[id] = defaultOptions[id].default; + } + break; + default: + retVal[id] = defaultOptions[id].default; + } + } + } + return retVal; + }, + /** + * Converts Title/Camel case to a space-separated string + * @param {*} string - string in snake/camelCase + * @returns {string} space-separated string + */ + insertSpacesInName: function(string) { + if (!string || typeof string !== "string") { + return ""; + } + return string.replace(/([a-z])([A-Z])/g, "$1 $2").replace(/([A-Z])([A-Z][a-z])/g, "$1 $2").replace(/(_+)([a-zA-Z0-9])/g, " $2"); + }, + /** + * Trims request name string to 255 characters. + * + * @param {*} reqName - Request name + * @returns {*} trimmed string upto 255 characters + */ + trimRequestName: function(reqName) { + if (typeof reqName === "string") { + return reqName.substring(0, 255); + } + return reqName; + }, + /** + * Finds the common subpath from an array of strings starting from the + * strings starts + * @param {Array} stringArrays - pointer to get the name from + * @returns {string} - string: the common substring + */ + findCommonSubpath(stringArrays) { + if (!stringArrays || stringArrays.length === 0) { + return ""; + } + let cleanStringArrays = [], res = []; + stringArrays.forEach((cString) => { + if (cString) { + cleanStringArrays.push(cString.split("/")); + } + }); + const asc = cleanStringArrays.sort((a, b) => { + return a.length - b.length; + }); + for (let segmentIndex = 0; segmentIndex < asc[0].length; segmentIndex++) { + const segment = asc[0][segmentIndex]; + let nonCompliant = asc.find((cString) => { + return cString[segmentIndex] !== segment; + }); + if (nonCompliant) { + break; + } + res.push(segment); + } + return res.join("/"); + }, + /** + * Provides collection name to be used for generated collection + * + * @param {*} title - Definition title + * @returns {String} - Collection name + */ + getCollectionName: function(title) { + if (_2.isEmpty(title) || !_2.isString(title)) { + return COLLECTION_NAME; + } + return title; + } + }; + } +}); + +// ../../node_modules/openapi-to-postmanv2/lib/error.js +var require_error = __commonJS({ + "../../node_modules/openapi-to-postmanv2/lib/error.js"(exports2, module2) { + function openApiErr(message, data) { + this.message = message || ""; + this.data = data || {}; + } + openApiErr.prototype = Error(); + module2.exports = openApiErr; + } +}); + +// ../../node_modules/ajv/dist/vocabularies/dynamic/dynamicAnchor.js +var require_dynamicAnchor = __commonJS({ + "../../node_modules/ajv/dist/vocabularies/dynamic/dynamicAnchor.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.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 } = cxt; + it.schemaEnv.root.dynamicAnchors[anchor] = true; + const v = (0, codegen_1._)`${names_1.default.dynamicAnchors}${(0, codegen_1.getProperty)(anchor)}`; + const validate2 = it.errSchemaPath === "#" ? it.validateName : _getValidate(cxt); + gen.if((0, codegen_1._)`!${v}`, () => gen.assign(v, validate2)); + } + exports2.dynamicAnchor = dynamicAnchor; + function _getValidate(cxt) { + const { schemaEnv, schema: schema2, self: self2 } = cxt.it; + const { root, baseId, localRefs, meta } = schemaEnv.root; + const { schemaId } = self2.opts; + const sch = new compile_1.SchemaEnv({ schema: schema2, schemaId, root, baseId, localRefs, meta }); + compile_1.compileSchema.call(self2, sch); + return (0, ref_1.getValidate)(cxt, sch); + } + exports2.default = def; + } +}); + +// ../../node_modules/ajv/dist/vocabularies/dynamic/dynamicRef.js +var require_dynamicRef = __commonJS({ + "../../node_modules/ajv/dist/vocabularies/dynamic/dynamicRef.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.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 } = 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) { + 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)); + } else { + _callRef(it.validateName, valid)(); + } + } + function _callRef(validate2, valid) { + return valid ? () => gen.block(() => { + (0, ref_1.callRef)(cxt, validate2); + gen.let(valid, true); + }) : () => (0, ref_1.callRef)(cxt, validate2); + } + } + exports2.dynamicRef = dynamicRef; + exports2.default = def; + } +}); + +// ../../node_modules/ajv/dist/vocabularies/dynamic/recursiveAnchor.js +var require_recursiveAnchor = __commonJS({ + "../../node_modules/ajv/dist/vocabularies/dynamic/recursiveAnchor.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var dynamicAnchor_1 = require_dynamicAnchor(); + var util_1 = require_util(); + 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"); + } + }; + exports2.default = def; + } +}); + +// ../../node_modules/ajv/dist/vocabularies/dynamic/recursiveRef.js +var require_recursiveRef = __commonJS({ + "../../node_modules/ajv/dist/vocabularies/dynamic/recursiveRef.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var dynamicRef_1 = require_dynamicRef(); + var def = { + keyword: "$recursiveRef", + schemaType: "string", + code: (cxt) => (0, dynamicRef_1.dynamicRef)(cxt, cxt.schema) + }; + exports2.default = def; + } +}); + +// ../../node_modules/ajv/dist/vocabularies/dynamic/index.js +var require_dynamic = __commonJS({ + "../../node_modules/ajv/dist/vocabularies/dynamic/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__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]; + exports2.default = dynamic; + } +}); + +// ../../node_modules/ajv/dist/vocabularies/validation/dependentRequired.js +var require_dependentRequired = __commonJS({ + "../../node_modules/ajv/dist/vocabularies/validation/dependentRequired.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__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) + }; + exports2.default = def; + } +}); + +// ../../node_modules/ajv/dist/vocabularies/applicator/dependentSchemas.js +var require_dependentSchemas = __commonJS({ + "../../node_modules/ajv/dist/vocabularies/applicator/dependentSchemas.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var dependencies_1 = require_dependencies(); + var def = { + keyword: "dependentSchemas", + type: "object", + schemaType: "object", + code: (cxt) => (0, dependencies_1.validateSchemaDeps)(cxt) + }; + exports2.default = def; + } +}); + +// ../../node_modules/ajv/dist/vocabularies/validation/limitContains.js +var require_limitContains = __commonJS({ + "../../node_modules/ajv/dist/vocabularies/validation/limitContains.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var util_1 = require_util(); + var def = { + keyword: ["maxContains", "minContains"], + type: "array", + schemaType: "number", + code({ keyword, parentSchema, it }) { + if (parentSchema.contains === void 0) { + (0, util_1.checkStrictMode)(it, `"${keyword}" without "contains" is ignored`); + } + } + }; + exports2.default = def; + } +}); + +// ../../node_modules/ajv/dist/vocabularies/next.js +var require_next2 = __commonJS({ + "../../node_modules/ajv/dist/vocabularies/next.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__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]; + exports2.default = next; + } +}); + +// ../../node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.js +var require_unevaluatedProperties = __commonJS({ + "../../node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var codegen_1 = require_codegen(); + var util_1 = require_util(); + var names_1 = require_names(); + var error = { + message: "must NOT have unevaluated properties", + params: ({ params }) => (0, codegen_1._)`{unevaluatedProperty: ${params.unevaluatedProperty}}` + }; + var def = { + keyword: "unevaluatedProperties", + type: "object", + schemaType: ["boolean", "object"], + trackErrors: true, + error, + code(cxt) { + const { gen, schema: schema2, data, errsCount, it } = cxt; + 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) { + gen.forIn("key", data, (key) => props === void 0 ? unevaluatedPropCode(key) : gen.if(unevaluatedStatic(props, key), () => unevaluatedPropCode(key))); + } + it.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)(it, 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 ps = []; + for (const p in evaluatedProps) { + if (evaluatedProps[p] === true) + ps.push((0, codegen_1._)`${key} !== ${p}`); + } + return (0, codegen_1.and)(...ps); + } + } + }; + exports2.default = def; + } +}); + +// ../../node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.js +var require_unevaluatedItems = __commonJS({ + "../../node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var codegen_1 = require_codegen(); + var util_1 = require_util(); + var error = { + 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, + code(cxt) { + const { gen, schema: schema2, data, it } = cxt; + const items = it.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)(it, schema2)) { + const valid = gen.var("valid", (0, codegen_1._)`${len} <= ${items}`); + gen.if((0, codegen_1.not)(valid), () => validateItems(valid, items)); + cxt.ok(valid); + } + 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()); + }); + } + } + }; + exports2.default = def; + } +}); + +// ../../node_modules/ajv/dist/vocabularies/unevaluated/index.js +var require_unevaluated = __commonJS({ + "../../node_modules/ajv/dist/vocabularies/unevaluated/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var unevaluatedProperties_1 = require_unevaluatedProperties(); + var unevaluatedItems_1 = require_unevaluatedItems(); + var unevaluated = [unevaluatedProperties_1.default, unevaluatedItems_1.default]; + exports2.default = unevaluated; + } +}); + +// ../../node_modules/ajv/dist/refs/json-schema-2019-09/schema.json +var require_schema2 = __commonJS({ + "../../node_modules/ajv/dist/refs/json-schema-2019-09/schema.json"(exports2, module2) { + module2.exports = { + $schema: "https://json-schema.org/draft/2019-09/schema", + $id: "https://json-schema.org/draft/2019-09/schema", + $vocabulary: { + "https://json-schema.org/draft/2019-09/vocab/core": true, + "https://json-schema.org/draft/2019-09/vocab/applicator": true, + "https://json-schema.org/draft/2019-09/vocab/validation": true, + "https://json-schema.org/draft/2019-09/vocab/meta-data": true, + "https://json-schema.org/draft/2019-09/vocab/format": false, + "https://json-schema.org/draft/2019-09/vocab/content": true + }, + $recursiveAnchor: true, + title: "Core and Validation specifications meta-schema", + allOf: [ + { $ref: "meta/core" }, + { $ref: "meta/applicator" }, + { $ref: "meta/validation" }, + { $ref: "meta/meta-data" }, + { $ref: "meta/format" }, + { $ref: "meta/content" } + ], + type: ["object", "boolean"], + properties: { + definitions: { + $comment: "While no longer an official keyword as it is replaced by $defs, this keyword is retained in the meta-schema to prevent incompatible extensions as it remains in common use.", + type: "object", + additionalProperties: { $recursiveRef: "#" }, + default: {} + }, + dependencies: { + $comment: '"dependencies" is no longer a keyword, but schema authors should avoid redefining it to facilitate a smooth transition to "dependentSchemas" and "dependentRequired"', + type: "object", + additionalProperties: { + anyOf: [{ $recursiveRef: "#" }, { $ref: "meta/validation#/$defs/stringArray" }] + } + } + } + }; + } +}); + +// ../../node_modules/ajv/dist/refs/json-schema-2019-09/meta/applicator.json +var require_applicator2 = __commonJS({ + "../../node_modules/ajv/dist/refs/json-schema-2019-09/meta/applicator.json"(exports2, module2) { + module2.exports = { + $schema: "https://json-schema.org/draft/2019-09/schema", + $id: "https://json-schema.org/draft/2019-09/meta/applicator", + $vocabulary: { + "https://json-schema.org/draft/2019-09/vocab/applicator": true + }, + $recursiveAnchor: true, + title: "Applicator vocabulary meta-schema", + type: ["object", "boolean"], + properties: { + additionalItems: { $recursiveRef: "#" }, + unevaluatedItems: { $recursiveRef: "#" }, + items: { + anyOf: [{ $recursiveRef: "#" }, { $ref: "#/$defs/schemaArray" }] + }, + contains: { $recursiveRef: "#" }, + additionalProperties: { $recursiveRef: "#" }, + unevaluatedProperties: { $recursiveRef: "#" }, + properties: { + type: "object", + additionalProperties: { $recursiveRef: "#" }, + default: {} + }, + patternProperties: { + type: "object", + additionalProperties: { $recursiveRef: "#" }, + propertyNames: { format: "regex" }, + default: {} + }, + dependentSchemas: { + type: "object", + additionalProperties: { + $recursiveRef: "#" + } + }, + propertyNames: { $recursiveRef: "#" }, + if: { $recursiveRef: "#" }, + then: { $recursiveRef: "#" }, + else: { $recursiveRef: "#" }, + allOf: { $ref: "#/$defs/schemaArray" }, + anyOf: { $ref: "#/$defs/schemaArray" }, + oneOf: { $ref: "#/$defs/schemaArray" }, + not: { $recursiveRef: "#" } + }, + $defs: { + schemaArray: { + type: "array", + minItems: 1, + items: { $recursiveRef: "#" } + } + } + }; + } +}); + +// ../../node_modules/ajv/dist/refs/json-schema-2019-09/meta/content.json +var require_content = __commonJS({ + "../../node_modules/ajv/dist/refs/json-schema-2019-09/meta/content.json"(exports2, module2) { + module2.exports = { + $schema: "https://json-schema.org/draft/2019-09/schema", + $id: "https://json-schema.org/draft/2019-09/meta/content", + $vocabulary: { + "https://json-schema.org/draft/2019-09/vocab/content": true + }, + $recursiveAnchor: true, + title: "Content vocabulary meta-schema", + type: ["object", "boolean"], + properties: { + contentMediaType: { type: "string" }, + contentEncoding: { type: "string" }, + contentSchema: { $recursiveRef: "#" } + } + }; + } +}); + +// ../../node_modules/ajv/dist/refs/json-schema-2019-09/meta/core.json +var require_core4 = __commonJS({ + "../../node_modules/ajv/dist/refs/json-schema-2019-09/meta/core.json"(exports2, module2) { + module2.exports = { + $schema: "https://json-schema.org/draft/2019-09/schema", + $id: "https://json-schema.org/draft/2019-09/meta/core", + $vocabulary: { + "https://json-schema.org/draft/2019-09/vocab/core": true + }, + $recursiveAnchor: true, + title: "Core vocabulary meta-schema", + type: ["object", "boolean"], + properties: { + $id: { + type: "string", + format: "uri-reference", + $comment: "Non-empty fragments not allowed.", + pattern: "^[^#]*#?$" + }, + $schema: { + type: "string", + format: "uri" + }, + $anchor: { + type: "string", + pattern: "^[A-Za-z][-A-Za-z0-9.:_]*$" + }, + $ref: { + type: "string", + format: "uri-reference" + }, + $recursiveRef: { + type: "string", + format: "uri-reference" + }, + $recursiveAnchor: { + type: "boolean", + default: false + }, + $vocabulary: { + type: "object", + propertyNames: { + type: "string", + format: "uri" + }, + additionalProperties: { + type: "boolean" + } + }, + $comment: { + type: "string" + }, + $defs: { + type: "object", + additionalProperties: { $recursiveRef: "#" }, + default: {} + } + } + }; + } +}); + +// ../../node_modules/ajv/dist/refs/json-schema-2019-09/meta/format.json +var require_format3 = __commonJS({ + "../../node_modules/ajv/dist/refs/json-schema-2019-09/meta/format.json"(exports2, module2) { + module2.exports = { + $schema: "https://json-schema.org/draft/2019-09/schema", + $id: "https://json-schema.org/draft/2019-09/meta/format", + $vocabulary: { + "https://json-schema.org/draft/2019-09/vocab/format": true + }, + $recursiveAnchor: true, + title: "Format vocabulary meta-schema", + type: ["object", "boolean"], + properties: { + format: { type: "string" } + } + }; + } +}); + +// ../../node_modules/ajv/dist/refs/json-schema-2019-09/meta/meta-data.json +var require_meta_data = __commonJS({ + "../../node_modules/ajv/dist/refs/json-schema-2019-09/meta/meta-data.json"(exports2, module2) { + module2.exports = { + $schema: "https://json-schema.org/draft/2019-09/schema", + $id: "https://json-schema.org/draft/2019-09/meta/meta-data", + $vocabulary: { + "https://json-schema.org/draft/2019-09/vocab/meta-data": true + }, + $recursiveAnchor: true, + 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 + } + } + }; + } +}); + +// ../../node_modules/ajv/dist/refs/json-schema-2019-09/meta/validation.json +var require_validation2 = __commonJS({ + "../../node_modules/ajv/dist/refs/json-schema-2019-09/meta/validation.json"(exports2, module2) { + module2.exports = { + $schema: "https://json-schema.org/draft/2019-09/schema", + $id: "https://json-schema.org/draft/2019-09/meta/validation", + $vocabulary: { + "https://json-schema.org/draft/2019-09/vocab/validation": true + }, + $recursiveAnchor: true, + title: "Validation vocabulary meta-schema", + type: ["object", "boolean"], + properties: { + 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" + } + }, + const: true, + enum: { + type: "array", + items: true + }, + type: { + anyOf: [ + { $ref: "#/$defs/simpleTypes" }, + { + type: "array", + items: { $ref: "#/$defs/simpleTypes" }, + minItems: 1, + uniqueItems: true + } + ] + } + }, + $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: [] + } + } + }; + } +}); + +// ../../node_modules/ajv/dist/refs/json-schema-2019-09/index.js +var require_json_schema_2019_09 = __commonJS({ + "../../node_modules/ajv/dist/refs/json-schema-2019-09/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var metaSchema = require_schema2(); + var applicator = require_applicator2(); + var content = require_content(); + var core = require_core4(); + var format = require_format3(); + var metadata = require_meta_data(); + var validation = require_validation2(); + var META_SUPPORT_DATA = ["/properties"]; + function addMetaSchema2019($data) { + ; + [ + metaSchema, + applicator, + content, + core, + with$data(this, format), + metadata, + with$data(this, validation) + ].forEach((sch) => this.addMetaSchema(sch, void 0, false)); + return this; + function with$data(ajv, sch) { + return $data ? ajv.$dataMetaSchema(sch, META_SUPPORT_DATA) : sch; + } + } + exports2.default = addMetaSchema2019; + } +}); + +// ../../node_modules/ajv/dist/2019.js +var require__ = __commonJS({ + "../../node_modules/ajv/dist/2019.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.CodeGen = exports2.Name = exports2.nil = exports2.stringify = exports2.str = exports2._ = exports2.KeywordCxt = void 0; + var core_1 = require_core2(); + var draft7_1 = require_draft7(); + var dynamic_1 = require_dynamic(); + var next_1 = require_next2(); + var unevaluated_1 = require_unevaluated(); + var discriminator_1 = require_discriminator(); + var json_schema_2019_09_1 = require_json_schema_2019_09(); + var META_SCHEMA_ID = "https://json-schema.org/draft/2019-09/schema"; + var Ajv2019 = class extends core_1.default { + constructor(opts = {}) { + super({ + ...opts, + dynamicRef: true, + next: true, + unevaluated: true + }); + } + _addVocabularies() { + super._addVocabularies(); + this.addVocabulary(dynamic_1.default); + draft7_1.default.forEach((v) => this.addVocabulary(v)); + this.addVocabulary(next_1.default); + this.addVocabulary(unevaluated_1.default); + if (this.opts.discriminator) + this.addKeyword(discriminator_1.default); + } + _addDefaultMetaSchema() { + super._addDefaultMetaSchema(); + const { $data, meta } = this.opts; + if (!meta) + return; + json_schema_2019_09_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); + } + }; + module2.exports = exports2 = Ajv2019; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.default = Ajv2019; + var validate_1 = require_validate(); + Object.defineProperty(exports2, "KeywordCxt", { enumerable: true, get: function() { + return validate_1.KeywordCxt; + } }); + var codegen_1 = require_codegen(); + Object.defineProperty(exports2, "_", { enumerable: true, get: function() { + return codegen_1._; + } }); + Object.defineProperty(exports2, "str", { enumerable: true, get: function() { + return codegen_1.str; + } }); + Object.defineProperty(exports2, "stringify", { enumerable: true, get: function() { + return codegen_1.stringify; + } }); + Object.defineProperty(exports2, "nil", { enumerable: true, get: function() { + return codegen_1.nil; + } }); + Object.defineProperty(exports2, "Name", { enumerable: true, get: function() { + return codegen_1.Name; + } }); + Object.defineProperty(exports2, "CodeGen", { enumerable: true, get: function() { + return codegen_1.CodeGen; + } }); + } +}); + +// ../../node_modules/ajv/dist/refs/json-schema-draft-06.json +var require_json_schema_draft_06 = __commonJS({ + "../../node_modules/ajv/dist/refs/json-schema-draft-06.json"(exports2, module2) { + module2.exports = { + $schema: "http://json-schema.org/draft-06/schema#", + $id: "http://json-schema.org/draft-06/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" + }, + title: { + type: "string" + }, + description: { + type: "string" + }, + default: {}, + examples: { + type: "array", + items: {} + }, + 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: {} + }, + 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: "#" }, + default: {} + }, + dependencies: { + type: "object", + additionalProperties: { + anyOf: [{ $ref: "#" }, { $ref: "#/definitions/stringArray" }] + } + }, + propertyNames: { $ref: "#" }, + const: {}, + enum: { + type: "array", + minItems: 1, + uniqueItems: true + }, + type: { + anyOf: [ + { $ref: "#/definitions/simpleTypes" }, + { + type: "array", + items: { $ref: "#/definitions/simpleTypes" }, + minItems: 1, + uniqueItems: true + } + ] + }, + format: { type: "string" }, + allOf: { $ref: "#/definitions/schemaArray" }, + anyOf: { $ref: "#/definitions/schemaArray" }, + oneOf: { $ref: "#/definitions/schemaArray" }, + not: { $ref: "#" } + }, + default: {} + }; + } +}); + +// ../../node_modules/openapi-to-postmanv2/lib/ajValidation/ajvValidator.js +var require_ajvValidator = __commonJS({ + "../../node_modules/openapi-to-postmanv2/lib/ajValidation/ajvValidator.js"(exports2, module2) { + var Ajv = require_ajv(); + var Ajv2019 = require__(); + var addFormats = require_dist5(); + var draft7MetaSchema = require_json_schema_draft_07(); + var draft6MetaSchema = require_json_schema_draft_06(); + var drafts2019 = ["https://json-schema.org/draft/2019-09/schema", "https://json-schema.org/draft/2020-12/schema"]; + var draft06 = "http://json-schema.org/draft-06/schema#"; + var draft07 = "http://json-schema.org/draft-07/schema#"; + function buildValidatorObject(draftToUse) { + if (drafts2019.includes(draftToUse)) { + return new Ajv2019({ + // check all rules collecting all errors. instead returning after the first error. + allErrors: true, + strict: false + }); + } + let ajv = new Ajv({ + // check all rules collecting all errors. instead returning after the first error. + allErrors: true, + strict: false + }); + if (draftToUse === draft06) { + ajv.addMetaSchema(draft6MetaSchema); + } + if (draftToUse === draft07) { + ajv.addMetaSchema(draft7MetaSchema); + } + return ajv; + } + function validateSchemaAJV(schema2, valueToUse, draftToUse) { + let ajv, validate2, filteredValidationError; + try { + ajv = buildValidatorObject(draftToUse); + addFormats(ajv); + validate2 = ajv.compile(schema2); + validate2(valueToUse); + } catch (e) { + return { filteredValidationError }; + } + return { filteredValidationError, validate: validate2 }; + } + module2.exports = { + validateSchemaAJV + }; + } +}); + +// ../../node_modules/openapi-to-postmanv2/assets/ajv6faker.js +var require_ajv6faker = __commonJS({ + "../../node_modules/openapi-to-postmanv2/assets/ajv6faker.js"(exports2, module2) { + (function(f) { + if (typeof exports2 === "object" && typeof module2 !== "undefined") { + module2.exports = f(); + } else if (typeof define === "function" && define.amd) { + define([], f); + } else { + var g; + if (typeof window !== "undefined") { + g = window; + } else if (typeof global !== "undefined") { + g = global; + } else if (typeof self !== "undefined") { + g = self; + } else { + g = this; + } + g.ajv6faker = f(); + } + })(function() { + var define2, module3, exports3; + return (/* @__PURE__ */ function() { + function r(e, n, t) { + function o(i2, f) { + if (!n[i2]) { + if (!e[i2]) { + var c = "function" == typeof require && require; + if (!f && c) return c(i2, true); + if (u) return u(i2, true); + var a = new Error("Cannot find module '" + i2 + "'"); + throw a.code = "MODULE_NOT_FOUND", a; + } + var p = n[i2] = { exports: {} }; + e[i2][0].call(p.exports, function(r2) { + var n2 = e[i2][1][r2]; + return o(n2 || r2); + }, p, p.exports, r, e, n, t); + } + return n[i2].exports; + } + for (var u = "function" == typeof require && require, i = 0; i < t.length; i++) o(t[i]); + return o; + } + return r; + }())({ 1: [function(require2, module4, exports4) { + "use strict"; + var compileSchema = require2("./compile"), resolve = require2("./compile/resolve"), Cache = require2("./cache"), SchemaObject = require2("./compile/schema_obj"), stableStringify = require2("fast-json-stable-stringify"), formats = require2("./compile/formats"), rules = require2("./compile/rules"), $dataMetaSchema = require2("./data"), util = require2("./compile/util"); + module4.exports = Ajv; + Ajv.prototype.validate = validate2; + Ajv.prototype.compile = compile; + Ajv.prototype.addSchema = addSchema; + Ajv.prototype.addMetaSchema = addMetaSchema; + Ajv.prototype.validateSchema = validateSchema; + Ajv.prototype.getSchema = getSchema; + Ajv.prototype.removeSchema = removeSchema; + Ajv.prototype.addFormat = addFormat; + Ajv.prototype.errorsText = errorsText; + Ajv.prototype._addSchema = _addSchema; + Ajv.prototype._compile = _compile; + Ajv.prototype.compileAsync = require2("./compile/async"); + var customKeyword = require2("./keyword"); + Ajv.prototype.addKeyword = customKeyword.add; + Ajv.prototype.getKeyword = customKeyword.get; + Ajv.prototype.removeKeyword = customKeyword.remove; + Ajv.prototype.validateKeyword = customKeyword.validate; + var errorClasses = require2("./compile/error_classes"); + Ajv.ValidationError = errorClasses.Validation; + Ajv.MissingRefError = errorClasses.MissingRef; + Ajv.$dataMetaSchema = $dataMetaSchema; + var META_SCHEMA_ID = "http://json-schema.org/draft-07/schema"; + var META_IGNORE_OPTIONS = ["removeAdditional", "useDefaults", "coerceTypes", "strictDefaults"]; + var META_SUPPORT_DATA = ["/properties"]; + function Ajv(opts) { + if (!(this instanceof Ajv)) return new Ajv(opts); + opts = this._opts = util.copy(opts) || {}; + setLogger(this); + this._schemas = {}; + this._refs = {}; + this._fragments = {}; + this._formats = formats(opts.format); + this._cache = opts.cache || new Cache(); + this._loadingSchemas = {}; + this._compilations = []; + this.RULES = rules(); + this._getId = chooseGetId(opts); + opts.loopRequired = opts.loopRequired || Infinity; + if (opts.errorDataPath == "property") opts._errorDataPathProperty = true; + if (opts.serialize === void 0) opts.serialize = stableStringify; + this._metaOpts = getMetaSchemaOptions(this); + if (opts.formats) addInitialFormats(this); + if (opts.keywords) addInitialKeywords(this); + addDefaultMetaSchema(this); + if (typeof opts.meta == "object") this.addMetaSchema(opts.meta); + if (opts.nullable) this.addKeyword("nullable", { metaSchema: { type: "boolean" } }); + addInitialSchemas(this); + } + function validate2(schemaKeyRef, data) { + var v; + if (typeof schemaKeyRef == "string") { + v = this.getSchema(schemaKeyRef); + if (!v) throw new Error('no schema with key or ref "' + schemaKeyRef + '"'); + } else { + var schemaObj = this._addSchema(schemaKeyRef); + v = schemaObj.validate || this._compile(schemaObj); + } + var valid = v(data); + if (v.$async !== true) this.errors = v.errors; + return valid; + } + function compile(schema2, _meta) { + var schemaObj = this._addSchema(schema2, void 0, _meta); + return schemaObj.validate || this._compile(schemaObj); + } + function addSchema(schema2, key, _skipValidation, _meta) { + if (Array.isArray(schema2)) { + for (var i = 0; i < schema2.length; i++) this.addSchema(schema2[i], void 0, _skipValidation, _meta); + return this; + } + var id = this._getId(schema2); + if (id !== void 0 && typeof id != "string") + throw new Error("schema id must be string"); + key = resolve.normalizeId(key || id); + checkUnique(this, key); + this._schemas[key] = this._addSchema(schema2, _skipValidation, _meta, true); + return this; + } + function addMetaSchema(schema2, key, skipValidation) { + this.addSchema(schema2, key, skipValidation, true); + return this; + } + function validateSchema(schema2, throwOrLogError) { + var $schema = schema2.$schema; + if ($schema !== void 0 && typeof $schema != "string") + throw new Error("$schema must be a string"); + $schema = $schema || this._opts.defaultMeta || defaultMeta(this); + if (!$schema) { + this.logger.warn("meta-schema not available"); + this.errors = null; + return true; + } + var valid = this.validate($schema, schema2); + if (!valid && throwOrLogError) { + var message = "schema is invalid: " + this.errorsText(); + if (this._opts.validateSchema == "log") this.logger.error(message); + else throw new Error(message); + } + return valid; + } + function defaultMeta(self2) { + var meta = self2._opts.meta; + self2._opts.defaultMeta = typeof meta == "object" ? self2._getId(meta) || meta : self2.getSchema(META_SCHEMA_ID) ? META_SCHEMA_ID : void 0; + return self2._opts.defaultMeta; + } + function getSchema(keyRef) { + var schemaObj = _getSchemaObj(this, keyRef); + switch (typeof schemaObj) { + case "object": + return schemaObj.validate || this._compile(schemaObj); + case "string": + return this.getSchema(schemaObj); + case "undefined": + return _getSchemaFragment(this, keyRef); + } + } + function _getSchemaFragment(self2, ref) { + var res = resolve.schema.call(self2, { schema: {} }, ref); + if (res) { + var schema2 = res.schema, root = res.root, baseId = res.baseId; + var v = compileSchema.call(self2, schema2, root, void 0, baseId); + self2._fragments[ref] = new SchemaObject({ + ref, + fragment: true, + schema: schema2, + root, + baseId, + validate: v + }); + return v; + } + } + function _getSchemaObj(self2, keyRef) { + keyRef = resolve.normalizeId(keyRef); + return self2._schemas[keyRef] || self2._refs[keyRef] || self2._fragments[keyRef]; + } + function removeSchema(schemaKeyRef) { + if (schemaKeyRef instanceof RegExp) { + _removeAllSchemas(this, this._schemas, schemaKeyRef); + _removeAllSchemas(this, this._refs, schemaKeyRef); + return this; + } + switch (typeof schemaKeyRef) { + case "undefined": + _removeAllSchemas(this, this._schemas); + _removeAllSchemas(this, this._refs); + this._cache.clear(); + return this; + case "string": + var schemaObj = _getSchemaObj(this, schemaKeyRef); + if (schemaObj) this._cache.del(schemaObj.cacheKey); + delete this._schemas[schemaKeyRef]; + delete this._refs[schemaKeyRef]; + return this; + case "object": + var serialize = this._opts.serialize; + var cacheKey = serialize ? serialize(schemaKeyRef) : schemaKeyRef; + this._cache.del(cacheKey); + var id = this._getId(schemaKeyRef); + if (id) { + id = resolve.normalizeId(id); + delete this._schemas[id]; + delete this._refs[id]; + } + } + return this; + } + function _removeAllSchemas(self2, schemas, regex) { + for (var keyRef in schemas) { + var schemaObj = schemas[keyRef]; + if (!schemaObj.meta && (!regex || regex.test(keyRef))) { + self2._cache.del(schemaObj.cacheKey); + delete schemas[keyRef]; + } + } + } + function _addSchema(schema2, skipValidation, meta, shouldAddSchema) { + if (typeof schema2 != "object" && typeof schema2 != "boolean") + throw new Error("schema should be object or boolean"); + var serialize = this._opts.serialize; + var cacheKey = serialize ? serialize(schema2) : schema2; + var cached = this._cache.get(cacheKey); + if (cached) return cached; + shouldAddSchema = shouldAddSchema || this._opts.addUsedSchema !== false; + var id = resolve.normalizeId(this._getId(schema2)); + if (id && shouldAddSchema) checkUnique(this, id); + var willValidate = this._opts.validateSchema !== false && !skipValidation; + var recursiveMeta; + if (willValidate && !(recursiveMeta = id && id == resolve.normalizeId(schema2.$schema))) + this.validateSchema(schema2, true); + var localRefs = resolve.ids.call(this, schema2); + var schemaObj = new SchemaObject({ + id, + schema: schema2, + localRefs, + cacheKey, + meta + }); + if (id[0] != "#" && shouldAddSchema) this._refs[id] = schemaObj; + this._cache.put(cacheKey, schemaObj); + if (willValidate && recursiveMeta) this.validateSchema(schema2, true); + return schemaObj; + } + function _compile(schemaObj, root) { + if (schemaObj.compiling) { + schemaObj.validate = callValidate; + callValidate.schema = schemaObj.schema; + callValidate.errors = null; + callValidate.root = root ? root : callValidate; + if (schemaObj.schema.$async === true) + callValidate.$async = true; + return callValidate; + } + schemaObj.compiling = true; + var currentOpts; + if (schemaObj.meta) { + currentOpts = this._opts; + this._opts = this._metaOpts; + } + var v; + try { + v = compileSchema.call(this, schemaObj.schema, root, schemaObj.localRefs); + } catch (e) { + delete schemaObj.validate; + throw e; + } finally { + schemaObj.compiling = false; + if (schemaObj.meta) this._opts = currentOpts; + } + schemaObj.validate = v; + schemaObj.refs = v.refs; + schemaObj.refVal = v.refVal; + schemaObj.root = v.root; + return v; + function callValidate() { + var _validate = schemaObj.validate; + var result = _validate.apply(this, arguments); + callValidate.errors = _validate.errors; + return result; + } + } + function chooseGetId(opts) { + switch (opts.schemaId) { + case "auto": + return _get$IdOrId; + case "id": + return _getId; + default: + return _get$Id; + } + } + function _getId(schema2) { + if (schema2.$id) this.logger.warn("schema $id ignored", schema2.$id); + return schema2.id; + } + function _get$Id(schema2) { + if (schema2.id) this.logger.warn("schema id ignored", schema2.id); + return schema2.$id; + } + function _get$IdOrId(schema2) { + if (schema2.$id && schema2.id && schema2.$id != schema2.id) + throw new Error("schema $id is different from id"); + return schema2.$id || schema2.id; + } + function errorsText(errors, options) { + errors = errors || this.errors; + if (!errors) return "No errors"; + options = options || {}; + var separator = options.separator === void 0 ? ", " : options.separator; + var dataVar = options.dataVar === void 0 ? "data" : options.dataVar; + var text = ""; + for (var i = 0; i < errors.length; i++) { + var e = errors[i]; + if (e) text += dataVar + e.dataPath + " " + e.message + separator; + } + return text.slice(0, -separator.length); + } + function addFormat(name, format) { + if (typeof format == "string") format = new RegExp(format); + this._formats[name] = format; + return this; + } + function addDefaultMetaSchema(self2) { + var $dataSchema; + if (self2._opts.$data) { + $dataSchema = require2("./refs/data.json"); + self2.addMetaSchema($dataSchema, $dataSchema.$id, true); + } + if (self2._opts.meta === false) return; + var metaSchema = require2("./refs/json-schema-draft-07.json"); + if (self2._opts.$data) metaSchema = $dataMetaSchema(metaSchema, META_SUPPORT_DATA); + self2.addMetaSchema(metaSchema, META_SCHEMA_ID, true); + self2._refs["http://json-schema.org/schema"] = META_SCHEMA_ID; + } + function addInitialSchemas(self2) { + var optsSchemas = self2._opts.schemas; + if (!optsSchemas) return; + if (Array.isArray(optsSchemas)) self2.addSchema(optsSchemas); + else for (var key in optsSchemas) self2.addSchema(optsSchemas[key], key); + } + function addInitialFormats(self2) { + for (var name in self2._opts.formats) { + var format = self2._opts.formats[name]; + self2.addFormat(name, format); + } + } + function addInitialKeywords(self2) { + for (var name in self2._opts.keywords) { + var keyword = self2._opts.keywords[name]; + self2.addKeyword(name, keyword); + } + } + function checkUnique(self2, id) { + if (self2._schemas[id] || self2._refs[id]) + throw new Error('schema with key or id "' + id + '" already exists'); + } + function getMetaSchemaOptions(self2) { + var metaOpts = util.copy(self2._opts); + for (var i = 0; i < META_IGNORE_OPTIONS.length; i++) + delete metaOpts[META_IGNORE_OPTIONS[i]]; + return metaOpts; + } + function setLogger(self2) { + var logger = self2._opts.logger; + if (logger === false) { + self2.logger = { log: noop, warn: noop, error: noop }; + } else { + if (logger === void 0) logger = console; + if (!(typeof logger == "object" && logger.log && logger.warn && logger.error)) + throw new Error("logger must implement log, warn and error methods"); + self2.logger = logger; + } + } + function noop() { + } + }, { "./cache": 2, "./compile": 6, "./compile/async": 3, "./compile/error_classes": 4, "./compile/formats": 5, "./compile/resolve": 7, "./compile/rules": 8, "./compile/schema_obj": 9, "./compile/util": 11, "./data": 12, "./keyword": 40, "./refs/data.json": 41, "./refs/json-schema-draft-07.json": 42, "fast-json-stable-stringify": 44 }], 2: [function(require2, module4, exports4) { + "use strict"; + var Cache = module4.exports = function Cache2() { + this._cache = {}; + }; + Cache.prototype.put = function Cache_put(key, value) { + this._cache[key] = value; + }; + Cache.prototype.get = function Cache_get(key) { + return this._cache[key]; + }; + Cache.prototype.del = function Cache_del(key) { + delete this._cache[key]; + }; + Cache.prototype.clear = function Cache_clear() { + this._cache = {}; + }; + }, {}], 3: [function(require2, module4, exports4) { + "use strict"; + var MissingRefError = require2("./error_classes").MissingRef; + module4.exports = compileAsync; + function compileAsync(schema2, meta, callback) { + var self2 = this; + if (typeof this._opts.loadSchema != "function") + throw new Error("options.loadSchema should be a function"); + if (typeof meta == "function") { + callback = meta; + meta = void 0; + } + var p = loadMetaSchemaOf(schema2).then(function() { + var schemaObj = self2._addSchema(schema2, void 0, meta); + return schemaObj.validate || _compileAsync(schemaObj); + }); + if (callback) { + p.then( + function(v) { + callback(null, v); + }, + callback + ); + } + return p; + function loadMetaSchemaOf(sch) { + var $schema = sch.$schema; + return $schema && !self2.getSchema($schema) ? compileAsync.call(self2, { $ref: $schema }, true) : Promise.resolve(); + } + function _compileAsync(schemaObj) { + try { + return self2._compile(schemaObj); + } catch (e) { + if (e instanceof MissingRefError) return loadMissingSchema(e); + throw e; + } + function loadMissingSchema(e) { + var ref = e.missingSchema; + if (added(ref)) throw new Error("Schema " + ref + " is loaded but " + e.missingRef + " cannot be resolved"); + var schemaPromise = self2._loadingSchemas[ref]; + if (!schemaPromise) { + schemaPromise = self2._loadingSchemas[ref] = self2._opts.loadSchema(ref); + schemaPromise.then(removePromise, removePromise); + } + return schemaPromise.then(function(sch) { + if (!added(ref)) { + return loadMetaSchemaOf(sch).then(function() { + if (!added(ref)) self2.addSchema(sch, ref, void 0, meta); + }); + } + }).then(function() { + return _compileAsync(schemaObj); + }); + function removePromise() { + delete self2._loadingSchemas[ref]; + } + function added(ref2) { + return self2._refs[ref2] || self2._schemas[ref2]; + } + } + } + } + }, { "./error_classes": 4 }], 4: [function(require2, module4, exports4) { + "use strict"; + var resolve = require2("./resolve"); + module4.exports = { + Validation: errorSubclass(ValidationError), + MissingRef: errorSubclass(MissingRefError) + }; + function ValidationError(errors) { + this.message = "validation failed"; + this.errors = errors; + this.ajv = this.validation = true; + } + MissingRefError.message = function(baseId, ref) { + return "can't resolve reference " + ref + " from id " + baseId; + }; + function MissingRefError(baseId, ref, message) { + this.message = message || MissingRefError.message(baseId, ref); + this.missingRef = resolve.url(baseId, ref); + this.missingSchema = resolve.normalizeId(resolve.fullPath(this.missingRef)); + } + function errorSubclass(Subclass) { + Subclass.prototype = Object.create(Error.prototype); + Subclass.prototype.constructor = Subclass; + return Subclass; + } + }, { "./resolve": 7 }], 5: [function(require2, module4, exports4) { + "use strict"; + var util = require2("./util"); + 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]; + var TIME = /^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i; + var 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; + 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; + var URIREF = /^(?:[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; + var URITEMPLATE = /^(?:(?:[^\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; + var URL3 = /^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i; + var UUID = /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i; + var JSON_POINTER = /^(?:\/(?:[^~/]|~0|~1)*)*$/; + var JSON_POINTER_URI_FRAGMENT = /^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i; + var RELATIVE_JSON_POINTER = /^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/; + module4.exports = formats; + function formats(mode) { + mode = mode == "full" ? "full" : "fast"; + return util.copy(formats[mode]); + } + formats.fast = { + // date: http://tools.ietf.org/html/rfc3339#section-5.6 + date: /^\d\d\d\d-[0-1]\d-[0-3]\d$/, + // date-time: http://tools.ietf.org/html/rfc3339#section-5.6 + time: /^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i, + "date-time": /^\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, + // 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, + "uri-template": URITEMPLATE, + url: URL3, + // 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 'willful 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, + hostname: HOSTNAME, + // optimized https://www.safaribooksonline.com/library/view/regular-expressions-cookbook/9780596802837/ch07s16.html + ipv4: /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/, + // optimized http://stackoverflow.com/questions/53497/regular-expression-that-matches-valid-ipv6-addresses + ipv6: /^\s*(?:(?:(?:[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}))|:)))(?:%.+)?\s*$/i, + regex, + // uuid: http://tools.ietf.org/html/rfc4122 + uuid: UUID, + // JSON-pointer: https://tools.ietf.org/html/rfc6901 + // uri fragment: https://tools.ietf.org/html/rfc3986#appendix-A + "json-pointer": JSON_POINTER, + "json-pointer-uri-fragment": JSON_POINTER_URI_FRAGMENT, + // relative JSON-pointer: http://tools.ietf.org/html/draft-luff-relative-json-pointer-00 + "relative-json-pointer": RELATIVE_JSON_POINTER + }; + formats.full = { + date, + time, + "date-time": date_time, + uri, + "uri-reference": URIREF, + "uri-template": URITEMPLATE, + url: URL3, + 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: HOSTNAME, + ipv4: /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/, + ipv6: /^\s*(?:(?:(?:[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}))|:)))(?:%.+)?\s*$/i, + regex, + uuid: UUID, + "json-pointer": JSON_POINTER, + "json-pointer-uri-fragment": JSON_POINTER_URI_FRAGMENT, + "relative-json-pointer": RELATIVE_JSON_POINTER + }; + function isLeapYear(year) { + return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0); + } + function date(str) { + var matches = str.match(DATE); + if (!matches) return false; + var year = +matches[1]; + var month = +matches[2]; + var day = +matches[3]; + return month >= 1 && month <= 12 && day >= 1 && day <= (month == 2 && isLeapYear(year) ? 29 : DAYS[month]); + } + function time(str, full) { + var matches = str.match(TIME); + if (!matches) return false; + var hour = matches[1]; + var minute = matches[2]; + var second = matches[3]; + var timeZone = matches[5]; + return (hour <= 23 && minute <= 59 && second <= 59 || hour == 23 && minute == 59 && second == 60) && (!full || timeZone); + } + var DATE_TIME_SEPARATOR = /t|\s/i; + function date_time(str) { + var dateTime = str.split(DATE_TIME_SEPARATOR); + return dateTime.length == 2 && date(dateTime[0]) && time(dateTime[1], true); + } + var NOT_URI_FRAGMENT = /\/|:/; + function uri(str) { + return NOT_URI_FRAGMENT.test(str) && URI.test(str); + } + var Z_ANCHOR = /[^\\]\\Z/; + function regex(str) { + if (Z_ANCHOR.test(str)) return false; + try { + new RegExp(str); + return true; + } catch (e) { + return false; + } + } + }, { "./util": 11 }], 6: [function(require2, module4, exports4) { + "use strict"; + var resolve = require2("./resolve"), util = require2("./util"), errorClasses = require2("./error_classes"), stableStringify = require2("fast-json-stable-stringify"); + var validateGenerator = require2("../dotjs/validate"); + var ucs2length = util.ucs2length; + var equal = require2("fast-deep-equal"); + var ValidationError = errorClasses.Validation; + module4.exports = compile; + function compile(schema2, root, localRefs, baseId) { + var self2 = this, opts = this._opts, refVal = [void 0], refs = {}, patterns = [], patternsHash = {}, defaults = [], defaultsHash = {}, customRules = []; + root = root || { schema: schema2, refVal, refs }; + var c = checkCompiling.call(this, schema2, root, baseId); + var compilation = this._compilations[c.index]; + if (c.compiling) return compilation.callValidate = callValidate; + var formats = this._formats; + var RULES = this.RULES; + try { + var v = localCompile(schema2, root, localRefs, baseId); + compilation.validate = v; + var cv = compilation.callValidate; + if (cv) { + cv.schema = v.schema; + cv.errors = null; + cv.refs = v.refs; + cv.refVal = v.refVal; + cv.root = v.root; + cv.$async = v.$async; + if (opts.sourceCode) cv.source = v.source; + } + return v; + } finally { + endCompiling.call(this, schema2, root, baseId); + } + function callValidate() { + var validate2 = compilation.validate; + var result = validate2.apply(this, arguments); + callValidate.errors = validate2.errors; + return result; + } + function localCompile(_schema, _root, localRefs2, baseId2) { + var isRoot = !_root || _root && _root.schema == _schema; + if (_root.schema != root.schema) + return compile.call(self2, _schema, _root, localRefs2, baseId2); + var $async = _schema.$async === true; + var sourceCode = validateGenerator({ + isTop: true, + schema: _schema, + isRoot, + baseId: baseId2, + root: _root, + schemaPath: "", + errSchemaPath: "#", + errorPath: '""', + MissingRefError: errorClasses.MissingRef, + RULES, + validate: validateGenerator, + util, + resolve, + resolveRef, + usePattern, + useDefault, + useCustomRule, + opts, + formats, + logger: self2.logger, + self: self2 + }); + sourceCode = vars(refVal, refValCode) + vars(patterns, patternCode) + vars(defaults, defaultCode) + vars(customRules, customRuleCode) + sourceCode; + if (opts.processCode) sourceCode = opts.processCode(sourceCode, _schema); + var validate2; + try { + var makeValidate = new Function( + "self", + "RULES", + "formats", + "root", + "refVal", + "defaults", + "customRules", + "equal", + "ucs2length", + "ValidationError", + sourceCode + ); + validate2 = makeValidate( + self2, + RULES, + formats, + root, + refVal, + defaults, + customRules, + equal, + ucs2length, + ValidationError + ); + refVal[0] = validate2; + } catch (e) { + self2.logger.error("Error compiling schema, function code:", sourceCode); + throw e; + } + validate2.schema = _schema; + validate2.errors = null; + validate2.refs = refs; + validate2.refVal = refVal; + validate2.root = isRoot ? validate2 : _root; + if ($async) validate2.$async = true; + if (opts.sourceCode === true) { + validate2.source = { + code: sourceCode, + patterns, + defaults + }; + } + return validate2; + } + function resolveRef(baseId2, ref, isRoot) { + ref = resolve.url(baseId2, ref); + var refIndex = refs[ref]; + var _refVal, refCode; + if (refIndex !== void 0) { + _refVal = refVal[refIndex]; + refCode = "refVal[" + refIndex + "]"; + return resolvedRef(_refVal, refCode); + } + if (!isRoot && root.refs) { + var rootRefId = root.refs[ref]; + if (rootRefId !== void 0) { + _refVal = root.refVal[rootRefId]; + refCode = addLocalRef(ref, _refVal); + return resolvedRef(_refVal, refCode); + } + } + refCode = addLocalRef(ref); + var v2 = resolve.call(self2, localCompile, root, ref); + if (v2 === void 0) { + var localSchema = localRefs && localRefs[ref]; + if (localSchema) { + v2 = resolve.inlineRef(localSchema, opts.inlineRefs) ? localSchema : compile.call(self2, localSchema, root, localRefs, baseId2); + } + } + if (v2 === void 0) { + removeLocalRef(ref); + } else { + replaceLocalRef(ref, v2); + return resolvedRef(v2, refCode); + } + } + function addLocalRef(ref, v2) { + var refId = refVal.length; + refVal[refId] = v2; + refs[ref] = refId; + return "refVal" + refId; + } + function removeLocalRef(ref) { + delete refs[ref]; + } + function replaceLocalRef(ref, v2) { + var refId = refs[ref]; + refVal[refId] = v2; + } + function resolvedRef(refVal2, code) { + return typeof refVal2 == "object" || typeof refVal2 == "boolean" ? { code, schema: refVal2, inline: true } : { code, $async: refVal2 && !!refVal2.$async }; + } + function usePattern(regexStr) { + var index = patternsHash[regexStr]; + if (index === void 0) { + index = patternsHash[regexStr] = patterns.length; + patterns[index] = regexStr; + } + return "pattern" + index; + } + function useDefault(value) { + switch (typeof value) { + case "boolean": + case "number": + return "" + value; + case "string": + return util.toQuotedString(value); + case "object": + if (value === null) return "null"; + var valueStr = stableStringify(value); + var index = defaultsHash[valueStr]; + if (index === void 0) { + index = defaultsHash[valueStr] = defaults.length; + defaults[index] = value; + } + return "default" + index; + } + } + function useCustomRule(rule, schema3, parentSchema, it) { + if (self2._opts.validateSchema !== false) { + var deps = rule.definition.dependencies; + if (deps && !deps.every(function(keyword) { + return Object.prototype.hasOwnProperty.call(parentSchema, keyword); + })) + throw new Error("parent schema must have all required keywords: " + deps.join(",")); + var validateSchema = rule.definition.validateSchema; + if (validateSchema) { + var valid = validateSchema(schema3); + if (!valid) { + var message = "keyword schema is invalid: " + self2.errorsText(validateSchema.errors); + if (self2._opts.validateSchema == "log") self2.logger.error(message); + else throw new Error(message); + } + } + } + var compile2 = rule.definition.compile, inline = rule.definition.inline, macro = rule.definition.macro; + var validate2; + if (compile2) { + validate2 = compile2.call(self2, schema3, parentSchema, it); + } else if (macro) { + validate2 = macro.call(self2, schema3, parentSchema, it); + if (opts.validateSchema !== false) self2.validateSchema(validate2, true); + } else if (inline) { + validate2 = inline.call(self2, it, rule.keyword, schema3, parentSchema); + } else { + validate2 = rule.definition.validate; + if (!validate2) return; + } + if (validate2 === void 0) + throw new Error('custom keyword "' + rule.keyword + '"failed to compile'); + var index = customRules.length; + customRules[index] = validate2; + return { + code: "customRule" + index, + validate: validate2 + }; + } + } + function checkCompiling(schema2, root, baseId) { + var index = compIndex.call(this, schema2, root, baseId); + if (index >= 0) return { index, compiling: true }; + index = this._compilations.length; + this._compilations[index] = { + schema: schema2, + root, + baseId + }; + return { index, compiling: false }; + } + function endCompiling(schema2, root, baseId) { + var i = compIndex.call(this, schema2, root, baseId); + if (i >= 0) this._compilations.splice(i, 1); + } + function compIndex(schema2, root, baseId) { + for (var i = 0; i < this._compilations.length; i++) { + var c = this._compilations[i]; + if (c.schema == schema2 && c.root == root && c.baseId == baseId) return i; + } + return -1; + } + function patternCode(i, patterns) { + return "var pattern" + i + " = new RegExp(" + util.toQuotedString(patterns[i]) + ");"; + } + function defaultCode(i) { + return "var default" + i + " = defaults[" + i + "];"; + } + function refValCode(i, refVal) { + return refVal[i] === void 0 ? "" : "var refVal" + i + " = refVal[" + i + "];"; + } + function customRuleCode(i) { + return "var customRule" + i + " = customRules[" + i + "];"; + } + function vars(arr, statement) { + if (!arr.length) return ""; + var code = ""; + for (var i = 0; i < arr.length; i++) + code += statement(i, arr); + return code; + } + }, { "../dotjs/validate": 39, "./error_classes": 4, "./resolve": 7, "./util": 11, "fast-deep-equal": 43, "fast-json-stable-stringify": 44 }], 7: [function(require2, module4, exports4) { + "use strict"; + var URI = require2("uri-js"), equal = require2("fast-deep-equal"), util = require2("./util"), SchemaObject = require2("./schema_obj"), traverse = require2("json-schema-traverse"); + module4.exports = resolve; + resolve.normalizeId = normalizeId; + resolve.fullPath = getFullPath; + resolve.url = resolveUrl; + resolve.ids = resolveIds; + resolve.inlineRef = inlineRef; + resolve.schema = resolveSchema; + function resolve(compile, root, ref) { + var refVal = this._refs[ref]; + if (typeof refVal == "string") { + if (this._refs[refVal]) refVal = this._refs[refVal]; + else return resolve.call(this, compile, root, refVal); + } + refVal = refVal || this._schemas[ref]; + if (refVal instanceof SchemaObject) { + return inlineRef(refVal.schema, this._opts.inlineRefs) ? refVal.schema : refVal.validate || this._compile(refVal); + } + var res = resolveSchema.call(this, root, ref); + var schema2, v, baseId; + if (res) { + schema2 = res.schema; + root = res.root; + baseId = res.baseId; + } + if (schema2 instanceof SchemaObject) { + v = schema2.validate || compile.call(this, schema2.schema, root, void 0, baseId); + } else if (schema2 !== void 0) { + v = inlineRef(schema2, this._opts.inlineRefs) ? schema2 : compile.call(this, schema2, root, void 0, baseId); + } + return v; + } + function resolveSchema(root, ref) { + var p = URI.parse(ref), refPath = _getFullPath(p), baseId = getFullPath(this._getId(root.schema)); + if (Object.keys(root.schema).length === 0 || refPath !== baseId) { + var id = normalizeId(refPath); + var refVal = this._refs[id]; + if (typeof refVal == "string") { + return resolveRecursive.call(this, root, refVal, p); + } else if (refVal instanceof SchemaObject) { + if (!refVal.validate) this._compile(refVal); + root = refVal; + } else { + refVal = this._schemas[id]; + if (refVal instanceof SchemaObject) { + if (!refVal.validate) this._compile(refVal); + if (id == normalizeId(ref)) + return { schema: refVal, root, baseId }; + root = refVal; + } else { + return; + } + } + if (!root.schema) return; + baseId = getFullPath(this._getId(root.schema)); + } + return getJsonPointer.call(this, p, baseId, root.schema, root); + } + function resolveRecursive(root, ref, parsedRef) { + var res = resolveSchema.call(this, root, ref); + if (res) { + var schema2 = res.schema; + var baseId = res.baseId; + root = res.root; + var id = this._getId(schema2); + if (id) baseId = resolveUrl(baseId, id); + return getJsonPointer.call(this, parsedRef, baseId, schema2, root); + } + } + var PREVENT_SCOPE_CHANGE = util.toHash(["properties", "patternProperties", "enum", "dependencies", "definitions"]); + function getJsonPointer(parsedRef, baseId, schema2, root) { + parsedRef.fragment = parsedRef.fragment || ""; + if (parsedRef.fragment.slice(0, 1) != "/") return; + var parts = parsedRef.fragment.split("/"); + for (var i = 1; i < parts.length; i++) { + var part = parts[i]; + if (part) { + part = util.unescapeFragment(part); + schema2 = schema2[part]; + if (schema2 === void 0) break; + var id; + if (!PREVENT_SCOPE_CHANGE[part]) { + id = this._getId(schema2); + if (id) baseId = resolveUrl(baseId, id); + if (schema2.$ref) { + var $ref = resolveUrl(baseId, schema2.$ref); + var res = resolveSchema.call(this, root, $ref); + if (res) { + schema2 = res.schema; + root = res.root; + baseId = res.baseId; + } + } + } + } + } + if (schema2 !== void 0 && schema2 !== root.schema) + return { schema: schema2, root, baseId }; + } + var SIMPLE_INLINED = util.toHash([ + "type", + "format", + "pattern", + "maxLength", + "minLength", + "maxProperties", + "minProperties", + "maxItems", + "minItems", + "maximum", + "minimum", + "uniqueItems", + "multipleOf", + "required", + "enum" + ]); + function inlineRef(schema2, limit) { + if (limit === false) return false; + if (limit === void 0 || limit === true) return checkNoRef(schema2); + else if (limit) return countKeys(schema2) <= limit; + } + function checkNoRef(schema2) { + var item; + if (Array.isArray(schema2)) { + for (var i = 0; i < schema2.length; i++) { + item = schema2[i]; + if (typeof item == "object" && !checkNoRef(item)) return false; + } + } else { + for (var key in schema2) { + if (key == "$ref") return false; + item = schema2[key]; + if (typeof item == "object" && !checkNoRef(item)) return false; + } + } + return true; + } + function countKeys(schema2) { + var count = 0, item; + if (Array.isArray(schema2)) { + for (var i = 0; i < schema2.length; i++) { + item = schema2[i]; + if (typeof item == "object") count += countKeys(item); + if (count == Infinity) return Infinity; + } + } else { + for (var key in schema2) { + if (key == "$ref") return Infinity; + if (SIMPLE_INLINED[key]) { + count++; + } else { + item = schema2[key]; + if (typeof item == "object") count += countKeys(item) + 1; + if (count == Infinity) return Infinity; + } + } + } + return count; + } + function getFullPath(id, normalize) { + if (normalize !== false) id = normalizeId(id); + var p = URI.parse(id); + return _getFullPath(p); + } + function _getFullPath(p) { + return URI.serialize(p).split("#")[0] + "#"; + } + var TRAILING_SLASH_HASH = /#\/?$/; + function normalizeId(id) { + return id ? id.replace(TRAILING_SLASH_HASH, "") : ""; + } + function resolveUrl(baseId, id) { + id = normalizeId(id); + return URI.resolve(baseId, id); + } + function resolveIds(schema2) { + var schemaId = normalizeId(this._getId(schema2)); + var baseIds = { "": schemaId }; + var fullPaths = { "": getFullPath(schemaId, false) }; + var localRefs = {}; + var self2 = this; + traverse(schema2, { allKeys: true }, function(sch, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex) { + if (jsonPtr === "") return; + var id = self2._getId(sch); + var baseId = baseIds[parentJsonPtr]; + var fullPath = fullPaths[parentJsonPtr] + "/" + parentKeyword; + if (keyIndex !== void 0) + fullPath += "/" + (typeof keyIndex == "number" ? keyIndex : util.escapeFragment(keyIndex)); + if (typeof id == "string") { + id = baseId = normalizeId(baseId ? URI.resolve(baseId, id) : id); + var refVal = self2._refs[id]; + if (typeof refVal == "string") refVal = self2._refs[refVal]; + if (refVal && refVal.schema) { + if (!equal(sch, refVal.schema)) + throw new Error('id "' + id + '" resolves to more than one schema'); + } else if (id != normalizeId(fullPath)) { + if (id[0] == "#") { + if (localRefs[id] && !equal(sch, localRefs[id])) + throw new Error('id "' + id + '" resolves to more than one schema'); + localRefs[id] = sch; + } else { + self2._refs[id] = fullPath; + } + } + } + baseIds[jsonPtr] = baseId; + fullPaths[jsonPtr] = fullPath; + }); + return localRefs; + } + }, { "./schema_obj": 9, "./util": 11, "fast-deep-equal": 43, "json-schema-traverse": 45, "uri-js": 46 }], 8: [function(require2, module4, exports4) { + "use strict"; + var ruleModules = require2("../dotjs"), toHash = require2("./util").toHash; + module4.exports = function rules() { + var RULES = [ + { + type: "number", + rules: [ + { "maximum": ["exclusiveMaximum"] }, + { "minimum": ["exclusiveMinimum"] }, + "multipleOf", + "format" + ] + }, + { + type: "string", + rules: ["maxLength", "minLength", "pattern", "format"] + }, + { + type: "array", + rules: ["maxItems", "minItems", "items", "contains", "uniqueItems"] + }, + { + type: "object", + rules: [ + "maxProperties", + "minProperties", + "required", + "dependencies", + "propertyNames", + { "properties": ["additionalProperties", "patternProperties"] } + ] + }, + { rules: ["$ref", "const", "enum", "not", "anyOf", "oneOf", "allOf", "if"] } + ]; + var ALL = ["type", "$comment"]; + var KEYWORDS = [ + "$schema", + "$id", + "id", + "$data", + "$async", + "title", + "description", + "default", + "definitions", + "examples", + "readOnly", + "writeOnly", + "contentMediaType", + "contentEncoding", + "additionalItems", + "then", + "else" + ]; + var TYPES = ["number", "integer", "string", "array", "object", "boolean", "null"]; + RULES.all = toHash(ALL); + RULES.types = toHash(TYPES); + RULES.forEach(function(group) { + group.rules = group.rules.map(function(keyword) { + var implKeywords; + if (typeof keyword == "object") { + var key = Object.keys(keyword)[0]; + implKeywords = keyword[key]; + keyword = key; + implKeywords.forEach(function(k) { + ALL.push(k); + RULES.all[k] = true; + }); + } + ALL.push(keyword); + var rule = RULES.all[keyword] = { + keyword, + code: ruleModules[keyword], + implements: implKeywords + }; + return rule; + }); + RULES.all.$comment = { + keyword: "$comment", + code: ruleModules.$comment + }; + if (group.type) RULES.types[group.type] = group; + }); + RULES.keywords = toHash(ALL.concat(KEYWORDS)); + RULES.custom = {}; + return RULES; + }; + }, { "../dotjs": 28, "./util": 11 }], 9: [function(require2, module4, exports4) { + "use strict"; + var util = require2("./util"); + module4.exports = SchemaObject; + function SchemaObject(obj) { + util.copy(obj, this); + } + }, { "./util": 11 }], 10: [function(require2, module4, exports4) { + "use strict"; + module4.exports = function ucs2length(str) { + var length = 0, len = str.length, pos = 0, value; + while (pos < len) { + length++; + value = str.charCodeAt(pos++); + if (value >= 55296 && value <= 56319 && pos < len) { + value = str.charCodeAt(pos); + if ((value & 64512) == 56320) pos++; + } + } + return length; + }; + }, {}], 11: [function(require2, module4, exports4) { + "use strict"; + module4.exports = { + copy, + checkDataType, + checkDataTypes, + coerceToTypes, + toHash, + getProperty, + escapeQuotes, + equal: require2("fast-deep-equal"), + ucs2length: require2("./ucs2length"), + varOccurences, + varReplace, + schemaHasRules, + schemaHasRulesExcept, + schemaUnknownRules, + toQuotedString, + getPathExpr, + getPath, + getData, + unescapeFragment, + unescapeJsonPointer, + escapeFragment, + escapeJsonPointer + }; + function copy(o, to) { + to = to || {}; + for (var key in o) to[key] = o[key]; + return to; + } + function checkDataType(dataType, data, strictNumbers, negate) { + var EQUAL = negate ? " !== " : " === ", AND = negate ? " || " : " && ", OK = negate ? "!" : "", NOT = negate ? "" : "!"; + switch (dataType) { + case "null": + return data + EQUAL + "null"; + case "array": + return OK + "Array.isArray(" + data + ")"; + case "object": + return "(" + OK + data + AND + "typeof " + data + EQUAL + '"object"' + AND + NOT + "Array.isArray(" + data + "))"; + case "integer": + return "(typeof " + data + EQUAL + '"number"' + AND + NOT + "(" + data + " % 1)" + AND + data + EQUAL + data + (strictNumbers ? AND + OK + "isFinite(" + data + ")" : "") + ")"; + case "number": + return "(typeof " + data + EQUAL + '"' + dataType + '"' + (strictNumbers ? AND + OK + "isFinite(" + data + ")" : "") + ")"; + default: + return "typeof " + data + EQUAL + '"' + dataType + '"'; + } + } + function checkDataTypes(dataTypes, data, strictNumbers) { + switch (dataTypes.length) { + case 1: + return checkDataType(dataTypes[0], data, strictNumbers, true); + default: + var code = ""; + var types = toHash(dataTypes); + if (types.array && types.object) { + code = types.null ? "(" : "(!" + data + " || "; + code += "typeof " + data + ' !== "object")'; + delete types.null; + delete types.array; + delete types.object; + } + if (types.number) delete types.integer; + for (var t in types) + code += (code ? " && " : "") + checkDataType(t, data, strictNumbers, true); + return code; + } + } + var COERCE_TO_TYPES = toHash(["string", "number", "integer", "boolean", "null"]); + function coerceToTypes(optionCoerceTypes, dataTypes) { + if (Array.isArray(dataTypes)) { + var types = []; + for (var i = 0; i < dataTypes.length; i++) { + var t = dataTypes[i]; + if (COERCE_TO_TYPES[t]) types[types.length] = t; + else if (optionCoerceTypes === "array" && t === "array") types[types.length] = t; + } + if (types.length) return types; + } else if (COERCE_TO_TYPES[dataTypes]) { + return [dataTypes]; + } else if (optionCoerceTypes === "array" && dataTypes === "array") { + return ["array"]; + } + } + function toHash(arr) { + var hash = {}; + for (var i = 0; i < arr.length; i++) hash[arr[i]] = true; + return hash; + } + var IDENTIFIER = /^[a-z$_][a-z$_0-9]*$/i; + var SINGLE_QUOTE = /'|\\/g; + function getProperty(key) { + return typeof key == "number" ? "[" + key + "]" : IDENTIFIER.test(key) ? "." + key : "['" + escapeQuotes(key) + "']"; + } + function escapeQuotes(str) { + return str.replace(SINGLE_QUOTE, "\\$&").replace(/\n/g, "\\n").replace(/\r/g, "\\r").replace(/\f/g, "\\f").replace(/\t/g, "\\t"); + } + function varOccurences(str, dataVar) { + dataVar += "[^0-9]"; + var matches = str.match(new RegExp(dataVar, "g")); + return matches ? matches.length : 0; + } + function varReplace(str, dataVar, expr) { + dataVar += "([^0-9])"; + expr = expr.replace(/\$/g, "$$$$"); + return str.replace(new RegExp(dataVar, "g"), expr + "$1"); + } + function schemaHasRules(schema2, rules) { + if (typeof schema2 == "boolean") return !schema2; + for (var key in schema2) if (rules[key]) return true; + } + function schemaHasRulesExcept(schema2, rules, exceptKeyword) { + if (typeof schema2 == "boolean") return !schema2 && exceptKeyword != "not"; + for (var key in schema2) if (key != exceptKeyword && rules[key]) return true; + } + function schemaUnknownRules(schema2, rules) { + if (typeof schema2 == "boolean") return; + for (var key in schema2) if (!rules[key]) return key; + } + function toQuotedString(str) { + return "'" + escapeQuotes(str) + "'"; + } + function getPathExpr(currentPath, expr, jsonPointers, isNumber) { + var path = jsonPointers ? "'/' + " + expr + (isNumber ? "" : ".replace(/~/g, '~0').replace(/\\//g, '~1')") : isNumber ? "'[' + " + expr + " + ']'" : "'[\\'' + " + expr + " + '\\']'"; + return joinPaths(currentPath, path); + } + function getPath(currentPath, prop, jsonPointers) { + var path = jsonPointers ? toQuotedString("/" + escapeJsonPointer(prop)) : toQuotedString(getProperty(prop)); + return joinPaths(currentPath, path); + } + var JSON_POINTER = /^\/(?:[^~]|~0|~1)*$/; + var RELATIVE_JSON_POINTER = /^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/; + function getData($data, lvl, paths) { + var up, jsonPointer, data, matches; + if ($data === "") return "rootData"; + if ($data[0] == "/") { + if (!JSON_POINTER.test($data)) throw new Error("Invalid JSON-pointer: " + $data); + jsonPointer = $data; + data = "rootData"; + } else { + matches = $data.match(RELATIVE_JSON_POINTER); + if (!matches) throw new Error("Invalid JSON-pointer: " + $data); + up = +matches[1]; + jsonPointer = matches[2]; + if (jsonPointer == "#") { + if (up >= lvl) throw new Error("Cannot access property/index " + up + " levels up, current level is " + lvl); + return paths[lvl - up]; + } + if (up > lvl) throw new Error("Cannot access data " + up + " levels up, current level is " + lvl); + data = "data" + (lvl - up || ""); + if (!jsonPointer) return data; + } + var expr = data; + var segments = jsonPointer.split("/"); + for (var i = 0; i < segments.length; i++) { + var segment = segments[i]; + if (segment) { + data += getProperty(unescapeJsonPointer(segment)); + expr += " && " + data; + } + } + return expr; + } + function joinPaths(a, b) { + if (a == '""') return b; + return (a + " + " + b).replace(/([^\\])' \+ '/g, "$1"); + } + function unescapeFragment(str) { + return unescapeJsonPointer(decodeURIComponent(str)); + } + function escapeFragment(str) { + return encodeURIComponent(escapeJsonPointer(str)); + } + function escapeJsonPointer(str) { + return str.replace(/~/g, "~0").replace(/\//g, "~1"); + } + function unescapeJsonPointer(str) { + return str.replace(/~1/g, "/").replace(/~0/g, "~"); + } + }, { "./ucs2length": 10, "fast-deep-equal": 43 }], 12: [function(require2, module4, exports4) { + "use strict"; + var KEYWORDS = [ + "multipleOf", + "maximum", + "exclusiveMaximum", + "minimum", + "exclusiveMinimum", + "maxLength", + "minLength", + "pattern", + "additionalItems", + "maxItems", + "minItems", + "uniqueItems", + "maxProperties", + "minProperties", + "required", + "additionalProperties", + "enum", + "format", + "const" + ]; + module4.exports = function(metaSchema, keywordsJsonPointers) { + for (var i = 0; i < keywordsJsonPointers.length; i++) { + metaSchema = JSON.parse(JSON.stringify(metaSchema)); + var segments = keywordsJsonPointers[i].split("/"); + var keywords = metaSchema; + var j; + for (j = 1; j < segments.length; j++) + keywords = keywords[segments[j]]; + for (j = 0; j < KEYWORDS.length; j++) { + var key = KEYWORDS[j]; + var schema2 = keywords[key]; + if (schema2) { + keywords[key] = { + anyOf: [ + schema2, + { $ref: "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#" } + ] + }; + } + } + } + return metaSchema; + }; + }, {}], 13: [function(require2, module4, exports4) { + "use strict"; + var metaSchema = require2("./refs/json-schema-draft-07.json"); + module4.exports = { + $id: "https://github.com/ajv-validator/ajv/blob/master/lib/definition_schema.js", + definitions: { + simpleTypes: metaSchema.definitions.simpleTypes + }, + type: "object", + dependencies: { + schema: ["validate"], + $data: ["validate"], + statements: ["inline"], + valid: { not: { required: ["macro"] } } + }, + properties: { + type: metaSchema.properties.type, + schema: { type: "boolean" }, + statements: { type: "boolean" }, + dependencies: { + type: "array", + items: { type: "string" } + }, + metaSchema: { type: "object" }, + modifying: { type: "boolean" }, + valid: { type: "boolean" }, + $data: { type: "boolean" }, + async: { type: "boolean" }, + errors: { + anyOf: [ + { type: "boolean" }, + { const: "full" } + ] + } + } + }; + }, { "./refs/json-schema-draft-07.json": 42 }], 14: [function(require2, module4, exports4) { + "use strict"; + module4.exports = function generate__limit(it, $keyword, $ruleType) { + var out = " "; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + "/" + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = "data" + ($dataLvl || ""); + var $isData = it.opts.$data && $schema && $schema.$data, $schemaValue; + if ($isData) { + out += " var schema" + $lvl + " = " + it.util.getData($schema.$data, $dataLvl, it.dataPathArr) + "; "; + $schemaValue = "schema" + $lvl; + } else { + $schemaValue = $schema; + } + var $isMax = $keyword == "maximum", $exclusiveKeyword = $isMax ? "exclusiveMaximum" : "exclusiveMinimum", $schemaExcl = it.schema[$exclusiveKeyword], $isDataExcl = it.opts.$data && $schemaExcl && $schemaExcl.$data, $op = $isMax ? "<" : ">", $notOp = $isMax ? ">" : "<", $errorKeyword = void 0; + if (!($isData || typeof $schema == "number" || $schema === void 0)) { + throw new Error($keyword + " must be number"); + } + if (!($isDataExcl || $schemaExcl === void 0 || typeof $schemaExcl == "number" || typeof $schemaExcl == "boolean")) { + throw new Error($exclusiveKeyword + " must be number or boolean"); + } + if ($isDataExcl) { + var $schemaValueExcl = it.util.getData($schemaExcl.$data, $dataLvl, it.dataPathArr), $exclusive = "exclusive" + $lvl, $exclType = "exclType" + $lvl, $exclIsNumber = "exclIsNumber" + $lvl, $opExpr = "op" + $lvl, $opStr = "' + " + $opExpr + " + '"; + out += " var schemaExcl" + $lvl + " = " + $schemaValueExcl + "; "; + $schemaValueExcl = "schemaExcl" + $lvl; + out += " var " + $exclusive + "; var " + $exclType + " = typeof " + $schemaValueExcl + "; if (" + $exclType + " != 'boolean' && " + $exclType + " != 'undefined' && " + $exclType + " != 'number') { "; + var $errorKeyword = $exclusiveKeyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ""; + if (it.createErrors !== false) { + out += " { keyword: '" + ($errorKeyword || "_exclusiveLimit") + "' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: {} "; + if (it.opts.messages !== false) { + out += " , message: '" + $exclusiveKeyword + " should be boolean' "; + } + if (it.opts.verbose) { + out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; + } + out += " } "; + } else { + out += " {} "; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + if (it.async) { + out += " throw new ValidationError([" + __err + "]); "; + } else { + out += " validate.errors = [" + __err + "]; return false; "; + } + } else { + out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; + } + out += " } else if ( "; + if ($isData) { + out += " (" + $schemaValue + " !== undefined && typeof " + $schemaValue + " != 'number') || "; + } + out += " " + $exclType + " == 'number' ? ( (" + $exclusive + " = " + $schemaValue + " === undefined || " + $schemaValueExcl + " " + $op + "= " + $schemaValue + ") ? " + $data + " " + $notOp + "= " + $schemaValueExcl + " : " + $data + " " + $notOp + " " + $schemaValue + " ) : ( (" + $exclusive + " = " + $schemaValueExcl + " === true) ? " + $data + " " + $notOp + "= " + $schemaValue + " : " + $data + " " + $notOp + " " + $schemaValue + " ) || " + $data + " !== " + $data + ") { var op" + $lvl + " = " + $exclusive + " ? '" + $op + "' : '" + $op + "='; "; + if ($schema === void 0) { + $errorKeyword = $exclusiveKeyword; + $errSchemaPath = it.errSchemaPath + "/" + $exclusiveKeyword; + $schemaValue = $schemaValueExcl; + $isData = $isDataExcl; + } + } else { + var $exclIsNumber = typeof $schemaExcl == "number", $opStr = $op; + if ($exclIsNumber && $isData) { + var $opExpr = "'" + $opStr + "'"; + out += " if ( "; + if ($isData) { + out += " (" + $schemaValue + " !== undefined && typeof " + $schemaValue + " != 'number') || "; + } + out += " ( " + $schemaValue + " === undefined || " + $schemaExcl + " " + $op + "= " + $schemaValue + " ? " + $data + " " + $notOp + "= " + $schemaExcl + " : " + $data + " " + $notOp + " " + $schemaValue + " ) || " + $data + " !== " + $data + ") { "; + } else { + if ($exclIsNumber && $schema === void 0) { + $exclusive = true; + $errorKeyword = $exclusiveKeyword; + $errSchemaPath = it.errSchemaPath + "/" + $exclusiveKeyword; + $schemaValue = $schemaExcl; + $notOp += "="; + } else { + if ($exclIsNumber) $schemaValue = Math[$isMax ? "min" : "max"]($schemaExcl, $schema); + if ($schemaExcl === ($exclIsNumber ? $schemaValue : true)) { + $exclusive = true; + $errorKeyword = $exclusiveKeyword; + $errSchemaPath = it.errSchemaPath + "/" + $exclusiveKeyword; + $notOp += "="; + } else { + $exclusive = false; + $opStr += "="; + } + } + var $opExpr = "'" + $opStr + "'"; + out += " if ( "; + if ($isData) { + out += " (" + $schemaValue + " !== undefined && typeof " + $schemaValue + " != 'number') || "; + } + out += " " + $data + " " + $notOp + " " + $schemaValue + " || " + $data + " !== " + $data + ") { "; + } + } + $errorKeyword = $errorKeyword || $keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ""; + if (it.createErrors !== false) { + out += " { keyword: '" + ($errorKeyword || "_limit") + "' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { comparison: " + $opExpr + ", limit: " + $schemaValue + ", exclusive: " + $exclusive + " } "; + if (it.opts.messages !== false) { + out += " , message: 'should be " + $opStr + " "; + if ($isData) { + out += "' + " + $schemaValue; + } else { + out += "" + $schemaValue + "'"; + } + } + if (it.opts.verbose) { + out += " , schema: "; + if ($isData) { + out += "validate.schema" + $schemaPath; + } else { + out += "" + $schema; + } + out += " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; + } + out += " } "; + } else { + out += " {} "; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + if (it.async) { + out += " throw new ValidationError([" + __err + "]); "; + } else { + out += " validate.errors = [" + __err + "]; return false; "; + } + } else { + out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; + } + out += " } "; + if ($breakOnError) { + out += " else { "; + } + return out; + }; + }, {}], 15: [function(require2, module4, exports4) { + "use strict"; + module4.exports = function generate__limitItems(it, $keyword, $ruleType) { + var out = " "; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + "/" + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = "data" + ($dataLvl || ""); + var $isData = it.opts.$data && $schema && $schema.$data, $schemaValue; + if ($isData) { + out += " var schema" + $lvl + " = " + it.util.getData($schema.$data, $dataLvl, it.dataPathArr) + "; "; + $schemaValue = "schema" + $lvl; + } else { + $schemaValue = $schema; + } + if (!($isData || typeof $schema == "number")) { + throw new Error($keyword + " must be number"); + } + var $op = $keyword == "maxItems" ? ">" : "<"; + out += "if ( "; + if ($isData) { + out += " (" + $schemaValue + " !== undefined && typeof " + $schemaValue + " != 'number') || "; + } + out += " " + $data + ".length " + $op + " " + $schemaValue + ") { "; + var $errorKeyword = $keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ""; + if (it.createErrors !== false) { + out += " { keyword: '" + ($errorKeyword || "_limitItems") + "' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { limit: " + $schemaValue + " } "; + if (it.opts.messages !== false) { + out += " , message: 'should NOT have "; + if ($keyword == "maxItems") { + out += "more"; + } else { + out += "fewer"; + } + out += " than "; + if ($isData) { + out += "' + " + $schemaValue + " + '"; + } else { + out += "" + $schema; + } + out += " items' "; + } + if (it.opts.verbose) { + out += " , schema: "; + if ($isData) { + out += "validate.schema" + $schemaPath; + } else { + out += "" + $schema; + } + out += " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; + } + out += " } "; + } else { + out += " {} "; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + if (it.async) { + out += " throw new ValidationError([" + __err + "]); "; + } else { + out += " validate.errors = [" + __err + "]; return false; "; + } + } else { + out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; + } + out += "} "; + if ($breakOnError) { + out += " else { "; + } + return out; + }; + }, {}], 16: [function(require2, module4, exports4) { + "use strict"; + module4.exports = function generate__limitLength(it, $keyword, $ruleType) { + var out = " "; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + "/" + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = "data" + ($dataLvl || ""); + var $isData = it.opts.$data && $schema && $schema.$data, $schemaValue; + if ($isData) { + out += " var schema" + $lvl + " = " + it.util.getData($schema.$data, $dataLvl, it.dataPathArr) + "; "; + $schemaValue = "schema" + $lvl; + } else { + $schemaValue = $schema; + } + if (!($isData || typeof $schema == "number")) { + throw new Error($keyword + " must be number"); + } + var $op = $keyword == "maxLength" ? ">" : "<"; + out += "if ( "; + if ($isData) { + out += " (" + $schemaValue + " !== undefined && typeof " + $schemaValue + " != 'number') || "; + } + if (it.opts.unicode === false) { + out += " " + $data + ".length "; + } else { + out += " ucs2length(" + $data + ") "; + } + out += " " + $op + " " + $schemaValue + ") { "; + var $errorKeyword = $keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ""; + if (it.createErrors !== false) { + out += " { keyword: '" + ($errorKeyword || "_limitLength") + "' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { limit: " + $schemaValue + " } "; + if (it.opts.messages !== false) { + out += " , message: 'should NOT be "; + if ($keyword == "maxLength") { + out += "longer"; + } else { + out += "shorter"; + } + out += " than "; + if ($isData) { + out += "' + " + $schemaValue + " + '"; + } else { + out += "" + $schema; + } + out += " characters' "; + } + if (it.opts.verbose) { + out += " , schema: "; + if ($isData) { + out += "validate.schema" + $schemaPath; + } else { + out += "" + $schema; + } + out += " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; + } + out += " } "; + } else { + out += " {} "; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + if (it.async) { + out += " throw new ValidationError([" + __err + "]); "; + } else { + out += " validate.errors = [" + __err + "]; return false; "; + } + } else { + out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; + } + out += "} "; + if ($breakOnError) { + out += " else { "; + } + return out; + }; + }, {}], 17: [function(require2, module4, exports4) { + "use strict"; + module4.exports = function generate__limitProperties(it, $keyword, $ruleType) { + var out = " "; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + "/" + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = "data" + ($dataLvl || ""); + var $isData = it.opts.$data && $schema && $schema.$data, $schemaValue; + if ($isData) { + out += " var schema" + $lvl + " = " + it.util.getData($schema.$data, $dataLvl, it.dataPathArr) + "; "; + $schemaValue = "schema" + $lvl; + } else { + $schemaValue = $schema; + } + if (!($isData || typeof $schema == "number")) { + throw new Error($keyword + " must be number"); + } + var $op = $keyword == "maxProperties" ? ">" : "<"; + out += "if ( "; + if ($isData) { + out += " (" + $schemaValue + " !== undefined && typeof " + $schemaValue + " != 'number') || "; + } + out += " Object.keys(" + $data + ").length " + $op + " " + $schemaValue + ") { "; + var $errorKeyword = $keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ""; + if (it.createErrors !== false) { + out += " { keyword: '" + ($errorKeyword || "_limitProperties") + "' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { limit: " + $schemaValue + " } "; + if (it.opts.messages !== false) { + out += " , message: 'should NOT have "; + if ($keyword == "maxProperties") { + out += "more"; + } else { + out += "fewer"; + } + out += " than "; + if ($isData) { + out += "' + " + $schemaValue + " + '"; + } else { + out += "" + $schema; + } + out += " properties' "; + } + if (it.opts.verbose) { + out += " , schema: "; + if ($isData) { + out += "validate.schema" + $schemaPath; + } else { + out += "" + $schema; + } + out += " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; + } + out += " } "; + } else { + out += " {} "; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + if (it.async) { + out += " throw new ValidationError([" + __err + "]); "; + } else { + out += " validate.errors = [" + __err + "]; return false; "; + } + } else { + out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; + } + out += "} "; + if ($breakOnError) { + out += " else { "; + } + return out; + }; + }, {}], 18: [function(require2, module4, exports4) { + "use strict"; + module4.exports = function generate_allOf(it, $keyword, $ruleType) { + var out = " "; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + "/" + $keyword; + var $breakOnError = !it.opts.allErrors; + var $it = it.util.copy(it); + var $closingBraces = ""; + $it.level++; + var $nextValid = "valid" + $it.level; + var $currentBaseId = $it.baseId, $allSchemasEmpty = true; + var arr1 = $schema; + if (arr1) { + var $sch, $i = -1, l1 = arr1.length - 1; + while ($i < l1) { + $sch = arr1[$i += 1]; + if (it.opts.strictKeywords ? typeof $sch == "object" && Object.keys($sch).length > 0 || $sch === false : it.util.schemaHasRules($sch, it.RULES.all)) { + $allSchemasEmpty = false; + $it.schema = $sch; + $it.schemaPath = $schemaPath + "[" + $i + "]"; + $it.errSchemaPath = $errSchemaPath + "/" + $i; + out += " " + it.validate($it) + " "; + $it.baseId = $currentBaseId; + if ($breakOnError) { + out += " if (" + $nextValid + ") { "; + $closingBraces += "}"; + } + } + } + } + if ($breakOnError) { + if ($allSchemasEmpty) { + out += " if (true) { "; + } else { + out += " " + $closingBraces.slice(0, -1) + " "; + } + } + return out; + }; + }, {}], 19: [function(require2, module4, exports4) { + "use strict"; + module4.exports = function generate_anyOf(it, $keyword, $ruleType) { + var out = " "; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + "/" + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = "data" + ($dataLvl || ""); + var $valid = "valid" + $lvl; + var $errs = "errs__" + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ""; + $it.level++; + var $nextValid = "valid" + $it.level; + var $noEmptySchema = $schema.every(function($sch2) { + return it.opts.strictKeywords ? typeof $sch2 == "object" && Object.keys($sch2).length > 0 || $sch2 === false : it.util.schemaHasRules($sch2, it.RULES.all); + }); + if ($noEmptySchema) { + var $currentBaseId = $it.baseId; + out += " var " + $errs + " = errors; var " + $valid + " = false; "; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + var arr1 = $schema; + if (arr1) { + var $sch, $i = -1, l1 = arr1.length - 1; + while ($i < l1) { + $sch = arr1[$i += 1]; + $it.schema = $sch; + $it.schemaPath = $schemaPath + "[" + $i + "]"; + $it.errSchemaPath = $errSchemaPath + "/" + $i; + out += " " + it.validate($it) + " "; + $it.baseId = $currentBaseId; + out += " " + $valid + " = " + $valid + " || " + $nextValid + "; if (!" + $valid + ") { "; + $closingBraces += "}"; + } + } + it.compositeRule = $it.compositeRule = $wasComposite; + out += " " + $closingBraces + " if (!" + $valid + ") { var err = "; + if (it.createErrors !== false) { + out += " { keyword: 'anyOf' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: {} "; + if (it.opts.messages !== false) { + out += " , message: 'should match some schema in anyOf' "; + } + if (it.opts.verbose) { + out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; + } + out += " } "; + } else { + out += " {} "; + } + out += "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; + if (!it.compositeRule && $breakOnError) { + if (it.async) { + out += " throw new ValidationError(vErrors); "; + } else { + out += " validate.errors = vErrors; return false; "; + } + } + out += " } else { errors = " + $errs + "; if (vErrors !== null) { if (" + $errs + ") vErrors.length = " + $errs + "; else vErrors = null; } "; + if (it.opts.allErrors) { + out += " } "; + } + } else { + if ($breakOnError) { + out += " if (true) { "; + } + } + return out; + }; + }, {}], 20: [function(require2, module4, exports4) { + "use strict"; + module4.exports = function generate_comment(it, $keyword, $ruleType) { + var out = " "; + var $schema = it.schema[$keyword]; + var $errSchemaPath = it.errSchemaPath + "/" + $keyword; + var $breakOnError = !it.opts.allErrors; + var $comment = it.util.toQuotedString($schema); + if (it.opts.$comment === true) { + out += " console.log(" + $comment + ");"; + } else if (typeof it.opts.$comment == "function") { + out += " self._opts.$comment(" + $comment + ", " + it.util.toQuotedString($errSchemaPath) + ", validate.root.schema);"; + } + return out; + }; + }, {}], 21: [function(require2, module4, exports4) { + "use strict"; + module4.exports = function generate_const(it, $keyword, $ruleType) { + var out = " "; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + "/" + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = "data" + ($dataLvl || ""); + var $valid = "valid" + $lvl; + var $isData = it.opts.$data && $schema && $schema.$data, $schemaValue; + if ($isData) { + out += " var schema" + $lvl + " = " + it.util.getData($schema.$data, $dataLvl, it.dataPathArr) + "; "; + $schemaValue = "schema" + $lvl; + } else { + $schemaValue = $schema; + } + if (!$isData) { + out += " var schema" + $lvl + " = validate.schema" + $schemaPath + ";"; + } + out += "var " + $valid + " = equal(" + $data + ", schema" + $lvl + "); if (!" + $valid + ") { "; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ""; + if (it.createErrors !== false) { + out += " { keyword: 'const' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { allowedValue: schema" + $lvl + " } "; + if (it.opts.messages !== false) { + out += " , message: 'should be equal to constant' "; + } + if (it.opts.verbose) { + out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; + } + out += " } "; + } else { + out += " {} "; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + if (it.async) { + out += " throw new ValidationError([" + __err + "]); "; + } else { + out += " validate.errors = [" + __err + "]; return false; "; + } + } else { + out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; + } + out += " }"; + if ($breakOnError) { + out += " else { "; + } + return out; + }; + }, {}], 22: [function(require2, module4, exports4) { + "use strict"; + module4.exports = function generate_contains(it, $keyword, $ruleType) { + var out = " "; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + "/" + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = "data" + ($dataLvl || ""); + var $valid = "valid" + $lvl; + var $errs = "errs__" + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ""; + $it.level++; + var $nextValid = "valid" + $it.level; + var $idx = "i" + $lvl, $dataNxt = $it.dataLevel = it.dataLevel + 1, $nextData = "data" + $dataNxt, $currentBaseId = it.baseId, $nonEmptySchema = it.opts.strictKeywords ? typeof $schema == "object" && Object.keys($schema).length > 0 || $schema === false : it.util.schemaHasRules($schema, it.RULES.all); + out += "var " + $errs + " = errors;var " + $valid + ";"; + if ($nonEmptySchema) { + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + out += " var " + $nextValid + " = false; for (var " + $idx + " = 0; " + $idx + " < " + $data + ".length; " + $idx + "++) { "; + $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); + var $passData = $data + "[" + $idx + "]"; + $it.dataPathArr[$dataNxt] = $idx; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += " " + it.util.varReplace($code, $nextData, $passData) + " "; + } else { + out += " var " + $nextData + " = " + $passData + "; " + $code + " "; + } + out += " if (" + $nextValid + ") break; } "; + it.compositeRule = $it.compositeRule = $wasComposite; + out += " " + $closingBraces + " if (!" + $nextValid + ") {"; + } else { + out += " if (" + $data + ".length == 0) {"; + } + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ""; + if (it.createErrors !== false) { + out += " { keyword: 'contains' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: {} "; + if (it.opts.messages !== false) { + out += " , message: 'should contain a valid item' "; + } + if (it.opts.verbose) { + out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; + } + out += " } "; + } else { + out += " {} "; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + if (it.async) { + out += " throw new ValidationError([" + __err + "]); "; + } else { + out += " validate.errors = [" + __err + "]; return false; "; + } + } else { + out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; + } + out += " } else { "; + if ($nonEmptySchema) { + out += " errors = " + $errs + "; if (vErrors !== null) { if (" + $errs + ") vErrors.length = " + $errs + "; else vErrors = null; } "; + } + if (it.opts.allErrors) { + out += " } "; + } + return out; + }; + }, {}], 23: [function(require2, module4, exports4) { + "use strict"; + module4.exports = function generate_custom(it, $keyword, $ruleType) { + var out = " "; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + "/" + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = "data" + ($dataLvl || ""); + var $valid = "valid" + $lvl; + var $errs = "errs__" + $lvl; + var $isData = it.opts.$data && $schema && $schema.$data, $schemaValue; + if ($isData) { + out += " var schema" + $lvl + " = " + it.util.getData($schema.$data, $dataLvl, it.dataPathArr) + "; "; + $schemaValue = "schema" + $lvl; + } else { + $schemaValue = $schema; + } + var $rule = this, $definition = "definition" + $lvl, $rDef = $rule.definition, $closingBraces = ""; + var $compile, $inline, $macro, $ruleValidate, $validateCode; + if ($isData && $rDef.$data) { + $validateCode = "keywordValidate" + $lvl; + var $validateSchema = $rDef.validateSchema; + out += " var " + $definition + " = RULES.custom['" + $keyword + "'].definition; var " + $validateCode + " = " + $definition + ".validate;"; + } else { + $ruleValidate = it.useCustomRule($rule, $schema, it.schema, it); + if (!$ruleValidate) return; + $schemaValue = "validate.schema" + $schemaPath; + $validateCode = $ruleValidate.code; + $compile = $rDef.compile; + $inline = $rDef.inline; + $macro = $rDef.macro; + } + var $ruleErrs = $validateCode + ".errors", $i = "i" + $lvl, $ruleErr = "ruleErr" + $lvl, $asyncKeyword = $rDef.async; + if ($asyncKeyword && !it.async) throw new Error("async keyword in sync schema"); + if (!($inline || $macro)) { + out += "" + $ruleErrs + " = null;"; + } + out += "var " + $errs + " = errors;var " + $valid + ";"; + if ($isData && $rDef.$data) { + $closingBraces += "}"; + out += " if (" + $schemaValue + " === undefined) { " + $valid + " = true; } else { "; + if ($validateSchema) { + $closingBraces += "}"; + out += " " + $valid + " = " + $definition + ".validateSchema(" + $schemaValue + "); if (" + $valid + ") { "; + } + } + if ($inline) { + if ($rDef.statements) { + out += " " + $ruleValidate.validate + " "; + } else { + out += " " + $valid + " = " + $ruleValidate.validate + "; "; + } + } else if ($macro) { + var $it = it.util.copy(it); + var $closingBraces = ""; + $it.level++; + var $nextValid = "valid" + $it.level; + $it.schema = $ruleValidate.validate; + $it.schemaPath = ""; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + var $code = it.validate($it).replace(/validate\.schema/g, $validateCode); + it.compositeRule = $it.compositeRule = $wasComposite; + out += " " + $code; + } else { + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ""; + out += " " + $validateCode + ".call( "; + if (it.opts.passContext) { + out += "this"; + } else { + out += "self"; + } + if ($compile || $rDef.schema === false) { + out += " , " + $data + " "; + } else { + out += " , " + $schemaValue + " , " + $data + " , validate.schema" + it.schemaPath + " "; + } + out += " , (dataPath || '')"; + if (it.errorPath != '""') { + out += " + " + it.errorPath; + } + var $parentData = $dataLvl ? "data" + ($dataLvl - 1 || "") : "parentData", $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : "parentDataProperty"; + out += " , " + $parentData + " , " + $parentDataProperty + " , rootData ) "; + var def_callRuleValidate = out; + out = $$outStack.pop(); + if ($rDef.errors === false) { + out += " " + $valid + " = "; + if ($asyncKeyword) { + out += "await "; + } + out += "" + def_callRuleValidate + "; "; + } else { + if ($asyncKeyword) { + $ruleErrs = "customErrors" + $lvl; + out += " var " + $ruleErrs + " = null; try { " + $valid + " = await " + def_callRuleValidate + "; } catch (e) { " + $valid + " = false; if (e instanceof ValidationError) " + $ruleErrs + " = e.errors; else throw e; } "; + } else { + out += " " + $ruleErrs + " = null; " + $valid + " = " + def_callRuleValidate + "; "; + } + } + } + if ($rDef.modifying) { + out += " if (" + $parentData + ") " + $data + " = " + $parentData + "[" + $parentDataProperty + "];"; + } + out += "" + $closingBraces; + if ($rDef.valid) { + if ($breakOnError) { + out += " if (true) { "; + } + } else { + out += " if ( "; + if ($rDef.valid === void 0) { + out += " !"; + if ($macro) { + out += "" + $nextValid; + } else { + out += "" + $valid; + } + } else { + out += " " + !$rDef.valid + " "; + } + out += ") { "; + $errorKeyword = $rule.keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ""; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ""; + if (it.createErrors !== false) { + out += " { keyword: '" + ($errorKeyword || "custom") + "' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { keyword: '" + $rule.keyword + "' } "; + if (it.opts.messages !== false) { + out += ` , message: 'should pass "` + $rule.keyword + `" keyword validation' `; + } + if (it.opts.verbose) { + out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; + } + out += " } "; + } else { + out += " {} "; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + if (it.async) { + out += " throw new ValidationError([" + __err + "]); "; + } else { + out += " validate.errors = [" + __err + "]; return false; "; + } + } else { + out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; + } + var def_customError = out; + out = $$outStack.pop(); + if ($inline) { + if ($rDef.errors) { + if ($rDef.errors != "full") { + out += " for (var " + $i + "=" + $errs + "; " + $i + " 0 || $sch === false : it.util.schemaHasRules($sch, it.RULES.all)) { + out += " " + $nextValid + " = true; if ( " + $data + it.util.getProperty($property) + " !== undefined "; + if ($ownProperties) { + out += " && Object.prototype.hasOwnProperty.call(" + $data + ", '" + it.util.escapeQuotes($property) + "') "; + } + out += ") { "; + $it.schema = $sch; + $it.schemaPath = $schemaPath + it.util.getProperty($property); + $it.errSchemaPath = $errSchemaPath + "/" + it.util.escapeFragment($property); + out += " " + it.validate($it) + " "; + $it.baseId = $currentBaseId; + out += " } "; + if ($breakOnError) { + out += " if (" + $nextValid + ") { "; + $closingBraces += "}"; + } + } + } + if ($breakOnError) { + out += " " + $closingBraces + " if (" + $errs + " == errors) {"; + } + return out; + }; + }, {}], 25: [function(require2, module4, exports4) { + "use strict"; + module4.exports = function generate_enum(it, $keyword, $ruleType) { + var out = " "; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + "/" + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = "data" + ($dataLvl || ""); + var $valid = "valid" + $lvl; + var $isData = it.opts.$data && $schema && $schema.$data, $schemaValue; + if ($isData) { + out += " var schema" + $lvl + " = " + it.util.getData($schema.$data, $dataLvl, it.dataPathArr) + "; "; + $schemaValue = "schema" + $lvl; + } else { + $schemaValue = $schema; + } + var $i = "i" + $lvl, $vSchema = "schema" + $lvl; + if (!$isData) { + out += " var " + $vSchema + " = validate.schema" + $schemaPath + ";"; + } + out += "var " + $valid + ";"; + if ($isData) { + out += " if (schema" + $lvl + " === undefined) " + $valid + " = true; else if (!Array.isArray(schema" + $lvl + ")) " + $valid + " = false; else {"; + } + out += "" + $valid + " = false;for (var " + $i + "=0; " + $i + "<" + $vSchema + ".length; " + $i + "++) if (equal(" + $data + ", " + $vSchema + "[" + $i + "])) { " + $valid + " = true; break; }"; + if ($isData) { + out += " } "; + } + out += " if (!" + $valid + ") { "; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ""; + if (it.createErrors !== false) { + out += " { keyword: 'enum' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { allowedValues: schema" + $lvl + " } "; + if (it.opts.messages !== false) { + out += " , message: 'should be equal to one of the allowed values' "; + } + if (it.opts.verbose) { + out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; + } + out += " } "; + } else { + out += " {} "; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + if (it.async) { + out += " throw new ValidationError([" + __err + "]); "; + } else { + out += " validate.errors = [" + __err + "]; return false; "; + } + } else { + out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; + } + out += " }"; + if ($breakOnError) { + out += " else { "; + } + return out; + }; + }, {}], 26: [function(require2, module4, exports4) { + "use strict"; + module4.exports = function generate_format(it, $keyword, $ruleType) { + var out = " "; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + "/" + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = "data" + ($dataLvl || ""); + if (it.opts.format === false) { + if ($breakOnError) { + out += " if (true) { "; + } + return out; + } + var $isData = it.opts.$data && $schema && $schema.$data, $schemaValue; + if ($isData) { + out += " var schema" + $lvl + " = " + it.util.getData($schema.$data, $dataLvl, it.dataPathArr) + "; "; + $schemaValue = "schema" + $lvl; + } else { + $schemaValue = $schema; + } + var $unknownFormats = it.opts.unknownFormats, $allowUnknown = Array.isArray($unknownFormats); + if ($isData) { + var $format = "format" + $lvl, $isObject = "isObject" + $lvl, $formatType = "formatType" + $lvl; + out += " var " + $format + " = formats[" + $schemaValue + "]; var " + $isObject + " = typeof " + $format + " == 'object' && !(" + $format + " instanceof RegExp) && " + $format + ".validate; var " + $formatType + " = " + $isObject + " && " + $format + ".type || 'string'; if (" + $isObject + ") { "; + if (it.async) { + out += " var async" + $lvl + " = " + $format + ".async; "; + } + out += " " + $format + " = " + $format + ".validate; } if ( "; + if ($isData) { + out += " (" + $schemaValue + " !== undefined && typeof " + $schemaValue + " != 'string') || "; + } + out += " ("; + if ($unknownFormats != "ignore") { + out += " (" + $schemaValue + " && !" + $format + " "; + if ($allowUnknown) { + out += " && self._opts.unknownFormats.indexOf(" + $schemaValue + ") == -1 "; + } + out += ") || "; + } + out += " (" + $format + " && " + $formatType + " == '" + $ruleType + "' && !(typeof " + $format + " == 'function' ? "; + if (it.async) { + out += " (async" + $lvl + " ? await " + $format + "(" + $data + ") : " + $format + "(" + $data + ")) "; + } else { + out += " " + $format + "(" + $data + ") "; + } + out += " : " + $format + ".test(" + $data + "))))) {"; + } else { + var $format = it.formats[$schema]; + if (!$format) { + if ($unknownFormats == "ignore") { + it.logger.warn('unknown format "' + $schema + '" ignored in schema at path "' + it.errSchemaPath + '"'); + if ($breakOnError) { + out += " if (true) { "; + } + return out; + } else if ($allowUnknown && $unknownFormats.indexOf($schema) >= 0) { + if ($breakOnError) { + out += " if (true) { "; + } + return out; + } else { + throw new Error('unknown format "' + $schema + '" is used in schema at path "' + it.errSchemaPath + '"'); + } + } + var $isObject = typeof $format == "object" && !($format instanceof RegExp) && $format.validate; + var $formatType = $isObject && $format.type || "string"; + if ($isObject) { + var $async = $format.async === true; + $format = $format.validate; + } + if ($formatType != $ruleType) { + if ($breakOnError) { + out += " if (true) { "; + } + return out; + } + if ($async) { + if (!it.async) throw new Error("async format in sync schema"); + var $formatRef = "formats" + it.util.getProperty($schema) + ".validate"; + out += " if (!(await " + $formatRef + "(" + $data + "))) { "; + } else { + out += " if (! "; + var $formatRef = "formats" + it.util.getProperty($schema); + if ($isObject) $formatRef += ".validate"; + if (typeof $format == "function") { + out += " " + $formatRef + "(" + $data + ") "; + } else { + out += " " + $formatRef + ".test(" + $data + ") "; + } + out += ") { "; + } + } + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ""; + if (it.createErrors !== false) { + out += " { keyword: 'format' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { format: "; + if ($isData) { + out += "" + $schemaValue; + } else { + out += "" + it.util.toQuotedString($schema); + } + out += " } "; + if (it.opts.messages !== false) { + out += ` , message: 'should match format "`; + if ($isData) { + out += "' + " + $schemaValue + " + '"; + } else { + out += "" + it.util.escapeQuotes($schema); + } + out += `"' `; + } + if (it.opts.verbose) { + out += " , schema: "; + if ($isData) { + out += "validate.schema" + $schemaPath; + } else { + out += "" + it.util.toQuotedString($schema); + } + out += " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; + } + out += " } "; + } else { + out += " {} "; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + if (it.async) { + out += " throw new ValidationError([" + __err + "]); "; + } else { + out += " validate.errors = [" + __err + "]; return false; "; + } + } else { + out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; + } + out += " } "; + if ($breakOnError) { + out += " else { "; + } + return out; + }; + }, {}], 27: [function(require2, module4, exports4) { + "use strict"; + module4.exports = function generate_if(it, $keyword, $ruleType) { + var out = " "; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + "/" + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = "data" + ($dataLvl || ""); + var $valid = "valid" + $lvl; + var $errs = "errs__" + $lvl; + var $it = it.util.copy(it); + $it.level++; + var $nextValid = "valid" + $it.level; + var $thenSch = it.schema["then"], $elseSch = it.schema["else"], $thenPresent = $thenSch !== void 0 && (it.opts.strictKeywords ? typeof $thenSch == "object" && Object.keys($thenSch).length > 0 || $thenSch === false : it.util.schemaHasRules($thenSch, it.RULES.all)), $elsePresent = $elseSch !== void 0 && (it.opts.strictKeywords ? typeof $elseSch == "object" && Object.keys($elseSch).length > 0 || $elseSch === false : it.util.schemaHasRules($elseSch, it.RULES.all)), $currentBaseId = $it.baseId; + if ($thenPresent || $elsePresent) { + var $ifClause; + $it.createErrors = false; + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + out += " var " + $errs + " = errors; var " + $valid + " = true; "; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + out += " " + it.validate($it) + " "; + $it.baseId = $currentBaseId; + $it.createErrors = true; + out += " errors = " + $errs + "; if (vErrors !== null) { if (" + $errs + ") vErrors.length = " + $errs + "; else vErrors = null; } "; + it.compositeRule = $it.compositeRule = $wasComposite; + if ($thenPresent) { + out += " if (" + $nextValid + ") { "; + $it.schema = it.schema["then"]; + $it.schemaPath = it.schemaPath + ".then"; + $it.errSchemaPath = it.errSchemaPath + "/then"; + out += " " + it.validate($it) + " "; + $it.baseId = $currentBaseId; + out += " " + $valid + " = " + $nextValid + "; "; + if ($thenPresent && $elsePresent) { + $ifClause = "ifClause" + $lvl; + out += " var " + $ifClause + " = 'then'; "; + } else { + $ifClause = "'then'"; + } + out += " } "; + if ($elsePresent) { + out += " else { "; + } + } else { + out += " if (!" + $nextValid + ") { "; + } + if ($elsePresent) { + $it.schema = it.schema["else"]; + $it.schemaPath = it.schemaPath + ".else"; + $it.errSchemaPath = it.errSchemaPath + "/else"; + out += " " + it.validate($it) + " "; + $it.baseId = $currentBaseId; + out += " " + $valid + " = " + $nextValid + "; "; + if ($thenPresent && $elsePresent) { + $ifClause = "ifClause" + $lvl; + out += " var " + $ifClause + " = 'else'; "; + } else { + $ifClause = "'else'"; + } + out += " } "; + } + out += " if (!" + $valid + ") { var err = "; + if (it.createErrors !== false) { + out += " { keyword: 'if' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { failingKeyword: " + $ifClause + " } "; + if (it.opts.messages !== false) { + out += ` , message: 'should match "' + ` + $ifClause + ` + '" schema' `; + } + if (it.opts.verbose) { + out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; + } + out += " } "; + } else { + out += " {} "; + } + out += "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; + if (!it.compositeRule && $breakOnError) { + if (it.async) { + out += " throw new ValidationError(vErrors); "; + } else { + out += " validate.errors = vErrors; return false; "; + } + } + out += " } "; + if ($breakOnError) { + out += " else { "; + } + } else { + if ($breakOnError) { + out += " if (true) { "; + } + } + return out; + }; + }, {}], 28: [function(require2, module4, exports4) { + "use strict"; + module4.exports = { + "$ref": require2("./ref"), + allOf: require2("./allOf"), + anyOf: require2("./anyOf"), + "$comment": require2("./comment"), + const: require2("./const"), + contains: require2("./contains"), + dependencies: require2("./dependencies"), + "enum": require2("./enum"), + format: require2("./format"), + "if": require2("./if"), + items: require2("./items"), + maximum: require2("./_limit"), + minimum: require2("./_limit"), + maxItems: require2("./_limitItems"), + minItems: require2("./_limitItems"), + maxLength: require2("./_limitLength"), + minLength: require2("./_limitLength"), + maxProperties: require2("./_limitProperties"), + minProperties: require2("./_limitProperties"), + multipleOf: require2("./multipleOf"), + not: require2("./not"), + oneOf: require2("./oneOf"), + pattern: require2("./pattern"), + properties: require2("./properties"), + propertyNames: require2("./propertyNames"), + required: require2("./required"), + uniqueItems: require2("./uniqueItems"), + validate: require2("./validate") + }; + }, { "./_limit": 14, "./_limitItems": 15, "./_limitLength": 16, "./_limitProperties": 17, "./allOf": 18, "./anyOf": 19, "./comment": 20, "./const": 21, "./contains": 22, "./dependencies": 24, "./enum": 25, "./format": 26, "./if": 27, "./items": 29, "./multipleOf": 30, "./not": 31, "./oneOf": 32, "./pattern": 33, "./properties": 34, "./propertyNames": 35, "./ref": 36, "./required": 37, "./uniqueItems": 38, "./validate": 39 }], 29: [function(require2, module4, exports4) { + "use strict"; + module4.exports = function generate_items(it, $keyword, $ruleType) { + var out = " "; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + "/" + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = "data" + ($dataLvl || ""); + var $valid = "valid" + $lvl; + var $errs = "errs__" + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ""; + $it.level++; + var $nextValid = "valid" + $it.level; + var $idx = "i" + $lvl, $dataNxt = $it.dataLevel = it.dataLevel + 1, $nextData = "data" + $dataNxt, $currentBaseId = it.baseId; + out += "var " + $errs + " = errors;var " + $valid + ";"; + if (Array.isArray($schema)) { + var $additionalItems = it.schema.additionalItems; + if ($additionalItems === false) { + out += " " + $valid + " = " + $data + ".length <= " + $schema.length + "; "; + var $currErrSchemaPath = $errSchemaPath; + $errSchemaPath = it.errSchemaPath + "/additionalItems"; + out += " if (!" + $valid + ") { "; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ""; + if (it.createErrors !== false) { + out += " { keyword: 'additionalItems' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { limit: " + $schema.length + " } "; + if (it.opts.messages !== false) { + out += " , message: 'should NOT have more than " + $schema.length + " items' "; + } + if (it.opts.verbose) { + out += " , schema: false , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; + } + out += " } "; + } else { + out += " {} "; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + if (it.async) { + out += " throw new ValidationError([" + __err + "]); "; + } else { + out += " validate.errors = [" + __err + "]; return false; "; + } + } else { + out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; + } + out += " } "; + $errSchemaPath = $currErrSchemaPath; + if ($breakOnError) { + $closingBraces += "}"; + out += " else { "; + } + } + var arr1 = $schema; + if (arr1) { + var $sch, $i = -1, l1 = arr1.length - 1; + while ($i < l1) { + $sch = arr1[$i += 1]; + if (it.opts.strictKeywords ? typeof $sch == "object" && Object.keys($sch).length > 0 || $sch === false : it.util.schemaHasRules($sch, it.RULES.all)) { + out += " " + $nextValid + " = true; if (" + $data + ".length > " + $i + ") { "; + var $passData = $data + "[" + $i + "]"; + $it.schema = $sch; + $it.schemaPath = $schemaPath + "[" + $i + "]"; + $it.errSchemaPath = $errSchemaPath + "/" + $i; + $it.errorPath = it.util.getPathExpr(it.errorPath, $i, it.opts.jsonPointers, true); + $it.dataPathArr[$dataNxt] = $i; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += " " + it.util.varReplace($code, $nextData, $passData) + " "; + } else { + out += " var " + $nextData + " = " + $passData + "; " + $code + " "; + } + out += " } "; + if ($breakOnError) { + out += " if (" + $nextValid + ") { "; + $closingBraces += "}"; + } + } + } + } + if (typeof $additionalItems == "object" && (it.opts.strictKeywords ? typeof $additionalItems == "object" && Object.keys($additionalItems).length > 0 || $additionalItems === false : it.util.schemaHasRules($additionalItems, it.RULES.all))) { + $it.schema = $additionalItems; + $it.schemaPath = it.schemaPath + ".additionalItems"; + $it.errSchemaPath = it.errSchemaPath + "/additionalItems"; + out += " " + $nextValid + " = true; if (" + $data + ".length > " + $schema.length + ") { for (var " + $idx + " = " + $schema.length + "; " + $idx + " < " + $data + ".length; " + $idx + "++) { "; + $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); + var $passData = $data + "[" + $idx + "]"; + $it.dataPathArr[$dataNxt] = $idx; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += " " + it.util.varReplace($code, $nextData, $passData) + " "; + } else { + out += " var " + $nextData + " = " + $passData + "; " + $code + " "; + } + if ($breakOnError) { + out += " if (!" + $nextValid + ") break; "; + } + out += " } } "; + if ($breakOnError) { + out += " if (" + $nextValid + ") { "; + $closingBraces += "}"; + } + } + } else if (it.opts.strictKeywords ? typeof $schema == "object" && Object.keys($schema).length > 0 || $schema === false : it.util.schemaHasRules($schema, it.RULES.all)) { + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + out += " for (var " + $idx + " = 0; " + $idx + " < " + $data + ".length; " + $idx + "++) { "; + $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); + var $passData = $data + "[" + $idx + "]"; + $it.dataPathArr[$dataNxt] = $idx; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += " " + it.util.varReplace($code, $nextData, $passData) + " "; + } else { + out += " var " + $nextData + " = " + $passData + "; " + $code + " "; + } + if ($breakOnError) { + out += " if (!" + $nextValid + ") break; "; + } + out += " }"; + } + if ($breakOnError) { + out += " " + $closingBraces + " if (" + $errs + " == errors) {"; + } + return out; + }; + }, {}], 30: [function(require2, module4, exports4) { + "use strict"; + module4.exports = function generate_multipleOf(it, $keyword, $ruleType) { + var out = " "; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + "/" + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = "data" + ($dataLvl || ""); + var $isData = it.opts.$data && $schema && $schema.$data, $schemaValue; + if ($isData) { + out += " var schema" + $lvl + " = " + it.util.getData($schema.$data, $dataLvl, it.dataPathArr) + "; "; + $schemaValue = "schema" + $lvl; + } else { + $schemaValue = $schema; + } + if (!($isData || typeof $schema == "number")) { + throw new Error($keyword + " must be number"); + } + out += "var division" + $lvl + ";if ("; + if ($isData) { + out += " " + $schemaValue + " !== undefined && ( typeof " + $schemaValue + " != 'number' || "; + } + out += " (division" + $lvl + " = " + $data + " / " + $schemaValue + ", "; + if (it.opts.multipleOfPrecision) { + out += " Math.abs(Math.round(division" + $lvl + ") - division" + $lvl + ") > 1e-" + it.opts.multipleOfPrecision + " "; + } else { + out += " division" + $lvl + " !== parseInt(division" + $lvl + ") "; + } + out += " ) "; + if ($isData) { + out += " ) "; + } + out += " ) { "; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ""; + if (it.createErrors !== false) { + out += " { keyword: 'multipleOf' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { multipleOf: " + $schemaValue + " } "; + if (it.opts.messages !== false) { + out += " , message: 'should be multiple of "; + if ($isData) { + out += "' + " + $schemaValue; + } else { + out += "" + $schemaValue + "'"; + } + } + if (it.opts.verbose) { + out += " , schema: "; + if ($isData) { + out += "validate.schema" + $schemaPath; + } else { + out += "" + $schema; + } + out += " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; + } + out += " } "; + } else { + out += " {} "; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + if (it.async) { + out += " throw new ValidationError([" + __err + "]); "; + } else { + out += " validate.errors = [" + __err + "]; return false; "; + } + } else { + out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; + } + out += "} "; + if ($breakOnError) { + out += " else { "; + } + return out; + }; + }, {}], 31: [function(require2, module4, exports4) { + "use strict"; + module4.exports = function generate_not(it, $keyword, $ruleType) { + var out = " "; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + "/" + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = "data" + ($dataLvl || ""); + var $errs = "errs__" + $lvl; + var $it = it.util.copy(it); + $it.level++; + var $nextValid = "valid" + $it.level; + if (it.opts.strictKeywords ? typeof $schema == "object" && Object.keys($schema).length > 0 || $schema === false : it.util.schemaHasRules($schema, it.RULES.all)) { + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + out += " var " + $errs + " = errors; "; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + $it.createErrors = false; + var $allErrorsOption; + if ($it.opts.allErrors) { + $allErrorsOption = $it.opts.allErrors; + $it.opts.allErrors = false; + } + out += " " + it.validate($it) + " "; + $it.createErrors = true; + if ($allErrorsOption) $it.opts.allErrors = $allErrorsOption; + it.compositeRule = $it.compositeRule = $wasComposite; + out += " if (" + $nextValid + ") { "; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ""; + if (it.createErrors !== false) { + out += " { keyword: 'not' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: {} "; + if (it.opts.messages !== false) { + out += " , message: 'should NOT be valid' "; + } + if (it.opts.verbose) { + out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; + } + out += " } "; + } else { + out += " {} "; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + if (it.async) { + out += " throw new ValidationError([" + __err + "]); "; + } else { + out += " validate.errors = [" + __err + "]; return false; "; + } + } else { + out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; + } + out += " } else { errors = " + $errs + "; if (vErrors !== null) { if (" + $errs + ") vErrors.length = " + $errs + "; else vErrors = null; } "; + if (it.opts.allErrors) { + out += " } "; + } + } else { + out += " var err = "; + if (it.createErrors !== false) { + out += " { keyword: 'not' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: {} "; + if (it.opts.messages !== false) { + out += " , message: 'should NOT be valid' "; + } + if (it.opts.verbose) { + out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; + } + out += " } "; + } else { + out += " {} "; + } + out += "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; + if ($breakOnError) { + out += " if (false) { "; + } + } + return out; + }; + }, {}], 32: [function(require2, module4, exports4) { + "use strict"; + module4.exports = function generate_oneOf(it, $keyword, $ruleType) { + var out = " "; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + "/" + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = "data" + ($dataLvl || ""); + var $valid = "valid" + $lvl; + var $errs = "errs__" + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ""; + $it.level++; + var $nextValid = "valid" + $it.level; + var $currentBaseId = $it.baseId, $prevValid = "prevValid" + $lvl, $passingSchemas = "passingSchemas" + $lvl; + out += "var " + $errs + " = errors , " + $prevValid + " = false , " + $valid + " = false , " + $passingSchemas + " = null; "; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + var arr1 = $schema; + if (arr1) { + var $sch, $i = -1, l1 = arr1.length - 1; + while ($i < l1) { + $sch = arr1[$i += 1]; + if (it.opts.strictKeywords ? typeof $sch == "object" && Object.keys($sch).length > 0 || $sch === false : it.util.schemaHasRules($sch, it.RULES.all)) { + $it.schema = $sch; + $it.schemaPath = $schemaPath + "[" + $i + "]"; + $it.errSchemaPath = $errSchemaPath + "/" + $i; + out += " " + it.validate($it) + " "; + $it.baseId = $currentBaseId; + } else { + out += " var " + $nextValid + " = true; "; + } + if ($i) { + out += " if (" + $nextValid + " && " + $prevValid + ") { " + $valid + " = false; " + $passingSchemas + " = [" + $passingSchemas + ", " + $i + "]; } else { "; + $closingBraces += "}"; + } + out += " if (" + $nextValid + ") { " + $valid + " = " + $prevValid + " = true; " + $passingSchemas + " = " + $i + "; }"; + } + } + it.compositeRule = $it.compositeRule = $wasComposite; + out += "" + $closingBraces + "if (!" + $valid + ") { var err = "; + if (it.createErrors !== false) { + out += " { keyword: 'oneOf' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { passingSchemas: " + $passingSchemas + " } "; + if (it.opts.messages !== false) { + out += " , message: 'should match exactly one schema in oneOf' "; + } + if (it.opts.verbose) { + out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; + } + out += " } "; + } else { + out += " {} "; + } + out += "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; + if (!it.compositeRule && $breakOnError) { + if (it.async) { + out += " throw new ValidationError(vErrors); "; + } else { + out += " validate.errors = vErrors; return false; "; + } + } + out += "} else { errors = " + $errs + "; if (vErrors !== null) { if (" + $errs + ") vErrors.length = " + $errs + "; else vErrors = null; }"; + if (it.opts.allErrors) { + out += " } "; + } + return out; + }; + }, {}], 33: [function(require2, module4, exports4) { + "use strict"; + module4.exports = function generate_pattern(it, $keyword, $ruleType) { + var out = " "; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + "/" + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = "data" + ($dataLvl || ""); + var $isData = it.opts.$data && $schema && $schema.$data, $schemaValue; + if ($isData) { + out += " var schema" + $lvl + " = " + it.util.getData($schema.$data, $dataLvl, it.dataPathArr) + "; "; + $schemaValue = "schema" + $lvl; + } else { + $schemaValue = $schema; + } + var $regexp = $isData ? "(new RegExp(" + $schemaValue + "))" : it.usePattern($schema); + out += "if ( "; + if ($isData) { + out += " (" + $schemaValue + " !== undefined && typeof " + $schemaValue + " != 'string') || "; + } + out += " !" + $regexp + ".test(" + $data + ") ) { "; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ""; + if (it.createErrors !== false) { + out += " { keyword: 'pattern' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { pattern: "; + if ($isData) { + out += "" + $schemaValue; + } else { + out += "" + it.util.toQuotedString($schema); + } + out += " } "; + if (it.opts.messages !== false) { + out += ` , message: 'should match pattern "`; + if ($isData) { + out += "' + " + $schemaValue + " + '"; + } else { + out += "" + it.util.escapeQuotes($schema); + } + out += `"' `; + } + if (it.opts.verbose) { + out += " , schema: "; + if ($isData) { + out += "validate.schema" + $schemaPath; + } else { + out += "" + it.util.toQuotedString($schema); + } + out += " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; + } + out += " } "; + } else { + out += " {} "; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + if (it.async) { + out += " throw new ValidationError([" + __err + "]); "; + } else { + out += " validate.errors = [" + __err + "]; return false; "; + } + } else { + out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; + } + out += "} "; + if ($breakOnError) { + out += " else { "; + } + return out; + }; + }, {}], 34: [function(require2, module4, exports4) { + "use strict"; + module4.exports = function generate_properties(it, $keyword, $ruleType) { + var out = " "; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + "/" + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = "data" + ($dataLvl || ""); + var $errs = "errs__" + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ""; + $it.level++; + var $nextValid = "valid" + $it.level; + var $key = "key" + $lvl, $idx = "idx" + $lvl, $dataNxt = $it.dataLevel = it.dataLevel + 1, $nextData = "data" + $dataNxt, $dataProperties = "dataProperties" + $lvl; + var $schemaKeys = Object.keys($schema || {}).filter(notProto), $pProperties = it.schema.patternProperties || {}, $pPropertyKeys = Object.keys($pProperties).filter(notProto), $aProperties = it.schema.additionalProperties, $someProperties = $schemaKeys.length || $pPropertyKeys.length, $noAdditional = $aProperties === false, $additionalIsSchema = typeof $aProperties == "object" && Object.keys($aProperties).length, $removeAdditional = it.opts.removeAdditional, $checkAdditional = $noAdditional || $additionalIsSchema || $removeAdditional, $ownProperties = it.opts.ownProperties, $currentBaseId = it.baseId; + var $required = it.schema.required; + if ($required && !(it.opts.$data && $required.$data) && $required.length < it.opts.loopRequired) { + var $requiredHash = it.util.toHash($required); + } + function notProto(p) { + return p !== "__proto__"; + } + out += "var " + $errs + " = errors;var " + $nextValid + " = true;"; + if ($ownProperties) { + out += " var " + $dataProperties + " = undefined;"; + } + if ($checkAdditional) { + if ($ownProperties) { + out += " " + $dataProperties + " = " + $dataProperties + " || Object.keys(" + $data + "); for (var " + $idx + "=0; " + $idx + "<" + $dataProperties + ".length; " + $idx + "++) { var " + $key + " = " + $dataProperties + "[" + $idx + "]; "; + } else { + out += " for (var " + $key + " in " + $data + ") { "; + } + if ($someProperties) { + out += " var isAdditional" + $lvl + " = !(false "; + if ($schemaKeys.length) { + if ($schemaKeys.length > 8) { + out += " || validate.schema" + $schemaPath + ".hasOwnProperty(" + $key + ") "; + } else { + var arr1 = $schemaKeys; + if (arr1) { + var $propertyKey, i1 = -1, l1 = arr1.length - 1; + while (i1 < l1) { + $propertyKey = arr1[i1 += 1]; + out += " || " + $key + " == " + it.util.toQuotedString($propertyKey) + " "; + } + } + } + } + if ($pPropertyKeys.length) { + var arr2 = $pPropertyKeys; + if (arr2) { + var $pProperty, $i = -1, l2 = arr2.length - 1; + while ($i < l2) { + $pProperty = arr2[$i += 1]; + out += " || " + it.usePattern($pProperty) + ".test(" + $key + ") "; + } + } + } + out += " ); if (isAdditional" + $lvl + ") { "; + } + if ($removeAdditional == "all") { + out += " delete " + $data + "[" + $key + "]; "; + } else { + var $currentErrorPath = it.errorPath; + var $additionalProperty = "' + " + $key + " + '"; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); + } + if ($noAdditional) { + if ($removeAdditional) { + out += " delete " + $data + "[" + $key + "]; "; + } else { + out += " " + $nextValid + " = false; "; + var $currErrSchemaPath = $errSchemaPath; + $errSchemaPath = it.errSchemaPath + "/additionalProperties"; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ""; + if (it.createErrors !== false) { + out += " { keyword: 'additionalProperties' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { additionalProperty: '" + $additionalProperty + "' } "; + if (it.opts.messages !== false) { + out += " , message: '"; + if (it.opts._errorDataPathProperty) { + out += "is an invalid additional property"; + } else { + out += "should NOT have additional properties"; + } + out += "' "; + } + if (it.opts.verbose) { + out += " , schema: false , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; + } + out += " } "; + } else { + out += " {} "; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + if (it.async) { + out += " throw new ValidationError([" + __err + "]); "; + } else { + out += " validate.errors = [" + __err + "]; return false; "; + } + } else { + out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; + } + $errSchemaPath = $currErrSchemaPath; + if ($breakOnError) { + out += " break; "; + } + } + } else if ($additionalIsSchema) { + if ($removeAdditional == "failing") { + out += " var " + $errs + " = errors; "; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + $it.schema = $aProperties; + $it.schemaPath = it.schemaPath + ".additionalProperties"; + $it.errSchemaPath = it.errSchemaPath + "/additionalProperties"; + $it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); + var $passData = $data + "[" + $key + "]"; + $it.dataPathArr[$dataNxt] = $key; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += " " + it.util.varReplace($code, $nextData, $passData) + " "; + } else { + out += " var " + $nextData + " = " + $passData + "; " + $code + " "; + } + out += " if (!" + $nextValid + ") { errors = " + $errs + "; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete " + $data + "[" + $key + "]; } "; + it.compositeRule = $it.compositeRule = $wasComposite; + } else { + $it.schema = $aProperties; + $it.schemaPath = it.schemaPath + ".additionalProperties"; + $it.errSchemaPath = it.errSchemaPath + "/additionalProperties"; + $it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); + var $passData = $data + "[" + $key + "]"; + $it.dataPathArr[$dataNxt] = $key; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += " " + it.util.varReplace($code, $nextData, $passData) + " "; + } else { + out += " var " + $nextData + " = " + $passData + "; " + $code + " "; + } + if ($breakOnError) { + out += " if (!" + $nextValid + ") break; "; + } + } + } + it.errorPath = $currentErrorPath; + } + if ($someProperties) { + out += " } "; + } + out += " } "; + if ($breakOnError) { + out += " if (" + $nextValid + ") { "; + $closingBraces += "}"; + } + } + var $useDefaults = it.opts.useDefaults && !it.compositeRule; + if ($schemaKeys.length) { + var arr3 = $schemaKeys; + if (arr3) { + var $propertyKey, i3 = -1, l3 = arr3.length - 1; + while (i3 < l3) { + $propertyKey = arr3[i3 += 1]; + var $sch = $schema[$propertyKey]; + if (it.opts.strictKeywords ? typeof $sch == "object" && Object.keys($sch).length > 0 || $sch === false : it.util.schemaHasRules($sch, it.RULES.all)) { + var $prop = it.util.getProperty($propertyKey), $passData = $data + $prop, $hasDefault = $useDefaults && $sch.default !== void 0; + $it.schema = $sch; + $it.schemaPath = $schemaPath + $prop; + $it.errSchemaPath = $errSchemaPath + "/" + it.util.escapeFragment($propertyKey); + $it.errorPath = it.util.getPath(it.errorPath, $propertyKey, it.opts.jsonPointers); + $it.dataPathArr[$dataNxt] = it.util.toQuotedString($propertyKey); + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + $code = it.util.varReplace($code, $nextData, $passData); + var $useData = $passData; + } else { + var $useData = $nextData; + out += " var " + $nextData + " = " + $passData + "; "; + } + if ($hasDefault) { + out += " " + $code + " "; + } else { + if ($requiredHash && $requiredHash[$propertyKey]) { + out += " if ( " + $useData + " === undefined "; + if ($ownProperties) { + out += " || ! Object.prototype.hasOwnProperty.call(" + $data + ", '" + it.util.escapeQuotes($propertyKey) + "') "; + } + out += ") { " + $nextValid + " = false; "; + var $currentErrorPath = it.errorPath, $currErrSchemaPath = $errSchemaPath, $missingProperty = it.util.escapeQuotes($propertyKey); + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers); + } + $errSchemaPath = it.errSchemaPath + "/required"; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ""; + if (it.createErrors !== false) { + out += " { keyword: 'required' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { missingProperty: '" + $missingProperty + "' } "; + if (it.opts.messages !== false) { + out += " , message: '"; + if (it.opts._errorDataPathProperty) { + out += "is a required property"; + } else { + out += "should have required property \\'" + $missingProperty + "\\'"; + } + out += "' "; + } + if (it.opts.verbose) { + out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; + } + out += " } "; + } else { + out += " {} "; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + if (it.async) { + out += " throw new ValidationError([" + __err + "]); "; + } else { + out += " validate.errors = [" + __err + "]; return false; "; + } + } else { + out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; + } + $errSchemaPath = $currErrSchemaPath; + it.errorPath = $currentErrorPath; + out += " } else { "; + } else { + if ($breakOnError) { + out += " if ( " + $useData + " === undefined "; + if ($ownProperties) { + out += " || ! Object.prototype.hasOwnProperty.call(" + $data + ", '" + it.util.escapeQuotes($propertyKey) + "') "; + } + out += ") { " + $nextValid + " = true; } else { "; + } else { + out += " if (" + $useData + " !== undefined "; + if ($ownProperties) { + out += " && Object.prototype.hasOwnProperty.call(" + $data + ", '" + it.util.escapeQuotes($propertyKey) + "') "; + } + out += " ) { "; + } + } + out += " " + $code + " } "; + } + } + if ($breakOnError) { + out += " if (" + $nextValid + ") { "; + $closingBraces += "}"; + } + } + } + } + if ($pPropertyKeys.length) { + var arr4 = $pPropertyKeys; + if (arr4) { + var $pProperty, i4 = -1, l4 = arr4.length - 1; + while (i4 < l4) { + $pProperty = arr4[i4 += 1]; + var $sch = $pProperties[$pProperty]; + if (it.opts.strictKeywords ? typeof $sch == "object" && Object.keys($sch).length > 0 || $sch === false : it.util.schemaHasRules($sch, it.RULES.all)) { + $it.schema = $sch; + $it.schemaPath = it.schemaPath + ".patternProperties" + it.util.getProperty($pProperty); + $it.errSchemaPath = it.errSchemaPath + "/patternProperties/" + it.util.escapeFragment($pProperty); + if ($ownProperties) { + out += " " + $dataProperties + " = " + $dataProperties + " || Object.keys(" + $data + "); for (var " + $idx + "=0; " + $idx + "<" + $dataProperties + ".length; " + $idx + "++) { var " + $key + " = " + $dataProperties + "[" + $idx + "]; "; + } else { + out += " for (var " + $key + " in " + $data + ") { "; + } + out += " if (" + it.usePattern($pProperty) + ".test(" + $key + ")) { "; + $it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); + var $passData = $data + "[" + $key + "]"; + $it.dataPathArr[$dataNxt] = $key; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += " " + it.util.varReplace($code, $nextData, $passData) + " "; + } else { + out += " var " + $nextData + " = " + $passData + "; " + $code + " "; + } + if ($breakOnError) { + out += " if (!" + $nextValid + ") break; "; + } + out += " } "; + if ($breakOnError) { + out += " else " + $nextValid + " = true; "; + } + out += " } "; + if ($breakOnError) { + out += " if (" + $nextValid + ") { "; + $closingBraces += "}"; + } + } + } + } + } + if ($breakOnError) { + out += " " + $closingBraces + " if (" + $errs + " == errors) {"; + } + return out; + }; + }, {}], 35: [function(require2, module4, exports4) { + "use strict"; + module4.exports = function generate_propertyNames(it, $keyword, $ruleType) { + var out = " "; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + "/" + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = "data" + ($dataLvl || ""); + var $errs = "errs__" + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ""; + $it.level++; + var $nextValid = "valid" + $it.level; + out += "var " + $errs + " = errors;"; + if (it.opts.strictKeywords ? typeof $schema == "object" && Object.keys($schema).length > 0 || $schema === false : it.util.schemaHasRules($schema, it.RULES.all)) { + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + var $key = "key" + $lvl, $idx = "idx" + $lvl, $i = "i" + $lvl, $invalidName = "' + " + $key + " + '", $dataNxt = $it.dataLevel = it.dataLevel + 1, $nextData = "data" + $dataNxt, $dataProperties = "dataProperties" + $lvl, $ownProperties = it.opts.ownProperties, $currentBaseId = it.baseId; + if ($ownProperties) { + out += " var " + $dataProperties + " = undefined; "; + } + if ($ownProperties) { + out += " " + $dataProperties + " = " + $dataProperties + " || Object.keys(" + $data + "); for (var " + $idx + "=0; " + $idx + "<" + $dataProperties + ".length; " + $idx + "++) { var " + $key + " = " + $dataProperties + "[" + $idx + "]; "; + } else { + out += " for (var " + $key + " in " + $data + ") { "; + } + out += " var startErrs" + $lvl + " = errors; "; + var $passData = $key; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += " " + it.util.varReplace($code, $nextData, $passData) + " "; + } else { + out += " var " + $nextData + " = " + $passData + "; " + $code + " "; + } + it.compositeRule = $it.compositeRule = $wasComposite; + out += " if (!" + $nextValid + ") { for (var " + $i + "=startErrs" + $lvl + "; " + $i + " 0 || $propertySch === false : it.util.schemaHasRules($propertySch, it.RULES.all)))) { + $required[$required.length] = $property; + } + } + } + } else { + var $required = $schema; + } + } + if ($isData || $required.length) { + var $currentErrorPath = it.errorPath, $loopRequired = $isData || $required.length >= it.opts.loopRequired, $ownProperties = it.opts.ownProperties; + if ($breakOnError) { + out += " var missing" + $lvl + "; "; + if ($loopRequired) { + if (!$isData) { + out += " var " + $vSchema + " = validate.schema" + $schemaPath + "; "; + } + var $i = "i" + $lvl, $propertyPath = "schema" + $lvl + "[" + $i + "]", $missingProperty = "' + " + $propertyPath + " + '"; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers); + } + out += " var " + $valid + " = true; "; + if ($isData) { + out += " if (schema" + $lvl + " === undefined) " + $valid + " = true; else if (!Array.isArray(schema" + $lvl + ")) " + $valid + " = false; else {"; + } + out += " for (var " + $i + " = 0; " + $i + " < " + $vSchema + ".length; " + $i + "++) { " + $valid + " = " + $data + "[" + $vSchema + "[" + $i + "]] !== undefined "; + if ($ownProperties) { + out += " && Object.prototype.hasOwnProperty.call(" + $data + ", " + $vSchema + "[" + $i + "]) "; + } + out += "; if (!" + $valid + ") break; } "; + if ($isData) { + out += " } "; + } + out += " if (!" + $valid + ") { "; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ""; + if (it.createErrors !== false) { + out += " { keyword: 'required' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { missingProperty: '" + $missingProperty + "' } "; + if (it.opts.messages !== false) { + out += " , message: '"; + if (it.opts._errorDataPathProperty) { + out += "is a required property"; + } else { + out += "should have required property \\'" + $missingProperty + "\\'"; + } + out += "' "; + } + if (it.opts.verbose) { + out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; + } + out += " } "; + } else { + out += " {} "; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + if (it.async) { + out += " throw new ValidationError([" + __err + "]); "; + } else { + out += " validate.errors = [" + __err + "]; return false; "; + } + } else { + out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; + } + out += " } else { "; + } else { + out += " if ( "; + var arr2 = $required; + if (arr2) { + var $propertyKey, $i = -1, l2 = arr2.length - 1; + while ($i < l2) { + $propertyKey = arr2[$i += 1]; + if ($i) { + out += " || "; + } + var $prop = it.util.getProperty($propertyKey), $useData = $data + $prop; + out += " ( ( " + $useData + " === undefined "; + if ($ownProperties) { + out += " || ! Object.prototype.hasOwnProperty.call(" + $data + ", '" + it.util.escapeQuotes($propertyKey) + "') "; + } + out += ") && (missing" + $lvl + " = " + it.util.toQuotedString(it.opts.jsonPointers ? $propertyKey : $prop) + ") ) "; + } + } + out += ") { "; + var $propertyPath = "missing" + $lvl, $missingProperty = "' + " + $propertyPath + " + '"; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.opts.jsonPointers ? it.util.getPathExpr($currentErrorPath, $propertyPath, true) : $currentErrorPath + " + " + $propertyPath; + } + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ""; + if (it.createErrors !== false) { + out += " { keyword: 'required' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { missingProperty: '" + $missingProperty + "' } "; + if (it.opts.messages !== false) { + out += " , message: '"; + if (it.opts._errorDataPathProperty) { + out += "is a required property"; + } else { + out += "should have required property \\'" + $missingProperty + "\\'"; + } + out += "' "; + } + if (it.opts.verbose) { + out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; + } + out += " } "; + } else { + out += " {} "; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + if (it.async) { + out += " throw new ValidationError([" + __err + "]); "; + } else { + out += " validate.errors = [" + __err + "]; return false; "; + } + } else { + out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; + } + out += " } else { "; + } + } else { + if ($loopRequired) { + if (!$isData) { + out += " var " + $vSchema + " = validate.schema" + $schemaPath + "; "; + } + var $i = "i" + $lvl, $propertyPath = "schema" + $lvl + "[" + $i + "]", $missingProperty = "' + " + $propertyPath + " + '"; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers); + } + if ($isData) { + out += " if (" + $vSchema + " && !Array.isArray(" + $vSchema + ")) { var err = "; + if (it.createErrors !== false) { + out += " { keyword: 'required' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { missingProperty: '" + $missingProperty + "' } "; + if (it.opts.messages !== false) { + out += " , message: '"; + if (it.opts._errorDataPathProperty) { + out += "is a required property"; + } else { + out += "should have required property \\'" + $missingProperty + "\\'"; + } + out += "' "; + } + if (it.opts.verbose) { + out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; + } + out += " } "; + } else { + out += " {} "; + } + out += "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if (" + $vSchema + " !== undefined) { "; + } + out += " for (var " + $i + " = 0; " + $i + " < " + $vSchema + ".length; " + $i + "++) { if (" + $data + "[" + $vSchema + "[" + $i + "]] === undefined "; + if ($ownProperties) { + out += " || ! Object.prototype.hasOwnProperty.call(" + $data + ", " + $vSchema + "[" + $i + "]) "; + } + out += ") { var err = "; + if (it.createErrors !== false) { + out += " { keyword: 'required' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { missingProperty: '" + $missingProperty + "' } "; + if (it.opts.messages !== false) { + out += " , message: '"; + if (it.opts._errorDataPathProperty) { + out += "is a required property"; + } else { + out += "should have required property \\'" + $missingProperty + "\\'"; + } + out += "' "; + } + if (it.opts.verbose) { + out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; + } + out += " } "; + } else { + out += " {} "; + } + out += "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } "; + if ($isData) { + out += " } "; + } + } else { + var arr3 = $required; + if (arr3) { + var $propertyKey, i3 = -1, l3 = arr3.length - 1; + while (i3 < l3) { + $propertyKey = arr3[i3 += 1]; + var $prop = it.util.getProperty($propertyKey), $missingProperty = it.util.escapeQuotes($propertyKey), $useData = $data + $prop; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers); + } + out += " if ( " + $useData + " === undefined "; + if ($ownProperties) { + out += " || ! Object.prototype.hasOwnProperty.call(" + $data + ", '" + it.util.escapeQuotes($propertyKey) + "') "; + } + out += ") { var err = "; + if (it.createErrors !== false) { + out += " { keyword: 'required' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { missingProperty: '" + $missingProperty + "' } "; + if (it.opts.messages !== false) { + out += " , message: '"; + if (it.opts._errorDataPathProperty) { + out += "is a required property"; + } else { + out += "should have required property \\'" + $missingProperty + "\\'"; + } + out += "' "; + } + if (it.opts.verbose) { + out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; + } + out += " } "; + } else { + out += " {} "; + } + out += "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "; + } + } + } + } + it.errorPath = $currentErrorPath; + } else if ($breakOnError) { + out += " if (true) {"; + } + return out; + }; + }, {}], 38: [function(require2, module4, exports4) { + "use strict"; + module4.exports = function generate_uniqueItems(it, $keyword, $ruleType) { + var out = " "; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + "/" + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = "data" + ($dataLvl || ""); + var $valid = "valid" + $lvl; + var $isData = it.opts.$data && $schema && $schema.$data, $schemaValue; + if ($isData) { + out += " var schema" + $lvl + " = " + it.util.getData($schema.$data, $dataLvl, it.dataPathArr) + "; "; + $schemaValue = "schema" + $lvl; + } else { + $schemaValue = $schema; + } + if (($schema || $isData) && it.opts.uniqueItems !== false) { + if ($isData) { + out += " var " + $valid + "; if (" + $schemaValue + " === false || " + $schemaValue + " === undefined) " + $valid + " = true; else if (typeof " + $schemaValue + " != 'boolean') " + $valid + " = false; else { "; + } + out += " var i = " + $data + ".length , " + $valid + " = true , j; if (i > 1) { "; + var $itemType = it.schema.items && it.schema.items.type, $typeIsArray = Array.isArray($itemType); + if (!$itemType || $itemType == "object" || $itemType == "array" || $typeIsArray && ($itemType.indexOf("object") >= 0 || $itemType.indexOf("array") >= 0)) { + out += " outer: for (;i--;) { for (j = i; j--;) { if (equal(" + $data + "[i], " + $data + "[j])) { " + $valid + " = false; break outer; } } } "; + } else { + out += " var itemIndices = {}, item; for (;i--;) { var item = " + $data + "[i]; "; + var $method = "checkDataType" + ($typeIsArray ? "s" : ""); + out += " if (" + it.util[$method]($itemType, "item", it.opts.strictNumbers, true) + ") continue; "; + if ($typeIsArray) { + out += ` if (typeof item == 'string') item = '"' + item; `; + } + out += " if (typeof itemIndices[item] == 'number') { " + $valid + " = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "; + } + out += " } "; + if ($isData) { + out += " } "; + } + out += " if (!" + $valid + ") { "; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ""; + if (it.createErrors !== false) { + out += " { keyword: 'uniqueItems' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { i: i, j: j } "; + if (it.opts.messages !== false) { + out += " , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "; + } + if (it.opts.verbose) { + out += " , schema: "; + if ($isData) { + out += "validate.schema" + $schemaPath; + } else { + out += "" + $schema; + } + out += " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; + } + out += " } "; + } else { + out += " {} "; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + if (it.async) { + out += " throw new ValidationError([" + __err + "]); "; + } else { + out += " validate.errors = [" + __err + "]; return false; "; + } + } else { + out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; + } + out += " } "; + if ($breakOnError) { + out += " else { "; + } + } else { + if ($breakOnError) { + out += " if (true) { "; + } + } + return out; + }; + }, {}], 39: [function(require2, module4, exports4) { + "use strict"; + module4.exports = function generate_validate(it, $keyword, $ruleType) { + var out = ""; + var $async = it.schema.$async === true, $refKeywords = it.util.schemaHasRulesExcept(it.schema, it.RULES.all, "$ref"), $id = it.self._getId(it.schema); + if (it.opts.strictKeywords) { + var $unknownKwd = it.util.schemaUnknownRules(it.schema, it.RULES.keywords); + if ($unknownKwd) { + var $keywordsMsg = "unknown keyword: " + $unknownKwd; + if (it.opts.strictKeywords === "log") it.logger.warn($keywordsMsg); + else throw new Error($keywordsMsg); + } + } + if (it.isTop) { + out += " var validate = "; + if ($async) { + it.async = true; + out += "async "; + } + out += "function(data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; "; + if ($id && (it.opts.sourceCode || it.opts.processCode)) { + out += " " + ("/*# sourceURL=" + $id + " */") + " "; + } + } + if (typeof it.schema == "boolean" || !($refKeywords || it.schema.$ref)) { + var $keyword = "false schema"; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + "/" + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = "data" + ($dataLvl || ""); + var $valid = "valid" + $lvl; + if (it.schema === false) { + if (it.isTop) { + $breakOnError = true; + } else { + out += " var " + $valid + " = false; "; + } + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ""; + if (it.createErrors !== false) { + out += " { keyword: '" + ($errorKeyword || "false schema") + "' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: {} "; + if (it.opts.messages !== false) { + out += " , message: 'boolean schema is false' "; + } + if (it.opts.verbose) { + out += " , schema: false , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; + } + out += " } "; + } else { + out += " {} "; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + if (it.async) { + out += " throw new ValidationError([" + __err + "]); "; + } else { + out += " validate.errors = [" + __err + "]; return false; "; + } + } else { + out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; + } + } else { + if (it.isTop) { + if ($async) { + out += " return data; "; + } else { + out += " validate.errors = null; return true; "; + } + } else { + out += " var " + $valid + " = true; "; + } + } + if (it.isTop) { + out += " }; return validate; "; + } + return out; + } + if (it.isTop) { + var $top = it.isTop, $lvl = it.level = 0, $dataLvl = it.dataLevel = 0, $data = "data"; + it.rootId = it.resolve.fullPath(it.self._getId(it.root.schema)); + it.baseId = it.baseId || it.rootId; + delete it.isTop; + it.dataPathArr = [""]; + if (it.schema.default !== void 0 && it.opts.useDefaults && it.opts.strictDefaults) { + var $defaultMsg = "default is ignored in the schema root"; + if (it.opts.strictDefaults === "log") it.logger.warn($defaultMsg); + else throw new Error($defaultMsg); + } + out += " var vErrors = null; "; + out += " var errors = 0; "; + out += " if (rootData === undefined) rootData = data; "; + } else { + var $lvl = it.level, $dataLvl = it.dataLevel, $data = "data" + ($dataLvl || ""); + if ($id) it.baseId = it.resolve.url(it.baseId, $id); + if ($async && !it.async) throw new Error("async schema in sync schema"); + out += " var errs_" + $lvl + " = errors;"; + } + var $valid = "valid" + $lvl, $breakOnError = !it.opts.allErrors, $closingBraces1 = "", $closingBraces2 = ""; + var $errorKeyword; + var $typeSchema = it.schema.type, $typeIsArray = Array.isArray($typeSchema); + if ($typeSchema && it.opts.nullable && it.schema.nullable === true) { + if ($typeIsArray) { + if ($typeSchema.indexOf("null") == -1) $typeSchema = $typeSchema.concat("null"); + } else if ($typeSchema != "null") { + $typeSchema = [$typeSchema, "null"]; + $typeIsArray = true; + } + } + if ($typeIsArray && $typeSchema.length == 1) { + $typeSchema = $typeSchema[0]; + $typeIsArray = false; + } + if (it.schema.$ref && $refKeywords) { + if (it.opts.extendRefs == "fail") { + throw new Error('$ref: validation keywords used in schema at path "' + it.errSchemaPath + '" (see option extendRefs)'); + } else if (it.opts.extendRefs !== true) { + $refKeywords = false; + it.logger.warn('$ref: keywords ignored in schema at path "' + it.errSchemaPath + '"'); + } + } + if (it.schema.$comment && it.opts.$comment) { + out += " " + it.RULES.all.$comment.code(it, "$comment"); + } + if ($typeSchema) { + if (it.opts.coerceTypes) { + var $coerceToTypes = it.util.coerceToTypes(it.opts.coerceTypes, $typeSchema); + } + var $rulesGroup = it.RULES.types[$typeSchema]; + if ($coerceToTypes || $typeIsArray || $rulesGroup === true || $rulesGroup && !$shouldUseGroup($rulesGroup)) { + var $schemaPath = it.schemaPath + ".type", $errSchemaPath = it.errSchemaPath + "/type"; + var $schemaPath = it.schemaPath + ".type", $errSchemaPath = it.errSchemaPath + "/type", $method = $typeIsArray ? "checkDataTypes" : "checkDataType"; + out += " if (" + it.util[$method]($typeSchema, $data, it.opts.strictNumbers, true) + ") { "; + if ($coerceToTypes) { + var $dataType = "dataType" + $lvl, $coerced = "coerced" + $lvl; + out += " var " + $dataType + " = typeof " + $data + "; var " + $coerced + " = undefined; "; + if (it.opts.coerceTypes == "array") { + out += " if (" + $dataType + " == 'object' && Array.isArray(" + $data + ") && " + $data + ".length == 1) { " + $data + " = " + $data + "[0]; " + $dataType + " = typeof " + $data + "; if (" + it.util.checkDataType(it.schema.type, $data, it.opts.strictNumbers) + ") " + $coerced + " = " + $data + "; } "; + } + out += " if (" + $coerced + " !== undefined) ; "; + var arr1 = $coerceToTypes; + if (arr1) { + var $type, $i = -1, l1 = arr1.length - 1; + while ($i < l1) { + $type = arr1[$i += 1]; + if ($type == "string") { + out += " else if (" + $dataType + " == 'number' || " + $dataType + " == 'boolean') " + $coerced + " = '' + " + $data + "; else if (" + $data + " === null) " + $coerced + " = ''; "; + } else if ($type == "number" || $type == "integer") { + out += " else if (" + $dataType + " == 'boolean' || " + $data + " === null || (" + $dataType + " == 'string' && " + $data + " && " + $data + " == +" + $data + " "; + if ($type == "integer") { + out += " && !(" + $data + " % 1)"; + } + out += ")) " + $coerced + " = +" + $data + "; "; + } else if ($type == "boolean") { + out += " else if (" + $data + " === 'false' || " + $data + " === 0 || " + $data + " === null) " + $coerced + " = false; else if (" + $data + " === 'true' || " + $data + " === 1) " + $coerced + " = true; "; + } else if ($type == "null") { + out += " else if (" + $data + " === '' || " + $data + " === 0 || " + $data + " === false) " + $coerced + " = null; "; + } else if (it.opts.coerceTypes == "array" && $type == "array") { + out += " else if (" + $dataType + " == 'string' || " + $dataType + " == 'number' || " + $dataType + " == 'boolean' || " + $data + " == null) " + $coerced + " = [" + $data + "]; "; + } + } + } + out += " else { "; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ""; + if (it.createErrors !== false) { + out += " { keyword: '" + ($errorKeyword || "type") + "' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { type: '"; + if ($typeIsArray) { + out += "" + $typeSchema.join(","); + } else { + out += "" + $typeSchema; + } + out += "' } "; + if (it.opts.messages !== false) { + out += " , message: 'should be "; + if ($typeIsArray) { + out += "" + $typeSchema.join(","); + } else { + out += "" + $typeSchema; + } + out += "' "; + } + if (it.opts.verbose) { + out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; + } + out += " } "; + } else { + out += " {} "; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + if (it.async) { + out += " throw new ValidationError([" + __err + "]); "; + } else { + out += " validate.errors = [" + __err + "]; return false; "; + } + } else { + out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; + } + out += " } if (" + $coerced + " !== undefined) { "; + var $parentData = $dataLvl ? "data" + ($dataLvl - 1 || "") : "parentData", $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : "parentDataProperty"; + out += " " + $data + " = " + $coerced + "; "; + if (!$dataLvl) { + out += "if (" + $parentData + " !== undefined)"; + } + out += " " + $parentData + "[" + $parentDataProperty + "] = " + $coerced + "; } "; + } else { + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ""; + if (it.createErrors !== false) { + out += " { keyword: '" + ($errorKeyword || "type") + "' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { type: '"; + if ($typeIsArray) { + out += "" + $typeSchema.join(","); + } else { + out += "" + $typeSchema; + } + out += "' } "; + if (it.opts.messages !== false) { + out += " , message: 'should be "; + if ($typeIsArray) { + out += "" + $typeSchema.join(","); + } else { + out += "" + $typeSchema; + } + out += "' "; + } + if (it.opts.verbose) { + out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; + } + out += " } "; + } else { + out += " {} "; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + if (it.async) { + out += " throw new ValidationError([" + __err + "]); "; + } else { + out += " validate.errors = [" + __err + "]; return false; "; + } + } else { + out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; + } + } + out += " } "; + } + } + if (it.schema.$ref && !$refKeywords) { + out += " " + it.RULES.all.$ref.code(it, "$ref") + " "; + if ($breakOnError) { + out += " } if (errors === "; + if ($top) { + out += "0"; + } else { + out += "errs_" + $lvl; + } + out += ") { "; + $closingBraces2 += "}"; + } + } else { + var arr2 = it.RULES; + if (arr2) { + var $rulesGroup, i2 = -1, l2 = arr2.length - 1; + while (i2 < l2) { + $rulesGroup = arr2[i2 += 1]; + if ($shouldUseGroup($rulesGroup)) { + if ($rulesGroup.type) { + out += " if (" + it.util.checkDataType($rulesGroup.type, $data, it.opts.strictNumbers) + ") { "; + } + if (it.opts.useDefaults) { + if ($rulesGroup.type == "object" && it.schema.properties) { + var $schema = it.schema.properties, $schemaKeys = Object.keys($schema); + var arr3 = $schemaKeys; + if (arr3) { + var $propertyKey, i3 = -1, l3 = arr3.length - 1; + while (i3 < l3) { + $propertyKey = arr3[i3 += 1]; + var $sch = $schema[$propertyKey]; + if ($sch.default !== void 0) { + var $passData = $data + it.util.getProperty($propertyKey); + if (it.compositeRule) { + if (it.opts.strictDefaults) { + var $defaultMsg = "default is ignored for: " + $passData; + if (it.opts.strictDefaults === "log") it.logger.warn($defaultMsg); + else throw new Error($defaultMsg); + } + } else { + out += " if (" + $passData + " === undefined "; + if (it.opts.useDefaults == "empty") { + out += " || " + $passData + " === null || " + $passData + " === '' "; + } + out += " ) " + $passData + " = "; + if (it.opts.useDefaults == "shared") { + out += " " + it.useDefault($sch.default) + " "; + } else { + out += " " + JSON.stringify($sch.default) + " "; + } + out += "; "; + } + } + } + } + } else if ($rulesGroup.type == "array" && Array.isArray(it.schema.items)) { + var arr4 = it.schema.items; + if (arr4) { + var $sch, $i = -1, l4 = arr4.length - 1; + while ($i < l4) { + $sch = arr4[$i += 1]; + if ($sch.default !== void 0) { + var $passData = $data + "[" + $i + "]"; + if (it.compositeRule) { + if (it.opts.strictDefaults) { + var $defaultMsg = "default is ignored for: " + $passData; + if (it.opts.strictDefaults === "log") it.logger.warn($defaultMsg); + else throw new Error($defaultMsg); + } + } else { + out += " if (" + $passData + " === undefined "; + if (it.opts.useDefaults == "empty") { + out += " || " + $passData + " === null || " + $passData + " === '' "; + } + out += " ) " + $passData + " = "; + if (it.opts.useDefaults == "shared") { + out += " " + it.useDefault($sch.default) + " "; + } else { + out += " " + JSON.stringify($sch.default) + " "; + } + out += "; "; + } + } + } + } + } + } + var arr5 = $rulesGroup.rules; + if (arr5) { + var $rule, i5 = -1, l5 = arr5.length - 1; + while (i5 < l5) { + $rule = arr5[i5 += 1]; + if ($shouldUseRule($rule)) { + var $code = $rule.code(it, $rule.keyword, $rulesGroup.type); + if ($code) { + out += " " + $code + " "; + if ($breakOnError) { + $closingBraces1 += "}"; + } + } + } + } + } + if ($breakOnError) { + out += " " + $closingBraces1 + " "; + $closingBraces1 = ""; + } + if ($rulesGroup.type) { + out += " } "; + if ($typeSchema && $typeSchema === $rulesGroup.type && !$coerceToTypes) { + out += " else { "; + var $schemaPath = it.schemaPath + ".type", $errSchemaPath = it.errSchemaPath + "/type"; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ""; + if (it.createErrors !== false) { + out += " { keyword: '" + ($errorKeyword || "type") + "' , dataPath: (dataPath || '') + " + it.errorPath + " , schemaPath: " + it.util.toQuotedString($errSchemaPath) + " , params: { type: '"; + if ($typeIsArray) { + out += "" + $typeSchema.join(","); + } else { + out += "" + $typeSchema; + } + out += "' } "; + if (it.opts.messages !== false) { + out += " , message: 'should be "; + if ($typeIsArray) { + out += "" + $typeSchema.join(","); + } else { + out += "" + $typeSchema; + } + out += "' "; + } + if (it.opts.verbose) { + out += " , schema: validate.schema" + $schemaPath + " , parentSchema: validate.schema" + it.schemaPath + " , data: " + $data + " "; + } + out += " } "; + } else { + out += " {} "; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + if (it.async) { + out += " throw new ValidationError([" + __err + "]); "; + } else { + out += " validate.errors = [" + __err + "]; return false; "; + } + } else { + out += " var err = " + __err + "; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "; + } + out += " } "; + } + } + if ($breakOnError) { + out += " if (errors === "; + if ($top) { + out += "0"; + } else { + out += "errs_" + $lvl; + } + out += ") { "; + $closingBraces2 += "}"; + } + } + } + } + } + if ($breakOnError) { + out += " " + $closingBraces2 + " "; + } + if ($top) { + if ($async) { + out += " if (errors === 0) return data; "; + out += " else throw new ValidationError(vErrors); "; + } else { + out += " validate.errors = vErrors; "; + out += " return errors === 0; "; + } + out += " }; return validate;"; + } else { + out += " var " + $valid + " = errors === errs_" + $lvl + ";"; + } + function $shouldUseGroup($rulesGroup2) { + var rules = $rulesGroup2.rules; + for (var i = 0; i < rules.length; i++) + if ($shouldUseRule(rules[i])) return true; + } + function $shouldUseRule($rule2) { + return it.schema[$rule2.keyword] !== void 0 || $rule2.implements && $ruleImplementsSomeKeyword($rule2); + } + function $ruleImplementsSomeKeyword($rule2) { + var impl = $rule2.implements; + for (var i = 0; i < impl.length; i++) + if (it.schema[impl[i]] !== void 0) return true; + } + return out; + }; + }, {}], 40: [function(require2, module4, exports4) { + "use strict"; + var IDENTIFIER = /^[a-z_$][a-z0-9_$-]*$/i; + var customRuleCode = require2("./dotjs/custom"); + var definitionSchema = require2("./definition_schema"); + module4.exports = { + add: addKeyword, + get: getKeyword, + remove: removeKeyword, + validate: validateKeyword + }; + function addKeyword(keyword, definition) { + var RULES = this.RULES; + if (RULES.keywords[keyword]) + throw new Error("Keyword " + keyword + " is already defined"); + if (!IDENTIFIER.test(keyword)) + throw new Error("Keyword " + keyword + " is not a valid identifier"); + if (definition) { + this.validateKeyword(definition, true); + var dataType = definition.type; + if (Array.isArray(dataType)) { + for (var i = 0; i < dataType.length; i++) + _addRule(keyword, dataType[i], definition); + } else { + _addRule(keyword, dataType, definition); + } + var metaSchema = definition.metaSchema; + if (metaSchema) { + if (definition.$data && this._opts.$data) { + metaSchema = { + anyOf: [ + metaSchema, + { "$ref": "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#" } + ] + }; + } + definition.validateSchema = this.compile(metaSchema, true); + } + } + RULES.keywords[keyword] = RULES.all[keyword] = true; + function _addRule(keyword2, dataType2, definition2) { + var ruleGroup; + for (var i2 = 0; i2 < RULES.length; i2++) { + var rg = RULES[i2]; + if (rg.type == dataType2) { + ruleGroup = rg; + break; + } + } + if (!ruleGroup) { + ruleGroup = { type: dataType2, rules: [] }; + RULES.push(ruleGroup); + } + var rule = { + keyword: keyword2, + definition: definition2, + custom: true, + code: customRuleCode, + implements: definition2.implements + }; + ruleGroup.rules.push(rule); + RULES.custom[keyword2] = rule; + } + return this; + } + function getKeyword(keyword) { + var rule = this.RULES.custom[keyword]; + return rule ? rule.definition : this.RULES.keywords[keyword] || false; + } + function removeKeyword(keyword) { + var RULES = this.RULES; + delete RULES.keywords[keyword]; + delete RULES.all[keyword]; + delete RULES.custom[keyword]; + for (var i = 0; i < RULES.length; i++) { + var rules = RULES[i].rules; + for (var j = 0; j < rules.length; j++) { + if (rules[j].keyword == keyword) { + rules.splice(j, 1); + break; + } + } + } + return this; + } + function validateKeyword(definition, throwError) { + validateKeyword.errors = null; + var v = this._validateKeyword = this._validateKeyword || this.compile(definitionSchema, true); + if (v(definition)) return true; + validateKeyword.errors = v.errors; + if (throwError) + throw new Error("custom keyword definition is invalid: " + this.errorsText(v.errors)); + else + return false; + } + }, { "./definition_schema": 13, "./dotjs/custom": 23 }], 41: [function(require2, module4, exports4) { + module4.exports = { + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#", + "description": "Meta-schema for $data reference (JSON Schema extension proposal)", + "type": "object", + "required": ["$data"], + "properties": { + "$data": { + "type": "string", + "anyOf": [ + { "format": "relative-json-pointer" }, + { "format": "json-pointer" } + ] + } + }, + "additionalProperties": false + }; + }, {}], 42: [function(require2, module4, exports4) { + module4.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 + }; + }, {}], 43: [function(require2, module4, exports4) { + "use strict"; + module4.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; + } + return a !== a && b !== b; + }; + }, {}], 44: [function(require2, module4, exports4) { + "use strict"; + module4.exports = function(data, opts) { + if (!opts) opts = {}; + if (typeof opts === "function") opts = { cmp: opts }; + var cycles = typeof opts.cycles === "boolean" ? opts.cycles : false; + var cmp = opts.cmp && /* @__PURE__ */ function(f) { + return function(node) { + return function(a, b) { + var aobj = { key: a, value: node[a] }; + var bobj = { key: b, value: node[b] }; + return f(aobj, bobj); + }; + }; + }(opts.cmp); + var seen = []; + return function stringify2(node) { + if (node && node.toJSON && typeof node.toJSON === "function") { + node = node.toJSON(); + } + if (node === void 0) return; + if (typeof node == "number") return isFinite(node) ? "" + node : "null"; + if (typeof node !== "object") return JSON.stringify(node); + var i, out; + if (Array.isArray(node)) { + out = "["; + for (i = 0; i < node.length; i++) { + if (i) out += ","; + out += stringify2(node[i]) || "null"; + } + return out + "]"; + } + if (node === null) return "null"; + if (seen.indexOf(node) !== -1) { + if (cycles) return JSON.stringify("__cycle__"); + throw new TypeError("Converting circular structure to JSON"); + } + var seenIndex = seen.push(node) - 1; + var keys = Object.keys(node).sort(cmp && cmp(node)); + out = ""; + for (i = 0; i < keys.length; i++) { + var key = keys[i]; + var value = stringify2(node[key]); + if (!value) continue; + if (out) out += ","; + out += JSON.stringify(key) + ":" + value; + } + seen.splice(seenIndex, 1); + return "{" + out + "}"; + }(data); + }; + }, {}], 45: [function(require2, module4, exports4) { + "use strict"; + var traverse = module4.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 + }; + traverse.arrayKeywords = { + items: true, + allOf: true, + anyOf: true, + oneOf: true + }; + traverse.propsKeywords = { + 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 i = 0; i < sch.length; i++) + _traverse(opts, pre, post, sch[i], jsonPtr + "/" + key + "/" + i, rootSchema, jsonPtr, key, schema2, i); + } + } 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); + } + } + function escapeJsonPtr(str) { + return str.replace(/~/g, "~0").replace(/\//g, "~1"); + } + }, {}], 46: [function(require2, module4, exports4) { + (function(global2, factory) { + typeof exports4 === "object" && typeof module4 !== "undefined" ? factory(exports4) : typeof define2 === "function" && define2.amd ? define2(["exports"], factory) : factory(global2.URI = global2.URI || {}); + })(this, function(exports5) { + "use strict"; + function merge() { + for (var _len = arguments.length, sets = Array(_len), _key = 0; _key < _len; _key++) { + sets[_key] = arguments[_key]; + } + if (sets.length > 1) { + sets[0] = sets[0].slice(0, -1); + var xl = sets.length - 1; + for (var x = 1; x < xl; ++x) { + sets[x] = sets[x].slice(1, -1); + } + sets[xl] = sets[xl].slice(1); + return sets.join(""); + } else { + return sets[0]; + } + } + function subexp(str) { + return "(?:" + str + ")"; + } + function typeOf(o) { + return o === void 0 ? "undefined" : o === null ? "null" : Object.prototype.toString.call(o).split(" ").pop().split("]").shift().toLowerCase(); + } + function toUpperCase(str) { + return str.toUpperCase(); + } + function toArray2(obj) { + return obj !== void 0 && obj !== null ? obj instanceof Array ? obj : typeof obj.length !== "number" || obj.split || obj.setInterval || obj.call ? [obj] : Array.prototype.slice.call(obj) : []; + } + function assign(target, source) { + var obj = target; + if (source) { + for (var key in source) { + obj[key] = source[key]; + } + } + return obj; + } + function buildExps(isIRI2) { + var ALPHA$$ = "[A-Za-z]", CR$ = "[\\x0D]", DIGIT$$ = "[0-9]", DQUOTE$$ = "[\\x22]", HEXDIG$$2 = merge(DIGIT$$, "[A-Fa-f]"), LF$$ = "[\\x0A]", SP$$ = "[\\x20]", PCT_ENCODED$2 = subexp(subexp("%[EFef]" + HEXDIG$$2 + "%" + HEXDIG$$2 + HEXDIG$$2 + "%" + HEXDIG$$2 + HEXDIG$$2) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$2 + "%" + HEXDIG$$2 + HEXDIG$$2) + "|" + subexp("%" + HEXDIG$$2 + HEXDIG$$2)), GEN_DELIMS$$ = "[\\:\\/\\?\\#\\[\\]\\@]", SUB_DELIMS$$ = "[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]", RESERVED$$ = merge(GEN_DELIMS$$, SUB_DELIMS$$), UCSCHAR$$ = isIRI2 ? "[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]" : "[]", IPRIVATE$$ = isIRI2 ? "[\\uE000-\\uF8FF]" : "[]", UNRESERVED$$2 = merge(ALPHA$$, DIGIT$$, "[\\-\\.\\_\\~]", UCSCHAR$$), SCHEME$ = subexp(ALPHA$$ + merge(ALPHA$$, DIGIT$$, "[\\+\\-\\.]") + "*"), USERINFO$ = subexp(subexp(PCT_ENCODED$2 + "|" + merge(UNRESERVED$$2, SUB_DELIMS$$, "[\\:]")) + "*"), DEC_OCTET$ = subexp(subexp("25[0-5]") + "|" + subexp("2[0-4]" + DIGIT$$) + "|" + subexp("1" + DIGIT$$ + DIGIT$$) + "|" + subexp("[1-9]" + DIGIT$$) + "|" + DIGIT$$), DEC_OCTET_RELAXED$ = subexp(subexp("25[0-5]") + "|" + subexp("2[0-4]" + DIGIT$$) + "|" + subexp("1" + DIGIT$$ + DIGIT$$) + "|" + subexp("0?[1-9]" + DIGIT$$) + "|0?0?" + DIGIT$$), IPV4ADDRESS$ = subexp(DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$), H16$ = subexp(HEXDIG$$2 + "{1,4}"), LS32$ = subexp(subexp(H16$ + "\\:" + H16$) + "|" + IPV4ADDRESS$), IPV6ADDRESS1$ = subexp(subexp(H16$ + "\\:") + "{6}" + LS32$), IPV6ADDRESS2$ = subexp("\\:\\:" + subexp(H16$ + "\\:") + "{5}" + LS32$), IPV6ADDRESS3$ = subexp(subexp(H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{4}" + LS32$), IPV6ADDRESS4$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,1}" + H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{3}" + LS32$), IPV6ADDRESS5$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,2}" + H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{2}" + LS32$), IPV6ADDRESS6$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,3}" + H16$) + "?\\:\\:" + H16$ + "\\:" + LS32$), IPV6ADDRESS7$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,4}" + H16$) + "?\\:\\:" + LS32$), IPV6ADDRESS8$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,5}" + H16$) + "?\\:\\:" + H16$), IPV6ADDRESS9$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,6}" + H16$) + "?\\:\\:"), IPV6ADDRESS$ = subexp([IPV6ADDRESS1$, IPV6ADDRESS2$, IPV6ADDRESS3$, IPV6ADDRESS4$, IPV6ADDRESS5$, IPV6ADDRESS6$, IPV6ADDRESS7$, IPV6ADDRESS8$, IPV6ADDRESS9$].join("|")), ZONEID$ = subexp(subexp(UNRESERVED$$2 + "|" + PCT_ENCODED$2) + "+"), IPV6ADDRZ$ = subexp(IPV6ADDRESS$ + "\\%25" + ZONEID$), IPV6ADDRZ_RELAXED$ = subexp(IPV6ADDRESS$ + subexp("\\%25|\\%(?!" + HEXDIG$$2 + "{2})") + ZONEID$), IPVFUTURE$ = subexp("[vV]" + HEXDIG$$2 + "+\\." + merge(UNRESERVED$$2, SUB_DELIMS$$, "[\\:]") + "+"), IP_LITERAL$ = subexp("\\[" + subexp(IPV6ADDRZ_RELAXED$ + "|" + IPV6ADDRESS$ + "|" + IPVFUTURE$) + "\\]"), REG_NAME$ = subexp(subexp(PCT_ENCODED$2 + "|" + merge(UNRESERVED$$2, SUB_DELIMS$$)) + "*"), HOST$ = subexp(IP_LITERAL$ + "|" + IPV4ADDRESS$ + "(?!" + REG_NAME$ + ")|" + REG_NAME$), PORT$ = subexp(DIGIT$$ + "*"), AUTHORITY$ = subexp(subexp(USERINFO$ + "@") + "?" + HOST$ + subexp("\\:" + PORT$) + "?"), PCHAR$ = subexp(PCT_ENCODED$2 + "|" + merge(UNRESERVED$$2, SUB_DELIMS$$, "[\\:\\@]")), SEGMENT$ = subexp(PCHAR$ + "*"), SEGMENT_NZ$ = subexp(PCHAR$ + "+"), SEGMENT_NZ_NC$ = subexp(subexp(PCT_ENCODED$2 + "|" + merge(UNRESERVED$$2, SUB_DELIMS$$, "[\\@]")) + "+"), PATH_ABEMPTY$ = subexp(subexp("\\/" + SEGMENT$) + "*"), PATH_ABSOLUTE$ = subexp("\\/" + subexp(SEGMENT_NZ$ + PATH_ABEMPTY$) + "?"), PATH_NOSCHEME$ = subexp(SEGMENT_NZ_NC$ + PATH_ABEMPTY$), PATH_ROOTLESS$ = subexp(SEGMENT_NZ$ + PATH_ABEMPTY$), PATH_EMPTY$ = "(?!" + PCHAR$ + ")", PATH$ = subexp(PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$), QUERY$ = subexp(subexp(PCHAR$ + "|" + merge("[\\/\\?]", IPRIVATE$$)) + "*"), FRAGMENT$ = subexp(subexp(PCHAR$ + "|[\\/\\?]") + "*"), HIER_PART$ = subexp(subexp("\\/\\/" + AUTHORITY$ + PATH_ABEMPTY$) + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$), URI$ = subexp(SCHEME$ + "\\:" + HIER_PART$ + subexp("\\?" + QUERY$) + "?" + subexp("\\#" + FRAGMENT$) + "?"), RELATIVE_PART$ = subexp(subexp("\\/\\/" + AUTHORITY$ + PATH_ABEMPTY$) + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_EMPTY$), RELATIVE$ = subexp(RELATIVE_PART$ + subexp("\\?" + QUERY$) + "?" + subexp("\\#" + FRAGMENT$) + "?"), URI_REFERENCE$ = subexp(URI$ + "|" + RELATIVE$), ABSOLUTE_URI$ = subexp(SCHEME$ + "\\:" + HIER_PART$ + subexp("\\?" + QUERY$) + "?"), GENERIC_REF$ = "^(" + SCHEME$ + ")\\:" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", RELATIVE_REF$ = "^(){0}" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", ABSOLUTE_REF$ = "^(" + SCHEME$ + ")\\:" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?$", SAMEDOC_REF$ = "^" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", AUTHORITY_REF$ = "^" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?$"; + return { + NOT_SCHEME: new RegExp(merge("[^]", ALPHA$$, DIGIT$$, "[\\+\\-\\.]"), "g"), + NOT_USERINFO: new RegExp(merge("[^\\%\\:]", UNRESERVED$$2, SUB_DELIMS$$), "g"), + NOT_HOST: new RegExp(merge("[^\\%\\[\\]\\:]", UNRESERVED$$2, SUB_DELIMS$$), "g"), + NOT_PATH: new RegExp(merge("[^\\%\\/\\:\\@]", UNRESERVED$$2, SUB_DELIMS$$), "g"), + NOT_PATH_NOSCHEME: new RegExp(merge("[^\\%\\/\\@]", UNRESERVED$$2, SUB_DELIMS$$), "g"), + NOT_QUERY: new RegExp(merge("[^\\%]", UNRESERVED$$2, SUB_DELIMS$$, "[\\:\\@\\/\\?]", IPRIVATE$$), "g"), + NOT_FRAGMENT: new RegExp(merge("[^\\%]", UNRESERVED$$2, SUB_DELIMS$$, "[\\:\\@\\/\\?]"), "g"), + ESCAPE: new RegExp(merge("[^]", UNRESERVED$$2, SUB_DELIMS$$), "g"), + UNRESERVED: new RegExp(UNRESERVED$$2, "g"), + OTHER_CHARS: new RegExp(merge("[^\\%]", UNRESERVED$$2, RESERVED$$), "g"), + PCT_ENCODED: new RegExp(PCT_ENCODED$2, "g"), + IPV4ADDRESS: new RegExp("^(" + IPV4ADDRESS$ + ")$"), + IPV6ADDRESS: new RegExp("^\\[?(" + IPV6ADDRESS$ + ")" + subexp(subexp("\\%25|\\%(?!" + HEXDIG$$2 + "{2})") + "(" + ZONEID$ + ")") + "?\\]?$") + //RFC 6874, with relaxed parsing rules + }; + } + var URI_PROTOCOL = buildExps(false); + var IRI_PROTOCOL = buildExps(true); + var slicedToArray = /* @__PURE__ */ function() { + function sliceIterator(arr, i) { + var _arr = []; + var _n = true; + var _d = false; + var _e = void 0; + try { + for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { + _arr.push(_s.value); + if (i && _arr.length === i) break; + } + } catch (err) { + _d = true; + _e = err; + } finally { + try { + if (!_n && _i["return"]) _i["return"](); + } finally { + if (_d) throw _e; + } + } + return _arr; + } + return function(arr, i) { + if (Array.isArray(arr)) { + return arr; + } else if (Symbol.iterator in Object(arr)) { + return sliceIterator(arr, i); + } else { + throw new TypeError("Invalid attempt to destructure non-iterable instance"); + } + }; + }(); + var toConsumableArray = function(arr) { + if (Array.isArray(arr)) { + for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i]; + return arr2; + } else { + return Array.from(arr); + } + }; + var maxInt = 2147483647; + var base = 36; + var tMin = 1; + var tMax = 26; + var skew = 38; + var damp = 700; + var initialBias = 72; + var initialN = 128; + var delimiter = "-"; + var regexPunycode = /^xn--/; + var regexNonASCII = /[^\0-\x7E]/; + var regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g; + var errors = { + "overflow": "Overflow: input needs wider integers to process", + "not-basic": "Illegal input >= 0x80 (not a basic code point)", + "invalid-input": "Invalid input" + }; + var baseMinusTMin = base - tMin; + var floor = Math.floor; + var stringFromCharCode = String.fromCharCode; + function error$1(type) { + throw new RangeError(errors[type]); + } + function map(array, fn) { + var result = []; + var length = array.length; + while (length--) { + result[length] = fn(array[length]); + } + return result; + } + function mapDomain(string, fn) { + var parts = string.split("@"); + var result = ""; + if (parts.length > 1) { + result = parts[0] + "@"; + string = parts[1]; + } + string = string.replace(regexSeparators, "."); + var labels = string.split("."); + var encoded = map(labels, fn).join("."); + return result + encoded; + } + function ucs2decode(string) { + var output = []; + var counter = 0; + var length = string.length; + while (counter < length) { + var value = string.charCodeAt(counter++); + if (value >= 55296 && value <= 56319 && counter < length) { + var extra = string.charCodeAt(counter++); + if ((extra & 64512) == 56320) { + output.push(((value & 1023) << 10) + (extra & 1023) + 65536); + } else { + output.push(value); + counter--; + } + } else { + output.push(value); + } + } + return output; + } + var ucs2encode = function ucs2encode2(array) { + return String.fromCodePoint.apply(String, toConsumableArray(array)); + }; + var basicToDigit = function basicToDigit2(codePoint) { + if (codePoint - 48 < 10) { + return codePoint - 22; + } + if (codePoint - 65 < 26) { + return codePoint - 65; + } + if (codePoint - 97 < 26) { + return codePoint - 97; + } + return base; + }; + var digitToBasic = function digitToBasic2(digit, flag) { + return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5); + }; + var adapt = function adapt2(delta, numPoints, firstTime) { + var k = 0; + delta = firstTime ? floor(delta / damp) : delta >> 1; + delta += floor(delta / numPoints); + for ( + ; + /* no initialization */ + delta > baseMinusTMin * tMax >> 1; + k += base + ) { + delta = floor(delta / baseMinusTMin); + } + return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); + }; + var decode = function decode2(input) { + var output = []; + var inputLength = input.length; + var i = 0; + var n = initialN; + var bias = initialBias; + var basic = input.lastIndexOf(delimiter); + if (basic < 0) { + basic = 0; + } + for (var j = 0; j < basic; ++j) { + if (input.charCodeAt(j) >= 128) { + error$1("not-basic"); + } + output.push(input.charCodeAt(j)); + } + for (var index = basic > 0 ? basic + 1 : 0; index < inputLength; ) { + var oldi = i; + for ( + var w = 1, k = base; + ; + /* no condition */ + k += base + ) { + if (index >= inputLength) { + error$1("invalid-input"); + } + var digit = basicToDigit(input.charCodeAt(index++)); + if (digit >= base || digit > floor((maxInt - i) / w)) { + error$1("overflow"); + } + i += digit * w; + var t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias; + if (digit < t) { + break; + } + var baseMinusT = base - t; + if (w > floor(maxInt / baseMinusT)) { + error$1("overflow"); + } + w *= baseMinusT; + } + var out = output.length + 1; + bias = adapt(i - oldi, out, oldi == 0); + if (floor(i / out) > maxInt - n) { + error$1("overflow"); + } + n += floor(i / out); + i %= out; + output.splice(i++, 0, n); + } + return String.fromCodePoint.apply(String, output); + }; + var encode = function encode2(input) { + var output = []; + input = ucs2decode(input); + var inputLength = input.length; + var n = initialN; + var delta = 0; + var bias = initialBias; + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = void 0; + try { + for (var _iterator = input[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var _currentValue2 = _step.value; + if (_currentValue2 < 128) { + output.push(stringFromCharCode(_currentValue2)); + } + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + var basicLength = output.length; + var handledCPCount = basicLength; + if (basicLength) { + output.push(delimiter); + } + while (handledCPCount < inputLength) { + var m = maxInt; + var _iteratorNormalCompletion2 = true; + var _didIteratorError2 = false; + var _iteratorError2 = void 0; + try { + for (var _iterator2 = input[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { + var currentValue = _step2.value; + if (currentValue >= n && currentValue < m) { + m = currentValue; + } + } + } catch (err) { + _didIteratorError2 = true; + _iteratorError2 = err; + } finally { + try { + if (!_iteratorNormalCompletion2 && _iterator2.return) { + _iterator2.return(); + } + } finally { + if (_didIteratorError2) { + throw _iteratorError2; + } + } + } + var handledCPCountPlusOne = handledCPCount + 1; + if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) { + error$1("overflow"); + } + delta += (m - n) * handledCPCountPlusOne; + n = m; + var _iteratorNormalCompletion3 = true; + var _didIteratorError3 = false; + var _iteratorError3 = void 0; + try { + for (var _iterator3 = input[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) { + var _currentValue = _step3.value; + if (_currentValue < n && ++delta > maxInt) { + error$1("overflow"); + } + if (_currentValue == n) { + var q = delta; + for ( + var k = base; + ; + /* no condition */ + k += base + ) { + var t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias; + if (q < t) { + break; + } + var qMinusT = q - t; + var baseMinusT = base - t; + output.push(stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))); + q = floor(qMinusT / baseMinusT); + } + output.push(stringFromCharCode(digitToBasic(q, 0))); + bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength); + delta = 0; + ++handledCPCount; + } + } + } catch (err) { + _didIteratorError3 = true; + _iteratorError3 = err; + } finally { + try { + if (!_iteratorNormalCompletion3 && _iterator3.return) { + _iterator3.return(); + } + } finally { + if (_didIteratorError3) { + throw _iteratorError3; + } + } + } + ++delta; + ++n; + } + return output.join(""); + }; + var toUnicode = function toUnicode2(input) { + return mapDomain(input, function(string) { + return regexPunycode.test(string) ? decode(string.slice(4).toLowerCase()) : string; + }); + }; + var toASCII = function toASCII2(input) { + return mapDomain(input, function(string) { + return regexNonASCII.test(string) ? "xn--" + encode(string) : string; + }); + }; + var punycode = { + /** + * A string representing the current Punycode.js version number. + * @memberOf punycode + * @type String + */ + "version": "2.1.0", + /** + * An object of methods to convert from JavaScript's internal character + * representation (UCS-2) to Unicode code points, and back. + * @see + * @memberOf punycode + * @type Object + */ + "ucs2": { + "decode": ucs2decode, + "encode": ucs2encode + }, + "decode": decode, + "encode": encode, + "toASCII": toASCII, + "toUnicode": toUnicode + }; + var SCHEMES = {}; + function pctEncChar(chr) { + var c = chr.charCodeAt(0); + var e = void 0; + if (c < 16) e = "%0" + c.toString(16).toUpperCase(); + else if (c < 128) e = "%" + c.toString(16).toUpperCase(); + else if (c < 2048) e = "%" + (c >> 6 | 192).toString(16).toUpperCase() + "%" + (c & 63 | 128).toString(16).toUpperCase(); + else e = "%" + (c >> 12 | 224).toString(16).toUpperCase() + "%" + (c >> 6 & 63 | 128).toString(16).toUpperCase() + "%" + (c & 63 | 128).toString(16).toUpperCase(); + return e; + } + function pctDecChars(str) { + var newStr = ""; + var i = 0; + var il = str.length; + while (i < il) { + var c = parseInt(str.substr(i + 1, 2), 16); + if (c < 128) { + newStr += String.fromCharCode(c); + i += 3; + } else if (c >= 194 && c < 224) { + if (il - i >= 6) { + var c2 = parseInt(str.substr(i + 4, 2), 16); + newStr += String.fromCharCode((c & 31) << 6 | c2 & 63); + } else { + newStr += str.substr(i, 6); + } + i += 6; + } else if (c >= 224) { + if (il - i >= 9) { + var _c = parseInt(str.substr(i + 4, 2), 16); + var c3 = parseInt(str.substr(i + 7, 2), 16); + newStr += String.fromCharCode((c & 15) << 12 | (_c & 63) << 6 | c3 & 63); + } else { + newStr += str.substr(i, 9); + } + i += 9; + } else { + newStr += str.substr(i, 3); + i += 3; + } + } + return newStr; + } + function _normalizeComponentEncoding(components, protocol) { + function decodeUnreserved2(str) { + var decStr = pctDecChars(str); + return !decStr.match(protocol.UNRESERVED) ? str : decStr; + } + if (components.scheme) components.scheme = String(components.scheme).replace(protocol.PCT_ENCODED, decodeUnreserved2).toLowerCase().replace(protocol.NOT_SCHEME, ""); + if (components.userinfo !== void 0) components.userinfo = String(components.userinfo).replace(protocol.PCT_ENCODED, decodeUnreserved2).replace(protocol.NOT_USERINFO, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); + if (components.host !== void 0) components.host = String(components.host).replace(protocol.PCT_ENCODED, decodeUnreserved2).toLowerCase().replace(protocol.NOT_HOST, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); + if (components.path !== void 0) components.path = String(components.path).replace(protocol.PCT_ENCODED, decodeUnreserved2).replace(components.scheme ? protocol.NOT_PATH : protocol.NOT_PATH_NOSCHEME, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); + if (components.query !== void 0) components.query = String(components.query).replace(protocol.PCT_ENCODED, decodeUnreserved2).replace(protocol.NOT_QUERY, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); + if (components.fragment !== void 0) components.fragment = String(components.fragment).replace(protocol.PCT_ENCODED, decodeUnreserved2).replace(protocol.NOT_FRAGMENT, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); + return components; + } + function _stripLeadingZeros(str) { + return str.replace(/^0*(.*)/, "$1") || "0"; + } + function _normalizeIPv4(host, protocol) { + var matches = host.match(protocol.IPV4ADDRESS) || []; + var _matches = slicedToArray(matches, 2), address = _matches[1]; + if (address) { + return address.split(".").map(_stripLeadingZeros).join("."); + } else { + return host; + } + } + function _normalizeIPv6(host, protocol) { + var matches = host.match(protocol.IPV6ADDRESS) || []; + var _matches2 = slicedToArray(matches, 3), address = _matches2[1], zone = _matches2[2]; + if (address) { + var _address$toLowerCase$ = address.toLowerCase().split("::").reverse(), _address$toLowerCase$2 = slicedToArray(_address$toLowerCase$, 2), last = _address$toLowerCase$2[0], first = _address$toLowerCase$2[1]; + var firstFields = first ? first.split(":").map(_stripLeadingZeros) : []; + var lastFields = last.split(":").map(_stripLeadingZeros); + var isLastFieldIPv4Address = protocol.IPV4ADDRESS.test(lastFields[lastFields.length - 1]); + var fieldCount = isLastFieldIPv4Address ? 7 : 8; + var lastFieldsStart = lastFields.length - fieldCount; + var fields = Array(fieldCount); + for (var x = 0; x < fieldCount; ++x) { + fields[x] = firstFields[x] || lastFields[lastFieldsStart + x] || ""; + } + if (isLastFieldIPv4Address) { + fields[fieldCount - 1] = _normalizeIPv4(fields[fieldCount - 1], protocol); + } + var allZeroFields = fields.reduce(function(acc, field, index) { + if (!field || field === "0") { + var lastLongest = acc[acc.length - 1]; + if (lastLongest && lastLongest.index + lastLongest.length === index) { + lastLongest.length++; + } else { + acc.push({ index, length: 1 }); + } + } + return acc; + }, []); + var longestZeroFields = allZeroFields.sort(function(a, b) { + return b.length - a.length; + })[0]; + var newHost = void 0; + if (longestZeroFields && longestZeroFields.length > 1) { + var newFirst = fields.slice(0, longestZeroFields.index); + var newLast = fields.slice(longestZeroFields.index + longestZeroFields.length); + newHost = newFirst.join(":") + "::" + newLast.join(":"); + } else { + newHost = fields.join(":"); + } + if (zone) { + newHost += "%" + zone; + } + return newHost; + } else { + return host; + } + } + var URI_PARSE = /^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i; + var NO_MATCH_IS_UNDEFINED = "".match(/(){0}/)[1] === void 0; + function parse2(uriString) { + var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; + var components = {}; + var protocol = options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL; + if (options.reference === "suffix") uriString = (options.scheme ? options.scheme + ":" : "") + "//" + uriString; + var matches = uriString.match(URI_PARSE); + if (matches) { + if (NO_MATCH_IS_UNDEFINED) { + components.scheme = matches[1]; + components.userinfo = matches[3]; + components.host = matches[4]; + components.port = parseInt(matches[5], 10); + components.path = matches[6] || ""; + components.query = matches[7]; + components.fragment = matches[8]; + if (isNaN(components.port)) { + components.port = matches[5]; + } + } else { + components.scheme = matches[1] || void 0; + components.userinfo = uriString.indexOf("@") !== -1 ? matches[3] : void 0; + components.host = uriString.indexOf("//") !== -1 ? matches[4] : void 0; + components.port = parseInt(matches[5], 10); + components.path = matches[6] || ""; + components.query = uriString.indexOf("?") !== -1 ? matches[7] : void 0; + components.fragment = uriString.indexOf("#") !== -1 ? matches[8] : void 0; + if (isNaN(components.port)) { + components.port = uriString.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/) ? matches[4] : void 0; + } + } + if (components.host) { + components.host = _normalizeIPv6(_normalizeIPv4(components.host, protocol), protocol); + } + if (components.scheme === void 0 && components.userinfo === void 0 && components.host === void 0 && components.port === void 0 && !components.path && components.query === void 0) { + components.reference = "same-document"; + } else if (components.scheme === void 0) { + components.reference = "relative"; + } else if (components.fragment === void 0) { + components.reference = "absolute"; + } else { + components.reference = "uri"; + } + if (options.reference && options.reference !== "suffix" && options.reference !== components.reference) { + components.error = components.error || "URI is not a " + options.reference + " reference."; + } + var schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()]; + if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) { + if (components.host && (options.domainHost || schemeHandler && schemeHandler.domainHost)) { + try { + components.host = punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase()); + } catch (e) { + components.error = components.error || "Host's domain name can not be converted to ASCII via punycode: " + e; + } + } + _normalizeComponentEncoding(components, URI_PROTOCOL); + } else { + _normalizeComponentEncoding(components, protocol); + } + if (schemeHandler && schemeHandler.parse) { + schemeHandler.parse(components, options); + } + } else { + components.error = components.error || "URI can not be parsed."; + } + return components; + } + function _recomposeAuthority(components, options) { + var protocol = options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL; + var uriTokens = []; + if (components.userinfo !== void 0) { + uriTokens.push(components.userinfo); + uriTokens.push("@"); + } + if (components.host !== void 0) { + uriTokens.push(_normalizeIPv6(_normalizeIPv4(String(components.host), protocol), protocol).replace(protocol.IPV6ADDRESS, function(_2, $1, $2) { + return "[" + $1 + ($2 ? "%25" + $2 : "") + "]"; + })); + } + if (typeof components.port === "number" || typeof components.port === "string") { + uriTokens.push(":"); + uriTokens.push(String(components.port)); + } + return uriTokens.length ? uriTokens.join("") : void 0; + } + var RDS1 = /^\.\.?\//; + var RDS2 = /^\/\.(\/|$)/; + var RDS3 = /^\/\.\.(\/|$)/; + var RDS5 = /^\/?(?:.|\n)*?(?=\/|$)/; + function removeDotSegments(input) { + var 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 = ""; + } else { + var im = input.match(RDS5); + if (im) { + var s = im[0]; + input = input.slice(s.length); + output.push(s); + } else { + throw new Error("Unexpected dot segment condition"); + } + } + } + return output.join(""); + } + function serialize(components) { + var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; + var protocol = options.iri ? IRI_PROTOCOL : URI_PROTOCOL; + var uriTokens = []; + var schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()]; + if (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(components, options); + if (components.host) { + if (protocol.IPV6ADDRESS.test(components.host)) { + } else if (options.domainHost || schemeHandler && schemeHandler.domainHost) { + try { + components.host = !options.iri ? punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase()) : punycode.toUnicode(components.host); + } catch (e) { + components.error = components.error || "Host's domain name can not be converted to " + (!options.iri ? "ASCII" : "Unicode") + " via punycode: " + e; + } + } + } + _normalizeComponentEncoding(components, protocol); + if (options.reference !== "suffix" && components.scheme) { + uriTokens.push(components.scheme); + uriTokens.push(":"); + } + var authority = _recomposeAuthority(components, options); + if (authority !== void 0) { + if (options.reference !== "suffix") { + uriTokens.push("//"); + } + uriTokens.push(authority); + if (components.path && components.path.charAt(0) !== "/") { + uriTokens.push("/"); + } + } + if (components.path !== void 0) { + var s = components.path; + if (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) { + s = removeDotSegments(s); + } + if (authority === void 0) { + s = s.replace(/^\/\//, "/%2F"); + } + uriTokens.push(s); + } + if (components.query !== void 0) { + uriTokens.push("?"); + uriTokens.push(components.query); + } + if (components.fragment !== void 0) { + uriTokens.push("#"); + uriTokens.push(components.fragment); + } + return uriTokens.join(""); + } + function resolveComponents(base2, relative) { + var options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}; + var skipNormalization = arguments[3]; + var target = {}; + if (!skipNormalization) { + base2 = parse2(serialize(base2, options), options); + relative = parse2(serialize(relative, options), options); + } + 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 !== void 0 || relative.host !== void 0 || relative.port !== void 0) { + target.userinfo = relative.userinfo; + target.host = relative.host; + target.port = relative.port; + target.path = removeDotSegments(relative.path || ""); + target.query = relative.query; + } else { + if (!relative.path) { + target.path = base2.path; + if (relative.query !== void 0) { + target.query = relative.query; + } else { + target.query = base2.query; + } + } else { + if (relative.path.charAt(0) === "/") { + target.path = removeDotSegments(relative.path); + } else { + if ((base2.userinfo !== void 0 || base2.host !== void 0 || base2.port !== void 0) && !base2.path) { + target.path = "/" + relative.path; + } else if (!base2.path) { + target.path = relative.path; + } else { + target.path = base2.path.slice(0, base2.path.lastIndexOf("/") + 1) + relative.path; + } + target.path = removeDotSegments(target.path); + } + target.query = relative.query; + } + target.userinfo = base2.userinfo; + target.host = base2.host; + target.port = base2.port; + } + target.scheme = base2.scheme; + } + target.fragment = relative.fragment; + return target; + } + function resolve(baseURI, relativeURI, options) { + var schemelessOptions = assign({ scheme: "null" }, options); + return serialize(resolveComponents(parse2(baseURI, schemelessOptions), parse2(relativeURI, schemelessOptions), schemelessOptions, true), schemelessOptions); + } + function normalize(uri, options) { + if (typeof uri === "string") { + uri = serialize(parse2(uri, options), options); + } else if (typeOf(uri) === "object") { + uri = parse2(serialize(uri, options), options); + } + return uri; + } + function equal(uriA, uriB, options) { + if (typeof uriA === "string") { + uriA = serialize(parse2(uriA, options), options); + } else if (typeOf(uriA) === "object") { + uriA = serialize(uriA, options); + } + if (typeof uriB === "string") { + uriB = serialize(parse2(uriB, options), options); + } else if (typeOf(uriB) === "object") { + uriB = serialize(uriB, options); + } + return uriA === uriB; + } + function escapeComponent(str, options) { + return str && str.toString().replace(!options || !options.iri ? URI_PROTOCOL.ESCAPE : IRI_PROTOCOL.ESCAPE, pctEncChar); + } + function unescapeComponent(str, options) { + return str && str.toString().replace(!options || !options.iri ? URI_PROTOCOL.PCT_ENCODED : IRI_PROTOCOL.PCT_ENCODED, pctDecChars); + } + var handler = { + scheme: "http", + domainHost: true, + parse: function parse3(components, options) { + if (!components.host) { + components.error = components.error || "HTTP URIs must have a host."; + } + return components; + }, + serialize: function serialize2(components, options) { + var secure = String(components.scheme).toLowerCase() === "https"; + if (components.port === (secure ? 443 : 80) || components.port === "") { + components.port = void 0; + } + if (!components.path) { + components.path = "/"; + } + return components; + } + }; + var handler$1 = { + scheme: "https", + domainHost: handler.domainHost, + parse: handler.parse, + serialize: handler.serialize + }; + function isSecure(wsComponents) { + return typeof wsComponents.secure === "boolean" ? wsComponents.secure : String(wsComponents.scheme).toLowerCase() === "wss"; + } + var handler$2 = { + scheme: "ws", + domainHost: true, + parse: function parse3(components, options) { + var wsComponents = components; + wsComponents.secure = isSecure(wsComponents); + wsComponents.resourceName = (wsComponents.path || "/") + (wsComponents.query ? "?" + wsComponents.query : ""); + wsComponents.path = void 0; + wsComponents.query = void 0; + return wsComponents; + }, + serialize: function serialize2(wsComponents, options) { + if (wsComponents.port === (isSecure(wsComponents) ? 443 : 80) || wsComponents.port === "") { + wsComponents.port = void 0; + } + if (typeof wsComponents.secure === "boolean") { + wsComponents.scheme = wsComponents.secure ? "wss" : "ws"; + wsComponents.secure = void 0; + } + if (wsComponents.resourceName) { + var _wsComponents$resourc = wsComponents.resourceName.split("?"), _wsComponents$resourc2 = slicedToArray(_wsComponents$resourc, 2), path = _wsComponents$resourc2[0], query = _wsComponents$resourc2[1]; + wsComponents.path = path && path !== "/" ? path : void 0; + wsComponents.query = query; + wsComponents.resourceName = void 0; + } + wsComponents.fragment = void 0; + return wsComponents; + } + }; + var handler$3 = { + scheme: "wss", + domainHost: handler$2.domainHost, + parse: handler$2.parse, + serialize: handler$2.serialize + }; + var O = {}; + var isIRI = true; + var UNRESERVED$$ = "[A-Za-z0-9\\-\\.\\_\\~" + (isIRI ? "\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF" : "") + "]"; + var HEXDIG$$ = "[0-9A-Fa-f]"; + var PCT_ENCODED$ = subexp(subexp("%[EFef]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%" + HEXDIG$$ + HEXDIG$$)); + var ATEXT$$ = "[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]"; + var QTEXT$$ = "[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]"; + var VCHAR$$ = merge(QTEXT$$, '[\\"\\\\]'); + var SOME_DELIMS$$ = "[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"; + var UNRESERVED = new RegExp(UNRESERVED$$, "g"); + var PCT_ENCODED = new RegExp(PCT_ENCODED$, "g"); + var NOT_LOCAL_PART = new RegExp(merge("[^]", ATEXT$$, "[\\.]", '[\\"]', VCHAR$$), "g"); + var NOT_HFNAME = new RegExp(merge("[^]", UNRESERVED$$, SOME_DELIMS$$), "g"); + var NOT_HFVALUE = NOT_HFNAME; + function decodeUnreserved(str) { + var decStr = pctDecChars(str); + return !decStr.match(UNRESERVED) ? str : decStr; + } + var handler$4 = { + scheme: "mailto", + parse: function parse$$1(components, options) { + var mailtoComponents = components; + var to = mailtoComponents.to = mailtoComponents.path ? mailtoComponents.path.split(",") : []; + mailtoComponents.path = void 0; + if (mailtoComponents.query) { + var unknownHeaders = false; + var headers = {}; + var hfields = mailtoComponents.query.split("&"); + for (var x = 0, xl = hfields.length; x < xl; ++x) { + var hfield = hfields[x].split("="); + switch (hfield[0]) { + case "to": + var toAddrs = hfield[1].split(","); + for (var _x = 0, _xl = toAddrs.length; _x < _xl; ++_x) { + to.push(toAddrs[_x]); + } + break; + case "subject": + mailtoComponents.subject = unescapeComponent(hfield[1], options); + break; + case "body": + mailtoComponents.body = unescapeComponent(hfield[1], options); + break; + default: + unknownHeaders = true; + headers[unescapeComponent(hfield[0], options)] = unescapeComponent(hfield[1], options); + break; + } + } + if (unknownHeaders) mailtoComponents.headers = headers; + } + mailtoComponents.query = void 0; + for (var _x2 = 0, _xl2 = to.length; _x2 < _xl2; ++_x2) { + var addr = to[_x2].split("@"); + addr[0] = unescapeComponent(addr[0]); + if (!options.unicodeSupport) { + try { + addr[1] = punycode.toASCII(unescapeComponent(addr[1], options).toLowerCase()); + } catch (e) { + mailtoComponents.error = mailtoComponents.error || "Email address's domain name can not be converted to ASCII via punycode: " + e; + } + } else { + addr[1] = unescapeComponent(addr[1], options).toLowerCase(); + } + to[_x2] = addr.join("@"); + } + return mailtoComponents; + }, + serialize: function serialize$$1(mailtoComponents, options) { + var components = mailtoComponents; + var to = toArray2(mailtoComponents.to); + if (to) { + for (var x = 0, xl = to.length; x < xl; ++x) { + var toAddr = String(to[x]); + var atIdx = toAddr.lastIndexOf("@"); + var localPart = toAddr.slice(0, atIdx).replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_LOCAL_PART, pctEncChar); + var domain = toAddr.slice(atIdx + 1); + try { + domain = !options.iri ? punycode.toASCII(unescapeComponent(domain, options).toLowerCase()) : punycode.toUnicode(domain); + } catch (e) { + components.error = components.error || "Email address's domain name can not be converted to " + (!options.iri ? "ASCII" : "Unicode") + " via punycode: " + e; + } + to[x] = localPart + "@" + domain; + } + components.path = to.join(","); + } + var headers = mailtoComponents.headers = mailtoComponents.headers || {}; + if (mailtoComponents.subject) headers["subject"] = mailtoComponents.subject; + if (mailtoComponents.body) headers["body"] = mailtoComponents.body; + var fields = []; + for (var name in headers) { + if (headers[name] !== O[name]) { + fields.push(name.replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFNAME, pctEncChar) + "=" + headers[name].replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFVALUE, pctEncChar)); + } + } + if (fields.length) { + components.query = fields.join("&"); + } + return components; + } + }; + var URN_PARSE = /^([^\:]+)\:(.*)/; + var handler$5 = { + scheme: "urn", + parse: function parse$$1(components, options) { + var matches = components.path && components.path.match(URN_PARSE); + var urnComponents = components; + if (matches) { + var scheme = options.scheme || urnComponents.scheme || "urn"; + var nid = matches[1].toLowerCase(); + var nss = matches[2]; + var urnScheme = scheme + ":" + (options.nid || nid); + var schemeHandler = SCHEMES[urnScheme]; + urnComponents.nid = nid; + urnComponents.nss = nss; + urnComponents.path = void 0; + if (schemeHandler) { + urnComponents = schemeHandler.parse(urnComponents, options); + } + } else { + urnComponents.error = urnComponents.error || "URN can not be parsed."; + } + return urnComponents; + }, + serialize: function serialize$$1(urnComponents, options) { + var scheme = options.scheme || urnComponents.scheme || "urn"; + var nid = urnComponents.nid; + var urnScheme = scheme + ":" + (options.nid || nid); + var schemeHandler = SCHEMES[urnScheme]; + if (schemeHandler) { + urnComponents = schemeHandler.serialize(urnComponents, options); + } + var uriComponents = urnComponents; + var nss = urnComponents.nss; + uriComponents.path = (nid || options.nid) + ":" + nss; + return uriComponents; + } + }; + var UUID = /^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/; + var handler$6 = { + scheme: "urn:uuid", + parse: function parse3(urnComponents, options) { + var uuidComponents = urnComponents; + uuidComponents.uuid = uuidComponents.nss; + uuidComponents.nss = void 0; + if (!options.tolerant && (!uuidComponents.uuid || !uuidComponents.uuid.match(UUID))) { + uuidComponents.error = uuidComponents.error || "UUID is not valid."; + } + return uuidComponents; + }, + serialize: function serialize2(uuidComponents, options) { + var urnComponents = uuidComponents; + urnComponents.nss = (uuidComponents.uuid || "").toLowerCase(); + return urnComponents; + } + }; + SCHEMES[handler.scheme] = handler; + SCHEMES[handler$1.scheme] = handler$1; + SCHEMES[handler$2.scheme] = handler$2; + SCHEMES[handler$3.scheme] = handler$3; + SCHEMES[handler$4.scheme] = handler$4; + SCHEMES[handler$5.scheme] = handler$5; + SCHEMES[handler$6.scheme] = handler$6; + exports5.SCHEMES = SCHEMES; + exports5.pctEncChar = pctEncChar; + exports5.pctDecChars = pctDecChars; + exports5.parse = parse2; + exports5.removeDotSegments = removeDotSegments; + exports5.serialize = serialize; + exports5.resolveComponents = resolveComponents; + exports5.resolve = resolve; + exports5.normalize = normalize; + exports5.equal = equal; + exports5.escapeComponent = escapeComponent; + exports5.unescapeComponent = unescapeComponent; + Object.defineProperty(exports5, "__esModule", { value: true }); + }); + }, {}] }, {}, [1])(1); + }); + } +}); + +// ../../node_modules/openapi-to-postmanv2/assets/json-schema-draft-04.json +var require_json_schema_draft_04 = __commonJS({ + "../../node_modules/openapi-to-postmanv2/assets/json-schema-draft-04.json"(exports2, module2) { + module2.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" + }, + $schema: { + type: "string" + }, + 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 + } + ] + }, + format: { type: "string" }, + allOf: { $ref: "#/definitions/schemaArray" }, + anyOf: { $ref: "#/definitions/schemaArray" }, + oneOf: { $ref: "#/definitions/schemaArray" }, + not: { $ref: "#" } + }, + dependencies: { + exclusiveMaximum: ["maximum"], + exclusiveMinimum: ["minimum"] + }, + default: {} + }; + } +}); + +// ../../node_modules/openapi-to-postmanv2/lib/ajValidation/ajvValidatorDraft04.js +var require_ajvValidatorDraft04 = __commonJS({ + "../../node_modules/openapi-to-postmanv2/lib/ajValidation/ajvValidatorDraft04.js"(exports2, module2) { + var Ajv = require_ajv6faker(); + var draft4MetaSchema = require_json_schema_draft_04(); + function validateSchemaAJVDraft04(schema2, valueToUse) { + let ajv, validate2, filteredValidationError; + try { + ajv = new Ajv({ + // check all rules collecting all errors. instead returning after the first error. + allErrors: true, + strict: false, + schemaId: "id", + unknownFormats: ["int32", "int64"], + nullable: true + }); + ajv.addMetaSchema(draft4MetaSchema); + validate2 = ajv.compile(schema2); + validate2(valueToUse); + } catch (e) { + return { filteredValidationError }; + } + if (validate2.errors && validate2.errors.length > 0) { + let mapped = validate2.errors.map((error) => { + return { + instancePath: error.dataPath, + keyword: error.keyword, + message: error.message, + params: error.params, + schemaPath: error.schemaPath + }; + }); + validate2.errors = mapped; + } + return { filteredValidationError, validate: validate2 }; + } + module2.exports = { + validateSchemaAJVDraft04 + }; + } +}); + +// ../../node_modules/openapi-to-postmanv2/lib/ajValidation/ajvValidation.js +var require_ajvValidation = __commonJS({ + "../../node_modules/openapi-to-postmanv2/lib/ajValidation/ajvValidation.js"(exports2, module2) { + var { + formatDataPath, + formatSchemaPathFromAJVErrorToConvertToDataPath, + isTypeValue + } = require_schemaUtilsCommon(); + var _2 = require_lodash(); + var IGNORED_KEYWORDS = ["propertyNames", "const", "additionalItems", "dependencies"]; + var { validateSchemaAJV } = require_ajvValidator(); + var { validateSchemaAJVDraft04 } = require_ajvValidatorDraft04(); + var specialDraft = "http://json-schema.org/draft-04/schema#"; + function isPmVariable(value) { + return _2.isString(value) && _2.startsWith(value, "{{") && _2.endsWith(value, "}}"); + } + function getLocalDraft(schema2) { + return schema2.$schema; + } + function getAjvValidator(draftToUse) { + return draftToUse === specialDraft ? validateSchemaAJVDraft04 : validateSchemaAJV; + } + function getDraftToUse(localDraft, jsonSchemaDialect) { + return localDraft ? localDraft : jsonSchemaDialect; + } + function filterCompositeSchemaErrors(schema2, validationMismatches) { + _2.forEach(["anyOf", "oneOf"], (compositeSchemaKeyword) => { + const compositeSchemaMismatches = _2.filter(validationMismatches, (validationMismatch) => { + return validationMismatch.keyword === compositeSchemaKeyword && _2.endsWith(validationMismatch.schemaPath, compositeSchemaKeyword); + }); + _2.forEach(compositeSchemaMismatches, (compositeSchemaMismatch) => { + let compositeSchemaMismatchPath = compositeSchemaMismatch.schemaPath, schemaDataPath = formatDataPath(formatSchemaPathFromAJVErrorToConvertToDataPath(compositeSchemaMismatchPath)), schemaToUse = schemaDataPath ? _2.get(schema2, schemaDataPath) : schema2, isCompositeSchemaValid = false; + if (!_2.isArray(schemaToUse)) { + return false; + } + for (let index = 0; index < schemaToUse.length; index++) { + const isCurrentElementInvalid = _2.some(validationMismatches, (mismatch) => { + return _2.startsWith(mismatch.schemaPath, compositeSchemaMismatchPath + `/${index}`); + }); + if (!isCurrentElementInvalid) { + isCompositeSchemaValid = true; + break; + } + } + if (isCompositeSchemaValid) { + validationMismatches = _2.reject(validationMismatches, (mismatch) => { + return _2.startsWith(mismatch.schemaPath, compositeSchemaMismatchPath); + }); + } + }); + }); + return validationMismatches; + } + function validateSchema(schema2, valueToUse, options = {}, jsonSchemaDialect) { + let validate2, compoundResult, filteredValidationError, localDraft = getLocalDraft(schema2), draftToUse = getDraftToUse(localDraft, jsonSchemaDialect); + const validator = getAjvValidator(draftToUse); + compoundResult = validator(schema2, valueToUse, draftToUse); + if (compoundResult.filteredValidationError) { + return filteredValidationError; + } + validate2 = compoundResult.validate; + filteredValidationError = _2.filter(_2.get(validate2, "errors", []), (validationError) => { + let dataPath = _2.get(validationError, "instancePath", ""); + dataPath = formatDataPath(dataPath); + if (dataPath[0] === ".") { + dataPath = dataPath.slice(1); + } + if (validationError.keyword === "pattern" && _2.has(validationError, "propertyName")) { + return false; + } else if (_2.includes(IGNORED_KEYWORDS, validationError.keyword)) { + return false; + } else if (options.ignoreUnresolvedVariables && isPmVariable(dataPath === "" ? valueToUse : _2.get(valueToUse, dataPath))) { + return false; + } + if (validationError.keyword === "type" || validationError.keyword === "format" || (validationError.keyword === "minLength" || validationError.keyword === "maxLength") && _2.get(options, "parametersResolution") === "schema") { + let schemaDataPath = formatDataPath(formatSchemaPathFromAJVErrorToConvertToDataPath(validationError.schemaPath)), schemaToUse = schemaDataPath ? _2.get(schema2, schemaDataPath) : schema2, valueToValidate = dataPath ? _2.get(valueToUse, dataPath) : valueToUse; + return !isTypeValue(valueToValidate, schemaToUse); + } + return true; + }); + filteredValidationError = filterCompositeSchemaErrors(schema2, filteredValidationError); + filteredValidationError = _2.sortBy(filteredValidationError, ["dataPath"]); + return filteredValidationError; + } + module2.exports = { + validateSchema, + getLocalDraft, + getAjvValidator, + getDraftToUse, + isTypeValue + }; + } +}); + +// ../../node_modules/object-hash/index.js +var require_object_hash = __commonJS({ + "../../node_modules/object-hash/index.js"(exports2, module2) { + "use strict"; + var crypto4 = require("crypto"); + exports2 = module2.exports = objectHash; + function objectHash(object, options) { + options = applyDefaults(object, options); + return hash(object, options); + } + exports2.sha1 = function(object) { + return objectHash(object); + }; + exports2.keys = function(object) { + return objectHash(object, { excludeValues: true, algorithm: "sha1", encoding: "hex" }); + }; + exports2.MD5 = function(object) { + return objectHash(object, { algorithm: "md5", encoding: "hex" }); + }; + exports2.keysMD5 = function(object) { + return objectHash(object, { algorithm: "md5", encoding: "hex", excludeValues: true }); + }; + var hashes = crypto4.getHashes ? crypto4.getHashes().slice() : ["sha1", "md5"]; + hashes.push("passthrough"); + var encodings = ["buffer", "hex", "binary", "base64"]; + function applyDefaults(object, sourceOptions) { + sourceOptions = sourceOptions || {}; + var options = {}; + options.algorithm = sourceOptions.algorithm || "sha1"; + options.encoding = sourceOptions.encoding || "hex"; + options.excludeValues = sourceOptions.excludeValues ? true : false; + options.algorithm = options.algorithm.toLowerCase(); + options.encoding = options.encoding.toLowerCase(); + options.ignoreUnknown = sourceOptions.ignoreUnknown !== true ? false : true; + options.respectType = sourceOptions.respectType === false ? false : true; + options.respectFunctionNames = sourceOptions.respectFunctionNames === false ? false : true; + options.respectFunctionProperties = sourceOptions.respectFunctionProperties === false ? false : true; + options.unorderedArrays = sourceOptions.unorderedArrays !== true ? false : true; + options.unorderedSets = sourceOptions.unorderedSets === false ? false : true; + options.unorderedObjects = sourceOptions.unorderedObjects === false ? false : true; + options.replacer = sourceOptions.replacer || void 0; + options.excludeKeys = sourceOptions.excludeKeys || void 0; + if (typeof object === "undefined") { + throw new Error("Object argument required."); + } + for (var i = 0; i < hashes.length; ++i) { + if (hashes[i].toLowerCase() === options.algorithm.toLowerCase()) { + options.algorithm = hashes[i]; + } + } + if (hashes.indexOf(options.algorithm) === -1) { + throw new Error('Algorithm "' + options.algorithm + '" not supported. supported values: ' + hashes.join(", ")); + } + if (encodings.indexOf(options.encoding) === -1 && options.algorithm !== "passthrough") { + throw new Error('Encoding "' + options.encoding + '" not supported. supported values: ' + encodings.join(", ")); + } + return options; + } + function isNativeFunction(f) { + if (typeof f !== "function") { + return false; + } + var exp = /^function\s+\w*\s*\(\s*\)\s*{\s+\[native code\]\s+}$/i; + return exp.exec(Function.prototype.toString.call(f)) != null; + } + function hash(object, options) { + var hashingStream; + if (options.algorithm !== "passthrough") { + hashingStream = crypto4.createHash(options.algorithm); + } else { + hashingStream = new PassThrough(); + } + if (typeof hashingStream.write === "undefined") { + hashingStream.write = hashingStream.update; + hashingStream.end = hashingStream.update; + } + var hasher = typeHasher(options, hashingStream); + hasher.dispatch(object); + if (!hashingStream.update) { + hashingStream.end(""); + } + if (hashingStream.digest) { + return hashingStream.digest(options.encoding === "buffer" ? void 0 : options.encoding); + } + var buf = hashingStream.read(); + if (options.encoding === "buffer") { + return buf; + } + return buf.toString(options.encoding); + } + exports2.writeToStream = function(object, options, stream) { + if (typeof stream === "undefined") { + stream = options; + options = {}; + } + options = applyDefaults(object, options); + return typeHasher(options, stream).dispatch(object); + }; + function typeHasher(options, writeTo, context) { + context = context || []; + var write = function(str) { + if (writeTo.update) { + return writeTo.update(str, "utf8"); + } else { + return writeTo.write(str, "utf8"); + } + }; + return { + dispatch: function(value) { + if (options.replacer) { + value = options.replacer(value); + } + var type = typeof value; + if (value === null) { + type = "null"; + } + return this["_" + type](value); + }, + _object: function(object) { + var pattern = /\[object (.*)\]/i; + var objString = Object.prototype.toString.call(object); + var objType = pattern.exec(objString); + if (!objType) { + objType = "unknown:[" + objString + "]"; + } else { + objType = objType[1]; + } + objType = objType.toLowerCase(); + var objectNumber = null; + if ((objectNumber = context.indexOf(object)) >= 0) { + return this.dispatch("[CIRCULAR:" + objectNumber + "]"); + } else { + context.push(object); + } + if (typeof Buffer !== "undefined" && Buffer.isBuffer && Buffer.isBuffer(object)) { + write("buffer:"); + return write(object); + } + if (objType !== "object" && objType !== "function" && objType !== "asyncfunction") { + if (this["_" + objType]) { + this["_" + objType](object); + } else if (options.ignoreUnknown) { + return write("[" + objType + "]"); + } else { + throw new Error('Unknown object type "' + objType + '"'); + } + } else { + var keys = Object.keys(object); + if (options.unorderedObjects) { + keys = keys.sort(); + } + if (options.respectType !== false && !isNativeFunction(object)) { + keys.splice(0, 0, "prototype", "__proto__", "constructor"); + } + if (options.excludeKeys) { + keys = keys.filter(function(key) { + return !options.excludeKeys(key); + }); + } + write("object:" + keys.length + ":"); + var self2 = this; + return keys.forEach(function(key) { + self2.dispatch(key); + write(":"); + if (!options.excludeValues) { + self2.dispatch(object[key]); + } + write(","); + }); + } + }, + _array: function(arr, unordered) { + unordered = typeof unordered !== "undefined" ? unordered : options.unorderedArrays !== false; + var self2 = this; + write("array:" + arr.length + ":"); + if (!unordered || arr.length <= 1) { + return arr.forEach(function(entry) { + return self2.dispatch(entry); + }); + } + var contextAdditions = []; + var entries = arr.map(function(entry) { + var strm = new PassThrough(); + var localContext = context.slice(); + var hasher = typeHasher(options, strm, localContext); + hasher.dispatch(entry); + contextAdditions = contextAdditions.concat(localContext.slice(context.length)); + return strm.read().toString(); + }); + context = context.concat(contextAdditions); + entries.sort(); + return this._array(entries, false); + }, + _date: function(date) { + return write("date:" + date.toJSON()); + }, + _symbol: function(sym) { + return write("symbol:" + sym.toString()); + }, + _error: function(err) { + return write("error:" + err.toString()); + }, + _boolean: function(bool) { + return write("bool:" + bool.toString()); + }, + _string: function(string) { + write("string:" + string.length + ":"); + write(string.toString()); + }, + _function: function(fn) { + write("fn:"); + if (isNativeFunction(fn)) { + this.dispatch("[native]"); + } else { + this.dispatch(fn.toString()); + } + if (options.respectFunctionNames !== false) { + this.dispatch("function-name:" + String(fn.name)); + } + if (options.respectFunctionProperties) { + this._object(fn); + } + }, + _number: function(number) { + return write("number:" + number.toString()); + }, + _xml: function(xml) { + return write("xml:" + xml.toString()); + }, + _null: function() { + return write("Null"); + }, + _undefined: function() { + return write("Undefined"); + }, + _regexp: function(regex) { + return write("regex:" + regex.toString()); + }, + _uint8array: function(arr) { + write("uint8array:"); + return this.dispatch(Array.prototype.slice.call(arr)); + }, + _uint8clampedarray: function(arr) { + write("uint8clampedarray:"); + return this.dispatch(Array.prototype.slice.call(arr)); + }, + _int8array: function(arr) { + write("int8array:"); + return this.dispatch(Array.prototype.slice.call(arr)); + }, + _uint16array: function(arr) { + write("uint16array:"); + return this.dispatch(Array.prototype.slice.call(arr)); + }, + _int16array: function(arr) { + write("int16array:"); + return this.dispatch(Array.prototype.slice.call(arr)); + }, + _uint32array: function(arr) { + write("uint32array:"); + return this.dispatch(Array.prototype.slice.call(arr)); + }, + _int32array: function(arr) { + write("int32array:"); + return this.dispatch(Array.prototype.slice.call(arr)); + }, + _float32array: function(arr) { + write("float32array:"); + return this.dispatch(Array.prototype.slice.call(arr)); + }, + _float64array: function(arr) { + write("float64array:"); + return this.dispatch(Array.prototype.slice.call(arr)); + }, + _arraybuffer: function(arr) { + write("arraybuffer:"); + return this.dispatch(new Uint8Array(arr)); + }, + _url: function(url) { + return write("url:" + url.toString(), "utf8"); + }, + _map: function(map) { + write("map:"); + var arr = Array.from(map); + return this._array(arr, options.unorderedSets !== false); + }, + _set: function(set) { + write("set:"); + var arr = Array.from(set); + return this._array(arr, options.unorderedSets !== false); + }, + _file: function(file) { + write("file:"); + return this.dispatch([file.name, file.size, file.type, file.lastModfied]); + }, + _blob: function() { + if (options.ignoreUnknown) { + return write("[blob]"); + } + throw Error('Hashing Blob objects is currently not supported\n(see https://github.com/puleos/object-hash/issues/26)\nUse "options.replacer" or "options.ignoreUnknown"\n'); + }, + _domwindow: function() { + return write("domwindow"); + }, + _bigint: function(number) { + return write("bigint:" + number.toString()); + }, + /* Node.js standard native objects */ + _process: function() { + return write("process"); + }, + _timer: function() { + return write("timer"); + }, + _pipe: function() { + return write("pipe"); + }, + _tcp: function() { + return write("tcp"); + }, + _udp: function() { + return write("udp"); + }, + _tty: function() { + return write("tty"); + }, + _statwatcher: function() { + return write("statwatcher"); + }, + _securecontext: function() { + return write("securecontext"); + }, + _connection: function() { + return write("connection"); + }, + _zlib: function() { + return write("zlib"); + }, + _context: function() { + return write("context"); + }, + _nodescript: function() { + return write("nodescript"); + }, + _httpparser: function() { + return write("httpparser"); + }, + _dataview: function() { + return write("dataview"); + }, + _signal: function() { + return write("signal"); + }, + _fsevent: function() { + return write("fsevent"); + }, + _tlswrap: function() { + return write("tlswrap"); + } + }; + } + function PassThrough() { + return { + buf: "", + write: function(b) { + this.buf += b; + }, + end: function(b) { + this.buf += b; + }, + read: function() { + return this.buf; + } + }; + } + } +}); + +// ../../node_modules/openapi-to-postmanv2/assets/json-schema-faker.js +var require_json_schema_faker = __commonJS({ + "../../node_modules/openapi-to-postmanv2/assets/json-schema-faker.js"(exports2, module2) { + var _2 = require_lodash(); + var validateSchema = require_ajvValidation().validateSchema; + var { + handleExclusiveMaximum, + handleExclusiveMinimum + } = require_schemaUtilsCommon(); + var hash = require_object_hash(); + (function(global2, factory) { + typeof exports2 === "object" && typeof module2 !== "undefined" ? module2.exports = factory() : typeof define === "function" && define.amd ? define(factory) : global2.JSONSchemaFaker = factory(); + })(exports2, function() { + "use strict"; + var extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d, b) { + d.__proto__ = b; + } || function(d, b) { + for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + }; + function __extends(d, b) { + extendStatics(d, b); + function __() { + this.constructor = d; + } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + } + var __assign = Object.assign || function __assign2(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; + }; + function __rest(s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") { + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) + t[p[i]] = s[p[i]]; + } + return t; + } + function __decorate(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + } + function __param(paramIndex, decorator) { + return function(target, key) { + decorator(target, key, paramIndex); + }; + } + function __metadata(metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + } + function __awaiter(thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function(resolve2, 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 ? resolve2(result.value) : new P(function(resolve3) { + resolve3(result.value); + }).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + } + function __generator(thisArg, body) { + var _3 = { label: 0, sent: function() { + if (t[0] & 1) throw t[1]; + return t[1]; + }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { + return this; + }), g; + function verb(n) { + return function(v) { + return step([n, v]); + }; + } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_3) try { + if (f = 1, y && (t = y[op[0] & 2 ? "return" : op[0] ? "throw" : "next"]) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [0, t.value]; + switch (op[0]) { + case 0: + case 1: + t = op; + break; + case 4: + _3.label++; + return { value: op[1], done: false }; + case 5: + _3.label++; + y = op[1]; + op = [0]; + continue; + case 7: + op = _3.ops.pop(); + _3.trys.pop(); + continue; + default: + if (!(t = _3.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { + _3 = 0; + continue; + } + if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { + _3.label = op[1]; + break; + } + if (op[0] === 6 && _3.label < t[1]) { + _3.label = t[1]; + t = op; + break; + } + if (t && _3.label < t[2]) { + _3.label = t[2]; + _3.ops.push(op); + break; + } + if (t[2]) _3.ops.pop(); + _3.trys.pop(); + continue; + } + op = body.call(thisArg, _3); + } catch (e) { + op = [6, e]; + y = 0; + } finally { + f = t = 0; + } + if (op[0] & 5) throw op[1]; + return { value: op[0] ? op[1] : void 0, done: true }; + } + } + function __exportStar(m, exports3) { + for (var p in m) if (!exports3.hasOwnProperty(p)) exports3[p] = m[p]; + } + function __values(o) { + var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0; + if (m) return m.call(o); + return { + next: function() { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; + } + }; + } + function __read(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } catch (error) { + e = { error }; + } finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } finally { + if (e) throw e.error; + } + } + return ar; + } + function __spread() { + for (var ar = [], i = 0; i < arguments.length; i++) + ar = ar.concat(__read(arguments[i])); + return ar; + } + function __await(v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + } + function __asyncGenerator(thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { + return this; + }, i; + function verb(n) { + if (g[n]) i[n] = function(v) { + return new Promise(function(a, b) { + q.push([n, v, a, b]) > 1 || resume(n, v); + }); + }; + } + function resume(n, v) { + try { + step(g[n](v)); + } catch (e) { + settle(q[0][3], e); + } + } + function step(r) { + r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); + } + function fulfill(value) { + resume("next", value); + } + function reject(value) { + resume("throw", value); + } + function settle(f, v) { + if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); + } + } + function __asyncDelegator(o) { + var i, p; + return i = {}, verb("next"), verb("throw", function(e) { + throw e; + }), verb("return"), i[Symbol.iterator] = function() { + return this; + }, i; + function verb(n, f) { + if (o[n]) i[n] = function(v) { + return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; + }; + } + } + function __asyncValues(o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator]; + return m ? m.call(o) : typeof __values === "function" ? __values(o) : o[Symbol.iterator](); + } + function __makeTemplateObject(cooked, raw) { + if (Object.defineProperty) { + Object.defineProperty(cooked, "raw", { value: raw }); + } else { + cooked.raw = raw; + } + return cooked; + } + var tslib_es6 = /* @__PURE__ */ Object.freeze({ + __extends, + __assign, + __rest, + __decorate, + __param, + __metadata, + __awaiter, + __generator, + __exportStar, + __values, + __read, + __spread, + __await, + __asyncGenerator, + __asyncDelegator, + __asyncValues, + __makeTemplateObject + }); + var commonjsGlobal = typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {}; + function commonjsRequire() { + throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs"); + } + function createCommonjsModule(fn, module3) { + return module3 = { exports: {} }, fn(module3, module3.exports), module3.exports; + } + var types = { + ROOT: 0, + GROUP: 1, + POSITION: 2, + SET: 3, + RANGE: 4, + REPETITION: 5, + REFERENCE: 6, + CHAR: 7 + }; + var INTS = function() { + return [{ type: types.RANGE, from: 48, to: 57 }]; + }; + var WORDS = function() { + return [ + { type: types.CHAR, value: 95 }, + { type: types.RANGE, from: 97, to: 122 }, + { type: types.RANGE, from: 65, to: 90 } + ].concat(INTS()); + }; + var WHITESPACE = function() { + return [ + { type: types.CHAR, value: 9 }, + { type: types.CHAR, value: 10 }, + { type: types.CHAR, value: 11 }, + { type: types.CHAR, value: 12 }, + { type: types.CHAR, value: 13 }, + { type: types.CHAR, value: 32 }, + { type: types.CHAR, value: 160 }, + { type: types.CHAR, value: 5760 }, + { type: types.CHAR, value: 6158 }, + { type: types.CHAR, value: 8192 }, + { type: types.CHAR, value: 8193 }, + { type: types.CHAR, value: 8194 }, + { type: types.CHAR, value: 8195 }, + { type: types.CHAR, value: 8196 }, + { type: types.CHAR, value: 8197 }, + { type: types.CHAR, value: 8198 }, + { type: types.CHAR, value: 8199 }, + { type: types.CHAR, value: 8200 }, + { type: types.CHAR, value: 8201 }, + { type: types.CHAR, value: 8202 }, + { type: types.CHAR, value: 8232 }, + { type: types.CHAR, value: 8233 }, + { type: types.CHAR, value: 8239 }, + { type: types.CHAR, value: 8287 }, + { type: types.CHAR, value: 12288 }, + { type: types.CHAR, value: 65279 } + ]; + }; + var NOTANYCHAR = function() { + return [ + { type: types.CHAR, value: 10 }, + { type: types.CHAR, value: 13 }, + { type: types.CHAR, value: 8232 }, + { type: types.CHAR, value: 8233 } + ]; + }; + var words = function() { + return { type: types.SET, set: WORDS(), not: false }; + }; + var notWords = function() { + return { type: types.SET, set: WORDS(), not: true }; + }; + var ints = function() { + return { type: types.SET, set: INTS(), not: false }; + }; + var notInts = function() { + return { type: types.SET, set: INTS(), not: true }; + }; + var whitespace = function() { + return { type: types.SET, set: WHITESPACE(), not: false }; + }; + var notWhitespace = function() { + return { type: types.SET, set: WHITESPACE(), not: true }; + }; + var anyChar = function() { + return { type: types.SET, set: NOTANYCHAR(), not: true }; + }; + var sets = { + words, + notWords, + ints, + notInts, + whitespace, + notWhitespace, + anyChar + }; + var util = createCommonjsModule(function(module3, exports3) { + var CTRL = "@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^ ?"; + var SLSH = { "0": 0, "t": 9, "n": 10, "v": 11, "f": 12, "r": 13 }; + exports3.strToChars = function(str) { + var chars_regex = /(\[\\b\])|(\\)?\\(?:u([A-F0-9]{4})|x([A-F0-9]{2})|(0?[0-7]{2})|c([@A-Z\[\\\]\^?])|([0tnvfr]))/g; + str = str.replace(chars_regex, function(s, b, lbs, a16, b16, c8, dctrl, eslsh) { + if (lbs) { + return s; + } + var code = b ? 8 : a16 ? parseInt(a16, 16) : b16 ? parseInt(b16, 16) : c8 ? parseInt(c8, 8) : dctrl ? CTRL.indexOf(dctrl) : SLSH[eslsh]; + var c = String.fromCharCode(code); + if (/[\[\]{}\^$.|?*+()]/.test(c)) { + c = "\\" + c; + } + return c; + }); + return str; + }; + exports3.tokenizeClass = function(str, regexpStr) { + var tokens = []; + var regexp = /\\(?:(w)|(d)|(s)|(W)|(D)|(S))|((?:(?:\\)(.)|([^\]\\]))-(?:\\)?([^\]]))|(\])|(?:\\)?(.)/g; + var rs, c; + while ((rs = regexp.exec(str)) != null) { + if (rs[1]) { + tokens.push(sets.words()); + } else if (rs[2]) { + tokens.push(sets.ints()); + } else if (rs[3]) { + tokens.push(sets.whitespace()); + } else if (rs[4]) { + tokens.push(sets.notWords()); + } else if (rs[5]) { + tokens.push(sets.notInts()); + } else if (rs[6]) { + tokens.push(sets.notWhitespace()); + } else if (rs[7]) { + tokens.push({ + type: types.RANGE, + from: (rs[8] || rs[9]).charCodeAt(0), + to: rs[10].charCodeAt(0) + }); + } else if (c = rs[12]) { + tokens.push({ + type: types.CHAR, + value: c.charCodeAt(0) + }); + } else { + return [tokens, regexp.lastIndex]; + } + } + exports3.error(regexpStr, "Unterminated character class"); + }; + exports3.error = function(regexp, msg) { + throw new SyntaxError("Invalid regular expression: /" + regexp + "/: " + msg); + }; + }); + var util_1 = util.strToChars; + var util_2 = util.tokenizeClass; + var util_3 = util.error; + var wordBoundary = function() { + return { type: types.POSITION, value: "b" }; + }; + var nonWordBoundary = function() { + return { type: types.POSITION, value: "B" }; + }; + var begin = function() { + return { type: types.POSITION, value: "^" }; + }; + var end = function() { + return { type: types.POSITION, value: "$" }; + }; + var positions = { + wordBoundary, + nonWordBoundary, + begin, + end + }; + var lib = function(regexpStr) { + var i = 0, l, c, start = { type: types.ROOT, stack: [] }, lastGroup = start, last = start.stack, groupStack = []; + var repeatErr = function(i2) { + util.error(regexpStr, "Nothing to repeat at column " + (i2 - 1)); + }; + var str = util.strToChars(regexpStr); + l = str.length; + while (i < l) { + c = str[i++]; + switch (c) { + case "\\": + c = str[i++]; + switch (c) { + case "b": + last.push(positions.wordBoundary()); + break; + case "B": + last.push(positions.nonWordBoundary()); + break; + case "w": + last.push(sets.words()); + break; + case "W": + last.push(sets.notWords()); + break; + case "d": + last.push(sets.ints()); + break; + case "D": + last.push(sets.notInts()); + break; + case "s": + last.push(sets.whitespace()); + break; + case "S": + last.push(sets.notWhitespace()); + break; + default: + if (/\d/.test(c)) { + last.push({ type: types.REFERENCE, value: parseInt(c, 10) }); + } else { + last.push({ type: types.CHAR, value: c.charCodeAt(0) }); + } + } + break; + case "^": + last.push(positions.begin()); + break; + case "$": + last.push(positions.end()); + break; + case "[": + var not; + if (str[i] === "^") { + not = true; + i++; + } else { + not = false; + } + var classTokens = util.tokenizeClass(str.slice(i), regexpStr); + i += classTokens[1]; + last.push({ + type: types.SET, + set: classTokens[0], + not + }); + break; + case ".": + last.push(sets.anyChar()); + break; + case "(": + var group = { + type: types.GROUP, + stack: [], + remember: true + }; + c = str[i]; + if (c === "?") { + c = str[i + 1]; + i += 2; + if (c === "=") { + group.followedBy = true; + } else if (c === "!") { + group.notFollowedBy = true; + } else if (c !== ":") { + util.error( + regexpStr, + "Invalid group, character '" + c + "' after '?' at column " + (i - 1) + ); + } + group.remember = false; + } + last.push(group); + groupStack.push(lastGroup); + lastGroup = group; + last = group.stack; + break; + case ")": + if (groupStack.length === 0) { + util.error(regexpStr, "Unmatched ) at column " + (i - 1)); + } + lastGroup = groupStack.pop(); + last = lastGroup.options ? lastGroup.options[lastGroup.options.length - 1] : lastGroup.stack; + break; + case "|": + if (!lastGroup.options) { + lastGroup.options = [lastGroup.stack]; + delete lastGroup.stack; + } + var stack = []; + lastGroup.options.push(stack); + last = stack; + break; + case "{": + var rs = /^(\d+)(,(\d+)?)?\}/.exec(str.slice(i)), min, max; + if (rs !== null) { + if (last.length === 0) { + repeatErr(i); + } + min = parseInt(rs[1], 10); + max = rs[2] ? rs[3] ? parseInt(rs[3], 10) : Infinity : min; + i += rs[0].length; + last.push({ + type: types.REPETITION, + min, + max, + value: last.pop() + }); + } else { + last.push({ + type: types.CHAR, + value: 123 + }); + } + break; + case "?": + if (last.length === 0) { + repeatErr(i); + } + last.push({ + type: types.REPETITION, + min: 0, + max: 1, + value: last.pop() + }); + break; + case "+": + if (last.length === 0) { + repeatErr(i); + } + last.push({ + type: types.REPETITION, + min: 1, + max: Infinity, + value: last.pop() + }); + break; + case "*": + if (last.length === 0) { + repeatErr(i); + } + last.push({ + type: types.REPETITION, + min: 0, + max: Infinity, + value: last.pop() + }); + break; + default: + last.push({ + type: types.CHAR, + value: c.charCodeAt(0) + }); + } + } + if (groupStack.length !== 0) { + util.error(regexpStr, "Unterminated group"); + } + return start; + }; + var types_1$1 = types; + lib.types = types_1$1; + function _SubRange(low, high) { + this.low = low; + this.high = high; + this.length = 1 + high - low; + } + _SubRange.prototype.overlaps = function(range) { + return !(this.high < range.low || this.low > range.high); + }; + _SubRange.prototype.touches = function(range) { + return !(this.high + 1 < range.low || this.low - 1 > range.high); + }; + _SubRange.prototype.add = function(range) { + return this.touches(range) && new _SubRange(Math.min(this.low, range.low), Math.max(this.high, range.high)); + }; + _SubRange.prototype.subtract = function(range) { + if (!this.overlaps(range)) return false; + if (range.low <= this.low && range.high >= this.high) return []; + if (range.low > this.low && range.high < this.high) return [new _SubRange(this.low, range.low - 1), new _SubRange(range.high + 1, this.high)]; + if (range.low <= this.low) return [new _SubRange(range.high + 1, this.high)]; + return [new _SubRange(this.low, range.low - 1)]; + }; + _SubRange.prototype.toString = function() { + if (this.low == this.high) return this.low.toString(); + return this.low + "-" + this.high; + }; + _SubRange.prototype.clone = function() { + return new _SubRange(this.low, this.high); + }; + function DiscontinuousRange(a, b) { + if (this instanceof DiscontinuousRange) { + this.ranges = []; + this.length = 0; + if (a !== void 0) this.add(a, b); + } else { + return new DiscontinuousRange(a, b); + } + } + function _update_length(self2) { + self2.length = self2.ranges.reduce(function(previous, range) { + return previous + range.length; + }, 0); + } + DiscontinuousRange.prototype.add = function(a, b) { + var self2 = this; + function _add(subrange) { + var new_ranges = []; + var i = 0; + while (i < self2.ranges.length && !subrange.touches(self2.ranges[i])) { + new_ranges.push(self2.ranges[i].clone()); + i++; + } + while (i < self2.ranges.length && subrange.touches(self2.ranges[i])) { + subrange = subrange.add(self2.ranges[i]); + i++; + } + new_ranges.push(subrange); + while (i < self2.ranges.length) { + new_ranges.push(self2.ranges[i].clone()); + i++; + } + self2.ranges = new_ranges; + _update_length(self2); + } + if (a instanceof DiscontinuousRange) { + a.ranges.forEach(_add); + } else { + if (a instanceof _SubRange) { + _add(a); + } else { + if (b === void 0) b = a; + _add(new _SubRange(a, b)); + } + } + return this; + }; + DiscontinuousRange.prototype.subtract = function(a, b) { + var self2 = this; + function _subtract(subrange) { + var new_ranges = []; + var i = 0; + while (i < self2.ranges.length && !subrange.overlaps(self2.ranges[i])) { + new_ranges.push(self2.ranges[i].clone()); + i++; + } + while (i < self2.ranges.length && subrange.overlaps(self2.ranges[i])) { + new_ranges = new_ranges.concat(self2.ranges[i].subtract(subrange)); + i++; + } + while (i < self2.ranges.length) { + new_ranges.push(self2.ranges[i].clone()); + i++; + } + self2.ranges = new_ranges; + _update_length(self2); + } + if (a instanceof DiscontinuousRange) { + a.ranges.forEach(_subtract); + } else { + if (a instanceof _SubRange) { + _subtract(a); + } else { + if (b === void 0) b = a; + _subtract(new _SubRange(a, b)); + } + } + return this; + }; + DiscontinuousRange.prototype.index = function(index) { + var i = 0; + while (i < this.ranges.length && this.ranges[i].length <= index) { + index -= this.ranges[i].length; + i++; + } + if (i >= this.ranges.length) return null; + return this.ranges[i].low + index; + }; + DiscontinuousRange.prototype.toString = function() { + return "[ " + this.ranges.join(", ") + " ]"; + }; + DiscontinuousRange.prototype.clone = function() { + return new DiscontinuousRange(this); + }; + var discontinuousRange = DiscontinuousRange; + var randexp = createCommonjsModule(function(module3) { + var types2 = lib.types; + function toOtherCase(code) { + return code + (97 <= code && code <= 122 ? -32 : 65 <= code && code <= 90 ? 32 : 0); + } + function randBool() { + return !this.randInt(0, 1); + } + function randSelect(arr) { + if (arr instanceof discontinuousRange) { + return arr.index(this.randInt(0, arr.length - 1)); + } + return arr[this.randInt(0, arr.length - 1)]; + } + function expand2(token) { + if (token.type === lib.types.CHAR) { + return new discontinuousRange(token.value); + } else if (token.type === lib.types.RANGE) { + return new discontinuousRange(token.from, token.to); + } else { + var drange = new discontinuousRange(); + for (var i = 0; i < token.set.length; i++) { + var subrange = expand2.call(this, token.set[i]); + drange.add(subrange); + if (this.ignoreCase) { + for (var j = 0; j < subrange.length; j++) { + var code = subrange.index(j); + var otherCaseCode = toOtherCase(code); + if (code !== otherCaseCode) { + drange.add(otherCaseCode); + } + } + } + } + if (token.not) { + return this.defaultRange.clone().subtract(drange); + } else { + return drange; + } + } + } + function checkCustom(randexp2, regexp) { + if (typeof regexp.max === "number") { + randexp2.max = regexp.max; + } + if (regexp.defaultRange instanceof discontinuousRange) { + randexp2.defaultRange = regexp.defaultRange; + } + if (typeof regexp.randInt === "function") { + randexp2.randInt = regexp.randInt; + } + } + var RandExp2 = module3.exports = function(regexp, m) { + this.defaultRange = this.defaultRange.clone(); + if (regexp instanceof RegExp) { + this.ignoreCase = regexp.ignoreCase; + this.multiline = regexp.multiline; + checkCustom(this, regexp); + regexp = regexp.source; + } else if (typeof regexp === "string") { + this.ignoreCase = m && m.indexOf("i") !== -1; + this.multiline = m && m.indexOf("m") !== -1; + } else { + throw new Error("Expected a regexp or string"); + } + this.tokens = lib(regexp); + }; + RandExp2.prototype.max = 100; + RandExp2.prototype.gen = function() { + return gen.call(this, this.tokens, []); + }; + RandExp2.randexp = function(regexp, m) { + var randexp2; + if (regexp._randexp === void 0) { + randexp2 = new RandExp2(regexp, m); + regexp._randexp = randexp2; + } else { + randexp2 = regexp._randexp; + } + checkCustom(randexp2, regexp); + return randexp2.gen(); + }; + RandExp2.sugar = function() { + RegExp.prototype.gen = function() { + return RandExp2.randexp(this); + }; + }; + RandExp2.prototype.defaultRange = new discontinuousRange(32, 126); + RandExp2.prototype.randInt = function(a, b) { + return a + Math.floor(Math.random() * (1 + b - a)); + }; + function gen(token, groups) { + var stack, str, n, i, l; + switch (token.type) { + case types2.ROOT: + case types2.GROUP: + if (token.followedBy || token.notFollowedBy) { + return ""; + } + if (token.remember && token.groupNumber === void 0) { + token.groupNumber = groups.push(null) - 1; + } + stack = token.options ? randSelect.call(this, token.options) : token.stack; + str = ""; + for (i = 0, l = stack.length; i < l; i++) { + str += gen.call(this, stack[i], groups); + } + if (token.remember) { + groups[token.groupNumber] = str; + } + return str; + case types2.POSITION: + return ""; + case types2.SET: + var expandedSet = expand2.call(this, token); + if (!expandedSet.length) { + return ""; + } + return String.fromCharCode(randSelect.call(this, expandedSet)); + case types2.REPETITION: + n = this.randInt( + token.min, + token.max === Infinity ? token.min + this.max : token.max + ); + str = ""; + for (i = 0; i < n; i++) { + str += gen.call(this, token.value, groups); + } + return str; + case types2.REFERENCE: + return groups[token.value - 1] || ""; + case types2.CHAR: + var code = this.ignoreCase && randBool.call(this) ? toOtherCase(token.value) : token.value; + return String.fromCharCode(code); + } + } + }); + function URLUtils(url, baseURL) { + url = url.replace(/^\.\//, ""); + var m = String(url).replace(/^\s+|\s+$/g, "").match(/^([^:\/?#]+:)?(?:\/\/(?:([^:@]*)(?::([^:@]*))?@)?(([^:\/?#]*)(?::(\d*))?))?([^?#]*)(\?[^#]*)?(#[\s\S]*)?/); + if (!m) { + throw new RangeError(); + } + var href = m[0] || ""; + var protocol = m[1] || ""; + var username = m[2] || ""; + var password = m[3] || ""; + var host = m[4] || ""; + var hostname = m[5] || ""; + var port = m[6] || ""; + var pathname = m[7] || ""; + var search = m[8] || ""; + var hash2 = m[9] || ""; + if (baseURL !== void 0) { + var base = new URLUtils(baseURL); + var flag = protocol === "" && host === "" && username === ""; + if (flag && pathname === "" && search === "") { + search = base.search; + } + if (flag && pathname.charAt(0) !== "/") { + pathname = pathname !== "" ? base.pathname.slice(0, base.pathname.lastIndexOf("/") + 1) + pathname : base.pathname; + } + var output = []; + pathname.replace(/\/?[^\/]+/g, function(p) { + if (p === "/..") { + output.pop(); + } else { + output.push(p); + } + }); + pathname = output.join("") || "/"; + if (flag) { + port = base.port; + hostname = base.hostname; + host = base.host; + password = base.password; + username = base.username; + } + if (protocol === "") { + protocol = base.protocol; + } + href = protocol + (host !== "" ? "//" : "") + (username !== "" ? username + (password !== "" ? ":" + password : "") + "@" : "") + host + pathname + search + hash2; + } + this.href = href; + this.origin = protocol + (host !== "" ? "//" + host : ""); + this.protocol = protocol; + this.username = username; + this.password = password; + this.host = host; + this.hostname = hostname; + this.port = port; + this.pathname = pathname; + this.search = search; + this.hash = hash2; + } + function isURL(path) { + if (typeof path === "string" && /^\w+:\/\//.test(path)) { + return true; + } + } + function parseURI(href, base) { + return new URLUtils(href, base); + } + function resolveURL(base, href) { + base = base || "http://json-schema.org/schema#"; + href = parseURI(href, base); + base = parseURI(base); + if (base.hash && !href.hash) { + return href.href + base.hash; + } + return href.href; + } + function getDocumentURI(uri) { + return typeof uri === "string" && uri.split("#")[0]; + } + function isKeyword(prop) { + return prop === "enum" || prop === "default" || prop === "required"; + } + var helpers = { + isURL, + parseURI, + isKeyword, + resolveURL, + getDocumentURI + }; + var findReference = createCommonjsModule(function(module3) { + function get(obj, path) { + var hash2 = path.split("#")[1]; + var parts = hash2.split("/").slice(1); + while (parts.length) { + var key = decodeURIComponent(parts.shift()).replace(/~1/g, "/").replace(/~0/g, "~"); + if (typeof obj[key] === "undefined") { + throw new Error("JSON pointer not found: " + path); + } + obj = obj[key]; + } + return obj; + } + var find = module3.exports = function(id, refs, filter) { + var target = refs[id] || refs[id.split("#")[1]] || refs[helpers.getDocumentURI(id)]; + try { + if (target) { + target = id.indexOf("#/") > -1 ? get(target, id) : target; + } else { + for (var key in refs) { + if (helpers.resolveURL(refs[key].id, id) === refs[key].id) { + target = refs[key]; + break; + } + } + } + } catch (e) { + if (typeof filter === "function") { + target = filter(id, refs); + } else { + throw e; + } + } + if (!target) { + throw new Error("Reference not found: " + id); + } + while (target.$ref) { + target = find(target.$ref, refs); + } + return target; + }; + }); + var deepExtend_1 = createCommonjsModule(function(module3) { + function isSpecificValue(val) { + return val instanceof Buffer || val instanceof Date || val instanceof RegExp ? true : false; + } + function cloneSpecificValue(val) { + if (val instanceof Buffer) { + var x = new Buffer(val.length); + val.copy(x); + return x; + } else if (val instanceof Date) { + return new Date(val.getTime()); + } else if (val instanceof RegExp) { + return new RegExp(val); + } else { + throw new Error("Unexpected situation"); + } + } + function deepCloneArray(arr) { + var clone = []; + arr.forEach(function(item, index) { + if (typeof item === "object" && item !== null) { + if (Array.isArray(item)) { + clone[index] = deepCloneArray(item); + } else if (isSpecificValue(item)) { + clone[index] = cloneSpecificValue(item); + } else { + clone[index] = deepExtend({}, item); + } + } else { + clone[index] = item; + } + }); + return clone; + } + var deepExtend = module3.exports = function() { + if (arguments.length < 1 || typeof arguments[0] !== "object") { + return false; + } + if (arguments.length < 2) { + return arguments[0]; + } + var target = arguments[0]; + var args = Array.prototype.slice.call(arguments, 1); + var val, src; + args.forEach(function(obj) { + if (typeof obj !== "object" || obj === null || Array.isArray(obj)) { + return; + } + Object.keys(obj).forEach(function(key) { + src = target[key]; + val = obj[key]; + if (val === target) { + return; + } else if (typeof val !== "object" || val === null) { + target[key] = val; + return; + } else if (Array.isArray(val)) { + target[key] = deepCloneArray(val); + return; + } else if (isSpecificValue(val)) { + target[key] = cloneSpecificValue(val); + return; + } else if (typeof src !== "object" || src === null || Array.isArray(src)) { + target[key] = deepExtend({}, val); + return; + } else { + target[key] = deepExtend(src, val); + return; + } + }); + }); + return target; + }; + }); + function copy(_3, obj, refs, parent, resolve2, callback) { + var target = Array.isArray(obj) ? [] : {}; + if (typeof obj.$ref === "string") { + var id = obj.$ref; + var base = helpers.getDocumentURI(id); + var local = id.indexOf("#/") > -1; + if (local || resolve2 && base !== parent) { + var fixed = findReference(id, refs, callback); + deepExtend_1(obj, fixed); + delete obj.$ref; + delete obj.id; + } + if (_3[id]) { + return obj; + } + _3[id] = 1; + } + for (var prop in obj) { + if (typeof obj[prop] === "object" && obj[prop] !== null && !helpers.isKeyword(prop)) { + target[prop] = copy(_3, obj[prop], refs, parent, resolve2, callback); + } else { + target[prop] = obj[prop]; + } + } + return target; + } + var resolveSchema = function(obj, refs, resolve2, callback) { + var fixedId = helpers.resolveURL(obj.$schema, obj.id), parent = helpers.getDocumentURI(fixedId); + return copy({}, obj, refs, parent, resolve2, callback); + }; + var cloneObj = createCommonjsModule(function(module3) { + var clone = module3.exports = function(obj, seen) { + seen = seen || []; + if (seen.indexOf(obj) > -1) { + throw new Error("unable dereference circular structures"); + } + if (!obj || typeof obj !== "object") { + return obj; + } + seen = seen.concat([obj]); + var target = Array.isArray(obj) ? [] : {}; + function copy2(key, value) { + target[key] = clone(value, seen); + } + if (Array.isArray(target)) { + obj.forEach(function(value, key) { + copy2(key, value); + }); + } else if (Object.prototype.toString.call(obj) === "[object Object]") { + Object.keys(obj).forEach(function(key) { + copy2(key, obj[key]); + }); + } + return target; + }; + }); + var SCHEMA_URI = [ + "http://json-schema.org/schema#", + "http://json-schema.org/draft-04/schema#" + ]; + function expand(obj, parent, callback) { + if (obj) { + var id = typeof obj.id === "string" ? obj.id : "#"; + if (!helpers.isURL(id)) { + id = helpers.resolveURL(parent === id ? null : parent, id); + } + if (typeof obj.$ref === "string" && !helpers.isURL(obj.$ref)) { + obj.$ref = helpers.resolveURL(id, obj.$ref); + } + if (typeof obj.id === "string") { + obj.id = parent = id; + } + } + for (var key in obj) { + var value = obj[key]; + if (typeof value === "object" && value !== null && !helpers.isKeyword(key)) { + expand(value, parent, callback); + } + } + if (typeof callback === "function") { + callback(obj); + } + } + var normalizeSchema = function(fakeroot, schema2, push) { + if (typeof fakeroot === "object") { + push = schema2; + schema2 = fakeroot; + fakeroot = null; + } + var base = fakeroot || "", copy2 = cloneObj(schema2); + if (copy2.$schema && SCHEMA_URI.indexOf(copy2.$schema) === -1) { + throw new Error("Unsupported schema version (v4 only)"); + } + base = helpers.resolveURL(copy2.$schema || SCHEMA_URI[0], base); + expand(copy2, helpers.resolveURL(copy2.id || "#", base), push); + copy2.id = copy2.id || base; + return copy2; + }; + var lib$1 = createCommonjsModule(function(module3) { + helpers.findByRef = findReference; + helpers.resolveSchema = resolveSchema; + helpers.normalizeSchema = normalizeSchema; + var instance = module3.exports = function(f) { + function $ref(fakeroot, schema2, refs, ex) { + if (typeof fakeroot === "object") { + ex = refs; + refs = schema2; + schema2 = fakeroot; + fakeroot = void 0; + } + if (typeof schema2 !== "object") { + throw new Error("schema must be an object"); + } + if (typeof refs === "object" && refs !== null) { + var aux = refs; + refs = []; + for (var k in aux) { + aux[k].id = aux[k].id || k; + refs.push(aux[k]); + } + } + if (typeof refs !== "undefined" && !Array.isArray(refs)) { + ex = !!refs; + refs = []; + } + function push(ref) { + if (typeof ref.id === "string") { + var id = helpers.resolveURL(fakeroot, ref.id).replace(/\/#?$/, ""); + if (id.indexOf("#") > -1) { + var parts = id.split("#"); + if (parts[1].charAt() === "/") { + id = parts[0]; + } else { + id = parts[1] || parts[0]; + } + } + if (!$ref.refs[id]) { + $ref.refs[id] = ref; + } + } + } + (refs || []).concat([schema2]).forEach(function(ref) { + schema2 = helpers.normalizeSchema(fakeroot, ref, push); + push(schema2); + }); + return helpers.resolveSchema(schema2, $ref.refs, ex, f); + } + $ref.refs = {}; + $ref.util = helpers; + return $ref; + }; + instance.util = helpers; + }); + var jsonpath = createCommonjsModule(function(module3, exports3) { + (function(f) { + { + module3.exports = f(); + } + })(function() { + var define2; + return function e(t, n, r) { + function s(o2, u) { + if (!n[o2]) { + if (!t[o2]) { + var a = typeof commonjsRequire == "function" && commonjsRequire; + if (!u && a) return a(o2, true); + if (i) return i(o2, true); + var f = new Error("Cannot find module '" + o2 + "'"); + throw f.code = "MODULE_NOT_FOUND", f; + } + var l = n[o2] = { exports: {} }; + t[o2][0].call(l.exports, function(e2) { + var n2 = t[o2][1][e2]; + return s(n2 ? n2 : e2); + }, l, l.exports, e, t, n, r); + } + return n[o2].exports; + } + var i = typeof commonjsRequire == "function" && commonjsRequire; + for (var o = 0; o < r.length; o++) s(r[o]); + return s; + }({ "./aesprim": [function(require2, module4, exports4) { + (function(root, factory) { + if (typeof define2 === "function" && define2.amd) { + define2(["exports"], factory); + } else if (typeof exports4 !== "undefined") { + factory(exports4); + } else { + factory(root.esprima = {}); + } + })(this, function(exports5) { + var Token, TokenName, FnExprTokens, Syntax, PropertyKind, Messages, Regex, SyntaxTreeDelegate, source, strict, index, lineNumber, lineStart, length, delegate, lookahead, state, extra; + Token = { + BooleanLiteral: 1, + EOF: 2, + Identifier: 3, + Keyword: 4, + NullLiteral: 5, + NumericLiteral: 6, + Punctuator: 7, + StringLiteral: 8, + RegularExpression: 9 + }; + TokenName = {}; + TokenName[Token.BooleanLiteral] = "Boolean"; + TokenName[Token.EOF] = ""; + TokenName[Token.Identifier] = "Identifier"; + TokenName[Token.Keyword] = "Keyword"; + TokenName[Token.NullLiteral] = "Null"; + TokenName[Token.NumericLiteral] = "Numeric"; + TokenName[Token.Punctuator] = "Punctuator"; + TokenName[Token.StringLiteral] = "String"; + TokenName[Token.RegularExpression] = "RegularExpression"; + FnExprTokens = [ + "(", + "{", + "[", + "in", + "typeof", + "instanceof", + "new", + "return", + "case", + "delete", + "throw", + "void", + // assignment operators + "=", + "+=", + "-=", + "*=", + "/=", + "%=", + "<<=", + ">>=", + ">>>=", + "&=", + "|=", + "^=", + ",", + // binary/unary operators + "+", + "-", + "*", + "/", + "%", + "++", + "--", + "<<", + ">>", + ">>>", + "&", + "|", + "^", + "!", + "~", + "&&", + "||", + "?", + ":", + "===", + "==", + ">=", + "<=", + "<", + ">", + "!=", + "!==" + ]; + Syntax = { + AssignmentExpression: "AssignmentExpression", + ArrayExpression: "ArrayExpression", + BlockStatement: "BlockStatement", + BinaryExpression: "BinaryExpression", + BreakStatement: "BreakStatement", + CallExpression: "CallExpression", + CatchClause: "CatchClause", + ConditionalExpression: "ConditionalExpression", + ContinueStatement: "ContinueStatement", + DoWhileStatement: "DoWhileStatement", + DebuggerStatement: "DebuggerStatement", + EmptyStatement: "EmptyStatement", + ExpressionStatement: "ExpressionStatement", + ForStatement: "ForStatement", + ForInStatement: "ForInStatement", + FunctionDeclaration: "FunctionDeclaration", + FunctionExpression: "FunctionExpression", + Identifier: "Identifier", + IfStatement: "IfStatement", + Literal: "Literal", + LabeledStatement: "LabeledStatement", + LogicalExpression: "LogicalExpression", + MemberExpression: "MemberExpression", + NewExpression: "NewExpression", + ObjectExpression: "ObjectExpression", + Program: "Program", + Property: "Property", + ReturnStatement: "ReturnStatement", + SequenceExpression: "SequenceExpression", + SwitchStatement: "SwitchStatement", + SwitchCase: "SwitchCase", + ThisExpression: "ThisExpression", + ThrowStatement: "ThrowStatement", + TryStatement: "TryStatement", + UnaryExpression: "UnaryExpression", + UpdateExpression: "UpdateExpression", + VariableDeclaration: "VariableDeclaration", + VariableDeclarator: "VariableDeclarator", + WhileStatement: "WhileStatement", + WithStatement: "WithStatement" + }; + PropertyKind = { + Data: 1, + Get: 2, + Set: 4 + }; + Messages = { + UnexpectedToken: "Unexpected token %0", + UnexpectedNumber: "Unexpected number", + UnexpectedString: "Unexpected string", + UnexpectedIdentifier: "Unexpected identifier", + UnexpectedReserved: "Unexpected reserved word", + UnexpectedEOS: "Unexpected end of input", + NewlineAfterThrow: "Illegal newline after throw", + InvalidRegExp: "Invalid regular expression", + UnterminatedRegExp: "Invalid regular expression: missing /", + InvalidLHSInAssignment: "Invalid left-hand side in assignment", + InvalidLHSInForIn: "Invalid left-hand side in for-in", + MultipleDefaultsInSwitch: "More than one default clause in switch statement", + NoCatchOrFinally: "Missing catch or finally after try", + UnknownLabel: "Undefined label '%0'", + Redeclaration: "%0 '%1' has already been declared", + IllegalContinue: "Illegal continue statement", + IllegalBreak: "Illegal break statement", + IllegalReturn: "Illegal return statement", + StrictModeWith: "Strict mode code may not include a with statement", + StrictCatchVariable: "Catch variable may not be eval or arguments in strict mode", + StrictVarName: "Variable name may not be eval or arguments in strict mode", + StrictParamName: "Parameter name eval or arguments is not allowed in strict mode", + StrictParamDupe: "Strict mode function may not have duplicate parameter names", + StrictFunctionName: "Function name may not be eval or arguments in strict mode", + StrictOctalLiteral: "Octal literals are not allowed in strict mode.", + StrictDelete: "Delete of an unqualified identifier in strict mode.", + StrictDuplicateProperty: "Duplicate data property in object literal not allowed in strict mode", + AccessorDataProperty: "Object literal may not have data and accessor property with the same name", + AccessorGetSet: "Object literal may not have multiple get/set accessors with the same name", + StrictLHSAssignment: "Assignment to eval or arguments is not allowed in strict mode", + StrictLHSPostfix: "Postfix increment/decrement may not have eval or arguments operand in strict mode", + StrictLHSPrefix: "Prefix increment/decrement may not have eval or arguments operand in strict mode", + StrictReservedWord: "Use of future reserved word in strict mode" + }; + Regex = { + NonAsciiIdentifierStart: new RegExp("[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F0\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]"), + NonAsciiIdentifierPart: new RegExp("[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0\u08A2-\u08AC\u08E4-\u08FE\u0900-\u0963\u0966-\u096F\u0971-\u0977\u0979-\u097F\u0981-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C01-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58\u0C59\u0C60-\u0C63\u0C66-\u0C6F\u0C82\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D02\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D60-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F0\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191C\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1D00-\u1DE6\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA697\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7B\uAA80-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE26\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]") + }; + function assert(condition, message) { + if (!condition) { + throw new Error("ASSERT: " + message); + } + } + function isDecimalDigit(ch) { + return ch >= 48 && ch <= 57; + } + function isHexDigit(ch) { + return "0123456789abcdefABCDEF".indexOf(ch) >= 0; + } + function isOctalDigit(ch) { + return "01234567".indexOf(ch) >= 0; + } + function isWhiteSpace(ch) { + return ch === 32 || ch === 9 || ch === 11 || ch === 12 || ch === 160 || ch >= 5760 && [5760, 6158, 8192, 8193, 8194, 8195, 8196, 8197, 8198, 8199, 8200, 8201, 8202, 8239, 8287, 12288, 65279].indexOf(ch) >= 0; + } + function isLineTerminator(ch) { + return ch === 10 || ch === 13 || ch === 8232 || ch === 8233; + } + function isIdentifierStart(ch) { + return ch == 64 || ch === 36 || ch === 95 || // $ (dollar) and _ (underscore) + ch >= 65 && ch <= 90 || // A..Z + ch >= 97 && ch <= 122 || // a..z + ch === 92 || // \ (backslash) + ch >= 128 && Regex.NonAsciiIdentifierStart.test(String.fromCharCode(ch)); + } + function isIdentifierPart(ch) { + return ch === 36 || ch === 95 || // $ (dollar) and _ (underscore) + ch >= 65 && ch <= 90 || // A..Z + ch >= 97 && ch <= 122 || // a..z + ch >= 48 && ch <= 57 || // 0..9 + ch === 92 || // \ (backslash) + ch >= 128 && Regex.NonAsciiIdentifierPart.test(String.fromCharCode(ch)); + } + function isFutureReservedWord(id) { + switch (id) { + case "class": + case "enum": + case "export": + case "extends": + case "import": + case "super": + return true; + default: + return false; + } + } + function isStrictModeReservedWord(id) { + switch (id) { + case "implements": + case "interface": + case "package": + case "private": + case "protected": + case "public": + case "static": + case "yield": + case "let": + return true; + default: + return false; + } + } + function isRestrictedWord(id) { + return id === "eval" || id === "arguments"; + } + function isKeyword2(id) { + if (strict && isStrictModeReservedWord(id)) { + return true; + } + switch (id.length) { + case 2: + return id === "if" || id === "in" || id === "do"; + case 3: + return id === "var" || id === "for" || id === "new" || id === "try" || id === "let"; + case 4: + return id === "this" || id === "else" || id === "case" || id === "void" || id === "with" || id === "enum"; + case 5: + return id === "while" || id === "break" || id === "catch" || id === "throw" || id === "const" || id === "yield" || id === "class" || id === "super"; + case 6: + return id === "return" || id === "typeof" || id === "delete" || id === "switch" || id === "export" || id === "import"; + case 7: + return id === "default" || id === "finally" || id === "extends"; + case 8: + return id === "function" || id === "continue" || id === "debugger"; + case 10: + return id === "instanceof"; + default: + return false; + } + } + function addComment(type, value, start, end2, loc) { + var comment; + assert(typeof start === "number", "Comment must have valid position"); + if (state.lastCommentStart >= start) { + return; + } + state.lastCommentStart = start; + comment = { + type, + value + }; + if (extra.range) { + comment.range = [start, end2]; + } + if (extra.loc) { + comment.loc = loc; + } + extra.comments.push(comment); + if (extra.attachComment) { + extra.leadingComments.push(comment); + extra.trailingComments.push(comment); + } + } + function skipSingleLineComment(offset) { + var start, loc, ch, comment; + start = index - offset; + loc = { + start: { + line: lineNumber, + column: index - lineStart - offset + } + }; + while (index < length) { + ch = source.charCodeAt(index); + ++index; + if (isLineTerminator(ch)) { + if (extra.comments) { + comment = source.slice(start + offset, index - 1); + loc.end = { + line: lineNumber, + column: index - lineStart - 1 + }; + addComment("Line", comment, start, index - 1, loc); + } + if (ch === 13 && source.charCodeAt(index) === 10) { + ++index; + } + ++lineNumber; + lineStart = index; + return; + } + } + if (extra.comments) { + comment = source.slice(start + offset, index); + loc.end = { + line: lineNumber, + column: index - lineStart + }; + addComment("Line", comment, start, index, loc); + } + } + function skipMultiLineComment() { + var start, loc, ch, comment; + if (extra.comments) { + start = index - 2; + loc = { + start: { + line: lineNumber, + column: index - lineStart - 2 + } + }; + } + while (index < length) { + ch = source.charCodeAt(index); + if (isLineTerminator(ch)) { + if (ch === 13 && source.charCodeAt(index + 1) === 10) { + ++index; + } + ++lineNumber; + ++index; + lineStart = index; + if (index >= length) { + throwError({}, Messages.UnexpectedToken, "ILLEGAL"); + } + } else if (ch === 42) { + if (source.charCodeAt(index + 1) === 47) { + ++index; + ++index; + if (extra.comments) { + comment = source.slice(start + 2, index - 2); + loc.end = { + line: lineNumber, + column: index - lineStart + }; + addComment("Block", comment, start, index, loc); + } + return; + } + ++index; + } else { + ++index; + } + } + throwError({}, Messages.UnexpectedToken, "ILLEGAL"); + } + function skipComment() { + var ch, start; + start = index === 0; + while (index < length) { + ch = source.charCodeAt(index); + if (isWhiteSpace(ch)) { + ++index; + } else if (isLineTerminator(ch)) { + ++index; + if (ch === 13 && source.charCodeAt(index) === 10) { + ++index; + } + ++lineNumber; + lineStart = index; + start = true; + } else if (ch === 47) { + ch = source.charCodeAt(index + 1); + if (ch === 47) { + ++index; + ++index; + skipSingleLineComment(2); + start = true; + } else if (ch === 42) { + ++index; + ++index; + skipMultiLineComment(); + } else { + break; + } + } else if (start && ch === 45) { + if (source.charCodeAt(index + 1) === 45 && source.charCodeAt(index + 2) === 62) { + index += 3; + skipSingleLineComment(3); + } else { + break; + } + } else if (ch === 60) { + if (source.slice(index + 1, index + 4) === "!--") { + ++index; + ++index; + ++index; + ++index; + skipSingleLineComment(4); + } else { + break; + } + } else { + break; + } + } + } + function scanHexEscape(prefix) { + var i, len, ch, code = 0; + len = prefix === "u" ? 4 : 2; + for (i = 0; i < len; ++i) { + if (index < length && isHexDigit(source[index])) { + ch = source[index++]; + code = code * 16 + "0123456789abcdef".indexOf(ch.toLowerCase()); + } else { + return ""; + } + } + return String.fromCharCode(code); + } + function getEscapedIdentifier() { + var ch, id; + ch = source.charCodeAt(index++); + id = String.fromCharCode(ch); + if (ch === 92) { + if (source.charCodeAt(index) !== 117) { + throwError({}, Messages.UnexpectedToken, "ILLEGAL"); + } + ++index; + ch = scanHexEscape("u"); + if (!ch || ch === "\\" || !isIdentifierStart(ch.charCodeAt(0))) { + throwError({}, Messages.UnexpectedToken, "ILLEGAL"); + } + id = ch; + } + while (index < length) { + ch = source.charCodeAt(index); + if (!isIdentifierPart(ch)) { + break; + } + ++index; + id += String.fromCharCode(ch); + if (ch === 92) { + id = id.substr(0, id.length - 1); + if (source.charCodeAt(index) !== 117) { + throwError({}, Messages.UnexpectedToken, "ILLEGAL"); + } + ++index; + ch = scanHexEscape("u"); + if (!ch || ch === "\\" || !isIdentifierPart(ch.charCodeAt(0))) { + throwError({}, Messages.UnexpectedToken, "ILLEGAL"); + } + id += ch; + } + } + return id; + } + function getIdentifier() { + var start, ch; + start = index++; + while (index < length) { + ch = source.charCodeAt(index); + if (ch === 92) { + index = start; + return getEscapedIdentifier(); + } + if (isIdentifierPart(ch)) { + ++index; + } else { + break; + } + } + return source.slice(start, index); + } + function scanIdentifier() { + var start, id, type; + start = index; + id = source.charCodeAt(index) === 92 ? getEscapedIdentifier() : getIdentifier(); + if (id.length === 1) { + type = Token.Identifier; + } else if (isKeyword2(id)) { + type = Token.Keyword; + } else if (id === "null") { + type = Token.NullLiteral; + } else if (id === "true" || id === "false") { + type = Token.BooleanLiteral; + } else { + type = Token.Identifier; + } + return { + type, + value: id, + lineNumber, + lineStart, + start, + end: index + }; + } + function scanPunctuator() { + var start = index, code = source.charCodeAt(index), code2, ch1 = source[index], ch2, ch3, ch4; + switch (code) { + case 46: + case 40: + case 41: + case 59: + case 44: + case 123: + case 125: + case 91: + case 93: + case 58: + case 63: + case 126: + ++index; + if (extra.tokenize) { + if (code === 40) { + extra.openParenToken = extra.tokens.length; + } else if (code === 123) { + extra.openCurlyToken = extra.tokens.length; + } + } + return { + type: Token.Punctuator, + value: String.fromCharCode(code), + lineNumber, + lineStart, + start, + end: index + }; + default: + code2 = source.charCodeAt(index + 1); + if (code2 === 61) { + switch (code) { + case 43: + case 45: + case 47: + case 60: + case 62: + case 94: + case 124: + case 37: + case 38: + case 42: + index += 2; + return { + type: Token.Punctuator, + value: String.fromCharCode(code) + String.fromCharCode(code2), + lineNumber, + lineStart, + start, + end: index + }; + case 33: + case 61: + index += 2; + if (source.charCodeAt(index) === 61) { + ++index; + } + return { + type: Token.Punctuator, + value: source.slice(start, index), + lineNumber, + lineStart, + start, + end: index + }; + } + } + } + ch4 = source.substr(index, 4); + if (ch4 === ">>>=") { + index += 4; + return { + type: Token.Punctuator, + value: ch4, + lineNumber, + lineStart, + start, + end: index + }; + } + ch3 = ch4.substr(0, 3); + if (ch3 === ">>>" || ch3 === "<<=" || ch3 === ">>=") { + index += 3; + return { + type: Token.Punctuator, + value: ch3, + lineNumber, + lineStart, + start, + end: index + }; + } + ch2 = ch3.substr(0, 2); + if (ch1 === ch2[1] && "+-<>&|".indexOf(ch1) >= 0 || ch2 === "=>") { + index += 2; + return { + type: Token.Punctuator, + value: ch2, + lineNumber, + lineStart, + start, + end: index + }; + } + if ("<>=!+-*%&|^/".indexOf(ch1) >= 0) { + ++index; + return { + type: Token.Punctuator, + value: ch1, + lineNumber, + lineStart, + start, + end: index + }; + } + throwError({}, Messages.UnexpectedToken, "ILLEGAL"); + } + function scanHexLiteral(start) { + var number2 = ""; + while (index < length) { + if (!isHexDigit(source[index])) { + break; + } + number2 += source[index++]; + } + if (number2.length === 0) { + throwError({}, Messages.UnexpectedToken, "ILLEGAL"); + } + if (isIdentifierStart(source.charCodeAt(index))) { + throwError({}, Messages.UnexpectedToken, "ILLEGAL"); + } + return { + type: Token.NumericLiteral, + value: parseInt("0x" + number2, 16), + lineNumber, + lineStart, + start, + end: index + }; + } + function scanOctalLiteral(start) { + var number2 = "0" + source[index++]; + while (index < length) { + if (!isOctalDigit(source[index])) { + break; + } + number2 += source[index++]; + } + if (isIdentifierStart(source.charCodeAt(index)) || isDecimalDigit(source.charCodeAt(index))) { + throwError({}, Messages.UnexpectedToken, "ILLEGAL"); + } + return { + type: Token.NumericLiteral, + value: parseInt(number2, 8), + octal: true, + lineNumber, + lineStart, + start, + end: index + }; + } + function scanNumericLiteral() { + var number2, start, ch; + ch = source[index]; + assert( + isDecimalDigit(ch.charCodeAt(0)) || ch === ".", + "Numeric literal must start with a decimal digit or a decimal point" + ); + start = index; + number2 = ""; + if (ch !== ".") { + number2 = source[index++]; + ch = source[index]; + if (number2 === "0") { + if (ch === "x" || ch === "X") { + ++index; + return scanHexLiteral(start); + } + if (isOctalDigit(ch)) { + return scanOctalLiteral(start); + } + if (ch && isDecimalDigit(ch.charCodeAt(0))) { + throwError({}, Messages.UnexpectedToken, "ILLEGAL"); + } + } + while (isDecimalDigit(source.charCodeAt(index))) { + number2 += source[index++]; + } + ch = source[index]; + } + if (ch === ".") { + number2 += source[index++]; + while (isDecimalDigit(source.charCodeAt(index))) { + number2 += source[index++]; + } + ch = source[index]; + } + if (ch === "e" || ch === "E") { + number2 += source[index++]; + ch = source[index]; + if (ch === "+" || ch === "-") { + number2 += source[index++]; + } + if (isDecimalDigit(source.charCodeAt(index))) { + while (isDecimalDigit(source.charCodeAt(index))) { + number2 += source[index++]; + } + } else { + throwError({}, Messages.UnexpectedToken, "ILLEGAL"); + } + } + if (isIdentifierStart(source.charCodeAt(index))) { + throwError({}, Messages.UnexpectedToken, "ILLEGAL"); + } + return { + type: Token.NumericLiteral, + value: parseFloat(number2), + lineNumber, + lineStart, + start, + end: index + }; + } + function scanStringLiteral() { + var str = "", quote, start, ch, code, unescaped, restore, octal = false, startLineNumber, startLineStart; + startLineNumber = lineNumber; + startLineStart = lineStart; + quote = source[index]; + assert( + quote === "'" || quote === '"', + "String literal must starts with a quote" + ); + start = index; + ++index; + while (index < length) { + ch = source[index++]; + if (ch === quote) { + quote = ""; + break; + } else if (ch === "\\") { + ch = source[index++]; + if (!ch || !isLineTerminator(ch.charCodeAt(0))) { + switch (ch) { + case "u": + case "x": + restore = index; + unescaped = scanHexEscape(ch); + if (unescaped) { + str += unescaped; + } else { + index = restore; + str += ch; + } + break; + case "n": + str += "\n"; + break; + case "r": + str += "\r"; + break; + case "t": + str += " "; + break; + case "b": + str += "\b"; + break; + case "f": + str += "\f"; + break; + case "v": + str += "\v"; + break; + default: + if (isOctalDigit(ch)) { + code = "01234567".indexOf(ch); + if (code !== 0) { + octal = true; + } + if (index < length && isOctalDigit(source[index])) { + octal = true; + code = code * 8 + "01234567".indexOf(source[index++]); + if ("0123".indexOf(ch) >= 0 && index < length && isOctalDigit(source[index])) { + code = code * 8 + "01234567".indexOf(source[index++]); + } + } + str += String.fromCharCode(code); + } else { + str += ch; + } + break; + } + } else { + ++lineNumber; + if (ch === "\r" && source[index] === "\n") { + ++index; + } + lineStart = index; + } + } else if (isLineTerminator(ch.charCodeAt(0))) { + break; + } else { + str += ch; + } + } + if (quote !== "") { + throwError({}, Messages.UnexpectedToken, "ILLEGAL"); + } + return { + type: Token.StringLiteral, + value: str, + octal, + startLineNumber, + startLineStart, + lineNumber, + lineStart, + start, + end: index + }; + } + function testRegExp(pattern, flags) { + var value; + try { + value = new RegExp(pattern, flags); + } catch (e) { + throwError({}, Messages.InvalidRegExp); + } + return value; + } + function scanRegExpBody() { + var ch, str, classMarker, terminated, body; + ch = source[index]; + assert(ch === "/", "Regular expression literal must start with a slash"); + str = source[index++]; + classMarker = false; + terminated = false; + while (index < length) { + ch = source[index++]; + str += ch; + if (ch === "\\") { + ch = source[index++]; + if (isLineTerminator(ch.charCodeAt(0))) { + throwError({}, Messages.UnterminatedRegExp); + } + str += ch; + } else if (isLineTerminator(ch.charCodeAt(0))) { + throwError({}, Messages.UnterminatedRegExp); + } else if (classMarker) { + if (ch === "]") { + classMarker = false; + } + } else { + if (ch === "/") { + terminated = true; + break; + } else if (ch === "[") { + classMarker = true; + } + } + } + if (!terminated) { + throwError({}, Messages.UnterminatedRegExp); + } + body = str.substr(1, str.length - 2); + return { + value: body, + literal: str + }; + } + function scanRegExpFlags() { + var ch, str, flags, restore; + str = ""; + flags = ""; + while (index < length) { + ch = source[index]; + if (!isIdentifierPart(ch.charCodeAt(0))) { + break; + } + ++index; + if (ch === "\\" && index < length) { + ch = source[index]; + if (ch === "u") { + ++index; + restore = index; + ch = scanHexEscape("u"); + if (ch) { + flags += ch; + for (str += "\\u"; restore < index; ++restore) { + str += source[restore]; + } + } else { + index = restore; + flags += "u"; + str += "\\u"; + } + throwErrorTolerant({}, Messages.UnexpectedToken, "ILLEGAL"); + } else { + str += "\\"; + throwErrorTolerant({}, Messages.UnexpectedToken, "ILLEGAL"); + } + } else { + flags += ch; + str += ch; + } + } + return { + value: flags, + literal: str + }; + } + function scanRegExp() { + var start, body, flags, value; + lookahead = null; + skipComment(); + start = index; + body = scanRegExpBody(); + flags = scanRegExpFlags(); + value = testRegExp(body.value, flags.value); + if (extra.tokenize) { + return { + type: Token.RegularExpression, + value, + lineNumber, + lineStart, + start, + end: index + }; + } + return { + literal: body.literal + flags.literal, + value, + start, + end: index + }; + } + function collectRegex() { + var pos, loc, regex, token; + skipComment(); + pos = index; + loc = { + start: { + line: lineNumber, + column: index - lineStart + } + }; + regex = scanRegExp(); + loc.end = { + line: lineNumber, + column: index - lineStart + }; + if (!extra.tokenize) { + if (extra.tokens.length > 0) { + token = extra.tokens[extra.tokens.length - 1]; + if (token.range[0] === pos && token.type === "Punctuator") { + if (token.value === "/" || token.value === "/=") { + extra.tokens.pop(); + } + } + } + extra.tokens.push({ + type: "RegularExpression", + value: regex.literal, + range: [pos, index], + loc + }); + } + return regex; + } + function isIdentifierName(token) { + return token.type === Token.Identifier || token.type === Token.Keyword || token.type === Token.BooleanLiteral || token.type === Token.NullLiteral; + } + function advanceSlash() { + var prevToken, checkToken; + prevToken = extra.tokens[extra.tokens.length - 1]; + if (!prevToken) { + return collectRegex(); + } + if (prevToken.type === "Punctuator") { + if (prevToken.value === "]") { + return scanPunctuator(); + } + if (prevToken.value === ")") { + checkToken = extra.tokens[extra.openParenToken - 1]; + if (checkToken && checkToken.type === "Keyword" && (checkToken.value === "if" || checkToken.value === "while" || checkToken.value === "for" || checkToken.value === "with")) { + return collectRegex(); + } + return scanPunctuator(); + } + if (prevToken.value === "}") { + if (extra.tokens[extra.openCurlyToken - 3] && extra.tokens[extra.openCurlyToken - 3].type === "Keyword") { + checkToken = extra.tokens[extra.openCurlyToken - 4]; + if (!checkToken) { + return scanPunctuator(); + } + } else if (extra.tokens[extra.openCurlyToken - 4] && extra.tokens[extra.openCurlyToken - 4].type === "Keyword") { + checkToken = extra.tokens[extra.openCurlyToken - 5]; + if (!checkToken) { + return collectRegex(); + } + } else { + return scanPunctuator(); + } + if (FnExprTokens.indexOf(checkToken.value) >= 0) { + return scanPunctuator(); + } + return collectRegex(); + } + return collectRegex(); + } + if (prevToken.type === "Keyword") { + return collectRegex(); + } + return scanPunctuator(); + } + function advance() { + var ch; + skipComment(); + if (index >= length) { + return { + type: Token.EOF, + lineNumber, + lineStart, + start: index, + end: index + }; + } + ch = source.charCodeAt(index); + if (isIdentifierStart(ch)) { + return scanIdentifier(); + } + if (ch === 40 || ch === 41 || ch === 59) { + return scanPunctuator(); + } + if (ch === 39 || ch === 34) { + return scanStringLiteral(); + } + if (ch === 46) { + if (isDecimalDigit(source.charCodeAt(index + 1))) { + return scanNumericLiteral(); + } + return scanPunctuator(); + } + if (isDecimalDigit(ch)) { + return scanNumericLiteral(); + } + if (extra.tokenize && ch === 47) { + return advanceSlash(); + } + return scanPunctuator(); + } + function collectToken() { + var loc, token, value; + skipComment(); + loc = { + start: { + line: lineNumber, + column: index - lineStart + } + }; + token = advance(); + loc.end = { + line: lineNumber, + column: index - lineStart + }; + if (token.type !== Token.EOF) { + value = source.slice(token.start, token.end); + extra.tokens.push({ + type: TokenName[token.type], + value, + range: [token.start, token.end], + loc + }); + } + return token; + } + function lex() { + var token; + token = lookahead; + index = token.end; + lineNumber = token.lineNumber; + lineStart = token.lineStart; + lookahead = typeof extra.tokens !== "undefined" ? collectToken() : advance(); + index = token.end; + lineNumber = token.lineNumber; + lineStart = token.lineStart; + return token; + } + function peek() { + var pos, line, start; + pos = index; + line = lineNumber; + start = lineStart; + lookahead = typeof extra.tokens !== "undefined" ? collectToken() : advance(); + index = pos; + lineNumber = line; + lineStart = start; + } + function Position(line, column) { + this.line = line; + this.column = column; + } + function SourceLocation(startLine, startColumn, line, column) { + this.start = new Position(startLine, startColumn); + this.end = new Position(line, column); + } + SyntaxTreeDelegate = { + name: "SyntaxTree", + processComment: function(node) { + var lastChild, trailingComments; + if (node.type === Syntax.Program) { + if (node.body.length > 0) { + return; + } + } + if (extra.trailingComments.length > 0) { + if (extra.trailingComments[0].range[0] >= node.range[1]) { + trailingComments = extra.trailingComments; + extra.trailingComments = []; + } else { + extra.trailingComments.length = 0; + } + } else { + if (extra.bottomRightStack.length > 0 && extra.bottomRightStack[extra.bottomRightStack.length - 1].trailingComments && extra.bottomRightStack[extra.bottomRightStack.length - 1].trailingComments[0].range[0] >= node.range[1]) { + trailingComments = extra.bottomRightStack[extra.bottomRightStack.length - 1].trailingComments; + delete extra.bottomRightStack[extra.bottomRightStack.length - 1].trailingComments; + } + } + while (extra.bottomRightStack.length > 0 && extra.bottomRightStack[extra.bottomRightStack.length - 1].range[0] >= node.range[0]) { + lastChild = extra.bottomRightStack.pop(); + } + if (lastChild) { + if (lastChild.leadingComments && lastChild.leadingComments[lastChild.leadingComments.length - 1].range[1] <= node.range[0]) { + node.leadingComments = lastChild.leadingComments; + delete lastChild.leadingComments; + } + } else if (extra.leadingComments.length > 0 && extra.leadingComments[extra.leadingComments.length - 1].range[1] <= node.range[0]) { + node.leadingComments = extra.leadingComments; + extra.leadingComments = []; + } + if (trailingComments) { + node.trailingComments = trailingComments; + } + extra.bottomRightStack.push(node); + }, + markEnd: function(node, startToken) { + if (extra.range) { + node.range = [startToken.start, index]; + } + if (extra.loc) { + node.loc = new SourceLocation( + startToken.startLineNumber === void 0 ? startToken.lineNumber : startToken.startLineNumber, + startToken.start - (startToken.startLineStart === void 0 ? startToken.lineStart : startToken.startLineStart), + lineNumber, + index - lineStart + ); + this.postProcess(node); + } + if (extra.attachComment) { + this.processComment(node); + } + return node; + }, + postProcess: function(node) { + if (extra.source) { + node.loc.source = extra.source; + } + return node; + }, + createArrayExpression: function(elements) { + return { + type: Syntax.ArrayExpression, + elements + }; + }, + createAssignmentExpression: function(operator, left, right) { + return { + type: Syntax.AssignmentExpression, + operator, + left, + right + }; + }, + createBinaryExpression: function(operator, left, right) { + var type = operator === "||" || operator === "&&" ? Syntax.LogicalExpression : Syntax.BinaryExpression; + return { + type, + operator, + left, + right + }; + }, + createBlockStatement: function(body) { + return { + type: Syntax.BlockStatement, + body + }; + }, + createBreakStatement: function(label) { + return { + type: Syntax.BreakStatement, + label + }; + }, + createCallExpression: function(callee, args) { + return { + type: Syntax.CallExpression, + callee, + "arguments": args + }; + }, + createCatchClause: function(param, body) { + return { + type: Syntax.CatchClause, + param, + body + }; + }, + createConditionalExpression: function(test, consequent, alternate) { + return { + type: Syntax.ConditionalExpression, + test, + consequent, + alternate + }; + }, + createContinueStatement: function(label) { + return { + type: Syntax.ContinueStatement, + label + }; + }, + createDebuggerStatement: function() { + return { + type: Syntax.DebuggerStatement + }; + }, + createDoWhileStatement: function(body, test) { + return { + type: Syntax.DoWhileStatement, + body, + test + }; + }, + createEmptyStatement: function() { + return { + type: Syntax.EmptyStatement + }; + }, + createExpressionStatement: function(expression) { + return { + type: Syntax.ExpressionStatement, + expression + }; + }, + createForStatement: function(init, test, update, body) { + return { + type: Syntax.ForStatement, + init, + test, + update, + body + }; + }, + createForInStatement: function(left, right, body) { + return { + type: Syntax.ForInStatement, + left, + right, + body, + each: false + }; + }, + createFunctionDeclaration: function(id, params, defaults, body) { + return { + type: Syntax.FunctionDeclaration, + id, + params, + defaults, + body, + rest: null, + generator: false, + expression: false + }; + }, + createFunctionExpression: function(id, params, defaults, body) { + return { + type: Syntax.FunctionExpression, + id, + params, + defaults, + body, + rest: null, + generator: false, + expression: false + }; + }, + createIdentifier: function(name) { + return { + type: Syntax.Identifier, + name + }; + }, + createIfStatement: function(test, consequent, alternate) { + return { + type: Syntax.IfStatement, + test, + consequent, + alternate + }; + }, + createLabeledStatement: function(label, body) { + return { + type: Syntax.LabeledStatement, + label, + body + }; + }, + createLiteral: function(token) { + return { + type: Syntax.Literal, + value: token.value, + raw: source.slice(token.start, token.end) + }; + }, + createMemberExpression: function(accessor, object, property) { + return { + type: Syntax.MemberExpression, + computed: accessor === "[", + object, + property + }; + }, + createNewExpression: function(callee, args) { + return { + type: Syntax.NewExpression, + callee, + "arguments": args + }; + }, + createObjectExpression: function(properties) { + return { + type: Syntax.ObjectExpression, + properties + }; + }, + createPostfixExpression: function(operator, argument) { + return { + type: Syntax.UpdateExpression, + operator, + argument, + prefix: false + }; + }, + createProgram: function(body) { + return { + type: Syntax.Program, + body + }; + }, + createProperty: function(kind, key, value) { + return { + type: Syntax.Property, + key, + value, + kind + }; + }, + createReturnStatement: function(argument) { + return { + type: Syntax.ReturnStatement, + argument + }; + }, + createSequenceExpression: function(expressions) { + return { + type: Syntax.SequenceExpression, + expressions + }; + }, + createSwitchCase: function(test, consequent) { + return { + type: Syntax.SwitchCase, + test, + consequent + }; + }, + createSwitchStatement: function(discriminant, cases) { + return { + type: Syntax.SwitchStatement, + discriminant, + cases + }; + }, + createThisExpression: function() { + return { + type: Syntax.ThisExpression + }; + }, + createThrowStatement: function(argument) { + return { + type: Syntax.ThrowStatement, + argument + }; + }, + createTryStatement: function(block, guardedHandlers, handlers, finalizer) { + return { + type: Syntax.TryStatement, + block, + guardedHandlers, + handlers, + finalizer + }; + }, + createUnaryExpression: function(operator, argument) { + if (operator === "++" || operator === "--") { + return { + type: Syntax.UpdateExpression, + operator, + argument, + prefix: true + }; + } + return { + type: Syntax.UnaryExpression, + operator, + argument, + prefix: true + }; + }, + createVariableDeclaration: function(declarations, kind) { + return { + type: Syntax.VariableDeclaration, + declarations, + kind + }; + }, + createVariableDeclarator: function(id, init) { + return { + type: Syntax.VariableDeclarator, + id, + init + }; + }, + createWhileStatement: function(test, body) { + return { + type: Syntax.WhileStatement, + test, + body + }; + }, + createWithStatement: function(object, body) { + return { + type: Syntax.WithStatement, + object, + body + }; + } + }; + function peekLineTerminator() { + var pos, line, start, found; + pos = index; + line = lineNumber; + start = lineStart; + skipComment(); + found = lineNumber !== line; + index = pos; + lineNumber = line; + lineStart = start; + return found; + } + function throwError(token, messageFormat) { + var error, args = Array.prototype.slice.call(arguments, 2), msg = messageFormat.replace( + /%(\d)/g, + function(whole, index2) { + assert(index2 < args.length, "Message reference must be in range"); + return args[index2]; + } + ); + if (typeof token.lineNumber === "number") { + error = new Error("Line " + token.lineNumber + ": " + msg); + error.index = token.start; + error.lineNumber = token.lineNumber; + error.column = token.start - lineStart + 1; + } else { + error = new Error("Line " + lineNumber + ": " + msg); + error.index = index; + error.lineNumber = lineNumber; + error.column = index - lineStart + 1; + } + error.description = msg; + throw error; + } + function throwErrorTolerant() { + try { + throwError.apply(null, arguments); + } catch (e) { + if (extra.errors) { + extra.errors.push(e); + } else { + throw e; + } + } + } + function throwUnexpected(token) { + if (token.type === Token.EOF) { + throwError(token, Messages.UnexpectedEOS); + } + if (token.type === Token.NumericLiteral) { + throwError(token, Messages.UnexpectedNumber); + } + if (token.type === Token.StringLiteral) { + throwError(token, Messages.UnexpectedString); + } + if (token.type === Token.Identifier) { + throwError(token, Messages.UnexpectedIdentifier); + } + if (token.type === Token.Keyword) { + if (isFutureReservedWord(token.value)) { + throwError(token, Messages.UnexpectedReserved); + } else if (strict && isStrictModeReservedWord(token.value)) { + throwErrorTolerant(token, Messages.StrictReservedWord); + return; + } + throwError(token, Messages.UnexpectedToken, token.value); + } + throwError(token, Messages.UnexpectedToken, token.value); + } + function expect(value) { + var token = lex(); + if (token.type !== Token.Punctuator || token.value !== value) { + throwUnexpected(token); + } + } + function expectKeyword(keyword) { + var token = lex(); + if (token.type !== Token.Keyword || token.value !== keyword) { + throwUnexpected(token); + } + } + function match(value) { + return lookahead.type === Token.Punctuator && lookahead.value === value; + } + function matchKeyword(keyword) { + return lookahead.type === Token.Keyword && lookahead.value === keyword; + } + function matchAssign() { + var op; + if (lookahead.type !== Token.Punctuator) { + return false; + } + op = lookahead.value; + return op === "=" || op === "*=" || op === "/=" || op === "%=" || op === "+=" || op === "-=" || op === "<<=" || op === ">>=" || op === ">>>=" || op === "&=" || op === "^=" || op === "|="; + } + function consumeSemicolon() { + var line; + if (source.charCodeAt(index) === 59 || match(";")) { + lex(); + return; + } + line = lineNumber; + skipComment(); + if (lineNumber !== line) { + return; + } + if (lookahead.type !== Token.EOF && !match("}")) { + throwUnexpected(lookahead); + } + } + function isLeftHandSide(expr) { + return expr.type === Syntax.Identifier || expr.type === Syntax.MemberExpression; + } + function parseArrayInitialiser() { + var elements = [], startToken; + startToken = lookahead; + expect("["); + while (!match("]")) { + if (match(",")) { + lex(); + elements.push(null); + } else { + elements.push(parseAssignmentExpression()); + if (!match("]")) { + expect(","); + } + } + } + lex(); + return delegate.markEnd(delegate.createArrayExpression(elements), startToken); + } + function parsePropertyFunction(param, first) { + var previousStrict, body, startToken; + previousStrict = strict; + startToken = lookahead; + body = parseFunctionSourceElements(); + if (first && strict && isRestrictedWord(param[0].name)) { + throwErrorTolerant(first, Messages.StrictParamName); + } + strict = previousStrict; + return delegate.markEnd(delegate.createFunctionExpression(null, param, [], body), startToken); + } + function parseObjectPropertyKey() { + var token, startToken; + startToken = lookahead; + token = lex(); + if (token.type === Token.StringLiteral || token.type === Token.NumericLiteral) { + if (strict && token.octal) { + throwErrorTolerant(token, Messages.StrictOctalLiteral); + } + return delegate.markEnd(delegate.createLiteral(token), startToken); + } + return delegate.markEnd(delegate.createIdentifier(token.value), startToken); + } + function parseObjectProperty() { + var token, key, id, value, param, startToken; + token = lookahead; + startToken = lookahead; + if (token.type === Token.Identifier) { + id = parseObjectPropertyKey(); + if (token.value === "get" && !match(":")) { + key = parseObjectPropertyKey(); + expect("("); + expect(")"); + value = parsePropertyFunction([]); + return delegate.markEnd(delegate.createProperty("get", key, value), startToken); + } + if (token.value === "set" && !match(":")) { + key = parseObjectPropertyKey(); + expect("("); + token = lookahead; + if (token.type !== Token.Identifier) { + expect(")"); + throwErrorTolerant(token, Messages.UnexpectedToken, token.value); + value = parsePropertyFunction([]); + } else { + param = [parseVariableIdentifier()]; + expect(")"); + value = parsePropertyFunction(param, token); + } + return delegate.markEnd(delegate.createProperty("set", key, value), startToken); + } + expect(":"); + value = parseAssignmentExpression(); + return delegate.markEnd(delegate.createProperty("init", id, value), startToken); + } + if (token.type === Token.EOF || token.type === Token.Punctuator) { + throwUnexpected(token); + } else { + key = parseObjectPropertyKey(); + expect(":"); + value = parseAssignmentExpression(); + return delegate.markEnd(delegate.createProperty("init", key, value), startToken); + } + } + function parseObjectInitialiser() { + var properties = [], property, name, key, kind, map = {}, toString = String, startToken; + startToken = lookahead; + expect("{"); + while (!match("}")) { + property = parseObjectProperty(); + if (property.key.type === Syntax.Identifier) { + name = property.key.name; + } else { + name = toString(property.key.value); + } + kind = property.kind === "init" ? PropertyKind.Data : property.kind === "get" ? PropertyKind.Get : PropertyKind.Set; + key = "$" + name; + if (Object.prototype.hasOwnProperty.call(map, key)) { + if (map[key] === PropertyKind.Data) { + if (strict && kind === PropertyKind.Data) { + throwErrorTolerant({}, Messages.StrictDuplicateProperty); + } else if (kind !== PropertyKind.Data) { + throwErrorTolerant({}, Messages.AccessorDataProperty); + } + } else { + if (kind === PropertyKind.Data) { + throwErrorTolerant({}, Messages.AccessorDataProperty); + } else if (map[key] & kind) { + throwErrorTolerant({}, Messages.AccessorGetSet); + } + } + map[key] |= kind; + } else { + map[key] = kind; + } + properties.push(property); + if (!match("}")) { + expect(","); + } + } + expect("}"); + return delegate.markEnd(delegate.createObjectExpression(properties), startToken); + } + function parseGroupExpression() { + var expr; + expect("("); + expr = parseExpression(); + expect(")"); + return expr; + } + function parsePrimaryExpression() { + var type, token, expr, startToken; + if (match("(")) { + return parseGroupExpression(); + } + if (match("[")) { + return parseArrayInitialiser(); + } + if (match("{")) { + return parseObjectInitialiser(); + } + type = lookahead.type; + startToken = lookahead; + if (type === Token.Identifier) { + expr = delegate.createIdentifier(lex().value); + } else if (type === Token.StringLiteral || type === Token.NumericLiteral) { + if (strict && lookahead.octal) { + throwErrorTolerant(lookahead, Messages.StrictOctalLiteral); + } + expr = delegate.createLiteral(lex()); + } else if (type === Token.Keyword) { + if (matchKeyword("function")) { + return parseFunctionExpression(); + } + if (matchKeyword("this")) { + lex(); + expr = delegate.createThisExpression(); + } else { + throwUnexpected(lex()); + } + } else if (type === Token.BooleanLiteral) { + token = lex(); + token.value = token.value === "true"; + expr = delegate.createLiteral(token); + } else if (type === Token.NullLiteral) { + token = lex(); + token.value = null; + expr = delegate.createLiteral(token); + } else if (match("/") || match("/=")) { + if (typeof extra.tokens !== "undefined") { + expr = delegate.createLiteral(collectRegex()); + } else { + expr = delegate.createLiteral(scanRegExp()); + } + peek(); + } else { + throwUnexpected(lex()); + } + return delegate.markEnd(expr, startToken); + } + function parseArguments() { + var args = []; + expect("("); + if (!match(")")) { + while (index < length) { + args.push(parseAssignmentExpression()); + if (match(")")) { + break; + } + expect(","); + } + } + expect(")"); + return args; + } + function parseNonComputedProperty() { + var token, startToken; + startToken = lookahead; + token = lex(); + if (!isIdentifierName(token)) { + throwUnexpected(token); + } + return delegate.markEnd(delegate.createIdentifier(token.value), startToken); + } + function parseNonComputedMember() { + expect("."); + return parseNonComputedProperty(); + } + function parseComputedMember() { + var expr; + expect("["); + expr = parseExpression(); + expect("]"); + return expr; + } + function parseNewExpression() { + var callee, args, startToken; + startToken = lookahead; + expectKeyword("new"); + callee = parseLeftHandSideExpression(); + args = match("(") ? parseArguments() : []; + return delegate.markEnd(delegate.createNewExpression(callee, args), startToken); + } + function parseLeftHandSideExpressionAllowCall() { + var previousAllowIn, expr, args, property, startToken; + startToken = lookahead; + previousAllowIn = state.allowIn; + state.allowIn = true; + expr = matchKeyword("new") ? parseNewExpression() : parsePrimaryExpression(); + state.allowIn = previousAllowIn; + for (; ; ) { + if (match(".")) { + property = parseNonComputedMember(); + expr = delegate.createMemberExpression(".", expr, property); + } else if (match("(")) { + args = parseArguments(); + expr = delegate.createCallExpression(expr, args); + } else if (match("[")) { + property = parseComputedMember(); + expr = delegate.createMemberExpression("[", expr, property); + } else { + break; + } + delegate.markEnd(expr, startToken); + } + return expr; + } + function parseLeftHandSideExpression() { + var previousAllowIn, expr, property, startToken; + startToken = lookahead; + previousAllowIn = state.allowIn; + expr = matchKeyword("new") ? parseNewExpression() : parsePrimaryExpression(); + state.allowIn = previousAllowIn; + while (match(".") || match("[")) { + if (match("[")) { + property = parseComputedMember(); + expr = delegate.createMemberExpression("[", expr, property); + } else { + property = parseNonComputedMember(); + expr = delegate.createMemberExpression(".", expr, property); + } + delegate.markEnd(expr, startToken); + } + return expr; + } + function parsePostfixExpression() { + var expr, token, startToken = lookahead; + expr = parseLeftHandSideExpressionAllowCall(); + if (lookahead.type === Token.Punctuator) { + if ((match("++") || match("--")) && !peekLineTerminator()) { + if (strict && expr.type === Syntax.Identifier && isRestrictedWord(expr.name)) { + throwErrorTolerant({}, Messages.StrictLHSPostfix); + } + if (!isLeftHandSide(expr)) { + throwErrorTolerant({}, Messages.InvalidLHSInAssignment); + } + token = lex(); + expr = delegate.markEnd(delegate.createPostfixExpression(token.value, expr), startToken); + } + } + return expr; + } + function parseUnaryExpression() { + var token, expr, startToken; + if (lookahead.type !== Token.Punctuator && lookahead.type !== Token.Keyword) { + expr = parsePostfixExpression(); + } else if (match("++") || match("--")) { + startToken = lookahead; + token = lex(); + expr = parseUnaryExpression(); + if (strict && expr.type === Syntax.Identifier && isRestrictedWord(expr.name)) { + throwErrorTolerant({}, Messages.StrictLHSPrefix); + } + if (!isLeftHandSide(expr)) { + throwErrorTolerant({}, Messages.InvalidLHSInAssignment); + } + expr = delegate.createUnaryExpression(token.value, expr); + expr = delegate.markEnd(expr, startToken); + } else if (match("+") || match("-") || match("~") || match("!")) { + startToken = lookahead; + token = lex(); + expr = parseUnaryExpression(); + expr = delegate.createUnaryExpression(token.value, expr); + expr = delegate.markEnd(expr, startToken); + } else if (matchKeyword("delete") || matchKeyword("void") || matchKeyword("typeof")) { + startToken = lookahead; + token = lex(); + expr = parseUnaryExpression(); + expr = delegate.createUnaryExpression(token.value, expr); + expr = delegate.markEnd(expr, startToken); + if (strict && expr.operator === "delete" && expr.argument.type === Syntax.Identifier) { + throwErrorTolerant({}, Messages.StrictDelete); + } + } else { + expr = parsePostfixExpression(); + } + return expr; + } + function binaryPrecedence(token, allowIn) { + var prec = 0; + if (token.type !== Token.Punctuator && token.type !== Token.Keyword) { + return 0; + } + switch (token.value) { + case "||": + prec = 1; + break; + case "&&": + prec = 2; + break; + case "|": + prec = 3; + break; + case "^": + prec = 4; + break; + case "&": + prec = 5; + break; + case "==": + case "!=": + case "===": + case "!==": + prec = 6; + break; + case "<": + case ">": + case "<=": + case ">=": + case "instanceof": + prec = 7; + break; + case "in": + prec = allowIn ? 7 : 0; + break; + case "<<": + case ">>": + case ">>>": + prec = 8; + break; + case "+": + case "-": + prec = 9; + break; + case "*": + case "/": + case "%": + prec = 11; + break; + default: + break; + } + return prec; + } + function parseBinaryExpression() { + var marker, markers, expr, token, prec, stack, right, operator, left, i; + marker = lookahead; + left = parseUnaryExpression(); + token = lookahead; + prec = binaryPrecedence(token, state.allowIn); + if (prec === 0) { + return left; + } + token.prec = prec; + lex(); + markers = [marker, lookahead]; + right = parseUnaryExpression(); + stack = [left, token, right]; + while ((prec = binaryPrecedence(lookahead, state.allowIn)) > 0) { + while (stack.length > 2 && prec <= stack[stack.length - 2].prec) { + right = stack.pop(); + operator = stack.pop().value; + left = stack.pop(); + expr = delegate.createBinaryExpression(operator, left, right); + markers.pop(); + marker = markers[markers.length - 1]; + delegate.markEnd(expr, marker); + stack.push(expr); + } + token = lex(); + token.prec = prec; + stack.push(token); + markers.push(lookahead); + expr = parseUnaryExpression(); + stack.push(expr); + } + i = stack.length - 1; + expr = stack[i]; + markers.pop(); + while (i > 1) { + expr = delegate.createBinaryExpression(stack[i - 1].value, stack[i - 2], expr); + i -= 2; + marker = markers.pop(); + delegate.markEnd(expr, marker); + } + return expr; + } + function parseConditionalExpression() { + var expr, previousAllowIn, consequent, alternate, startToken; + startToken = lookahead; + expr = parseBinaryExpression(); + if (match("?")) { + lex(); + previousAllowIn = state.allowIn; + state.allowIn = true; + consequent = parseAssignmentExpression(); + state.allowIn = previousAllowIn; + expect(":"); + alternate = parseAssignmentExpression(); + expr = delegate.createConditionalExpression(expr, consequent, alternate); + delegate.markEnd(expr, startToken); + } + return expr; + } + function parseAssignmentExpression() { + var token, left, right, node, startToken; + token = lookahead; + startToken = lookahead; + node = left = parseConditionalExpression(); + if (matchAssign()) { + if (!isLeftHandSide(left)) { + throwErrorTolerant({}, Messages.InvalidLHSInAssignment); + } + if (strict && left.type === Syntax.Identifier && isRestrictedWord(left.name)) { + throwErrorTolerant(token, Messages.StrictLHSAssignment); + } + token = lex(); + right = parseAssignmentExpression(); + node = delegate.markEnd(delegate.createAssignmentExpression(token.value, left, right), startToken); + } + return node; + } + function parseExpression() { + var expr, startToken = lookahead; + expr = parseAssignmentExpression(); + if (match(",")) { + expr = delegate.createSequenceExpression([expr]); + while (index < length) { + if (!match(",")) { + break; + } + lex(); + expr.expressions.push(parseAssignmentExpression()); + } + delegate.markEnd(expr, startToken); + } + return expr; + } + function parseStatementList() { + var list = [], statement; + while (index < length) { + if (match("}")) { + break; + } + statement = parseSourceElement(); + if (typeof statement === "undefined") { + break; + } + list.push(statement); + } + return list; + } + function parseBlock() { + var block, startToken; + startToken = lookahead; + expect("{"); + block = parseStatementList(); + expect("}"); + return delegate.markEnd(delegate.createBlockStatement(block), startToken); + } + function parseVariableIdentifier() { + var token, startToken; + startToken = lookahead; + token = lex(); + if (token.type !== Token.Identifier) { + throwUnexpected(token); + } + return delegate.markEnd(delegate.createIdentifier(token.value), startToken); + } + function parseVariableDeclaration(kind) { + var init = null, id, startToken; + startToken = lookahead; + id = parseVariableIdentifier(); + if (strict && isRestrictedWord(id.name)) { + throwErrorTolerant({}, Messages.StrictVarName); + } + if (kind === "const") { + expect("="); + init = parseAssignmentExpression(); + } else if (match("=")) { + lex(); + init = parseAssignmentExpression(); + } + return delegate.markEnd(delegate.createVariableDeclarator(id, init), startToken); + } + function parseVariableDeclarationList(kind) { + var list = []; + do { + list.push(parseVariableDeclaration(kind)); + if (!match(",")) { + break; + } + lex(); + } while (index < length); + return list; + } + function parseVariableStatement() { + var declarations; + expectKeyword("var"); + declarations = parseVariableDeclarationList(); + consumeSemicolon(); + return delegate.createVariableDeclaration(declarations, "var"); + } + function parseConstLetDeclaration(kind) { + var declarations, startToken; + startToken = lookahead; + expectKeyword(kind); + declarations = parseVariableDeclarationList(kind); + consumeSemicolon(); + return delegate.markEnd(delegate.createVariableDeclaration(declarations, kind), startToken); + } + function parseEmptyStatement() { + expect(";"); + return delegate.createEmptyStatement(); + } + function parseExpressionStatement() { + var expr = parseExpression(); + consumeSemicolon(); + return delegate.createExpressionStatement(expr); + } + function parseIfStatement() { + var test, consequent, alternate; + expectKeyword("if"); + expect("("); + test = parseExpression(); + expect(")"); + consequent = parseStatement(); + if (matchKeyword("else")) { + lex(); + alternate = parseStatement(); + } else { + alternate = null; + } + return delegate.createIfStatement(test, consequent, alternate); + } + function parseDoWhileStatement() { + var body, test, oldInIteration; + expectKeyword("do"); + oldInIteration = state.inIteration; + state.inIteration = true; + body = parseStatement(); + state.inIteration = oldInIteration; + expectKeyword("while"); + expect("("); + test = parseExpression(); + expect(")"); + if (match(";")) { + lex(); + } + return delegate.createDoWhileStatement(body, test); + } + function parseWhileStatement() { + var test, body, oldInIteration; + expectKeyword("while"); + expect("("); + test = parseExpression(); + expect(")"); + oldInIteration = state.inIteration; + state.inIteration = true; + body = parseStatement(); + state.inIteration = oldInIteration; + return delegate.createWhileStatement(test, body); + } + function parseForVariableDeclaration() { + var token, declarations, startToken; + startToken = lookahead; + token = lex(); + declarations = parseVariableDeclarationList(); + return delegate.markEnd(delegate.createVariableDeclaration(declarations, token.value), startToken); + } + function parseForStatement() { + var init, test, update, left, right, body, oldInIteration; + init = test = update = null; + expectKeyword("for"); + expect("("); + if (match(";")) { + lex(); + } else { + if (matchKeyword("var") || matchKeyword("let")) { + state.allowIn = false; + init = parseForVariableDeclaration(); + state.allowIn = true; + if (init.declarations.length === 1 && matchKeyword("in")) { + lex(); + left = init; + right = parseExpression(); + init = null; + } + } else { + state.allowIn = false; + init = parseExpression(); + state.allowIn = true; + if (matchKeyword("in")) { + if (!isLeftHandSide(init)) { + throwErrorTolerant({}, Messages.InvalidLHSInForIn); + } + lex(); + left = init; + right = parseExpression(); + init = null; + } + } + if (typeof left === "undefined") { + expect(";"); + } + } + if (typeof left === "undefined") { + if (!match(";")) { + test = parseExpression(); + } + expect(";"); + if (!match(")")) { + update = parseExpression(); + } + } + expect(")"); + oldInIteration = state.inIteration; + state.inIteration = true; + body = parseStatement(); + state.inIteration = oldInIteration; + return typeof left === "undefined" ? delegate.createForStatement(init, test, update, body) : delegate.createForInStatement(left, right, body); + } + function parseContinueStatement() { + var label = null, key; + expectKeyword("continue"); + if (source.charCodeAt(index) === 59) { + lex(); + if (!state.inIteration) { + throwError({}, Messages.IllegalContinue); + } + return delegate.createContinueStatement(null); + } + if (peekLineTerminator()) { + if (!state.inIteration) { + throwError({}, Messages.IllegalContinue); + } + return delegate.createContinueStatement(null); + } + if (lookahead.type === Token.Identifier) { + label = parseVariableIdentifier(); + key = "$" + label.name; + if (!Object.prototype.hasOwnProperty.call(state.labelSet, key)) { + throwError({}, Messages.UnknownLabel, label.name); + } + } + consumeSemicolon(); + if (label === null && !state.inIteration) { + throwError({}, Messages.IllegalContinue); + } + return delegate.createContinueStatement(label); + } + function parseBreakStatement() { + var label = null, key; + expectKeyword("break"); + if (source.charCodeAt(index) === 59) { + lex(); + if (!(state.inIteration || state.inSwitch)) { + throwError({}, Messages.IllegalBreak); + } + return delegate.createBreakStatement(null); + } + if (peekLineTerminator()) { + if (!(state.inIteration || state.inSwitch)) { + throwError({}, Messages.IllegalBreak); + } + return delegate.createBreakStatement(null); + } + if (lookahead.type === Token.Identifier) { + label = parseVariableIdentifier(); + key = "$" + label.name; + if (!Object.prototype.hasOwnProperty.call(state.labelSet, key)) { + throwError({}, Messages.UnknownLabel, label.name); + } + } + consumeSemicolon(); + if (label === null && !(state.inIteration || state.inSwitch)) { + throwError({}, Messages.IllegalBreak); + } + return delegate.createBreakStatement(label); + } + function parseReturnStatement() { + var argument = null; + expectKeyword("return"); + if (!state.inFunctionBody) { + throwErrorTolerant({}, Messages.IllegalReturn); + } + if (source.charCodeAt(index) === 32) { + if (isIdentifierStart(source.charCodeAt(index + 1))) { + argument = parseExpression(); + consumeSemicolon(); + return delegate.createReturnStatement(argument); + } + } + if (peekLineTerminator()) { + return delegate.createReturnStatement(null); + } + if (!match(";")) { + if (!match("}") && lookahead.type !== Token.EOF) { + argument = parseExpression(); + } + } + consumeSemicolon(); + return delegate.createReturnStatement(argument); + } + function parseWithStatement() { + var object, body; + if (strict) { + skipComment(); + throwErrorTolerant({}, Messages.StrictModeWith); + } + expectKeyword("with"); + expect("("); + object = parseExpression(); + expect(")"); + body = parseStatement(); + return delegate.createWithStatement(object, body); + } + function parseSwitchCase() { + var test, consequent = [], statement, startToken; + startToken = lookahead; + if (matchKeyword("default")) { + lex(); + test = null; + } else { + expectKeyword("case"); + test = parseExpression(); + } + expect(":"); + while (index < length) { + if (match("}") || matchKeyword("default") || matchKeyword("case")) { + break; + } + statement = parseStatement(); + consequent.push(statement); + } + return delegate.markEnd(delegate.createSwitchCase(test, consequent), startToken); + } + function parseSwitchStatement() { + var discriminant, cases, clause, oldInSwitch, defaultFound; + expectKeyword("switch"); + expect("("); + discriminant = parseExpression(); + expect(")"); + expect("{"); + cases = []; + if (match("}")) { + lex(); + return delegate.createSwitchStatement(discriminant, cases); + } + oldInSwitch = state.inSwitch; + state.inSwitch = true; + defaultFound = false; + while (index < length) { + if (match("}")) { + break; + } + clause = parseSwitchCase(); + if (clause.test === null) { + if (defaultFound) { + throwError({}, Messages.MultipleDefaultsInSwitch); + } + defaultFound = true; + } + cases.push(clause); + } + state.inSwitch = oldInSwitch; + expect("}"); + return delegate.createSwitchStatement(discriminant, cases); + } + function parseThrowStatement() { + var argument; + expectKeyword("throw"); + if (peekLineTerminator()) { + throwError({}, Messages.NewlineAfterThrow); + } + argument = parseExpression(); + consumeSemicolon(); + return delegate.createThrowStatement(argument); + } + function parseCatchClause() { + var param, body, startToken; + startToken = lookahead; + expectKeyword("catch"); + expect("("); + if (match(")")) { + throwUnexpected(lookahead); + } + param = parseVariableIdentifier(); + if (strict && isRestrictedWord(param.name)) { + throwErrorTolerant({}, Messages.StrictCatchVariable); + } + expect(")"); + body = parseBlock(); + return delegate.markEnd(delegate.createCatchClause(param, body), startToken); + } + function parseTryStatement() { + var block, handlers = [], finalizer = null; + expectKeyword("try"); + block = parseBlock(); + if (matchKeyword("catch")) { + handlers.push(parseCatchClause()); + } + if (matchKeyword("finally")) { + lex(); + finalizer = parseBlock(); + } + if (handlers.length === 0 && !finalizer) { + throwError({}, Messages.NoCatchOrFinally); + } + return delegate.createTryStatement(block, [], handlers, finalizer); + } + function parseDebuggerStatement() { + expectKeyword("debugger"); + consumeSemicolon(); + return delegate.createDebuggerStatement(); + } + function parseStatement() { + var type = lookahead.type, expr, labeledBody, key, startToken; + if (type === Token.EOF) { + throwUnexpected(lookahead); + } + if (type === Token.Punctuator && lookahead.value === "{") { + return parseBlock(); + } + startToken = lookahead; + if (type === Token.Punctuator) { + switch (lookahead.value) { + case ";": + return delegate.markEnd(parseEmptyStatement(), startToken); + case "(": + return delegate.markEnd(parseExpressionStatement(), startToken); + default: + break; + } + } + if (type === Token.Keyword) { + switch (lookahead.value) { + case "break": + return delegate.markEnd(parseBreakStatement(), startToken); + case "continue": + return delegate.markEnd(parseContinueStatement(), startToken); + case "debugger": + return delegate.markEnd(parseDebuggerStatement(), startToken); + case "do": + return delegate.markEnd(parseDoWhileStatement(), startToken); + case "for": + return delegate.markEnd(parseForStatement(), startToken); + case "function": + return delegate.markEnd(parseFunctionDeclaration(), startToken); + case "if": + return delegate.markEnd(parseIfStatement(), startToken); + case "return": + return delegate.markEnd(parseReturnStatement(), startToken); + case "switch": + return delegate.markEnd(parseSwitchStatement(), startToken); + case "throw": + return delegate.markEnd(parseThrowStatement(), startToken); + case "try": + return delegate.markEnd(parseTryStatement(), startToken); + case "var": + return delegate.markEnd(parseVariableStatement(), startToken); + case "while": + return delegate.markEnd(parseWhileStatement(), startToken); + case "with": + return delegate.markEnd(parseWithStatement(), startToken); + default: + break; + } + } + expr = parseExpression(); + if (expr.type === Syntax.Identifier && match(":")) { + lex(); + key = "$" + expr.name; + if (Object.prototype.hasOwnProperty.call(state.labelSet, key)) { + throwError({}, Messages.Redeclaration, "Label", expr.name); + } + state.labelSet[key] = true; + labeledBody = parseStatement(); + delete state.labelSet[key]; + return delegate.markEnd(delegate.createLabeledStatement(expr, labeledBody), startToken); + } + consumeSemicolon(); + return delegate.markEnd(delegate.createExpressionStatement(expr), startToken); + } + function parseFunctionSourceElements() { + var sourceElement, sourceElements = [], token, directive, firstRestricted, oldLabelSet, oldInIteration, oldInSwitch, oldInFunctionBody, startToken; + startToken = lookahead; + expect("{"); + while (index < length) { + if (lookahead.type !== Token.StringLiteral) { + break; + } + token = lookahead; + sourceElement = parseSourceElement(); + sourceElements.push(sourceElement); + if (sourceElement.expression.type !== Syntax.Literal) { + break; + } + directive = source.slice(token.start + 1, token.end - 1); + if (directive === "use strict") { + strict = true; + if (firstRestricted) { + throwErrorTolerant(firstRestricted, Messages.StrictOctalLiteral); + } + } else { + if (!firstRestricted && token.octal) { + firstRestricted = token; + } + } + } + oldLabelSet = state.labelSet; + oldInIteration = state.inIteration; + oldInSwitch = state.inSwitch; + oldInFunctionBody = state.inFunctionBody; + state.labelSet = {}; + state.inIteration = false; + state.inSwitch = false; + state.inFunctionBody = true; + while (index < length) { + if (match("}")) { + break; + } + sourceElement = parseSourceElement(); + if (typeof sourceElement === "undefined") { + break; + } + sourceElements.push(sourceElement); + } + expect("}"); + state.labelSet = oldLabelSet; + state.inIteration = oldInIteration; + state.inSwitch = oldInSwitch; + state.inFunctionBody = oldInFunctionBody; + return delegate.markEnd(delegate.createBlockStatement(sourceElements), startToken); + } + function parseParams(firstRestricted) { + var param, params = [], token, stricted, paramSet, key, message; + expect("("); + if (!match(")")) { + paramSet = {}; + while (index < length) { + token = lookahead; + param = parseVariableIdentifier(); + key = "$" + token.value; + if (strict) { + if (isRestrictedWord(token.value)) { + stricted = token; + message = Messages.StrictParamName; + } + if (Object.prototype.hasOwnProperty.call(paramSet, key)) { + stricted = token; + message = Messages.StrictParamDupe; + } + } else if (!firstRestricted) { + if (isRestrictedWord(token.value)) { + firstRestricted = token; + message = Messages.StrictParamName; + } else if (isStrictModeReservedWord(token.value)) { + firstRestricted = token; + message = Messages.StrictReservedWord; + } else if (Object.prototype.hasOwnProperty.call(paramSet, key)) { + firstRestricted = token; + message = Messages.StrictParamDupe; + } + } + params.push(param); + paramSet[key] = true; + if (match(")")) { + break; + } + expect(","); + } + } + expect(")"); + return { + params, + stricted, + firstRestricted, + message + }; + } + function parseFunctionDeclaration() { + var id, params = [], body, token, stricted, tmp, firstRestricted, message, previousStrict, startToken; + startToken = lookahead; + expectKeyword("function"); + token = lookahead; + id = parseVariableIdentifier(); + if (strict) { + if (isRestrictedWord(token.value)) { + throwErrorTolerant(token, Messages.StrictFunctionName); + } + } else { + if (isRestrictedWord(token.value)) { + firstRestricted = token; + message = Messages.StrictFunctionName; + } else if (isStrictModeReservedWord(token.value)) { + firstRestricted = token; + message = Messages.StrictReservedWord; + } + } + tmp = parseParams(firstRestricted); + params = tmp.params; + stricted = tmp.stricted; + firstRestricted = tmp.firstRestricted; + if (tmp.message) { + message = tmp.message; + } + previousStrict = strict; + body = parseFunctionSourceElements(); + if (strict && firstRestricted) { + throwError(firstRestricted, message); + } + if (strict && stricted) { + throwErrorTolerant(stricted, message); + } + strict = previousStrict; + return delegate.markEnd(delegate.createFunctionDeclaration(id, params, [], body), startToken); + } + function parseFunctionExpression() { + var token, id = null, stricted, firstRestricted, message, tmp, params = [], body, previousStrict, startToken; + startToken = lookahead; + expectKeyword("function"); + if (!match("(")) { + token = lookahead; + id = parseVariableIdentifier(); + if (strict) { + if (isRestrictedWord(token.value)) { + throwErrorTolerant(token, Messages.StrictFunctionName); + } + } else { + if (isRestrictedWord(token.value)) { + firstRestricted = token; + message = Messages.StrictFunctionName; + } else if (isStrictModeReservedWord(token.value)) { + firstRestricted = token; + message = Messages.StrictReservedWord; + } + } + } + tmp = parseParams(firstRestricted); + params = tmp.params; + stricted = tmp.stricted; + firstRestricted = tmp.firstRestricted; + if (tmp.message) { + message = tmp.message; + } + previousStrict = strict; + body = parseFunctionSourceElements(); + if (strict && firstRestricted) { + throwError(firstRestricted, message); + } + if (strict && stricted) { + throwErrorTolerant(stricted, message); + } + strict = previousStrict; + return delegate.markEnd(delegate.createFunctionExpression(id, params, [], body), startToken); + } + function parseSourceElement() { + if (lookahead.type === Token.Keyword) { + switch (lookahead.value) { + case "const": + case "let": + return parseConstLetDeclaration(lookahead.value); + case "function": + return parseFunctionDeclaration(); + default: + return parseStatement(); + } + } + if (lookahead.type !== Token.EOF) { + return parseStatement(); + } + } + function parseSourceElements() { + var sourceElement, sourceElements = [], token, directive, firstRestricted; + while (index < length) { + token = lookahead; + if (token.type !== Token.StringLiteral) { + break; + } + sourceElement = parseSourceElement(); + sourceElements.push(sourceElement); + if (sourceElement.expression.type !== Syntax.Literal) { + break; + } + directive = source.slice(token.start + 1, token.end - 1); + if (directive === "use strict") { + strict = true; + if (firstRestricted) { + throwErrorTolerant(firstRestricted, Messages.StrictOctalLiteral); + } + } else { + if (!firstRestricted && token.octal) { + firstRestricted = token; + } + } + } + while (index < length) { + sourceElement = parseSourceElement(); + if (typeof sourceElement === "undefined") { + break; + } + sourceElements.push(sourceElement); + } + return sourceElements; + } + function parseProgram() { + var body, startToken; + skipComment(); + peek(); + startToken = lookahead; + strict = false; + body = parseSourceElements(); + return delegate.markEnd(delegate.createProgram(body), startToken); + } + function filterTokenLocation() { + var i, entry, token, tokens = []; + for (i = 0; i < extra.tokens.length; ++i) { + entry = extra.tokens[i]; + token = { + type: entry.type, + value: entry.value + }; + if (extra.range) { + token.range = entry.range; + } + if (extra.loc) { + token.loc = entry.loc; + } + tokens.push(token); + } + extra.tokens = tokens; + } + function tokenize(code, options) { + var toString, token, tokens; + toString = String; + if (typeof code !== "string" && !(code instanceof String)) { + code = toString(code); + } + delegate = SyntaxTreeDelegate; + source = code; + index = 0; + lineNumber = source.length > 0 ? 1 : 0; + lineStart = 0; + length = source.length; + lookahead = null; + state = { + allowIn: true, + labelSet: {}, + inFunctionBody: false, + inIteration: false, + inSwitch: false, + lastCommentStart: -1 + }; + extra = {}; + options = options || {}; + options.tokens = true; + extra.tokens = []; + extra.tokenize = true; + extra.openParenToken = -1; + extra.openCurlyToken = -1; + extra.range = typeof options.range === "boolean" && options.range; + extra.loc = typeof options.loc === "boolean" && options.loc; + if (typeof options.comment === "boolean" && options.comment) { + extra.comments = []; + } + if (typeof options.tolerant === "boolean" && options.tolerant) { + extra.errors = []; + } + try { + peek(); + if (lookahead.type === Token.EOF) { + return extra.tokens; + } + token = lex(); + while (lookahead.type !== Token.EOF) { + try { + token = lex(); + } catch (lexError) { + token = lookahead; + if (extra.errors) { + extra.errors.push(lexError); + break; + } else { + throw lexError; + } + } + } + filterTokenLocation(); + tokens = extra.tokens; + if (typeof extra.comments !== "undefined") { + tokens.comments = extra.comments; + } + if (typeof extra.errors !== "undefined") { + tokens.errors = extra.errors; + } + } catch (e) { + throw e; + } finally { + extra = {}; + } + return tokens; + } + function parse2(code, options) { + var program, toString; + toString = String; + if (typeof code !== "string" && !(code instanceof String)) { + code = toString(code); + } + delegate = SyntaxTreeDelegate; + source = code; + index = 0; + lineNumber = source.length > 0 ? 1 : 0; + lineStart = 0; + length = source.length; + lookahead = null; + state = { + allowIn: true, + labelSet: {}, + inFunctionBody: false, + inIteration: false, + inSwitch: false, + lastCommentStart: -1 + }; + extra = {}; + if (typeof options !== "undefined") { + extra.range = typeof options.range === "boolean" && options.range; + extra.loc = typeof options.loc === "boolean" && options.loc; + extra.attachComment = typeof options.attachComment === "boolean" && options.attachComment; + if (extra.loc && options.source !== null && options.source !== void 0) { + extra.source = toString(options.source); + } + if (typeof options.tokens === "boolean" && options.tokens) { + extra.tokens = []; + } + if (typeof options.comment === "boolean" && options.comment) { + extra.comments = []; + } + if (typeof options.tolerant === "boolean" && options.tolerant) { + extra.errors = []; + } + if (extra.attachComment) { + extra.range = true; + extra.comments = []; + extra.bottomRightStack = []; + extra.trailingComments = []; + extra.leadingComments = []; + } + } + try { + program = parseProgram(); + if (typeof extra.comments !== "undefined") { + program.comments = extra.comments; + } + if (typeof extra.tokens !== "undefined") { + filterTokenLocation(); + program.tokens = extra.tokens; + } + if (typeof extra.errors !== "undefined") { + program.errors = extra.errors; + } + } catch (e) { + throw e; + } finally { + extra = {}; + } + return program; + } + exports5.version = "1.2.2"; + exports5.tokenize = tokenize; + exports5.parse = parse2; + exports5.Syntax = function() { + var name, types2 = {}; + if (typeof Object.create === "function") { + types2 = /* @__PURE__ */ Object.create(null); + } + for (name in Syntax) { + if (Syntax.hasOwnProperty(name)) { + types2[name] = Syntax[name]; + } + } + if (typeof Object.freeze === "function") { + Object.freeze(types2); + } + return types2; + }(); + }); + }, {}], 1: [function(require2, module4, exports4) { + (function(process2) { + var parser = function() { + var parser2 = { + trace: function trace() { + }, + yy: {}, + symbols_: { "error": 2, "JSON_PATH": 3, "DOLLAR": 4, "PATH_COMPONENTS": 5, "LEADING_CHILD_MEMBER_EXPRESSION": 6, "PATH_COMPONENT": 7, "MEMBER_COMPONENT": 8, "SUBSCRIPT_COMPONENT": 9, "CHILD_MEMBER_COMPONENT": 10, "DESCENDANT_MEMBER_COMPONENT": 11, "DOT": 12, "MEMBER_EXPRESSION": 13, "DOT_DOT": 14, "STAR": 15, "IDENTIFIER": 16, "SCRIPT_EXPRESSION": 17, "INTEGER": 18, "END": 19, "CHILD_SUBSCRIPT_COMPONENT": 20, "DESCENDANT_SUBSCRIPT_COMPONENT": 21, "[": 22, "SUBSCRIPT": 23, "]": 24, "SUBSCRIPT_EXPRESSION": 25, "SUBSCRIPT_EXPRESSION_LIST": 26, "SUBSCRIPT_EXPRESSION_LISTABLE": 27, ",": 28, "STRING_LITERAL": 29, "ARRAY_SLICE": 30, "FILTER_EXPRESSION": 31, "QQ_STRING": 32, "Q_STRING": 33, "$accept": 0, "$end": 1 }, + terminals_: { 2: "error", 4: "DOLLAR", 12: "DOT", 14: "DOT_DOT", 15: "STAR", 16: "IDENTIFIER", 17: "SCRIPT_EXPRESSION", 18: "INTEGER", 19: "END", 22: "[", 24: "]", 28: ",", 30: "ARRAY_SLICE", 31: "FILTER_EXPRESSION", 32: "QQ_STRING", 33: "Q_STRING" }, + productions_: [0, [3, 1], [3, 2], [3, 1], [3, 2], [5, 1], [5, 2], [7, 1], [7, 1], [8, 1], [8, 1], [10, 2], [6, 1], [11, 2], [13, 1], [13, 1], [13, 1], [13, 1], [13, 1], [9, 1], [9, 1], [20, 3], [21, 4], [23, 1], [23, 1], [26, 1], [26, 3], [27, 1], [27, 1], [27, 1], [25, 1], [25, 1], [25, 1], [29, 1], [29, 1]], + performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { + if (!yy.ast) { + yy.ast = _ast; + _ast.initialize(); + } + var $0 = $$.length - 1; + switch (yystate) { + case 1: + yy.ast.set({ expression: { type: "root", value: $$[$0] } }); + yy.ast.unshift(); + return yy.ast.yield(); + break; + case 2: + yy.ast.set({ expression: { type: "root", value: $$[$0 - 1] } }); + yy.ast.unshift(); + return yy.ast.yield(); + break; + case 3: + yy.ast.unshift(); + return yy.ast.yield(); + break; + case 4: + yy.ast.set({ operation: "member", scope: "child", expression: { type: "identifier", value: $$[$0 - 1] } }); + yy.ast.unshift(); + return yy.ast.yield(); + break; + case 5: + break; + case 6: + break; + case 7: + yy.ast.set({ operation: "member" }); + yy.ast.push(); + break; + case 8: + yy.ast.set({ operation: "subscript" }); + yy.ast.push(); + break; + case 9: + yy.ast.set({ scope: "child" }); + break; + case 10: + yy.ast.set({ scope: "descendant" }); + break; + case 11: + break; + case 12: + yy.ast.set({ scope: "child", operation: "member" }); + break; + case 13: + break; + case 14: + yy.ast.set({ expression: { type: "wildcard", value: $$[$0] } }); + break; + case 15: + yy.ast.set({ expression: { type: "identifier", value: $$[$0] } }); + break; + case 16: + yy.ast.set({ expression: { type: "script_expression", value: $$[$0] } }); + break; + case 17: + yy.ast.set({ expression: { type: "numeric_literal", value: parseInt($$[$0]) } }); + break; + case 18: + break; + case 19: + yy.ast.set({ scope: "child" }); + break; + case 20: + yy.ast.set({ scope: "descendant" }); + break; + case 21: + break; + case 22: + break; + case 23: + break; + case 24: + $$[$0].length > 1 ? yy.ast.set({ expression: { type: "union", value: $$[$0] } }) : this.$ = $$[$0]; + break; + case 25: + this.$ = [$$[$0]]; + break; + case 26: + this.$ = $$[$0 - 2].concat($$[$0]); + break; + case 27: + this.$ = { expression: { type: "numeric_literal", value: parseInt($$[$0]) } }; + yy.ast.set(this.$); + break; + case 28: + this.$ = { expression: { type: "string_literal", value: $$[$0] } }; + yy.ast.set(this.$); + break; + case 29: + this.$ = { expression: { type: "slice", value: $$[$0] } }; + yy.ast.set(this.$); + break; + case 30: + this.$ = { expression: { type: "wildcard", value: $$[$0] } }; + yy.ast.set(this.$); + break; + case 31: + this.$ = { expression: { type: "script_expression", value: $$[$0] } }; + yy.ast.set(this.$); + break; + case 32: + this.$ = { expression: { type: "filter_expression", value: $$[$0] } }; + yy.ast.set(this.$); + break; + case 33: + this.$ = $$[$0]; + break; + case 34: + this.$ = $$[$0]; + break; + } + }, + table: [{ 3: 1, 4: [1, 2], 6: 3, 13: 4, 15: [1, 5], 16: [1, 6], 17: [1, 7], 18: [1, 8], 19: [1, 9] }, { 1: [3] }, { 1: [2, 1], 5: 10, 7: 11, 8: 12, 9: 13, 10: 14, 11: 15, 12: [1, 18], 14: [1, 19], 20: 16, 21: 17, 22: [1, 20] }, { 1: [2, 3], 5: 21, 7: 11, 8: 12, 9: 13, 10: 14, 11: 15, 12: [1, 18], 14: [1, 19], 20: 16, 21: 17, 22: [1, 20] }, { 1: [2, 12], 12: [2, 12], 14: [2, 12], 22: [2, 12] }, { 1: [2, 14], 12: [2, 14], 14: [2, 14], 22: [2, 14] }, { 1: [2, 15], 12: [2, 15], 14: [2, 15], 22: [2, 15] }, { 1: [2, 16], 12: [2, 16], 14: [2, 16], 22: [2, 16] }, { 1: [2, 17], 12: [2, 17], 14: [2, 17], 22: [2, 17] }, { 1: [2, 18], 12: [2, 18], 14: [2, 18], 22: [2, 18] }, { 1: [2, 2], 7: 22, 8: 12, 9: 13, 10: 14, 11: 15, 12: [1, 18], 14: [1, 19], 20: 16, 21: 17, 22: [1, 20] }, { 1: [2, 5], 12: [2, 5], 14: [2, 5], 22: [2, 5] }, { 1: [2, 7], 12: [2, 7], 14: [2, 7], 22: [2, 7] }, { 1: [2, 8], 12: [2, 8], 14: [2, 8], 22: [2, 8] }, { 1: [2, 9], 12: [2, 9], 14: [2, 9], 22: [2, 9] }, { 1: [2, 10], 12: [2, 10], 14: [2, 10], 22: [2, 10] }, { 1: [2, 19], 12: [2, 19], 14: [2, 19], 22: [2, 19] }, { 1: [2, 20], 12: [2, 20], 14: [2, 20], 22: [2, 20] }, { 13: 23, 15: [1, 5], 16: [1, 6], 17: [1, 7], 18: [1, 8], 19: [1, 9] }, { 13: 24, 15: [1, 5], 16: [1, 6], 17: [1, 7], 18: [1, 8], 19: [1, 9], 22: [1, 25] }, { 15: [1, 29], 17: [1, 30], 18: [1, 33], 23: 26, 25: 27, 26: 28, 27: 32, 29: 34, 30: [1, 35], 31: [1, 31], 32: [1, 36], 33: [1, 37] }, { 1: [2, 4], 7: 22, 8: 12, 9: 13, 10: 14, 11: 15, 12: [1, 18], 14: [1, 19], 20: 16, 21: 17, 22: [1, 20] }, { 1: [2, 6], 12: [2, 6], 14: [2, 6], 22: [2, 6] }, { 1: [2, 11], 12: [2, 11], 14: [2, 11], 22: [2, 11] }, { 1: [2, 13], 12: [2, 13], 14: [2, 13], 22: [2, 13] }, { 15: [1, 29], 17: [1, 30], 18: [1, 33], 23: 38, 25: 27, 26: 28, 27: 32, 29: 34, 30: [1, 35], 31: [1, 31], 32: [1, 36], 33: [1, 37] }, { 24: [1, 39] }, { 24: [2, 23] }, { 24: [2, 24], 28: [1, 40] }, { 24: [2, 30] }, { 24: [2, 31] }, { 24: [2, 32] }, { 24: [2, 25], 28: [2, 25] }, { 24: [2, 27], 28: [2, 27] }, { 24: [2, 28], 28: [2, 28] }, { 24: [2, 29], 28: [2, 29] }, { 24: [2, 33], 28: [2, 33] }, { 24: [2, 34], 28: [2, 34] }, { 24: [1, 41] }, { 1: [2, 21], 12: [2, 21], 14: [2, 21], 22: [2, 21] }, { 18: [1, 33], 27: 42, 29: 34, 30: [1, 35], 32: [1, 36], 33: [1, 37] }, { 1: [2, 22], 12: [2, 22], 14: [2, 22], 22: [2, 22] }, { 24: [2, 26], 28: [2, 26] }], + defaultActions: { 27: [2, 23], 29: [2, 30], 30: [2, 31], 31: [2, 32] }, + parseError: function parseError(str, hash2) { + if (hash2.recoverable) { + this.trace(str); + } else { + throw new Error(str); + } + }, + parse: function parse2(input) { + var self2 = this, stack = [0], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1; + var args = lstack.slice.call(arguments, 1); + this.lexer.setInput(input); + this.lexer.yy = this.yy; + this.yy.lexer = this.lexer; + this.yy.parser = this; + if (typeof this.lexer.yylloc == "undefined") { + this.lexer.yylloc = {}; + } + var yyloc = this.lexer.yylloc; + lstack.push(yyloc); + var ranges = this.lexer.options && this.lexer.options.ranges; + if (typeof this.yy.parseError === "function") { + this.parseError = this.yy.parseError; + } else { + this.parseError = Object.getPrototypeOf(this).parseError; + } + function lex() { + var token; + token = self2.lexer.lex() || EOF; + if (typeof token !== "number") { + token = self2.symbols_[token] || token; + } + return token; + } + var symbol, preErrorSymbol, state, action, r, yyval = {}, p, len, newState, expected; + while (true) { + state = stack[stack.length - 1]; + if (this.defaultActions[state]) { + action = this.defaultActions[state]; + } else { + if (symbol === null || typeof symbol == "undefined") { + symbol = lex(); + } + action = table[state] && table[state][symbol]; + } + if (typeof action === "undefined" || !action.length || !action[0]) { + var errStr = ""; + expected = []; + for (p in table[state]) { + if (this.terminals_[p] && p > TERROR) { + expected.push("'" + this.terminals_[p] + "'"); + } + } + if (this.lexer.showPosition) { + errStr = "Parse error on line " + (yylineno + 1) + ":\n" + this.lexer.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; + } else { + errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); + } + this.parseError(errStr, { + text: this.lexer.match, + token: this.terminals_[symbol] || symbol, + line: this.lexer.yylineno, + loc: yyloc, + expected + }); + } + if (action[0] instanceof Array && action.length > 1) { + throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(this.lexer.yytext); + lstack.push(this.lexer.yylloc); + stack.push(action[1]); + symbol = null; + if (!preErrorSymbol) { + yyleng = this.lexer.yyleng; + yytext = this.lexer.yytext; + yylineno = this.lexer.yylineno; + yyloc = this.lexer.yylloc; + } else { + symbol = preErrorSymbol; + preErrorSymbol = null; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = { + first_line: lstack[lstack.length - (len || 1)].first_line, + last_line: lstack[lstack.length - 1].last_line, + first_column: lstack[lstack.length - (len || 1)].first_column, + last_column: lstack[lstack.length - 1].last_column + }; + if (ranges) { + yyval._$.range = [ + lstack[lstack.length - (len || 1)].range[0], + lstack[lstack.length - 1].range[1] + ]; + } + r = this.performAction.apply(yyval, [ + yytext, + yyleng, + yylineno, + this.yy, + action[1], + vstack, + lstack + ].concat(args)); + if (typeof r !== "undefined") { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } + } + return true; + } + }; + var _ast = { + initialize: function() { + this._nodes = []; + this._node = {}; + this._stash = []; + }, + set: function(props) { + for (var k in props) this._node[k] = props[k]; + return this._node; + }, + node: function(obj) { + if (arguments.length) this._node = obj; + return this._node; + }, + push: function() { + this._nodes.push(this._node); + this._node = {}; + }, + unshift: function() { + this._nodes.unshift(this._node); + this._node = {}; + }, + yield: function() { + var _nodes = this._nodes; + this.initialize(); + return _nodes; + } + }; + var lexer = /* @__PURE__ */ function() { + var lexer2 = { + EOF: 1, + parseError: function parseError(str, hash2) { + if (this.yy.parser) { + this.yy.parser.parseError(str, hash2); + } else { + throw new Error(str); + } + }, + // resets the lexer, sets new input + setInput: function(input) { + this._input = input; + this._more = this._backtrack = this.done = false; + this.yylineno = this.yyleng = 0; + this.yytext = this.matched = this.match = ""; + this.conditionStack = ["INITIAL"]; + this.yylloc = { + first_line: 1, + first_column: 0, + last_line: 1, + last_column: 0 + }; + if (this.options.ranges) { + this.yylloc.range = [0, 0]; + } + this.offset = 0; + return this; + }, + // consumes and returns one char from the input + input: function() { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) { + this.yylloc.range[1]++; + } + this._input = this._input.slice(1); + return ch; + }, + // unshifts one char (or a string) into the input + unput: function(ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length - len - 1); + this.offset -= len; + var oldLines = this.match.split(/(?:\r\n?|\n)/g); + this.match = this.match.substr(0, this.match.length - 1); + this.matched = this.matched.substr(0, this.matched.length - 1); + if (lines.length - 1) { + this.yylineno -= lines.length - 1; + } + var r = this.yylloc.range; + this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len + }; + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + this.yyleng = this.yytext.length; + return this; + }, + // When called from action, caches matched text and appends it on next action + more: function() { + this._more = true; + return this; + }, + // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. + reject: function() { + if (this.options.backtrack_lexer) { + this._backtrack = true; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + return this; + }, + // retain first n characters of the match + less: function(n) { + this.unput(this.match.slice(n)); + }, + // displays already matched input, i.e. for error messages + pastInput: function() { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); + }, + // displays upcoming input, i.e. for error messages + upcomingInput: function() { + var next = this.match; + if (next.length < 20) { + next += this._input.substr(0, 20 - next.length); + } + return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, ""); + }, + // displays the character position where the lexing error occurred, i.e. for error messages + showPosition: function() { + var pre = this.pastInput(); + var c = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c + "^"; + }, + // test the lexed token: return FALSE when not a match, otherwise return token + test_match: function(match, indexed_rule) { + var token, lines, backup; + if (this.options.backtrack_lexer) { + backup = { + yylineno: this.yylineno, + yylloc: { + first_line: this.yylloc.first_line, + last_line: this.last_line, + first_column: this.yylloc.first_column, + last_column: this.yylloc.last_column + }, + yytext: this.yytext, + match: this.match, + matches: this.matches, + matched: this.matched, + yyleng: this.yyleng, + offset: this.offset, + _more: this._more, + _input: this._input, + yy: this.yy, + conditionStack: this.conditionStack.slice(0), + done: this.done + }; + if (this.options.ranges) { + backup.yylloc.range = this.yylloc.range.slice(0); + } + } + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno += lines.length; + } + this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length + }; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; + } + this._more = false; + this._backtrack = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); + if (this.done && this._input) { + this.done = false; + } + if (token) { + return token; + } else if (this._backtrack) { + for (var k in backup) { + this[k] = backup[k]; + } + return false; + } + return false; + }, + // return next match in input + next: function() { + if (this.done) { + return this.EOF; + } + if (!this._input) { + this.done = true; + } + var token, match, tempMatch, index; + if (!this._more) { + this.yytext = ""; + this.match = ""; + } + var rules = this._currentRules(); + for (var i = 0; i < rules.length; i++) { + tempMatch = this._input.match(this.rules[rules[i]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index = i; + if (this.options.backtrack_lexer) { + token = this.test_match(tempMatch, rules[i]); + if (token !== false) { + return token; + } else if (this._backtrack) { + match = false; + continue; + } else { + return false; + } + } else if (!this.options.flex) { + break; + } + } + } + if (match) { + token = this.test_match(match, rules[index]); + if (token !== false) { + return token; + } + return false; + } + if (this._input === "") { + return this.EOF; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + }, + // return next match that has a token + lex: function lex() { + var r = this.next(); + if (r) { + return r; + } else { + return this.lex(); + } + }, + // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) + begin: function begin2(condition) { + this.conditionStack.push(condition); + }, + // pop the previously active lexer condition state off the condition stack + popState: function popState() { + var n = this.conditionStack.length - 1; + if (n > 0) { + return this.conditionStack.pop(); + } else { + return this.conditionStack[0]; + } + }, + // produce the lexer rule set which is active for the currently active lexer condition state + _currentRules: function _currentRules() { + if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { + return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; + } else { + return this.conditions["INITIAL"].rules; + } + }, + // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available + topState: function topState(n) { + n = this.conditionStack.length - 1 - Math.abs(n || 0); + if (n >= 0) { + return this.conditionStack[n]; + } else { + return "INITIAL"; + } + }, + // alias for begin(condition) + pushState: function pushState(condition) { + this.begin(condition); + }, + // return the number of states currently on the stack + stateStackSize: function stateStackSize() { + return this.conditionStack.length; + }, + options: {}, + performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { + switch ($avoiding_name_collisions) { + case 0: + return 4; + break; + case 1: + return 14; + break; + case 2: + return 12; + break; + case 3: + return 15; + break; + case 4: + return 16; + break; + case 5: + return 22; + break; + case 6: + return 24; + break; + case 7: + return 28; + break; + case 8: + return 30; + break; + case 9: + return 18; + break; + case 10: + yy_.yytext = yy_.yytext.substr(1, yy_.yyleng - 2); + return 32; + break; + case 11: + yy_.yytext = yy_.yytext.substr(1, yy_.yyleng - 2); + return 33; + break; + case 12: + return 17; + break; + case 13: + return 31; + break; + } + }, + rules: [/^(?:\$)/, /^(?:\.\.)/, /^(?:\.)/, /^(?:\*)/, /^(?:[a-zA-Z_]+[a-zA-Z0-9_]*)/, /^(?:\[)/, /^(?:\])/, /^(?:,)/, /^(?:((-?(?:0|[1-9][0-9]*)))?\:((-?(?:0|[1-9][0-9]*)))?(\:((-?(?:0|[1-9][0-9]*)))?)?)/, /^(?:(-?(?:0|[1-9][0-9]*)))/, /^(?:"(?:\\["bfnrt/\\]|\\u[a-fA-F0-9]{4}|[^"\\])*")/, /^(?:'(?:\\['bfnrt/\\]|\\u[a-fA-F0-9]{4}|[^'\\])*')/, /^(?:\(.+?\)(?=\]))/, /^(?:\?\(.+?\)(?=\]))/], + conditions: { "INITIAL": { "rules": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13], "inclusive": true } } + }; + return lexer2; + }(); + parser2.lexer = lexer; + function Parser() { + this.yy = {}; + } + Parser.prototype = parser2; + parser2.Parser = Parser; + return new Parser(); + }(); + if (typeof require2 !== "undefined" && typeof exports4 !== "undefined") { + exports4.parser = parser; + exports4.Parser = parser.Parser; + exports4.parse = function() { + return parser.parse.apply(parser, arguments); + }; + exports4.main = function commonjsMain(args) { + if (!args[1]) { + console.log("Usage: " + args[0] + " FILE"); + process2.exit(1); + } + var source = require2("fs").readFileSync(require2("path").normalize(args[1]), "utf8"); + return exports4.parser.parse(source); + }; + if (typeof module4 !== "undefined" && require2.main === module4) { + exports4.main(process2.argv.slice(1)); + } + } + }).call(this, require2("_process")); + }, { "_process": 12, "fs": 8, "path": 11 }], 2: [function(require2, module4, exports4) { + module4.exports = { + identifier: "[a-zA-Z_]+[a-zA-Z0-9_]*", + integer: "-?(?:0|[1-9][0-9]*)", + qq_string: '"(?:\\\\["bfnrt/\\\\]|\\\\u[a-fA-F0-9]{4}|[^"\\\\])*"', + q_string: "'(?:\\\\['bfnrt/\\\\]|\\\\u[a-fA-F0-9]{4}|[^'\\\\])*'" + }; + }, {}], 3: [function(require2, module4, exports4) { + var dict = require2("./dict"); + var fs = require2("fs"); + var grammar = { + lex: { + macros: { + esc: "\\\\", + int: dict.integer + }, + rules: [ + ["\\$", "return 'DOLLAR'"], + ["\\.\\.", "return 'DOT_DOT'"], + ["\\.", "return 'DOT'"], + ["\\*", "return 'STAR'"], + [dict.identifier, "return 'IDENTIFIER'"], + ["\\[", "return '['"], + ["\\]", "return ']'"], + [",", "return ','"], + ["({int})?\\:({int})?(\\:({int})?)?", "return 'ARRAY_SLICE'"], + ["{int}", "return 'INTEGER'"], + [dict.qq_string, "yytext = yytext.substr(1,yyleng-2); return 'QQ_STRING';"], + [dict.q_string, "yytext = yytext.substr(1,yyleng-2); return 'Q_STRING';"], + ["\\(.+?\\)(?=\\])", "return 'SCRIPT_EXPRESSION'"], + ["\\?\\(.+?\\)(?=\\])", "return 'FILTER_EXPRESSION'"] + ] + }, + start: "JSON_PATH", + bnf: { + JSON_PATH: [ + ["DOLLAR", 'yy.ast.set({ expression: { type: "root", value: $1 } }); yy.ast.unshift(); return yy.ast.yield()'], + ["DOLLAR PATH_COMPONENTS", 'yy.ast.set({ expression: { type: "root", value: $1 } }); yy.ast.unshift(); return yy.ast.yield()'], + ["LEADING_CHILD_MEMBER_EXPRESSION", "yy.ast.unshift(); return yy.ast.yield()"], + ["LEADING_CHILD_MEMBER_EXPRESSION PATH_COMPONENTS", 'yy.ast.set({ operation: "member", scope: "child", expression: { type: "identifier", value: $1 }}); yy.ast.unshift(); return yy.ast.yield()'] + ], + PATH_COMPONENTS: [ + ["PATH_COMPONENT", ""], + ["PATH_COMPONENTS PATH_COMPONENT", ""] + ], + PATH_COMPONENT: [ + ["MEMBER_COMPONENT", 'yy.ast.set({ operation: "member" }); yy.ast.push()'], + ["SUBSCRIPT_COMPONENT", 'yy.ast.set({ operation: "subscript" }); yy.ast.push() '] + ], + MEMBER_COMPONENT: [ + ["CHILD_MEMBER_COMPONENT", 'yy.ast.set({ scope: "child" })'], + ["DESCENDANT_MEMBER_COMPONENT", 'yy.ast.set({ scope: "descendant" })'] + ], + CHILD_MEMBER_COMPONENT: [ + ["DOT MEMBER_EXPRESSION", ""] + ], + LEADING_CHILD_MEMBER_EXPRESSION: [ + ["MEMBER_EXPRESSION", 'yy.ast.set({ scope: "child", operation: "member" })'] + ], + DESCENDANT_MEMBER_COMPONENT: [ + ["DOT_DOT MEMBER_EXPRESSION", ""] + ], + MEMBER_EXPRESSION: [ + ["STAR", 'yy.ast.set({ expression: { type: "wildcard", value: $1 } })'], + ["IDENTIFIER", 'yy.ast.set({ expression: { type: "identifier", value: $1 } })'], + ["SCRIPT_EXPRESSION", 'yy.ast.set({ expression: { type: "script_expression", value: $1 } })'], + ["INTEGER", 'yy.ast.set({ expression: { type: "numeric_literal", value: parseInt($1) } })'], + ["END", ""] + ], + SUBSCRIPT_COMPONENT: [ + ["CHILD_SUBSCRIPT_COMPONENT", 'yy.ast.set({ scope: "child" })'], + ["DESCENDANT_SUBSCRIPT_COMPONENT", 'yy.ast.set({ scope: "descendant" })'] + ], + CHILD_SUBSCRIPT_COMPONENT: [ + ["[ SUBSCRIPT ]", ""] + ], + DESCENDANT_SUBSCRIPT_COMPONENT: [ + ["DOT_DOT [ SUBSCRIPT ]", ""] + ], + SUBSCRIPT: [ + ["SUBSCRIPT_EXPRESSION", ""], + ["SUBSCRIPT_EXPRESSION_LIST", '$1.length > 1? yy.ast.set({ expression: { type: "union", value: $1 } }) : $$ = $1'] + ], + SUBSCRIPT_EXPRESSION_LIST: [ + ["SUBSCRIPT_EXPRESSION_LISTABLE", "$$ = [$1]"], + ["SUBSCRIPT_EXPRESSION_LIST , SUBSCRIPT_EXPRESSION_LISTABLE", "$$ = $1.concat($3)"] + ], + SUBSCRIPT_EXPRESSION_LISTABLE: [ + ["INTEGER", '$$ = { expression: { type: "numeric_literal", value: parseInt($1) } }; yy.ast.set($$)'], + ["STRING_LITERAL", '$$ = { expression: { type: "string_literal", value: $1 } }; yy.ast.set($$)'], + ["ARRAY_SLICE", '$$ = { expression: { type: "slice", value: $1 } }; yy.ast.set($$)'] + ], + SUBSCRIPT_EXPRESSION: [ + ["STAR", '$$ = { expression: { type: "wildcard", value: $1 } }; yy.ast.set($$)'], + ["SCRIPT_EXPRESSION", '$$ = { expression: { type: "script_expression", value: $1 } }; yy.ast.set($$)'], + ["FILTER_EXPRESSION", '$$ = { expression: { type: "filter_expression", value: $1 } }; yy.ast.set($$)'] + ], + STRING_LITERAL: [ + ["QQ_STRING", "$$ = $1"], + ["Q_STRING", "$$ = $1"] + ] + } + }; + if (fs.readFileSync) { + grammar.moduleInclude = fs.readFileSync(require2.resolve("../include/module.js")); + grammar.actionInclude = fs.readFileSync(require2.resolve("../include/action.js")); + } + module4.exports = grammar; + }, { "./dict": 2, "fs": 8 }], 4: [function(require2, module4, exports4) { + var aesprim = require2("./aesprim"); + var slice = require2("./slice"); + var _evaluate = require2("static-eval"); + var _uniq = require2("underscore").uniq; + var Handlers = function() { + return this.initialize.apply(this, arguments); + }; + Handlers.prototype.initialize = function() { + this.traverse = traverser(true); + this.descend = traverser(); + }; + Handlers.prototype.keys = Object.keys; + Handlers.prototype.resolve = function(component) { + var key = [component.operation, component.scope, component.expression.type].join("-"); + var method = this._fns[key]; + if (!method) throw new Error("couldn't resolve key: " + key); + return method.bind(this); + }; + Handlers.prototype.register = function(key, handler) { + if (!handler instanceof Function) { + throw new Error("handler must be a function"); + } + this._fns[key] = handler; + }; + Handlers.prototype._fns = { + "member-child-identifier": function(component, partial) { + var key = component.expression.value; + var value = partial.value; + if (value instanceof Object && key in value) { + return [{ value: value[key], path: partial.path.concat(key) }]; + } + }, + "member-descendant-identifier": _traverse(function(key, value, ref) { + return key == ref; + }), + "subscript-child-numeric_literal": _descend(function(key, value, ref) { + return key === ref; + }), + "member-child-numeric_literal": _descend(function(key, value, ref) { + return String(key) === String(ref); + }), + "subscript-descendant-numeric_literal": _traverse(function(key, value, ref) { + return key === ref; + }), + "member-child-wildcard": _descend(function() { + return true; + }), + "member-descendant-wildcard": _traverse(function() { + return true; + }), + "subscript-descendant-wildcard": _traverse(function() { + return true; + }), + "subscript-child-wildcard": _descend(function() { + return true; + }), + "subscript-child-slice": function(component, partial) { + if (is_array(partial.value)) { + var args = component.expression.value.split(":").map(_parse_nullable_int); + var values = partial.value.map(function(v, i) { + return { value: v, path: partial.path.concat(i) }; + }); + return slice.apply(null, [values].concat(args)); + } + }, + "subscript-child-union": function(component, partial) { + var results = []; + component.expression.value.forEach(function(component2) { + var _component = { operation: "subscript", scope: "child", expression: component2.expression }; + var handler = this.resolve(_component); + var _results = handler(_component, partial); + if (_results) { + results = results.concat(_results); + } + }, this); + return unique2(results); + }, + "subscript-descendant-union": function(component, partial, count) { + var jp = require2(".."); + var self2 = this; + var results = []; + var nodes = jp.nodes(partial, "$..*").slice(1); + nodes.forEach(function(node) { + if (results.length >= count) return; + component.expression.value.forEach(function(component2) { + var _component = { operation: "subscript", scope: "child", expression: component2.expression }; + var handler = self2.resolve(_component); + var _results = handler(_component, node); + results = results.concat(_results); + }); + }); + return unique2(results); + }, + "subscript-child-filter_expression": function(component, partial, count) { + var src = component.expression.value.slice(2, -1); + var ast = aesprim.parse(src).body[0].expression; + var passable = function(key, value) { + return evaluate(ast, { "@": value }); + }; + return this.descend(partial, null, passable, count); + }, + "subscript-descendant-filter_expression": function(component, partial, count) { + var src = component.expression.value.slice(2, -1); + var ast = aesprim.parse(src).body[0].expression; + var passable = function(key, value) { + return evaluate(ast, { "@": value }); + }; + return this.traverse(partial, null, passable, count); + }, + "subscript-child-script_expression": function(component, partial) { + var exp = component.expression.value.slice(1, -1); + return eval_recurse(partial, exp, "$[{{value}}]"); + }, + "member-child-script_expression": function(component, partial) { + var exp = component.expression.value.slice(1, -1); + return eval_recurse(partial, exp, "$.{{value}}"); + }, + "member-descendant-script_expression": function(component, partial) { + var exp = component.expression.value.slice(1, -1); + return eval_recurse(partial, exp, "$..value"); + } + }; + Handlers.prototype._fns["subscript-child-string_literal"] = Handlers.prototype._fns["member-child-identifier"]; + Handlers.prototype._fns["member-descendant-numeric_literal"] = Handlers.prototype._fns["subscript-descendant-string_literal"] = Handlers.prototype._fns["member-descendant-identifier"]; + function eval_recurse(partial, src, template2) { + var jp = require2("./index"); + var ast = aesprim.parse(src).body[0].expression; + var value = evaluate(ast, { "@": partial.value }); + var path = template2.replace(/\{\{\s*value\s*\}\}/g, value); + var results = jp.nodes(partial.value, path); + results.forEach(function(r) { + r.path = partial.path.concat(r.path.slice(1)); + }); + return results; + } + function is_array(val) { + return Array.isArray(val); + } + function is_object(val) { + return val && !(val instanceof Array) && val instanceof Object; + } + function traverser(recurse) { + return function(partial, ref, passable, count) { + var value = partial.value; + var path = partial.path; + var results = []; + var descend = function(value2, path2) { + if (is_array(value2)) { + value2.forEach(function(element, index) { + if (results.length >= count) { + return; + } + if (passable(index, element, ref)) { + results.push({ path: path2.concat(index), value: element }); + } + }); + value2.forEach(function(element, index) { + if (results.length >= count) { + return; + } + if (recurse) { + descend(element, path2.concat(index)); + } + }); + } else if (is_object(value2)) { + this.keys(value2).forEach(function(k) { + if (results.length >= count) { + return; + } + if (passable(k, value2[k], ref)) { + results.push({ path: path2.concat(k), value: value2[k] }); + } + }); + this.keys(value2).forEach(function(k) { + if (results.length >= count) { + return; + } + if (recurse) { + descend(value2[k], path2.concat(k)); + } + }); + } + }.bind(this); + descend(value, path); + return results; + }; + } + function _descend(passable) { + return function(component, partial, count) { + return this.descend(partial, component.expression.value, passable, count); + }; + } + function _traverse(passable) { + return function(component, partial, count) { + return this.traverse(partial, component.expression.value, passable, count); + }; + } + function evaluate() { + try { + return _evaluate.apply(this, arguments); + } catch (e) { + } + } + function unique2(results) { + results = results.filter(function(d) { + return d; + }); + return _uniq( + results, + function(r) { + return r.path.map(function(c) { + return String(c).replace("-", "--"); + }).join("-"); + } + ); + } + function _parse_nullable_int(val) { + var sval = String(val); + return sval.match(/^-?[0-9]+$/) ? parseInt(sval) : null; + } + module4.exports = Handlers; + }, { "..": "jsonpath", "./aesprim": "./aesprim", "./index": 5, "./slice": 7, "static-eval": 15, "underscore": 8 }], 5: [function(require2, module4, exports4) { + var assert = require2("assert"); + var dict = require2("./dict"); + var Parser = require2("./parser"); + var Handlers = require2("./handlers"); + var JSONPath = function() { + this.initialize.apply(this, arguments); + }; + JSONPath.prototype.initialize = function() { + this.parser = new Parser(); + this.handlers = new Handlers(); + }; + JSONPath.prototype.parse = function(string) { + assert.ok(_is_string(string), "we need a path"); + return this.parser.parse(string); + }; + JSONPath.prototype.parent = function(obj, string) { + assert.ok(obj instanceof Object, "obj needs to be an object"); + assert.ok(string, "we need a path"); + var node = this.nodes(obj, string)[0]; + var key = node.path.pop(); + return this.value(obj, node.path); + }; + JSONPath.prototype.apply = function(obj, string, fn) { + assert.ok(obj instanceof Object, "obj needs to be an object"); + assert.ok(string, "we need a path"); + assert.equal(typeof fn, "function", "fn needs to be function"); + var nodes = this.nodes(obj, string).sort(function(a, b) { + return b.path.length - a.path.length; + }); + nodes.forEach(function(node) { + var key = node.path.pop(); + var parent = this.value(obj, this.stringify(node.path)); + var val = node.value = fn.call(obj, parent[key]); + parent[key] = val; + }, this); + return nodes; + }; + JSONPath.prototype.value = function(obj, path, value) { + assert.ok(obj instanceof Object, "obj needs to be an object"); + assert.ok(path, "we need a path"); + if (arguments.length >= 3) { + var node = this.nodes(obj, path).shift(); + if (!node) return this._vivify(obj, path, value); + var key = node.path.slice(-1).shift(); + var parent = this.parent(obj, this.stringify(node.path)); + parent[key] = value; + } + return this.query(obj, this.stringify(path), 1).shift(); + }; + JSONPath.prototype._vivify = function(obj, string, value) { + var self2 = this; + assert.ok(obj instanceof Object, "obj needs to be an object"); + assert.ok(string, "we need a path"); + var path = this.parser.parse(string).map(function(component) { + return component.expression.value; + }); + var setValue = function(path2, value2) { + var key = path2.pop(); + var node = self2.value(obj, path2); + if (!node) { + setValue(path2.concat(), typeof key === "string" ? {} : []); + node = self2.value(obj, path2); + } + node[key] = value2; + }; + setValue(path, value); + return this.query(obj, string)[0]; + }; + JSONPath.prototype.query = function(obj, string, count) { + assert.ok(obj instanceof Object, "obj needs to be an object"); + assert.ok(_is_string(string), "we need a path"); + var results = this.nodes(obj, string, count).map(function(r) { + return r.value; + }); + return results; + }; + JSONPath.prototype.paths = function(obj, string, count) { + assert.ok(obj instanceof Object, "obj needs to be an object"); + assert.ok(string, "we need a path"); + var results = this.nodes(obj, string, count).map(function(r) { + return r.path; + }); + return results; + }; + JSONPath.prototype.nodes = function(obj, string, count) { + assert.ok(obj instanceof Object, "obj needs to be an object"); + assert.ok(string, "we need a path"); + if (count === 0) return []; + var path = this.parser.parse(string); + var handlers = this.handlers; + var partials = [{ path: ["$"], value: obj }]; + var matches = []; + if (path.length && path[0].expression.type == "root") path.shift(); + if (!path.length) return partials; + path.forEach(function(component, index) { + if (matches.length >= count) return; + var handler = handlers.resolve(component); + var _partials = []; + partials.forEach(function(p) { + if (matches.length >= count) return; + var results = handler(component, p, count); + if (index == path.length - 1) { + matches = matches.concat(results || []); + } else { + _partials = _partials.concat(results || []); + } + }); + partials = _partials; + }); + return count ? matches.slice(0, count) : matches; + }; + JSONPath.prototype.stringify = function(path) { + assert.ok(path, "we need a path"); + var string = "$"; + var templates = { + "descendant-member": "..{{value}}", + "child-member": ".{{value}}", + "descendant-subscript": "..[{{value}}]", + "child-subscript": "[{{value}}]" + }; + path = this._normalize(path); + path.forEach(function(component) { + if (component.expression.type == "root") return; + var key = [component.scope, component.operation].join("-"); + var template2 = templates[key]; + var value; + if (component.expression.type == "string_literal") { + value = JSON.stringify(component.expression.value); + } else { + value = component.expression.value; + } + if (!template2) throw new Error("couldn't find template " + key); + string += template2.replace(/{{value}}/, value); + }); + return string; + }; + JSONPath.prototype._normalize = function(path) { + assert.ok(path, "we need a path"); + if (typeof path == "string") { + return this.parser.parse(path); + } else if (Array.isArray(path) && typeof path[0] == "string") { + var _path = [{ expression: { type: "root", value: "$" } }]; + path.forEach(function(component, index) { + if (component == "$" && index === 0) return; + if (typeof component == "string" && component.match("^" + dict.identifier + "$")) { + _path.push({ + operation: "member", + scope: "child", + expression: { value: component, type: "identifier" } + }); + } else { + var type = typeof component == "number" ? "numeric_literal" : "string_literal"; + _path.push({ + operation: "subscript", + scope: "child", + expression: { value: component, type } + }); + } + }); + return _path; + } else if (Array.isArray(path) && typeof path[0] == "object") { + return path; + } + throw new Error("couldn't understand path " + path); + }; + function _is_string(obj) { + return Object.prototype.toString.call(obj) == "[object String]"; + } + JSONPath.Handlers = Handlers; + JSONPath.Parser = Parser; + var instance = new JSONPath(); + instance.JSONPath = JSONPath; + module4.exports = instance; + }, { "./dict": 2, "./handlers": 4, "./parser": 6, "assert": 9 }], 6: [function(require2, module4, exports4) { + var grammar = require2("./grammar"); + var gparser = require2("../generated/parser"); + var Parser = function() { + var parser = new gparser.Parser(); + var _parseError = parser.parseError; + parser.yy.parseError = function() { + if (parser.yy.ast) { + parser.yy.ast.initialize(); + } + _parseError.apply(parser, arguments); + }; + return parser; + }; + Parser.grammar = grammar; + module4.exports = Parser; + }, { "../generated/parser": 1, "./grammar": 3 }], 7: [function(require2, module4, exports4) { + module4.exports = function(arr, start, end2, step) { + if (typeof start == "string") throw new Error("start cannot be a string"); + if (typeof end2 == "string") throw new Error("end cannot be a string"); + if (typeof step == "string") throw new Error("step cannot be a string"); + var len = arr.length; + if (step === 0) throw new Error("step cannot be zero"); + step = step ? integer(step) : 1; + start = start < 0 ? len + start : start; + end2 = end2 < 0 ? len + end2 : end2; + start = integer(start === 0 ? 0 : !start ? step > 0 ? 0 : len - 1 : start); + end2 = integer(end2 === 0 ? 0 : !end2 ? step > 0 ? len : -1 : end2); + start = step > 0 ? Math.max(0, start) : Math.min(len, start); + end2 = step > 0 ? Math.min(end2, len) : Math.max(-1, end2); + if (step > 0 && end2 <= start) return []; + if (step < 0 && start <= end2) return []; + var result = []; + for (var i = start; i != end2; i += step) { + if (step < 0 && i <= end2 || step > 0 && i >= end2) break; + result.push(arr[i]); + } + return result; + }; + function integer(val) { + return String(val).match(/^[0-9]+$/) ? parseInt(val) : Number.isFinite(val) ? parseInt(val, 10) : 0; + } + }, {}], 8: [function(require2, module4, exports4) { + }, {}], 9: [function(require2, module4, exports4) { + var util2 = require2("util/"); + var pSlice = Array.prototype.slice; + var hasOwn = Object.prototype.hasOwnProperty; + var assert = module4.exports = ok; + assert.AssertionError = function AssertionError(options) { + this.name = "AssertionError"; + this.actual = options.actual; + this.expected = options.expected; + this.operator = options.operator; + if (options.message) { + this.message = options.message; + this.generatedMessage = false; + } else { + this.message = getMessage(this); + this.generatedMessage = true; + } + var stackStartFunction = options.stackStartFunction || fail; + if (Error.captureStackTrace) { + Error.captureStackTrace(this, stackStartFunction); + } else { + var err = new Error(); + if (err.stack) { + var out = err.stack; + var fn_name = stackStartFunction.name; + var idx = out.indexOf("\n" + fn_name); + if (idx >= 0) { + var next_line = out.indexOf("\n", idx + 1); + out = out.substring(next_line + 1); + } + this.stack = out; + } + } + }; + util2.inherits(assert.AssertionError, Error); + function replacer(key, value) { + if (util2.isUndefined(value)) { + return "" + value; + } + if (util2.isNumber(value) && !isFinite(value)) { + return value.toString(); + } + if (util2.isFunction(value) || util2.isRegExp(value)) { + return value.toString(); + } + return value; + } + function truncate(s, n) { + if (util2.isString(s)) { + return s.length < n ? s : s.slice(0, n); + } else { + return s; + } + } + function getMessage(self2) { + return truncate(JSON.stringify(self2.actual, replacer), 128) + " " + self2.operator + " " + truncate(JSON.stringify(self2.expected, replacer), 128); + } + function fail(actual, expected, message, operator, stackStartFunction) { + throw new assert.AssertionError({ + message, + actual, + expected, + operator, + stackStartFunction + }); + } + assert.fail = fail; + function ok(value, message) { + if (!value) fail(value, true, message, "==", assert.ok); + } + assert.ok = ok; + assert.equal = function equal(actual, expected, message) { + if (actual != expected) fail(actual, expected, message, "==", assert.equal); + }; + assert.notEqual = function notEqual(actual, expected, message) { + if (actual == expected) { + fail(actual, expected, message, "!=", assert.notEqual); + } + }; + assert.deepEqual = function deepEqual(actual, expected, message) { + if (!_deepEqual(actual, expected)) { + fail(actual, expected, message, "deepEqual", assert.deepEqual); + } + }; + function _deepEqual(actual, expected) { + if (actual === expected) { + return true; + } else if (util2.isBuffer(actual) && util2.isBuffer(expected)) { + if (actual.length != expected.length) return false; + for (var i = 0; i < actual.length; i++) { + if (actual[i] !== expected[i]) return false; + } + return true; + } else if (util2.isDate(actual) && util2.isDate(expected)) { + return actual.getTime() === expected.getTime(); + } else if (util2.isRegExp(actual) && util2.isRegExp(expected)) { + return actual.source === expected.source && actual.global === expected.global && actual.multiline === expected.multiline && actual.lastIndex === expected.lastIndex && actual.ignoreCase === expected.ignoreCase; + } else if (!util2.isObject(actual) && !util2.isObject(expected)) { + return actual == expected; + } else { + return objEquiv(actual, expected); + } + } + function isArguments(object) { + return Object.prototype.toString.call(object) == "[object Arguments]"; + } + function objEquiv(a, b) { + if (util2.isNullOrUndefined(a) || util2.isNullOrUndefined(b)) + return false; + if (a.prototype !== b.prototype) return false; + if (util2.isPrimitive(a) || util2.isPrimitive(b)) { + return a === b; + } + var aIsArgs = isArguments(a), bIsArgs = isArguments(b); + if (aIsArgs && !bIsArgs || !aIsArgs && bIsArgs) + return false; + if (aIsArgs) { + a = pSlice.call(a); + b = pSlice.call(b); + return _deepEqual(a, b); + } + var ka = objectKeys(a), kb = objectKeys(b), key, i; + if (ka.length != kb.length) + return false; + ka.sort(); + kb.sort(); + for (i = ka.length - 1; i >= 0; i--) { + if (ka[i] != kb[i]) + return false; + } + for (i = ka.length - 1; i >= 0; i--) { + key = ka[i]; + if (!_deepEqual(a[key], b[key])) return false; + } + return true; + } + assert.notDeepEqual = function notDeepEqual(actual, expected, message) { + if (_deepEqual(actual, expected)) { + fail(actual, expected, message, "notDeepEqual", assert.notDeepEqual); + } + }; + assert.strictEqual = function strictEqual(actual, expected, message) { + if (actual !== expected) { + fail(actual, expected, message, "===", assert.strictEqual); + } + }; + assert.notStrictEqual = function notStrictEqual(actual, expected, message) { + if (actual === expected) { + fail(actual, expected, message, "!==", assert.notStrictEqual); + } + }; + function expectedException(actual, expected) { + if (!actual || !expected) { + return false; + } + if (Object.prototype.toString.call(expected) == "[object RegExp]") { + return expected.test(actual); + } else if (actual instanceof expected) { + return true; + } else if (expected.call({}, actual) === true) { + return true; + } + return false; + } + function _throws(shouldThrow, block, expected, message) { + var actual; + if (util2.isString(expected)) { + message = expected; + expected = null; + } + try { + block(); + } catch (e) { + actual = e; + } + message = (expected && expected.name ? " (" + expected.name + ")." : ".") + (message ? " " + message : "."); + if (shouldThrow && !actual) { + fail(actual, expected, "Missing expected exception" + message); + } + if (!shouldThrow && expectedException(actual, expected)) { + fail(actual, expected, "Got unwanted exception" + message); + } + if (shouldThrow && actual && expected && !expectedException(actual, expected) || !shouldThrow && actual) { + throw actual; + } + } + assert.throws = function(block, error, message) { + _throws.apply(this, [true].concat(pSlice.call(arguments))); + }; + assert.doesNotThrow = function(block, message) { + _throws.apply(this, [false].concat(pSlice.call(arguments))); + }; + assert.ifError = function(err) { + if (err) { + throw err; + } + }; + var objectKeys = Object.keys || function(obj) { + var keys = []; + for (var key in obj) { + if (hasOwn.call(obj, key)) keys.push(key); + } + return keys; + }; + }, { "util/": 14 }], 10: [function(require2, module4, exports4) { + if (typeof Object.create === "function") { + module4.exports = function inherits(ctor, superCtor) { + ctor.super_ = superCtor; + ctor.prototype = Object.create(superCtor.prototype, { + constructor: { + value: ctor, + enumerable: false, + writable: true, + configurable: true + } + }); + }; + } else { + module4.exports = function inherits(ctor, superCtor) { + ctor.super_ = superCtor; + var TempCtor = function() { + }; + TempCtor.prototype = superCtor.prototype; + ctor.prototype = new TempCtor(); + ctor.prototype.constructor = ctor; + }; + } + }, {}], 11: [function(require2, module4, exports4) { + (function(process2) { + function normalizeArray(parts, allowAboveRoot) { + var up = 0; + for (var i = parts.length - 1; i >= 0; i--) { + var last = parts[i]; + if (last === ".") { + parts.splice(i, 1); + } else if (last === "..") { + parts.splice(i, 1); + up++; + } else if (up) { + parts.splice(i, 1); + up--; + } + } + if (allowAboveRoot) { + for (; up--; up) { + parts.unshift(".."); + } + } + return parts; + } + var splitPathRe = /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/; + var splitPath = function(filename) { + return splitPathRe.exec(filename).slice(1); + }; + exports4.resolve = function() { + var resolvedPath = "", resolvedAbsolute = false; + for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) { + var path = i >= 0 ? arguments[i] : process2.cwd(); + if (typeof path !== "string") { + throw new TypeError("Arguments to path.resolve must be strings"); + } else if (!path) { + continue; + } + resolvedPath = path + "/" + resolvedPath; + resolvedAbsolute = path.charAt(0) === "/"; + } + resolvedPath = normalizeArray(filter(resolvedPath.split("/"), function(p) { + return !!p; + }), !resolvedAbsolute).join("/"); + return (resolvedAbsolute ? "/" : "") + resolvedPath || "."; + }; + exports4.normalize = function(path) { + var isAbsolute = exports4.isAbsolute(path), trailingSlash = substr(path, -1) === "/"; + path = normalizeArray(filter(path.split("/"), function(p) { + return !!p; + }), !isAbsolute).join("/"); + if (!path && !isAbsolute) { + path = "."; + } + if (path && trailingSlash) { + path += "/"; + } + return (isAbsolute ? "/" : "") + path; + }; + exports4.isAbsolute = function(path) { + return path.charAt(0) === "/"; + }; + exports4.join = function() { + var paths = Array.prototype.slice.call(arguments, 0); + return exports4.normalize(filter(paths, function(p, index) { + if (typeof p !== "string") { + throw new TypeError("Arguments to path.join must be strings"); + } + return p; + }).join("/")); + }; + exports4.relative = function(from, to) { + from = exports4.resolve(from).substr(1); + to = exports4.resolve(to).substr(1); + function trim(arr) { + var start = 0; + for (; start < arr.length; start++) { + if (arr[start] !== "") break; + } + var end2 = arr.length - 1; + for (; end2 >= 0; end2--) { + if (arr[end2] !== "") break; + } + if (start > end2) return []; + return arr.slice(start, end2 - start + 1); + } + var fromParts = trim(from.split("/")); + var toParts = trim(to.split("/")); + var length = Math.min(fromParts.length, toParts.length); + var samePartsLength = length; + for (var i = 0; i < length; i++) { + if (fromParts[i] !== toParts[i]) { + samePartsLength = i; + break; + } + } + var outputParts = []; + for (var i = samePartsLength; i < fromParts.length; i++) { + outputParts.push(".."); + } + outputParts = outputParts.concat(toParts.slice(samePartsLength)); + return outputParts.join("/"); + }; + exports4.sep = "/"; + exports4.delimiter = ":"; + exports4.dirname = function(path) { + var result = splitPath(path), root = result[0], dir = result[1]; + if (!root && !dir) { + return "."; + } + if (dir) { + dir = dir.substr(0, dir.length - 1); + } + return root + dir; + }; + exports4.basename = function(path, ext) { + var f = splitPath(path)[2]; + if (ext && f.substr(-1 * ext.length) === ext) { + f = f.substr(0, f.length - ext.length); + } + return f; + }; + exports4.extname = function(path) { + return splitPath(path)[3]; + }; + function filter(xs, f) { + if (xs.filter) return xs.filter(f); + var res = []; + for (var i = 0; i < xs.length; i++) { + if (f(xs[i], i, xs)) res.push(xs[i]); + } + return res; + } + var substr = "ab".substr(-1) === "b" ? function(str, start, len) { + return str.substr(start, len); + } : function(str, start, len) { + if (start < 0) start = str.length + start; + return str.substr(start, len); + }; + }).call(this, require2("_process")); + }, { "_process": 12 }], 12: [function(require2, module4, exports4) { + var process2 = module4.exports = {}; + var queue = []; + var draining = false; + var currentQueue; + var queueIndex = -1; + function cleanUpNextTick() { + draining = false; + if (currentQueue.length) { + queue = currentQueue.concat(queue); + } else { + queueIndex = -1; + } + if (queue.length) { + drainQueue(); + } + } + function drainQueue() { + if (draining) { + return; + } + var timeout = setTimeout(cleanUpNextTick); + draining = true; + var len = queue.length; + while (len) { + currentQueue = queue; + queue = []; + while (++queueIndex < len) { + if (currentQueue) { + currentQueue[queueIndex].run(); + } + } + queueIndex = -1; + len = queue.length; + } + currentQueue = null; + draining = false; + clearTimeout(timeout); + } + process2.nextTick = function(fun) { + var args = new Array(arguments.length - 1); + if (arguments.length > 1) { + for (var i = 1; i < arguments.length; i++) { + args[i - 1] = arguments[i]; + } + } + queue.push(new Item(fun, args)); + if (queue.length === 1 && !draining) { + setTimeout(drainQueue, 0); + } + }; + function Item(fun, array) { + this.fun = fun; + this.array = array; + } + Item.prototype.run = function() { + this.fun.apply(null, this.array); + }; + process2.title = "browser"; + process2.browser = true; + process2.env = {}; + process2.argv = []; + process2.version = ""; + process2.versions = {}; + function noop() { + } + process2.on = noop; + process2.addListener = noop; + process2.once = noop; + process2.off = noop; + process2.removeListener = noop; + process2.removeAllListeners = noop; + process2.emit = noop; + process2.binding = function(name) { + throw new Error("process.binding is not supported"); + }; + process2.cwd = function() { + return "/"; + }; + process2.chdir = function(dir) { + throw new Error("process.chdir is not supported"); + }; + process2.umask = function() { + return 0; + }; + }, {}], 13: [function(require2, module4, exports4) { + module4.exports = function isBuffer(arg) { + return arg && typeof arg === "object" && typeof arg.copy === "function" && typeof arg.fill === "function" && typeof arg.readUInt8 === "function"; + }; + }, {}], 14: [function(require2, module4, exports4) { + (function(process2, global2) { + var formatRegExp = /%[sdj%]/g; + exports4.format = function(f) { + if (!isString(f)) { + var objects = []; + for (var i = 0; i < arguments.length; i++) { + objects.push(inspect(arguments[i])); + } + return objects.join(" "); + } + var i = 1; + var args = arguments; + var len = args.length; + var str = String(f).replace(formatRegExp, function(x2) { + if (x2 === "%%") return "%"; + if (i >= len) return x2; + switch (x2) { + case "%s": + return String(args[i++]); + case "%d": + return Number(args[i++]); + case "%j": + try { + return JSON.stringify(args[i++]); + } catch (_3) { + return "[Circular]"; + } + default: + return x2; + } + }); + for (var x = args[i]; i < len; x = args[++i]) { + if (isNull(x) || !isObject(x)) { + str += " " + x; + } else { + str += " " + inspect(x); + } + } + return str; + }; + exports4.deprecate = function(fn, msg) { + if (isUndefined(global2.process)) { + return function() { + return exports4.deprecate(fn, msg).apply(this, arguments); + }; + } + if (process2.noDeprecation === true) { + return fn; + } + var warned = false; + function deprecated() { + if (!warned) { + if (process2.throwDeprecation) { + throw new Error(msg); + } else if (process2.traceDeprecation) { + console.trace(msg); + } else { + console.warn(msg); + } + warned = true; + } + return fn.apply(this, arguments); + } + return deprecated; + }; + var debugs = {}; + var debugEnviron; + exports4.debuglog = function(set) { + if (isUndefined(debugEnviron)) + debugEnviron = process2.env.NODE_DEBUG || ""; + set = set.toUpperCase(); + if (!debugs[set]) { + if (new RegExp("\\b" + set + "\\b", "i").test(debugEnviron)) { + var pid = process2.pid; + debugs[set] = function() { + var msg = exports4.format.apply(exports4, arguments); + console.warn("%s %d: %s", set, pid, msg); + }; + } else { + debugs[set] = function() { + }; + } + } + return debugs[set]; + }; + function inspect(obj, opts) { + var ctx = { + seen: [], + stylize: stylizeNoColor + }; + if (arguments.length >= 3) ctx.depth = arguments[2]; + if (arguments.length >= 4) ctx.colors = arguments[3]; + if (isBoolean(opts)) { + ctx.showHidden = opts; + } else if (opts) { + exports4._extend(ctx, opts); + } + if (isUndefined(ctx.showHidden)) ctx.showHidden = false; + if (isUndefined(ctx.depth)) ctx.depth = 2; + if (isUndefined(ctx.colors)) ctx.colors = false; + if (isUndefined(ctx.customInspect)) ctx.customInspect = true; + if (ctx.colors) ctx.stylize = stylizeWithColor; + return formatValue(ctx, obj, ctx.depth); + } + exports4.inspect = inspect; + inspect.colors = { + "bold": [1, 22], + "italic": [3, 23], + "underline": [4, 24], + "inverse": [7, 27], + "white": [37, 39], + "grey": [90, 39], + "black": [30, 39], + "blue": [34, 39], + "cyan": [36, 39], + "green": [32, 39], + "magenta": [35, 39], + "red": [31, 39], + "yellow": [33, 39] + }; + inspect.styles = { + "special": "cyan", + "number": "yellow", + "boolean": "yellow", + "undefined": "grey", + "null": "bold", + "string": "green", + "date": "magenta", + // "name": intentionally not styling + "regexp": "red" + }; + function stylizeWithColor(str, styleType) { + var style = inspect.styles[styleType]; + if (style) { + return "\x1B[" + inspect.colors[style][0] + "m" + str + "\x1B[" + inspect.colors[style][1] + "m"; + } else { + return str; + } + } + function stylizeNoColor(str, styleType) { + return str; + } + function arrayToHash(array) { + var hash2 = {}; + array.forEach(function(val, idx) { + hash2[val] = true; + }); + return hash2; + } + function formatValue(ctx, value, recurseTimes) { + if (ctx.customInspect && value && isFunction(value.inspect) && // Filter out the util module, it's inspect function is special + value.inspect !== exports4.inspect && // Also filter out any prototype objects using the circular check. + !(value.constructor && value.constructor.prototype === value)) { + var ret = value.inspect(recurseTimes, ctx); + if (!isString(ret)) { + ret = formatValue(ctx, ret, recurseTimes); + } + return ret; + } + var primitive = formatPrimitive(ctx, value); + if (primitive) { + return primitive; + } + var keys = Object.keys(value); + var visibleKeys = arrayToHash(keys); + if (ctx.showHidden) { + keys = Object.getOwnPropertyNames(value); + } + if (isError(value) && (keys.indexOf("message") >= 0 || keys.indexOf("description") >= 0)) { + return formatError(value); + } + if (keys.length === 0) { + if (isFunction(value)) { + var name = value.name ? ": " + value.name : ""; + return ctx.stylize("[Function" + name + "]", "special"); + } + if (isRegExp(value)) { + return ctx.stylize(RegExp.prototype.toString.call(value), "regexp"); + } + if (isDate(value)) { + return ctx.stylize(Date.prototype.toString.call(value), "date"); + } + if (isError(value)) { + return formatError(value); + } + } + var base = "", array = false, braces = ["{", "}"]; + if (isArray(value)) { + array = true; + braces = ["[", "]"]; + } + if (isFunction(value)) { + var n = value.name ? ": " + value.name : ""; + base = " [Function" + n + "]"; + } + if (isRegExp(value)) { + base = " " + RegExp.prototype.toString.call(value); + } + if (isDate(value)) { + base = " " + Date.prototype.toUTCString.call(value); + } + if (isError(value)) { + base = " " + formatError(value); + } + if (keys.length === 0 && (!array || value.length == 0)) { + return braces[0] + base + braces[1]; + } + if (recurseTimes < 0) { + if (isRegExp(value)) { + return ctx.stylize(RegExp.prototype.toString.call(value), "regexp"); + } else { + return ctx.stylize("[Object]", "special"); + } + } + ctx.seen.push(value); + var output; + if (array) { + output = formatArray(ctx, value, recurseTimes, visibleKeys, keys); + } else { + output = keys.map(function(key) { + return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array); + }); + } + ctx.seen.pop(); + return reduceToSingleString(output, base, braces); + } + function formatPrimitive(ctx, value) { + if (isUndefined(value)) + return ctx.stylize("undefined", "undefined"); + if (isString(value)) { + var simple = "'" + JSON.stringify(value).replace(/^"|"$/g, "").replace(/'/g, "\\'").replace(/\\"/g, '"') + "'"; + return ctx.stylize(simple, "string"); + } + if (isNumber(value)) + return ctx.stylize("" + value, "number"); + if (isBoolean(value)) + return ctx.stylize("" + value, "boolean"); + if (isNull(value)) + return ctx.stylize("null", "null"); + } + function formatError(value) { + return "[" + Error.prototype.toString.call(value) + "]"; + } + function formatArray(ctx, value, recurseTimes, visibleKeys, keys) { + var output = []; + for (var i = 0, l = value.length; i < l; ++i) { + if (hasOwnProperty(value, String(i))) { + output.push(formatProperty( + ctx, + value, + recurseTimes, + visibleKeys, + String(i), + true + )); + } else { + output.push(""); + } + } + keys.forEach(function(key) { + if (!key.match(/^\d+$/)) { + output.push(formatProperty( + ctx, + value, + recurseTimes, + visibleKeys, + key, + true + )); + } + }); + return output; + } + function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) { + var name, str, desc; + desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] }; + if (desc.get) { + if (desc.set) { + str = ctx.stylize("[Getter/Setter]", "special"); + } else { + str = ctx.stylize("[Getter]", "special"); + } + } else { + if (desc.set) { + str = ctx.stylize("[Setter]", "special"); + } + } + if (!hasOwnProperty(visibleKeys, key)) { + name = "[" + key + "]"; + } + if (!str) { + if (ctx.seen.indexOf(desc.value) < 0) { + if (isNull(recurseTimes)) { + str = formatValue(ctx, desc.value, null); + } else { + str = formatValue(ctx, desc.value, recurseTimes - 1); + } + if (str.indexOf("\n") > -1) { + if (array) { + str = str.split("\n").map(function(line) { + return " " + line; + }).join("\n").substr(2); + } else { + str = "\n" + str.split("\n").map(function(line) { + return " " + line; + }).join("\n"); + } + } + } else { + str = ctx.stylize("[Circular]", "special"); + } + } + if (isUndefined(name)) { + if (array && key.match(/^\d+$/)) { + return str; + } + name = JSON.stringify("" + key); + if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) { + name = name.substr(1, name.length - 2); + name = ctx.stylize(name, "name"); + } else { + name = name.replace(/'/g, "\\'").replace(/\\"/g, '"').replace(/(^"|"$)/g, "'"); + name = ctx.stylize(name, "string"); + } + } + return name + ": " + str; + } + function reduceToSingleString(output, base, braces) { + var numLinesEst = 0; + var length = output.reduce(function(prev, cur) { + numLinesEst++; + if (cur.indexOf("\n") >= 0) numLinesEst++; + return prev + cur.replace(/\u001b\[\d\d?m/g, "").length + 1; + }, 0); + if (length > 60) { + return braces[0] + (base === "" ? "" : base + "\n ") + " " + output.join(",\n ") + " " + braces[1]; + } + return braces[0] + base + " " + output.join(", ") + " " + braces[1]; + } + function isArray(ar) { + return Array.isArray(ar); + } + exports4.isArray = isArray; + function isBoolean(arg) { + return typeof arg === "boolean"; + } + exports4.isBoolean = isBoolean; + function isNull(arg) { + return arg === null; + } + exports4.isNull = isNull; + function isNullOrUndefined(arg) { + return arg == null; + } + exports4.isNullOrUndefined = isNullOrUndefined; + function isNumber(arg) { + return typeof arg === "number"; + } + exports4.isNumber = isNumber; + function isString(arg) { + return typeof arg === "string"; + } + exports4.isString = isString; + function isSymbol(arg) { + return typeof arg === "symbol"; + } + exports4.isSymbol = isSymbol; + function isUndefined(arg) { + return arg === void 0; + } + exports4.isUndefined = isUndefined; + function isRegExp(re) { + return isObject(re) && objectToString(re) === "[object RegExp]"; + } + exports4.isRegExp = isRegExp; + function isObject(arg) { + return typeof arg === "object" && arg !== null; + } + exports4.isObject = isObject; + function isDate(d) { + return isObject(d) && objectToString(d) === "[object Date]"; + } + exports4.isDate = isDate; + function isError(e) { + return isObject(e) && (objectToString(e) === "[object Error]" || e instanceof Error); + } + exports4.isError = isError; + function isFunction(arg) { + return typeof arg === "function"; + } + exports4.isFunction = isFunction; + function isPrimitive(arg) { + return arg === null || typeof arg === "boolean" || typeof arg === "number" || typeof arg === "string" || typeof arg === "symbol" || // ES6 symbol + typeof arg === "undefined"; + } + exports4.isPrimitive = isPrimitive; + exports4.isBuffer = require2("./support/isBuffer"); + function objectToString(o) { + return Object.prototype.toString.call(o); + } + function pad(n) { + return n < 10 ? "0" + n.toString(10) : n.toString(10); + } + var months = [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ]; + function timestamp() { + var d = /* @__PURE__ */ new Date(); + var time = [ + pad(d.getHours()), + pad(d.getMinutes()), + pad(d.getSeconds()) + ].join(":"); + return [d.getDate(), months[d.getMonth()], time].join(" "); + } + exports4.log = function() { + console.log("%s - %s", timestamp(), exports4.format.apply(exports4, arguments)); + }; + exports4.inherits = require2("inherits"); + exports4._extend = function(origin, add) { + if (!add || !isObject(add)) return origin; + var keys = Object.keys(add); + var i = keys.length; + while (i--) { + origin[keys[i]] = add[keys[i]]; + } + return origin; + }; + function hasOwnProperty(obj, prop) { + return Object.prototype.hasOwnProperty.call(obj, prop); + } + }).call(this, require2("_process"), typeof commonjsGlobal !== "undefined" ? commonjsGlobal : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}); + }, { "./support/isBuffer": 13, "_process": 12, "inherits": 10 }], 15: [function(require2, module4, exports4) { + var unparse = require2("escodegen").generate; + module4.exports = function(ast, vars) { + if (!vars) vars = {}; + var FAIL = {}; + var result = function walk2(node) { + if (node.type === "Literal") { + return node.value; + } else if (node.type === "UnaryExpression") { + var val = walk2(node.argument); + if (node.operator === "+") return +val; + if (node.operator === "-") return -val; + if (node.operator === "~") return ~val; + if (node.operator === "!") return !val; + return FAIL; + } else if (node.type === "ArrayExpression") { + var xs = []; + for (var i = 0, l = node.elements.length; i < l; i++) { + var x = walk2(node.elements[i]); + if (x === FAIL) return FAIL; + xs.push(x); + } + return xs; + } else if (node.type === "ObjectExpression") { + var obj = {}; + for (var i = 0; i < node.properties.length; i++) { + var prop = node.properties[i]; + var value = prop.value === null ? prop.value : walk2(prop.value); + if (value === FAIL) return FAIL; + obj[prop.key.value || prop.key.name] = value; + } + return obj; + } else if (node.type === "BinaryExpression" || node.type === "LogicalExpression") { + var l = walk2(node.left); + if (l === FAIL) return FAIL; + var r = walk2(node.right); + if (r === FAIL) return FAIL; + var op = node.operator; + if (op === "==") return l == r; + if (op === "===") return l === r; + if (op === "!=") return l != r; + if (op === "!==") return l !== r; + if (op === "+") return l + r; + if (op === "-") return l - r; + if (op === "*") return l * r; + if (op === "/") return l / r; + if (op === "%") return l % r; + if (op === "<") return l < r; + if (op === "<=") return l <= r; + if (op === ">") return l > r; + if (op === ">=") return l >= r; + if (op === "|") return l | r; + if (op === "&") return l & r; + if (op === "^") return l ^ r; + if (op === "&&") return l && r; + if (op === "||") return l || r; + return FAIL; + } else if (node.type === "Identifier") { + if ({}.hasOwnProperty.call(vars, node.name)) { + return vars[node.name]; + } else return FAIL; + } else if (node.type === "CallExpression") { + var callee = walk2(node.callee); + if (callee === FAIL) return FAIL; + var ctx = node.callee.object ? walk2(node.callee.object) : FAIL; + if (ctx === FAIL) ctx = null; + var args = []; + for (var i = 0, l = node.arguments.length; i < l; i++) { + var x = walk2(node.arguments[i]); + if (x === FAIL) return FAIL; + args.push(x); + } + return callee.apply(ctx, args); + } else if (node.type === "MemberExpression") { + var obj = walk2(node.object); + if (obj === FAIL) return FAIL; + if (node.property.type === "Identifier") { + return obj[node.property.name]; + } + var prop = walk2(node.property); + if (prop === FAIL) return FAIL; + return obj[prop]; + } else if (node.type === "ConditionalExpression") { + var val = walk2(node.test); + if (val === FAIL) return FAIL; + return val ? walk2(node.consequent) : walk2(node.alternate); + } else if (node.type === "FunctionExpression") { + return Function("return " + unparse(node))(); + } else return FAIL; + }(ast); + return result === FAIL ? void 0 : result; + }; + }, { "escodegen": 8 }], "jsonpath": [function(require2, module4, exports4) { + module4.exports = require2("./lib/index"); + }, { "./lib/index": 5 }] }, {}, ["jsonpath"])("jsonpath"); + }); + }); + var jsonSchemaRefParser = createCommonjsModule(function(module3, exports3) { + (function(f) { + if (typeof exports3 === "object" && typeof module3 !== "undefined") { + module3.exports = f(); + } else if (typeof define === "function" && define.amd) { + define([], f); + } else { + var g; + if (typeof window !== "undefined") { + g = window; + } else if (typeof global !== "undefined") { + g = global; + } else if (typeof self !== "undefined") { + g = self; + } else { + g = this; + } + g.$RefParser = f(); + } + })(function() { + var define2, module4, exports4; + return function e(t, n, r) { + function s(o2, u) { + if (!n[o2]) { + if (!t[o2]) { + var a = typeof _dereq_ == "function" && _dereq_; + if (!u && a) return a(o2, true); + if (i) return i(o2, true); + var f = new Error("Cannot find module '" + o2 + "'"); + throw f.code = "MODULE_NOT_FOUND", f; + } + var l = n[o2] = { exports: {} }; + t[o2][0].call(l.exports, function(e2) { + var n2 = t[o2][1][e2]; + return s(n2 ? n2 : e2); + }, l, l.exports, e, t, n, r); + } + return n[o2].exports; + } + var i = typeof _dereq_ == "function" && _dereq_; + for (var o = 0; o < r.length; o++) s(r[o]); + return s; + }({ 1: [function(_dereq_2, module5, exports5) { + "use strict"; + var $Ref = _dereq_2("./ref"), Pointer = _dereq_2("./pointer"), debug = _dereq_2("./util/debug"), url = _dereq_2("./util/url"); + module5.exports = bundle; + function bundle(parser, options) { + debug("Bundling $ref pointers in %s", parser.$refs._root$Ref.path); + var inventory = []; + crawl(parser, "schema", parser.$refs._root$Ref.path + "#", "#", 0, inventory, parser.$refs, options); + remap(inventory); + } + function crawl(parent, key, path, pathFromRoot, indirections, inventory, $refs, options) { + var obj = key === null ? parent : parent[key]; + if (obj && typeof obj === "object") { + if ($Ref.isAllowed$Ref(obj)) { + inventory$Ref(parent, key, path, pathFromRoot, indirections, inventory, $refs, options); + } else { + var keys = Object.keys(obj); + var defs = keys.indexOf("definitions"); + if (defs > 0) { + keys.splice(0, 0, keys.splice(defs, 1)[0]); + } + keys.forEach(function(key2) { + var keyPath = Pointer.join(path, key2); + var keyPathFromRoot = Pointer.join(pathFromRoot, key2); + var value = obj[key2]; + if ($Ref.isAllowed$Ref(value)) { + inventory$Ref(obj, key2, path, keyPathFromRoot, indirections, inventory, $refs, options); + } else { + crawl(obj, key2, keyPath, keyPathFromRoot, indirections, inventory, $refs, options); + } + }); + } + } + } + function inventory$Ref($refParent, $refKey, path, pathFromRoot, indirections, inventory, $refs, options) { + var $ref = $refKey === null ? $refParent : $refParent[$refKey]; + var $refPath = url.resolve(path, $ref.$ref); + var pointer = $refs._resolve($refPath, options); + var depth = Pointer.parse(pathFromRoot).length; + var file = url.stripHash(pointer.path); + var hash2 = url.getHash(pointer.path); + var external = file !== $refs._root$Ref.path; + var extended = $Ref.isExtended$Ref($ref); + indirections += pointer.indirections; + var existingEntry = findInInventory(inventory, $refParent, $refKey); + if (existingEntry) { + if (depth < existingEntry.depth || indirections < existingEntry.indirections) { + removeFromInventory(inventory, existingEntry); + } else { + return; + } + } + inventory.push({ + $ref, + // The JSON Reference (e.g. {$ref: string}) + parent: $refParent, + // The object that contains this $ref pointer + key: $refKey, + // The key in `parent` that is the $ref pointer + pathFromRoot, + // The path to the $ref pointer, from the JSON Schema root + depth, + // How far from the JSON Schema root is this $ref pointer? + file, + // The file that the $ref pointer resolves to + hash: hash2, + // The hash within `file` that the $ref pointer resolves to + value: pointer.value, + // The resolved value of the $ref pointer + circular: pointer.circular, + // Is this $ref pointer DIRECTLY circular? (i.e. it references itself) + extended, + // Does this $ref extend its resolved value? (i.e. it has extra properties, in addition to "$ref") + external, + // Does this $ref pointer point to a file other than the main JSON Schema file? + indirections + // The number of indirect references that were traversed to resolve the value + }); + crawl(pointer.value, null, pointer.path, pathFromRoot, indirections + 1, inventory, $refs, options); + } + function remap(inventory) { + inventory.sort(function(a, b) { + if (a.file !== b.file) { + return a.file < b.file ? -1 : 1; + } else if (a.hash !== b.hash) { + return a.hash < b.hash ? -1 : 1; + } else if (a.circular !== b.circular) { + return a.circular ? -1 : 1; + } else if (a.extended !== b.extended) { + return a.extended ? 1 : -1; + } else if (a.indirections !== b.indirections) { + return a.indirections - b.indirections; + } else if (a.depth !== b.depth) { + return a.depth - b.depth; + } else { + return b.pathFromRoot.lastIndexOf("/definitions") - a.pathFromRoot.lastIndexOf("/definitions"); + } + }); + var file, hash2, pathFromRoot; + inventory.forEach(function(entry) { + debug('Re-mapping $ref pointer "%s" at %s', entry.$ref.$ref, entry.pathFromRoot); + if (!entry.external) { + entry.$ref.$ref = entry.hash; + } else if (entry.file === file && entry.hash === hash2) { + entry.$ref.$ref = pathFromRoot; + } else if (entry.file === file && entry.hash.indexOf(hash2 + "/") === 0) { + entry.$ref.$ref = Pointer.join(pathFromRoot, Pointer.parse(entry.hash)); + } else { + file = entry.file; + hash2 = entry.hash; + pathFromRoot = entry.pathFromRoot; + entry.$ref = entry.parent[entry.key] = $Ref.dereference(entry.$ref, entry.value); + if (entry.circular) { + entry.$ref.$ref = entry.pathFromRoot; + } + } + debug(" new value: %s", entry.$ref && entry.$ref.$ref ? entry.$ref.$ref : "[object Object]"); + }); + } + function findInInventory(inventory, $refParent, $refKey) { + for (var i = 0; i < inventory.length; i++) { + var existingEntry = inventory[i]; + if (existingEntry.parent === $refParent && existingEntry.key === $refKey) { + return existingEntry; + } + } + } + function removeFromInventory(inventory, entry) { + var index = inventory.indexOf(entry); + inventory.splice(index, 1); + } + }, { "./pointer": 11, "./ref": 12, "./util/debug": 17, "./util/url": 19 }], 2: [function(_dereq_2, module5, exports5) { + "use strict"; + var $Ref = _dereq_2("./ref"), Pointer = _dereq_2("./pointer"), ono = _dereq_2("ono"), debug = _dereq_2("./util/debug"), url = _dereq_2("./util/url"); + module5.exports = dereference; + function dereference(parser, options) { + debug("Dereferencing $ref pointers in %s", parser.$refs._root$Ref.path); + var dereferenced = crawl(parser.schema, parser.$refs._root$Ref.path, "#", [], parser.$refs, options); + parser.$refs.circular = dereferenced.circular; + parser.schema = dereferenced.value; + } + function crawl(obj, path, pathFromRoot, parents, $refs, options) { + var dereferenced; + var result = { + value: obj, + circular: false + }; + if (obj && typeof obj === "object") { + parents.push(obj); + if ($Ref.isAllowed$Ref(obj, options)) { + dereferenced = dereference$Ref(obj, path, pathFromRoot, parents, $refs, options); + result.circular = dereferenced.circular; + result.value = dereferenced.value; + } else { + Object.keys(obj).forEach(function(key) { + var keyPath = Pointer.join(path, key); + var keyPathFromRoot = Pointer.join(pathFromRoot, key); + var value = obj[key]; + var circular = false; + if ($Ref.isAllowed$Ref(value, options)) { + dereferenced = dereference$Ref(value, keyPath, keyPathFromRoot, parents, $refs, options); + circular = dereferenced.circular; + obj[key] = dereferenced.value; + } else { + if (parents.indexOf(value) === -1) { + dereferenced = crawl(value, keyPath, keyPathFromRoot, parents, $refs, options); + circular = dereferenced.circular; + obj[key] = dereferenced.value; + } else { + circular = foundCircularReference(keyPath, $refs, options); + } + } + result.circular = result.circular || circular; + }); + } + parents.pop(); + } + return result; + } + function dereference$Ref($ref, path, pathFromRoot, parents, $refs, options) { + debug('Dereferencing $ref pointer "%s" at %s', $ref.$ref, path); + var $refPath = url.resolve(path, $ref.$ref); + var pointer = $refs._resolve($refPath, options); + var directCircular = pointer.circular; + var circular = directCircular || parents.indexOf(pointer.value) !== -1; + circular && foundCircularReference(path, $refs, options); + var dereferencedValue = $Ref.dereference($ref, pointer.value); + if (!circular) { + var dereferenced = crawl(dereferencedValue, pointer.path, pathFromRoot, parents, $refs, options); + circular = dereferenced.circular; + dereferencedValue = dereferenced.value; + } + if (circular && !directCircular && options.dereference.circular === "ignore") { + dereferencedValue = $ref; + } + if (directCircular) { + dereferencedValue.$ref = pathFromRoot; + } + return { + circular, + value: dereferencedValue + }; + } + function foundCircularReference(keyPath, $refs, options) { + $refs.circular = true; + if (!options.dereference.circular) { + throw ono.reference("Circular $ref pointer found at %s", keyPath); + } + return true; + } + }, { "./pointer": 11, "./ref": 12, "./util/debug": 17, "./util/url": 19, "ono": 67 }], 3: [function(_dereq_2, module5, exports5) { + (function(Buffer2) { + "use strict"; + var Options = _dereq_2("./options"), $Refs = _dereq_2("./refs"), parse2 = _dereq_2("./parse"), normalizeArgs = _dereq_2("./normalize-args"), resolveExternal = _dereq_2("./resolve-external"), bundle = _dereq_2("./bundle"), dereference = _dereq_2("./dereference"), url = _dereq_2("./util/url"), maybe = _dereq_2("call-me-maybe"), ono = _dereq_2("ono"); + module5.exports = $RefParser2; + module5.exports.YAML = _dereq_2("./util/yaml"); + function $RefParser2() { + this.schema = null; + this.$refs = new $Refs(); + } + $RefParser2.parse = function(path, schema2, options, callback) { + var Class = this; + var instance = new Class(); + return instance.parse.apply(instance, arguments); + }; + $RefParser2.prototype.parse = function(path, schema2, options, callback) { + var args = normalizeArgs(arguments); + var promise; + if (!args.path && !args.schema) { + var err = ono("Expected a file path, URL, or object. Got %s", args.path || args.schema); + return maybe(args.callback, Promise.reject(err)); + } + this.schema = null; + this.$refs = new $Refs(); + var pathType = "http"; + if (url.isFileSystemPath(args.path)) { + args.path = url.fromFileSystemPath(args.path); + pathType = "file"; + } + args.path = url.resolve(url.cwd(), args.path); + if (args.schema && typeof args.schema === "object") { + var $ref = this.$refs._add(args.path); + $ref.value = args.schema; + $ref.pathType = pathType; + promise = Promise.resolve(args.schema); + } else { + promise = parse2(args.path, this.$refs, args.options); + } + var me = this; + return promise.then(function(result) { + if (!result || typeof result !== "object" || Buffer2.isBuffer(result)) { + throw ono.syntax('"%s" is not a valid JSON Schema', me.$refs._root$Ref.path || result); + } else { + me.schema = result; + return maybe(args.callback, Promise.resolve(me.schema)); + } + }).catch(function(e) { + return maybe(args.callback, Promise.reject(e)); + }); + }; + $RefParser2.resolve = function(path, schema2, options, callback) { + var Class = this; + var instance = new Class(); + return instance.resolve.apply(instance, arguments); + }; + $RefParser2.prototype.resolve = function(path, schema2, options, callback) { + var me = this; + var args = normalizeArgs(arguments); + return this.parse(args.path, args.schema, args.options).then(function() { + return resolveExternal(me, args.options); + }).then(function() { + return maybe(args.callback, Promise.resolve(me.$refs)); + }).catch(function(err) { + return maybe(args.callback, Promise.reject(err)); + }); + }; + $RefParser2.bundle = function(path, schema2, options, callback) { + var Class = this; + var instance = new Class(); + return instance.bundle.apply(instance, arguments); + }; + $RefParser2.prototype.bundle = function(path, schema2, options, callback) { + var me = this; + var args = normalizeArgs(arguments); + return this.resolve(args.path, args.schema, args.options).then(function() { + bundle(me, args.options); + return maybe(args.callback, Promise.resolve(me.schema)); + }).catch(function(err) { + return maybe(args.callback, Promise.reject(err)); + }); + }; + $RefParser2.dereference = function(path, schema2, options, callback) { + var Class = this; + var instance = new Class(); + return instance.dereference.apply(instance, arguments); + }; + $RefParser2.prototype.dereference = function(path, schema2, options, callback) { + var me = this; + var args = normalizeArgs(arguments); + return this.resolve(args.path, args.schema, args.options).then(function() { + dereference(me, args.options); + return maybe(args.callback, Promise.resolve(me.schema)); + }).catch(function(err) { + return maybe(args.callback, Promise.reject(err)); + }); + }; + }).call(this, { "isBuffer": _dereq_2("../node_modules/is-buffer/index.js") }); + }, { "../node_modules/is-buffer/index.js": 34, "./bundle": 1, "./dereference": 2, "./normalize-args": 4, "./options": 5, "./parse": 6, "./refs": 13, "./resolve-external": 14, "./util/url": 19, "./util/yaml": 20, "call-me-maybe": 25, "ono": 67 }], 4: [function(_dereq_2, module5, exports5) { + "use strict"; + var Options = _dereq_2("./options"); + module5.exports = normalizeArgs; + function normalizeArgs(args) { + var path, schema2, options, callback; + args = Array.prototype.slice.call(args); + if (typeof args[args.length - 1] === "function") { + callback = args.pop(); + } + if (typeof args[0] === "string") { + path = args[0]; + if (typeof args[2] === "object") { + schema2 = args[1]; + options = args[2]; + } else { + schema2 = void 0; + options = args[1]; + } + } else { + path = ""; + schema2 = args[0]; + options = args[1]; + } + if (!(options instanceof Options)) { + options = new Options(options); + } + return { + path, + schema: schema2, + options, + callback + }; + } + }, { "./options": 5 }], 5: [function(_dereq_2, module5, exports5) { + "use strict"; + var jsonParser = _dereq_2("./parsers/json"), yamlParser = _dereq_2("./parsers/yaml"), textParser = _dereq_2("./parsers/text"), binaryParser = _dereq_2("./parsers/binary"), fileResolver = _dereq_2("./resolvers/file"), httpResolver = _dereq_2("./resolvers/http"); + module5.exports = $RefParserOptions; + function $RefParserOptions(options) { + merge2(this, $RefParserOptions.defaults); + merge2(this, options); + } + $RefParserOptions.defaults = { + /** + * Determines how different types of files will be parsed. + * + * You can add additional parsers of your own, replace an existing one with + * your own implemenation, or disable any parser by setting it to false. + */ + parse: { + json: jsonParser, + yaml: yamlParser, + text: textParser, + binary: binaryParser + }, + /** + * Determines how JSON References will be resolved. + * + * You can add additional resolvers of your own, replace an existing one with + * your own implemenation, or disable any resolver by setting it to false. + */ + resolve: { + file: fileResolver, + http: httpResolver, + /** + * Determines whether external $ref pointers will be resolved. + * If this option is disabled, then none of above resolvers will be called. + * Instead, external $ref pointers will simply be ignored. + * + * @type {boolean} + */ + external: true + }, + /** + * Determines the types of JSON references that are allowed. + */ + dereference: { + /** + * Dereference circular (recursive) JSON references? + * If false, then a {@link ReferenceError} will be thrown if a circular reference is found. + * If "ignore", then circular references will not be dereferenced. + * + * @type {boolean|string} + */ + circular: true + } + }; + function merge2(target, source) { + if (isMergeable(source)) { + var keys = Object.keys(source); + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + var sourceSetting = source[key]; + var targetSetting = target[key]; + if (isMergeable(sourceSetting)) { + target[key] = merge2(targetSetting || {}, sourceSetting); + } else if (sourceSetting !== void 0) { + target[key] = sourceSetting; + } + } + } + return target; + } + function isMergeable(val) { + return val && typeof val === "object" && !Array.isArray(val) && !(val instanceof RegExp) && !(val instanceof Date); + } + }, { "./parsers/binary": 7, "./parsers/json": 8, "./parsers/text": 9, "./parsers/yaml": 10, "./resolvers/file": 15, "./resolvers/http": 16 }], 6: [function(_dereq_2, module5, exports5) { + (function(Buffer2) { + "use strict"; + var ono = _dereq_2("ono"), debug = _dereq_2("./util/debug"), url = _dereq_2("./util/url"), plugins = _dereq_2("./util/plugins"); + module5.exports = parse2; + function parse2(path, $refs, options) { + try { + path = url.stripHash(path); + var $ref = $refs._add(path); + var file = { + url: path, + extension: url.getExtension(path) + }; + return readFile(file, options).then(function(resolver) { + $ref.pathType = resolver.plugin.name; + file.data = resolver.result; + return parseFile(file, options); + }).then(function(parser) { + $ref.value = parser.result; + return parser.result; + }); + } catch (e) { + return Promise.reject(e); + } + } + function readFile(file, options) { + return new Promise(function(resolve2, reject) { + debug("Reading %s", file.url); + var resolvers = plugins.all(options.resolve); + resolvers = plugins.filter(resolvers, "canRead", file); + plugins.sort(resolvers); + plugins.run(resolvers, "read", file).then(resolve2, onError); + function onError(err) { + if (err && !(err instanceof SyntaxError)) { + reject(err); + } else { + reject(ono.syntax('Unable to resolve $ref pointer "%s"', file.url)); + } + } + }); + } + function parseFile(file, options) { + return new Promise(function(resolve2, reject) { + debug("Parsing %s", file.url); + var allParsers = plugins.all(options.parse); + var filteredParsers = plugins.filter(allParsers, "canParse", file); + var parsers = filteredParsers.length > 0 ? filteredParsers : allParsers; + plugins.sort(parsers); + plugins.run(parsers, "parse", file).then(onParsed, onError); + function onParsed(parser) { + if (!parser.plugin.allowEmpty && isEmpty(parser.result)) { + reject(ono.syntax('Error parsing "%s" as %s. \nParsed value is empty', file.url, parser.plugin.name)); + } else { + resolve2(parser); + } + } + function onError(err) { + if (err) { + err = err instanceof Error ? err : new Error(err); + reject(ono.syntax(err, "Error parsing %s", file.url)); + } else { + reject(ono.syntax("Unable to parse %s", file.url)); + } + } + }); + } + function isEmpty(value) { + return value === void 0 || typeof value === "object" && Object.keys(value).length === 0 || typeof value === "string" && value.trim().length === 0 || Buffer2.isBuffer(value) && value.length === 0; + } + }).call(this, { "isBuffer": _dereq_2("../node_modules/is-buffer/index.js") }); + }, { "../node_modules/is-buffer/index.js": 34, "./util/debug": 17, "./util/plugins": 18, "./util/url": 19, "ono": 67 }], 7: [function(_dereq_2, module5, exports5) { + (function(Buffer2) { + "use strict"; + var BINARY_REGEXP = /\.(jpeg|jpg|gif|png|bmp|ico)$/i; + module5.exports = { + /** + * The order that this parser will run, in relation to other parsers. + * + * @type {number} + */ + order: 400, + /** + * Whether to allow "empty" files (zero bytes). + * + * @type {boolean} + */ + allowEmpty: true, + /** + * Determines whether this parser can parse a given file reference. + * Parsers that return true will be tried, in order, until one successfully parses the file. + * Parsers that return false will be skipped, UNLESS all parsers returned false, in which case + * every parser will be tried. + * + * @param {object} file - An object containing information about the referenced file + * @param {string} file.url - The full URL of the referenced file + * @param {string} file.extension - The lowercased file extension (e.g. ".txt", ".html", etc.) + * @param {*} file.data - The file contents. This will be whatever data type was returned by the resolver + * @returns {boolean} + */ + canParse: function isBinary(file) { + return Buffer2.isBuffer(file.data) && BINARY_REGEXP.test(file.url); + }, + /** + * Parses the given data as a Buffer (byte array). + * + * @param {object} file - An object containing information about the referenced file + * @param {string} file.url - The full URL of the referenced file + * @param {string} file.extension - The lowercased file extension (e.g. ".txt", ".html", etc.) + * @param {*} file.data - The file contents. This will be whatever data type was returned by the resolver + * @returns {Promise} + */ + parse: function parseBinary(file) { + if (Buffer2.isBuffer(file.data)) { + return file.data; + } else { + return new Buffer2(file.data); + } + } + }; + }).call(this, _dereq_2("buffer").Buffer); + }, { "buffer": 23 }], 8: [function(_dereq_2, module5, exports5) { + (function(Buffer2) { + "use strict"; + module5.exports = { + /** + * The order that this parser will run, in relation to other parsers. + * + * @type {number} + */ + order: 100, + /** + * Whether to allow "empty" files. This includes zero-byte files, as well as empty JSON objects. + * + * @type {boolean} + */ + allowEmpty: true, + /** + * Determines whether this parser can parse a given file reference. + * Parsers that match will be tried, in order, until one successfully parses the file. + * Parsers that don't match will be skipped, UNLESS none of the parsers match, in which case + * every parser will be tried. + * + * @type {RegExp|string[]|function} + */ + canParse: ".json", + /** + * Parses the given file as JSON + * + * @param {object} file - An object containing information about the referenced file + * @param {string} file.url - The full URL of the referenced file + * @param {string} file.extension - The lowercased file extension (e.g. ".txt", ".html", etc.) + * @param {*} file.data - The file contents. This will be whatever data type was returned by the resolver + * @returns {Promise} + */ + parse: function parseJSON(file) { + return new Promise(function(resolve2, reject) { + var data = file.data; + if (Buffer2.isBuffer(data)) { + data = data.toString(); + } + if (typeof data === "string") { + if (data.trim().length === 0) { + resolve2(void 0); + } else { + resolve2(JSON.parse(data)); + } + } else { + resolve2(data); + } + }); + } + }; + }).call(this, { "isBuffer": _dereq_2("../../node_modules/is-buffer/index.js") }); + }, { "../../node_modules/is-buffer/index.js": 34 }], 9: [function(_dereq_2, module5, exports5) { + (function(Buffer2) { + "use strict"; + var TEXT_REGEXP = /\.(txt|htm|html|md|xml|js|min|map|css|scss|less|svg)$/i; + module5.exports = { + /** + * The order that this parser will run, in relation to other parsers. + * + * @type {number} + */ + order: 300, + /** + * Whether to allow "empty" files (zero bytes). + * + * @type {boolean} + */ + allowEmpty: true, + /** + * The encoding that the text is expected to be in. + * + * @type {string} + */ + encoding: "utf8", + /** + * Determines whether this parser can parse a given file reference. + * Parsers that return true will be tried, in order, until one successfully parses the file. + * Parsers that return false will be skipped, UNLESS all parsers returned false, in which case + * every parser will be tried. + * + * @param {object} file - An object containing information about the referenced file + * @param {string} file.url - The full URL of the referenced file + * @param {string} file.extension - The lowercased file extension (e.g. ".txt", ".html", etc.) + * @param {*} file.data - The file contents. This will be whatever data type was returned by the resolver + * @returns {boolean} + */ + canParse: function isText(file) { + return (typeof file.data === "string" || Buffer2.isBuffer(file.data)) && TEXT_REGEXP.test(file.url); + }, + /** + * Parses the given file as text + * + * @param {object} file - An object containing information about the referenced file + * @param {string} file.url - The full URL of the referenced file + * @param {string} file.extension - The lowercased file extension (e.g. ".txt", ".html", etc.) + * @param {*} file.data - The file contents. This will be whatever data type was returned by the resolver + * @returns {Promise} + */ + parse: function parseText(file) { + if (typeof file.data === "string") { + return file.data; + } else if (Buffer2.isBuffer(file.data)) { + return file.data.toString(this.encoding); + } else { + throw new Error("data is not text"); + } + } + }; + }).call(this, { "isBuffer": _dereq_2("../../node_modules/is-buffer/index.js") }); + }, { "../../node_modules/is-buffer/index.js": 34 }], 10: [function(_dereq_2, module5, exports5) { + (function(Buffer2) { + "use strict"; + var YAML = _dereq_2("../util/yaml"); + module5.exports = { + /** + * The order that this parser will run, in relation to other parsers. + * + * @type {number} + */ + order: 200, + /** + * Whether to allow "empty" files. This includes zero-byte files, as well as empty JSON objects. + * + * @type {boolean} + */ + allowEmpty: true, + /** + * Determines whether this parser can parse a given file reference. + * Parsers that match will be tried, in order, until one successfully parses the file. + * Parsers that don't match will be skipped, UNLESS none of the parsers match, in which case + * every parser will be tried. + * + * @type {RegExp|string[]|function} + */ + canParse: [".yaml", ".yml", ".json"], + // JSON is valid YAML + /** + * Parses the given file as YAML + * + * @param {object} file - An object containing information about the referenced file + * @param {string} file.url - The full URL of the referenced file + * @param {string} file.extension - The lowercased file extension (e.g. ".txt", ".html", etc.) + * @param {*} file.data - The file contents. This will be whatever data type was returned by the resolver + * @returns {Promise} + */ + parse: function parseYAML(file) { + return new Promise(function(resolve2, reject) { + var data = file.data; + if (Buffer2.isBuffer(data)) { + data = data.toString(); + } + if (typeof data === "string") { + resolve2(YAML.parse(data)); + } else { + resolve2(data); + } + }); + } + }; + }).call(this, { "isBuffer": _dereq_2("../../node_modules/is-buffer/index.js") }); + }, { "../../node_modules/is-buffer/index.js": 34, "../util/yaml": 20 }], 11: [function(_dereq_2, module5, exports5) { + "use strict"; + module5.exports = Pointer; + var $Ref = _dereq_2("./ref"), url = _dereq_2("./util/url"), ono = _dereq_2("ono"), slashes = /\//g, tildes = /~/g, escapedSlash = /~1/g, escapedTilde = /~0/g; + function Pointer($ref, path, friendlyPath) { + this.$ref = $ref; + this.path = path; + this.originalPath = friendlyPath || path; + this.value = void 0; + this.circular = false; + this.indirections = 0; + } + Pointer.prototype.resolve = function(obj, options) { + var tokens = Pointer.parse(this.path); + this.value = obj; + for (var i = 0; i < tokens.length; i++) { + if (resolveIf$Ref(this, options)) { + this.path = Pointer.join(this.path, tokens.slice(i)); + } + var token = tokens[i]; + if (this.value[token] === void 0) { + throw ono.syntax('Error resolving $ref pointer "%s". \nToken "%s" does not exist.', this.originalPath, token); + } else { + this.value = this.value[token]; + } + } + resolveIf$Ref(this, options); + return this; + }; + Pointer.prototype.set = function(obj, value, options) { + var tokens = Pointer.parse(this.path); + var token; + if (tokens.length === 0) { + this.value = value; + return value; + } + this.value = obj; + for (var i = 0; i < tokens.length - 1; i++) { + resolveIf$Ref(this, options); + token = tokens[i]; + if (this.value && this.value[token] !== void 0) { + this.value = this.value[token]; + } else { + this.value = setValue(this, token, {}); + } + } + resolveIf$Ref(this, options); + token = tokens[tokens.length - 1]; + setValue(this, token, value); + return obj; + }; + Pointer.parse = function(path) { + var pointer = url.getHash(path).substr(1); + if (!pointer) { + return []; + } + pointer = pointer.split("/"); + for (var i = 0; i < pointer.length; i++) { + pointer[i] = decodeURI(pointer[i].replace(escapedSlash, "/").replace(escapedTilde, "~")); + } + if (pointer[0] !== "") { + throw ono.syntax('Invalid $ref pointer "%s". Pointers must begin with "#/"', pointer); + } + return pointer.slice(1); + }; + Pointer.join = function(base, tokens) { + if (base.indexOf("#") === -1) { + base += "#"; + } + tokens = Array.isArray(tokens) ? tokens : [tokens]; + for (var i = 0; i < tokens.length; i++) { + var token = tokens[i]; + base += "/" + encodeURI(token.replace(tildes, "~0").replace(slashes, "~1")); + } + return base; + }; + function resolveIf$Ref(pointer, options) { + if ($Ref.isAllowed$Ref(pointer.value, options)) { + var $refPath = url.resolve(pointer.path, pointer.value.$ref); + if ($refPath === pointer.path) { + pointer.circular = true; + } else { + var resolved = pointer.$ref.$refs._resolve($refPath, options); + pointer.indirections += resolved.indirections + 1; + if ($Ref.isExtended$Ref(pointer.value)) { + pointer.value = $Ref.dereference(pointer.value, resolved.value); + return false; + } else { + pointer.$ref = resolved.$ref; + pointer.path = resolved.path; + pointer.value = resolved.value; + } + return true; + } + } + } + function setValue(pointer, token, value) { + if (pointer.value && typeof pointer.value === "object") { + if (token === "-" && Array.isArray(pointer.value)) { + pointer.value.push(value); + } else { + pointer.value[token] = value; + } + } else { + throw ono.syntax('Error assigning $ref pointer "%s". \nCannot set "%s" of a non-object.', pointer.path, token); + } + return value; + } + }, { "./ref": 12, "./util/url": 19, "ono": 67 }], 12: [function(_dereq_2, module5, exports5) { + "use strict"; + module5.exports = $Ref; + var Pointer = _dereq_2("./pointer"); + function $Ref() { + this.path = void 0; + this.value = void 0; + this.$refs = void 0; + this.pathType = void 0; + } + $Ref.prototype.exists = function(path, options) { + try { + this.resolve(path, options); + return true; + } catch (e) { + return false; + } + }; + $Ref.prototype.get = function(path, options) { + return this.resolve(path, options).value; + }; + $Ref.prototype.resolve = function(path, options, friendlyPath) { + var pointer = new Pointer(this, path, friendlyPath); + return pointer.resolve(this.value, options); + }; + $Ref.prototype.set = function(path, value) { + var pointer = new Pointer(this, path); + this.value = pointer.set(this.value, value); + }; + $Ref.is$Ref = function(value) { + return value && typeof value === "object" && typeof value.$ref === "string" && value.$ref.length > 0; + }; + $Ref.isExternal$Ref = function(value) { + return $Ref.is$Ref(value) && value.$ref[0] !== "#"; + }; + $Ref.isAllowed$Ref = function(value, options) { + if ($Ref.is$Ref(value)) { + if (value.$ref.substr(0, 2) === "#/" || value.$ref === "#") { + return true; + } else if (value.$ref[0] !== "#" && (!options || options.resolve.external)) { + return true; + } + } + }; + $Ref.isExtended$Ref = function(value) { + return $Ref.is$Ref(value) && Object.keys(value).length > 1; + }; + $Ref.dereference = function($ref, resolvedValue) { + if (resolvedValue && typeof resolvedValue === "object" && $Ref.isExtended$Ref($ref)) { + var merged = {}; + Object.keys($ref).forEach(function(key) { + if (key !== "$ref") { + merged[key] = $ref[key]; + } + }); + Object.keys(resolvedValue).forEach(function(key) { + if (!(key in merged)) { + merged[key] = resolvedValue[key]; + } + }); + return merged; + } else { + return resolvedValue; + } + }; + }, { "./pointer": 11 }], 13: [function(_dereq_2, module5, exports5) { + "use strict"; + var ono = _dereq_2("ono"), $Ref = _dereq_2("./ref"), url = _dereq_2("./util/url"); + module5.exports = $Refs; + function $Refs() { + this.circular = false; + this._$refs = {}; + this._root$Ref = null; + } + $Refs.prototype.paths = function(types2) { + var paths = getPaths(this._$refs, arguments); + return paths.map(function(path) { + return path.decoded; + }); + }; + $Refs.prototype.values = function(types2) { + var $refs = this._$refs; + var paths = getPaths($refs, arguments); + return paths.reduce(function(obj, path) { + obj[path.decoded] = $refs[path.encoded].value; + return obj; + }, {}); + }; + $Refs.prototype.toJSON = $Refs.prototype.values; + $Refs.prototype.exists = function(path, options) { + try { + this._resolve(path, options); + return true; + } catch (e) { + return false; + } + }; + $Refs.prototype.get = function(path, options) { + return this._resolve(path, options).value; + }; + $Refs.prototype.set = function(path, value) { + var absPath = url.resolve(this._root$Ref.path, path); + var withoutHash = url.stripHash(absPath); + var $ref = this._$refs[withoutHash]; + if (!$ref) { + throw ono('Error resolving $ref pointer "%s". \n"%s" not found.', path, withoutHash); + } + $ref.set(absPath, value); + }; + $Refs.prototype._add = function(path) { + var withoutHash = url.stripHash(path); + var $ref = new $Ref(); + $ref.path = withoutHash; + $ref.$refs = this; + this._$refs[withoutHash] = $ref; + this._root$Ref = this._root$Ref || $ref; + return $ref; + }; + $Refs.prototype._resolve = function(path, options) { + var absPath = url.resolve(this._root$Ref.path, path); + var withoutHash = url.stripHash(absPath); + var $ref = this._$refs[withoutHash]; + if (!$ref) { + throw ono('Error resolving $ref pointer "%s". \n"%s" not found.', path, withoutHash); + } + return $ref.resolve(absPath, options, path); + }; + $Refs.prototype._get$Ref = function(path) { + path = url.resolve(this._root$Ref.path, path); + var withoutHash = url.stripHash(path); + return this._$refs[withoutHash]; + }; + function getPaths($refs, types2) { + var paths = Object.keys($refs); + types2 = Array.isArray(types2[0]) ? types2[0] : Array.prototype.slice.call(types2); + if (types2.length > 0 && types2[0]) { + paths = paths.filter(function(key) { + return types2.indexOf($refs[key].pathType) !== -1; + }); + } + return paths.map(function(path) { + return { + encoded: path, + decoded: $refs[path].pathType === "file" ? url.toFileSystemPath(path, true) : path + }; + }); + } + }, { "./ref": 12, "./util/url": 19, "ono": 67 }], 14: [function(_dereq_2, module5, exports5) { + "use strict"; + var $Ref = _dereq_2("./ref"), Pointer = _dereq_2("./pointer"), parse2 = _dereq_2("./parse"), debug = _dereq_2("./util/debug"), url = _dereq_2("./util/url"); + module5.exports = resolveExternal; + function resolveExternal(parser, options) { + if (!options.resolve.external) { + return Promise.resolve(); + } + try { + debug("Resolving $ref pointers in %s", parser.$refs._root$Ref.path); + var promises = crawl(parser.schema, parser.$refs._root$Ref.path + "#", parser.$refs, options); + return Promise.all(promises); + } catch (e) { + return Promise.reject(e); + } + } + function crawl(obj, path, $refs, options) { + var promises = []; + if (obj && typeof obj === "object") { + if ($Ref.isExternal$Ref(obj)) { + promises.push(resolve$Ref(obj, path, $refs, options)); + } else { + Object.keys(obj).forEach(function(key) { + var keyPath = Pointer.join(path, key); + var value = obj[key]; + if ($Ref.isExternal$Ref(value)) { + promises.push(resolve$Ref(value, keyPath, $refs, options)); + } else { + promises = promises.concat(crawl(value, keyPath, $refs, options)); + } + }); + } + } + return promises; + } + function resolve$Ref($ref, path, $refs, options) { + debug('Resolving $ref pointer "%s" at %s', $ref.$ref, path); + var resolvedPath = url.resolve(path, $ref.$ref); + var withoutHash = url.stripHash(resolvedPath); + $ref = $refs._$refs[withoutHash]; + if ($ref) { + return Promise.resolve($ref.value); + } + return parse2(resolvedPath, $refs, options).then(function(result) { + debug("Resolving $ref pointers in %s", withoutHash); + var promises = crawl(result, withoutHash + "#", $refs, options); + return Promise.all(promises); + }); + } + }, { "./parse": 6, "./pointer": 11, "./ref": 12, "./util/debug": 17, "./util/url": 19 }], 15: [function(_dereq_2, module5, exports5) { + "use strict"; + var fs = _dereq_2("fs"), ono = _dereq_2("ono"), url = _dereq_2("../util/url"), debug = _dereq_2("../util/debug"); + module5.exports = { + /** + * The order that this resolver will run, in relation to other resolvers. + * + * @type {number} + */ + order: 100, + /** + * Determines whether this resolver can read a given file reference. + * Resolvers that return true will be tried, in order, until one successfully resolves the file. + * Resolvers that return false will not be given a chance to resolve the file. + * + * @param {object} file - An object containing information about the referenced file + * @param {string} file.url - The full URL of the referenced file + * @param {string} file.extension - The lowercased file extension (e.g. ".txt", ".html", etc.) + * @returns {boolean} + */ + canRead: function isFile(file) { + return url.isFileSystemPath(file.url); + }, + /** + * Reads the given file and returns its raw contents as a Buffer. + * + * @param {object} file - An object containing information about the referenced file + * @param {string} file.url - The full URL of the referenced file + * @param {string} file.extension - The lowercased file extension (e.g. ".txt", ".html", etc.) + * @returns {Promise} + */ + read: function readFile(file) { + return new Promise(function(resolve2, reject) { + var path; + try { + path = url.toFileSystemPath(file.url); + } catch (err) { + reject(ono.uri(err, "Malformed URI: %s", file.url)); + } + debug("Opening file: %s", path); + try { + fs.readFile(path, function(err, data) { + if (err) { + reject(ono(err, 'Error opening file "%s"', path)); + } else { + resolve2(data); + } + }); + } catch (err) { + reject(ono(err, 'Error opening file "%s"', path)); + } + }); + } + }; + }, { "../util/debug": 17, "../util/url": 19, "fs": 22, "ono": 67 }], 16: [function(_dereq_2, module5, exports5) { + (function(process2, Buffer2) { + "use strict"; + var http = _dereq_2("http"), https = _dereq_2("https"), ono = _dereq_2("ono"), url = _dereq_2("../util/url"), debug = _dereq_2("../util/debug"); + module5.exports = { + /** + * The order that this resolver will run, in relation to other resolvers. + * + * @type {number} + */ + order: 200, + /** + * HTTP headers to send when downloading files. + * + * @example: + * { + * "User-Agent": "JSON Schema $Ref Parser", + * Accept: "application/json" + * } + * + * @type {object} + */ + headers: null, + /** + * HTTP request timeout (in milliseconds). + * + * @type {number} + */ + timeout: 5e3, + // 5 seconds + /** + * The maximum number of HTTP redirects to follow. + * To disable automatic following of redirects, set this to zero. + * + * @type {number} + */ + redirects: 5, + /** + * The `withCredentials` option of XMLHttpRequest. + * Set this to `true` if you're downloading files from a CORS-enabled server that requires authentication + * + * @type {boolean} + */ + withCredentials: false, + /** + * Determines whether this resolver can read a given file reference. + * Resolvers that return true will be tried in order, until one successfully resolves the file. + * Resolvers that return false will not be given a chance to resolve the file. + * + * @param {object} file - An object containing information about the referenced file + * @param {string} file.url - The full URL of the referenced file + * @param {string} file.extension - The lowercased file extension (e.g. ".txt", ".html", etc.) + * @returns {boolean} + */ + canRead: function isHttp(file) { + return url.isHttp(file.url); + }, + /** + * Reads the given URL and returns its raw contents as a Buffer. + * + * @param {object} file - An object containing information about the referenced file + * @param {string} file.url - The full URL of the referenced file + * @param {string} file.extension - The lowercased file extension (e.g. ".txt", ".html", etc.) + * @returns {Promise} + */ + read: function readHttp(file) { + var u = url.parse(file.url); + if (process2.browser && !u.protocol) { + u.protocol = url.parse(location.href).protocol; + } + return download(u, this); + } + }; + function download(u, httpOptions, redirects) { + return new Promise(function(resolve2, reject) { + u = url.parse(u); + redirects = redirects || []; + redirects.push(u.href); + get(u, httpOptions).then(function(res) { + if (res.statusCode >= 400) { + throw ono({ status: res.statusCode }, "HTTP ERROR %d", res.statusCode); + } else if (res.statusCode >= 300) { + if (redirects.length > httpOptions.redirects) { + reject(ono( + { status: res.statusCode }, + "Error downloading %s. \nToo many redirects: \n %s", + redirects[0], + redirects.join(" \n ") + )); + } else if (!res.headers.location) { + throw ono({ status: res.statusCode }, "HTTP %d redirect with no location header", res.statusCode); + } else { + debug("HTTP %d redirect %s -> %s", res.statusCode, u.href, res.headers.location); + var redirectTo = url.resolve(u, res.headers.location); + download(redirectTo, httpOptions, redirects).then(resolve2, reject); + } + } else { + resolve2(res.body || new Buffer2(0)); + } + }).catch(function(err) { + reject(ono(err, "Error downloading", u.href)); + }); + }); + } + function get(u, httpOptions) { + return new Promise(function(resolve2, reject) { + debug("GET", u.href); + var protocol = u.protocol === "https:" ? https : http; + var req = protocol.get({ + hostname: u.hostname, + port: u.port, + path: u.path, + auth: u.auth, + protocol: u.protocol, + headers: httpOptions.headers || {}, + withCredentials: httpOptions.withCredentials + }); + if (typeof req.setTimeout === "function") { + req.setTimeout(httpOptions.timeout); + } + req.on("timeout", function() { + req.abort(); + }); + req.on("error", reject); + req.once("response", function(res) { + res.body = new Buffer2(0); + res.on("data", function(data) { + res.body = Buffer2.concat([res.body, new Buffer2(data)]); + }); + res.on("error", reject); + res.on("end", function() { + resolve2(res); + }); + }); + }); + } + }).call(this, _dereq_2("_process"), _dereq_2("buffer").Buffer); + }, { "../util/debug": 17, "../util/url": 19, "_process": 69, "buffer": 23, "http": 84, "https": 31, "ono": 67 }], 17: [function(_dereq_2, module5, exports5) { + "use strict"; + var debug = _dereq_2("debug"); + module5.exports = debug("json-schema-ref-parser"); + }, { "debug": 27 }], 18: [function(_dereq_2, module5, exports5) { + "use strict"; + var debug = _dereq_2("./debug"); + exports5.all = function(plugins) { + return Object.keys(plugins).filter(function(key) { + return typeof plugins[key] === "object"; + }).map(function(key) { + plugins[key].name = key; + return plugins[key]; + }); + }; + exports5.filter = function(plugins, method, file) { + return plugins.filter(function(plugin) { + return !!getResult(plugin, method, file); + }); + }; + exports5.sort = function(plugins) { + plugins.forEach(function(plugin) { + plugin.order = plugin.order || Number.MAX_SAFE_INTEGER; + }); + return plugins.sort(function(a, b) { + return a.order - b.order; + }); + }; + exports5.run = function(plugins, method, file) { + var plugin, lastError, index = 0; + return new Promise(function(resolve2, reject) { + runNextPlugin(); + function runNextPlugin() { + plugin = plugins[index++]; + if (!plugin) { + return reject(lastError); + } + try { + debug(" %s", plugin.name); + var result = getResult(plugin, method, file, callback); + if (result && typeof result.then === "function") { + result.then(onSuccess, onError); + } else if (result !== void 0) { + onSuccess(result); + } + } catch (e) { + onError(e); + } + } + function callback(err, result) { + if (err) { + onError(err); + } else { + onSuccess(result); + } + } + function onSuccess(result) { + debug(" success"); + resolve2({ + plugin, + result + }); + } + function onError(err) { + debug(" %s", err.message || err); + lastError = err; + runNextPlugin(); + } + }); + }; + function getResult(obj, prop, file, callback) { + var value = obj[prop]; + if (typeof value === "function") { + return value.apply(obj, [file, callback]); + } + if (!callback) { + if (value instanceof RegExp) { + return value.test(file.url); + } else if (typeof value === "string") { + return value === file.extension; + } else if (Array.isArray(value)) { + return value.indexOf(file.extension) !== -1; + } + } + return value; + } + }, { "./debug": 17 }], 19: [function(_dereq_2, module5, exports5) { + (function(process2) { + "use strict"; + var isWindows = /^win/.test(process2.platform), forwardSlashPattern = /\//g, protocolPattern = /^([a-z0-9.+-]+):\/\//i, url = module5.exports; + var urlEncodePatterns = [ + /\?/g, + "%3F", + /\#/g, + "%23", + isWindows ? /\\/g : /\//, + "/" + ]; + var urlDecodePatterns = [ + /\%23/g, + "#", + /\%24/g, + "$", + /\%26/g, + "&", + /\%2C/g, + ",", + /\%40/g, + "@" + ]; + exports5.parse = _dereq_2("url").parse; + exports5.resolve = _dereq_2("url").resolve; + exports5.cwd = function cwd() { + return process2.browser ? location.href : process2.cwd() + "/"; + }; + exports5.getProtocol = function getProtocol(path) { + var match = protocolPattern.exec(path); + if (match) { + return match[1].toLowerCase(); + } + }; + exports5.getExtension = function getExtension(path) { + var lastDot = path.lastIndexOf("."); + if (lastDot >= 0) { + return path.substr(lastDot).toLowerCase(); + } + return ""; + }; + exports5.getHash = function getHash(path) { + var hashIndex = path.indexOf("#"); + if (hashIndex >= 0) { + return path.substr(hashIndex); + } + return "#"; + }; + exports5.stripHash = function stripHash(path) { + var hashIndex = path.indexOf("#"); + if (hashIndex >= 0) { + path = path.substr(0, hashIndex); + } + return path; + }; + exports5.isHttp = function isHttp(path) { + var protocol = url.getProtocol(path); + if (protocol === "http" || protocol === "https") { + return true; + } else if (protocol === void 0) { + return process2.browser; + } else { + return false; + } + }; + exports5.isFileSystemPath = function isFileSystemPath(path) { + if (process2.browser) { + return false; + } + var protocol = url.getProtocol(path); + return protocol === void 0 || protocol === "file"; + }; + exports5.fromFileSystemPath = function fromFileSystemPath(path) { + for (var i = 0; i < urlEncodePatterns.length; i += 2) { + path = path.replace(urlEncodePatterns[i], urlEncodePatterns[i + 1]); + } + return encodeURI(path); + }; + exports5.toFileSystemPath = function toFileSystemPath(path, keepFileProtocol) { + path = decodeURI(path); + for (var i = 0; i < urlDecodePatterns.length; i += 2) { + path = path.replace(urlDecodePatterns[i], urlDecodePatterns[i + 1]); + } + var isFileUrl = path.substr(0, 7).toLowerCase() === "file://"; + if (isFileUrl) { + path = path[7] === "/" ? path.substr(8) : path.substr(7); + if (isWindows && path[1] === "/") { + path = path[0] + ":" + path.substr(1); + } + if (keepFileProtocol) { + path = "file:///" + path; + } else { + isFileUrl = false; + path = isWindows ? path : "/" + path; + } + } + if (isWindows && !isFileUrl) { + path = path.replace(forwardSlashPattern, "\\"); + if (path.substr(1, 2) === ":\\") { + path = path[0].toUpperCase() + path.substr(1); + } + } + return path; + }; + }).call(this, _dereq_2("_process")); + }, { "_process": 69, "url": 90 }], 20: [function(_dereq_2, module5, exports5) { + "use strict"; + var yaml = _dereq_2("js-yaml"), ono = _dereq_2("ono"); + module5.exports = { + /** + * Parses a YAML string and returns the value. + * + * @param {string} text - The YAML string to be parsed + * @param {function} [reviver] - Not currently supported. Provided for consistency with {@link JSON.parse} + * @returns {*} + */ + parse: function yamlParse(text, reviver) { + try { + return yaml.load(text); + } catch (e) { + if (e instanceof Error) { + throw e; + } else { + throw ono(e, e.message); + } + } + }, + /** + * Converts a JavaScript value to a YAML string. + * + * @param {*} value - The value to convert to YAML + * @param {function|array} replacer - Not currently supported. Provided for consistency with {@link JSON.stringify} + * @param {string|number} space - The number of spaces to use for indentation, or a string containing the number of spaces. + * @returns {string} + */ + stringify: function yamlStringify(value, replacer, space) { + try { + var indent = (typeof space === "string" ? space.length : space) || 2; + return yaml.safeDump(value, { indent }); + } catch (e) { + if (e instanceof Error) { + throw e; + } else { + throw ono(e, e.message); + } + } + } + }; + }, { "js-yaml": 36, "ono": 67 }], 21: [function(_dereq_2, module5, exports5) { + "use strict"; + exports5.byteLength = byteLength; + exports5.toByteArray = toByteArray; + exports5.fromByteArray = fromByteArray; + var lookup = []; + var revLookup = []; + var Arr = typeof Uint8Array !== "undefined" ? Uint8Array : Array; + var code = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; + for (var i = 0, len = code.length; i < len; ++i) { + lookup[i] = code[i]; + revLookup[code.charCodeAt(i)] = i; + } + revLookup["-".charCodeAt(0)] = 62; + revLookup["_".charCodeAt(0)] = 63; + function placeHoldersCount(b64) { + var len2 = b64.length; + if (len2 % 4 > 0) { + throw new Error("Invalid string. Length must be a multiple of 4"); + } + return b64[len2 - 2] === "=" ? 2 : b64[len2 - 1] === "=" ? 1 : 0; + } + function byteLength(b64) { + return b64.length * 3 / 4 - placeHoldersCount(b64); + } + function toByteArray(b64) { + var i2, l, tmp, placeHolders, arr; + var len2 = b64.length; + placeHolders = placeHoldersCount(b64); + arr = new Arr(len2 * 3 / 4 - placeHolders); + l = placeHolders > 0 ? len2 - 4 : len2; + var L = 0; + for (i2 = 0; i2 < l; i2 += 4) { + tmp = revLookup[b64.charCodeAt(i2)] << 18 | revLookup[b64.charCodeAt(i2 + 1)] << 12 | revLookup[b64.charCodeAt(i2 + 2)] << 6 | revLookup[b64.charCodeAt(i2 + 3)]; + arr[L++] = tmp >> 16 & 255; + arr[L++] = tmp >> 8 & 255; + arr[L++] = tmp & 255; + } + if (placeHolders === 2) { + tmp = revLookup[b64.charCodeAt(i2)] << 2 | revLookup[b64.charCodeAt(i2 + 1)] >> 4; + arr[L++] = tmp & 255; + } else if (placeHolders === 1) { + tmp = revLookup[b64.charCodeAt(i2)] << 10 | revLookup[b64.charCodeAt(i2 + 1)] << 4 | revLookup[b64.charCodeAt(i2 + 2)] >> 2; + arr[L++] = tmp >> 8 & 255; + arr[L++] = tmp & 255; + } + return arr; + } + function tripletToBase64(num) { + return lookup[num >> 18 & 63] + lookup[num >> 12 & 63] + lookup[num >> 6 & 63] + lookup[num & 63]; + } + function encodeChunk(uint8, start, end2) { + var tmp; + var output = []; + for (var i2 = start; i2 < end2; i2 += 3) { + tmp = (uint8[i2] << 16) + (uint8[i2 + 1] << 8) + uint8[i2 + 2]; + output.push(tripletToBase64(tmp)); + } + return output.join(""); + } + function fromByteArray(uint8) { + var tmp; + var len2 = uint8.length; + var extraBytes = len2 % 3; + var output = ""; + var parts = []; + var maxChunkLength = 16383; + for (var i2 = 0, len22 = len2 - extraBytes; i2 < len22; i2 += maxChunkLength) { + parts.push(encodeChunk(uint8, i2, i2 + maxChunkLength > len22 ? len22 : i2 + maxChunkLength)); + } + if (extraBytes === 1) { + tmp = uint8[len2 - 1]; + output += lookup[tmp >> 2]; + output += lookup[tmp << 4 & 63]; + output += "=="; + } else if (extraBytes === 2) { + tmp = (uint8[len2 - 2] << 8) + uint8[len2 - 1]; + output += lookup[tmp >> 10]; + output += lookup[tmp >> 4 & 63]; + output += lookup[tmp << 2 & 63]; + output += "="; + } + parts.push(output); + return parts.join(""); + } + }, {}], 22: [function(_dereq_2, module5, exports5) { + }, {}], 23: [function(_dereq_2, module5, exports5) { + "use strict"; + var base64 = _dereq_2("base64-js"); + var ieee754 = _dereq_2("ieee754"); + exports5.Buffer = Buffer2; + exports5.SlowBuffer = SlowBuffer; + exports5.INSPECT_MAX_BYTES = 50; + var K_MAX_LENGTH = 2147483647; + exports5.kMaxLength = K_MAX_LENGTH; + Buffer2.TYPED_ARRAY_SUPPORT = typedArraySupport(); + if (!Buffer2.TYPED_ARRAY_SUPPORT && typeof console !== "undefined" && typeof console.warn === "function") { + console.warn( + "This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you _dereq_ old browser support." + ); + } + function typedArraySupport() { + try { + var arr = new Uint8Array(1); + arr.__proto__ = { __proto__: Uint8Array.prototype, foo: function() { + return 42; + } }; + return arr.foo() === 42; + } catch (e) { + return false; + } + } + function createBuffer(length) { + if (length > K_MAX_LENGTH) { + throw new RangeError("Invalid typed array length"); + } + var buf = new Uint8Array(length); + buf.__proto__ = Buffer2.prototype; + return buf; + } + function Buffer2(arg, encodingOrOffset, length) { + if (typeof arg === "number") { + if (typeof encodingOrOffset === "string") { + throw new Error( + "If encoding is specified then the first argument must be a string" + ); + } + return allocUnsafe(arg); + } + return from(arg, encodingOrOffset, length); + } + if (typeof Symbol !== "undefined" && Symbol.species && Buffer2[Symbol.species] === Buffer2) { + Object.defineProperty(Buffer2, Symbol.species, { + value: null, + configurable: true, + enumerable: false, + writable: false + }); + } + Buffer2.poolSize = 8192; + function from(value, encodingOrOffset, length) { + if (typeof value === "number") { + throw new TypeError('"value" argument must not be a number'); + } + if (isArrayBuffer(value)) { + return fromArrayBuffer(value, encodingOrOffset, length); + } + if (typeof value === "string") { + return fromString(value, encodingOrOffset); + } + return fromObject(value); + } + Buffer2.from = function(value, encodingOrOffset, length) { + return from(value, encodingOrOffset, length); + }; + Buffer2.prototype.__proto__ = Uint8Array.prototype; + Buffer2.__proto__ = Uint8Array; + function assertSize(size) { + if (typeof size !== "number") { + throw new TypeError('"size" argument must be a number'); + } else if (size < 0) { + throw new RangeError('"size" argument must not be negative'); + } + } + function alloc(size, fill, encoding) { + assertSize(size); + if (size <= 0) { + return createBuffer(size); + } + if (fill !== void 0) { + return typeof encoding === "string" ? createBuffer(size).fill(fill, encoding) : createBuffer(size).fill(fill); + } + return createBuffer(size); + } + Buffer2.alloc = function(size, fill, encoding) { + return alloc(size, fill, encoding); + }; + function allocUnsafe(size) { + assertSize(size); + return createBuffer(size < 0 ? 0 : checked(size) | 0); + } + Buffer2.allocUnsafe = function(size) { + return allocUnsafe(size); + }; + Buffer2.allocUnsafeSlow = function(size) { + return allocUnsafe(size); + }; + function fromString(string, encoding) { + if (typeof encoding !== "string" || encoding === "") { + encoding = "utf8"; + } + if (!Buffer2.isEncoding(encoding)) { + throw new TypeError('"encoding" must be a valid string encoding'); + } + var length = byteLength(string, encoding) | 0; + var buf = createBuffer(length); + var actual = buf.write(string, encoding); + if (actual !== length) { + buf = buf.slice(0, actual); + } + return buf; + } + function fromArrayLike(array) { + var length = array.length < 0 ? 0 : checked(array.length) | 0; + var buf = createBuffer(length); + for (var i = 0; i < length; i += 1) { + buf[i] = array[i] & 255; + } + return buf; + } + function fromArrayBuffer(array, byteOffset, length) { + if (byteOffset < 0 || array.byteLength < byteOffset) { + throw new RangeError("'offset' is out of bounds"); + } + if (array.byteLength < byteOffset + (length || 0)) { + throw new RangeError("'length' is out of bounds"); + } + var buf; + if (byteOffset === void 0 && length === void 0) { + buf = new Uint8Array(array); + } else if (length === void 0) { + buf = new Uint8Array(array, byteOffset); + } else { + buf = new Uint8Array(array, byteOffset, length); + } + buf.__proto__ = Buffer2.prototype; + return buf; + } + function fromObject(obj) { + if (Buffer2.isBuffer(obj)) { + var len = checked(obj.length) | 0; + var buf = createBuffer(len); + if (buf.length === 0) { + return buf; + } + obj.copy(buf, 0, 0, len); + return buf; + } + if (obj) { + if (isArrayBufferView(obj) || "length" in obj) { + if (typeof obj.length !== "number" || numberIsNaN(obj.length)) { + return createBuffer(0); + } + return fromArrayLike(obj); + } + if (obj.type === "Buffer" && Array.isArray(obj.data)) { + return fromArrayLike(obj.data); + } + } + throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object."); + } + function checked(length) { + if (length >= K_MAX_LENGTH) { + throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + K_MAX_LENGTH.toString(16) + " bytes"); + } + return length | 0; + } + function SlowBuffer(length) { + if (+length != length) { + length = 0; + } + return Buffer2.alloc(+length); + } + Buffer2.isBuffer = function isBuffer(b) { + return b != null && b._isBuffer === true; + }; + Buffer2.compare = function compare(a, b) { + if (!Buffer2.isBuffer(a) || !Buffer2.isBuffer(b)) { + throw new TypeError("Arguments must be Buffers"); + } + if (a === b) return 0; + var x = a.length; + var y = b.length; + for (var i = 0, len = Math.min(x, y); i < len; ++i) { + if (a[i] !== b[i]) { + x = a[i]; + y = b[i]; + break; + } + } + if (x < y) return -1; + if (y < x) return 1; + return 0; + }; + Buffer2.isEncoding = function isEncoding(encoding) { + switch (String(encoding).toLowerCase()) { + case "hex": + case "utf8": + case "utf-8": + case "ascii": + case "latin1": + case "binary": + case "base64": + case "ucs2": + case "ucs-2": + case "utf16le": + case "utf-16le": + return true; + default: + return false; + } + }; + Buffer2.concat = function concat(list, length) { + if (!Array.isArray(list)) { + throw new TypeError('"list" argument must be an Array of Buffers'); + } + if (list.length === 0) { + return Buffer2.alloc(0); + } + var i; + if (length === void 0) { + length = 0; + for (i = 0; i < list.length; ++i) { + length += list[i].length; + } + } + var buffer = Buffer2.allocUnsafe(length); + var pos = 0; + for (i = 0; i < list.length; ++i) { + var buf = list[i]; + if (!Buffer2.isBuffer(buf)) { + throw new TypeError('"list" argument must be an Array of Buffers'); + } + buf.copy(buffer, pos); + pos += buf.length; + } + return buffer; + }; + function byteLength(string, encoding) { + if (Buffer2.isBuffer(string)) { + return string.length; + } + if (isArrayBufferView(string) || isArrayBuffer(string)) { + return string.byteLength; + } + if (typeof string !== "string") { + string = "" + string; + } + var len = string.length; + if (len === 0) return 0; + var loweredCase = false; + for (; ; ) { + switch (encoding) { + case "ascii": + case "latin1": + case "binary": + return len; + case "utf8": + case "utf-8": + case void 0: + return utf8ToBytes(string).length; + case "ucs2": + case "ucs-2": + case "utf16le": + case "utf-16le": + return len * 2; + case "hex": + return len >>> 1; + case "base64": + return base64ToBytes(string).length; + default: + if (loweredCase) return utf8ToBytes(string).length; + encoding = ("" + encoding).toLowerCase(); + loweredCase = true; + } + } + } + Buffer2.byteLength = byteLength; + function slowToString(encoding, start, end2) { + var loweredCase = false; + if (start === void 0 || start < 0) { + start = 0; + } + if (start > this.length) { + return ""; + } + if (end2 === void 0 || end2 > this.length) { + end2 = this.length; + } + if (end2 <= 0) { + return ""; + } + end2 >>>= 0; + start >>>= 0; + if (end2 <= start) { + return ""; + } + if (!encoding) encoding = "utf8"; + while (true) { + switch (encoding) { + case "hex": + return hexSlice(this, start, end2); + case "utf8": + case "utf-8": + return utf8Slice(this, start, end2); + case "ascii": + return asciiSlice(this, start, end2); + case "latin1": + case "binary": + return latin1Slice(this, start, end2); + case "base64": + return base64Slice(this, start, end2); + case "ucs2": + case "ucs-2": + case "utf16le": + case "utf-16le": + return utf16leSlice(this, start, end2); + default: + if (loweredCase) throw new TypeError("Unknown encoding: " + encoding); + encoding = (encoding + "").toLowerCase(); + loweredCase = true; + } + } + } + Buffer2.prototype._isBuffer = true; + function swap(b, n, m) { + var i = b[n]; + b[n] = b[m]; + b[m] = i; + } + Buffer2.prototype.swap16 = function swap16() { + var len = this.length; + if (len % 2 !== 0) { + throw new RangeError("Buffer size must be a multiple of 16-bits"); + } + for (var i = 0; i < len; i += 2) { + swap(this, i, i + 1); + } + return this; + }; + Buffer2.prototype.swap32 = function swap32() { + var len = this.length; + if (len % 4 !== 0) { + throw new RangeError("Buffer size must be a multiple of 32-bits"); + } + for (var i = 0; i < len; i += 4) { + swap(this, i, i + 3); + swap(this, i + 1, i + 2); + } + return this; + }; + Buffer2.prototype.swap64 = function swap64() { + var len = this.length; + if (len % 8 !== 0) { + throw new RangeError("Buffer size must be a multiple of 64-bits"); + } + for (var i = 0; i < len; i += 8) { + swap(this, i, i + 7); + swap(this, i + 1, i + 6); + swap(this, i + 2, i + 5); + swap(this, i + 3, i + 4); + } + return this; + }; + Buffer2.prototype.toString = function toString() { + var length = this.length; + if (length === 0) return ""; + if (arguments.length === 0) return utf8Slice(this, 0, length); + return slowToString.apply(this, arguments); + }; + Buffer2.prototype.equals = function equals(b) { + if (!Buffer2.isBuffer(b)) throw new TypeError("Argument must be a Buffer"); + if (this === b) return true; + return Buffer2.compare(this, b) === 0; + }; + Buffer2.prototype.inspect = function inspect() { + var str = ""; + var max = exports5.INSPECT_MAX_BYTES; + if (this.length > 0) { + str = this.toString("hex", 0, max).match(/.{2}/g).join(" "); + if (this.length > max) str += " ... "; + } + return ""; + }; + Buffer2.prototype.compare = function compare(target, start, end2, thisStart, thisEnd) { + if (!Buffer2.isBuffer(target)) { + throw new TypeError("Argument must be a Buffer"); + } + if (start === void 0) { + start = 0; + } + if (end2 === void 0) { + end2 = target ? target.length : 0; + } + if (thisStart === void 0) { + thisStart = 0; + } + if (thisEnd === void 0) { + thisEnd = this.length; + } + if (start < 0 || end2 > target.length || thisStart < 0 || thisEnd > this.length) { + throw new RangeError("out of range index"); + } + if (thisStart >= thisEnd && start >= end2) { + return 0; + } + if (thisStart >= thisEnd) { + return -1; + } + if (start >= end2) { + return 1; + } + start >>>= 0; + end2 >>>= 0; + thisStart >>>= 0; + thisEnd >>>= 0; + if (this === target) return 0; + var x = thisEnd - thisStart; + var y = end2 - start; + var len = Math.min(x, y); + var thisCopy = this.slice(thisStart, thisEnd); + var targetCopy = target.slice(start, end2); + for (var i = 0; i < len; ++i) { + if (thisCopy[i] !== targetCopy[i]) { + x = thisCopy[i]; + y = targetCopy[i]; + break; + } + } + if (x < y) return -1; + if (y < x) return 1; + return 0; + }; + function bidirectionalIndexOf(buffer, val, byteOffset, encoding, dir) { + if (buffer.length === 0) return -1; + if (typeof byteOffset === "string") { + encoding = byteOffset; + byteOffset = 0; + } else if (byteOffset > 2147483647) { + byteOffset = 2147483647; + } else if (byteOffset < -2147483648) { + byteOffset = -2147483648; + } + byteOffset = +byteOffset; + if (numberIsNaN(byteOffset)) { + byteOffset = dir ? 0 : buffer.length - 1; + } + if (byteOffset < 0) byteOffset = buffer.length + byteOffset; + if (byteOffset >= buffer.length) { + if (dir) return -1; + else byteOffset = buffer.length - 1; + } else if (byteOffset < 0) { + if (dir) byteOffset = 0; + else return -1; + } + if (typeof val === "string") { + val = Buffer2.from(val, encoding); + } + if (Buffer2.isBuffer(val)) { + if (val.length === 0) { + return -1; + } + return arrayIndexOf(buffer, val, byteOffset, encoding, dir); + } else if (typeof val === "number") { + val = val & 255; + if (typeof Uint8Array.prototype.indexOf === "function") { + if (dir) { + return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset); + } else { + return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset); + } + } + return arrayIndexOf(buffer, [val], byteOffset, encoding, dir); + } + throw new TypeError("val must be string, number or Buffer"); + } + function arrayIndexOf(arr, val, byteOffset, encoding, dir) { + var indexSize = 1; + var arrLength = arr.length; + var valLength = val.length; + if (encoding !== void 0) { + encoding = String(encoding).toLowerCase(); + if (encoding === "ucs2" || encoding === "ucs-2" || encoding === "utf16le" || encoding === "utf-16le") { + if (arr.length < 2 || val.length < 2) { + return -1; + } + indexSize = 2; + arrLength /= 2; + valLength /= 2; + byteOffset /= 2; + } + } + function read(buf, i2) { + if (indexSize === 1) { + return buf[i2]; + } else { + return buf.readUInt16BE(i2 * indexSize); + } + } + var i; + if (dir) { + var foundIndex = -1; + for (i = byteOffset; i < arrLength; i++) { + if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) { + if (foundIndex === -1) foundIndex = i; + if (i - foundIndex + 1 === valLength) return foundIndex * indexSize; + } else { + if (foundIndex !== -1) i -= i - foundIndex; + foundIndex = -1; + } + } + } else { + if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength; + for (i = byteOffset; i >= 0; i--) { + var found = true; + for (var j = 0; j < valLength; j++) { + if (read(arr, i + j) !== read(val, j)) { + found = false; + break; + } + } + if (found) return i; + } + } + return -1; + } + Buffer2.prototype.includes = function includes(val, byteOffset, encoding) { + return this.indexOf(val, byteOffset, encoding) !== -1; + }; + Buffer2.prototype.indexOf = function indexOf(val, byteOffset, encoding) { + return bidirectionalIndexOf(this, val, byteOffset, encoding, true); + }; + Buffer2.prototype.lastIndexOf = function lastIndexOf(val, byteOffset, encoding) { + return bidirectionalIndexOf(this, val, byteOffset, encoding, false); + }; + function hexWrite(buf, string, offset, length) { + offset = Number(offset) || 0; + var remaining = buf.length - offset; + if (!length) { + length = remaining; + } else { + length = Number(length); + if (length > remaining) { + length = remaining; + } + } + var strLen = string.length; + if (strLen % 2 !== 0) throw new TypeError("Invalid hex string"); + if (length > strLen / 2) { + length = strLen / 2; + } + for (var i = 0; i < length; ++i) { + var parsed = parseInt(string.substr(i * 2, 2), 16); + if (numberIsNaN(parsed)) return i; + buf[offset + i] = parsed; + } + return i; + } + function utf8Write(buf, string, offset, length) { + return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length); + } + function asciiWrite(buf, string, offset, length) { + return blitBuffer(asciiToBytes(string), buf, offset, length); + } + function latin1Write(buf, string, offset, length) { + return asciiWrite(buf, string, offset, length); + } + function base64Write(buf, string, offset, length) { + return blitBuffer(base64ToBytes(string), buf, offset, length); + } + function ucs2Write(buf, string, offset, length) { + return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length); + } + Buffer2.prototype.write = function write(string, offset, length, encoding) { + if (offset === void 0) { + encoding = "utf8"; + length = this.length; + offset = 0; + } else if (length === void 0 && typeof offset === "string") { + encoding = offset; + length = this.length; + offset = 0; + } else if (isFinite(offset)) { + offset = offset >>> 0; + if (isFinite(length)) { + length = length >>> 0; + if (encoding === void 0) encoding = "utf8"; + } else { + encoding = length; + length = void 0; + } + } else { + throw new Error( + "Buffer.write(string, encoding, offset[, length]) is no longer supported" + ); + } + var remaining = this.length - offset; + if (length === void 0 || length > remaining) length = remaining; + if (string.length > 0 && (length < 0 || offset < 0) || offset > this.length) { + throw new RangeError("Attempt to write outside buffer bounds"); + } + if (!encoding) encoding = "utf8"; + var loweredCase = false; + for (; ; ) { + switch (encoding) { + case "hex": + return hexWrite(this, string, offset, length); + case "utf8": + case "utf-8": + return utf8Write(this, string, offset, length); + case "ascii": + return asciiWrite(this, string, offset, length); + case "latin1": + case "binary": + return latin1Write(this, string, offset, length); + case "base64": + return base64Write(this, string, offset, length); + case "ucs2": + case "ucs-2": + case "utf16le": + case "utf-16le": + return ucs2Write(this, string, offset, length); + default: + if (loweredCase) throw new TypeError("Unknown encoding: " + encoding); + encoding = ("" + encoding).toLowerCase(); + loweredCase = true; + } + } + }; + Buffer2.prototype.toJSON = function toJSON() { + return { + type: "Buffer", + data: Array.prototype.slice.call(this._arr || this, 0) + }; + }; + function base64Slice(buf, start, end2) { + if (start === 0 && end2 === buf.length) { + return base64.fromByteArray(buf); + } else { + return base64.fromByteArray(buf.slice(start, end2)); + } + } + function utf8Slice(buf, start, end2) { + end2 = Math.min(buf.length, end2); + var res = []; + var i = start; + while (i < end2) { + var firstByte = buf[i]; + var codePoint = null; + var bytesPerSequence = firstByte > 239 ? 4 : firstByte > 223 ? 3 : firstByte > 191 ? 2 : 1; + if (i + bytesPerSequence <= end2) { + var secondByte, thirdByte, fourthByte, tempCodePoint; + switch (bytesPerSequence) { + case 1: + if (firstByte < 128) { + codePoint = firstByte; + } + break; + case 2: + secondByte = buf[i + 1]; + if ((secondByte & 192) === 128) { + tempCodePoint = (firstByte & 31) << 6 | secondByte & 63; + if (tempCodePoint > 127) { + codePoint = tempCodePoint; + } + } + break; + case 3: + secondByte = buf[i + 1]; + thirdByte = buf[i + 2]; + if ((secondByte & 192) === 128 && (thirdByte & 192) === 128) { + tempCodePoint = (firstByte & 15) << 12 | (secondByte & 63) << 6 | thirdByte & 63; + if (tempCodePoint > 2047 && (tempCodePoint < 55296 || tempCodePoint > 57343)) { + codePoint = tempCodePoint; + } + } + break; + case 4: + secondByte = buf[i + 1]; + thirdByte = buf[i + 2]; + fourthByte = buf[i + 3]; + if ((secondByte & 192) === 128 && (thirdByte & 192) === 128 && (fourthByte & 192) === 128) { + tempCodePoint = (firstByte & 15) << 18 | (secondByte & 63) << 12 | (thirdByte & 63) << 6 | fourthByte & 63; + if (tempCodePoint > 65535 && tempCodePoint < 1114112) { + codePoint = tempCodePoint; + } + } + } + } + if (codePoint === null) { + codePoint = 65533; + bytesPerSequence = 1; + } else if (codePoint > 65535) { + codePoint -= 65536; + res.push(codePoint >>> 10 & 1023 | 55296); + codePoint = 56320 | codePoint & 1023; + } + res.push(codePoint); + i += bytesPerSequence; + } + return decodeCodePointsArray(res); + } + var MAX_ARGUMENTS_LENGTH = 4096; + function decodeCodePointsArray(codePoints) { + var len = codePoints.length; + if (len <= MAX_ARGUMENTS_LENGTH) { + return String.fromCharCode.apply(String, codePoints); + } + var res = ""; + var i = 0; + while (i < len) { + res += String.fromCharCode.apply( + String, + codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH) + ); + } + return res; + } + function asciiSlice(buf, start, end2) { + var ret = ""; + end2 = Math.min(buf.length, end2); + for (var i = start; i < end2; ++i) { + ret += String.fromCharCode(buf[i] & 127); + } + return ret; + } + function latin1Slice(buf, start, end2) { + var ret = ""; + end2 = Math.min(buf.length, end2); + for (var i = start; i < end2; ++i) { + ret += String.fromCharCode(buf[i]); + } + return ret; + } + function hexSlice(buf, start, end2) { + var len = buf.length; + if (!start || start < 0) start = 0; + if (!end2 || end2 < 0 || end2 > len) end2 = len; + var out = ""; + for (var i = start; i < end2; ++i) { + out += toHex(buf[i]); + } + return out; + } + function utf16leSlice(buf, start, end2) { + var bytes = buf.slice(start, end2); + var res = ""; + for (var i = 0; i < bytes.length; i += 2) { + res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256); + } + return res; + } + Buffer2.prototype.slice = function slice(start, end2) { + var len = this.length; + start = ~~start; + end2 = end2 === void 0 ? len : ~~end2; + if (start < 0) { + start += len; + if (start < 0) start = 0; + } else if (start > len) { + start = len; + } + if (end2 < 0) { + end2 += len; + if (end2 < 0) end2 = 0; + } else if (end2 > len) { + end2 = len; + } + if (end2 < start) end2 = start; + var newBuf = this.subarray(start, end2); + newBuf.__proto__ = Buffer2.prototype; + return newBuf; + }; + function checkOffset(offset, ext, length) { + if (offset % 1 !== 0 || offset < 0) throw new RangeError("offset is not uint"); + if (offset + ext > length) throw new RangeError("Trying to access beyond buffer length"); + } + Buffer2.prototype.readUIntLE = function readUIntLE(offset, byteLength2, noAssert) { + offset = offset >>> 0; + byteLength2 = byteLength2 >>> 0; + if (!noAssert) checkOffset(offset, byteLength2, this.length); + var val = this[offset]; + var mul = 1; + var i = 0; + while (++i < byteLength2 && (mul *= 256)) { + val += this[offset + i] * mul; + } + return val; + }; + Buffer2.prototype.readUIntBE = function readUIntBE(offset, byteLength2, noAssert) { + offset = offset >>> 0; + byteLength2 = byteLength2 >>> 0; + if (!noAssert) { + checkOffset(offset, byteLength2, this.length); + } + var val = this[offset + --byteLength2]; + var mul = 1; + while (byteLength2 > 0 && (mul *= 256)) { + val += this[offset + --byteLength2] * mul; + } + return val; + }; + Buffer2.prototype.readUInt8 = function readUInt8(offset, noAssert) { + offset = offset >>> 0; + if (!noAssert) checkOffset(offset, 1, this.length); + return this[offset]; + }; + Buffer2.prototype.readUInt16LE = function readUInt16LE(offset, noAssert) { + offset = offset >>> 0; + if (!noAssert) checkOffset(offset, 2, this.length); + return this[offset] | this[offset + 1] << 8; + }; + Buffer2.prototype.readUInt16BE = function readUInt16BE(offset, noAssert) { + offset = offset >>> 0; + if (!noAssert) checkOffset(offset, 2, this.length); + return this[offset] << 8 | this[offset + 1]; + }; + Buffer2.prototype.readUInt32LE = function readUInt32LE(offset, noAssert) { + offset = offset >>> 0; + if (!noAssert) checkOffset(offset, 4, this.length); + return (this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16) + this[offset + 3] * 16777216; + }; + Buffer2.prototype.readUInt32BE = function readUInt32BE(offset, noAssert) { + offset = offset >>> 0; + if (!noAssert) checkOffset(offset, 4, this.length); + return this[offset] * 16777216 + (this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3]); + }; + Buffer2.prototype.readIntLE = function readIntLE(offset, byteLength2, noAssert) { + offset = offset >>> 0; + byteLength2 = byteLength2 >>> 0; + if (!noAssert) checkOffset(offset, byteLength2, this.length); + var val = this[offset]; + var mul = 1; + var i = 0; + while (++i < byteLength2 && (mul *= 256)) { + val += this[offset + i] * mul; + } + mul *= 128; + if (val >= mul) val -= Math.pow(2, 8 * byteLength2); + return val; + }; + Buffer2.prototype.readIntBE = function readIntBE(offset, byteLength2, noAssert) { + offset = offset >>> 0; + byteLength2 = byteLength2 >>> 0; + if (!noAssert) checkOffset(offset, byteLength2, this.length); + var i = byteLength2; + var mul = 1; + var val = this[offset + --i]; + while (i > 0 && (mul *= 256)) { + val += this[offset + --i] * mul; + } + mul *= 128; + if (val >= mul) val -= Math.pow(2, 8 * byteLength2); + return val; + }; + Buffer2.prototype.readInt8 = function readInt8(offset, noAssert) { + offset = offset >>> 0; + if (!noAssert) checkOffset(offset, 1, this.length); + if (!(this[offset] & 128)) return this[offset]; + return (255 - this[offset] + 1) * -1; + }; + Buffer2.prototype.readInt16LE = function readInt16LE(offset, noAssert) { + offset = offset >>> 0; + if (!noAssert) checkOffset(offset, 2, this.length); + var val = this[offset] | this[offset + 1] << 8; + return val & 32768 ? val | 4294901760 : val; + }; + Buffer2.prototype.readInt16BE = function readInt16BE(offset, noAssert) { + offset = offset >>> 0; + if (!noAssert) checkOffset(offset, 2, this.length); + var val = this[offset + 1] | this[offset] << 8; + return val & 32768 ? val | 4294901760 : val; + }; + Buffer2.prototype.readInt32LE = function readInt32LE(offset, noAssert) { + offset = offset >>> 0; + if (!noAssert) checkOffset(offset, 4, this.length); + return this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16 | this[offset + 3] << 24; + }; + Buffer2.prototype.readInt32BE = function readInt32BE(offset, noAssert) { + offset = offset >>> 0; + if (!noAssert) checkOffset(offset, 4, this.length); + return this[offset] << 24 | this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3]; + }; + Buffer2.prototype.readFloatLE = function readFloatLE(offset, noAssert) { + offset = offset >>> 0; + if (!noAssert) checkOffset(offset, 4, this.length); + return ieee754.read(this, offset, true, 23, 4); + }; + Buffer2.prototype.readFloatBE = function readFloatBE(offset, noAssert) { + offset = offset >>> 0; + if (!noAssert) checkOffset(offset, 4, this.length); + return ieee754.read(this, offset, false, 23, 4); + }; + Buffer2.prototype.readDoubleLE = function readDoubleLE(offset, noAssert) { + offset = offset >>> 0; + if (!noAssert) checkOffset(offset, 8, this.length); + return ieee754.read(this, offset, true, 52, 8); + }; + Buffer2.prototype.readDoubleBE = function readDoubleBE(offset, noAssert) { + offset = offset >>> 0; + if (!noAssert) checkOffset(offset, 8, this.length); + return ieee754.read(this, offset, false, 52, 8); + }; + function checkInt(buf, value, offset, ext, max, min) { + if (!Buffer2.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance'); + if (value > max || value < min) throw new RangeError('"value" argument is out of bounds'); + if (offset + ext > buf.length) throw new RangeError("Index out of range"); + } + Buffer2.prototype.writeUIntLE = function writeUIntLE(value, offset, byteLength2, noAssert) { + value = +value; + offset = offset >>> 0; + byteLength2 = byteLength2 >>> 0; + if (!noAssert) { + var maxBytes = Math.pow(2, 8 * byteLength2) - 1; + checkInt(this, value, offset, byteLength2, maxBytes, 0); + } + var mul = 1; + var i = 0; + this[offset] = value & 255; + while (++i < byteLength2 && (mul *= 256)) { + this[offset + i] = value / mul & 255; + } + return offset + byteLength2; + }; + Buffer2.prototype.writeUIntBE = function writeUIntBE(value, offset, byteLength2, noAssert) { + value = +value; + offset = offset >>> 0; + byteLength2 = byteLength2 >>> 0; + if (!noAssert) { + var maxBytes = Math.pow(2, 8 * byteLength2) - 1; + checkInt(this, value, offset, byteLength2, maxBytes, 0); + } + var i = byteLength2 - 1; + var mul = 1; + this[offset + i] = value & 255; + while (--i >= 0 && (mul *= 256)) { + this[offset + i] = value / mul & 255; + } + return offset + byteLength2; + }; + Buffer2.prototype.writeUInt8 = function writeUInt8(value, offset, noAssert) { + value = +value; + offset = offset >>> 0; + if (!noAssert) checkInt(this, value, offset, 1, 255, 0); + this[offset] = value & 255; + return offset + 1; + }; + Buffer2.prototype.writeUInt16LE = function writeUInt16LE(value, offset, noAssert) { + value = +value; + offset = offset >>> 0; + if (!noAssert) checkInt(this, value, offset, 2, 65535, 0); + this[offset] = value & 255; + this[offset + 1] = value >>> 8; + return offset + 2; + }; + Buffer2.prototype.writeUInt16BE = function writeUInt16BE(value, offset, noAssert) { + value = +value; + offset = offset >>> 0; + if (!noAssert) checkInt(this, value, offset, 2, 65535, 0); + this[offset] = value >>> 8; + this[offset + 1] = value & 255; + return offset + 2; + }; + Buffer2.prototype.writeUInt32LE = function writeUInt32LE(value, offset, noAssert) { + value = +value; + offset = offset >>> 0; + if (!noAssert) checkInt(this, value, offset, 4, 4294967295, 0); + this[offset + 3] = value >>> 24; + this[offset + 2] = value >>> 16; + this[offset + 1] = value >>> 8; + this[offset] = value & 255; + return offset + 4; + }; + Buffer2.prototype.writeUInt32BE = function writeUInt32BE(value, offset, noAssert) { + value = +value; + offset = offset >>> 0; + if (!noAssert) checkInt(this, value, offset, 4, 4294967295, 0); + this[offset] = value >>> 24; + this[offset + 1] = value >>> 16; + this[offset + 2] = value >>> 8; + this[offset + 3] = value & 255; + return offset + 4; + }; + Buffer2.prototype.writeIntLE = function writeIntLE(value, offset, byteLength2, noAssert) { + value = +value; + offset = offset >>> 0; + if (!noAssert) { + var limit = Math.pow(2, 8 * byteLength2 - 1); + checkInt(this, value, offset, byteLength2, limit - 1, -limit); + } + var i = 0; + var mul = 1; + var sub = 0; + this[offset] = value & 255; + while (++i < byteLength2 && (mul *= 256)) { + if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) { + sub = 1; + } + this[offset + i] = (value / mul >> 0) - sub & 255; + } + return offset + byteLength2; + }; + Buffer2.prototype.writeIntBE = function writeIntBE(value, offset, byteLength2, noAssert) { + value = +value; + offset = offset >>> 0; + if (!noAssert) { + var limit = Math.pow(2, 8 * byteLength2 - 1); + checkInt(this, value, offset, byteLength2, limit - 1, -limit); + } + var i = byteLength2 - 1; + var mul = 1; + var sub = 0; + this[offset + i] = value & 255; + while (--i >= 0 && (mul *= 256)) { + if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) { + sub = 1; + } + this[offset + i] = (value / mul >> 0) - sub & 255; + } + return offset + byteLength2; + }; + Buffer2.prototype.writeInt8 = function writeInt8(value, offset, noAssert) { + value = +value; + offset = offset >>> 0; + if (!noAssert) checkInt(this, value, offset, 1, 127, -128); + if (value < 0) value = 255 + value + 1; + this[offset] = value & 255; + return offset + 1; + }; + Buffer2.prototype.writeInt16LE = function writeInt16LE(value, offset, noAssert) { + value = +value; + offset = offset >>> 0; + if (!noAssert) checkInt(this, value, offset, 2, 32767, -32768); + this[offset] = value & 255; + this[offset + 1] = value >>> 8; + return offset + 2; + }; + Buffer2.prototype.writeInt16BE = function writeInt16BE(value, offset, noAssert) { + value = +value; + offset = offset >>> 0; + if (!noAssert) checkInt(this, value, offset, 2, 32767, -32768); + this[offset] = value >>> 8; + this[offset + 1] = value & 255; + return offset + 2; + }; + Buffer2.prototype.writeInt32LE = function writeInt32LE(value, offset, noAssert) { + value = +value; + offset = offset >>> 0; + if (!noAssert) checkInt(this, value, offset, 4, 2147483647, -2147483648); + this[offset] = value & 255; + this[offset + 1] = value >>> 8; + this[offset + 2] = value >>> 16; + this[offset + 3] = value >>> 24; + return offset + 4; + }; + Buffer2.prototype.writeInt32BE = function writeInt32BE(value, offset, noAssert) { + value = +value; + offset = offset >>> 0; + if (!noAssert) checkInt(this, value, offset, 4, 2147483647, -2147483648); + if (value < 0) value = 4294967295 + value + 1; + this[offset] = value >>> 24; + this[offset + 1] = value >>> 16; + this[offset + 2] = value >>> 8; + this[offset + 3] = value & 255; + return offset + 4; + }; + function checkIEEE754(buf, value, offset, ext, max, min) { + if (offset + ext > buf.length) throw new RangeError("Index out of range"); + if (offset < 0) throw new RangeError("Index out of range"); + } + function writeFloat(buf, value, offset, littleEndian, noAssert) { + value = +value; + offset = offset >>> 0; + if (!noAssert) { + checkIEEE754(buf, value, offset, 4, 34028234663852886e22, -34028234663852886e22); + } + ieee754.write(buf, value, offset, littleEndian, 23, 4); + return offset + 4; + } + Buffer2.prototype.writeFloatLE = function writeFloatLE(value, offset, noAssert) { + return writeFloat(this, value, offset, true, noAssert); + }; + Buffer2.prototype.writeFloatBE = function writeFloatBE(value, offset, noAssert) { + return writeFloat(this, value, offset, false, noAssert); + }; + function writeDouble(buf, value, offset, littleEndian, noAssert) { + value = +value; + offset = offset >>> 0; + if (!noAssert) { + checkIEEE754(buf, value, offset, 8, 17976931348623157e292, -17976931348623157e292); + } + ieee754.write(buf, value, offset, littleEndian, 52, 8); + return offset + 8; + } + Buffer2.prototype.writeDoubleLE = function writeDoubleLE(value, offset, noAssert) { + return writeDouble(this, value, offset, true, noAssert); + }; + Buffer2.prototype.writeDoubleBE = function writeDoubleBE(value, offset, noAssert) { + return writeDouble(this, value, offset, false, noAssert); + }; + Buffer2.prototype.copy = function copy2(target, targetStart, start, end2) { + if (!start) start = 0; + if (!end2 && end2 !== 0) end2 = this.length; + if (targetStart >= target.length) targetStart = target.length; + if (!targetStart) targetStart = 0; + if (end2 > 0 && end2 < start) end2 = start; + if (end2 === start) return 0; + if (target.length === 0 || this.length === 0) return 0; + if (targetStart < 0) { + throw new RangeError("targetStart out of bounds"); + } + if (start < 0 || start >= this.length) throw new RangeError("sourceStart out of bounds"); + if (end2 < 0) throw new RangeError("sourceEnd out of bounds"); + if (end2 > this.length) end2 = this.length; + if (target.length - targetStart < end2 - start) { + end2 = target.length - targetStart + start; + } + var len = end2 - start; + var i; + if (this === target && start < targetStart && targetStart < end2) { + for (i = len - 1; i >= 0; --i) { + target[i + targetStart] = this[i + start]; + } + } else if (len < 1e3) { + for (i = 0; i < len; ++i) { + target[i + targetStart] = this[i + start]; + } + } else { + Uint8Array.prototype.set.call( + target, + this.subarray(start, start + len), + targetStart + ); + } + return len; + }; + Buffer2.prototype.fill = function fill(val, start, end2, encoding) { + if (typeof val === "string") { + if (typeof start === "string") { + encoding = start; + start = 0; + end2 = this.length; + } else if (typeof end2 === "string") { + encoding = end2; + end2 = this.length; + } + if (val.length === 1) { + var code = val.charCodeAt(0); + if (code < 256) { + val = code; + } + } + if (encoding !== void 0 && typeof encoding !== "string") { + throw new TypeError("encoding must be a string"); + } + if (typeof encoding === "string" && !Buffer2.isEncoding(encoding)) { + throw new TypeError("Unknown encoding: " + encoding); + } + } else if (typeof val === "number") { + val = val & 255; + } + if (start < 0 || this.length < start || this.length < end2) { + throw new RangeError("Out of range index"); + } + if (end2 <= start) { + return this; + } + start = start >>> 0; + end2 = end2 === void 0 ? this.length : end2 >>> 0; + if (!val) val = 0; + var i; + if (typeof val === "number") { + for (i = start; i < end2; ++i) { + this[i] = val; + } + } else { + var bytes = Buffer2.isBuffer(val) ? val : new Buffer2(val, encoding); + var len = bytes.length; + for (i = 0; i < end2 - start; ++i) { + this[i + start] = bytes[i % len]; + } + } + return this; + }; + var INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g; + function base64clean(str) { + str = str.trim().replace(INVALID_BASE64_RE, ""); + if (str.length < 2) return ""; + while (str.length % 4 !== 0) { + str = str + "="; + } + return str; + } + function toHex(n) { + if (n < 16) return "0" + n.toString(16); + return n.toString(16); + } + function utf8ToBytes(string, units) { + units = units || Infinity; + var codePoint; + var length = string.length; + var leadSurrogate = null; + var bytes = []; + for (var i = 0; i < length; ++i) { + codePoint = string.charCodeAt(i); + if (codePoint > 55295 && codePoint < 57344) { + if (!leadSurrogate) { + if (codePoint > 56319) { + if ((units -= 3) > -1) bytes.push(239, 191, 189); + continue; + } else if (i + 1 === length) { + if ((units -= 3) > -1) bytes.push(239, 191, 189); + continue; + } + leadSurrogate = codePoint; + continue; + } + if (codePoint < 56320) { + if ((units -= 3) > -1) bytes.push(239, 191, 189); + leadSurrogate = codePoint; + continue; + } + codePoint = (leadSurrogate - 55296 << 10 | codePoint - 56320) + 65536; + } else if (leadSurrogate) { + if ((units -= 3) > -1) bytes.push(239, 191, 189); + } + leadSurrogate = null; + if (codePoint < 128) { + if ((units -= 1) < 0) break; + bytes.push(codePoint); + } else if (codePoint < 2048) { + if ((units -= 2) < 0) break; + bytes.push( + codePoint >> 6 | 192, + codePoint & 63 | 128 + ); + } else if (codePoint < 65536) { + if ((units -= 3) < 0) break; + bytes.push( + codePoint >> 12 | 224, + codePoint >> 6 & 63 | 128, + codePoint & 63 | 128 + ); + } else if (codePoint < 1114112) { + if ((units -= 4) < 0) break; + bytes.push( + codePoint >> 18 | 240, + codePoint >> 12 & 63 | 128, + codePoint >> 6 & 63 | 128, + codePoint & 63 | 128 + ); + } else { + throw new Error("Invalid code point"); + } + } + return bytes; + } + function asciiToBytes(str) { + var byteArray = []; + for (var i = 0; i < str.length; ++i) { + byteArray.push(str.charCodeAt(i) & 255); + } + return byteArray; + } + function utf16leToBytes(str, units) { + var c, hi, lo; + var byteArray = []; + for (var i = 0; i < str.length; ++i) { + if ((units -= 2) < 0) break; + c = str.charCodeAt(i); + hi = c >> 8; + lo = c % 256; + byteArray.push(lo); + byteArray.push(hi); + } + return byteArray; + } + function base64ToBytes(str) { + return base64.toByteArray(base64clean(str)); + } + function blitBuffer(src, dst, offset, length) { + for (var i = 0; i < length; ++i) { + if (i + offset >= dst.length || i >= src.length) break; + dst[i + offset] = src[i]; + } + return i; + } + function isArrayBuffer(obj) { + return obj instanceof ArrayBuffer || obj != null && obj.constructor != null && obj.constructor.name === "ArrayBuffer" && typeof obj.byteLength === "number"; + } + function isArrayBufferView(obj) { + return typeof ArrayBuffer.isView === "function" && ArrayBuffer.isView(obj); + } + function numberIsNaN(obj) { + return obj !== obj; + } + }, { "base64-js": 21, "ieee754": 32 }], 24: [function(_dereq_2, module5, exports5) { + module5.exports = { + "100": "Continue", + "101": "Switching Protocols", + "102": "Processing", + "200": "OK", + "201": "Created", + "202": "Accepted", + "203": "Non-Authoritative Information", + "204": "No Content", + "205": "Reset Content", + "206": "Partial Content", + "207": "Multi-Status", + "208": "Already Reported", + "226": "IM Used", + "300": "Multiple Choices", + "301": "Moved Permanently", + "302": "Found", + "303": "See Other", + "304": "Not Modified", + "305": "Use Proxy", + "307": "Temporary Redirect", + "308": "Permanent Redirect", + "400": "Bad Request", + "401": "Unauthorized", + "402": "Payment Required", + "403": "Forbidden", + "404": "Not Found", + "405": "Method Not Allowed", + "406": "Not Acceptable", + "407": "Proxy Authentication Required", + "408": "Request Timeout", + "409": "Conflict", + "410": "Gone", + "411": "Length Required", + "412": "Precondition Failed", + "413": "Payload Too Large", + "414": "URI Too Long", + "415": "Unsupported Media Type", + "416": "Range Not Satisfiable", + "417": "Expectation Failed", + "418": "I'm a teapot", + "421": "Misdirected Request", + "422": "Unprocessable Entity", + "423": "Locked", + "424": "Failed Dependency", + "425": "Unordered Collection", + "426": "Upgrade Required", + "428": "Precondition Required", + "429": "Too Many Requests", + "431": "Request Header Fields Too Large", + "451": "Unavailable For Legal Reasons", + "500": "Internal Server Error", + "501": "Not Implemented", + "502": "Bad Gateway", + "503": "Service Unavailable", + "504": "Gateway Timeout", + "505": "HTTP Version Not Supported", + "506": "Variant Also Negotiates", + "507": "Insufficient Storage", + "508": "Loop Detected", + "509": "Bandwidth Limit Exceeded", + "510": "Not Extended", + "511": "Network Authentication Required" + }; + }, {}], 25: [function(_dereq_2, module5, exports5) { + (function(process2, global2) { + "use strict"; + var next = global2.process && process2.nextTick || global2.setImmediate || function(f) { + setTimeout(f, 0); + }; + module5.exports = function maybe(cb, promise) { + if (cb) { + promise.then(function(result) { + next(function() { + cb(null, result); + }); + }, function(err) { + next(function() { + cb(err); + }); + }); + return void 0; + } else { + return promise; + } + }; + }).call(this, _dereq_2("_process"), typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}); + }, { "_process": 69 }], 26: [function(_dereq_2, module5, exports5) { + (function(Buffer2) { + function isArray(arg) { + if (Array.isArray) { + return Array.isArray(arg); + } + return objectToString(arg) === "[object Array]"; + } + exports5.isArray = isArray; + function isBoolean(arg) { + return typeof arg === "boolean"; + } + exports5.isBoolean = isBoolean; + function isNull(arg) { + return arg === null; + } + exports5.isNull = isNull; + function isNullOrUndefined(arg) { + return arg == null; + } + exports5.isNullOrUndefined = isNullOrUndefined; + function isNumber(arg) { + return typeof arg === "number"; + } + exports5.isNumber = isNumber; + function isString(arg) { + return typeof arg === "string"; + } + exports5.isString = isString; + function isSymbol(arg) { + return typeof arg === "symbol"; + } + exports5.isSymbol = isSymbol; + function isUndefined(arg) { + return arg === void 0; + } + exports5.isUndefined = isUndefined; + function isRegExp(re) { + return objectToString(re) === "[object RegExp]"; + } + exports5.isRegExp = isRegExp; + function isObject(arg) { + return typeof arg === "object" && arg !== null; + } + exports5.isObject = isObject; + function isDate(d) { + return objectToString(d) === "[object Date]"; + } + exports5.isDate = isDate; + function isError(e) { + return objectToString(e) === "[object Error]" || e instanceof Error; + } + exports5.isError = isError; + function isFunction(arg) { + return typeof arg === "function"; + } + exports5.isFunction = isFunction; + function isPrimitive(arg) { + return arg === null || typeof arg === "boolean" || typeof arg === "number" || typeof arg === "string" || typeof arg === "symbol" || // ES6 symbol + typeof arg === "undefined"; + } + exports5.isPrimitive = isPrimitive; + exports5.isBuffer = Buffer2.isBuffer; + function objectToString(o) { + return Object.prototype.toString.call(o); + } + }).call(this, { "isBuffer": _dereq_2("../../is-buffer/index.js") }); + }, { "../../is-buffer/index.js": 34 }], 27: [function(_dereq_2, module5, exports5) { + (function(process2) { + exports5 = module5.exports = _dereq_2("./debug"); + exports5.log = log; + exports5.formatArgs = formatArgs; + exports5.save = save; + exports5.load = load; + exports5.useColors = useColors; + exports5.storage = "undefined" != typeof chrome && "undefined" != typeof chrome.storage ? chrome.storage.local : localstorage(); + exports5.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") { + return true; + } + if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) { + return false; + } + 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+)/); + } + exports5.formatters.j = function(v) { + try { + return JSON.stringify(v); + } catch (err) { + return "[UnexpectedJSONParseError]: " + err.message; + } + }; + function formatArgs(args) { + var useColors2 = this.useColors; + args[0] = (useColors2 ? "%c" : "") + this.namespace + (useColors2 ? " %c" : " ") + args[0] + (useColors2 ? "%c " : " ") + "+" + exports5.humanize(this.diff); + if (!useColors2) return; + var c = "color: " + this.color; + args.splice(1, 0, c, "color: inherit"); + var index = 0; + var lastC = 0; + args[0].replace(/%[a-zA-Z%]/g, function(match) { + if ("%%" === match) return; + index++; + if ("%c" === match) { + lastC = index; + } + }); + args.splice(lastC, 0, c); + } + function log() { + return "object" === typeof console && console.log && Function.prototype.apply.call(console.log, console, arguments); + } + function save(namespaces) { + try { + if (null == namespaces) { + exports5.storage.removeItem("debug"); + } else { + exports5.storage.debug = namespaces; + } + } catch (e) { + } + } + function load() { + var r; + try { + r = exports5.storage.debug; + } catch (e) { + } + if (!r && typeof process2 !== "undefined" && "env" in process2) { + r = process2.env.DEBUG; + } + return r; + } + exports5.enable(load()); + function localstorage() { + try { + return window.localStorage; + } catch (e) { + } + } + }).call(this, _dereq_2("_process")); + }, { "./debug": 28, "_process": 69 }], 28: [function(_dereq_2, module5, exports5) { + exports5 = module5.exports = createDebug.debug = createDebug["default"] = createDebug; + exports5.coerce = coerce; + exports5.disable = disable; + exports5.enable = enable; + exports5.enabled = enabled; + exports5.humanize = _dereq_2("ms"); + exports5.instances = []; + exports5.names = []; + exports5.skips = []; + exports5.formatters = {}; + function selectColor(namespace) { + var hash2 = 0, i; + for (i in namespace) { + hash2 = (hash2 << 5) - hash2 + namespace.charCodeAt(i); + hash2 |= 0; + } + return exports5.colors[Math.abs(hash2) % exports5.colors.length]; + } + function createDebug(namespace) { + var prevTime; + function debug() { + if (!debug.enabled) return; + var self2 = debug; + var curr = +/* @__PURE__ */ new Date(); + var ms = curr - (prevTime || curr); + self2.diff = ms; + self2.prev = prevTime; + self2.curr = curr; + prevTime = curr; + var args = new Array(arguments.length); + for (var i = 0; i < args.length; i++) { + args[i] = arguments[i]; + } + args[0] = exports5.coerce(args[0]); + if ("string" !== typeof args[0]) { + args.unshift("%O"); + } + var index = 0; + args[0] = args[0].replace(/%([a-zA-Z%])/g, function(match, format) { + if (match === "%%") return match; + index++; + var formatter = exports5.formatters[format]; + if ("function" === typeof formatter) { + var val = args[index]; + match = formatter.call(self2, val); + args.splice(index, 1); + index--; + } + return match; + }); + exports5.formatArgs.call(self2, args); + var logFn = debug.log || exports5.log || console.log.bind(console); + logFn.apply(self2, args); + } + debug.namespace = namespace; + debug.enabled = exports5.enabled(namespace); + debug.useColors = exports5.useColors(); + debug.color = selectColor(namespace); + debug.destroy = destroy; + if ("function" === typeof exports5.init) { + exports5.init(debug); + } + exports5.instances.push(debug); + return debug; + } + function destroy() { + var index = exports5.instances.indexOf(this); + if (index !== -1) { + exports5.instances.splice(index, 1); + return true; + } else { + return false; + } + } + function enable(namespaces) { + exports5.save(namespaces); + exports5.names = []; + exports5.skips = []; + var i; + var split = (typeof namespaces === "string" ? namespaces : "").split(/[\s,]+/); + var len = split.length; + for (i = 0; i < len; i++) { + if (!split[i]) continue; + namespaces = split[i].replace(/\*/g, ".*?"); + if (namespaces[0] === "-") { + exports5.skips.push(new RegExp("^" + namespaces.substr(1) + "$")); + } else { + exports5.names.push(new RegExp("^" + namespaces + "$")); + } + } + for (i = 0; i < exports5.instances.length; i++) { + var instance = exports5.instances[i]; + instance.enabled = exports5.enabled(instance.namespace); + } + } + function disable() { + exports5.enable(""); + } + function enabled(name) { + if (name[name.length - 1] === "*") { + return true; + } + var i, len; + for (i = 0, len = exports5.skips.length; i < len; i++) { + if (exports5.skips[i].test(name)) { + return false; + } + } + for (i = 0, len = exports5.names.length; i < len; i++) { + if (exports5.names[i].test(name)) { + return true; + } + } + return false; + } + function coerce(val) { + if (val instanceof Error) return val.stack || val.message; + return val; + } + }, { "ms": 66 }], 29: [function(_dereq_2, module5, exports5) { + function EventEmitter() { + this._events = this._events || {}; + this._maxListeners = this._maxListeners || void 0; + } + module5.exports = EventEmitter; + EventEmitter.EventEmitter = EventEmitter; + EventEmitter.prototype._events = void 0; + EventEmitter.prototype._maxListeners = void 0; + EventEmitter.defaultMaxListeners = 10; + EventEmitter.prototype.setMaxListeners = function(n) { + if (!isNumber(n) || n < 0 || isNaN(n)) + throw TypeError("n must be a positive number"); + this._maxListeners = n; + return this; + }; + EventEmitter.prototype.emit = function(type) { + var er, handler, len, args, i, listeners; + if (!this._events) + this._events = {}; + if (type === "error") { + if (!this._events.error || isObject(this._events.error) && !this._events.error.length) { + er = arguments[1]; + if (er instanceof Error) { + throw er; + } else { + var err = new Error('Uncaught, unspecified "error" event. (' + er + ")"); + err.context = er; + throw err; + } + } + } + handler = this._events[type]; + if (isUndefined(handler)) + return false; + if (isFunction(handler)) { + switch (arguments.length) { + case 1: + handler.call(this); + break; + case 2: + handler.call(this, arguments[1]); + break; + case 3: + handler.call(this, arguments[1], arguments[2]); + break; + default: + args = Array.prototype.slice.call(arguments, 1); + handler.apply(this, args); + } + } else if (isObject(handler)) { + args = Array.prototype.slice.call(arguments, 1); + listeners = handler.slice(); + len = listeners.length; + for (i = 0; i < len; i++) + listeners[i].apply(this, args); + } + return true; + }; + EventEmitter.prototype.addListener = function(type, listener) { + var m; + if (!isFunction(listener)) + throw TypeError("listener must be a function"); + if (!this._events) + this._events = {}; + if (this._events.newListener) + this.emit( + "newListener", + type, + isFunction(listener.listener) ? listener.listener : listener + ); + if (!this._events[type]) + this._events[type] = listener; + else if (isObject(this._events[type])) + this._events[type].push(listener); + else + this._events[type] = [this._events[type], listener]; + if (isObject(this._events[type]) && !this._events[type].warned) { + if (!isUndefined(this._maxListeners)) { + m = this._maxListeners; + } else { + m = EventEmitter.defaultMaxListeners; + } + if (m && m > 0 && this._events[type].length > m) { + this._events[type].warned = true; + console.warn( + "(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.", + this._events[type].length + ); + if (typeof console.trace === "function") { + console.trace(); + } + } + } + return this; + }; + EventEmitter.prototype.on = EventEmitter.prototype.addListener; + EventEmitter.prototype.once = function(type, listener) { + if (!isFunction(listener)) + throw TypeError("listener must be a function"); + var fired = false; + function g() { + this.removeListener(type, g); + if (!fired) { + fired = true; + listener.apply(this, arguments); + } + } + g.listener = listener; + this.on(type, g); + return this; + }; + EventEmitter.prototype.removeListener = function(type, listener) { + var list, position, length, i; + if (!isFunction(listener)) + throw TypeError("listener must be a function"); + if (!this._events || !this._events[type]) + return this; + list = this._events[type]; + length = list.length; + position = -1; + if (list === listener || isFunction(list.listener) && list.listener === listener) { + delete this._events[type]; + if (this._events.removeListener) + this.emit("removeListener", type, listener); + } else if (isObject(list)) { + for (i = length; i-- > 0; ) { + if (list[i] === listener || list[i].listener && list[i].listener === listener) { + position = i; + break; + } + } + if (position < 0) + return this; + if (list.length === 1) { + list.length = 0; + delete this._events[type]; + } else { + list.splice(position, 1); + } + if (this._events.removeListener) + this.emit("removeListener", type, listener); + } + return this; + }; + EventEmitter.prototype.removeAllListeners = function(type) { + var key, listeners; + if (!this._events) + return this; + if (!this._events.removeListener) { + if (arguments.length === 0) + this._events = {}; + else if (this._events[type]) + delete this._events[type]; + return this; + } + if (arguments.length === 0) { + for (key in this._events) { + if (key === "removeListener") continue; + this.removeAllListeners(key); + } + this.removeAllListeners("removeListener"); + this._events = {}; + return this; + } + listeners = this._events[type]; + if (isFunction(listeners)) { + this.removeListener(type, listeners); + } else if (listeners) { + while (listeners.length) + this.removeListener(type, listeners[listeners.length - 1]); + } + delete this._events[type]; + return this; + }; + EventEmitter.prototype.listeners = function(type) { + var ret; + if (!this._events || !this._events[type]) + ret = []; + else if (isFunction(this._events[type])) + ret = [this._events[type]]; + else + ret = this._events[type].slice(); + return ret; + }; + EventEmitter.prototype.listenerCount = function(type) { + if (this._events) { + var evlistener = this._events[type]; + if (isFunction(evlistener)) + return 1; + else if (evlistener) + return evlistener.length; + } + return 0; + }; + EventEmitter.listenerCount = function(emitter, type) { + return emitter.listenerCount(type); + }; + function isFunction(arg) { + return typeof arg === "function"; + } + function isNumber(arg) { + return typeof arg === "number"; + } + function isObject(arg) { + return typeof arg === "object" && arg !== null; + } + function isUndefined(arg) { + return arg === void 0; + } + }, {}], 30: [function(_dereq_2, module5, exports5) { + function format(fmt) { + var re = /(%?)(%([jds]))/g, args = Array.prototype.slice.call(arguments, 1); + if (args.length) { + fmt = fmt.replace(re, function(match, escaped, ptn, flag) { + var arg = args.shift(); + switch (flag) { + case "s": + arg = "" + arg; + break; + case "d": + arg = Number(arg); + break; + case "j": + arg = JSON.stringify(arg); + break; + } + if (!escaped) { + return arg; + } + args.unshift(arg); + return match; + }); + } + if (args.length) { + fmt += " " + args.join(" "); + } + fmt = fmt.replace(/%{2,2}/g, "%"); + return "" + fmt; + } + module5.exports = format; + }, {}], 31: [function(_dereq_2, module5, exports5) { + var http = _dereq_2("http"); + var url = _dereq_2("url"); + var https = module5.exports; + for (var key in http) { + if (http.hasOwnProperty(key)) https[key] = http[key]; + } + https.request = function(params, cb) { + params = validateParams(params); + return http.request.call(this, params, cb); + }; + https.get = function(params, cb) { + params = validateParams(params); + return http.get.call(this, params, cb); + }; + function validateParams(params) { + if (typeof params === "string") { + params = url.parse(params); + } + if (!params.protocol) { + params.protocol = "https:"; + } + if (params.protocol !== "https:") { + throw new Error('Protocol "' + params.protocol + '" not supported. Expected "https:"'); + } + return params; + } + }, { "http": 84, "url": 90 }], 32: [function(_dereq_2, module5, exports5) { + exports5.read = function(buffer, offset, isLE, mLen, nBytes) { + var e, m; + var eLen = nBytes * 8 - mLen - 1; + var eMax = (1 << eLen) - 1; + var eBias = eMax >> 1; + var nBits = -7; + var i = isLE ? nBytes - 1 : 0; + var d = isLE ? -1 : 1; + var s = buffer[offset + i]; + i += d; + e = s & (1 << -nBits) - 1; + s >>= -nBits; + nBits += eLen; + for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) { + } + m = e & (1 << -nBits) - 1; + e >>= -nBits; + nBits += mLen; + for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) { + } + if (e === 0) { + e = 1 - eBias; + } else if (e === eMax) { + return m ? NaN : (s ? -1 : 1) * Infinity; + } else { + m = m + Math.pow(2, mLen); + e = e - eBias; + } + return (s ? -1 : 1) * m * Math.pow(2, e - mLen); + }; + exports5.write = function(buffer, value, offset, isLE, mLen, nBytes) { + var e, m, c; + var eLen = nBytes * 8 - mLen - 1; + var eMax = (1 << eLen) - 1; + var eBias = eMax >> 1; + var rt = mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0; + var i = isLE ? 0 : nBytes - 1; + var d = isLE ? 1 : -1; + var s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0; + value = Math.abs(value); + if (isNaN(value) || value === Infinity) { + m = isNaN(value) ? 1 : 0; + e = eMax; + } else { + e = Math.floor(Math.log(value) / Math.LN2); + if (value * (c = Math.pow(2, -e)) < 1) { + e--; + c *= 2; + } + if (e + eBias >= 1) { + value += rt / c; + } else { + value += rt * Math.pow(2, 1 - eBias); + } + if (value * c >= 2) { + e++; + c /= 2; + } + if (e + eBias >= eMax) { + m = 0; + e = eMax; + } else if (e + eBias >= 1) { + m = (value * c - 1) * Math.pow(2, mLen); + e = e + eBias; + } else { + m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen); + e = 0; + } + } + for (; mLen >= 8; buffer[offset + i] = m & 255, i += d, m /= 256, mLen -= 8) { + } + e = e << mLen | m; + eLen += mLen; + for (; eLen > 0; buffer[offset + i] = e & 255, i += d, e /= 256, eLen -= 8) { + } + buffer[offset + i - d] |= s * 128; + }; + }, {}], 33: [function(_dereq_2, module5, exports5) { + if (typeof Object.create === "function") { + module5.exports = function inherits(ctor, superCtor) { + ctor.super_ = superCtor; + ctor.prototype = Object.create(superCtor.prototype, { + constructor: { + value: ctor, + enumerable: false, + writable: true, + configurable: true + } + }); + }; + } else { + module5.exports = function inherits(ctor, superCtor) { + ctor.super_ = superCtor; + var TempCtor = function() { + }; + TempCtor.prototype = superCtor.prototype; + ctor.prototype = new TempCtor(); + ctor.prototype.constructor = ctor; + }; + } + }, {}], 34: [function(_dereq_2, module5, exports5) { + module5.exports = function(obj) { + return obj != null && (isBuffer(obj) || isSlowBuffer(obj) || !!obj._isBuffer); + }; + function isBuffer(obj) { + return !!obj.constructor && typeof obj.constructor.isBuffer === "function" && obj.constructor.isBuffer(obj); + } + function isSlowBuffer(obj) { + return typeof obj.readFloatLE === "function" && typeof obj.slice === "function" && isBuffer(obj.slice(0, 0)); + } + }, {}], 35: [function(_dereq_2, module5, exports5) { + var toString = {}.toString; + module5.exports = Array.isArray || function(arr) { + return toString.call(arr) == "[object Array]"; + }; + }, {}], 36: [function(_dereq_2, module5, exports5) { + "use strict"; + var yaml = _dereq_2("./lib/js-yaml.js"); + module5.exports = yaml; + }, { "./lib/js-yaml.js": 37 }], 37: [function(_dereq_2, module5, exports5) { + "use strict"; + var loader = _dereq_2("./js-yaml/loader"); + var dumper = _dereq_2("./js-yaml/dumper"); + function deprecated(name) { + return function() { + throw new Error("Function " + name + " is deprecated and cannot be used."); + }; + } + module5.exports.Type = _dereq_2("./js-yaml/type"); + module5.exports.Schema = _dereq_2("./js-yaml/schema"); + module5.exports.FAILSAFE_SCHEMA = _dereq_2("./js-yaml/schema/failsafe"); + module5.exports.JSON_SCHEMA = _dereq_2("./js-yaml/schema/json"); + module5.exports.CORE_SCHEMA = _dereq_2("./js-yaml/schema/core"); + module5.exports.DEFAULT_SAFE_SCHEMA = _dereq_2("./js-yaml/schema/default_safe"); + module5.exports.DEFAULT_FULL_SCHEMA = _dereq_2("./js-yaml/schema/default_full"); + module5.exports.load = loader.load; + module5.exports.loadAll = loader.loadAll; + module5.exports.safeLoad = loader.safeLoad; + module5.exports.safeLoadAll = loader.safeLoadAll; + module5.exports.dump = dumper.dump; + module5.exports.safeDump = dumper.safeDump; + module5.exports.YAMLException = _dereq_2("./js-yaml/exception"); + module5.exports.MINIMAL_SCHEMA = _dereq_2("./js-yaml/schema/failsafe"); + module5.exports.SAFE_SCHEMA = _dereq_2("./js-yaml/schema/default_safe"); + module5.exports.DEFAULT_SCHEMA = _dereq_2("./js-yaml/schema/default_full"); + module5.exports.scan = deprecated("scan"); + module5.exports.parse = deprecated("parse"); + module5.exports.compose = deprecated("compose"); + module5.exports.addConstructor = deprecated("addConstructor"); + }, { "./js-yaml/dumper": 39, "./js-yaml/exception": 40, "./js-yaml/loader": 41, "./js-yaml/schema": 43, "./js-yaml/schema/core": 44, "./js-yaml/schema/default_full": 45, "./js-yaml/schema/default_safe": 46, "./js-yaml/schema/failsafe": 47, "./js-yaml/schema/json": 48, "./js-yaml/type": 49 }], 38: [function(_dereq_2, module5, exports5) { + "use strict"; + function isNothing(subject) { + return typeof subject === "undefined" || subject === null; + } + function isObject(subject) { + return typeof subject === "object" && subject !== null; + } + function toArray2(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 = "", cycle2; + for (cycle2 = 0; cycle2 < count; cycle2 += 1) { + result += string; + } + return result; + } + function isNegativeZero(number2) { + return number2 === 0 && Number.NEGATIVE_INFINITY === 1 / number2; + } + module5.exports.isNothing = isNothing; + module5.exports.isObject = isObject; + module5.exports.toArray = toArray2; + module5.exports.repeat = repeat; + module5.exports.isNegativeZero = isNegativeZero; + module5.exports.extend = extend; + }, {}], 39: [function(_dereq_2, module5, exports5) { + "use strict"; + var common = _dereq_2("./common"); + var YAMLException = _dereq_2("./exception"); + var DEFAULT_FULL_SCHEMA = _dereq_2("./schema/default_full"); + var DEFAULT_SAFE_SCHEMA = _dereq_2("./schema/default_safe"); + var _toString = Object.prototype.toString; + var _hasOwnProperty = Object.prototype.hasOwnProperty; + var CHAR_TAB = 9; + var CHAR_LINE_FEED = 10; + var CHAR_SPACE = 32; + var CHAR_EXCLAMATION = 33; + var CHAR_DOUBLE_QUOTE = 34; + var CHAR_SHARP = 35; + var CHAR_PERCENT = 37; + var CHAR_AMPERSAND = 38; + var CHAR_SINGLE_QUOTE = 39; + var CHAR_ASTERISK = 42; + var CHAR_COMMA = 44; + var CHAR_MINUS = 45; + var CHAR_COLON = 58; + var CHAR_GREATER_THAN = 62; + var CHAR_QUESTION = 63; + var CHAR_COMMERCIAL_AT = 64; + var CHAR_LEFT_SQUARE_BRACKET = 91; + var CHAR_RIGHT_SQUARE_BRACKET = 93; + var CHAR_GRAVE_ACCENT = 96; + var CHAR_LEFT_CURLY_BRACKET = 123; + var CHAR_VERTICAL_LINE = 124; + var CHAR_RIGHT_CURLY_BRACKET = 125; + var ESCAPE_SEQUENCES = {}; + ESCAPE_SEQUENCES[0] = "\\0"; + ESCAPE_SEQUENCES[7] = "\\a"; + ESCAPE_SEQUENCES[8] = "\\b"; + ESCAPE_SEQUENCES[9] = "\\t"; + ESCAPE_SEQUENCES[10] = "\\n"; + ESCAPE_SEQUENCES[11] = "\\v"; + ESCAPE_SEQUENCES[12] = "\\f"; + ESCAPE_SEQUENCES[13] = "\\r"; + ESCAPE_SEQUENCES[27] = "\\e"; + ESCAPE_SEQUENCES[34] = '\\"'; + ESCAPE_SEQUENCES[92] = "\\\\"; + ESCAPE_SEQUENCES[133] = "\\N"; + ESCAPE_SEQUENCES[160] = "\\_"; + ESCAPE_SEQUENCES[8232] = "\\L"; + ESCAPE_SEQUENCES[8233] = "\\P"; + var DEPRECATED_BOOLEANS_SYNTAX = [ + "y", + "Y", + "yes", + "Yes", + "YES", + "on", + "On", + "ON", + "n", + "N", + "no", + "No", + "NO", + "off", + "Off", + "OFF" + ]; + function compileStyleMap(schema2, 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 = schema2.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 <= 255) { + handle = "x"; + length = 2; + } else if (character <= 65535) { + handle = "u"; + length = 4; + } else if (character <= 4294967295) { + handle = "U"; + length = 8; + } else { + throw new YAMLException("code point within a string may not be greater than 0xFFFFFFFF"); + } + return "\\" + handle + common.repeat("0", length - string.length) + string; + } + function State(options) { + this.schema = options["schema"] || DEFAULT_FULL_SCHEMA; + this.indent = Math.max(1, options["indent"] || 2); + this.skipInvalid = options["skipInvalid"] || false; + this.flowLevel = common.isNothing(options["flowLevel"]) ? -1 : options["flowLevel"]; + this.styleMap = compileStyleMap(this.schema, options["styles"] || null); + this.sortKeys = options["sortKeys"] || false; + this.lineWidth = options["lineWidth"] || 80; + this.noRefs = options["noRefs"] || false; + this.noCompatMode = options["noCompatMode"] || false; + this.condenseFlow = options["condenseFlow"] || false; + this.implicitTypes = this.schema.compiledImplicit; + this.explicitTypes = this.schema.compiledExplicit; + this.tag = null; + this.result = ""; + this.duplicates = []; + this.usedDuplicates = null; + } + function indentString(string, spaces) { + var ind = common.repeat(" ", spaces), position = 0, next = -1, result = "", line, length = string.length; + while (position < length) { + next = string.indexOf("\n", position); + if (next === -1) { + line = string.slice(position); + position = length; + } else { + line = string.slice(position, next + 1); + position = next + 1; + } + if (line.length && line !== "\n") result += ind; + result += line; + } + return result; + } + function generateNextLine(state, level) { + return "\n" + common.repeat(" ", state.indent * level); + } + function testImplicitResolving(state, str) { + var index, length, type; + for (index = 0, length = state.implicitTypes.length; index < length; index += 1) { + type = state.implicitTypes[index]; + if (type.resolve(str)) { + return true; + } + } + return false; + } + function isWhitespace(c) { + return c === CHAR_SPACE || c === CHAR_TAB; + } + function isPrintable(c) { + return 32 <= c && c <= 126 || 161 <= c && c <= 55295 && c !== 8232 && c !== 8233 || 57344 <= c && c <= 65533 && c !== 65279 || 65536 <= c && c <= 1114111; + } + function isPlainSafe(c) { + return isPrintable(c) && c !== 65279 && c !== CHAR_COMMA && c !== CHAR_LEFT_SQUARE_BRACKET && c !== CHAR_RIGHT_SQUARE_BRACKET && c !== CHAR_LEFT_CURLY_BRACKET && c !== CHAR_RIGHT_CURLY_BRACKET && c !== CHAR_COLON && c !== CHAR_SHARP; + } + function isPlainSafeFirst(c) { + return isPrintable(c) && c !== 65279 && !isWhitespace(c) && c !== CHAR_MINUS && c !== CHAR_QUESTION && c !== CHAR_COLON && c !== CHAR_COMMA && c !== CHAR_LEFT_SQUARE_BRACKET && c !== CHAR_RIGHT_SQUARE_BRACKET && c !== CHAR_LEFT_CURLY_BRACKET && c !== CHAR_RIGHT_CURLY_BRACKET && c !== CHAR_SHARP && c !== CHAR_AMPERSAND && c !== CHAR_ASTERISK && c !== CHAR_EXCLAMATION && c !== CHAR_VERTICAL_LINE && c !== CHAR_GREATER_THAN && c !== CHAR_SINGLE_QUOTE && c !== CHAR_DOUBLE_QUOTE && c !== CHAR_PERCENT && c !== CHAR_COMMERCIAL_AT && c !== CHAR_GRAVE_ACCENT; + } + var STYLE_PLAIN = 1, STYLE_SINGLE = 2, STYLE_LITERAL = 3, STYLE_FOLDED = 4, STYLE_DOUBLE = 5; + function chooseScalarStyle(string, singleLineOnly, indentPerLevel, lineWidth, testAmbiguousType) { + var i; + var char; + var hasLineBreak = false; + var hasFoldableLine = false; + var shouldTrackWidth = lineWidth !== -1; + var previousLineBreak = -1; + var plain = isPlainSafeFirst(string.charCodeAt(0)) && !isWhitespace(string.charCodeAt(string.length - 1)); + if (singleLineOnly) { + for (i = 0; i < string.length; i++) { + char = string.charCodeAt(i); + if (!isPrintable(char)) { + return STYLE_DOUBLE; + } + plain = plain && isPlainSafe(char); + } + } else { + for (i = 0; i < string.length; i++) { + char = string.charCodeAt(i); + if (char === CHAR_LINE_FEED) { + hasLineBreak = true; + 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); + } + hasFoldableLine = hasFoldableLine || shouldTrackWidth && (i - previousLineBreak - 1 > lineWidth && string[previousLineBreak + 1] !== " "); + } + if (!hasLineBreak && !hasFoldableLine) { + return plain && !testAmbiguousType(string) ? STYLE_PLAIN : STYLE_SINGLE; + } + if (string[0] === " " && indentPerLevel > 9) { + return STYLE_DOUBLE; + } + return hasFoldableLine ? STYLE_FOLDED : STYLE_LITERAL; + } + function writeScalar(state, string, level, iskey) { + state.dump = function() { + if (string.length === 0) { + return "''"; + } + if (!state.noCompatMode && DEPRECATED_BOOLEANS_SYNTAX.indexOf(string) !== -1) { + return "'" + string + "'"; + } + var indent = state.indent * Math.max(1, level); + var lineWidth = state.lineWidth === -1 ? -1 : Math.max(Math.min(state.lineWidth, 40), state.lineWidth - indent); + var singleLineOnly = iskey || state.flowLevel > -1 && level >= state.flowLevel; + function testAmbiguity(string2) { + return testImplicitResolving(state, string2); + } + switch (chooseScalarStyle(string, singleLineOnly, state.indent, lineWidth, testAmbiguity)) { + case STYLE_PLAIN: + return string; + case STYLE_SINGLE: + return "'" + string.replace(/'/g, "''") + "'"; + case STYLE_LITERAL: + return "|" + blockHeader(string, state.indent) + dropEndingNewline(indentString(string, indent)); + case STYLE_FOLDED: + return ">" + blockHeader(string, state.indent) + dropEndingNewline(indentString(foldString(string, lineWidth), indent)); + case STYLE_DOUBLE: + return '"' + escapeString(string, lineWidth) + '"'; + default: + throw new YAMLException("impossible error: invalid scalar style"); + } + }(); + } + function blockHeader(string, indentPerLevel) { + var indentIndicator = string[0] === " " ? 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 match; + while (match = lineRe.exec(string)) { + var prefix = match[1], line = match[2]; + moreIndented = line[0] === " "; + result += prefix + (!prevMoreIndented && !moreIndented && line !== "" ? "\n" : "") + foldLine(line, width); + prevMoreIndented = moreIndented; + } + return result; + } + function foldLine(line, width) { + if (line === "" || line[0] === " ") return line; + var breakRe = / [^ ]/g; + var match; + var start = 0, end2, curr = 0, next = 0; + var result = ""; + while (match = breakRe.exec(line)) { + next = match.index; + if (next - start > width) { + end2 = curr > start ? curr : next; + result += "\n" + line.slice(start, end2); + start = end2 + 1; + } + curr = next; + } + result += "\n"; + if (line.length - start > width && curr > start) { + result += line.slice(start, curr) + "\n" + line.slice(curr + 1); + } else { + result += line.slice(start); + } + return result.slice(1); + } + function escapeString(string) { + var result = ""; + var char, nextChar; + var escapeSeq; + for (var i = 0; i < string.length; i++) { + char = string.charCodeAt(i); + if (char >= 55296 && char <= 56319) { + nextChar = string.charCodeAt(i + 1); + if (nextChar >= 56320 && nextChar <= 57343) { + result += encodeHex((char - 55296) * 1024 + nextChar - 56320 + 65536); + i++; + continue; + } + } + escapeSeq = ESCAPE_SEQUENCES[char]; + result += !escapeSeq && isPrintable(char) ? string[i] : escapeSeq || encodeHex(char); + } + return result; + } + function writeFlowSequence(state, level, object) { + var _result = "", _tag = state.tag, index, length; + for (index = 0, length = object.length; index < length; index += 1) { + if (writeNode(state, level, object[index], false, false)) { + if (index !== 0) _result += "," + (!state.condenseFlow ? " " : ""); + _result += state.dump; + } + } + state.tag = _tag; + state.dump = "[" + _result + "]"; + } + function writeBlockSequence(state, level, object, compact) { + var _result = "", _tag = state.tag, index, length; + for (index = 0, length = object.length; index < length; index += 1) { + if (writeNode(state, level + 1, object[index], true, true)) { + if (!compact || index !== 0) { + _result += generateNextLine(state, level); + } + if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { + _result += "-"; + } else { + _result += "- "; + } + _result += state.dump; + } + } + state.tag = _tag; + state.dump = _result || "[]"; + } + function writeFlowMapping(state, level, object) { + var _result = "", _tag = state.tag, objectKeyList = Object.keys(object), index, length, objectKey, objectValue, pairBuffer; + for (index = 0, length = objectKeyList.length; index < length; index += 1) { + pairBuffer = state.condenseFlow ? '"' : ""; + if (index !== 0) pairBuffer += ", "; + objectKey = objectKeyList[index]; + objectValue = object[objectKey]; + if (!writeNode(state, level, objectKey, false, false)) { + continue; + } + if (state.dump.length > 1024) pairBuffer += "? "; + pairBuffer += state.dump + (state.condenseFlow ? '"' : "") + ":" + (state.condenseFlow ? "" : " "); + if (!writeNode(state, level, objectValue, false, false)) { + continue; + } + pairBuffer += state.dump; + _result += pairBuffer; + } + state.tag = _tag; + state.dump = "{" + _result + "}"; + } + function writeBlockMapping(state, level, object, compact) { + var _result = "", _tag = state.tag, objectKeyList = Object.keys(object), index, length, objectKey, objectValue, explicitPair, pairBuffer; + if (state.sortKeys === true) { + objectKeyList.sort(); + } else if (typeof state.sortKeys === "function") { + objectKeyList.sort(state.sortKeys); + } else if (state.sortKeys) { + throw new YAMLException("sortKeys must be a boolean or a function"); + } + for (index = 0, length = objectKeyList.length; index < length; index += 1) { + pairBuffer = ""; + if (!compact || index !== 0) { + pairBuffer += generateNextLine(state, level); + } + objectKey = objectKeyList[index]; + objectValue = object[objectKey]; + if (!writeNode(state, level + 1, objectKey, true, true, true)) { + continue; + } + explicitPair = state.tag !== null && state.tag !== "?" || state.dump && state.dump.length > 1024; + if (explicitPair) { + if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { + pairBuffer += "?"; + } else { + pairBuffer += "? "; + } + } + pairBuffer += state.dump; + if (explicitPair) { + pairBuffer += generateNextLine(state, level); + } + if (!writeNode(state, level + 1, objectValue, true, explicitPair)) { + continue; + } + if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { + pairBuffer += ":"; + } else { + pairBuffer += ": "; + } + pairBuffer += state.dump; + _result += pairBuffer; + } + state.tag = _tag; + state.dump = _result || "{}"; + } + function detectType(state, object, explicit) { + var _result, typeList, index, length, type, style; + typeList = explicit ? state.explicitTypes : state.implicitTypes; + for (index = 0, length = typeList.length; index < length; index += 1) { + type = typeList[index]; + if ((type.instanceOf || type.predicate) && (!type.instanceOf || typeof object === "object" && object instanceof type.instanceOf) && (!type.predicate || type.predicate(object))) { + state.tag = explicit ? type.tag : "?"; + if (type.represent) { + style = state.styleMap[type.tag] || type.defaultStyle; + if (_toString.call(type.represent) === "[object Function]") { + _result = type.represent(object, style); + } else if (_hasOwnProperty.call(type.represent, style)) { + _result = type.represent[style](object, style); + } else { + throw new YAMLException("!<" + type.tag + '> tag resolver accepts not "' + style + '" style'); + } + state.dump = _result; + } + return true; + } + } + return false; + } + function writeNode(state, level, object, block, compact, iskey) { + state.tag = null; + state.dump = object; + if (!detectType(state, object, false)) { + detectType(state, object, true); + } + var type = _toString.call(state.dump); + if (block) { + block = state.flowLevel < 0 || state.flowLevel > level; + } + var objectOrArray = type === "[object Object]" || type === "[object Array]", duplicateIndex, duplicate; + if (objectOrArray) { + duplicateIndex = state.duplicates.indexOf(object); + duplicate = duplicateIndex !== -1; + } + if (state.tag !== null && state.tag !== "?" || duplicate || state.indent !== 2 && level > 0) { + compact = false; + } + if (duplicate && state.usedDuplicates[duplicateIndex]) { + state.dump = "*ref_" + duplicateIndex; + } else { + if (objectOrArray && duplicate && !state.usedDuplicates[duplicateIndex]) { + state.usedDuplicates[duplicateIndex] = true; + } + if (type === "[object Object]") { + if (block && Object.keys(state.dump).length !== 0) { + writeBlockMapping(state, level, state.dump, compact); + if (duplicate) { + state.dump = "&ref_" + duplicateIndex + state.dump; + } + } else { + writeFlowMapping(state, level, state.dump); + if (duplicate) { + state.dump = "&ref_" + duplicateIndex + " " + state.dump; + } + } + } else if (type === "[object Array]") { + if (block && state.dump.length !== 0) { + 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); + } + } else { + if (state.skipInvalid) return false; + throw new YAMLException("unacceptable kind of an object to dump " + type); + } + if (state.tag !== null && state.tag !== "?") { + state.dump = "!<" + state.tag + "> " + state.dump; + } + } + return true; + } + function getDuplicateReferences(object, state) { + var objects = [], duplicatesIndexes = [], index, length; + inspectNode(object, objects, duplicatesIndexes); + for (index = 0, length = duplicatesIndexes.length; index < length; index += 1) { + state.duplicates.push(objects[duplicatesIndexes[index]]); + } + state.usedDuplicates = new Array(length); + } + function inspectNode(object, objects, duplicatesIndexes) { + var objectKeyList, index, length; + if (object !== null && typeof object === "object") { + index = objects.indexOf(object); + if (index !== -1) { + if (duplicatesIndexes.indexOf(index) === -1) { + duplicatesIndexes.push(index); + } + } else { + objects.push(object); + if (Array.isArray(object)) { + for (index = 0, length = object.length; index < length; index += 1) { + inspectNode(object[index], objects, duplicatesIndexes); + } + } else { + objectKeyList = Object.keys(object); + for (index = 0, length = objectKeyList.length; index < length; index += 1) { + inspectNode(object[objectKeyList[index]], objects, duplicatesIndexes); + } + } + } + } + } + function dump(input, options) { + options = options || {}; + var state = new State(options); + if (!state.noRefs) getDuplicateReferences(input, state); + if (writeNode(state, 0, input, true, true)) return state.dump + "\n"; + return ""; + } + function safeDump(input, options) { + return dump(input, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options)); + } + module5.exports.dump = dump; + module5.exports.safeDump = safeDump; + }, { "./common": 38, "./exception": 40, "./schema/default_full": 45, "./schema/default_safe": 46 }], 40: [function(_dereq_2, module5, exports5) { + "use strict"; + function YAMLException(reason, mark) { + Error.call(this); + this.name = "YAMLException"; + this.reason = reason; + this.mark = mark; + this.message = (this.reason || "(unknown reason)") + (this.mark ? " " + this.mark.toString() : ""); + if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); + } else { + this.stack = new Error().stack || ""; + } + } + YAMLException.prototype = Object.create(Error.prototype); + YAMLException.prototype.constructor = YAMLException; + YAMLException.prototype.toString = function toString(compact) { + var result = this.name + ": "; + result += this.reason || "(unknown reason)"; + if (!compact && this.mark) { + result += " " + this.mark.toString(); + } + return result; + }; + module5.exports = YAMLException; + }, {}], 41: [function(_dereq_2, module5, exports5) { + "use strict"; + var common = _dereq_2("./common"); + var YAMLException = _dereq_2("./exception"); + var Mark = _dereq_2("./mark"); + var DEFAULT_SAFE_SCHEMA = _dereq_2("./schema/default_safe"); + var DEFAULT_FULL_SCHEMA = _dereq_2("./schema/default_full"); + var _hasOwnProperty = Object.prototype.hasOwnProperty; + var CONTEXT_FLOW_IN = 1; + var CONTEXT_FLOW_OUT = 2; + var CONTEXT_BLOCK_IN = 3; + var CONTEXT_BLOCK_OUT = 4; + var CHOMPING_CLIP = 1; + var CHOMPING_STRIP = 2; + var CHOMPING_KEEP = 3; + var PATTERN_NON_PRINTABLE = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/; + var PATTERN_NON_ASCII_LINE_BREAKS = /[\x85\u2028\u2029]/; + var PATTERN_FLOW_INDICATORS = /[,\[\]\{\}]/; + var PATTERN_TAG_HANDLE = /^(?:!|!!|![a-z\-]+!)$/i; + var PATTERN_TAG_URI = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i; + function is_EOL(c) { + return c === 10 || c === 13; + } + function is_WHITE_SPACE(c) { + return c === 9 || c === 32; + } + function is_WS_OR_EOL(c) { + return c === 9 || c === 32 || c === 10 || c === 13; + } + function is_FLOW_INDICATOR(c) { + return c === 44 || c === 91 || c === 93 || c === 123 || c === 125; + } + function fromHexCode(c) { + var lc; + if (48 <= c && c <= 57) { + return c - 48; + } + lc = c | 32; + if (97 <= lc && lc <= 102) { + return lc - 97 + 10; + } + return -1; + } + function escapedHexLen(c) { + if (c === 120) { + return 2; + } + if (c === 117) { + return 4; + } + if (c === 85) { + return 8; + } + return 0; + } + function fromDecimalCode(c) { + if (48 <= c && c <= 57) { + return c - 48; + } + return -1; + } + function simpleEscapeSequence(c) { + return c === 48 ? "\0" : c === 97 ? "\x07" : c === 98 ? "\b" : c === 116 ? " " : c === 9 ? " " : c === 110 ? "\n" : c === 118 ? "\v" : c === 102 ? "\f" : c === 114 ? "\r" : c === 101 ? "\x1B" : c === 32 ? " " : c === 34 ? '"' : c === 47 ? "/" : c === 92 ? "\\" : c === 78 ? "\x85" : c === 95 ? "\xA0" : c === 76 ? "\u2028" : c === 80 ? "\u2029" : ""; + } + function charFromCodepoint(c) { + if (c <= 65535) { + return String.fromCharCode(c); + } + return String.fromCharCode( + (c - 65536 >> 10) + 55296, + (c - 65536 & 1023) + 56320 + ); + } + var simpleEscapeCheck = new Array(256); + var simpleEscapeMap = new Array(256); + for (var i = 0; i < 256; i++) { + simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0; + simpleEscapeMap[i] = simpleEscapeSequence(i); + } + function State(input, options) { + this.input = input; + this.filename = options["filename"] || null; + this.schema = options["schema"] || DEFAULT_FULL_SCHEMA; + this.onWarning = options["onWarning"] || null; + this.legacy = options["legacy"] || false; + this.json = options["json"] || false; + this.listener = options["listener"] || null; + this.implicitTypes = this.schema.compiledImplicit; + this.typeMap = this.schema.compiledTypeMap; + this.length = input.length; + this.position = 0; + this.line = 0; + this.lineStart = 0; + this.lineIndent = 0; + this.documents = []; + } + function generateError(state, message) { + return new YAMLException( + message, + new Mark(state.filename, state.input, state.position, state.line, state.position - state.lineStart) + ); + } + function throwError(state, message) { + throw generateError(state, message); + } + function throwWarning(state, message) { + if (state.onWarning) { + state.onWarning.call(null, generateError(state, message)); + } + } + var directiveHandlers = { + YAML: function handleYamlDirective(state, name, args) { + var match, major, minor; + if (state.version !== null) { + throwError(state, "duplication of %YAML directive"); + } + if (args.length !== 1) { + throwError(state, "YAML directive accepts exactly one argument"); + } + match = /^([0-9]+)\.([0-9]+)$/.exec(args[0]); + if (match === null) { + throwError(state, "ill-formed argument of the YAML directive"); + } + major = parseInt(match[1], 10); + minor = parseInt(match[2], 10); + if (major !== 1) { + throwError(state, "unacceptable YAML version of the document"); + } + state.version = args[0]; + state.checkLineBreaks = minor < 2; + if (minor !== 1 && minor !== 2) { + throwWarning(state, "unsupported YAML version of the document"); + } + }, + TAG: function handleTagDirective(state, name, args) { + var handle, prefix; + if (args.length !== 2) { + throwError(state, "TAG directive accepts exactly two arguments"); + } + handle = args[0]; + prefix = args[1]; + if (!PATTERN_TAG_HANDLE.test(handle)) { + throwError(state, "ill-formed tag handle (first argument) of the TAG directive"); + } + if (_hasOwnProperty.call(state.tagMap, handle)) { + throwError(state, 'there is a previously declared suffix for "' + handle + '" tag handle'); + } + if (!PATTERN_TAG_URI.test(prefix)) { + throwError(state, "ill-formed tag prefix (second argument) of the TAG directive"); + } + state.tagMap[handle] = prefix; + } + }; + function captureSegment(state, start, end2, checkJson) { + var _position, _length, _character, _result; + if (start < end2) { + _result = state.input.slice(start, end2); + if (checkJson) { + for (_position = 0, _length = _result.length; _position < _length; _position += 1) { + _character = _result.charCodeAt(_position); + if (!(_character === 9 || 32 <= _character && _character <= 1114111)) { + throwError(state, "expected valid JSON character"); + } + } + } else if (PATTERN_NON_PRINTABLE.test(_result)) { + throwError(state, "the stream contains non-printable characters"); + } + state.result += _result; + } + } + function mergeMappings(state, destination, source, overridableKeys) { + var sourceKeys, key, index, quantity; + if (!common.isObject(source)) { + throwError(state, "cannot merge mappings; the provided source object is unacceptable"); + } + sourceKeys = Object.keys(source); + for (index = 0, quantity = sourceKeys.length; index < quantity; index += 1) { + key = sourceKeys[index]; + if (!_hasOwnProperty.call(destination, key)) { + destination[key] = source[key]; + overridableKeys[key] = true; + } + } + } + function storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, startLine, startPos) { + var index, quantity; + keyNode = String(keyNode); + if (_result === null) { + _result = {}; + } + if (keyTag === "tag:yaml.org,2002:merge") { + if (Array.isArray(valueNode)) { + for (index = 0, quantity = valueNode.length; index < quantity; index += 1) { + mergeMappings(state, _result, valueNode[index], overridableKeys); + } + } else { + mergeMappings(state, _result, valueNode, overridableKeys); + } + } else { + if (!state.json && !_hasOwnProperty.call(overridableKeys, keyNode) && _hasOwnProperty.call(_result, keyNode)) { + state.line = startLine || state.line; + state.position = startPos || state.position; + throwError(state, "duplicated mapping key"); + } + _result[keyNode] = valueNode; + delete overridableKeys[keyNode]; + } + return _result; + } + 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++; + } + } else { + throwError(state, "a line break is expected"); + } + state.line += 1; + state.lineStart = state.position; + } + function skipSeparationSpace(state, allowComments, checkIndent) { + var lineBreaks = 0, ch = state.input.charCodeAt(state.position); + while (ch !== 0) { + while (is_WHITE_SPACE(ch)) { + ch = state.input.charCodeAt(++state.position); + } + if (allowComments && ch === 35) { + do { + ch = state.input.charCodeAt(++state.position); + } while (ch !== 10 && ch !== 13 && ch !== 0); + } + if (is_EOL(ch)) { + readLineBreak(state); + ch = state.input.charCodeAt(state.position); + lineBreaks++; + state.lineIndent = 0; + while (ch === 32) { + state.lineIndent++; + ch = state.input.charCodeAt(++state.position); + } + } else { + break; + } + } + if (checkIndent !== -1 && lineBreaks !== 0 && state.lineIndent < checkIndent) { + throwWarning(state, "deficient indentation"); + } + return lineBreaks; + } + function testDocumentSeparator(state) { + var _position = state.position, ch; + ch = state.input.charCodeAt(_position); + if ((ch === 45 || ch === 46) && ch === state.input.charCodeAt(_position + 1) && ch === state.input.charCodeAt(_position + 2)) { + _position += 3; + ch = state.input.charCodeAt(_position); + if (ch === 0 || is_WS_OR_EOL(ch)) { + return true; + } + } + return false; + } + function writeFoldedLines(state, count) { + if (count === 1) { + state.result += " "; + } else if (count > 1) { + state.result += common.repeat("\n", count - 1); + } + } + function readPlainScalar(state, nodeIndent, withinFlowCollection) { + var preceding, following, captureStart, captureEnd, hasPendingContent, _line, _lineStart, _lineIndent, _kind = state.kind, _result = state.result, ch; + ch = state.input.charCodeAt(state.position); + if (is_WS_OR_EOL(ch) || is_FLOW_INDICATOR(ch) || ch === 35 || ch === 38 || ch === 42 || ch === 33 || ch === 124 || ch === 62 || ch === 39 || ch === 34 || ch === 37 || ch === 64 || ch === 96) { + return false; + } + if (ch === 63 || ch === 45) { + following = state.input.charCodeAt(state.position + 1); + if (is_WS_OR_EOL(following) || withinFlowCollection && is_FLOW_INDICATOR(following)) { + return false; + } + } + state.kind = "scalar"; + state.result = ""; + captureStart = captureEnd = state.position; + hasPendingContent = false; + while (ch !== 0) { + if (ch === 58) { + following = state.input.charCodeAt(state.position + 1); + if (is_WS_OR_EOL(following) || withinFlowCollection && is_FLOW_INDICATOR(following)) { + break; + } + } else if (ch === 35) { + preceding = state.input.charCodeAt(state.position - 1); + if (is_WS_OR_EOL(preceding)) { + break; + } + } else if (state.position === state.lineStart && testDocumentSeparator(state) || withinFlowCollection && is_FLOW_INDICATOR(ch)) { + break; + } else if (is_EOL(ch)) { + _line = state.line; + _lineStart = state.lineStart; + _lineIndent = state.lineIndent; + skipSeparationSpace(state, false, -1); + if (state.lineIndent >= nodeIndent) { + hasPendingContent = true; + ch = state.input.charCodeAt(state.position); + continue; + } else { + state.position = captureEnd; + state.line = _line; + state.lineStart = _lineStart; + state.lineIndent = _lineIndent; + break; + } + } + if (hasPendingContent) { + captureSegment(state, captureStart, captureEnd, false); + writeFoldedLines(state, state.line - _line); + captureStart = captureEnd = state.position; + hasPendingContent = false; + } + if (!is_WHITE_SPACE(ch)) { + captureEnd = state.position + 1; + } + ch = state.input.charCodeAt(++state.position); + } + captureSegment(state, captureStart, captureEnd, false); + if (state.result) { + return true; + } + state.kind = _kind; + state.result = _result; + return false; + } + function readSingleQuotedScalar(state, nodeIndent) { + var ch, captureStart, captureEnd; + ch = state.input.charCodeAt(state.position); + if (ch !== 39) { + return false; + } + state.kind = "scalar"; + state.result = ""; + state.position++; + captureStart = captureEnd = state.position; + while ((ch = state.input.charCodeAt(state.position)) !== 0) { + if (ch === 39) { + captureSegment(state, captureStart, state.position, true); + ch = state.input.charCodeAt(++state.position); + if (ch === 39) { + captureStart = state.position; + state.position++; + captureEnd = state.position; + } else { + return true; + } + } else if (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 !== 34) { + return false; + } + state.kind = "scalar"; + state.result = ""; + state.position++; + captureStart = captureEnd = state.position; + while ((ch = state.input.charCodeAt(state.position)) !== 0) { + if (ch === 34) { + captureSegment(state, captureStart, state.position, true); + state.position++; + return true; + } else if (ch === 92) { + captureSegment(state, captureStart, state.position, true); + ch = state.input.charCodeAt(++state.position); + if (is_EOL(ch)) { + skipSeparationSpace(state, false, nodeIndent); + } else if (ch < 256 && simpleEscapeCheck[ch]) { + state.result += simpleEscapeMap[ch]; + state.position++; + } else if ((tmp = escapedHexLen(ch)) > 0) { + hexLength = tmp; + hexResult = 0; + for (; hexLength > 0; hexLength--) { + ch = state.input.charCodeAt(++state.position); + if ((tmp = fromHexCode(ch)) >= 0) { + hexResult = (hexResult << 4) + tmp; + } else { + throwError(state, "expected hexadecimal character"); + } + } + state.result += charFromCodepoint(hexResult); + state.position++; + } else { + throwError(state, "unknown escape sequence"); + } + captureStart = captureEnd = state.position; + } else if (is_EOL(ch)) { + captureSegment(state, captureStart, captureEnd, true); + writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent)); + captureStart = captureEnd = state.position; + } else if (state.position === state.lineStart && testDocumentSeparator(state)) { + throwError(state, "unexpected end of the document within a double quoted scalar"); + } else { + state.position++; + captureEnd = state.position; + } + } + throwError(state, "unexpected end of the stream within a double quoted scalar"); + } + function readFlowCollection(state, nodeIndent) { + var readNext = true, _line, _tag = state.tag, _result, _anchor = state.anchor, following, terminator, isPair, isExplicitPair, isMapping, overridableKeys = {}, keyNode, keyTag, valueNode, ch; + ch = state.input.charCodeAt(state.position); + if (ch === 91) { + terminator = 93; + isMapping = false; + _result = []; + } else if (ch === 123) { + terminator = 125; + isMapping = true; + _result = {}; + } else { + return false; + } + if (state.anchor !== null) { + state.anchorMap[state.anchor] = _result; + } + ch = state.input.charCodeAt(++state.position); + while (ch !== 0) { + skipSeparationSpace(state, true, nodeIndent); + ch = state.input.charCodeAt(state.position); + if (ch === terminator) { + state.position++; + state.tag = _tag; + state.anchor = _anchor; + state.kind = isMapping ? "mapping" : "sequence"; + state.result = _result; + return true; + } else if (!readNext) { + throwError(state, "missed comma between flow collection entries"); + } + keyTag = keyNode = valueNode = null; + isPair = isExplicitPair = false; + if (ch === 63) { + following = state.input.charCodeAt(state.position + 1); + if (is_WS_OR_EOL(following)) { + isPair = isExplicitPair = true; + state.position++; + skipSeparationSpace(state, true, nodeIndent); + } + } + _line = state.line; + composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); + keyTag = state.tag; + keyNode = state.result; + skipSeparationSpace(state, true, nodeIndent); + ch = state.input.charCodeAt(state.position); + if ((isExplicitPair || state.line === _line) && ch === 58) { + isPair = true; + ch = state.input.charCodeAt(++state.position); + skipSeparationSpace(state, true, nodeIndent); + composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); + valueNode = state.result; + } + if (isMapping) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode); + } else if (isPair) { + _result.push(storeMappingPair(state, null, overridableKeys, keyTag, keyNode, valueNode)); + } else { + _result.push(keyNode); + } + skipSeparationSpace(state, true, nodeIndent); + ch = state.input.charCodeAt(state.position); + if (ch === 44) { + readNext = true; + ch = state.input.charCodeAt(++state.position); + } else { + readNext = false; + } + } + throwError(state, "unexpected end of the stream within a flow collection"); + } + function readBlockScalar(state, nodeIndent) { + var captureStart, folding, chomping = CHOMPING_CLIP, didReadContent = false, detectedIndent = false, textIndent = nodeIndent, emptyLines = 0, atMoreIndented = false, tmp, ch; + ch = state.input.charCodeAt(state.position); + if (ch === 124) { + folding = false; + } else if (ch === 62) { + folding = true; + } else { + return false; + } + state.kind = "scalar"; + state.result = ""; + while (ch !== 0) { + ch = state.input.charCodeAt(++state.position); + if (ch === 43 || ch === 45) { + if (CHOMPING_CLIP === chomping) { + chomping = ch === 43 ? CHOMPING_KEEP : CHOMPING_STRIP; + } else { + throwError(state, "repeat of a chomping mode identifier"); + } + } else if ((tmp = fromDecimalCode(ch)) >= 0) { + if (tmp === 0) { + throwError(state, "bad explicit indentation width of a block scalar; it cannot be less than one"); + } else if (!detectedIndent) { + textIndent = nodeIndent + tmp - 1; + detectedIndent = true; + } else { + throwError(state, "repeat of an indentation width identifier"); + } + } else { + break; + } + } + if (is_WHITE_SPACE(ch)) { + do { + ch = state.input.charCodeAt(++state.position); + } while (is_WHITE_SPACE(ch)); + if (ch === 35) { + do { + ch = state.input.charCodeAt(++state.position); + } while (!is_EOL(ch) && ch !== 0); + } + } + while (ch !== 0) { + readLineBreak(state); + state.lineIndent = 0; + ch = state.input.charCodeAt(state.position); + while ((!detectedIndent || state.lineIndent < textIndent) && ch === 32) { + state.lineIndent++; + ch = state.input.charCodeAt(++state.position); + } + if (!detectedIndent && state.lineIndent > textIndent) { + textIndent = state.lineIndent; + } + if (is_EOL(ch)) { + emptyLines++; + continue; + } + if (state.lineIndent < textIndent) { + if (chomping === CHOMPING_KEEP) { + state.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines); + } else if (chomping === CHOMPING_CLIP) { + if (didReadContent) { + state.result += "\n"; + } + } + break; + } + if (folding) { + if (is_WHITE_SPACE(ch)) { + atMoreIndented = true; + state.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines); + } else if (atMoreIndented) { + atMoreIndented = false; + state.result += common.repeat("\n", emptyLines + 1); + } else if (emptyLines === 0) { + if (didReadContent) { + state.result += " "; + } + } else { + state.result += common.repeat("\n", emptyLines); + } + } else { + state.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines); + } + didReadContent = true; + detectedIndent = true; + emptyLines = 0; + captureStart = state.position; + while (!is_EOL(ch) && ch !== 0) { + ch = state.input.charCodeAt(++state.position); + } + captureSegment(state, captureStart, state.position, false); + } + return true; + } + function readBlockSequence(state, nodeIndent) { + var _line, _tag = state.tag, _anchor = state.anchor, _result = [], following, detected = false, ch; + if (state.anchor !== null) { + state.anchorMap[state.anchor] = _result; + } + ch = state.input.charCodeAt(state.position); + while (ch !== 0) { + if (ch !== 45) { + break; + } + following = state.input.charCodeAt(state.position + 1); + if (!is_WS_OR_EOL(following)) { + break; + } + detected = true; + state.position++; + if (skipSeparationSpace(state, true, -1)) { + if (state.lineIndent <= nodeIndent) { + _result.push(null); + ch = state.input.charCodeAt(state.position); + continue; + } + } + _line = state.line; + composeNode(state, nodeIndent, CONTEXT_BLOCK_IN, false, true); + _result.push(state.result); + skipSeparationSpace(state, true, -1); + ch = state.input.charCodeAt(state.position); + if ((state.line === _line || state.lineIndent > nodeIndent) && ch !== 0) { + throwError(state, "bad indentation of a sequence entry"); + } else if (state.lineIndent < nodeIndent) { + break; + } + } + if (detected) { + state.tag = _tag; + state.anchor = _anchor; + state.kind = "sequence"; + state.result = _result; + return true; + } + return false; + } + function readBlockMapping(state, nodeIndent, flowIndent) { + var following, allowCompact, _line, _pos, _tag = state.tag, _anchor = state.anchor, _result = {}, overridableKeys = {}, keyTag = null, keyNode = null, valueNode = null, atExplicitKey = false, detected = false, ch; + if (state.anchor !== null) { + state.anchorMap[state.anchor] = _result; + } + ch = state.input.charCodeAt(state.position); + while (ch !== 0) { + following = state.input.charCodeAt(state.position + 1); + _line = state.line; + _pos = state.position; + if ((ch === 63 || ch === 58) && is_WS_OR_EOL(following)) { + if (ch === 63) { + if (atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null); + keyTag = keyNode = valueNode = null; + } + detected = true; + atExplicitKey = true; + allowCompact = true; + } else if (atExplicitKey) { + atExplicitKey = false; + allowCompact = true; + } else { + throwError(state, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"); + } + state.position += 1; + ch = following; + } else if (composeNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)) { + if (state.line === _line) { + ch = state.input.charCodeAt(state.position); + while (is_WHITE_SPACE(ch)) { + ch = state.input.charCodeAt(++state.position); + } + if (ch === 58) { + ch = state.input.charCodeAt(++state.position); + if (!is_WS_OR_EOL(ch)) { + throwError(state, "a whitespace character is expected after the key-value separator within a block mapping"); + } + if (atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null); + keyTag = keyNode = valueNode = null; + } + detected = true; + atExplicitKey = false; + allowCompact = false; + keyTag = state.tag; + keyNode = state.result; + } else if (detected) { + throwError(state, "can not read an implicit mapping pair; a colon is missed"); + } else { + state.tag = _tag; + state.anchor = _anchor; + return true; + } + } else if (detected) { + throwError(state, "can not read a block mapping entry; a multiline key may not be an implicit key"); + } else { + state.tag = _tag; + state.anchor = _anchor; + return true; + } + } else { + break; + } + if (state.line === _line || state.lineIndent > nodeIndent) { + if (composeNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) { + if (atExplicitKey) { + keyNode = state.result; + } else { + valueNode = state.result; + } + } + if (!atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _line, _pos); + keyTag = keyNode = valueNode = null; + } + skipSeparationSpace(state, true, -1); + ch = state.input.charCodeAt(state.position); + } + if (state.lineIndent > nodeIndent && ch !== 0) { + throwError(state, "bad indentation of a mapping entry"); + } else if (state.lineIndent < nodeIndent) { + break; + } + } + if (atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null); + } + if (detected) { + state.tag = _tag; + state.anchor = _anchor; + state.kind = "mapping"; + state.result = _result; + } + return detected; + } + function readTagProperty(state) { + var _position, isVerbatim = false, isNamed = false, tagHandle, tagName, ch; + ch = state.input.charCodeAt(state.position); + if (ch !== 33) return false; + if (state.tag !== null) { + throwError(state, "duplication of a tag property"); + } + ch = state.input.charCodeAt(++state.position); + if (ch === 60) { + isVerbatim = true; + ch = state.input.charCodeAt(++state.position); + } else if (ch === 33) { + isNamed = true; + tagHandle = "!!"; + ch = state.input.charCodeAt(++state.position); + } else { + tagHandle = "!"; + } + _position = state.position; + if (isVerbatim) { + do { + ch = state.input.charCodeAt(++state.position); + } while (ch !== 0 && ch !== 62); + if (state.position < state.length) { + tagName = state.input.slice(_position, state.position); + ch = state.input.charCodeAt(++state.position); + } else { + throwError(state, "unexpected end of the stream within a verbatim tag"); + } + } else { + while (ch !== 0 && !is_WS_OR_EOL(ch)) { + if (ch === 33) { + if (!isNamed) { + tagHandle = state.input.slice(_position - 1, state.position + 1); + if (!PATTERN_TAG_HANDLE.test(tagHandle)) { + throwError(state, "named tag handle cannot contain such characters"); + } + isNamed = true; + _position = state.position + 1; + } else { + throwError(state, "tag suffix cannot contain exclamation marks"); + } + } + ch = state.input.charCodeAt(++state.position); + } + tagName = state.input.slice(_position, state.position); + if (PATTERN_FLOW_INDICATORS.test(tagName)) { + throwError(state, "tag suffix cannot contain flow indicator characters"); + } + } + if (tagName && !PATTERN_TAG_URI.test(tagName)) { + throwError(state, "tag name cannot contain such characters: " + tagName); + } + if (isVerbatim) { + state.tag = tagName; + } else if (_hasOwnProperty.call(state.tagMap, tagHandle)) { + state.tag = state.tagMap[tagHandle] + tagName; + } else if (tagHandle === "!") { + state.tag = "!" + tagName; + } else if (tagHandle === "!!") { + state.tag = "tag:yaml.org,2002:" + tagName; + } else { + throwError(state, 'undeclared tag handle "' + tagHandle + '"'); + } + return true; + } + function readAnchorProperty(state) { + var _position, ch; + ch = state.input.charCodeAt(state.position); + if (ch !== 38) return false; + if (state.anchor !== null) { + throwError(state, "duplication of an anchor property"); + } + ch = state.input.charCodeAt(++state.position); + _position = state.position; + while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { + ch = state.input.charCodeAt(++state.position); + } + if (state.position === _position) { + throwError(state, "name of an anchor node must contain at least one character"); + } + state.anchor = state.input.slice(_position, state.position); + return true; + } + function readAlias(state) { + var _position, alias, ch; + ch = state.input.charCodeAt(state.position); + if (ch !== 42) return false; + ch = state.input.charCodeAt(++state.position); + _position = state.position; + while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { + ch = state.input.charCodeAt(++state.position); + } + if (state.position === _position) { + throwError(state, "name of an alias node must contain at least one character"); + } + alias = state.input.slice(_position, state.position); + if (!state.anchorMap.hasOwnProperty(alias)) { + throwError(state, 'unidentified alias "' + alias + '"'); + } + state.result = state.anchorMap[alias]; + skipSeparationSpace(state, true, -1); + return true; + } + function composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact) { + var allowBlockStyles, allowBlockScalars, allowBlockCollections, indentStatus = 1, atNewLine = false, hasContent = false, typeIndex, typeQuantity, type, flowIndent, blockIndent; + if (state.listener !== null) { + state.listener("open", state); + } + state.tag = null; + state.anchor = null; + state.kind = null; + state.result = null; + allowBlockStyles = allowBlockScalars = allowBlockCollections = CONTEXT_BLOCK_OUT === nodeContext || CONTEXT_BLOCK_IN === nodeContext; + if (allowToSeek) { + if (skipSeparationSpace(state, true, -1)) { + atNewLine = true; + if (state.lineIndent > parentIndent) { + indentStatus = 1; + } else if (state.lineIndent === parentIndent) { + indentStatus = 0; + } else if (state.lineIndent < parentIndent) { + indentStatus = -1; + } + } + } + if (indentStatus === 1) { + while (readTagProperty(state) || readAnchorProperty(state)) { + if (skipSeparationSpace(state, true, -1)) { + atNewLine = true; + allowBlockCollections = allowBlockStyles; + if (state.lineIndent > parentIndent) { + indentStatus = 1; + } else if (state.lineIndent === parentIndent) { + indentStatus = 0; + } else if (state.lineIndent < parentIndent) { + indentStatus = -1; + } + } else { + allowBlockCollections = false; + } + } + } + if (allowBlockCollections) { + allowBlockCollections = atNewLine || allowCompact; + } + if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) { + if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) { + flowIndent = parentIndent; + } else { + flowIndent = parentIndent + 1; + } + blockIndent = state.position - state.lineStart; + if (indentStatus === 1) { + if (allowBlockCollections && (readBlockSequence(state, blockIndent) || readBlockMapping(state, blockIndent, flowIndent)) || readFlowCollection(state, flowIndent)) { + hasContent = true; + } else { + if (allowBlockScalars && readBlockScalar(state, flowIndent) || readSingleQuotedScalar(state, flowIndent) || readDoubleQuotedScalar(state, flowIndent)) { + hasContent = true; + } else if (readAlias(state)) { + hasContent = true; + if (state.tag !== null || state.anchor !== null) { + throwError(state, "alias node should not have any properties"); + } + } else if (readPlainScalar(state, flowIndent, CONTEXT_FLOW_IN === nodeContext)) { + hasContent = true; + if (state.tag === null) { + state.tag = "?"; + } + } + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; + } + } + } else if (indentStatus === 0) { + hasContent = allowBlockCollections && readBlockSequence(state, blockIndent); + } + } + if (state.tag !== null && state.tag !== "!") { + if (state.tag === "?") { + for (typeIndex = 0, typeQuantity = state.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) { + type = state.implicitTypes[typeIndex]; + if (type.resolve(state.result)) { + state.result = type.construct(state.result); + state.tag = type.tag; + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; + } + break; + } + } + } else if (_hasOwnProperty.call(state.typeMap[state.kind || "fallback"], state.tag)) { + type = state.typeMap[state.kind || "fallback"][state.tag]; + if (state.result !== null && type.kind !== state.kind) { + throwError(state, "unacceptable node kind for !<" + state.tag + '> tag; it should be "' + type.kind + '", not "' + state.kind + '"'); + } + if (!type.resolve(state.result)) { + throwError(state, "cannot resolve a node with !<" + state.tag + "> explicit tag"); + } else { + state.result = type.construct(state.result); + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; + } + } + } else { + throwError(state, "unknown tag !<" + state.tag + ">"); + } + } + if (state.listener !== null) { + state.listener("close", state); + } + return state.tag !== null || state.anchor !== null || hasContent; + } + function readDocument(state) { + var documentStart = state.position, _position, directiveName, directiveArgs, hasDirectives = false, ch; + state.version = null; + state.checkLineBreaks = state.legacy; + state.tagMap = {}; + state.anchorMap = {}; + while ((ch = state.input.charCodeAt(state.position)) !== 0) { + skipSeparationSpace(state, true, -1); + ch = state.input.charCodeAt(state.position); + if (state.lineIndent > 0 || ch !== 37) { + break; + } + hasDirectives = true; + ch = state.input.charCodeAt(++state.position); + _position = state.position; + while (ch !== 0 && !is_WS_OR_EOL(ch)) { + ch = state.input.charCodeAt(++state.position); + } + directiveName = state.input.slice(_position, state.position); + directiveArgs = []; + if (directiveName.length < 1) { + throwError(state, "directive name must not be less than one character in length"); + } + while (ch !== 0) { + while (is_WHITE_SPACE(ch)) { + ch = state.input.charCodeAt(++state.position); + } + if (ch === 35) { + do { + ch = state.input.charCodeAt(++state.position); + } while (ch !== 0 && !is_EOL(ch)); + break; + } + if (is_EOL(ch)) break; + _position = state.position; + while (ch !== 0 && !is_WS_OR_EOL(ch)) { + ch = state.input.charCodeAt(++state.position); + } + directiveArgs.push(state.input.slice(_position, state.position)); + } + if (ch !== 0) readLineBreak(state); + if (_hasOwnProperty.call(directiveHandlers, directiveName)) { + directiveHandlers[directiveName](state, directiveName, directiveArgs); + } else { + throwWarning(state, 'unknown document directive "' + directiveName + '"'); + } + } + skipSeparationSpace(state, true, -1); + if (state.lineIndent === 0 && state.input.charCodeAt(state.position) === 45 && state.input.charCodeAt(state.position + 1) === 45 && state.input.charCodeAt(state.position + 2) === 45) { + state.position += 3; + skipSeparationSpace(state, true, -1); + } else if (hasDirectives) { + throwError(state, "directives end mark is expected"); + } + composeNode(state, state.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true); + skipSeparationSpace(state, true, -1); + if (state.checkLineBreaks && PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart, state.position))) { + throwWarning(state, "non-ASCII line breaks are interpreted as content"); + } + state.documents.push(state.result); + if (state.position === state.lineStart && testDocumentSeparator(state)) { + if (state.input.charCodeAt(state.position) === 46) { + state.position += 3; + skipSeparationSpace(state, true, -1); + } + return; + } + if (state.position < state.length - 1) { + throwError(state, "end of the stream or a document separator is expected"); + } else { + return; + } + } + function loadDocuments(input, options) { + input = String(input); + options = options || {}; + if (input.length !== 0) { + if (input.charCodeAt(input.length - 1) !== 10 && input.charCodeAt(input.length - 1) !== 13) { + input += "\n"; + } + if (input.charCodeAt(0) === 65279) { + input = input.slice(1); + } + } + var state = new State(input, options); + state.input += "\0"; + while (state.input.charCodeAt(state.position) === 32) { + state.lineIndent += 1; + state.position += 1; + } + while (state.position < state.length - 1) { + readDocument(state); + } + return state.documents; + } + function loadAll(input, iterator, options) { + var documents = loadDocuments(input, options), index, length; + if (typeof iterator !== "function") { + return documents; + } + for (index = 0, length = documents.length; index < length; index += 1) { + iterator(documents[index]); + } + } + function load(input, options) { + var documents = loadDocuments(input, options); + if (documents.length === 0) { + return void 0; + } else if (documents.length === 1) { + return documents[0]; + } + throw new YAMLException("expected a single document in the stream, but found more"); + } + function safeLoadAll(input, output, options) { + if (typeof output === "function") { + loadAll(input, output, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options)); + } else { + return loadAll(input, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options)); + } + } + function safeLoad(input, options) { + return load(input, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options)); + } + module5.exports.loadAll = loadAll; + module5.exports.load = load; + module5.exports.safeLoadAll = safeLoadAll; + module5.exports.safeLoad = safeLoad; + }, { "./common": 38, "./exception": 40, "./mark": 42, "./schema/default_full": 45, "./schema/default_safe": 46 }], 42: [function(_dereq_2, module5, exports5) { + "use strict"; + var common = _dereq_2("./common"); + function Mark(name, buffer, position, line, column) { + this.name = name; + this.buffer = buffer; + this.position = position; + this.line = line; + this.column = column; + } + Mark.prototype.getSnippet = function getSnippet(indent, maxLength) { + var head, start, tail, end2, snippet; + if (!this.buffer) return null; + indent = indent || 4; + maxLength = maxLength || 75; + head = ""; + start = this.position; + while (start > 0 && "\0\r\n\x85\u2028\u2029".indexOf(this.buffer.charAt(start - 1)) === -1) { + start -= 1; + if (this.position - start > maxLength / 2 - 1) { + head = " ... "; + start += 5; + break; + } + } + tail = ""; + end2 = this.position; + while (end2 < this.buffer.length && "\0\r\n\x85\u2028\u2029".indexOf(this.buffer.charAt(end2)) === -1) { + end2 += 1; + if (end2 - this.position > maxLength / 2 - 1) { + tail = " ... "; + end2 -= 5; + break; + } + } + snippet = this.buffer.slice(start, end2); + return common.repeat(" ", indent) + head + snippet + tail + "\n" + common.repeat(" ", indent + this.position - start + head.length) + "^"; + }; + Mark.prototype.toString = function toString(compact) { + var snippet, where = ""; + if (this.name) { + where += 'in "' + this.name + '" '; + } + where += "at line " + (this.line + 1) + ", column " + (this.column + 1); + if (!compact) { + snippet = this.getSnippet(); + if (snippet) { + where += ":\n" + snippet; + } + } + return where; + }; + module5.exports = Mark; + }, { "./common": 38 }], 43: [function(_dereq_2, module5, exports5) { + "use strict"; + var common = _dereq_2("./common"); + var YAMLException = _dereq_2("./exception"); + var Type = _dereq_2("./type"); + function compileList(schema2, name, result) { + var exclude = []; + schema2.include.forEach(function(includedSchema) { + result = compileList(includedSchema, name, result); + }); + schema2[name].forEach(function(currentType) { + result.forEach(function(previousType, previousIndex) { + if (previousType.tag === currentType.tag && previousType.kind === currentType.kind) { + exclude.push(previousIndex); + } + }); + result.push(currentType); + }); + return result.filter(function(type, index) { + return exclude.indexOf(index) === -1; + }); + } + function compileMap() { + var result = { + scalar: {}, + sequence: {}, + mapping: {}, + fallback: {} + }, index, length; + function collectType(type) { + result[type.kind][type.tag] = result["fallback"][type.tag] = type; + } + for (index = 0, length = arguments.length; index < length; index += 1) { + arguments[index].forEach(collectType); + } + return result; + } + function Schema(definition) { + this.include = definition.include || []; + this.implicit = definition.implicit || []; + this.explicit = definition.explicit || []; + this.implicit.forEach(function(type) { + if (type.loadKind && type.loadKind !== "scalar") { + throw new YAMLException("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported."); + } + }); + this.compiledImplicit = compileList(this, "implicit", []); + this.compiledExplicit = compileList(this, "explicit", []); + this.compiledTypeMap = compileMap(this.compiledImplicit, this.compiledExplicit); + } + Schema.DEFAULT = null; + Schema.create = function createSchema() { + var schemas, types2; + switch (arguments.length) { + case 1: + schemas = Schema.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 = common.toArray(schemas); + types2 = common.toArray(types2); + if (!schemas.every(function(schema2) { + return schema2 instanceof Schema; + })) { + throw new YAMLException("Specified list of super schemas (or a single Schema object) contains a non-Schema object."); + } + if (!types2.every(function(type) { + return type instanceof Type; + })) { + throw new YAMLException("Specified list of YAML types (or a single Type object) contains a non-Type object."); + } + return new Schema({ + include: schemas, + explicit: types2 + }); + }; + module5.exports = Schema; + }, { "./common": 38, "./exception": 40, "./type": 49 }], 44: [function(_dereq_2, module5, exports5) { + "use strict"; + var Schema = _dereq_2("../schema"); + module5.exports = new Schema({ + include: [ + _dereq_2("./json") + ] + }); + }, { "../schema": 43, "./json": 48 }], 45: [function(_dereq_2, module5, exports5) { + "use strict"; + var Schema = _dereq_2("../schema"); + module5.exports = Schema.DEFAULT = new Schema({ + include: [ + _dereq_2("./default_safe") + ], + explicit: [ + _dereq_2("../type/js/undefined"), + _dereq_2("../type/js/regexp"), + _dereq_2("../type/js/function") + ] + }); + }, { "../schema": 43, "../type/js/function": 54, "../type/js/regexp": 55, "../type/js/undefined": 56, "./default_safe": 46 }], 46: [function(_dereq_2, module5, exports5) { + "use strict"; + var Schema = _dereq_2("../schema"); + module5.exports = new Schema({ + include: [ + _dereq_2("./core") + ], + implicit: [ + _dereq_2("../type/timestamp"), + _dereq_2("../type/merge") + ], + explicit: [ + _dereq_2("../type/binary"), + _dereq_2("../type/omap"), + _dereq_2("../type/pairs"), + _dereq_2("../type/set") + ] + }); + }, { "../schema": 43, "../type/binary": 50, "../type/merge": 58, "../type/omap": 60, "../type/pairs": 61, "../type/set": 63, "../type/timestamp": 65, "./core": 44 }], 47: [function(_dereq_2, module5, exports5) { + "use strict"; + var Schema = _dereq_2("../schema"); + module5.exports = new Schema({ + explicit: [ + _dereq_2("../type/str"), + _dereq_2("../type/seq"), + _dereq_2("../type/map") + ] + }); + }, { "../schema": 43, "../type/map": 57, "../type/seq": 62, "../type/str": 64 }], 48: [function(_dereq_2, module5, exports5) { + "use strict"; + var Schema = _dereq_2("../schema"); + module5.exports = new Schema({ + include: [ + _dereq_2("./failsafe") + ], + implicit: [ + _dereq_2("../type/null"), + _dereq_2("../type/bool"), + _dereq_2("../type/int"), + _dereq_2("../type/float") + ] + }); + }, { "../schema": 43, "../type/bool": 51, "../type/float": 52, "../type/int": 53, "../type/null": 59, "./failsafe": 47 }], 49: [function(_dereq_2, module5, exports5) { + "use strict"; + var YAMLException = _dereq_2("./exception"); + var TYPE_CONSTRUCTOR_OPTIONS = [ + "kind", + "resolve", + "construct", + "instanceOf", + "predicate", + "represent", + "defaultStyle", + "styleAliases" + ]; + var YAML_NODE_KINDS = [ + "scalar", + "sequence", + "mapping" + ]; + function compileStyleAliases(map) { + var result = {}; + if (map !== null) { + Object.keys(map).forEach(function(style) { + map[style].forEach(function(alias) { + result[String(alias)] = style; + }); + }); + } + return result; + } + function Type(tag, options) { + options = options || {}; + Object.keys(options).forEach(function(name) { + if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) { + throw new YAMLException('Unknown option "' + name + '" is met in definition of "' + tag + '" YAML type.'); + } + }); + this.tag = tag; + this.kind = options["kind"] || null; + this.resolve = options["resolve"] || function() { + return true; + }; + this.construct = options["construct"] || function(data) { + return data; + }; + this.instanceOf = options["instanceOf"] || null; + this.predicate = options["predicate"] || null; + this.represent = options["represent"] || null; + this.defaultStyle = options["defaultStyle"] || null; + this.styleAliases = compileStyleAliases(options["styleAliases"] || null); + if (YAML_NODE_KINDS.indexOf(this.kind) === -1) { + throw new YAMLException('Unknown kind "' + this.kind + '" is specified for "' + tag + '" YAML type.'); + } + } + module5.exports = Type; + }, { "./exception": 40 }], 50: [function(_dereq_2, module5, exports5) { + "use strict"; + var NodeBuffer; + try { + var _require = _dereq_2; + NodeBuffer = _require("buffer").Buffer; + } catch (__) { + } + var Type = _dereq_2("../type"); + var BASE64_MAP = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r"; + function resolveYamlBinary(data) { + if (data === null) return false; + var code, idx, bitlen = 0, max = data.length, map = BASE64_MAP; + for (idx = 0; idx < max; idx++) { + code = map.indexOf(data.charAt(idx)); + if (code > 64) continue; + if (code < 0) return false; + bitlen += 6; + } + return bitlen % 8 === 0; + } + function constructYamlBinary(data) { + var idx, tailbits, input = data.replace(/[\r\n=]/g, ""), max = input.length, map = BASE64_MAP, bits = 0, result = []; + for (idx = 0; idx < max; idx++) { + if (idx % 4 === 0 && idx) { + result.push(bits >> 16 & 255); + result.push(bits >> 8 & 255); + result.push(bits & 255); + } + bits = bits << 6 | map.indexOf(input.charAt(idx)); + } + tailbits = max % 4 * 6; + if (tailbits === 0) { + result.push(bits >> 16 & 255); + result.push(bits >> 8 & 255); + result.push(bits & 255); + } else if (tailbits === 18) { + result.push(bits >> 10 & 255); + result.push(bits >> 2 & 255); + } else if (tailbits === 12) { + result.push(bits >> 4 & 255); + } + if (NodeBuffer) { + return NodeBuffer.from ? NodeBuffer.from(result) : new NodeBuffer(result); + } + return result; + } + function representYamlBinary(object) { + var result = "", bits = 0, idx, tail, max = object.length, map = BASE64_MAP; + for (idx = 0; idx < max; idx++) { + if (idx % 3 === 0 && idx) { + result += map[bits >> 18 & 63]; + result += map[bits >> 12 & 63]; + result += map[bits >> 6 & 63]; + result += map[bits & 63]; + } + bits = (bits << 8) + object[idx]; + } + tail = max % 3; + if (tail === 0) { + result += map[bits >> 18 & 63]; + result += map[bits >> 12 & 63]; + result += map[bits >> 6 & 63]; + result += map[bits & 63]; + } else if (tail === 2) { + result += map[bits >> 10 & 63]; + result += map[bits >> 4 & 63]; + result += map[bits << 2 & 63]; + result += map[64]; + } else if (tail === 1) { + result += map[bits >> 2 & 63]; + result += map[bits << 4 & 63]; + result += map[64]; + result += map[64]; + } + return result; + } + function isBinary(object) { + return NodeBuffer && NodeBuffer.isBuffer(object); + } + module5.exports = new Type("tag:yaml.org,2002:binary", { + kind: "scalar", + resolve: resolveYamlBinary, + construct: constructYamlBinary, + predicate: isBinary, + represent: representYamlBinary + }); + }, { "../type": 49 }], 51: [function(_dereq_2, module5, exports5) { + "use strict"; + var Type = _dereq_2("../type"); + function resolveYamlBoolean(data) { + if (data === null) return false; + var max = data.length; + return max === 4 && (data === "true" || data === "True" || data === "TRUE") || max === 5 && (data === "false" || data === "False" || data === "FALSE"); + } + function constructYamlBoolean(data) { + return data === "true" || data === "True" || data === "TRUE"; + } + function isBoolean(object) { + return Object.prototype.toString.call(object) === "[object Boolean]"; + } + module5.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" + }); + }, { "../type": 49 }], 52: [function(_dereq_2, module5, exports5) { + "use strict"; + var common = _dereq_2("../common"); + var Type = _dereq_2("../type"); + var YAML_FLOAT_PATTERN = new RegExp( + // 2.5e4, 2.5 and integers + "^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$" + ); + function resolveYamlFloat(data) { + if (data === null) return false; + if (!YAML_FLOAT_PATTERN.test(data) || // Quick hack to not allow integers end with `_` + // Probably should update regexp & check speed + data[data.length - 1] === "_") { + return false; + } + return true; + } + function constructYamlFloat(data) { + var value, sign, base, digits; + value = data.replace(/_/g, "").toLowerCase(); + sign = value[0] === "-" ? -1 : 1; + digits = []; + if ("+-".indexOf(value[0]) >= 0) { + value = value.slice(1); + } + if (value === ".inf") { + return sign === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY; + } else if (value === ".nan") { + return NaN; + } else if (value.indexOf(":") >= 0) { + value.split(":").forEach(function(v) { + digits.unshift(parseFloat(v, 10)); + }); + value = 0; + base = 1; + digits.forEach(function(d) { + value += d * base; + base *= 60; + }); + return sign * value; + } + return sign * parseFloat(value, 10); + } + var SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/; + function representYamlFloat(object, style) { + var res; + if (isNaN(object)) { + switch (style) { + case "lowercase": + return ".nan"; + case "uppercase": + return ".NAN"; + case "camelcase": + return ".NaN"; + } + } else if (Number.POSITIVE_INFINITY === object) { + switch (style) { + case "lowercase": + return ".inf"; + case "uppercase": + return ".INF"; + case "camelcase": + return ".Inf"; + } + } else if (Number.NEGATIVE_INFINITY === object) { + switch (style) { + case "lowercase": + return "-.inf"; + case "uppercase": + return "-.INF"; + case "camelcase": + return "-.Inf"; + } + } else if (common.isNegativeZero(object)) { + return "-0.0"; + } + res = object.toString(10); + return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace("e", ".e") : res; + } + function isFloat(object) { + return Object.prototype.toString.call(object) === "[object Number]" && (object % 1 !== 0 || common.isNegativeZero(object)); + } + module5.exports = new Type("tag:yaml.org,2002:float", { + kind: "scalar", + resolve: resolveYamlFloat, + construct: constructYamlFloat, + predicate: isFloat, + represent: representYamlFloat, + defaultStyle: "lowercase" + }); + }, { "../common": 38, "../type": 49 }], 53: [function(_dereq_2, module5, exports5) { + "use strict"; + var common = _dereq_2("../common"); + var Type = _dereq_2("../type"); + function isHexCode(c) { + return 48 <= c && c <= 57 || 65 <= c && c <= 70 || 97 <= c && c <= 102; + } + function isOctCode(c) { + return 48 <= c && c <= 55; + } + function isDecCode(c) { + return 48 <= c && c <= 57; + } + function resolveYamlInteger(data) { + if (data === null) return false; + var max = data.length, index = 0, hasDigits = false, ch; + if (!max) return false; + ch = data[index]; + if (ch === "-" || ch === "+") { + ch = data[++index]; + } + if (ch === "0") { + if (index + 1 === max) return true; + ch = data[++index]; + if (ch === "b") { + index++; + for (; index < max; index++) { + ch = data[index]; + if (ch === "_") continue; + if (ch !== "0" && ch !== "1") return false; + hasDigits = true; + } + return hasDigits && ch !== "_"; + } + if (ch === "x") { + index++; + for (; index < max; index++) { + ch = data[index]; + if (ch === "_") continue; + if (!isHexCode(data.charCodeAt(index))) return false; + hasDigits = true; + } + return hasDigits && ch !== "_"; + } + for (; index < max; index++) { + ch = data[index]; + if (ch === "_") continue; + if (!isOctCode(data.charCodeAt(index))) return false; + hasDigits = true; + } + return hasDigits && ch !== "_"; + } + if (ch === "_") return false; + for (; index < max; index++) { + ch = data[index]; + if (ch === "_") continue; + if (ch === ":") break; + if (!isDecCode(data.charCodeAt(index))) { + return false; + } + hasDigits = true; + } + if (!hasDigits || ch === "_") return false; + if (ch !== ":") return true; + return /^(:[0-5]?[0-9])+$/.test(data.slice(index)); + } + function constructYamlInteger(data) { + var value = data, sign = 1, ch, base, digits = []; + if (value.indexOf("_") !== -1) { + value = value.replace(/_/g, ""); + } + ch = value[0]; + if (ch === "-" || ch === "+") { + if (ch === "-") sign = -1; + value = value.slice(1); + ch = value[0]; + } + if (value === "0") return 0; + if (ch === "0") { + if (value[1] === "b") return sign * parseInt(value.slice(2), 2); + if (value[1] === "x") return sign * parseInt(value, 16); + return sign * parseInt(value, 8); + } + if (value.indexOf(":") !== -1) { + value.split(":").forEach(function(v) { + digits.unshift(parseInt(v, 10)); + }); + value = 0; + base = 1; + digits.forEach(function(d) { + value += d * base; + base *= 60; + }); + return sign * value; + } + return sign * parseInt(value, 10); + } + function isInteger(object) { + return Object.prototype.toString.call(object) === "[object Number]" && (object % 1 === 0 && !common.isNegativeZero(object)); + } + module5.exports = new Type("tag:yaml.org,2002:int", { + kind: "scalar", + resolve: resolveYamlInteger, + construct: constructYamlInteger, + predicate: isInteger, + represent: { + binary: function(obj) { + return obj >= 0 ? "0b" + obj.toString(2) : "-0b" + obj.toString(2).slice(1); + }, + octal: function(obj) { + return obj >= 0 ? "0" + obj.toString(8) : "-0" + obj.toString(8).slice(1); + }, + decimal: function(obj) { + return obj.toString(10); + }, + /* eslint-disable max-len */ + hexadecimal: function(obj) { + return obj >= 0 ? "0x" + obj.toString(16).toUpperCase() : "-0x" + obj.toString(16).toUpperCase().slice(1); + } + }, + defaultStyle: "decimal", + styleAliases: { + binary: [2, "bin"], + octal: [8, "oct"], + decimal: [10, "dec"], + hexadecimal: [16, "hex"] + } + }); + }, { "../common": 38, "../type": 49 }], 54: [function(_dereq_2, module5, exports5) { + "use strict"; + var esprima; + try { + var _require = _dereq_2; + esprima = _require("esprima"); + } catch (_3) { + if (typeof window !== "undefined") esprima = window.esprima; + } + var Type = _dereq_2("../../type"); + function resolveJavascriptFunction(data) { + if (data === null) return false; + try { + var source = "(" + data + ")", ast = esprima.parse(source, { range: true }); + if (ast.type !== "Program" || ast.body.length !== 1 || ast.body[0].type !== "ExpressionStatement" || ast.body[0].expression.type !== "ArrowFunctionExpression" && ast.body[0].expression.type !== "FunctionExpression") { + return false; + } + return true; + } catch (err) { + return false; + } + } + function constructJavascriptFunction(data) { + var source = "(" + data + ")", ast = esprima.parse(source, { range: true }), params = [], body; + if (ast.type !== "Program" || ast.body.length !== 1 || ast.body[0].type !== "ExpressionStatement" || ast.body[0].expression.type !== "ArrowFunctionExpression" && ast.body[0].expression.type !== "FunctionExpression") { + throw new Error("Failed to resolve function"); + } + ast.body[0].expression.params.forEach(function(param) { + params.push(param.name); + }); + body = ast.body[0].expression.body.range; + return new Function(params, source.slice(body[0] + 1, body[1] - 1)); + } + function representJavascriptFunction(object) { + return object.toString(); + } + function isFunction(object) { + return Object.prototype.toString.call(object) === "[object Function]"; + } + module5.exports = new Type("tag:yaml.org,2002:js/function", { + kind: "scalar", + resolve: resolveJavascriptFunction, + construct: constructJavascriptFunction, + predicate: isFunction, + represent: representJavascriptFunction + }); + }, { "../../type": 49 }], 55: [function(_dereq_2, module5, exports5) { + "use strict"; + var Type = _dereq_2("../../type"); + function resolveJavascriptRegExp(data) { + if (data === null) return false; + if (data.length === 0) return false; + var regexp = data, tail = /\/([gim]*)$/.exec(data), modifiers = ""; + if (regexp[0] === "/") { + if (tail) modifiers = tail[1]; + if (modifiers.length > 3) return false; + if (regexp[regexp.length - modifiers.length - 1] !== "/") return false; + } + return true; + } + function constructJavascriptRegExp(data) { + var regexp = data, tail = /\/([gim]*)$/.exec(data), modifiers = ""; + if (regexp[0] === "/") { + if (tail) modifiers = tail[1]; + regexp = regexp.slice(1, regexp.length - modifiers.length - 1); + } + return new RegExp(regexp, modifiers); + } + function representJavascriptRegExp(object) { + var result = "/" + object.source + "/"; + if (object.global) result += "g"; + if (object.multiline) result += "m"; + if (object.ignoreCase) result += "i"; + return result; + } + function isRegExp(object) { + return Object.prototype.toString.call(object) === "[object RegExp]"; + } + module5.exports = new Type("tag:yaml.org,2002:js/regexp", { + kind: "scalar", + resolve: resolveJavascriptRegExp, + construct: constructJavascriptRegExp, + predicate: isRegExp, + represent: representJavascriptRegExp + }); + }, { "../../type": 49 }], 56: [function(_dereq_2, module5, exports5) { + "use strict"; + var Type = _dereq_2("../../type"); + function resolveJavascriptUndefined() { + return true; + } + function constructJavascriptUndefined() { + return void 0; + } + function representJavascriptUndefined() { + return ""; + } + function isUndefined(object) { + return typeof object === "undefined"; + } + module5.exports = new Type("tag:yaml.org,2002:js/undefined", { + kind: "scalar", + resolve: resolveJavascriptUndefined, + construct: constructJavascriptUndefined, + predicate: isUndefined, + represent: representJavascriptUndefined + }); + }, { "../../type": 49 }], 57: [function(_dereq_2, module5, exports5) { + "use strict"; + var Type = _dereq_2("../type"); + module5.exports = new Type("tag:yaml.org,2002:map", { + kind: "mapping", + construct: function(data) { + return data !== null ? data : {}; + } + }); + }, { "../type": 49 }], 58: [function(_dereq_2, module5, exports5) { + "use strict"; + var Type = _dereq_2("../type"); + function resolveYamlMerge(data) { + return data === "<<" || data === null; + } + module5.exports = new Type("tag:yaml.org,2002:merge", { + kind: "scalar", + resolve: resolveYamlMerge + }); + }, { "../type": 49 }], 59: [function(_dereq_2, module5, exports5) { + "use strict"; + var Type = _dereq_2("../type"); + function resolveYamlNull(data) { + if (data === null) return true; + var max = data.length; + return max === 1 && data === "~" || max === 4 && (data === "null" || data === "Null" || data === "NULL"); + } + function constructYamlNull() { + return null; + } + function isNull(object) { + return object === null; + } + module5.exports = new Type("tag:yaml.org,2002:null", { + kind: "scalar", + resolve: resolveYamlNull, + construct: constructYamlNull, + predicate: isNull, + represent: { + canonical: function() { + return "~"; + }, + lowercase: function() { + return "null"; + }, + uppercase: function() { + return "NULL"; + }, + camelcase: function() { + return "Null"; + } + }, + defaultStyle: "lowercase" + }); + }, { "../type": 49 }], 60: [function(_dereq_2, module5, exports5) { + "use strict"; + var Type = _dereq_2("../type"); + var _hasOwnProperty = Object.prototype.hasOwnProperty; + var _toString = Object.prototype.toString; + function resolveYamlOmap(data) { + if (data === null) return true; + var objectKeys = [], index, length, pair, pairKey, pairHasKey, object = data; + for (index = 0, length = object.length; index < length; index += 1) { + pair = object[index]; + pairHasKey = false; + if (_toString.call(pair) !== "[object Object]") return false; + for (pairKey in pair) { + if (_hasOwnProperty.call(pair, pairKey)) { + if (!pairHasKey) pairHasKey = true; + else return false; + } + } + if (!pairHasKey) return false; + if (objectKeys.indexOf(pairKey) === -1) objectKeys.push(pairKey); + else return false; + } + return true; + } + function constructYamlOmap(data) { + return data !== null ? data : []; + } + module5.exports = new Type("tag:yaml.org,2002:omap", { + kind: "sequence", + resolve: resolveYamlOmap, + construct: constructYamlOmap + }); + }, { "../type": 49 }], 61: [function(_dereq_2, module5, exports5) { + "use strict"; + var Type = _dereq_2("../type"); + var _toString = Object.prototype.toString; + function resolveYamlPairs(data) { + if (data === null) return true; + var index, length, pair, keys, result, object = data; + result = new Array(object.length); + for (index = 0, length = object.length; index < length; index += 1) { + pair = object[index]; + if (_toString.call(pair) !== "[object Object]") return false; + keys = Object.keys(pair); + if (keys.length !== 1) return false; + result[index] = [keys[0], pair[keys[0]]]; + } + return true; + } + function constructYamlPairs(data) { + if (data === null) return []; + var index, length, pair, keys, result, object = data; + result = new Array(object.length); + for (index = 0, length = object.length; index < length; index += 1) { + pair = object[index]; + keys = Object.keys(pair); + result[index] = [keys[0], pair[keys[0]]]; + } + return result; + } + module5.exports = new Type("tag:yaml.org,2002:pairs", { + kind: "sequence", + resolve: resolveYamlPairs, + construct: constructYamlPairs + }); + }, { "../type": 49 }], 62: [function(_dereq_2, module5, exports5) { + "use strict"; + var Type = _dereq_2("../type"); + module5.exports = new Type("tag:yaml.org,2002:seq", { + kind: "sequence", + construct: function(data) { + return data !== null ? data : []; + } + }); + }, { "../type": 49 }], 63: [function(_dereq_2, module5, exports5) { + "use strict"; + var Type = _dereq_2("../type"); + var _hasOwnProperty = Object.prototype.hasOwnProperty; + function resolveYamlSet(data) { + if (data === null) return true; + var key, object = data; + for (key in object) { + if (_hasOwnProperty.call(object, key)) { + if (object[key] !== null) return false; + } + } + return true; + } + function constructYamlSet(data) { + return data !== null ? data : {}; + } + module5.exports = new Type("tag:yaml.org,2002:set", { + kind: "mapping", + resolve: resolveYamlSet, + construct: constructYamlSet + }); + }, { "../type": 49 }], 64: [function(_dereq_2, module5, exports5) { + "use strict"; + var Type = _dereq_2("../type"); + module5.exports = new Type("tag:yaml.org,2002:str", { + kind: "scalar", + construct: function(data) { + return data !== null ? data : ""; + } + }); + }, { "../type": 49 }], 65: [function(_dereq_2, module5, exports5) { + "use strict"; + var Type = _dereq_2("../type"); + var YAML_DATE_REGEXP = new RegExp( + "^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$" + ); + 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 (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, date2; + match = YAML_DATE_REGEXP.exec(data); + if (match === null) match = YAML_TIMESTAMP_REGEXP.exec(data); + if (match === null) throw new Error("Date resolve error"); + year = +match[1]; + month = +match[2] - 1; + day = +match[3]; + if (!match[4]) { + return new Date(Date.UTC(year, month, day)); + } + hour = +match[4]; + minute = +match[5]; + second = +match[6]; + if (match[7]) { + fraction = match[7].slice(0, 3); + while (fraction.length < 3) { + fraction += "0"; + } + fraction = +fraction; + } + if (match[9]) { + tz_hour = +match[10]; + tz_minute = +(match[11] || 0); + delta = (tz_hour * 60 + tz_minute) * 6e4; + if (match[9] === "-") delta = -delta; + } + date2 = new Date(Date.UTC(year, month, day, hour, minute, second, fraction)); + if (delta) date2.setTime(date2.getTime() - delta); + return date2; + } + function representYamlTimestamp(object) { + return object.toISOString(); + } + module5.exports = new Type("tag:yaml.org,2002:timestamp", { + kind: "scalar", + resolve: resolveYamlTimestamp, + construct: constructYamlTimestamp, + instanceOf: Date, + represent: representYamlTimestamp + }); + }, { "../type": 49 }], 66: [function(_dereq_2, module5, exports5) { + var s = 1e3; + var m = s * 60; + var h = m * 60; + var d = h * 24; + var y = d * 365.25; + module5.exports = function(val, options) { + options = options || {}; + var type = typeof val; + if (type === "string" && val.length > 0) { + return parse2(val); + } else if (type === "number" && isNaN(val) === false) { + 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) + ); + }; + function parse2(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|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 "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 void 0; + } + } + function fmtShort(ms) { + if (ms >= d) { + return Math.round(ms / d) + "d"; + } + if (ms >= h) { + return Math.round(ms / h) + "h"; + } + if (ms >= m) { + return Math.round(ms / m) + "m"; + } + if (ms >= s) { + return Math.round(ms / s) + "s"; + } + return ms + "ms"; + } + function fmtLong(ms) { + return plural(ms, d, "day") || plural(ms, h, "hour") || plural(ms, m, "minute") || plural(ms, s, "second") || ms + " ms"; + } + function plural(ms, n, name) { + if (ms < n) { + return; + } + if (ms < n * 1.5) { + return Math.floor(ms / n) + " " + name; + } + return Math.ceil(ms / n) + " " + name + "s"; + } + }, {}], 67: [function(_dereq_2, module5, exports5) { + "use strict"; + var format = _dereq_2("format-util"); + var slice = Array.prototype.slice; + var protectedProperties = ["name", "message", "stack"]; + var errorPrototypeProperties = [ + "name", + "message", + "description", + "number", + "code", + "fileName", + "lineNumber", + "columnNumber", + "sourceURL", + "line", + "column", + "stack" + ]; + module5.exports = create(Error); + module5.exports.error = create(Error); + module5.exports.eval = create(EvalError); + module5.exports.range = create(RangeError); + module5.exports.reference = create(ReferenceError); + module5.exports.syntax = create(SyntaxError); + module5.exports.type = create(TypeError); + module5.exports.uri = create(URIError); + module5.exports.formatter = format; + function create(Klass) { + return function onoFactory(err, props, message, params) { + var formatArgs = []; + var formattedMessage = ""; + if (typeof err === "string") { + formatArgs = slice.call(arguments); + err = props = void 0; + } else if (typeof props === "string") { + formatArgs = slice.call(arguments, 1); + props = void 0; + } else if (typeof message === "string") { + formatArgs = slice.call(arguments, 2); + } + if (formatArgs.length > 0) { + formattedMessage = module5.exports.formatter.apply(null, formatArgs); + } + if (err && err.message) { + formattedMessage += (formattedMessage ? " \n" : "") + err.message; + } + var newError = new Klass(formattedMessage); + extendError(newError, err); + extendToJSON(newError); + extend(newError, props); + return newError; + }; + } + function extendError(targetError, sourceError) { + extendStack(targetError, sourceError); + extend(targetError, sourceError); + } + function extendToJSON(error) { + error.toJSON = errorToJSON; + error.inspect = errorToString; + } + function extend(target, source) { + if (source && typeof source === "object") { + var keys = Object.keys(source); + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + if (protectedProperties.indexOf(key) >= 0) { + continue; + } + try { + target[key] = source[key]; + } catch (e) { + } + } + } + } + function errorToJSON() { + var json = {}; + var keys = Object.keys(this); + keys = keys.concat(errorPrototypeProperties); + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + var value = this[key]; + var type = typeof value; + if (type !== "undefined" && type !== "function") { + json[key] = value; + } + } + return json; + } + function errorToString() { + return JSON.stringify(this, null, 2).replace(/\\n/g, "\n"); + } + function extendStack(targetError, sourceError) { + if (hasLazyStack(targetError)) { + if (sourceError) { + lazyJoinStacks(targetError, sourceError); + } else { + lazyPopStack(targetError); + } + } else { + if (sourceError) { + targetError.stack = joinStacks(targetError.stack, sourceError.stack); + } else { + targetError.stack = popStack(targetError.stack); + } + } + } + function joinStacks(newStack, originalStack) { + newStack = popStack(newStack); + if (newStack && originalStack) { + return newStack + "\n\n" + originalStack; + } else { + return newStack || originalStack; + } + } + function popStack(stack) { + if (stack) { + var lines = stack.split("\n"); + if (lines.length < 2) { + return stack; + } + for (var i = 0; i < lines.length; i++) { + var line = lines[i]; + if (line.indexOf("onoFactory") >= 0) { + lines.splice(i, 1); + return lines.join("\n"); + } + } + return stack; + } + } + var supportsLazyStack = function() { + return !!// ES5 property descriptors must be supported + (Object.getOwnPropertyDescriptor && Object.defineProperty && // Chrome on Android doesn't support lazy stacks :( + (typeof navigator === "undefined" || !/Android/.test(navigator.userAgent))); + }(); + function hasLazyStack(err) { + if (!supportsLazyStack) { + return false; + } + var descriptor = Object.getOwnPropertyDescriptor(err, "stack"); + if (!descriptor) { + return false; + } + return typeof descriptor.get === "function"; + } + function lazyJoinStacks(targetError, sourceError) { + var targetStack = Object.getOwnPropertyDescriptor(targetError, "stack"); + Object.defineProperty(targetError, "stack", { + get: function() { + return joinStacks(targetStack.get.apply(targetError), sourceError.stack); + }, + enumerable: false, + configurable: true + }); + } + function lazyPopStack(error) { + var targetStack = Object.getOwnPropertyDescriptor(error, "stack"); + Object.defineProperty(error, "stack", { + get: function() { + return popStack(targetStack.get.apply(error)); + }, + enumerable: false, + configurable: true + }); + } + }, { "format-util": 30 }], 68: [function(_dereq_2, module5, exports5) { + (function(process2) { + "use strict"; + if (!process2.version || process2.version.indexOf("v0.") === 0 || process2.version.indexOf("v1.") === 0 && process2.version.indexOf("v1.8.") !== 0) { + module5.exports = nextTick; + } else { + module5.exports = process2.nextTick; + } + function nextTick(fn, arg1, arg2, arg3) { + if (typeof fn !== "function") { + throw new TypeError('"callback" argument must be a function'); + } + var len = arguments.length; + var args, i; + switch (len) { + case 0: + case 1: + return process2.nextTick(fn); + case 2: + return process2.nextTick(function afterTickOne() { + fn.call(null, arg1); + }); + case 3: + return process2.nextTick(function afterTickTwo() { + fn.call(null, arg1, arg2); + }); + case 4: + return process2.nextTick(function afterTickThree() { + fn.call(null, arg1, arg2, arg3); + }); + default: + args = new Array(len - 1); + i = 0; + while (i < args.length) { + args[i++] = arguments[i]; + } + return process2.nextTick(function afterTick() { + fn.apply(null, args); + }); + } + } + }).call(this, _dereq_2("_process")); + }, { "_process": 69 }], 69: [function(_dereq_2, module5, exports5) { + var process2 = module5.exports = {}; + var cachedSetTimeout; + var cachedClearTimeout; + function defaultSetTimout() { + throw new Error("setTimeout has not been defined"); + } + function defaultClearTimeout() { + throw new Error("clearTimeout has not been defined"); + } + (function() { + try { + if (typeof setTimeout === "function") { + cachedSetTimeout = setTimeout; + } else { + cachedSetTimeout = defaultSetTimout; + } + } catch (e) { + cachedSetTimeout = defaultSetTimout; + } + try { + if (typeof clearTimeout === "function") { + cachedClearTimeout = clearTimeout; + } else { + cachedClearTimeout = defaultClearTimeout; + } + } catch (e) { + cachedClearTimeout = defaultClearTimeout; + } + })(); + function runTimeout(fun) { + if (cachedSetTimeout === setTimeout) { + return setTimeout(fun, 0); + } + if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { + cachedSetTimeout = setTimeout; + return setTimeout(fun, 0); + } + try { + return cachedSetTimeout(fun, 0); + } catch (e) { + try { + return cachedSetTimeout.call(null, fun, 0); + } catch (e2) { + return cachedSetTimeout.call(this, fun, 0); + } + } + } + function runClearTimeout(marker) { + if (cachedClearTimeout === clearTimeout) { + return clearTimeout(marker); + } + if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { + cachedClearTimeout = clearTimeout; + return clearTimeout(marker); + } + try { + return cachedClearTimeout(marker); + } catch (e) { + try { + return cachedClearTimeout.call(null, marker); + } catch (e2) { + return cachedClearTimeout.call(this, marker); + } + } + } + var queue = []; + var draining = false; + var currentQueue; + var queueIndex = -1; + function cleanUpNextTick() { + if (!draining || !currentQueue) { + return; + } + draining = false; + if (currentQueue.length) { + queue = currentQueue.concat(queue); + } else { + queueIndex = -1; + } + if (queue.length) { + drainQueue(); + } + } + function drainQueue() { + if (draining) { + return; + } + var timeout = runTimeout(cleanUpNextTick); + draining = true; + var len = queue.length; + while (len) { + currentQueue = queue; + queue = []; + while (++queueIndex < len) { + if (currentQueue) { + currentQueue[queueIndex].run(); + } + } + queueIndex = -1; + len = queue.length; + } + currentQueue = null; + draining = false; + runClearTimeout(timeout); + } + process2.nextTick = function(fun) { + var args = new Array(arguments.length - 1); + if (arguments.length > 1) { + for (var i = 1; i < arguments.length; i++) { + args[i - 1] = arguments[i]; + } + } + queue.push(new Item(fun, args)); + if (queue.length === 1 && !draining) { + runTimeout(drainQueue); + } + }; + function Item(fun, array) { + this.fun = fun; + this.array = array; + } + Item.prototype.run = function() { + this.fun.apply(null, this.array); + }; + process2.title = "browser"; + process2.browser = true; + process2.env = {}; + process2.argv = []; + process2.version = ""; + process2.versions = {}; + function noop() { + } + process2.on = noop; + process2.addListener = noop; + process2.once = noop; + process2.off = noop; + process2.removeListener = noop; + process2.removeAllListeners = noop; + process2.emit = noop; + process2.prependListener = noop; + process2.prependOnceListener = noop; + process2.listeners = function(name) { + return []; + }; + process2.binding = function(name) { + throw new Error("process.binding is not supported"); + }; + process2.cwd = function() { + return "/"; + }; + process2.chdir = function(dir) { + throw new Error("process.chdir is not supported"); + }; + process2.umask = function() { + return 0; + }; + }, {}], 70: [function(_dereq_2, module5, exports5) { + (function(global2) { + ; + (function(root) { + var freeExports = typeof exports5 == "object" && exports5 && !exports5.nodeType && exports5; + var freeModule = typeof module5 == "object" && module5 && !module5.nodeType && module5; + var freeGlobal = typeof global2 == "object" && global2; + if (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal || freeGlobal.self === freeGlobal) { + root = freeGlobal; + } + var punycode, maxInt = 2147483647, base = 36, tMin = 1, tMax = 26, skew = 38, damp = 700, initialBias = 72, initialN = 128, delimiter = "-", regexPunycode = /^xn--/, regexNonASCII = /[^\x20-\x7E]/, regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g, errors = { + "overflow": "Overflow: input needs wider integers to process", + "not-basic": "Illegal input >= 0x80 (not a basic code point)", + "invalid-input": "Invalid input" + }, baseMinusTMin = base - tMin, floor = Math.floor, stringFromCharCode = String.fromCharCode, key; + function error(type) { + throw new RangeError(errors[type]); + } + function map(array, fn) { + var length = array.length; + var result = []; + while (length--) { + result[length] = fn(array[length]); + } + return result; + } + function mapDomain(string, fn) { + var parts = string.split("@"); + var result = ""; + if (parts.length > 1) { + result = parts[0] + "@"; + string = parts[1]; + } + string = string.replace(regexSeparators, "."); + var labels = string.split("."); + var encoded = map(labels, fn).join("."); + return result + encoded; + } + function ucs2decode(string) { + var output = [], counter = 0, length = string.length, value, extra; + while (counter < length) { + value = string.charCodeAt(counter++); + if (value >= 55296 && value <= 56319 && counter < length) { + extra = string.charCodeAt(counter++); + if ((extra & 64512) == 56320) { + output.push(((value & 1023) << 10) + (extra & 1023) + 65536); + } else { + output.push(value); + counter--; + } + } else { + output.push(value); + } + } + return output; + } + function ucs2encode(array) { + return map(array, function(value) { + var output = ""; + if (value > 65535) { + value -= 65536; + output += stringFromCharCode(value >>> 10 & 1023 | 55296); + value = 56320 | value & 1023; + } + output += stringFromCharCode(value); + return output; + }).join(""); + } + function basicToDigit(codePoint) { + if (codePoint - 48 < 10) { + return codePoint - 22; + } + if (codePoint - 65 < 26) { + return codePoint - 65; + } + if (codePoint - 97 < 26) { + return codePoint - 97; + } + return base; + } + function digitToBasic(digit, flag) { + return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5); + } + function adapt(delta, numPoints, firstTime) { + var k = 0; + delta = firstTime ? floor(delta / damp) : delta >> 1; + delta += floor(delta / numPoints); + for (; delta > baseMinusTMin * tMax >> 1; k += base) { + delta = floor(delta / baseMinusTMin); + } + return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); + } + function decode(input) { + var output = [], inputLength = input.length, out, i = 0, n = initialN, bias = initialBias, basic, j, index, oldi, w, k, digit, t, baseMinusT; + basic = input.lastIndexOf(delimiter); + if (basic < 0) { + basic = 0; + } + for (j = 0; j < basic; ++j) { + if (input.charCodeAt(j) >= 128) { + error("not-basic"); + } + output.push(input.charCodeAt(j)); + } + for (index = basic > 0 ? basic + 1 : 0; index < inputLength; ) { + for (oldi = i, w = 1, k = base; ; k += base) { + if (index >= inputLength) { + error("invalid-input"); + } + digit = basicToDigit(input.charCodeAt(index++)); + if (digit >= base || digit > floor((maxInt - i) / w)) { + error("overflow"); + } + i += digit * w; + t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias; + if (digit < t) { + break; + } + baseMinusT = base - t; + if (w > floor(maxInt / baseMinusT)) { + error("overflow"); + } + w *= baseMinusT; + } + out = output.length + 1; + bias = adapt(i - oldi, out, oldi == 0); + if (floor(i / out) > maxInt - n) { + error("overflow"); + } + n += floor(i / out); + i %= out; + output.splice(i++, 0, n); + } + return ucs2encode(output); + } + function encode(input) { + var n, delta, handledCPCount, basicLength, bias, j, m, q, k, t, currentValue, output = [], inputLength, handledCPCountPlusOne, baseMinusT, qMinusT; + input = ucs2decode(input); + inputLength = input.length; + n = initialN; + delta = 0; + bias = initialBias; + for (j = 0; j < inputLength; ++j) { + currentValue = input[j]; + if (currentValue < 128) { + output.push(stringFromCharCode(currentValue)); + } + } + handledCPCount = basicLength = output.length; + if (basicLength) { + output.push(delimiter); + } + while (handledCPCount < inputLength) { + for (m = maxInt, j = 0; j < inputLength; ++j) { + currentValue = input[j]; + if (currentValue >= n && currentValue < m) { + m = currentValue; + } + } + handledCPCountPlusOne = handledCPCount + 1; + if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) { + error("overflow"); + } + delta += (m - n) * handledCPCountPlusOne; + n = m; + for (j = 0; j < inputLength; ++j) { + currentValue = input[j]; + if (currentValue < n && ++delta > maxInt) { + error("overflow"); + } + if (currentValue == n) { + for (q = delta, k = base; ; k += base) { + t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias; + if (q < t) { + break; + } + qMinusT = q - t; + baseMinusT = base - t; + output.push( + stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0)) + ); + q = floor(qMinusT / baseMinusT); + } + output.push(stringFromCharCode(digitToBasic(q, 0))); + bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength); + delta = 0; + ++handledCPCount; + } + } + ++delta; + ++n; + } + return output.join(""); + } + function toUnicode(input) { + return mapDomain(input, function(string) { + return regexPunycode.test(string) ? decode(string.slice(4).toLowerCase()) : string; + }); + } + function toASCII(input) { + return mapDomain(input, function(string) { + return regexNonASCII.test(string) ? "xn--" + encode(string) : string; + }); + } + punycode = { + /** + * A string representing the current Punycode.js version number. + * @memberOf punycode + * @type String + */ + "version": "1.4.1", + /** + * An object of methods to convert from JavaScript's internal character + * representation (UCS-2) to Unicode code points, and back. + * @see + * @memberOf punycode + * @type Object + */ + "ucs2": { + "decode": ucs2decode, + "encode": ucs2encode + }, + "decode": decode, + "encode": encode, + "toASCII": toASCII, + "toUnicode": toUnicode + }; + if (typeof define2 == "function" && typeof define2.amd == "object" && define2.amd) { + define2("punycode", function() { + return punycode; + }); + } else if (freeExports && freeModule) { + if (module5.exports == freeExports) { + freeModule.exports = punycode; + } else { + for (key in punycode) { + punycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]); + } + } + } else { + root.punycode = punycode; + } + })(this); + }).call(this, typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}); + }, {}], 71: [function(_dereq_2, module5, exports5) { + "use strict"; + function hasOwnProperty(obj, prop) { + return Object.prototype.hasOwnProperty.call(obj, prop); + } + module5.exports = function(qs, sep, eq, options) { + sep = sep || "&"; + eq = eq || "="; + var obj = {}; + if (typeof qs !== "string" || qs.length === 0) { + return obj; + } + var regexp = /\+/g; + qs = qs.split(sep); + var maxKeys = 1e3; + if (options && typeof options.maxKeys === "number") { + maxKeys = options.maxKeys; + } + var len = qs.length; + if (maxKeys > 0 && len > maxKeys) { + len = maxKeys; + } + for (var i = 0; i < len; ++i) { + var x = qs[i].replace(regexp, "%20"), idx = x.indexOf(eq), kstr, vstr, k, v; + if (idx >= 0) { + kstr = x.substr(0, idx); + vstr = x.substr(idx + 1); + } else { + kstr = x; + vstr = ""; + } + k = decodeURIComponent(kstr); + v = decodeURIComponent(vstr); + if (!hasOwnProperty(obj, k)) { + obj[k] = v; + } else if (isArray(obj[k])) { + obj[k].push(v); + } else { + obj[k] = [obj[k], v]; + } + } + return obj; + }; + var isArray = Array.isArray || function(xs) { + return Object.prototype.toString.call(xs) === "[object Array]"; + }; + }, {}], 72: [function(_dereq_2, module5, exports5) { + "use strict"; + var stringifyPrimitive = function(v) { + switch (typeof v) { + case "string": + return v; + case "boolean": + return v ? "true" : "false"; + case "number": + return isFinite(v) ? v : ""; + default: + return ""; + } + }; + module5.exports = function(obj, sep, eq, name) { + sep = sep || "&"; + eq = eq || "="; + if (obj === null) { + obj = void 0; + } + if (typeof obj === "object") { + return map(objectKeys(obj), function(k) { + var ks = encodeURIComponent(stringifyPrimitive(k)) + eq; + if (isArray(obj[k])) { + return map(obj[k], function(v) { + return ks + encodeURIComponent(stringifyPrimitive(v)); + }).join(sep); + } else { + return ks + encodeURIComponent(stringifyPrimitive(obj[k])); + } + }).join(sep); + } + if (!name) return ""; + return encodeURIComponent(stringifyPrimitive(name)) + eq + encodeURIComponent(stringifyPrimitive(obj)); + }; + var isArray = Array.isArray || function(xs) { + return Object.prototype.toString.call(xs) === "[object Array]"; + }; + function map(xs, f) { + if (xs.map) return xs.map(f); + var res = []; + for (var i = 0; i < xs.length; i++) { + res.push(f(xs[i], i)); + } + return res; + } + var objectKeys = Object.keys || function(obj) { + var res = []; + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) res.push(key); + } + return res; + }; + }, {}], 73: [function(_dereq_2, module5, exports5) { + "use strict"; + exports5.decode = exports5.parse = _dereq_2("./decode"); + exports5.encode = exports5.stringify = _dereq_2("./encode"); + }, { "./decode": 71, "./encode": 72 }], 74: [function(_dereq_2, module5, exports5) { + "use strict"; + var processNextTick = _dereq_2("process-nextick-args"); + var objectKeys = Object.keys || function(obj) { + var keys2 = []; + for (var key in obj) { + keys2.push(key); + } + return keys2; + }; + module5.exports = Duplex; + var util2 = _dereq_2("core-util-is"); + util2.inherits = _dereq_2("inherits"); + var Readable = _dereq_2("./_stream_readable"); + var Writable = _dereq_2("./_stream_writable"); + util2.inherits(Duplex, Readable); + var keys = objectKeys(Writable.prototype); + for (var v = 0; v < keys.length; v++) { + var method = keys[v]; + if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method]; + } + function Duplex(options) { + if (!(this instanceof Duplex)) return new Duplex(options); + Readable.call(this, options); + Writable.call(this, options); + if (options && options.readable === false) this.readable = false; + if (options && options.writable === false) this.writable = false; + this.allowHalfOpen = true; + if (options && options.allowHalfOpen === false) this.allowHalfOpen = false; + this.once("end", onend); + } + function onend() { + if (this.allowHalfOpen || this._writableState.ended) return; + processNextTick(onEndNT, this); + } + function onEndNT(self2) { + self2.end(); + } + Object.defineProperty(Duplex.prototype, "destroyed", { + get: function() { + if (this._readableState === void 0 || this._writableState === void 0) { + return false; + } + return this._readableState.destroyed && this._writableState.destroyed; + }, + set: function(value) { + if (this._readableState === void 0 || this._writableState === void 0) { + return; + } + this._readableState.destroyed = value; + this._writableState.destroyed = value; + } + }); + Duplex.prototype._destroy = function(err, cb) { + this.push(null); + this.end(); + processNextTick(cb, err); + }; + function forEach(xs, f) { + for (var i = 0, l = xs.length; i < l; i++) { + f(xs[i], i); + } + } + }, { "./_stream_readable": 76, "./_stream_writable": 78, "core-util-is": 26, "inherits": 33, "process-nextick-args": 68 }], 75: [function(_dereq_2, module5, exports5) { + "use strict"; + module5.exports = PassThrough; + var Transform = _dereq_2("./_stream_transform"); + var util2 = _dereq_2("core-util-is"); + util2.inherits = _dereq_2("inherits"); + util2.inherits(PassThrough, Transform); + function PassThrough(options) { + if (!(this instanceof PassThrough)) return new PassThrough(options); + Transform.call(this, options); + } + PassThrough.prototype._transform = function(chunk, encoding, cb) { + cb(null, chunk); + }; + }, { "./_stream_transform": 77, "core-util-is": 26, "inherits": 33 }], 76: [function(_dereq_2, module5, exports5) { + (function(process2, global2) { + "use strict"; + var processNextTick = _dereq_2("process-nextick-args"); + module5.exports = Readable; + var isArray = _dereq_2("isarray"); + var Duplex; + Readable.ReadableState = ReadableState; + var EE = _dereq_2("events").EventEmitter; + var EElistenerCount = function(emitter, type) { + return emitter.listeners(type).length; + }; + var Stream = _dereq_2("./internal/streams/stream"); + var Buffer2 = _dereq_2("safe-buffer").Buffer; + var OurUint8Array = global2.Uint8Array || function() { + }; + function _uint8ArrayToBuffer(chunk) { + return Buffer2.from(chunk); + } + function _isUint8Array(obj) { + return Buffer2.isBuffer(obj) || obj instanceof OurUint8Array; + } + var util2 = _dereq_2("core-util-is"); + util2.inherits = _dereq_2("inherits"); + var debugUtil = _dereq_2("util"); + var debug = void 0; + if (debugUtil && debugUtil.debuglog) { + debug = debugUtil.debuglog("stream"); + } else { + debug = function() { + }; + } + var BufferList = _dereq_2("./internal/streams/BufferList"); + var destroyImpl = _dereq_2("./internal/streams/destroy"); + var StringDecoder; + util2.inherits(Readable, Stream); + var kProxyEvents = ["error", "close", "destroy", "pause", "resume"]; + function prependListener(emitter, event, fn) { + if (typeof emitter.prependListener === "function") { + return emitter.prependListener(event, fn); + } else { + if (!emitter._events || !emitter._events[event]) emitter.on(event, fn); + else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn); + else emitter._events[event] = [fn, emitter._events[event]]; + } + } + function ReadableState(options, stream) { + Duplex = Duplex || _dereq_2("./_stream_duplex"); + options = options || {}; + this.objectMode = !!options.objectMode; + if (stream instanceof Duplex) this.objectMode = this.objectMode || !!options.readableObjectMode; + var hwm = options.highWaterMark; + var defaultHwm = this.objectMode ? 16 : 16 * 1024; + this.highWaterMark = hwm || hwm === 0 ? hwm : defaultHwm; + this.highWaterMark = Math.floor(this.highWaterMark); + this.buffer = new BufferList(); + this.length = 0; + this.pipes = null; + this.pipesCount = 0; + this.flowing = null; + this.ended = false; + this.endEmitted = false; + this.reading = false; + this.sync = true; + this.needReadable = false; + this.emittedReadable = false; + this.readableListening = false; + this.resumeScheduled = false; + this.destroyed = false; + this.defaultEncoding = options.defaultEncoding || "utf8"; + this.awaitDrain = 0; + this.readingMore = false; + this.decoder = null; + this.encoding = null; + if (options.encoding) { + if (!StringDecoder) StringDecoder = _dereq_2("string_decoder/").StringDecoder; + this.decoder = new StringDecoder(options.encoding); + this.encoding = options.encoding; + } + } + function Readable(options) { + Duplex = Duplex || _dereq_2("./_stream_duplex"); + if (!(this instanceof Readable)) return new Readable(options); + this._readableState = new ReadableState(options, this); + this.readable = true; + if (options) { + if (typeof options.read === "function") this._read = options.read; + if (typeof options.destroy === "function") this._destroy = options.destroy; + } + Stream.call(this); + } + Object.defineProperty(Readable.prototype, "destroyed", { + get: function() { + if (this._readableState === void 0) { + return false; + } + return this._readableState.destroyed; + }, + set: function(value) { + if (!this._readableState) { + return; + } + this._readableState.destroyed = value; + } + }); + Readable.prototype.destroy = destroyImpl.destroy; + Readable.prototype._undestroy = destroyImpl.undestroy; + Readable.prototype._destroy = function(err, cb) { + this.push(null); + cb(err); + }; + Readable.prototype.push = function(chunk, encoding) { + var state = this._readableState; + var skipChunkCheck; + if (!state.objectMode) { + if (typeof chunk === "string") { + encoding = encoding || state.defaultEncoding; + if (encoding !== state.encoding) { + chunk = Buffer2.from(chunk, encoding); + encoding = ""; + } + skipChunkCheck = true; + } + } else { + skipChunkCheck = true; + } + return readableAddChunk(this, chunk, encoding, false, skipChunkCheck); + }; + Readable.prototype.unshift = function(chunk) { + return readableAddChunk(this, chunk, null, true, false); + }; + function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) { + var state = stream._readableState; + if (chunk === null) { + state.reading = false; + onEofChunk(stream, state); + } else { + var er; + if (!skipChunkCheck) er = chunkInvalid(state, chunk); + if (er) { + stream.emit("error", er); + } else if (state.objectMode || chunk && chunk.length > 0) { + if (typeof chunk !== "string" && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer2.prototype) { + chunk = _uint8ArrayToBuffer(chunk); + } + if (addToFront) { + if (state.endEmitted) stream.emit("error", new Error("stream.unshift() after end event")); + else addChunk(stream, state, chunk, true); + } else if (state.ended) { + stream.emit("error", new Error("stream.push() after EOF")); + } else { + state.reading = false; + if (state.decoder && !encoding) { + chunk = state.decoder.write(chunk); + if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false); + else maybeReadMore(stream, state); + } else { + addChunk(stream, state, chunk, false); + } + } + } else if (!addToFront) { + state.reading = false; + } + } + return needMoreData(state); + } + function addChunk(stream, state, chunk, addToFront) { + if (state.flowing && state.length === 0 && !state.sync) { + stream.emit("data", chunk); + stream.read(0); + } else { + state.length += state.objectMode ? 1 : chunk.length; + if (addToFront) state.buffer.unshift(chunk); + else state.buffer.push(chunk); + if (state.needReadable) emitReadable(stream); + } + maybeReadMore(stream, state); + } + function chunkInvalid(state, chunk) { + var er; + if (!_isUint8Array(chunk) && typeof chunk !== "string" && chunk !== void 0 && !state.objectMode) { + er = new TypeError("Invalid non-string/buffer chunk"); + } + return er; + } + function needMoreData(state) { + return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0); + } + Readable.prototype.isPaused = function() { + return this._readableState.flowing === false; + }; + Readable.prototype.setEncoding = function(enc) { + if (!StringDecoder) StringDecoder = _dereq_2("string_decoder/").StringDecoder; + this._readableState.decoder = new StringDecoder(enc); + this._readableState.encoding = enc; + return this; + }; + var MAX_HWM = 8388608; + function computeNewHighWaterMark(n) { + if (n >= MAX_HWM) { + n = MAX_HWM; + } else { + n--; + n |= n >>> 1; + n |= n >>> 2; + n |= n >>> 4; + n |= n >>> 8; + n |= n >>> 16; + n++; + } + return n; + } + function howMuchToRead(n, state) { + if (n <= 0 || state.length === 0 && state.ended) return 0; + if (state.objectMode) return 1; + if (n !== n) { + if (state.flowing && state.length) return state.buffer.head.data.length; + else return state.length; + } + if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n); + if (n <= state.length) return n; + if (!state.ended) { + state.needReadable = true; + return 0; + } + return state.length; + } + Readable.prototype.read = function(n) { + debug("read", n); + n = parseInt(n, 10); + var state = this._readableState; + var nOrig = n; + if (n !== 0) state.emittedReadable = false; + if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) { + debug("read: emitReadable", state.length, state.ended); + if (state.length === 0 && state.ended) endReadable(this); + else emitReadable(this); + return null; + } + n = howMuchToRead(n, state); + if (n === 0 && state.ended) { + if (state.length === 0) endReadable(this); + return null; + } + var doRead = state.needReadable; + debug("need readable", doRead); + if (state.length === 0 || state.length - n < state.highWaterMark) { + doRead = true; + debug("length less than watermark", doRead); + } + if (state.ended || state.reading) { + doRead = false; + debug("reading or ended", doRead); + } else if (doRead) { + debug("do read"); + state.reading = true; + state.sync = true; + if (state.length === 0) state.needReadable = true; + this._read(state.highWaterMark); + state.sync = false; + if (!state.reading) n = howMuchToRead(nOrig, state); + } + var ret; + if (n > 0) ret = fromList(n, state); + else ret = null; + if (ret === null) { + state.needReadable = true; + n = 0; + } else { + state.length -= n; + } + if (state.length === 0) { + if (!state.ended) state.needReadable = true; + if (nOrig !== n && state.ended) endReadable(this); + } + if (ret !== null) this.emit("data", ret); + return ret; + }; + function onEofChunk(stream, state) { + if (state.ended) return; + if (state.decoder) { + var chunk = state.decoder.end(); + if (chunk && chunk.length) { + state.buffer.push(chunk); + state.length += state.objectMode ? 1 : chunk.length; + } + } + state.ended = true; + emitReadable(stream); + } + function emitReadable(stream) { + var state = stream._readableState; + state.needReadable = false; + if (!state.emittedReadable) { + debug("emitReadable", state.flowing); + state.emittedReadable = true; + if (state.sync) processNextTick(emitReadable_, stream); + else emitReadable_(stream); + } + } + function emitReadable_(stream) { + debug("emit readable"); + stream.emit("readable"); + flow(stream); + } + function maybeReadMore(stream, state) { + if (!state.readingMore) { + state.readingMore = true; + processNextTick(maybeReadMore_, stream, state); + } + } + function maybeReadMore_(stream, state) { + var len = state.length; + while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) { + debug("maybeReadMore read 0"); + stream.read(0); + if (len === state.length) + break; + else len = state.length; + } + state.readingMore = false; + } + Readable.prototype._read = function(n) { + this.emit("error", new Error("_read() is not implemented")); + }; + Readable.prototype.pipe = function(dest, pipeOpts) { + var src = this; + var state = this._readableState; + switch (state.pipesCount) { + case 0: + state.pipes = dest; + break; + case 1: + state.pipes = [state.pipes, dest]; + break; + default: + state.pipes.push(dest); + break; + } + state.pipesCount += 1; + debug("pipe count=%d opts=%j", state.pipesCount, pipeOpts); + var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process2.stdout && dest !== process2.stderr; + var endFn = doEnd ? onend : unpipe; + if (state.endEmitted) processNextTick(endFn); + else src.once("end", endFn); + dest.on("unpipe", onunpipe); + function onunpipe(readable, unpipeInfo) { + debug("onunpipe"); + if (readable === src) { + if (unpipeInfo && unpipeInfo.hasUnpiped === false) { + unpipeInfo.hasUnpiped = true; + cleanup(); + } + } + } + function onend() { + debug("onend"); + dest.end(); + } + var ondrain = pipeOnDrain(src); + dest.on("drain", ondrain); + var cleanedUp = false; + function cleanup() { + debug("cleanup"); + dest.removeListener("close", onclose); + dest.removeListener("finish", onfinish); + dest.removeListener("drain", ondrain); + dest.removeListener("error", onerror); + dest.removeListener("unpipe", onunpipe); + src.removeListener("end", onend); + src.removeListener("end", unpipe); + src.removeListener("data", ondata); + cleanedUp = true; + if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain(); + } + var increasedAwaitDrain = false; + src.on("data", ondata); + function ondata(chunk) { + debug("ondata"); + increasedAwaitDrain = false; + var ret = dest.write(chunk); + if (false === ret && !increasedAwaitDrain) { + if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) { + debug("false write response, pause", src._readableState.awaitDrain); + src._readableState.awaitDrain++; + increasedAwaitDrain = true; + } + src.pause(); + } + } + function onerror(er) { + debug("onerror", er); + unpipe(); + dest.removeListener("error", onerror); + if (EElistenerCount(dest, "error") === 0) dest.emit("error", er); + } + prependListener(dest, "error", onerror); + function onclose() { + dest.removeListener("finish", onfinish); + unpipe(); + } + dest.once("close", onclose); + function onfinish() { + debug("onfinish"); + dest.removeListener("close", onclose); + unpipe(); + } + dest.once("finish", onfinish); + function unpipe() { + debug("unpipe"); + src.unpipe(dest); + } + dest.emit("pipe", src); + if (!state.flowing) { + debug("pipe resume"); + src.resume(); + } + return dest; + }; + function pipeOnDrain(src) { + return function() { + var state = src._readableState; + debug("pipeOnDrain", state.awaitDrain); + if (state.awaitDrain) state.awaitDrain--; + if (state.awaitDrain === 0 && EElistenerCount(src, "data")) { + state.flowing = true; + flow(src); + } + }; + } + Readable.prototype.unpipe = function(dest) { + var state = this._readableState; + var unpipeInfo = { hasUnpiped: false }; + if (state.pipesCount === 0) return this; + if (state.pipesCount === 1) { + if (dest && dest !== state.pipes) return this; + if (!dest) dest = state.pipes; + state.pipes = null; + state.pipesCount = 0; + state.flowing = false; + if (dest) dest.emit("unpipe", this, unpipeInfo); + return this; + } + if (!dest) { + var dests = state.pipes; + var len = state.pipesCount; + state.pipes = null; + state.pipesCount = 0; + state.flowing = false; + for (var i = 0; i < len; i++) { + dests[i].emit("unpipe", this, unpipeInfo); + } + return this; + } + var index = indexOf(state.pipes, dest); + if (index === -1) return this; + state.pipes.splice(index, 1); + state.pipesCount -= 1; + if (state.pipesCount === 1) state.pipes = state.pipes[0]; + dest.emit("unpipe", this, unpipeInfo); + return this; + }; + Readable.prototype.on = function(ev, fn) { + var res = Stream.prototype.on.call(this, ev, fn); + if (ev === "data") { + if (this._readableState.flowing !== false) this.resume(); + } else if (ev === "readable") { + var state = this._readableState; + if (!state.endEmitted && !state.readableListening) { + state.readableListening = state.needReadable = true; + state.emittedReadable = false; + if (!state.reading) { + processNextTick(nReadingNextTick, this); + } else if (state.length) { + emitReadable(this); + } + } + } + return res; + }; + Readable.prototype.addListener = Readable.prototype.on; + function nReadingNextTick(self2) { + debug("readable nexttick read 0"); + self2.read(0); + } + Readable.prototype.resume = function() { + var state = this._readableState; + if (!state.flowing) { + debug("resume"); + state.flowing = true; + resume(this, state); + } + return this; + }; + function resume(stream, state) { + if (!state.resumeScheduled) { + state.resumeScheduled = true; + processNextTick(resume_, stream, state); + } + } + function resume_(stream, state) { + if (!state.reading) { + debug("resume read 0"); + stream.read(0); + } + state.resumeScheduled = false; + state.awaitDrain = 0; + stream.emit("resume"); + flow(stream); + if (state.flowing && !state.reading) stream.read(0); + } + Readable.prototype.pause = function() { + debug("call pause flowing=%j", this._readableState.flowing); + if (false !== this._readableState.flowing) { + debug("pause"); + this._readableState.flowing = false; + this.emit("pause"); + } + return this; + }; + function flow(stream) { + var state = stream._readableState; + debug("flow", state.flowing); + while (state.flowing && stream.read() !== null) { + } + } + Readable.prototype.wrap = function(stream) { + var state = this._readableState; + var paused = false; + var self2 = this; + stream.on("end", function() { + debug("wrapped end"); + if (state.decoder && !state.ended) { + var chunk = state.decoder.end(); + if (chunk && chunk.length) self2.push(chunk); + } + self2.push(null); + }); + stream.on("data", function(chunk) { + debug("wrapped data"); + if (state.decoder) chunk = state.decoder.write(chunk); + if (state.objectMode && (chunk === null || chunk === void 0)) return; + else if (!state.objectMode && (!chunk || !chunk.length)) return; + var ret = self2.push(chunk); + if (!ret) { + paused = true; + stream.pause(); + } + }); + for (var i in stream) { + if (this[i] === void 0 && typeof stream[i] === "function") { + this[i] = /* @__PURE__ */ function(method) { + return function() { + return stream[method].apply(stream, arguments); + }; + }(i); + } + } + for (var n = 0; n < kProxyEvents.length; n++) { + stream.on(kProxyEvents[n], self2.emit.bind(self2, kProxyEvents[n])); + } + self2._read = function(n2) { + debug("wrapped _read", n2); + if (paused) { + paused = false; + stream.resume(); + } + }; + return self2; + }; + Readable._fromList = fromList; + function fromList(n, state) { + if (state.length === 0) return null; + var ret; + if (state.objectMode) ret = state.buffer.shift(); + else if (!n || n >= state.length) { + if (state.decoder) ret = state.buffer.join(""); + else if (state.buffer.length === 1) ret = state.buffer.head.data; + else ret = state.buffer.concat(state.length); + state.buffer.clear(); + } else { + ret = fromListPartial(n, state.buffer, state.decoder); + } + return ret; + } + function fromListPartial(n, list, hasStrings) { + var ret; + if (n < list.head.data.length) { + ret = list.head.data.slice(0, n); + list.head.data = list.head.data.slice(n); + } else if (n === list.head.data.length) { + ret = list.shift(); + } else { + ret = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list); + } + return ret; + } + function copyFromBufferString(n, list) { + var p = list.head; + var c = 1; + var ret = p.data; + n -= ret.length; + while (p = p.next) { + var str = p.data; + var nb = n > str.length ? str.length : n; + if (nb === str.length) ret += str; + else ret += str.slice(0, n); + n -= nb; + if (n === 0) { + if (nb === str.length) { + ++c; + if (p.next) list.head = p.next; + else list.head = list.tail = null; + } else { + list.head = p; + p.data = str.slice(nb); + } + break; + } + ++c; + } + list.length -= c; + return ret; + } + function copyFromBuffer(n, list) { + var ret = Buffer2.allocUnsafe(n); + var p = list.head; + var c = 1; + p.data.copy(ret); + n -= p.data.length; + while (p = p.next) { + var buf = p.data; + var nb = n > buf.length ? buf.length : n; + buf.copy(ret, ret.length - n, 0, nb); + n -= nb; + if (n === 0) { + if (nb === buf.length) { + ++c; + if (p.next) list.head = p.next; + else list.head = list.tail = null; + } else { + list.head = p; + p.data = buf.slice(nb); + } + break; + } + ++c; + } + list.length -= c; + return ret; + } + function endReadable(stream) { + var state = stream._readableState; + if (state.length > 0) throw new Error('"endReadable()" called on non-empty stream'); + if (!state.endEmitted) { + state.ended = true; + processNextTick(endReadableNT, state, stream); + } + } + function endReadableNT(state, stream) { + if (!state.endEmitted && state.length === 0) { + state.endEmitted = true; + stream.readable = false; + stream.emit("end"); + } + } + function forEach(xs, f) { + for (var i = 0, l = xs.length; i < l; i++) { + f(xs[i], i); + } + } + function indexOf(xs, x) { + for (var i = 0, l = xs.length; i < l; i++) { + if (xs[i] === x) return i; + } + return -1; + } + }).call(this, _dereq_2("_process"), typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}); + }, { "./_stream_duplex": 74, "./internal/streams/BufferList": 79, "./internal/streams/destroy": 80, "./internal/streams/stream": 81, "_process": 69, "core-util-is": 26, "events": 29, "inherits": 33, "isarray": 35, "process-nextick-args": 68, "safe-buffer": 83, "string_decoder/": 88, "util": 22 }], 77: [function(_dereq_2, module5, exports5) { + "use strict"; + module5.exports = Transform; + var Duplex = _dereq_2("./_stream_duplex"); + var util2 = _dereq_2("core-util-is"); + util2.inherits = _dereq_2("inherits"); + util2.inherits(Transform, Duplex); + function TransformState(stream) { + this.afterTransform = function(er, data) { + return afterTransform(stream, er, data); + }; + this.needTransform = false; + this.transforming = false; + this.writecb = null; + this.writechunk = null; + this.writeencoding = null; + } + function afterTransform(stream, er, data) { + var ts = stream._transformState; + ts.transforming = false; + var cb = ts.writecb; + if (!cb) { + return stream.emit("error", new Error("write callback called multiple times")); + } + ts.writechunk = null; + ts.writecb = null; + if (data !== null && data !== void 0) stream.push(data); + cb(er); + var rs = stream._readableState; + rs.reading = false; + if (rs.needReadable || rs.length < rs.highWaterMark) { + stream._read(rs.highWaterMark); + } + } + function Transform(options) { + if (!(this instanceof Transform)) return new Transform(options); + Duplex.call(this, options); + this._transformState = new TransformState(this); + var stream = this; + this._readableState.needReadable = true; + this._readableState.sync = false; + if (options) { + if (typeof options.transform === "function") this._transform = options.transform; + if (typeof options.flush === "function") this._flush = options.flush; + } + this.once("prefinish", function() { + if (typeof this._flush === "function") this._flush(function(er, data) { + done(stream, er, data); + }); + else done(stream); + }); + } + Transform.prototype.push = function(chunk, encoding) { + this._transformState.needTransform = false; + return Duplex.prototype.push.call(this, chunk, encoding); + }; + Transform.prototype._transform = function(chunk, encoding, cb) { + throw new Error("_transform() is not implemented"); + }; + Transform.prototype._write = function(chunk, encoding, cb) { + var ts = this._transformState; + ts.writecb = cb; + ts.writechunk = chunk; + ts.writeencoding = encoding; + if (!ts.transforming) { + var rs = this._readableState; + if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark); + } + }; + Transform.prototype._read = function(n) { + var ts = this._transformState; + if (ts.writechunk !== null && ts.writecb && !ts.transforming) { + ts.transforming = true; + this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform); + } else { + ts.needTransform = true; + } + }; + Transform.prototype._destroy = function(err, cb) { + var _this = this; + Duplex.prototype._destroy.call(this, err, function(err2) { + cb(err2); + _this.emit("close"); + }); + }; + function done(stream, er, data) { + if (er) return stream.emit("error", er); + if (data !== null && data !== void 0) stream.push(data); + var ws = stream._writableState; + var ts = stream._transformState; + if (ws.length) throw new Error("Calling transform done when ws.length != 0"); + if (ts.transforming) throw new Error("Calling transform done when still transforming"); + return stream.push(null); + } + }, { "./_stream_duplex": 74, "core-util-is": 26, "inherits": 33 }], 78: [function(_dereq_2, module5, exports5) { + (function(process2, global2) { + "use strict"; + var processNextTick = _dereq_2("process-nextick-args"); + module5.exports = Writable; + function WriteReq(chunk, encoding, cb) { + this.chunk = chunk; + this.encoding = encoding; + this.callback = cb; + this.next = null; + } + function CorkedRequest(state) { + var _this = this; + this.next = null; + this.entry = null; + this.finish = function() { + onCorkedFinish(_this, state); + }; + } + var asyncWrite = !process2.browser && ["v0.10", "v0.9."].indexOf(process2.version.slice(0, 5)) > -1 ? setImmediate : processNextTick; + var Duplex; + Writable.WritableState = WritableState; + var util2 = _dereq_2("core-util-is"); + util2.inherits = _dereq_2("inherits"); + var internalUtil = { + deprecate: _dereq_2("util-deprecate") + }; + var Stream = _dereq_2("./internal/streams/stream"); + var Buffer2 = _dereq_2("safe-buffer").Buffer; + var OurUint8Array = global2.Uint8Array || function() { + }; + function _uint8ArrayToBuffer(chunk) { + return Buffer2.from(chunk); + } + function _isUint8Array(obj) { + return Buffer2.isBuffer(obj) || obj instanceof OurUint8Array; + } + var destroyImpl = _dereq_2("./internal/streams/destroy"); + util2.inherits(Writable, Stream); + function nop() { + } + function WritableState(options, stream) { + Duplex = Duplex || _dereq_2("./_stream_duplex"); + options = options || {}; + this.objectMode = !!options.objectMode; + if (stream instanceof Duplex) this.objectMode = this.objectMode || !!options.writableObjectMode; + var hwm = options.highWaterMark; + var defaultHwm = this.objectMode ? 16 : 16 * 1024; + this.highWaterMark = hwm || hwm === 0 ? hwm : defaultHwm; + this.highWaterMark = Math.floor(this.highWaterMark); + this.finalCalled = false; + this.needDrain = false; + this.ending = false; + this.ended = false; + this.finished = false; + this.destroyed = false; + var noDecode = options.decodeStrings === false; + this.decodeStrings = !noDecode; + this.defaultEncoding = options.defaultEncoding || "utf8"; + this.length = 0; + this.writing = false; + this.corked = 0; + this.sync = true; + this.bufferProcessing = false; + this.onwrite = function(er) { + onwrite(stream, er); + }; + this.writecb = null; + this.writelen = 0; + this.bufferedRequest = null; + this.lastBufferedRequest = null; + this.pendingcb = 0; + this.prefinished = false; + this.errorEmitted = false; + this.bufferedRequestCount = 0; + this.corkedRequestsFree = new CorkedRequest(this); + } + WritableState.prototype.getBuffer = function getBuffer() { + var current = this.bufferedRequest; + var out = []; + while (current) { + out.push(current); + current = current.next; + } + return out; + }; + (function() { + try { + Object.defineProperty(WritableState.prototype, "buffer", { + get: internalUtil.deprecate(function() { + return this.getBuffer(); + }, "_writableState.buffer is deprecated. Use _writableState.getBuffer instead.", "DEP0003") + }); + } catch (_3) { + } + })(); + var realHasInstance; + if (typeof Symbol === "function" && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === "function") { + realHasInstance = Function.prototype[Symbol.hasInstance]; + Object.defineProperty(Writable, Symbol.hasInstance, { + value: function(object) { + if (realHasInstance.call(this, object)) return true; + return object && object._writableState instanceof WritableState; + } + }); + } else { + realHasInstance = function(object) { + return object instanceof this; + }; + } + function Writable(options) { + Duplex = Duplex || _dereq_2("./_stream_duplex"); + if (!realHasInstance.call(Writable, this) && !(this instanceof Duplex)) { + return new Writable(options); + } + this._writableState = new WritableState(options, this); + this.writable = true; + if (options) { + if (typeof options.write === "function") this._write = options.write; + if (typeof options.writev === "function") this._writev = options.writev; + if (typeof options.destroy === "function") this._destroy = options.destroy; + if (typeof options.final === "function") this._final = options.final; + } + Stream.call(this); + } + Writable.prototype.pipe = function() { + this.emit("error", new Error("Cannot pipe, not readable")); + }; + function writeAfterEnd(stream, cb) { + var er = new Error("write after end"); + stream.emit("error", er); + processNextTick(cb, er); + } + function validChunk(stream, state, chunk, cb) { + var valid = true; + var er = false; + if (chunk === null) { + er = new TypeError("May not write null values to stream"); + } else if (typeof chunk !== "string" && chunk !== void 0 && !state.objectMode) { + er = new TypeError("Invalid non-string/buffer chunk"); + } + if (er) { + stream.emit("error", er); + processNextTick(cb, er); + valid = false; + } + return valid; + } + Writable.prototype.write = function(chunk, encoding, cb) { + var state = this._writableState; + var ret = false; + var isBuf = _isUint8Array(chunk) && !state.objectMode; + if (isBuf && !Buffer2.isBuffer(chunk)) { + chunk = _uint8ArrayToBuffer(chunk); + } + if (typeof encoding === "function") { + cb = encoding; + encoding = null; + } + if (isBuf) encoding = "buffer"; + else if (!encoding) encoding = state.defaultEncoding; + if (typeof cb !== "function") cb = nop; + if (state.ended) writeAfterEnd(this, cb); + else if (isBuf || validChunk(this, state, chunk, cb)) { + state.pendingcb++; + ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb); + } + return ret; + }; + Writable.prototype.cork = function() { + var state = this._writableState; + state.corked++; + }; + Writable.prototype.uncork = function() { + var state = this._writableState; + if (state.corked) { + state.corked--; + if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state); + } + }; + Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) { + if (typeof encoding === "string") encoding = encoding.toLowerCase(); + if (!(["hex", "utf8", "utf-8", "ascii", "binary", "base64", "ucs2", "ucs-2", "utf16le", "utf-16le", "raw"].indexOf((encoding + "").toLowerCase()) > -1)) throw new TypeError("Unknown encoding: " + encoding); + this._writableState.defaultEncoding = encoding; + return this; + }; + function decodeChunk(state, chunk, encoding) { + if (!state.objectMode && state.decodeStrings !== false && typeof chunk === "string") { + chunk = Buffer2.from(chunk, encoding); + } + return chunk; + } + function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) { + if (!isBuf) { + var newChunk = decodeChunk(state, chunk, encoding); + if (chunk !== newChunk) { + isBuf = true; + encoding = "buffer"; + chunk = newChunk; + } + } + var len = state.objectMode ? 1 : chunk.length; + state.length += len; + var ret = state.length < state.highWaterMark; + if (!ret) state.needDrain = true; + if (state.writing || state.corked) { + var last = state.lastBufferedRequest; + state.lastBufferedRequest = { + chunk, + encoding, + isBuf, + callback: cb, + next: null + }; + if (last) { + last.next = state.lastBufferedRequest; + } else { + state.bufferedRequest = state.lastBufferedRequest; + } + state.bufferedRequestCount += 1; + } else { + doWrite(stream, state, false, len, chunk, encoding, cb); + } + return ret; + } + function doWrite(stream, state, writev, len, chunk, encoding, cb) { + state.writelen = len; + state.writecb = cb; + state.writing = true; + state.sync = true; + if (writev) stream._writev(chunk, state.onwrite); + else stream._write(chunk, encoding, state.onwrite); + state.sync = false; + } + function onwriteError(stream, state, sync, er, cb) { + --state.pendingcb; + if (sync) { + processNextTick(cb, er); + processNextTick(finishMaybe, stream, state); + stream._writableState.errorEmitted = true; + stream.emit("error", er); + } else { + cb(er); + stream._writableState.errorEmitted = true; + stream.emit("error", er); + finishMaybe(stream, state); + } + } + function onwriteStateUpdate(state) { + state.writing = false; + state.writecb = null; + state.length -= state.writelen; + state.writelen = 0; + } + function onwrite(stream, er) { + var state = stream._writableState; + var sync = state.sync; + var cb = state.writecb; + onwriteStateUpdate(state); + if (er) onwriteError(stream, state, sync, er, cb); + else { + var finished = needFinish(state); + if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) { + clearBuffer(stream, state); + } + if (sync) { + asyncWrite(afterWrite, stream, state, finished, cb); + } else { + afterWrite(stream, state, finished, cb); + } + } + } + function afterWrite(stream, state, finished, cb) { + if (!finished) onwriteDrain(stream, state); + state.pendingcb--; + cb(); + finishMaybe(stream, state); + } + function onwriteDrain(stream, state) { + if (state.length === 0 && state.needDrain) { + state.needDrain = false; + stream.emit("drain"); + } + } + function clearBuffer(stream, state) { + state.bufferProcessing = true; + var entry = state.bufferedRequest; + if (stream._writev && entry && entry.next) { + var l = state.bufferedRequestCount; + var buffer = new Array(l); + var holder = state.corkedRequestsFree; + holder.entry = entry; + var count = 0; + var allBuffers = true; + while (entry) { + buffer[count] = entry; + if (!entry.isBuf) allBuffers = false; + entry = entry.next; + count += 1; + } + buffer.allBuffers = allBuffers; + doWrite(stream, state, true, state.length, buffer, "", holder.finish); + state.pendingcb++; + state.lastBufferedRequest = null; + if (holder.next) { + state.corkedRequestsFree = holder.next; + holder.next = null; + } else { + state.corkedRequestsFree = new CorkedRequest(state); + } + } else { + while (entry) { + var chunk = entry.chunk; + var encoding = entry.encoding; + var cb = entry.callback; + var len = state.objectMode ? 1 : chunk.length; + doWrite(stream, state, false, len, chunk, encoding, cb); + entry = entry.next; + if (state.writing) { + break; + } + } + if (entry === null) state.lastBufferedRequest = null; + } + state.bufferedRequestCount = 0; + state.bufferedRequest = entry; + state.bufferProcessing = false; + } + Writable.prototype._write = function(chunk, encoding, cb) { + cb(new Error("_write() is not implemented")); + }; + Writable.prototype._writev = null; + Writable.prototype.end = function(chunk, encoding, cb) { + var state = this._writableState; + if (typeof chunk === "function") { + cb = chunk; + chunk = null; + encoding = null; + } else if (typeof encoding === "function") { + cb = encoding; + encoding = null; + } + if (chunk !== null && chunk !== void 0) this.write(chunk, encoding); + if (state.corked) { + state.corked = 1; + this.uncork(); + } + if (!state.ending && !state.finished) endWritable(this, state, cb); + }; + function needFinish(state) { + return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing; + } + function callFinal(stream, state) { + stream._final(function(err) { + state.pendingcb--; + if (err) { + stream.emit("error", err); + } + state.prefinished = true; + stream.emit("prefinish"); + finishMaybe(stream, state); + }); + } + function prefinish(stream, state) { + if (!state.prefinished && !state.finalCalled) { + if (typeof stream._final === "function") { + state.pendingcb++; + state.finalCalled = true; + processNextTick(callFinal, stream, state); + } else { + state.prefinished = true; + stream.emit("prefinish"); + } + } + } + function finishMaybe(stream, state) { + var need = needFinish(state); + if (need) { + prefinish(stream, state); + if (state.pendingcb === 0) { + state.finished = true; + stream.emit("finish"); + } + } + return need; + } + function endWritable(stream, state, cb) { + state.ending = true; + finishMaybe(stream, state); + if (cb) { + if (state.finished) processNextTick(cb); + else stream.once("finish", cb); + } + state.ended = true; + stream.writable = false; + } + function onCorkedFinish(corkReq, state, err) { + var entry = corkReq.entry; + corkReq.entry = null; + while (entry) { + var cb = entry.callback; + state.pendingcb--; + cb(err); + entry = entry.next; + } + if (state.corkedRequestsFree) { + state.corkedRequestsFree.next = corkReq; + } else { + state.corkedRequestsFree = corkReq; + } + } + Object.defineProperty(Writable.prototype, "destroyed", { + get: function() { + if (this._writableState === void 0) { + return false; + } + return this._writableState.destroyed; + }, + set: function(value) { + if (!this._writableState) { + return; + } + this._writableState.destroyed = value; + } + }); + Writable.prototype.destroy = destroyImpl.destroy; + Writable.prototype._undestroy = destroyImpl.undestroy; + Writable.prototype._destroy = function(err, cb) { + this.end(); + cb(err); + }; + }).call(this, _dereq_2("_process"), typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}); + }, { "./_stream_duplex": 74, "./internal/streams/destroy": 80, "./internal/streams/stream": 81, "_process": 69, "core-util-is": 26, "inherits": 33, "process-nextick-args": 68, "safe-buffer": 83, "util-deprecate": 92 }], 79: [function(_dereq_2, module5, exports5) { + "use strict"; + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } + } + var Buffer2 = _dereq_2("safe-buffer").Buffer; + function copyBuffer(src, target, offset) { + src.copy(target, offset); + } + module5.exports = function() { + function BufferList() { + _classCallCheck(this, BufferList); + this.head = null; + this.tail = null; + this.length = 0; + } + BufferList.prototype.push = function push(v) { + var entry = { data: v, next: null }; + if (this.length > 0) this.tail.next = entry; + else this.head = entry; + this.tail = entry; + ++this.length; + }; + BufferList.prototype.unshift = function unshift(v) { + var entry = { data: v, next: this.head }; + if (this.length === 0) this.tail = entry; + this.head = entry; + ++this.length; + }; + BufferList.prototype.shift = function shift() { + if (this.length === 0) return; + var ret = this.head.data; + if (this.length === 1) this.head = this.tail = null; + else this.head = this.head.next; + --this.length; + return ret; + }; + BufferList.prototype.clear = function clear() { + this.head = this.tail = null; + this.length = 0; + }; + BufferList.prototype.join = function join(s) { + if (this.length === 0) return ""; + var p = this.head; + var ret = "" + p.data; + while (p = p.next) { + ret += s + p.data; + } + return ret; + }; + BufferList.prototype.concat = function concat(n) { + if (this.length === 0) return Buffer2.alloc(0); + if (this.length === 1) return this.head.data; + var ret = Buffer2.allocUnsafe(n >>> 0); + var p = this.head; + var i = 0; + while (p) { + copyBuffer(p.data, ret, i); + i += p.data.length; + p = p.next; + } + return ret; + }; + return BufferList; + }(); + }, { "safe-buffer": 83 }], 80: [function(_dereq_2, module5, exports5) { + "use strict"; + var processNextTick = _dereq_2("process-nextick-args"); + function destroy(err, cb) { + var _this = this; + var readableDestroyed = this._readableState && this._readableState.destroyed; + var writableDestroyed = this._writableState && this._writableState.destroyed; + if (readableDestroyed || writableDestroyed) { + if (cb) { + cb(err); + } else if (err && (!this._writableState || !this._writableState.errorEmitted)) { + processNextTick(emitErrorNT, this, err); + } + return; + } + if (this._readableState) { + this._readableState.destroyed = true; + } + if (this._writableState) { + this._writableState.destroyed = true; + } + this._destroy(err || null, function(err2) { + if (!cb && err2) { + processNextTick(emitErrorNT, _this, err2); + if (_this._writableState) { + _this._writableState.errorEmitted = true; + } + } else if (cb) { + cb(err2); + } + }); + } + function undestroy() { + if (this._readableState) { + this._readableState.destroyed = false; + this._readableState.reading = false; + this._readableState.ended = false; + this._readableState.endEmitted = false; + } + if (this._writableState) { + this._writableState.destroyed = false; + this._writableState.ended = false; + this._writableState.ending = false; + this._writableState.finished = false; + this._writableState.errorEmitted = false; + } + } + function emitErrorNT(self2, err) { + self2.emit("error", err); + } + module5.exports = { + destroy, + undestroy + }; + }, { "process-nextick-args": 68 }], 81: [function(_dereq_2, module5, exports5) { + module5.exports = _dereq_2("events").EventEmitter; + }, { "events": 29 }], 82: [function(_dereq_2, module5, exports5) { + exports5 = module5.exports = _dereq_2("./lib/_stream_readable.js"); + exports5.Stream = exports5; + exports5.Readable = exports5; + exports5.Writable = _dereq_2("./lib/_stream_writable.js"); + exports5.Duplex = _dereq_2("./lib/_stream_duplex.js"); + exports5.Transform = _dereq_2("./lib/_stream_transform.js"); + exports5.PassThrough = _dereq_2("./lib/_stream_passthrough.js"); + }, { "./lib/_stream_duplex.js": 74, "./lib/_stream_passthrough.js": 75, "./lib/_stream_readable.js": 76, "./lib/_stream_transform.js": 77, "./lib/_stream_writable.js": 78 }], 83: [function(_dereq_2, module5, exports5) { + var buffer = _dereq_2("buffer"); + var Buffer2 = buffer.Buffer; + function copyProps(src, dst) { + for (var key in src) { + dst[key] = src[key]; + } + } + if (Buffer2.from && Buffer2.alloc && Buffer2.allocUnsafe && Buffer2.allocUnsafeSlow) { + module5.exports = buffer; + } else { + copyProps(buffer, exports5); + exports5.Buffer = SafeBuffer; + } + function SafeBuffer(arg, encodingOrOffset, length) { + return Buffer2(arg, encodingOrOffset, length); + } + copyProps(Buffer2, SafeBuffer); + SafeBuffer.from = function(arg, encodingOrOffset, length) { + if (typeof arg === "number") { + throw new TypeError("Argument must not be a number"); + } + return Buffer2(arg, encodingOrOffset, length); + }; + SafeBuffer.alloc = function(size, fill, encoding) { + if (typeof size !== "number") { + throw new TypeError("Argument must be a number"); + } + var buf = Buffer2(size); + if (fill !== void 0) { + if (typeof encoding === "string") { + buf.fill(fill, encoding); + } else { + buf.fill(fill); + } + } else { + buf.fill(0); + } + return buf; + }; + SafeBuffer.allocUnsafe = function(size) { + if (typeof size !== "number") { + throw new TypeError("Argument must be a number"); + } + return Buffer2(size); + }; + SafeBuffer.allocUnsafeSlow = function(size) { + if (typeof size !== "number") { + throw new TypeError("Argument must be a number"); + } + return buffer.SlowBuffer(size); + }; + }, { "buffer": 23 }], 84: [function(_dereq_2, module5, exports5) { + (function(global2) { + var ClientRequest = _dereq_2("./lib/request"); + var extend = _dereq_2("xtend"); + var statusCodes = _dereq_2("builtin-status-codes"); + var url = _dereq_2("url"); + var http = exports5; + http.request = function(opts, cb) { + if (typeof opts === "string") + opts = url.parse(opts); + else + opts = extend(opts); + var defaultProtocol = global2.location.protocol.search(/^https?:$/) === -1 ? "http:" : ""; + var protocol = opts.protocol || defaultProtocol; + var host = opts.hostname || opts.host; + var port = opts.port; + var path = opts.path || "/"; + if (host && host.indexOf(":") !== -1) + host = "[" + host + "]"; + opts.url = (host ? protocol + "//" + host : "") + (port ? ":" + port : "") + path; + opts.method = (opts.method || "GET").toUpperCase(); + opts.headers = opts.headers || {}; + var req = new ClientRequest(opts); + if (cb) + req.on("response", cb); + return req; + }; + http.get = function get(opts, cb) { + var req = http.request(opts, cb); + req.end(); + return req; + }; + http.Agent = function() { + }; + http.Agent.defaultMaxSockets = 4; + http.STATUS_CODES = statusCodes; + http.METHODS = [ + "CHECKOUT", + "CONNECT", + "COPY", + "DELETE", + "GET", + "HEAD", + "LOCK", + "M-SEARCH", + "MERGE", + "MKACTIVITY", + "MKCOL", + "MOVE", + "NOTIFY", + "OPTIONS", + "PATCH", + "POST", + "PROPFIND", + "PROPPATCH", + "PURGE", + "PUT", + "REPORT", + "SEARCH", + "SUBSCRIBE", + "TRACE", + "UNLOCK", + "UNSUBSCRIBE" + ]; + }).call(this, typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}); + }, { "./lib/request": 86, "builtin-status-codes": 24, "url": 90, "xtend": 93 }], 85: [function(_dereq_2, module5, exports5) { + (function(global2) { + exports5.fetch = isFunction(global2.fetch) && isFunction(global2.ReadableStream); + exports5.blobConstructor = false; + try { + new Blob([new ArrayBuffer(1)]); + exports5.blobConstructor = true; + } catch (e) { + } + var xhr; + function getXHR() { + if (xhr !== void 0) return xhr; + if (global2.XMLHttpRequest) { + xhr = new global2.XMLHttpRequest(); + try { + xhr.open("GET", global2.XDomainRequest ? "/" : "https://example.com"); + } catch (e) { + xhr = null; + } + } else { + xhr = null; + } + return xhr; + } + function checkTypeSupport(type) { + var xhr2 = getXHR(); + if (!xhr2) return false; + try { + xhr2.responseType = type; + return xhr2.responseType === type; + } catch (e) { + } + return false; + } + var haveArrayBuffer = typeof global2.ArrayBuffer !== "undefined"; + var haveSlice = haveArrayBuffer && isFunction(global2.ArrayBuffer.prototype.slice); + exports5.arraybuffer = exports5.fetch || haveArrayBuffer && checkTypeSupport("arraybuffer"); + exports5.msstream = !exports5.fetch && haveSlice && checkTypeSupport("ms-stream"); + exports5.mozchunkedarraybuffer = !exports5.fetch && haveArrayBuffer && checkTypeSupport("moz-chunked-arraybuffer"); + exports5.overrideMimeType = exports5.fetch || (getXHR() ? isFunction(getXHR().overrideMimeType) : false); + exports5.vbArray = isFunction(global2.VBArray); + function isFunction(value) { + return typeof value === "function"; + } + xhr = null; + }).call(this, typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}); + }, {}], 86: [function(_dereq_2, module5, exports5) { + (function(process2, global2, Buffer2) { + var capability = _dereq_2("./capability"); + var inherits = _dereq_2("inherits"); + var response = _dereq_2("./response"); + var stream = _dereq_2("readable-stream"); + var toArrayBuffer = _dereq_2("to-arraybuffer"); + var IncomingMessage = response.IncomingMessage; + var rStates = response.readyStates; + function decideMode(preferBinary, useFetch) { + if (capability.fetch && useFetch) { + return "fetch"; + } else if (capability.mozchunkedarraybuffer) { + return "moz-chunked-arraybuffer"; + } else if (capability.msstream) { + return "ms-stream"; + } else if (capability.arraybuffer && preferBinary) { + return "arraybuffer"; + } else if (capability.vbArray && preferBinary) { + return "text:vbarray"; + } else { + return "text"; + } + } + var ClientRequest = module5.exports = function(opts) { + var self2 = this; + stream.Writable.call(self2); + self2._opts = opts; + self2._body = []; + self2._headers = {}; + if (opts.auth) + self2.setHeader("Authorization", "Basic " + new Buffer2(opts.auth).toString("base64")); + Object.keys(opts.headers).forEach(function(name) { + self2.setHeader(name, opts.headers[name]); + }); + var preferBinary; + var useFetch = true; + if (opts.mode === "disable-fetch" || "timeout" in opts) { + useFetch = false; + preferBinary = true; + } else if (opts.mode === "prefer-streaming") { + preferBinary = false; + } else if (opts.mode === "allow-wrong-content-type") { + preferBinary = !capability.overrideMimeType; + } else if (!opts.mode || opts.mode === "default" || opts.mode === "prefer-fast") { + preferBinary = true; + } else { + throw new Error("Invalid value for opts.mode"); + } + self2._mode = decideMode(preferBinary, useFetch); + self2.on("finish", function() { + self2._onFinish(); + }); + }; + inherits(ClientRequest, stream.Writable); + ClientRequest.prototype.setHeader = function(name, value) { + var self2 = this; + var lowerName = name.toLowerCase(); + if (unsafeHeaders.indexOf(lowerName) !== -1) + return; + self2._headers[lowerName] = { + name, + value + }; + }; + ClientRequest.prototype.getHeader = function(name) { + var header = this._headers[name.toLowerCase()]; + if (header) + return header.value; + return null; + }; + ClientRequest.prototype.removeHeader = function(name) { + var self2 = this; + delete self2._headers[name.toLowerCase()]; + }; + ClientRequest.prototype._onFinish = function() { + var self2 = this; + if (self2._destroyed) + return; + var opts = self2._opts; + var headersObj = self2._headers; + var body = null; + if (opts.method !== "GET" && opts.method !== "HEAD") { + if (capability.blobConstructor) { + body = new global2.Blob(self2._body.map(function(buffer) { + return toArrayBuffer(buffer); + }), { + type: (headersObj["content-type"] || {}).value || "" + }); + } else { + body = Buffer2.concat(self2._body).toString(); + } + } + var headersList = []; + Object.keys(headersObj).forEach(function(keyName) { + var name = headersObj[keyName].name; + var value = headersObj[keyName].value; + if (Array.isArray(value)) { + value.forEach(function(v) { + headersList.push([name, v]); + }); + } else { + headersList.push([name, value]); + } + }); + if (self2._mode === "fetch") { + global2.fetch(self2._opts.url, { + method: self2._opts.method, + headers: headersList, + body: body || void 0, + mode: "cors", + credentials: opts.withCredentials ? "include" : "same-origin" + }).then(function(response2) { + self2._fetchResponse = response2; + self2._connect(); + }, function(reason) { + self2.emit("error", reason); + }); + } else { + var xhr = self2._xhr = new global2.XMLHttpRequest(); + try { + xhr.open(self2._opts.method, self2._opts.url, true); + } catch (err) { + process2.nextTick(function() { + self2.emit("error", err); + }); + return; + } + if ("responseType" in xhr) + xhr.responseType = self2._mode.split(":")[0]; + if ("withCredentials" in xhr) + xhr.withCredentials = !!opts.withCredentials; + if (self2._mode === "text" && "overrideMimeType" in xhr) + xhr.overrideMimeType("text/plain; charset=x-user-defined"); + if ("timeout" in opts) { + xhr.timeout = opts.timeout; + xhr.ontimeout = function() { + self2.emit("timeout"); + }; + } + headersList.forEach(function(header) { + xhr.setRequestHeader(header[0], header[1]); + }); + self2._response = null; + xhr.onreadystatechange = function() { + switch (xhr.readyState) { + case rStates.LOADING: + case rStates.DONE: + self2._onXHRProgress(); + break; + } + }; + if (self2._mode === "moz-chunked-arraybuffer") { + xhr.onprogress = function() { + self2._onXHRProgress(); + }; + } + xhr.onerror = function() { + if (self2._destroyed) + return; + self2.emit("error", new Error("XHR error")); + }; + try { + xhr.send(body); + } catch (err) { + process2.nextTick(function() { + self2.emit("error", err); + }); + return; + } + } + }; + function statusValid(xhr) { + try { + var status = xhr.status; + return status !== null && status !== 0; + } catch (e) { + return false; + } + } + ClientRequest.prototype._onXHRProgress = function() { + var self2 = this; + if (!statusValid(self2._xhr) || self2._destroyed) + return; + if (!self2._response) + self2._connect(); + self2._response._onXHRProgress(); + }; + ClientRequest.prototype._connect = function() { + var self2 = this; + if (self2._destroyed) + return; + self2._response = new IncomingMessage(self2._xhr, self2._fetchResponse, self2._mode); + self2._response.on("error", function(err) { + self2.emit("error", err); + }); + self2.emit("response", self2._response); + }; + ClientRequest.prototype._write = function(chunk, encoding, cb) { + var self2 = this; + self2._body.push(chunk); + cb(); + }; + ClientRequest.prototype.abort = ClientRequest.prototype.destroy = function() { + var self2 = this; + self2._destroyed = true; + if (self2._response) + self2._response._destroyed = true; + if (self2._xhr) + self2._xhr.abort(); + }; + ClientRequest.prototype.end = function(data, encoding, cb) { + var self2 = this; + if (typeof data === "function") { + cb = data; + data = void 0; + } + stream.Writable.prototype.end.call(self2, data, encoding, cb); + }; + ClientRequest.prototype.flushHeaders = function() { + }; + ClientRequest.prototype.setTimeout = function() { + }; + ClientRequest.prototype.setNoDelay = function() { + }; + ClientRequest.prototype.setSocketKeepAlive = function() { + }; + var unsafeHeaders = [ + "accept-charset", + "accept-encoding", + "access-control-request-headers", + "access-control-request-method", + "connection", + "content-length", + "cookie", + "cookie2", + "date", + "dnt", + "expect", + "host", + "keep-alive", + "origin", + "referer", + "te", + "trailer", + "transfer-encoding", + "upgrade", + "user-agent", + "via" + ]; + }).call(this, _dereq_2("_process"), typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}, _dereq_2("buffer").Buffer); + }, { "./capability": 85, "./response": 87, "_process": 69, "buffer": 23, "inherits": 33, "readable-stream": 82, "to-arraybuffer": 89 }], 87: [function(_dereq_2, module5, exports5) { + (function(process2, global2, Buffer2) { + var capability = _dereq_2("./capability"); + var inherits = _dereq_2("inherits"); + var stream = _dereq_2("readable-stream"); + var rStates = exports5.readyStates = { + UNSENT: 0, + OPENED: 1, + HEADERS_RECEIVED: 2, + LOADING: 3, + DONE: 4 + }; + var IncomingMessage = exports5.IncomingMessage = function(xhr, response, mode) { + var self2 = this; + stream.Readable.call(self2); + self2._mode = mode; + self2.headers = {}; + self2.rawHeaders = []; + self2.trailers = {}; + self2.rawTrailers = []; + self2.on("end", function() { + process2.nextTick(function() { + self2.emit("close"); + }); + }); + if (mode === "fetch") { + let read = function() { + reader.read().then(function(result) { + if (self2._destroyed) + return; + if (result.done) { + self2.push(null); + return; + } + self2.push(new Buffer2(result.value)); + read(); + }).catch(function(err) { + self2.emit("error", err); + }); + }; + self2._fetchResponse = response; + self2.url = response.url; + self2.statusCode = response.status; + self2.statusMessage = response.statusText; + response.headers.forEach(function(header, key) { + self2.headers[key.toLowerCase()] = header; + self2.rawHeaders.push(key, header); + }); + var reader = response.body.getReader(); + read(); + } else { + self2._xhr = xhr; + self2._pos = 0; + self2.url = xhr.responseURL; + self2.statusCode = xhr.status; + self2.statusMessage = xhr.statusText; + var headers = xhr.getAllResponseHeaders().split(/\r?\n/); + headers.forEach(function(header) { + var matches = header.match(/^([^:]+):\s*(.*)/); + if (matches) { + var key = matches[1].toLowerCase(); + if (key === "set-cookie") { + if (self2.headers[key] === void 0) { + self2.headers[key] = []; + } + self2.headers[key].push(matches[2]); + } else if (self2.headers[key] !== void 0) { + self2.headers[key] += ", " + matches[2]; + } else { + self2.headers[key] = matches[2]; + } + self2.rawHeaders.push(matches[1], matches[2]); + } + }); + self2._charset = "x-user-defined"; + if (!capability.overrideMimeType) { + var mimeType = self2.rawHeaders["mime-type"]; + if (mimeType) { + var charsetMatch = mimeType.match(/;\s*charset=([^;])(;|$)/); + if (charsetMatch) { + self2._charset = charsetMatch[1].toLowerCase(); + } + } + if (!self2._charset) + self2._charset = "utf-8"; + } + } + }; + inherits(IncomingMessage, stream.Readable); + IncomingMessage.prototype._read = function() { + }; + IncomingMessage.prototype._onXHRProgress = function() { + var self2 = this; + var xhr = self2._xhr; + var response = null; + switch (self2._mode) { + case "text:vbarray": + if (xhr.readyState !== rStates.DONE) + break; + try { + response = new global2.VBArray(xhr.responseBody).toArray(); + } catch (e) { + } + if (response !== null) { + self2.push(new Buffer2(response)); + break; + } + case "text": + try { + response = xhr.responseText; + } catch (e) { + self2._mode = "text:vbarray"; + break; + } + if (response.length > self2._pos) { + var newData = response.substr(self2._pos); + if (self2._charset === "x-user-defined") { + var buffer = new Buffer2(newData.length); + for (var i = 0; i < newData.length; i++) + buffer[i] = newData.charCodeAt(i) & 255; + self2.push(buffer); + } else { + self2.push(newData, self2._charset); + } + self2._pos = response.length; + } + break; + case "arraybuffer": + if (xhr.readyState !== rStates.DONE || !xhr.response) + break; + response = xhr.response; + self2.push(new Buffer2(new Uint8Array(response))); + break; + case "moz-chunked-arraybuffer": + response = xhr.response; + if (xhr.readyState !== rStates.LOADING || !response) + break; + self2.push(new Buffer2(new Uint8Array(response))); + break; + case "ms-stream": + response = xhr.response; + if (xhr.readyState !== rStates.LOADING) + break; + var reader = new global2.MSStreamReader(); + reader.onprogress = function() { + if (reader.result.byteLength > self2._pos) { + self2.push(new Buffer2(new Uint8Array(reader.result.slice(self2._pos)))); + self2._pos = reader.result.byteLength; + } + }; + reader.onload = function() { + self2.push(null); + }; + reader.readAsArrayBuffer(response); + break; + } + if (self2._xhr.readyState === rStates.DONE && self2._mode !== "ms-stream") { + self2.push(null); + } + }; + }).call(this, _dereq_2("_process"), typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}, _dereq_2("buffer").Buffer); + }, { "./capability": 85, "_process": 69, "buffer": 23, "inherits": 33, "readable-stream": 82 }], 88: [function(_dereq_2, module5, exports5) { + "use strict"; + var Buffer2 = _dereq_2("safe-buffer").Buffer; + var isEncoding = Buffer2.isEncoding || function(encoding) { + encoding = "" + encoding; + switch (encoding && encoding.toLowerCase()) { + case "hex": + case "utf8": + case "utf-8": + case "ascii": + case "binary": + case "base64": + case "ucs2": + case "ucs-2": + case "utf16le": + case "utf-16le": + case "raw": + return true; + default: + return false; + } + }; + function _normalizeEncoding(enc) { + if (!enc) return "utf8"; + var retried; + while (true) { + switch (enc) { + case "utf8": + case "utf-8": + return "utf8"; + case "ucs2": + case "ucs-2": + case "utf16le": + case "utf-16le": + return "utf16le"; + case "latin1": + case "binary": + return "latin1"; + case "base64": + case "ascii": + case "hex": + return enc; + default: + if (retried) return; + enc = ("" + enc).toLowerCase(); + retried = true; + } + } + } + ; + function normalizeEncoding(enc) { + var nenc = _normalizeEncoding(enc); + if (typeof nenc !== "string" && (Buffer2.isEncoding === isEncoding || !isEncoding(enc))) throw new Error("Unknown encoding: " + enc); + return nenc || enc; + } + exports5.StringDecoder = StringDecoder; + function StringDecoder(encoding) { + this.encoding = normalizeEncoding(encoding); + var nb; + switch (this.encoding) { + case "utf16le": + this.text = utf16Text; + this.end = utf16End; + nb = 4; + break; + case "utf8": + this.fillLast = utf8FillLast; + nb = 4; + break; + case "base64": + this.text = base64Text; + this.end = base64End; + nb = 3; + break; + default: + this.write = simpleWrite; + this.end = simpleEnd; + return; + } + this.lastNeed = 0; + this.lastTotal = 0; + this.lastChar = Buffer2.allocUnsafe(nb); + } + StringDecoder.prototype.write = function(buf) { + if (buf.length === 0) return ""; + var r; + var i; + if (this.lastNeed) { + r = this.fillLast(buf); + if (r === void 0) return ""; + i = this.lastNeed; + this.lastNeed = 0; + } else { + i = 0; + } + if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i); + return r || ""; + }; + StringDecoder.prototype.end = utf8End; + StringDecoder.prototype.text = utf8Text; + StringDecoder.prototype.fillLast = function(buf) { + if (this.lastNeed <= buf.length) { + buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed); + return this.lastChar.toString(this.encoding, 0, this.lastTotal); + } + buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length); + this.lastNeed -= buf.length; + }; + function utf8CheckByte(byte) { + if (byte <= 127) return 0; + else if (byte >> 5 === 6) return 2; + else if (byte >> 4 === 14) return 3; + else if (byte >> 3 === 30) return 4; + return -1; + } + function utf8CheckIncomplete(self2, buf, i) { + var j = buf.length - 1; + if (j < i) return 0; + var nb = utf8CheckByte(buf[j]); + if (nb >= 0) { + if (nb > 0) self2.lastNeed = nb - 1; + return nb; + } + if (--j < i) return 0; + nb = utf8CheckByte(buf[j]); + if (nb >= 0) { + if (nb > 0) self2.lastNeed = nb - 2; + return nb; + } + if (--j < i) return 0; + nb = utf8CheckByte(buf[j]); + if (nb >= 0) { + if (nb > 0) { + if (nb === 2) nb = 0; + else self2.lastNeed = nb - 3; + } + return nb; + } + return 0; + } + function utf8CheckExtraBytes(self2, buf, p) { + if ((buf[0] & 192) !== 128) { + self2.lastNeed = 0; + return "\uFFFD".repeat(p); + } + if (self2.lastNeed > 1 && buf.length > 1) { + if ((buf[1] & 192) !== 128) { + self2.lastNeed = 1; + return "\uFFFD".repeat(p + 1); + } + if (self2.lastNeed > 2 && buf.length > 2) { + if ((buf[2] & 192) !== 128) { + self2.lastNeed = 2; + return "\uFFFD".repeat(p + 2); + } + } + } + } + function utf8FillLast(buf) { + var p = this.lastTotal - this.lastNeed; + var r = utf8CheckExtraBytes(this, buf, p); + if (r !== void 0) return r; + if (this.lastNeed <= buf.length) { + buf.copy(this.lastChar, p, 0, this.lastNeed); + return this.lastChar.toString(this.encoding, 0, this.lastTotal); + } + buf.copy(this.lastChar, p, 0, buf.length); + this.lastNeed -= buf.length; + } + function utf8Text(buf, i) { + var total = utf8CheckIncomplete(this, buf, i); + if (!this.lastNeed) return buf.toString("utf8", i); + this.lastTotal = total; + var end2 = buf.length - (total - this.lastNeed); + buf.copy(this.lastChar, 0, end2); + return buf.toString("utf8", i, end2); + } + function utf8End(buf) { + var r = buf && buf.length ? this.write(buf) : ""; + if (this.lastNeed) return r + "\uFFFD".repeat(this.lastTotal - this.lastNeed); + return r; + } + function utf16Text(buf, i) { + if ((buf.length - i) % 2 === 0) { + var r = buf.toString("utf16le", i); + if (r) { + var c = r.charCodeAt(r.length - 1); + if (c >= 55296 && c <= 56319) { + this.lastNeed = 2; + this.lastTotal = 4; + this.lastChar[0] = buf[buf.length - 2]; + this.lastChar[1] = buf[buf.length - 1]; + return r.slice(0, -1); + } + } + return r; + } + this.lastNeed = 1; + this.lastTotal = 2; + this.lastChar[0] = buf[buf.length - 1]; + return buf.toString("utf16le", i, buf.length - 1); + } + function utf16End(buf) { + var r = buf && buf.length ? this.write(buf) : ""; + if (this.lastNeed) { + var end2 = this.lastTotal - this.lastNeed; + return r + this.lastChar.toString("utf16le", 0, end2); + } + return r; + } + function base64Text(buf, i) { + var n = (buf.length - i) % 3; + if (n === 0) return buf.toString("base64", i); + this.lastNeed = 3 - n; + this.lastTotal = 3; + if (n === 1) { + this.lastChar[0] = buf[buf.length - 1]; + } else { + this.lastChar[0] = buf[buf.length - 2]; + this.lastChar[1] = buf[buf.length - 1]; + } + return buf.toString("base64", i, buf.length - n); + } + function base64End(buf) { + var r = buf && buf.length ? this.write(buf) : ""; + if (this.lastNeed) return r + this.lastChar.toString("base64", 0, 3 - this.lastNeed); + return r; + } + function simpleWrite(buf) { + return buf.toString(this.encoding); + } + function simpleEnd(buf) { + return buf && buf.length ? this.write(buf) : ""; + } + }, { "safe-buffer": 83 }], 89: [function(_dereq_2, module5, exports5) { + var Buffer2 = _dereq_2("buffer").Buffer; + module5.exports = function(buf) { + if (buf instanceof Uint8Array) { + if (buf.byteOffset === 0 && buf.byteLength === buf.buffer.byteLength) { + return buf.buffer; + } else if (typeof buf.buffer.slice === "function") { + return buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength); + } + } + if (Buffer2.isBuffer(buf)) { + var arrayCopy = new Uint8Array(buf.length); + var len = buf.length; + for (var i = 0; i < len; i++) { + arrayCopy[i] = buf[i]; + } + return arrayCopy.buffer; + } else { + throw new Error("Argument must be a Buffer"); + } + }; + }, { "buffer": 23 }], 90: [function(_dereq_2, module5, exports5) { + "use strict"; + var punycode = _dereq_2("punycode"); + var util2 = _dereq_2("./util"); + exports5.parse = urlParse; + exports5.resolve = urlResolve; + exports5.resolveObject = urlResolveObject; + exports5.format = urlFormat; + exports5.Url = Url; + function Url() { + this.protocol = null; + this.slashes = null; + this.auth = null; + this.host = null; + this.port = null; + this.hostname = null; + this.hash = null; + this.search = null; + this.query = null; + this.pathname = null; + this.path = null; + this.href = null; + } + var protocolPattern = /^([a-z0-9.+-]+:)/i, portPattern = /:[0-9]*$/, simplePathPattern = /^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/, delims = ["<", ">", '"', "`", " ", "\r", "\n", " "], unwise = ["{", "}", "|", "\\", "^", "`"].concat(delims), autoEscape = ["'"].concat(unwise), nonHostChars = ["%", "/", "?", ";", "#"].concat(autoEscape), hostEndingChars = ["/", "?", "#"], hostnameMaxLen = 255, hostnamePartPattern = /^[+a-z0-9A-Z_-]{0,63}$/, hostnamePartStart = /^([+a-z0-9A-Z_-]{0,63})(.*)$/, unsafeProtocol = { + "javascript": true, + "javascript:": true + }, hostlessProtocol = { + "javascript": true, + "javascript:": true + }, slashedProtocol = { + "http": true, + "https": true, + "ftp": true, + "gopher": true, + "file": true, + "http:": true, + "https:": true, + "ftp:": true, + "gopher:": true, + "file:": true + }, querystring = _dereq_2("querystring"); + function urlParse(url, parseQueryString, slashesDenoteHost) { + if (url && util2.isObject(url) && url instanceof Url) return url; + var u = new Url(); + u.parse(url, parseQueryString, slashesDenoteHost); + return u; + } + Url.prototype.parse = function(url, parseQueryString, slashesDenoteHost) { + if (!util2.isString(url)) { + throw new TypeError("Parameter 'url' must be a string, not " + typeof url); + } + var queryIndex = url.indexOf("?"), splitter = queryIndex !== -1 && queryIndex < url.indexOf("#") ? "?" : "#", uSplit = url.split(splitter), slashRegex = /\\/g; + uSplit[0] = uSplit[0].replace(slashRegex, "/"); + url = uSplit.join(splitter); + var rest = url; + rest = rest.trim(); + if (!slashesDenoteHost && url.split("#").length === 1) { + var simplePath = simplePathPattern.exec(rest); + if (simplePath) { + this.path = rest; + this.href = rest; + this.pathname = simplePath[1]; + if (simplePath[2]) { + this.search = simplePath[2]; + if (parseQueryString) { + this.query = querystring.parse(this.search.substr(1)); + } else { + this.query = this.search.substr(1); + } + } else if (parseQueryString) { + this.search = ""; + this.query = {}; + } + return this; + } + } + var proto = protocolPattern.exec(rest); + if (proto) { + proto = proto[0]; + var lowerProto = proto.toLowerCase(); + this.protocol = lowerProto; + rest = rest.substr(proto.length); + } + if (slashesDenoteHost || proto || rest.match(/^\/\/[^@\/]+@[^@\/]+/)) { + var slashes = rest.substr(0, 2) === "//"; + if (slashes && !(proto && hostlessProtocol[proto])) { + rest = rest.substr(2); + this.slashes = true; + } + } + if (!hostlessProtocol[proto] && (slashes || proto && !slashedProtocol[proto])) { + var hostEnd = -1; + for (var i = 0; i < hostEndingChars.length; i++) { + var hec = rest.indexOf(hostEndingChars[i]); + if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) + hostEnd = hec; + } + var auth, atSign; + if (hostEnd === -1) { + atSign = rest.lastIndexOf("@"); + } else { + atSign = rest.lastIndexOf("@", hostEnd); + } + if (atSign !== -1) { + auth = rest.slice(0, atSign); + rest = rest.slice(atSign + 1); + this.auth = decodeURIComponent(auth); + } + hostEnd = -1; + for (var i = 0; i < nonHostChars.length; i++) { + var hec = rest.indexOf(nonHostChars[i]); + if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) + hostEnd = hec; + } + if (hostEnd === -1) + hostEnd = rest.length; + this.host = rest.slice(0, hostEnd); + rest = rest.slice(hostEnd); + this.parseHost(); + this.hostname = this.hostname || ""; + var ipv6Hostname = this.hostname[0] === "[" && this.hostname[this.hostname.length - 1] === "]"; + if (!ipv6Hostname) { + var hostparts = this.hostname.split(/\./); + for (var i = 0, l = hostparts.length; i < l; i++) { + var part = hostparts[i]; + if (!part) continue; + if (!part.match(hostnamePartPattern)) { + var newpart = ""; + for (var j = 0, k = part.length; j < k; j++) { + if (part.charCodeAt(j) > 127) { + newpart += "x"; + } else { + newpart += part[j]; + } + } + if (!newpart.match(hostnamePartPattern)) { + var validParts = hostparts.slice(0, i); + var notHost = hostparts.slice(i + 1); + var bit = part.match(hostnamePartStart); + if (bit) { + validParts.push(bit[1]); + notHost.unshift(bit[2]); + } + if (notHost.length) { + rest = "/" + notHost.join(".") + rest; + } + this.hostname = validParts.join("."); + break; + } + } + } + } + if (this.hostname.length > hostnameMaxLen) { + this.hostname = ""; + } else { + this.hostname = this.hostname.toLowerCase(); + } + if (!ipv6Hostname) { + this.hostname = punycode.toASCII(this.hostname); + } + var p = this.port ? ":" + this.port : ""; + var h = this.hostname || ""; + this.host = h + p; + this.href += this.host; + if (ipv6Hostname) { + this.hostname = this.hostname.substr(1, this.hostname.length - 2); + if (rest[0] !== "/") { + rest = "/" + rest; + } + } + } + if (!unsafeProtocol[lowerProto]) { + for (var i = 0, l = autoEscape.length; i < l; i++) { + var ae = autoEscape[i]; + if (rest.indexOf(ae) === -1) + continue; + var esc = encodeURIComponent(ae); + if (esc === ae) { + esc = escape(ae); + } + rest = rest.split(ae).join(esc); + } + } + var hash2 = rest.indexOf("#"); + if (hash2 !== -1) { + this.hash = rest.substr(hash2); + rest = rest.slice(0, hash2); + } + var qm = rest.indexOf("?"); + if (qm !== -1) { + this.search = rest.substr(qm); + this.query = rest.substr(qm + 1); + if (parseQueryString) { + this.query = querystring.parse(this.query); + } + rest = rest.slice(0, qm); + } else if (parseQueryString) { + this.search = ""; + this.query = {}; + } + if (rest) this.pathname = rest; + if (slashedProtocol[lowerProto] && this.hostname && !this.pathname) { + this.pathname = "/"; + } + if (this.pathname || this.search) { + var p = this.pathname || ""; + var s = this.search || ""; + this.path = p + s; + } + this.href = this.format(); + return this; + }; + function urlFormat(obj) { + if (util2.isString(obj)) obj = urlParse(obj); + if (!(obj instanceof Url)) return Url.prototype.format.call(obj); + return obj.format(); + } + Url.prototype.format = function() { + var auth = this.auth || ""; + if (auth) { + auth = encodeURIComponent(auth); + auth = auth.replace(/%3A/i, ":"); + auth += "@"; + } + var protocol = this.protocol || "", pathname = this.pathname || "", hash2 = this.hash || "", host = false, query = ""; + if (this.host) { + host = auth + this.host; + } else if (this.hostname) { + host = auth + (this.hostname.indexOf(":") === -1 ? this.hostname : "[" + this.hostname + "]"); + if (this.port) { + host += ":" + this.port; + } + } + if (this.query && util2.isObject(this.query) && Object.keys(this.query).length) { + query = querystring.stringify(this.query); + } + var search = this.search || query && "?" + query || ""; + if (protocol && protocol.substr(-1) !== ":") protocol += ":"; + if (this.slashes || (!protocol || slashedProtocol[protocol]) && host !== false) { + host = "//" + (host || ""); + if (pathname && pathname.charAt(0) !== "/") pathname = "/" + pathname; + } else if (!host) { + host = ""; + } + if (hash2 && hash2.charAt(0) !== "#") hash2 = "#" + hash2; + if (search && search.charAt(0) !== "?") search = "?" + search; + pathname = pathname.replace(/[?#]/g, function(match) { + return encodeURIComponent(match); + }); + search = search.replace("#", "%23"); + return protocol + host + pathname + search + hash2; + }; + function urlResolve(source, relative) { + return urlParse(source, false, true).resolve(relative); + } + Url.prototype.resolve = function(relative) { + return this.resolveObject(urlParse(relative, false, true)).format(); + }; + function urlResolveObject(source, relative) { + if (!source) return relative; + return urlParse(source, false, true).resolveObject(relative); + } + Url.prototype.resolveObject = function(relative) { + if (util2.isString(relative)) { + var rel = new Url(); + rel.parse(relative, false, true); + relative = rel; + } + var result = new Url(); + var tkeys = Object.keys(this); + for (var tk = 0; tk < tkeys.length; tk++) { + var tkey = tkeys[tk]; + result[tkey] = this[tkey]; + } + result.hash = relative.hash; + if (relative.href === "") { + result.href = result.format(); + return result; + } + if (relative.slashes && !relative.protocol) { + var rkeys = Object.keys(relative); + for (var rk = 0; rk < rkeys.length; rk++) { + var rkey = rkeys[rk]; + if (rkey !== "protocol") + result[rkey] = relative[rkey]; + } + if (slashedProtocol[result.protocol] && result.hostname && !result.pathname) { + result.path = result.pathname = "/"; + } + result.href = result.format(); + return result; + } + if (relative.protocol && relative.protocol !== result.protocol) { + if (!slashedProtocol[relative.protocol]) { + var keys = Object.keys(relative); + for (var v = 0; v < keys.length; v++) { + var k = keys[v]; + result[k] = relative[k]; + } + result.href = result.format(); + return result; + } + result.protocol = relative.protocol; + if (!relative.host && !hostlessProtocol[relative.protocol]) { + var relPath = (relative.pathname || "").split("/"); + while (relPath.length && !(relative.host = relPath.shift())) ; + if (!relative.host) relative.host = ""; + if (!relative.hostname) relative.hostname = ""; + if (relPath[0] !== "") relPath.unshift(""); + if (relPath.length < 2) relPath.unshift(""); + result.pathname = relPath.join("/"); + } else { + result.pathname = relative.pathname; + } + result.search = relative.search; + result.query = relative.query; + result.host = relative.host || ""; + result.auth = relative.auth; + result.hostname = relative.hostname || relative.host; + result.port = relative.port; + if (result.pathname || result.search) { + var p = result.pathname || ""; + var s = result.search || ""; + result.path = p + s; + } + result.slashes = result.slashes || relative.slashes; + result.href = result.format(); + return result; + } + var isSourceAbs = result.pathname && result.pathname.charAt(0) === "/", isRelAbs = relative.host || relative.pathname && relative.pathname.charAt(0) === "/", mustEndAbs = isRelAbs || isSourceAbs || result.host && relative.pathname, removeAllDots = mustEndAbs, srcPath = result.pathname && result.pathname.split("/") || [], relPath = relative.pathname && relative.pathname.split("/") || [], psychotic = result.protocol && !slashedProtocol[result.protocol]; + if (psychotic) { + result.hostname = ""; + result.port = null; + if (result.host) { + if (srcPath[0] === "") srcPath[0] = result.host; + else srcPath.unshift(result.host); + } + result.host = ""; + if (relative.protocol) { + relative.hostname = null; + relative.port = null; + if (relative.host) { + if (relPath[0] === "") relPath[0] = relative.host; + else relPath.unshift(relative.host); + } + relative.host = null; + } + mustEndAbs = mustEndAbs && (relPath[0] === "" || srcPath[0] === ""); + } + if (isRelAbs) { + result.host = relative.host || relative.host === "" ? relative.host : result.host; + result.hostname = relative.hostname || relative.hostname === "" ? relative.hostname : result.hostname; + result.search = relative.search; + result.query = relative.query; + srcPath = relPath; + } else if (relPath.length) { + if (!srcPath) srcPath = []; + srcPath.pop(); + srcPath = srcPath.concat(relPath); + result.search = relative.search; + result.query = relative.query; + } else if (!util2.isNullOrUndefined(relative.search)) { + if (psychotic) { + result.hostname = result.host = srcPath.shift(); + var authInHost = result.host && result.host.indexOf("@") > 0 ? result.host.split("@") : false; + if (authInHost) { + result.auth = authInHost.shift(); + result.host = result.hostname = authInHost.shift(); + } + } + result.search = relative.search; + result.query = relative.query; + if (!util2.isNull(result.pathname) || !util2.isNull(result.search)) { + result.path = (result.pathname ? result.pathname : "") + (result.search ? result.search : ""); + } + result.href = result.format(); + return result; + } + if (!srcPath.length) { + result.pathname = null; + if (result.search) { + result.path = "/" + result.search; + } else { + result.path = null; + } + result.href = result.format(); + return result; + } + var last = srcPath.slice(-1)[0]; + var hasTrailingSlash = (result.host || relative.host || srcPath.length > 1) && (last === "." || last === "..") || last === ""; + var up = 0; + for (var i = srcPath.length; i >= 0; i--) { + last = srcPath[i]; + if (last === ".") { + srcPath.splice(i, 1); + } else if (last === "..") { + srcPath.splice(i, 1); + up++; + } else if (up) { + srcPath.splice(i, 1); + up--; + } + } + if (!mustEndAbs && !removeAllDots) { + for (; up--; up) { + srcPath.unshift(".."); + } + } + if (mustEndAbs && srcPath[0] !== "" && (!srcPath[0] || srcPath[0].charAt(0) !== "/")) { + srcPath.unshift(""); + } + if (hasTrailingSlash && srcPath.join("/").substr(-1) !== "/") { + srcPath.push(""); + } + var isAbsolute = srcPath[0] === "" || srcPath[0] && srcPath[0].charAt(0) === "/"; + if (psychotic) { + result.hostname = result.host = isAbsolute ? "" : srcPath.length ? srcPath.shift() : ""; + var authInHost = result.host && result.host.indexOf("@") > 0 ? result.host.split("@") : false; + if (authInHost) { + result.auth = authInHost.shift(); + result.host = result.hostname = authInHost.shift(); + } + } + mustEndAbs = mustEndAbs || result.host && srcPath.length; + if (mustEndAbs && !isAbsolute) { + srcPath.unshift(""); + } + if (!srcPath.length) { + result.pathname = null; + result.path = null; + } else { + result.pathname = srcPath.join("/"); + } + if (!util2.isNull(result.pathname) || !util2.isNull(result.search)) { + result.path = (result.pathname ? result.pathname : "") + (result.search ? result.search : ""); + } + result.auth = relative.auth || result.auth; + result.slashes = result.slashes || relative.slashes; + result.href = result.format(); + return result; + }; + Url.prototype.parseHost = function() { + var host = this.host; + var port = portPattern.exec(host); + if (port) { + port = port[0]; + if (port !== ":") { + this.port = port.substr(1); + } + host = host.substr(0, host.length - port.length); + } + if (host) this.hostname = host; + }; + }, { "./util": 91, "punycode": 70, "querystring": 73 }], 91: [function(_dereq_2, module5, exports5) { + "use strict"; + module5.exports = { + isString: function(arg) { + return typeof arg === "string"; + }, + isObject: function(arg) { + return typeof arg === "object" && arg !== null; + }, + isNull: function(arg) { + return arg === null; + }, + isNullOrUndefined: function(arg) { + return arg == null; + } + }; + }, {}], 92: [function(_dereq_2, module5, exports5) { + (function(global2) { + module5.exports = deprecate; + function deprecate(fn, msg) { + if (config("noDeprecation")) { + return fn; + } + var warned = false; + function deprecated() { + if (!warned) { + if (config("throwDeprecation")) { + throw new Error(msg); + } else if (config("traceDeprecation")) { + console.trace(msg); + } else { + console.warn(msg); + } + warned = true; + } + return fn.apply(this, arguments); + } + return deprecated; + } + function config(name) { + try { + if (!global2.localStorage) return false; + } catch (_3) { + return false; + } + var val = global2.localStorage[name]; + if (null == val) return false; + return String(val).toLowerCase() === "true"; + } + }).call(this, typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}); + }, {}], 93: [function(_dereq_2, module5, exports5) { + module5.exports = extend; + var hasOwnProperty = Object.prototype.hasOwnProperty; + function extend() { + var target = {}; + for (var i = 0; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + } + }, {}] }, {}, [3])(3); + }); + }); + var jsonSchemaRefParser$1 = /* @__PURE__ */ Object.freeze({ + default: jsonSchemaRefParser + }); + var require$$3 = jsonSchemaRefParser$1 && jsonSchemaRefParser || jsonSchemaRefParser$1; + function _interopDefault$1(ex) { + return ex && typeof ex === "object" && "default" in ex ? ex["default"] : ex; + } + var RandExp = _interopDefault$1(randexp); + var deref = _interopDefault$1(lib$1); + var jsonpath$1 = _interopDefault$1(jsonpath); + var $RefParser = _interopDefault$1(require$$3); + function template(value, schema2) { + if (Array.isArray(value)) { + return value.map(function(x) { + return template(x, schema2); + }); + } + if (typeof value === "string") { + value = value.replace(/#\{([\w.-]+)\}/g, function(_3, $1) { + return schema2[$1]; + }); + } + return value; + } + function proxy(gen) { + return function(value, schema2, property, rootSchema) { + var fn = value; + var args = []; + if (typeof value === "object") { + fn = Object.keys(value)[0]; + if (Array.isArray(value[fn])) { + args = value[fn]; + } else { + args.push(value[fn]); + } + } + var props = fn.split("."); + var ctx = gen(); + while (props.length > 1) { + ctx = ctx[props.shift()]; + } + value = typeof ctx === "object" ? ctx[props[0]] : ctx; + if (typeof value === "function") { + value = value.apply(ctx, args.map(function(x) { + return template(x, rootSchema); + })); + } + if (Object.prototype.toString.call(value) === "[object Object]") { + for (var key in value) { + if (typeof value[key] === "function") { + throw new Error('Cannot resolve value for "' + property + ": " + fn + '", given: ' + value); + } + } + } + return value; + }; + } + var Container = ( + /** @class */ + function() { + function Container2() { + this.registry = {}; + this.support = {}; + } + Container2.prototype.extend = function(name, callback) { + var _this = this; + this.registry[name] = callback(this.registry[name]); + if (!this.support[name]) { + this.support[name] = proxy(function() { + return _this.registry[name]; + }); + } + }; + Container2.prototype.define = function(name, callback) { + this.support[name] = callback; + }; + Container2.prototype.get = function(name) { + if (typeof this.registry[name] === "undefined") { + throw new ReferenceError('"' + name + `" dependency doesn't exist.`); + } + return this.registry[name]; + }; + Container2.prototype.wrap = function(schema2) { + var keys = Object.keys(schema2); + var length = keys.length; + var context = {}; + while (length--) { + var fn = keys[length].replace(/^x-/, ""); + var gen = this.support.hasOwnProperty(fn) && this.support[fn]; + if (typeof gen === "function") { + if (typeof schema2[fn] === "object" && schema2[fn].hasOwnProperty("type")) { + continue; + } + Object.defineProperty(schema2, "generate", { + configurable: false, + enumerable: false, + writable: false, + value: function(rootSchema) { + return gen.call(context, schema2[keys[length]], schema2, keys[length], rootSchema); + } + }); + break; + } + } + return schema2; + }; + return Container2; + }() + ); + var Registry = ( + /** @class */ + function() { + function Registry2() { + this.data = {}; + } + Registry2.prototype.register = function(name, callback) { + this.data[name] = callback; + }; + Registry2.prototype.registerMany = function(formats) { + for (var name in formats) { + this.data[name] = formats[name]; + } + }; + Registry2.prototype.get = function(name) { + var format = this.data[name]; + return format; + }; + Registry2.prototype.list = function() { + return this.data; + }; + return Registry2; + }() + ); + var registry = new Registry(); + function formatAPI(nameOrFormatMap, callback) { + if (typeof nameOrFormatMap === "undefined") { + return registry.list(); + } else if (typeof nameOrFormatMap === "string") { + if (typeof callback === "function") { + registry.register(nameOrFormatMap, callback); + } else { + return registry.get(nameOrFormatMap); + } + } else { + registry.registerMany(nameOrFormatMap); + } + } + var OptionRegistry = ( + /** @class */ + function(_super) { + tslib_es6.__extends(OptionRegistry2, _super); + function OptionRegistry2() { + var _this = _super.call(this) || this; + _this.data = _this.defaults; + return _this; + } + Object.defineProperty(OptionRegistry2.prototype, "defaults", { + get: function() { + var data = {}; + data["defaultInvalidTypeProduct"] = null; + data["defaultRandExpMax"] = 10; + data["ignoreProperties"] = []; + data["ignoreMissingRefs"] = false; + data["failOnInvalidTypes"] = true; + data["failOnInvalidFormat"] = true; + data["alwaysFakeOptionals"] = false; + data["fixedProbabilities"] = true; + data["optionalsProbability"] = 0; + data["useDefaultValue"] = false; + data["useExamplesValue"] = false; + data["avoidExampleItemsLength"] = false; + data["requiredOnly"] = false; + data["minItems"] = 0; + data["maxItems"] = null; + data["defaultMinItems"] = 2; + data["defaultMaxItems"] = 2; + data["maxLength"] = null; + data["resolveJsonPath"] = false; + data["reuseProperties"] = false; + data["fillProperties"] = true; + data["random"] = Math.random; + return data; + }, + enumerable: true, + configurable: true + }); + return OptionRegistry2; + }(Registry) + ); + var registry$1 = new OptionRegistry(); + function optionAPI(nameOrOptionMap) { + if (typeof nameOrOptionMap === "string") { + return registry$1.get(nameOrOptionMap); + } else { + return registry$1.registerMany(nameOrOptionMap); + } + } + optionAPI.getDefaults = function() { + return registry$1.defaults; + }; + var ALL_TYPES = ["array", "object", "integer", "number", "string", "boolean", "null"]; + var MOST_NEAR_DATETIME = 2524608e6; + var MIN_INTEGER = -1e8; + var MAX_INTEGER = 1e8; + var MIN_NUMBER = -100; + var MAX_NUMBER = 100; + var env = { + ALL_TYPES, + MIN_NUMBER, + MAX_NUMBER, + MIN_INTEGER, + MAX_INTEGER, + MOST_NEAR_DATETIME + }; + function _randexp(value) { + RandExp.prototype.max = optionAPI("defaultRandExpMax"); + RandExp.prototype.randInt = function(a, b) { + return a + Math.floor(optionAPI("random")() * (1 + b - a)); + }; + var re = new RandExp(value); + return re.gen(); + } + function pick(collection) { + return collection[Math.floor(optionAPI("random")() * collection.length)]; + } + function shuffle(collection) { + var tmp, key, copy2 = collection.slice(), length = collection.length; + for (; length > 0; ) { + key = Math.floor(optionAPI("random")() * length); + tmp = copy2[--length]; + copy2[length] = copy2[key]; + copy2[key] = tmp; + } + return copy2; + } + function getRandom(min, max) { + return optionAPI("random")() * (max - min) + min; + } + function number(min, max, defMin, defMax, hasPrecision) { + if (hasPrecision === void 0) { + hasPrecision = false; + } + defMin = typeof defMin === "undefined" ? env.MIN_NUMBER : defMin; + defMax = typeof defMax === "undefined" ? env.MAX_NUMBER : defMax; + min = typeof min === "undefined" ? defMin : min; + max = typeof max === "undefined" ? defMax : max; + if (max < min) { + max += min; + } + var result = getRandom(min, max); + if (!hasPrecision) { + return Math.round(result); + } + return result; + } + function by(type) { + switch (type) { + case "seconds": + return number(0, 60) * 60; + case "minutes": + return number(15, 50) * 612; + case "hours": + return number(12, 72) * 36123; + case "days": + return number(7, 30) * 86412345; + case "weeks": + return number(4, 52) * 604812345; + case "months": + return number(2, 13) * 2592012345; + case "years": + return number(1, 20) * 31104012345; + } + } + function date(step) { + if (step) { + return by(step); + } + var now = /* @__PURE__ */ new Date(); + var days = number(-1e3, env.MOST_NEAR_DATETIME); + now.setTime(now.getTime() - days); + return now; + } + var random = { + pick, + date, + randexp: _randexp, + shuffle, + number + }; + function getSubAttribute(obj, dotSeparatedKey) { + var keyElements = dotSeparatedKey.split("."); + while (keyElements.length) { + var prop = keyElements.shift(); + if (!obj[prop]) { + break; + } + obj = obj[prop]; + } + return obj; + } + function hasProperties(obj) { + var properties = []; + for (var _i = 1; _i < arguments.length; _i++) { + properties[_i - 1] = arguments[_i]; + } + return properties.filter(function(key) { + return typeof obj[key] !== "undefined"; + }).length > 0; + } + function typecast(schema2, callback) { + var params = {}; + switch (schema2.type) { + case "integer": + case "number": + if (typeof schema2.minimum !== "undefined") { + params.minimum = schema2.minimum; + } + if (typeof schema2.maximum !== "undefined") { + params.maximum = schema2.maximum; + } + if (schema2.enum) { + var min = Math.max(params.minimum || 0, 0); + var max = Math.min(params.maximum || Infinity, Infinity); + min = handleExclusiveMinimum(schema2, min); + max = handleExclusiveMaximum(schema2, max); + schema2.enum = schema2.enum.filter(function(x) { + if (x >= min && x <= max) { + return true; + } + return false; + }); + } + break; + case "string": + if (typeof schema2.minLength !== "undefined") { + params.minLength = schema2.minLength; + } + if (typeof schema2.maxLength !== "undefined") { + params.maxLength = schema2.maxLength; + } + var _maxLength = optionAPI("maxLength"); + var _minLength = optionAPI("minLength"); + if (_maxLength && params.maxLength > _maxLength) { + params.maxLength = _maxLength; + } + if (_minLength && params.minLength < _minLength) { + params.minLength = _minLength; + } + break; + } + var value = callback(params); + if (_2.get(schema2, "nullable") && value === null) { + return value; + } + switch (schema2.type) { + case "number": + value = parseFloat(value); + break; + case "integer": + value = parseInt(value, 10); + break; + case "boolean": + value = !!value; + break; + case "string": + value = String(value); + var min = Math.max(params.minLength || 0, 0); + var max = Math.min(params.maxLength || Infinity, Infinity); + while (value.length < min) { + value += (schema2.pattern && value.length !== 0 ? "" : " ") + value; + } + if (value.length > max) { + value = value.substr(0, max); + } + break; + } + return value; + } + function merge(a, b) { + for (var key in b) { + if (typeof b[key] !== "object" || b[key] === null) { + a[key] = b[key]; + } else if (Array.isArray(b[key])) { + a[key] = a[key] || []; + b[key].forEach(function(value) { + if (a[key].indexOf(value) === -1) { + a[key].push(value); + } + }); + } else if (typeof a[key] !== "object" || a[key] === null || Array.isArray(a[key])) { + a[key] = merge({}, b[key]); + } else { + a[key] = merge(a[key], b[key]); + } + } + return a; + } + function clean(obj, isArray, requiredProps) { + if (!obj || typeof obj !== "object") { + return obj; + } + if (Array.isArray(obj)) { + obj = obj.map(function(value) { + return clean(value, true, requiredProps); + }).filter(function(value) { + return typeof value !== "undefined"; + }); + return obj; + } + Object.keys(obj).forEach(function(k) { + if (!requiredProps || requiredProps.indexOf(k) === -1) { + if (Array.isArray(obj[k]) && !obj[k].length) { + delete obj[k]; + } + } else { + obj[k] = clean(obj[k]); + } + }); + if (!Object.keys(obj).length && isArray) { + return void 0; + } + return obj; + } + function short(schema2) { + var s = JSON.stringify(schema2); + var l = JSON.stringify(schema2, null, 2); + return s.length > 400 ? l.substr(0, 400) + "..." : l; + } + function anyValue() { + return random.pick([ + false, + true, + null, + -1, + NaN, + Math.PI, + Infinity, + void 0, + [], + {}, + Math.random(), + Math.random().toString(36).substr(2) + ]); + } + function notValue(schema2, parent) { + var copy2 = merge({}, parent); + if (typeof schema2.minimum !== "undefined") { + copy2.maximum = schema2.minimum; + copy2.exclusiveMaximum = true; + } + if (typeof schema2.maximum !== "undefined") { + copy2.minimum = schema2.maximum > copy2.maximum ? 0 : schema2.maximum; + copy2.exclusiveMinimum = true; + } + if (typeof schema2.minLength !== "undefined") { + copy2.maxLength = schema2.minLength; + } + if (typeof schema2.maxLength !== "undefined") { + copy2.minLength = schema2.maxLength > copy2.maxLength ? 0 : schema2.maxLength; + } + if (schema2.type) { + copy2.type = random.pick(env.ALL_TYPES.filter(function(x) { + if (x === "number" || x === "integer") { + return schema2.type !== "number" && schema2.type !== "integer"; + } + return x !== schema2.type; + })); + } else if (schema2.enum) { + do { + var value = anyValue(); + } while (schema2.enum.indexOf(value) !== -1); + copy2.enum = [value]; + } + if (schema2.required && copy2.properties) { + schema2.required.forEach(function(prop) { + delete copy2.properties[prop]; + }); + } + return copy2; + } + function validate2(value, schemas) { + return !schemas.every(function(x) { + if (typeof x.minimum !== "undefined" && value >= x.minimum) { + return true; + } + if (typeof x.maximum !== "undefined" && value <= x.maximum) { + return true; + } + }); + } + function isKey(prop) { + return prop === "enum" || prop === "default" || prop === "required" || prop === "definitions"; + } + function omitProps(obj, props) { + var copy2 = {}; + Object.keys(obj).forEach(function(k) { + if (props.indexOf(k) === -1) { + if (Array.isArray(obj[k])) { + copy2[k] = obj[k].slice(); + } else { + copy2[k] = typeof obj[k] === "object" ? merge({}, obj[k]) : obj[k]; + } + } + }); + return copy2; + } + var utils = { + getSubAttribute, + hasProperties, + omitProps, + typecast, + merge, + clean, + short, + notValue, + anyValue, + validate: validate2, + isKey + }; + var ParseError = ( + /** @class */ + function(_super) { + tslib_es6.__extends(ParseError2, _super); + function ParseError2(message, path) { + var _this = _super.call(this) || this; + _this.path = path; + if (Error.captureStackTrace) { + Error.captureStackTrace(_this, _this.constructor); + } + _this.name = "ParseError"; + _this.message = message; + _this.path = path; + return _this; + } + return ParseError2; + }(Error) + ); + var inferredProperties = { + array: [ + "additionalItems", + "items", + "maxItems", + "minItems", + "uniqueItems" + ], + integer: [ + "exclusiveMaximum", + "exclusiveMinimum", + "maximum", + "minimum", + "multipleOf" + ], + object: [ + "additionalProperties", + "dependencies", + "maxProperties", + "minProperties", + "patternProperties", + "properties", + "required" + ], + string: [ + "maxLength", + "minLength", + "pattern" + ] + }; + inferredProperties.number = inferredProperties.integer; + var subschemaProperties = [ + "additionalItems", + "items", + "additionalProperties", + "dependencies", + "patternProperties", + "properties" + ]; + function matchesType(obj, lastElementInPath, inferredTypeProperties) { + return Object.keys(obj).filter(function(prop) { + var isSubschema = subschemaProperties.indexOf(lastElementInPath) > -1, inferredPropertyFound = inferredTypeProperties.indexOf(prop) > -1; + if (inferredPropertyFound && !isSubschema) { + return true; + } + }).length > 0; + } + function inferType(obj, schemaPath) { + for (var typeName in inferredProperties) { + var lastElementInPath = schemaPath[schemaPath.length - 1]; + if (matchesType(obj, lastElementInPath, inferredProperties[typeName])) { + return typeName; + } + } + } + function booleanGenerator() { + return optionAPI("random")() > 0.5; + } + var booleanType = booleanGenerator; + function nullGenerator() { + return null; + } + var nullType = nullGenerator; + function unique(path, items, value, sample, resolve2, traverseCallback, seenSchemaCache) { + var tmp = [], seen = []; + function walk2(obj) { + var json = JSON.stringify(obj); + if (seen.indexOf(json) === -1) { + seen.push(json); + tmp.push(obj); + } + } + items.forEach(walk2); + var limit = 10; + while (tmp.length !== items.length) { + walk2(traverseCallback(value.items || sample, path, resolve2, null, seenSchemaCache)); + if (!limit--) { + break; + } + } + return tmp; + } + var arrayType = function arrayType2(value, path, resolve2, traverseCallback, seenSchemaCache) { + var items = []; + if (!(value.items || value.additionalItems)) { + if (utils.hasProperties(value, "minItems", "maxItems", "uniqueItems")) { + throw new ParseError("missing items for " + utils.short(value), path); + } + return items; + } + var tmpItems = value.items; + if (tmpItems instanceof Array) { + return Array.prototype.concat.call(items, tmpItems.map(function(item, key) { + var itemSubpath2 = path.concat(["items", key + ""]); + return traverseCallback(item, itemSubpath2, resolve2, null, seenSchemaCache); + })); + } + var minItems = value.minItems; + var maxItems = value.maxItems; + if (typeof minItems !== "number" && maxItems && maxItems >= optionAPI("defaultMinItems")) { + minItems = optionAPI("defaultMinItems"); + } + if (typeof minItems === "number" && minItems > 0) { + maxItems = minItems; + } + typeof maxItems !== "number" && (maxItems = optionAPI("defaultMaxItems")); + if (optionAPI("minItems") && minItems === void 0) { + minItems = !maxItems ? optionAPI("minItems") : Math.min(optionAPI("minItems"), maxItems); + } + if (optionAPI("maxItems")) { + if (maxItems && maxItems > optionAPI("maxItems")) { + maxItems = optionAPI("maxItems"); + } + if (minItems && minItems > optionAPI("maxItems")) { + minItems = maxItems; + } + } + var optionalsProbability = optionAPI("alwaysFakeOptionals") === true ? 1 : optionAPI("optionalsProbability"); + var length = maxItems != null && optionalsProbability ? Math.round(maxItems * optionalsProbability) : random.number(minItems, maxItems, 1, 5), sample = typeof value.additionalItems === "object" ? value.additionalItems : {}; + for (var current = items.length; current < length; current++) { + var itemSubpath = path.concat(["items", current + ""]); + var element = traverseCallback(value.items || sample, itemSubpath, resolve2, null, seenSchemaCache); + items.push(element); + } + if (value.uniqueItems && optionAPI("useExamplesValue")) { + return unique(path.concat(["items"]), items, value, sample, resolve2, traverseCallback, seenSchemaCache); + } + return items; + }; + var numberType = function numberType2(value) { + var min = typeof value.minimum === "undefined" ? env.MIN_INTEGER : value.minimum, max = typeof value.maximum === "undefined" ? env.MAX_INTEGER : value.maximum, multipleOf = value.multipleOf; + if (multipleOf) { + max = Math.floor(max / multipleOf) * multipleOf; + min = Math.ceil(min / multipleOf) * multipleOf; + } + min = handleExclusiveMinimum(value, min); + max = handleExclusiveMaximum(value, max); + if (min > max) { + return NaN; + } + if (multipleOf) { + if (String(multipleOf).indexOf(".") === -1) { + var base = random.number(Math.floor(min / multipleOf), Math.floor(max / multipleOf)) * multipleOf; + while (base < min) { + base += value.multipleOf; + } + return base; + } + var boundary = (max - min) / multipleOf; + do { + var num = random.number(0, boundary) * multipleOf; + var fix = num / multipleOf % 1; + } while (fix !== 0); + return num; + } + return random.number(min, max, void 0, void 0, true); + }; + var integerType = function integerType2(value) { + var generated = numberType(value); + return generated > 0 ? Math.floor(generated) : Math.ceil(generated); + }; + var LIPSUM_WORDS = "Lorem ipsum dolor sit amet consectetur adipisicing elit sed do eiusmod tempor incididunt ut labore et dolore magna aliqua Ut enim ad minim veniam quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur Excepteur sint occaecat cupidatat non proident sunt in culpa qui officia deserunt mollit anim id est laborum".split(" "); + function wordsGenerator(length) { + var words2 = random.shuffle(LIPSUM_WORDS); + return words2.slice(0, length); + } + var anyType = { type: ["string", "number", "integer", "boolean"] }; + var objectType = function objectType2(value, path, resolve2, traverseCallback, seenSchemaCache) { + const props = {}; + const properties = value.properties || {}; + const patternProperties = value.patternProperties || {}; + const requiredProperties = !Array.isArray(value.required) ? [] : (value.required || []).slice(); + const allowsAdditional = value.additionalProperties !== false; + const propertyKeys = Object.keys(properties); + const patternPropertyKeys = Object.keys(patternProperties); + const optionalProperties = propertyKeys.concat(patternPropertyKeys).reduce((_response, _key) => { + if (requiredProperties.indexOf(_key) === -1) _response.push(_key); + return _response; + }, []); + const allProperties = requiredProperties.concat(optionalProperties); + const additionalProperties = allowsAdditional ? value.additionalProperties === true ? anyType : value.additionalProperties : value.additionalProperties; + if (!allowsAdditional && propertyKeys.length === 0 && patternPropertyKeys.length === 0 && utils.hasProperties(value, "minProperties", "maxProperties", "dependencies", "required")) { + return null; + } + if (optionAPI("requiredOnly") === true) { + requiredProperties.forEach((key) => { + if (properties[key]) { + props[key] = properties[key]; + } + }); + return traverseCallback(props, path.concat(["properties"]), resolve2, value, seenSchemaCache); + } + const optionalsProbability = optionAPI("alwaysFakeOptionals") === true ? 1 : optionAPI("optionalsProbability"); + const fixedProbabilities = optionAPI("alwaysFakeOptionals") || optionAPI("fixedProbabilities") || false; + const ignoreProperties = optionAPI("ignoreProperties") || []; + const reuseProps = optionAPI("reuseProperties"); + const fillProps = optionAPI("fillProperties"); + const max = value.maxProperties || allProperties.length + (allowsAdditional ? random.number(1, 5) : 0); + let min = Math.max(value.minProperties || 0, requiredProperties.length); + let neededExtras = Math.max(0, allProperties.length - min); + if (optionalsProbability !== null) { + if (fixedProbabilities === true) { + neededExtras = Math.round(min - requiredProperties.length + optionalsProbability * (allProperties.length - min)); + } else { + neededExtras = random.number(min - requiredProperties.length, optionalsProbability * (allProperties.length - min)); + } + } + const extraPropertiesRandomOrder = random.shuffle(optionalProperties).slice(0, neededExtras); + const extraProperties = optionalProperties.filter((_item) => { + return extraPropertiesRandomOrder.indexOf(_item) !== -1; + }); + const _limit = optionalsProbability !== null || requiredProperties.length === max ? max : random.number(0, max); + const _props = requiredProperties.concat(extraProperties).slice(0, max); + const _defns = []; + if (value.dependencies) { + Object.keys(value.dependencies).forEach((prop) => { + const _required = value.dependencies[prop]; + if (_props.indexOf(prop) !== -1) { + if (Array.isArray(_required)) { + _required.forEach((sub) => { + if (_props.indexOf(sub) === -1) { + _props.push(sub); + } + }); + } else { + _defns.push(_required); + } + } + }); + if (_defns.length) { + delete value.dependencies; + return traverseCallback({ + allOf: _defns.concat(value) + }, path.concat(["properties"]), resolve2, value, seenSchemaCache); + } + } + const skipped = []; + const missing = []; + _props.forEach((key) => { + for (let i = 0; i < ignoreProperties.length; i += 1) { + if (ignoreProperties[i] instanceof RegExp && ignoreProperties[i].test(key) || typeof ignoreProperties[i] === "string" && ignoreProperties[i] === key || typeof ignoreProperties[i] === "function" && ignoreProperties[i](properties[key], key)) { + skipped.push(key); + return; + } + } + if (additionalProperties === false) { + if (requiredProperties.indexOf(key) !== -1) { + props[key] = properties[key]; + } + } + if (properties[key]) { + props[key] = properties[key]; + } + let found; + patternPropertyKeys.forEach((_key) => { + if (key.match(new RegExp(_key))) { + found = true; + if (props[key]) { + utils.merge(props[key], patternProperties[_key]); + } else { + props[random.randexp(key)] = patternProperties[_key]; + } + } + }); + if (!found) { + const subschema = patternProperties[key] || additionalProperties; + if (subschema && additionalProperties !== false) { + props[patternProperties[key] ? random.randexp(key) : key] = properties[key] || subschema; + } else { + missing.push(key); + } + } + }); + let current = Object.keys(props).length + (fillProps ? 0 : skipped.length); + const hash2 = (suffix) => random.randexp(`_?[_a-f\\d]{1,3}${suffix ? "\\$?" : ""}`); + function get(from) { + let one; + do { + if (!from.length) break; + one = from.shift(); + } while (props[one]); + return one; + } + let minProps = min; + if (allowsAdditional && !requiredProperties.length) { + minProps = Math.max(optionalsProbability === null || additionalProperties ? random.number(fillProps ? 1 : 0, max) : 0, min); + } + while (fillProps) { + if (!(patternPropertyKeys.length || allowsAdditional)) { + break; + } + if (current >= minProps) { + break; + } + if (allowsAdditional) { + if (reuseProps && propertyKeys.length - current > minProps) { + let count = 0; + let key; + do { + count += 1; + if (count > 1e3) { + break; + } + key = get(requiredProperties) || random.pick(propertyKeys); + } while (typeof props[key] !== "undefined"); + if (typeof props[key] === "undefined") { + props[key] = properties[key]; + current += 1; + } + } else if (patternPropertyKeys.length && !additionalProperties) { + const prop = random.pick(patternPropertyKeys); + const word = random.randexp(prop); + if (!props[word]) { + props[word] = patternProperties[prop]; + current += 1; + } + } else { + const word = get(requiredProperties) || wordsGenerator(1) + hash2(); + if (!props[word]) { + props[word] = additionalProperties || anyType; + current += 1; + } + } + } + for (let i = 0; current < min && i < patternPropertyKeys.length; i += 1) { + const _key = patternPropertyKeys[i]; + const word = random.randexp(_key); + if (!props[word]) { + props[word] = patternProperties[_key]; + current += 1; + } + } + } + if (requiredProperties.length === 0 && (!allowsAdditional || optionalsProbability === false)) { + const maximum = random.number(min, max); + for (; current < maximum; ) { + const word = get(propertyKeys); + if (word) { + props[word] = properties[word]; + } + current += 1; + } + } + return traverseCallback(props, path.concat(["properties"]), resolve2, value, seenSchemaCache); + }; + function produce() { + var length = random.number(1, 5); + return wordsGenerator(length).join(" "); + } + function thunkGenerator(min, max) { + if (min === void 0) { + min = 0; + } + if (max === void 0) { + max = 140; + } + var min = Math.max(0, min), max = random.number(min, max), result = produce(); + while (result.length < min) { + result += produce(); + } + if (result.length > max) { + result = result.substr(0, max); + } + return result; + } + function ipv4Generator() { + return [0, 0, 0, 0].map(function() { + return random.number(0, 255); + }).join("."); + } + function dateTimeGenerator() { + return random.date().toISOString(); + } + function dateGenerator() { + return dateTimeGenerator().slice(0, 10); + } + function timeGenerator() { + return dateTimeGenerator().slice(11); + } + const FRAGMENT = "[a-zA-Z][a-zA-Z0-9+-.]*"; + const URI_PATTERN = `https?://{hostname}(?:${FRAGMENT})+`; + const PARAM_PATTERN = "(?:\\?([a-z]{1,7}(=\\w{1,5})?&){0,3})?"; + var regexps = { + email: "[a-zA-Z\\d][a-zA-Z\\d-]{1,13}[a-zA-Z\\d]@{hostname}", + hostname: "[a-zA-Z]{1,33}\\.[a-z]{2,4}", + ipv6: "[a-f\\d]{4}(:[a-f\\d]{4}){7}", + uri: URI_PATTERN, + slug: "[a-zA-Z\\d_-]+", + // types from draft-0[67] (?) + "uri-reference": `${URI_PATTERN}${PARAM_PATTERN}`, + /** + * CHANGE: Corrected uri-template format to be inline with RFC-6570 + * https://www.rfc-editor.org/rfc/rfc6570#section-2 + */ + "uri-template": URI_PATTERN.replace("(?:", "(?:/\\{[a-z][a-zA-Z0-9]*\\}|"), + "json-pointer": `(/(?:${FRAGMENT.replace("]*", "/]*")}|~[01]))+`, + // some types from https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.1.md#data-types (?) + uuid: "^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$" + }; + regexps.iri = regexps["uri-reference"]; + regexps["iri-reference"] = regexps["uri-reference"]; + regexps["idn-email"] = regexps.email; + regexps["idn-hostname"] = regexps.hostname; + function coreFormatGenerator(coreFormat) { + return random.randexp(regexps[coreFormat]).replace(/\{(\w+)\}/, function(match, key) { + return random.randexp(regexps[key]); + }); + } + function generateFormat(value, invalid) { + var callback = formatAPI(value.format); + if (typeof callback === "function") { + return callback(value); + } + switch (value.format) { + case "date-time": + case "datetime": + return dateTimeGenerator(); + case "date": + return dateGenerator(); + case "time": + return timeGenerator(); + case "ipv4": + return ipv4Generator(); + case "regex": + return ".+?"; + case "email": + case "hostname": + case "ipv6": + case "uri": + case "uri-reference": + case "iri": + case "iri-reference": + case "idn-email": + case "idn-hostname": + case "json-pointer": + case "slug": + case "uri-template": + case "uuid": + return coreFormatGenerator(value.format); + default: + if (typeof callback === "undefined") { + if (optionAPI("failOnInvalidFormat")) { + throw new Error("unknown registry key " + utils.short(value.format)); + } else { + return invalid(); + } + } + throw new Error('unsupported format "' + value.format + '"'); + } + } + var stringType = function stringType2(value) { + var output; + output = utils.typecast(value, function(opts) { + if (value.format) { + return generateFormat(value, function() { + return thunkGenerator(opts.minLength, opts.maxLength); + }); + } + if (value.pattern) { + return random.randexp(value.pattern); + } + return thunkGenerator(opts.minLength, opts.maxLength); + }); + return output; + }; + var typeMap = { + boolean: booleanType, + null: nullType, + array: arrayType, + integer: integerType, + number: numberType, + object: objectType, + string: stringType + }; + function traverse(schema2, path, resolve2, rootSchema, seenSchemaCache) { + schema2 = resolve2(schema2); + if (!schema2) { + return; + } + if (optionAPI("useExamplesValue") && "example" in schema2) { + var clonedSchema, result, isExampleValid, hashSchema = hash(schema2); + if (seenSchemaCache && seenSchemaCache.has(hashSchema)) { + isExampleValid = seenSchemaCache.get(hashSchema); + } else { + if (optionAPI("avoidExampleItemsLength") && _2.get(schema2, "type") === "array") { + clonedSchema = _2.clone(schema2); + _2.unset(clonedSchema, "minItems"); + _2.unset(clonedSchema, "maxItems"); + result = validateSchema(clonedSchema, schema2.example, { ignoreUnresolvedVariables: true }); + } else { + result = validateSchema(schema2, schema2.example, { ignoreUnresolvedVariables: true }); + } + isExampleValid = result && result.length === 0; + seenSchemaCache && seenSchemaCache.set(hashSchema, isExampleValid); + } + if (isExampleValid) { + return schema2.example; + } + } + if (optionAPI("useDefaultValue") && "default" in schema2) { + if (!(_2.has(schema2.default, "type") && _2.includes(ALL_TYPES, schema2.default.type))) { + return schema2.default; + } + } + if (schema2.not && typeof schema2.not === "object") { + schema2 = utils.notValue(schema2.not, utils.omitProps(schema2, ["not"])); + } + if (Array.isArray(schema2.enum)) { + return utils.typecast(schema2, function() { + return random.pick(schema2.enum); + }); + } + if (typeof schema2.thunk === "function") { + return traverse(schema2.thunk(), path, resolve2, null, seenSchemaCache); + } + if (typeof schema2.generate === "function") { + return utils.typecast(schema2, function() { + return schema2.generate(rootSchema); + }); + } + var type = schema2.type; + if (Array.isArray(type)) { + type = random.pick(type); + } else if (typeof type === "undefined") { + type = inferType(schema2, path) || type; + if (type) { + schema2.type = type; + } + } + if (typeof type === "string") { + if (!typeMap[type]) { + if (optionAPI("failOnInvalidTypes")) { + throw new ParseError("unknown primitive " + utils.short(type), path.concat(["type"])); + } else { + return optionAPI("defaultInvalidTypeProduct"); + } + } else { + try { + var result = typeMap[type](schema2, path, resolve2, traverse, seenSchemaCache); + var required = schema2.items ? schema2.items.required : schema2.required; + return utils.clean(result, null, required); + } catch (e) { + if (typeof e.path === "undefined") { + throw new ParseError(e.message, path); + } + throw e; + } + } + } + var copy2 = {}; + if (Array.isArray(schema2)) { + copy2 = []; + } + for (var prop in schema2) { + if (typeof schema2[prop] === "object" && prop !== "definitions") { + copy2[prop] = traverse(schema2[prop], path.concat([prop]), resolve2, copy2, seenSchemaCache); + } else { + copy2[prop] = schema2[prop]; + } + } + return copy2; + } + function pick$1(data) { + return Array.isArray(data) ? random.pick(data) : data; + } + function cycle(data, reverse) { + if (!Array.isArray(data)) { + return data; + } + var value = reverse ? data.pop() : data.shift(); + if (reverse) { + data.unshift(value); + } else { + data.push(value); + } + return value; + } + function resolve(obj, data, values, property) { + if (!obj || typeof obj !== "object") { + return obj; + } + if (!values) { + values = {}; + } + if (!data) { + data = obj; + } + if (Array.isArray(obj)) { + return obj.map(function(x) { + return resolve(x, data, values, property); + }); + } + if (obj.jsonPath) { + var params = typeof obj.jsonPath !== "object" ? { path: obj.jsonPath } : obj.jsonPath; + params.group = obj.group || params.group || property; + params.cycle = obj.cycle || params.cycle || false; + params.reverse = obj.reverse || params.reverse || false; + params.count = obj.count || params.count || 1; + var key = params.group + "__" + params.path; + if (!values[key]) { + if (params.count > 1) { + values[key] = jsonpath$1.query(data, params.path, params.count); + } else { + values[key] = jsonpath$1.value(data, params.path); + } + } + if (params.cycle || params.reverse) { + return cycle(values[key], params.reverse); + } + return pick$1(values[key]); + } + Object.keys(obj).forEach(function(k) { + obj[k] = resolve(obj[k], data, values, k); + }); + return obj; + } + function run(refs, schema2, container2, seenSchemaCache) { + try { + var result = traverse(schema2, [], function reduce(sub, maxReduceDepth) { + if (typeof maxReduceDepth === "undefined") { + maxReduceDepth = random.number(1, 3); + } + if (!sub) { + return null; + } + if (typeof sub.generate === "function") { + return sub; + } + if (sub.id && typeof sub.id === "string") { + delete sub.id; + delete sub.$schema; + } + if (typeof sub.$ref === "string") { + if (sub.$ref === "#") { + delete sub.$ref; + return sub; + } + if (sub.$ref.indexOf("#/") === -1) { + var ref = deref.util.findByRef(sub.$ref, refs); + if (!ref) { + throw new Error("Reference not found: " + sub.$ref); + } + return ref; + } + delete sub.$ref; + return sub; + } + if (Array.isArray(sub.allOf)) { + var schemas = sub.allOf; + delete sub.allOf; + schemas.forEach(function(subSchema) { + var _sub = reduce(subSchema, maxReduceDepth + 1); + utils.merge(sub, typeof _sub.thunk === "function" ? _sub.thunk() : _sub); + }); + } + if (Array.isArray(sub.oneOf || sub.anyOf)) { + var mix = sub.oneOf || sub.anyOf; + if (sub.enum && sub.oneOf) { + sub.enum = sub.enum.filter(function(x) { + return utils.validate(x, mix); + }); + } + delete sub.anyOf; + delete sub.oneOf; + return { + thunk: function() { + var copy2 = utils.merge({}, sub); + utils.merge(copy2, random.pick(mix)); + return copy2; + } + }; + } + for (var prop in sub) { + if ((Array.isArray(sub[prop]) || typeof sub[prop] === "object") && !utils.isKey(prop)) { + sub[prop] = reduce(sub[prop], maxReduceDepth); + } + } + return container2.wrap(sub); + }, null, seenSchemaCache); + if (optionAPI("resolveJsonPath")) { + return resolve(result); + } + return result; + } catch (e) { + if (e.path) { + throw new Error(e.message + " in /" + e.path.join("/")); + } else { + throw e; + } + } + } + var container = new Container(); + function getRefs(refs) { + var $refs = {}; + if (Array.isArray(refs)) { + refs.map(deref.util.normalizeSchema).forEach(function(schema2) { + $refs[schema2.id] = schema2; + }); + } else { + $refs = refs || {}; + } + return $refs; + } + function walk(obj, cb) { + var keys = Object.keys(obj); + var retval; + for (var i = 0; i < keys.length; i += 1) { + retval = cb(obj[keys[i]], keys[i], obj); + if (!retval && obj[keys[i]] && !Array.isArray(obj[keys[i]]) && typeof obj[keys[i]] === "object") { + retval = walk(obj[keys[i]], cb); + } + if (typeof retval !== "undefined") { + return retval; + } + } + } + var jsf = function(schema2, refs, seenSchemaCache) { + var ignore = optionAPI("ignoreMissingRefs"); + var $ = deref(function(id, refs2) { + if (ignore) { + return {}; + } + }); + var $refs = getRefs(refs); + return run($refs, $(schema2, $refs, true), container, seenSchemaCache); + }; + jsf.resolve = function(schema2, refs, cwd) { + if (typeof refs === "string") { + cwd = refs; + refs = {}; + } + cwd = cwd || (typeof process !== "undefined" ? process.cwd() : ""); + cwd = cwd.replace(/\/+$/, "") + "/"; + var $refs = getRefs(refs); + var fixedRefs = { + order: 300, + canRead: true, + read: function(file, callback) { + var id = cwd !== "/" ? file.url.replace(cwd, "") : file.url; + try { + callback(null, deref.util.findByRef(id, $refs)); + } catch (e) { + var result = walk(schema2, function(v, k, sub) { + if (k === "id" && v === id) { + return sub; + } + }); + if (!result) { + return callback(e); + } + callback(null, result); + } + } + }; + return $RefParser.dereference(cwd, schema2, { + resolve: { fixedRefs }, + dereference: { + circular: "ignore" + } + }).then(function(sub) { + return run($refs, sub, container); + }); + }; + jsf.format = formatAPI; + jsf.option = optionAPI; + jsf.random = random; + container.define("pattern", random.randexp); + container.define("jsonPath", function(value, schema2) { + delete schema2.type; + return schema2; + }); + container.define("autoIncrement", function(value, schema2) { + if (!this.offset) { + var min = schema2.minimum || 1; + var max = min + env.MAX_NUMBER; + var offset = value.initialOffset || schema2.initialOffset; + this.offset = offset || random.number(min, max); + } + if (value === true) { + return this.offset++; + } + return schema2; + }); + container.define("sequentialDate", function(value, schema2) { + if (!this.now) { + this.now = random.date(); + } + if (value) { + schema2 = this.now.toISOString(); + value = value === true ? "days" : value; + if (["seconds", "minutes", "hours", "days", "weeks", "months", "years"].indexOf(value) === -1) { + throw new Error("Unsupported increment by " + utils.short(value)); + } + this.now.setTime(this.now.getTime() + random.date(value)); + } + return schema2; + }); + jsf.extend = function(name, cb) { + container.extend(name, cb); + return jsf; + }; + jsf.define = function(name, cb) { + container.define(name, cb); + return jsf; + }; + jsf.locate = function(name) { + return container.get(name); + }; + var VERSION = "0.5.0-rc15"; + jsf.version = VERSION; + var lib$2 = jsf; + return lib$2; + }); + } +}); + +// ../../node_modules/lodash/_listCacheClear.js +var require_listCacheClear = __commonJS({ + "../../node_modules/lodash/_listCacheClear.js"(exports2, module2) { + function listCacheClear() { + this.__data__ = []; + this.size = 0; + } + module2.exports = listCacheClear; + } +}); + +// ../../node_modules/lodash/eq.js +var require_eq2 = __commonJS({ + "../../node_modules/lodash/eq.js"(exports2, module2) { + function eq(value, other) { + return value === other || value !== value && other !== other; + } + module2.exports = eq; + } +}); + +// ../../node_modules/lodash/_assocIndexOf.js +var require_assocIndexOf = __commonJS({ + "../../node_modules/lodash/_assocIndexOf.js"(exports2, module2) { + var eq = require_eq2(); + function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (eq(array[length][0], key)) { + return length; + } + } + return -1; + } + module2.exports = assocIndexOf; + } +}); + +// ../../node_modules/lodash/_listCacheDelete.js +var require_listCacheDelete = __commonJS({ + "../../node_modules/lodash/_listCacheDelete.js"(exports2, module2) { + var assocIndexOf = require_assocIndexOf(); + var arrayProto = Array.prototype; + var splice = arrayProto.splice; + function listCacheDelete(key) { + var data = this.__data__, index = assocIndexOf(data, key); + if (index < 0) { + return false; + } + var lastIndex = data.length - 1; + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); + } + --this.size; + return true; + } + module2.exports = listCacheDelete; + } +}); + +// ../../node_modules/lodash/_listCacheGet.js +var require_listCacheGet = __commonJS({ + "../../node_modules/lodash/_listCacheGet.js"(exports2, module2) { + var assocIndexOf = require_assocIndexOf(); + function listCacheGet(key) { + var data = this.__data__, index = assocIndexOf(data, key); + return index < 0 ? void 0 : data[index][1]; + } + module2.exports = listCacheGet; + } +}); + +// ../../node_modules/lodash/_listCacheHas.js +var require_listCacheHas = __commonJS({ + "../../node_modules/lodash/_listCacheHas.js"(exports2, module2) { + var assocIndexOf = require_assocIndexOf(); + function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; + } + module2.exports = listCacheHas; + } +}); + +// ../../node_modules/lodash/_listCacheSet.js +var require_listCacheSet = __commonJS({ + "../../node_modules/lodash/_listCacheSet.js"(exports2, module2) { + var assocIndexOf = require_assocIndexOf(); + function listCacheSet(key, value) { + var data = this.__data__, index = assocIndexOf(data, key); + if (index < 0) { + ++this.size; + data.push([key, value]); + } else { + data[index][1] = value; + } + return this; + } + module2.exports = listCacheSet; + } +}); + +// ../../node_modules/lodash/_ListCache.js +var require_ListCache = __commonJS({ + "../../node_modules/lodash/_ListCache.js"(exports2, module2) { + var listCacheClear = require_listCacheClear(); + var listCacheDelete = require_listCacheDelete(); + var listCacheGet = require_listCacheGet(); + var listCacheHas = require_listCacheHas(); + var listCacheSet = require_listCacheSet(); + function ListCache(entries) { + var index = -1, length = entries == null ? 0 : entries.length; + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + ListCache.prototype.clear = listCacheClear; + ListCache.prototype["delete"] = listCacheDelete; + ListCache.prototype.get = listCacheGet; + ListCache.prototype.has = listCacheHas; + ListCache.prototype.set = listCacheSet; + module2.exports = ListCache; + } +}); + +// ../../node_modules/lodash/_stackClear.js +var require_stackClear = __commonJS({ + "../../node_modules/lodash/_stackClear.js"(exports2, module2) { + var ListCache = require_ListCache(); + function stackClear() { + this.__data__ = new ListCache(); + this.size = 0; + } + module2.exports = stackClear; + } +}); + +// ../../node_modules/lodash/_stackDelete.js +var require_stackDelete = __commonJS({ + "../../node_modules/lodash/_stackDelete.js"(exports2, module2) { + function stackDelete(key) { + var data = this.__data__, result = data["delete"](key); + this.size = data.size; + return result; + } + module2.exports = stackDelete; + } +}); + +// ../../node_modules/lodash/_stackGet.js +var require_stackGet = __commonJS({ + "../../node_modules/lodash/_stackGet.js"(exports2, module2) { + function stackGet(key) { + return this.__data__.get(key); + } + module2.exports = stackGet; + } +}); + +// ../../node_modules/lodash/_stackHas.js +var require_stackHas = __commonJS({ + "../../node_modules/lodash/_stackHas.js"(exports2, module2) { + function stackHas(key) { + return this.__data__.has(key); + } + module2.exports = stackHas; + } +}); + +// ../../node_modules/lodash/_freeGlobal.js +var require_freeGlobal = __commonJS({ + "../../node_modules/lodash/_freeGlobal.js"(exports2, module2) { + var freeGlobal = typeof global == "object" && global && global.Object === Object && global; + module2.exports = freeGlobal; + } +}); + +// ../../node_modules/lodash/_root.js +var require_root = __commonJS({ + "../../node_modules/lodash/_root.js"(exports2, module2) { + var freeGlobal = require_freeGlobal(); + var freeSelf = typeof self == "object" && self && self.Object === Object && self; + var root = freeGlobal || freeSelf || Function("return this")(); + module2.exports = root; + } +}); + +// ../../node_modules/lodash/_Symbol.js +var require_Symbol = __commonJS({ + "../../node_modules/lodash/_Symbol.js"(exports2, module2) { + var root = require_root(); + var Symbol2 = root.Symbol; + module2.exports = Symbol2; + } +}); + +// ../../node_modules/lodash/_getRawTag.js +var require_getRawTag = __commonJS({ + "../../node_modules/lodash/_getRawTag.js"(exports2, module2) { + var Symbol2 = require_Symbol(); + var objectProto = Object.prototype; + var hasOwnProperty = objectProto.hasOwnProperty; + var nativeObjectToString = objectProto.toString; + var symToStringTag = Symbol2 ? Symbol2.toStringTag : void 0; + function getRawTag(value) { + var isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag]; + try { + value[symToStringTag] = void 0; + var unmasked = true; + } catch (e) { + } + var result = nativeObjectToString.call(value); + if (unmasked) { + if (isOwn) { + value[symToStringTag] = tag; + } else { + delete value[symToStringTag]; + } + } + return result; + } + module2.exports = getRawTag; + } +}); + +// ../../node_modules/lodash/_objectToString.js +var require_objectToString = __commonJS({ + "../../node_modules/lodash/_objectToString.js"(exports2, module2) { + var objectProto = Object.prototype; + var nativeObjectToString = objectProto.toString; + function objectToString(value) { + return nativeObjectToString.call(value); + } + module2.exports = objectToString; + } +}); + +// ../../node_modules/lodash/_baseGetTag.js +var require_baseGetTag = __commonJS({ + "../../node_modules/lodash/_baseGetTag.js"(exports2, module2) { + var Symbol2 = require_Symbol(); + var getRawTag = require_getRawTag(); + var objectToString = require_objectToString(); + var nullTag = "[object Null]"; + var undefinedTag = "[object Undefined]"; + var symToStringTag = Symbol2 ? Symbol2.toStringTag : void 0; + function baseGetTag(value) { + if (value == null) { + return value === void 0 ? undefinedTag : nullTag; + } + return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value); + } + module2.exports = baseGetTag; + } +}); + +// ../../node_modules/lodash/isObject.js +var require_isObject = __commonJS({ + "../../node_modules/lodash/isObject.js"(exports2, module2) { + function isObject(value) { + var type = typeof value; + return value != null && (type == "object" || type == "function"); + } + module2.exports = isObject; + } +}); + +// ../../node_modules/lodash/isFunction.js +var require_isFunction = __commonJS({ + "../../node_modules/lodash/isFunction.js"(exports2, module2) { + var baseGetTag = require_baseGetTag(); + var isObject = require_isObject(); + var asyncTag = "[object AsyncFunction]"; + var funcTag = "[object Function]"; + var genTag = "[object GeneratorFunction]"; + var proxyTag = "[object Proxy]"; + function isFunction(value) { + if (!isObject(value)) { + return false; + } + var tag = baseGetTag(value); + return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; + } + module2.exports = isFunction; + } +}); + +// ../../node_modules/lodash/_coreJsData.js +var require_coreJsData = __commonJS({ + "../../node_modules/lodash/_coreJsData.js"(exports2, module2) { + var root = require_root(); + var coreJsData = root["__core-js_shared__"]; + module2.exports = coreJsData; + } +}); + +// ../../node_modules/lodash/_isMasked.js +var require_isMasked = __commonJS({ + "../../node_modules/lodash/_isMasked.js"(exports2, module2) { + var coreJsData = require_coreJsData(); + var maskSrcKey = function() { + var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ""); + return uid ? "Symbol(src)_1." + uid : ""; + }(); + function isMasked(func) { + return !!maskSrcKey && maskSrcKey in func; + } + module2.exports = isMasked; + } +}); + +// ../../node_modules/lodash/_toSource.js +var require_toSource = __commonJS({ + "../../node_modules/lodash/_toSource.js"(exports2, module2) { + var funcProto = Function.prototype; + var funcToString = funcProto.toString; + function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch (e) { + } + try { + return func + ""; + } catch (e) { + } + } + return ""; + } + module2.exports = toSource; + } +}); + +// ../../node_modules/lodash/_baseIsNative.js +var require_baseIsNative = __commonJS({ + "../../node_modules/lodash/_baseIsNative.js"(exports2, module2) { + var isFunction = require_isFunction(); + var isMasked = require_isMasked(); + var isObject = require_isObject(); + var toSource = require_toSource(); + var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; + var reIsHostCtor = /^\[object .+?Constructor\]$/; + var funcProto = Function.prototype; + var objectProto = Object.prototype; + var funcToString = funcProto.toString; + var hasOwnProperty = objectProto.hasOwnProperty; + var reIsNative = RegExp( + "^" + funcToString.call(hasOwnProperty).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$" + ); + function baseIsNative(value) { + if (!isObject(value) || isMasked(value)) { + return false; + } + var pattern = isFunction(value) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); + } + module2.exports = baseIsNative; + } +}); + +// ../../node_modules/lodash/_getValue.js +var require_getValue = __commonJS({ + "../../node_modules/lodash/_getValue.js"(exports2, module2) { + function getValue(object, key) { + return object == null ? void 0 : object[key]; + } + module2.exports = getValue; + } +}); + +// ../../node_modules/lodash/_getNative.js +var require_getNative = __commonJS({ + "../../node_modules/lodash/_getNative.js"(exports2, module2) { + var baseIsNative = require_baseIsNative(); + var getValue = require_getValue(); + function getNative(object, key) { + var value = getValue(object, key); + return baseIsNative(value) ? value : void 0; + } + module2.exports = getNative; + } +}); + +// ../../node_modules/lodash/_Map.js +var require_Map = __commonJS({ + "../../node_modules/lodash/_Map.js"(exports2, module2) { + var getNative = require_getNative(); + var root = require_root(); + var Map2 = getNative(root, "Map"); + module2.exports = Map2; + } +}); + +// ../../node_modules/lodash/_nativeCreate.js +var require_nativeCreate = __commonJS({ + "../../node_modules/lodash/_nativeCreate.js"(exports2, module2) { + var getNative = require_getNative(); + var nativeCreate = getNative(Object, "create"); + module2.exports = nativeCreate; + } +}); + +// ../../node_modules/lodash/_hashClear.js +var require_hashClear = __commonJS({ + "../../node_modules/lodash/_hashClear.js"(exports2, module2) { + var nativeCreate = require_nativeCreate(); + function hashClear() { + this.__data__ = nativeCreate ? nativeCreate(null) : {}; + this.size = 0; + } + module2.exports = hashClear; + } +}); + +// ../../node_modules/lodash/_hashDelete.js +var require_hashDelete = __commonJS({ + "../../node_modules/lodash/_hashDelete.js"(exports2, module2) { + function hashDelete(key) { + var result = this.has(key) && delete this.__data__[key]; + this.size -= result ? 1 : 0; + return result; + } + module2.exports = hashDelete; + } +}); + +// ../../node_modules/lodash/_hashGet.js +var require_hashGet = __commonJS({ + "../../node_modules/lodash/_hashGet.js"(exports2, module2) { + var nativeCreate = require_nativeCreate(); + var HASH_UNDEFINED = "__lodash_hash_undefined__"; + var objectProto = Object.prototype; + var hasOwnProperty = objectProto.hasOwnProperty; + function hashGet(key) { + var data = this.__data__; + if (nativeCreate) { + var result = data[key]; + return result === HASH_UNDEFINED ? void 0 : result; + } + return hasOwnProperty.call(data, key) ? data[key] : void 0; + } + module2.exports = hashGet; + } +}); + +// ../../node_modules/lodash/_hashHas.js +var require_hashHas = __commonJS({ + "../../node_modules/lodash/_hashHas.js"(exports2, module2) { + var nativeCreate = require_nativeCreate(); + var objectProto = Object.prototype; + var hasOwnProperty = objectProto.hasOwnProperty; + function hashHas(key) { + var data = this.__data__; + return nativeCreate ? data[key] !== void 0 : hasOwnProperty.call(data, key); + } + module2.exports = hashHas; + } +}); + +// ../../node_modules/lodash/_hashSet.js +var require_hashSet = __commonJS({ + "../../node_modules/lodash/_hashSet.js"(exports2, module2) { + var nativeCreate = require_nativeCreate(); + var HASH_UNDEFINED = "__lodash_hash_undefined__"; + function hashSet(key, value) { + var data = this.__data__; + this.size += this.has(key) ? 0 : 1; + data[key] = nativeCreate && value === void 0 ? HASH_UNDEFINED : value; + return this; + } + module2.exports = hashSet; + } +}); + +// ../../node_modules/lodash/_Hash.js +var require_Hash = __commonJS({ + "../../node_modules/lodash/_Hash.js"(exports2, module2) { + var hashClear = require_hashClear(); + var hashDelete = require_hashDelete(); + var hashGet = require_hashGet(); + var hashHas = require_hashHas(); + var hashSet = require_hashSet(); + function Hash(entries) { + var index = -1, length = entries == null ? 0 : entries.length; + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + Hash.prototype.clear = hashClear; + Hash.prototype["delete"] = hashDelete; + Hash.prototype.get = hashGet; + Hash.prototype.has = hashHas; + Hash.prototype.set = hashSet; + module2.exports = Hash; + } +}); + +// ../../node_modules/lodash/_mapCacheClear.js +var require_mapCacheClear = __commonJS({ + "../../node_modules/lodash/_mapCacheClear.js"(exports2, module2) { + var Hash = require_Hash(); + var ListCache = require_ListCache(); + var Map2 = require_Map(); + function mapCacheClear() { + this.size = 0; + this.__data__ = { + "hash": new Hash(), + "map": new (Map2 || ListCache)(), + "string": new Hash() + }; + } + module2.exports = mapCacheClear; + } +}); + +// ../../node_modules/lodash/_isKeyable.js +var require_isKeyable = __commonJS({ + "../../node_modules/lodash/_isKeyable.js"(exports2, module2) { + function isKeyable(value) { + var type = typeof value; + return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null; + } + module2.exports = isKeyable; + } +}); + +// ../../node_modules/lodash/_getMapData.js +var require_getMapData = __commonJS({ + "../../node_modules/lodash/_getMapData.js"(exports2, module2) { + var isKeyable = require_isKeyable(); + function getMapData(map, key) { + var data = map.__data__; + return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map; + } + module2.exports = getMapData; + } +}); + +// ../../node_modules/lodash/_mapCacheDelete.js +var require_mapCacheDelete = __commonJS({ + "../../node_modules/lodash/_mapCacheDelete.js"(exports2, module2) { + var getMapData = require_getMapData(); + function mapCacheDelete(key) { + var result = getMapData(this, key)["delete"](key); + this.size -= result ? 1 : 0; + return result; + } + module2.exports = mapCacheDelete; + } +}); + +// ../../node_modules/lodash/_mapCacheGet.js +var require_mapCacheGet = __commonJS({ + "../../node_modules/lodash/_mapCacheGet.js"(exports2, module2) { + var getMapData = require_getMapData(); + function mapCacheGet(key) { + return getMapData(this, key).get(key); + } + module2.exports = mapCacheGet; + } +}); + +// ../../node_modules/lodash/_mapCacheHas.js +var require_mapCacheHas = __commonJS({ + "../../node_modules/lodash/_mapCacheHas.js"(exports2, module2) { + var getMapData = require_getMapData(); + function mapCacheHas(key) { + return getMapData(this, key).has(key); + } + module2.exports = mapCacheHas; + } +}); + +// ../../node_modules/lodash/_mapCacheSet.js +var require_mapCacheSet = __commonJS({ + "../../node_modules/lodash/_mapCacheSet.js"(exports2, module2) { + var getMapData = require_getMapData(); + function mapCacheSet(key, value) { + var data = getMapData(this, key), size = data.size; + data.set(key, value); + this.size += data.size == size ? 0 : 1; + return this; + } + module2.exports = mapCacheSet; + } +}); + +// ../../node_modules/lodash/_MapCache.js +var require_MapCache = __commonJS({ + "../../node_modules/lodash/_MapCache.js"(exports2, module2) { + var mapCacheClear = require_mapCacheClear(); + var mapCacheDelete = require_mapCacheDelete(); + var mapCacheGet = require_mapCacheGet(); + var mapCacheHas = require_mapCacheHas(); + var mapCacheSet = require_mapCacheSet(); + function MapCache(entries) { + var index = -1, length = entries == null ? 0 : entries.length; + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + MapCache.prototype.clear = mapCacheClear; + MapCache.prototype["delete"] = mapCacheDelete; + MapCache.prototype.get = mapCacheGet; + MapCache.prototype.has = mapCacheHas; + MapCache.prototype.set = mapCacheSet; + module2.exports = MapCache; + } +}); + +// ../../node_modules/lodash/_stackSet.js +var require_stackSet = __commonJS({ + "../../node_modules/lodash/_stackSet.js"(exports2, module2) { + var ListCache = require_ListCache(); + var Map2 = require_Map(); + var MapCache = require_MapCache(); + var LARGE_ARRAY_SIZE = 200; + function stackSet(key, value) { + var data = this.__data__; + if (data instanceof ListCache) { + var pairs = data.__data__; + if (!Map2 || pairs.length < LARGE_ARRAY_SIZE - 1) { + pairs.push([key, value]); + this.size = ++data.size; + return this; + } + data = this.__data__ = new MapCache(pairs); + } + data.set(key, value); + this.size = data.size; + return this; + } + module2.exports = stackSet; + } +}); + +// ../../node_modules/lodash/_Stack.js +var require_Stack = __commonJS({ + "../../node_modules/lodash/_Stack.js"(exports2, module2) { + var ListCache = require_ListCache(); + var stackClear = require_stackClear(); + var stackDelete = require_stackDelete(); + var stackGet = require_stackGet(); + var stackHas = require_stackHas(); + var stackSet = require_stackSet(); + function Stack(entries) { + var data = this.__data__ = new ListCache(entries); + this.size = data.size; + } + Stack.prototype.clear = stackClear; + Stack.prototype["delete"] = stackDelete; + Stack.prototype.get = stackGet; + Stack.prototype.has = stackHas; + Stack.prototype.set = stackSet; + module2.exports = Stack; + } +}); + +// ../../node_modules/lodash/_arrayEach.js +var require_arrayEach = __commonJS({ + "../../node_modules/lodash/_arrayEach.js"(exports2, module2) { + function arrayEach(array, iteratee) { + var index = -1, length = array == null ? 0 : array.length; + while (++index < length) { + if (iteratee(array[index], index, array) === false) { + break; + } + } + return array; + } + module2.exports = arrayEach; + } +}); + +// ../../node_modules/lodash/_defineProperty.js +var require_defineProperty = __commonJS({ + "../../node_modules/lodash/_defineProperty.js"(exports2, module2) { + var getNative = require_getNative(); + var defineProperty = function() { + try { + var func = getNative(Object, "defineProperty"); + func({}, "", {}); + return func; + } catch (e) { + } + }(); + module2.exports = defineProperty; + } +}); + +// ../../node_modules/lodash/_baseAssignValue.js +var require_baseAssignValue = __commonJS({ + "../../node_modules/lodash/_baseAssignValue.js"(exports2, module2) { + var defineProperty = require_defineProperty(); + function baseAssignValue(object, key, value) { + if (key == "__proto__" && defineProperty) { + defineProperty(object, key, { + "configurable": true, + "enumerable": true, + "value": value, + "writable": true + }); + } else { + object[key] = value; + } + } + module2.exports = baseAssignValue; + } +}); + +// ../../node_modules/lodash/_assignValue.js +var require_assignValue = __commonJS({ + "../../node_modules/lodash/_assignValue.js"(exports2, module2) { + var baseAssignValue = require_baseAssignValue(); + var eq = require_eq2(); + var objectProto = Object.prototype; + var hasOwnProperty = objectProto.hasOwnProperty; + function assignValue(object, key, value) { + var objValue = object[key]; + if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || value === void 0 && !(key in object)) { + baseAssignValue(object, key, value); + } + } + module2.exports = assignValue; + } +}); + +// ../../node_modules/lodash/_copyObject.js +var require_copyObject = __commonJS({ + "../../node_modules/lodash/_copyObject.js"(exports2, module2) { + var assignValue = require_assignValue(); + var baseAssignValue = require_baseAssignValue(); + function copyObject(source, props, object, customizer) { + var isNew = !object; + object || (object = {}); + var index = -1, length = props.length; + while (++index < length) { + var key = props[index]; + var newValue = customizer ? customizer(object[key], source[key], key, object, source) : void 0; + if (newValue === void 0) { + newValue = source[key]; + } + if (isNew) { + baseAssignValue(object, key, newValue); + } else { + assignValue(object, key, newValue); + } + } + return object; + } + module2.exports = copyObject; + } +}); + +// ../../node_modules/lodash/_baseTimes.js +var require_baseTimes = __commonJS({ + "../../node_modules/lodash/_baseTimes.js"(exports2, module2) { + function baseTimes(n, iteratee) { + var index = -1, result = Array(n); + while (++index < n) { + result[index] = iteratee(index); + } + return result; + } + module2.exports = baseTimes; + } +}); + +// ../../node_modules/lodash/isObjectLike.js +var require_isObjectLike = __commonJS({ + "../../node_modules/lodash/isObjectLike.js"(exports2, module2) { + function isObjectLike(value) { + return value != null && typeof value == "object"; + } + module2.exports = isObjectLike; + } +}); + +// ../../node_modules/lodash/_baseIsArguments.js +var require_baseIsArguments = __commonJS({ + "../../node_modules/lodash/_baseIsArguments.js"(exports2, module2) { + var baseGetTag = require_baseGetTag(); + var isObjectLike = require_isObjectLike(); + var argsTag = "[object Arguments]"; + function baseIsArguments(value) { + return isObjectLike(value) && baseGetTag(value) == argsTag; + } + module2.exports = baseIsArguments; + } +}); + +// ../../node_modules/lodash/isArguments.js +var require_isArguments = __commonJS({ + "../../node_modules/lodash/isArguments.js"(exports2, module2) { + var baseIsArguments = require_baseIsArguments(); + var isObjectLike = require_isObjectLike(); + var objectProto = Object.prototype; + var hasOwnProperty = objectProto.hasOwnProperty; + var propertyIsEnumerable = objectProto.propertyIsEnumerable; + var isArguments = baseIsArguments(/* @__PURE__ */ function() { + return arguments; + }()) ? baseIsArguments : function(value) { + return isObjectLike(value) && hasOwnProperty.call(value, "callee") && !propertyIsEnumerable.call(value, "callee"); + }; + module2.exports = isArguments; + } +}); + +// ../../node_modules/lodash/isArray.js +var require_isArray = __commonJS({ + "../../node_modules/lodash/isArray.js"(exports2, module2) { + var isArray = Array.isArray; + module2.exports = isArray; + } +}); + +// ../../node_modules/lodash/stubFalse.js +var require_stubFalse = __commonJS({ + "../../node_modules/lodash/stubFalse.js"(exports2, module2) { + function stubFalse() { + return false; + } + module2.exports = stubFalse; + } +}); + +// ../../node_modules/lodash/isBuffer.js +var require_isBuffer = __commonJS({ + "../../node_modules/lodash/isBuffer.js"(exports2, module2) { + var root = require_root(); + var stubFalse = require_stubFalse(); + var freeExports = typeof exports2 == "object" && exports2 && !exports2.nodeType && exports2; + var freeModule = freeExports && typeof module2 == "object" && module2 && !module2.nodeType && module2; + var moduleExports = freeModule && freeModule.exports === freeExports; + var Buffer2 = moduleExports ? root.Buffer : void 0; + var nativeIsBuffer = Buffer2 ? Buffer2.isBuffer : void 0; + var isBuffer = nativeIsBuffer || stubFalse; + module2.exports = isBuffer; + } +}); + +// ../../node_modules/lodash/_isIndex.js +var require_isIndex = __commonJS({ + "../../node_modules/lodash/_isIndex.js"(exports2, module2) { + var MAX_SAFE_INTEGER = 9007199254740991; + var reIsUint = /^(?:0|[1-9]\d*)$/; + function isIndex(value, length) { + var type = typeof value; + length = length == null ? MAX_SAFE_INTEGER : length; + return !!length && (type == "number" || type != "symbol" && reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length); + } + module2.exports = isIndex; + } +}); + +// ../../node_modules/lodash/isLength.js +var require_isLength = __commonJS({ + "../../node_modules/lodash/isLength.js"(exports2, module2) { + var MAX_SAFE_INTEGER = 9007199254740991; + function isLength(value) { + return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + } + module2.exports = isLength; + } +}); + +// ../../node_modules/lodash/_baseIsTypedArray.js +var require_baseIsTypedArray = __commonJS({ + "../../node_modules/lodash/_baseIsTypedArray.js"(exports2, module2) { + var baseGetTag = require_baseGetTag(); + var isLength = require_isLength(); + var isObjectLike = require_isObjectLike(); + var argsTag = "[object Arguments]"; + var arrayTag = "[object Array]"; + var boolTag = "[object Boolean]"; + var dateTag = "[object Date]"; + var errorTag = "[object Error]"; + var funcTag = "[object Function]"; + var mapTag = "[object Map]"; + var numberTag = "[object Number]"; + var objectTag = "[object Object]"; + var regexpTag = "[object RegExp]"; + var setTag = "[object Set]"; + var stringTag = "[object String]"; + var weakMapTag = "[object WeakMap]"; + var arrayBufferTag = "[object ArrayBuffer]"; + var dataViewTag = "[object DataView]"; + var float32Tag = "[object Float32Array]"; + var float64Tag = "[object Float64Array]"; + var int8Tag = "[object Int8Array]"; + var int16Tag = "[object Int16Array]"; + var int32Tag = "[object Int32Array]"; + var uint8Tag = "[object Uint8Array]"; + var uint8ClampedTag = "[object Uint8ClampedArray]"; + var uint16Tag = "[object Uint16Array]"; + var uint32Tag = "[object Uint32Array]"; + var typedArrayTags = {}; + typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true; + typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false; + function baseIsTypedArray(value) { + return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; + } + module2.exports = baseIsTypedArray; + } +}); + +// ../../node_modules/lodash/_baseUnary.js +var require_baseUnary = __commonJS({ + "../../node_modules/lodash/_baseUnary.js"(exports2, module2) { + function baseUnary(func) { + return function(value) { + return func(value); + }; + } + module2.exports = baseUnary; + } +}); + +// ../../node_modules/lodash/_nodeUtil.js +var require_nodeUtil = __commonJS({ + "../../node_modules/lodash/_nodeUtil.js"(exports2, module2) { + var freeGlobal = require_freeGlobal(); + var freeExports = typeof exports2 == "object" && exports2 && !exports2.nodeType && exports2; + var freeModule = freeExports && typeof module2 == "object" && module2 && !module2.nodeType && module2; + var moduleExports = freeModule && freeModule.exports === freeExports; + var freeProcess = moduleExports && freeGlobal.process; + var nodeUtil = function() { + try { + var types = freeModule && freeModule.require && freeModule.require("util").types; + if (types) { + return types; + } + return freeProcess && freeProcess.binding && freeProcess.binding("util"); + } catch (e) { + } + }(); + module2.exports = nodeUtil; + } +}); + +// ../../node_modules/lodash/isTypedArray.js +var require_isTypedArray = __commonJS({ + "../../node_modules/lodash/isTypedArray.js"(exports2, module2) { + var baseIsTypedArray = require_baseIsTypedArray(); + var baseUnary = require_baseUnary(); + var nodeUtil = require_nodeUtil(); + var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; + var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; + module2.exports = isTypedArray; + } +}); + +// ../../node_modules/lodash/_arrayLikeKeys.js +var require_arrayLikeKeys = __commonJS({ + "../../node_modules/lodash/_arrayLikeKeys.js"(exports2, module2) { + var baseTimes = require_baseTimes(); + var isArguments = require_isArguments(); + var isArray = require_isArray(); + var isBuffer = require_isBuffer(); + var isIndex = require_isIndex(); + var isTypedArray = require_isTypedArray(); + var objectProto = Object.prototype; + var hasOwnProperty = objectProto.hasOwnProperty; + function arrayLikeKeys(value, inherited) { + var isArr = isArray(value), isArg = !isArr && isArguments(value), isBuff = !isArr && !isArg && isBuffer(value), isType = !isArr && !isArg && !isBuff && isTypedArray(value), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? baseTimes(value.length, String) : [], length = result.length; + for (var key in value) { + if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && // Safari 9 has enumerable `arguments.length` in strict mode. + (key == "length" || // Node.js 0.10 has enumerable non-index properties on buffers. + isBuff && (key == "offset" || key == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays. + isType && (key == "buffer" || key == "byteLength" || key == "byteOffset") || // Skip index properties. + isIndex(key, length)))) { + result.push(key); + } + } + return result; + } + module2.exports = arrayLikeKeys; + } +}); + +// ../../node_modules/lodash/_isPrototype.js +var require_isPrototype = __commonJS({ + "../../node_modules/lodash/_isPrototype.js"(exports2, module2) { + var objectProto = Object.prototype; + function isPrototype(value) { + var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto; + return value === proto; + } + module2.exports = isPrototype; + } +}); + +// ../../node_modules/lodash/_overArg.js +var require_overArg = __commonJS({ + "../../node_modules/lodash/_overArg.js"(exports2, module2) { + function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; + } + module2.exports = overArg; + } +}); + +// ../../node_modules/lodash/_nativeKeys.js +var require_nativeKeys = __commonJS({ + "../../node_modules/lodash/_nativeKeys.js"(exports2, module2) { + var overArg = require_overArg(); + var nativeKeys = overArg(Object.keys, Object); + module2.exports = nativeKeys; + } +}); + +// ../../node_modules/lodash/_baseKeys.js +var require_baseKeys = __commonJS({ + "../../node_modules/lodash/_baseKeys.js"(exports2, module2) { + var isPrototype = require_isPrototype(); + var nativeKeys = require_nativeKeys(); + var objectProto = Object.prototype; + var hasOwnProperty = objectProto.hasOwnProperty; + function baseKeys(object) { + if (!isPrototype(object)) { + return nativeKeys(object); + } + var result = []; + for (var key in Object(object)) { + if (hasOwnProperty.call(object, key) && key != "constructor") { + result.push(key); + } + } + return result; + } + module2.exports = baseKeys; + } +}); + +// ../../node_modules/lodash/isArrayLike.js +var require_isArrayLike = __commonJS({ + "../../node_modules/lodash/isArrayLike.js"(exports2, module2) { + var isFunction = require_isFunction(); + var isLength = require_isLength(); + function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); + } + module2.exports = isArrayLike; + } +}); + +// ../../node_modules/lodash/keys.js +var require_keys = __commonJS({ + "../../node_modules/lodash/keys.js"(exports2, module2) { + var arrayLikeKeys = require_arrayLikeKeys(); + var baseKeys = require_baseKeys(); + var isArrayLike = require_isArrayLike(); + function keys(object) { + return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); + } + module2.exports = keys; + } +}); + +// ../../node_modules/lodash/_baseAssign.js +var require_baseAssign = __commonJS({ + "../../node_modules/lodash/_baseAssign.js"(exports2, module2) { + var copyObject = require_copyObject(); + var keys = require_keys(); + function baseAssign(object, source) { + return object && copyObject(source, keys(source), object); + } + module2.exports = baseAssign; + } +}); + +// ../../node_modules/lodash/_nativeKeysIn.js +var require_nativeKeysIn = __commonJS({ + "../../node_modules/lodash/_nativeKeysIn.js"(exports2, module2) { + function nativeKeysIn(object) { + var result = []; + if (object != null) { + for (var key in Object(object)) { + result.push(key); + } + } + return result; + } + module2.exports = nativeKeysIn; + } +}); + +// ../../node_modules/lodash/_baseKeysIn.js +var require_baseKeysIn = __commonJS({ + "../../node_modules/lodash/_baseKeysIn.js"(exports2, module2) { + var isObject = require_isObject(); + var isPrototype = require_isPrototype(); + var nativeKeysIn = require_nativeKeysIn(); + var objectProto = Object.prototype; + var hasOwnProperty = objectProto.hasOwnProperty; + function baseKeysIn(object) { + if (!isObject(object)) { + return nativeKeysIn(object); + } + var isProto = isPrototype(object), result = []; + for (var key in object) { + if (!(key == "constructor" && (isProto || !hasOwnProperty.call(object, key)))) { + result.push(key); + } + } + return result; + } + module2.exports = baseKeysIn; + } +}); + +// ../../node_modules/lodash/keysIn.js +var require_keysIn = __commonJS({ + "../../node_modules/lodash/keysIn.js"(exports2, module2) { + var arrayLikeKeys = require_arrayLikeKeys(); + var baseKeysIn = require_baseKeysIn(); + var isArrayLike = require_isArrayLike(); + function keysIn(object) { + return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object); + } + module2.exports = keysIn; + } +}); + +// ../../node_modules/lodash/_baseAssignIn.js +var require_baseAssignIn = __commonJS({ + "../../node_modules/lodash/_baseAssignIn.js"(exports2, module2) { + var copyObject = require_copyObject(); + var keysIn = require_keysIn(); + function baseAssignIn(object, source) { + return object && copyObject(source, keysIn(source), object); + } + module2.exports = baseAssignIn; + } +}); + +// ../../node_modules/lodash/_cloneBuffer.js +var require_cloneBuffer = __commonJS({ + "../../node_modules/lodash/_cloneBuffer.js"(exports2, module2) { + var root = require_root(); + var freeExports = typeof exports2 == "object" && exports2 && !exports2.nodeType && exports2; + var freeModule = freeExports && typeof module2 == "object" && module2 && !module2.nodeType && module2; + var moduleExports = freeModule && freeModule.exports === freeExports; + var Buffer2 = moduleExports ? root.Buffer : void 0; + var allocUnsafe = Buffer2 ? Buffer2.allocUnsafe : void 0; + function cloneBuffer(buffer, isDeep) { + if (isDeep) { + return buffer.slice(); + } + var length = buffer.length, result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length); + buffer.copy(result); + return result; + } + module2.exports = cloneBuffer; + } +}); + +// ../../node_modules/lodash/_copyArray.js +var require_copyArray = __commonJS({ + "../../node_modules/lodash/_copyArray.js"(exports2, module2) { + function copyArray(source, array) { + var index = -1, length = source.length; + array || (array = Array(length)); + while (++index < length) { + array[index] = source[index]; + } + return array; + } + module2.exports = copyArray; + } +}); + +// ../../node_modules/lodash/_arrayFilter.js +var require_arrayFilter = __commonJS({ + "../../node_modules/lodash/_arrayFilter.js"(exports2, module2) { + function arrayFilter(array, predicate) { + var index = -1, length = array == null ? 0 : array.length, resIndex = 0, result = []; + while (++index < length) { + var value = array[index]; + if (predicate(value, index, array)) { + result[resIndex++] = value; + } + } + return result; + } + module2.exports = arrayFilter; + } +}); + +// ../../node_modules/lodash/stubArray.js +var require_stubArray = __commonJS({ + "../../node_modules/lodash/stubArray.js"(exports2, module2) { + function stubArray() { + return []; + } + module2.exports = stubArray; + } +}); + +// ../../node_modules/lodash/_getSymbols.js +var require_getSymbols = __commonJS({ + "../../node_modules/lodash/_getSymbols.js"(exports2, module2) { + var arrayFilter = require_arrayFilter(); + var stubArray = require_stubArray(); + var objectProto = Object.prototype; + var propertyIsEnumerable = objectProto.propertyIsEnumerable; + var nativeGetSymbols = Object.getOwnPropertySymbols; + var getSymbols = !nativeGetSymbols ? stubArray : function(object) { + if (object == null) { + return []; + } + object = Object(object); + return arrayFilter(nativeGetSymbols(object), function(symbol) { + return propertyIsEnumerable.call(object, symbol); + }); + }; + module2.exports = getSymbols; + } +}); + +// ../../node_modules/lodash/_copySymbols.js +var require_copySymbols = __commonJS({ + "../../node_modules/lodash/_copySymbols.js"(exports2, module2) { + var copyObject = require_copyObject(); + var getSymbols = require_getSymbols(); + function copySymbols(source, object) { + return copyObject(source, getSymbols(source), object); + } + module2.exports = copySymbols; + } +}); + +// ../../node_modules/lodash/_arrayPush.js +var require_arrayPush = __commonJS({ + "../../node_modules/lodash/_arrayPush.js"(exports2, module2) { + function arrayPush(array, values) { + var index = -1, length = values.length, offset = array.length; + while (++index < length) { + array[offset + index] = values[index]; + } + return array; + } + module2.exports = arrayPush; + } +}); + +// ../../node_modules/lodash/_getPrototype.js +var require_getPrototype = __commonJS({ + "../../node_modules/lodash/_getPrototype.js"(exports2, module2) { + var overArg = require_overArg(); + var getPrototype = overArg(Object.getPrototypeOf, Object); + module2.exports = getPrototype; + } +}); + +// ../../node_modules/lodash/_getSymbolsIn.js +var require_getSymbolsIn = __commonJS({ + "../../node_modules/lodash/_getSymbolsIn.js"(exports2, module2) { + var arrayPush = require_arrayPush(); + var getPrototype = require_getPrototype(); + var getSymbols = require_getSymbols(); + var stubArray = require_stubArray(); + var nativeGetSymbols = Object.getOwnPropertySymbols; + var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) { + var result = []; + while (object) { + arrayPush(result, getSymbols(object)); + object = getPrototype(object); + } + return result; + }; + module2.exports = getSymbolsIn; + } +}); + +// ../../node_modules/lodash/_copySymbolsIn.js +var require_copySymbolsIn = __commonJS({ + "../../node_modules/lodash/_copySymbolsIn.js"(exports2, module2) { + var copyObject = require_copyObject(); + var getSymbolsIn = require_getSymbolsIn(); + function copySymbolsIn(source, object) { + return copyObject(source, getSymbolsIn(source), object); + } + module2.exports = copySymbolsIn; + } +}); + +// ../../node_modules/lodash/_baseGetAllKeys.js +var require_baseGetAllKeys = __commonJS({ + "../../node_modules/lodash/_baseGetAllKeys.js"(exports2, module2) { + var arrayPush = require_arrayPush(); + var isArray = require_isArray(); + function baseGetAllKeys(object, keysFunc, symbolsFunc) { + var result = keysFunc(object); + return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); + } + module2.exports = baseGetAllKeys; + } +}); + +// ../../node_modules/lodash/_getAllKeys.js +var require_getAllKeys = __commonJS({ + "../../node_modules/lodash/_getAllKeys.js"(exports2, module2) { + var baseGetAllKeys = require_baseGetAllKeys(); + var getSymbols = require_getSymbols(); + var keys = require_keys(); + function getAllKeys(object) { + return baseGetAllKeys(object, keys, getSymbols); + } + module2.exports = getAllKeys; + } +}); + +// ../../node_modules/lodash/_getAllKeysIn.js +var require_getAllKeysIn = __commonJS({ + "../../node_modules/lodash/_getAllKeysIn.js"(exports2, module2) { + var baseGetAllKeys = require_baseGetAllKeys(); + var getSymbolsIn = require_getSymbolsIn(); + var keysIn = require_keysIn(); + function getAllKeysIn(object) { + return baseGetAllKeys(object, keysIn, getSymbolsIn); + } + module2.exports = getAllKeysIn; + } +}); + +// ../../node_modules/lodash/_DataView.js +var require_DataView = __commonJS({ + "../../node_modules/lodash/_DataView.js"(exports2, module2) { + var getNative = require_getNative(); + var root = require_root(); + var DataView2 = getNative(root, "DataView"); + module2.exports = DataView2; + } +}); + +// ../../node_modules/lodash/_Promise.js +var require_Promise = __commonJS({ + "../../node_modules/lodash/_Promise.js"(exports2, module2) { + var getNative = require_getNative(); + var root = require_root(); + var Promise2 = getNative(root, "Promise"); + module2.exports = Promise2; + } +}); + +// ../../node_modules/lodash/_Set.js +var require_Set = __commonJS({ + "../../node_modules/lodash/_Set.js"(exports2, module2) { + var getNative = require_getNative(); + var root = require_root(); + var Set2 = getNative(root, "Set"); + module2.exports = Set2; + } +}); + +// ../../node_modules/lodash/_WeakMap.js +var require_WeakMap = __commonJS({ + "../../node_modules/lodash/_WeakMap.js"(exports2, module2) { + var getNative = require_getNative(); + var root = require_root(); + var WeakMap2 = getNative(root, "WeakMap"); + module2.exports = WeakMap2; + } +}); + +// ../../node_modules/lodash/_getTag.js +var require_getTag = __commonJS({ + "../../node_modules/lodash/_getTag.js"(exports2, module2) { + var DataView2 = require_DataView(); + var Map2 = require_Map(); + var Promise2 = require_Promise(); + var Set2 = require_Set(); + var WeakMap2 = require_WeakMap(); + var baseGetTag = require_baseGetTag(); + var toSource = require_toSource(); + var mapTag = "[object Map]"; + var objectTag = "[object Object]"; + var promiseTag = "[object Promise]"; + var setTag = "[object Set]"; + var weakMapTag = "[object WeakMap]"; + var dataViewTag = "[object DataView]"; + var dataViewCtorString = toSource(DataView2); + var mapCtorString = toSource(Map2); + var promiseCtorString = toSource(Promise2); + var setCtorString = toSource(Set2); + var weakMapCtorString = toSource(WeakMap2); + var getTag = baseGetTag; + if (DataView2 && getTag(new DataView2(new ArrayBuffer(1))) != dataViewTag || Map2 && getTag(new Map2()) != mapTag || Promise2 && getTag(Promise2.resolve()) != promiseTag || Set2 && getTag(new Set2()) != setTag || WeakMap2 && getTag(new WeakMap2()) != weakMapTag) { + getTag = function(value) { + var result = baseGetTag(value), Ctor = result == objectTag ? value.constructor : void 0, ctorString = Ctor ? toSource(Ctor) : ""; + if (ctorString) { + switch (ctorString) { + case dataViewCtorString: + return dataViewTag; + case mapCtorString: + return mapTag; + case promiseCtorString: + return promiseTag; + case setCtorString: + return setTag; + case weakMapCtorString: + return weakMapTag; + } + } + return result; + }; + } + module2.exports = getTag; + } +}); + +// ../../node_modules/lodash/_initCloneArray.js +var require_initCloneArray = __commonJS({ + "../../node_modules/lodash/_initCloneArray.js"(exports2, module2) { + var objectProto = Object.prototype; + var hasOwnProperty = objectProto.hasOwnProperty; + function initCloneArray(array) { + var length = array.length, result = new array.constructor(length); + if (length && typeof array[0] == "string" && hasOwnProperty.call(array, "index")) { + result.index = array.index; + result.input = array.input; + } + return result; + } + module2.exports = initCloneArray; + } +}); + +// ../../node_modules/lodash/_Uint8Array.js +var require_Uint8Array = __commonJS({ + "../../node_modules/lodash/_Uint8Array.js"(exports2, module2) { + var root = require_root(); + var Uint8Array2 = root.Uint8Array; + module2.exports = Uint8Array2; + } +}); + +// ../../node_modules/lodash/_cloneArrayBuffer.js +var require_cloneArrayBuffer = __commonJS({ + "../../node_modules/lodash/_cloneArrayBuffer.js"(exports2, module2) { + var Uint8Array2 = require_Uint8Array(); + function cloneArrayBuffer(arrayBuffer) { + var result = new arrayBuffer.constructor(arrayBuffer.byteLength); + new Uint8Array2(result).set(new Uint8Array2(arrayBuffer)); + return result; + } + module2.exports = cloneArrayBuffer; + } +}); + +// ../../node_modules/lodash/_cloneDataView.js +var require_cloneDataView = __commonJS({ + "../../node_modules/lodash/_cloneDataView.js"(exports2, module2) { + var cloneArrayBuffer = require_cloneArrayBuffer(); + function cloneDataView(dataView, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer; + return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); + } + module2.exports = cloneDataView; + } +}); + +// ../../node_modules/lodash/_cloneRegExp.js +var require_cloneRegExp = __commonJS({ + "../../node_modules/lodash/_cloneRegExp.js"(exports2, module2) { + var reFlags = /\w*$/; + function cloneRegExp(regexp) { + var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); + result.lastIndex = regexp.lastIndex; + return result; + } + module2.exports = cloneRegExp; + } +}); + +// ../../node_modules/lodash/_cloneSymbol.js +var require_cloneSymbol = __commonJS({ + "../../node_modules/lodash/_cloneSymbol.js"(exports2, module2) { + var Symbol2 = require_Symbol(); + var symbolProto = Symbol2 ? Symbol2.prototype : void 0; + var symbolValueOf = symbolProto ? symbolProto.valueOf : void 0; + function cloneSymbol(symbol) { + return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; + } + module2.exports = cloneSymbol; + } +}); + +// ../../node_modules/lodash/_cloneTypedArray.js +var require_cloneTypedArray = __commonJS({ + "../../node_modules/lodash/_cloneTypedArray.js"(exports2, module2) { + var cloneArrayBuffer = require_cloneArrayBuffer(); + function cloneTypedArray(typedArray, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer; + return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); + } + module2.exports = cloneTypedArray; + } +}); + +// ../../node_modules/lodash/_initCloneByTag.js +var require_initCloneByTag = __commonJS({ + "../../node_modules/lodash/_initCloneByTag.js"(exports2, module2) { + var cloneArrayBuffer = require_cloneArrayBuffer(); + var cloneDataView = require_cloneDataView(); + var cloneRegExp = require_cloneRegExp(); + var cloneSymbol = require_cloneSymbol(); + var cloneTypedArray = require_cloneTypedArray(); + var boolTag = "[object Boolean]"; + var dateTag = "[object Date]"; + var mapTag = "[object Map]"; + var numberTag = "[object Number]"; + var regexpTag = "[object RegExp]"; + var setTag = "[object Set]"; + var stringTag = "[object String]"; + var symbolTag = "[object Symbol]"; + var arrayBufferTag = "[object ArrayBuffer]"; + var dataViewTag = "[object DataView]"; + var float32Tag = "[object Float32Array]"; + var float64Tag = "[object Float64Array]"; + var int8Tag = "[object Int8Array]"; + var int16Tag = "[object Int16Array]"; + var int32Tag = "[object Int32Array]"; + var uint8Tag = "[object Uint8Array]"; + var uint8ClampedTag = "[object Uint8ClampedArray]"; + var uint16Tag = "[object Uint16Array]"; + var uint32Tag = "[object Uint32Array]"; + function initCloneByTag(object, tag, isDeep) { + var Ctor = object.constructor; + switch (tag) { + case arrayBufferTag: + return cloneArrayBuffer(object); + case boolTag: + case dateTag: + return new Ctor(+object); + case dataViewTag: + return cloneDataView(object, isDeep); + case float32Tag: + case float64Tag: + case int8Tag: + case int16Tag: + case int32Tag: + case uint8Tag: + case uint8ClampedTag: + case uint16Tag: + case uint32Tag: + return cloneTypedArray(object, isDeep); + case mapTag: + return new Ctor(); + case numberTag: + case stringTag: + return new Ctor(object); + case regexpTag: + return cloneRegExp(object); + case setTag: + return new Ctor(); + case symbolTag: + return cloneSymbol(object); + } + } + module2.exports = initCloneByTag; + } +}); + +// ../../node_modules/lodash/_baseCreate.js +var require_baseCreate = __commonJS({ + "../../node_modules/lodash/_baseCreate.js"(exports2, module2) { + var isObject = require_isObject(); + var objectCreate = Object.create; + var baseCreate = /* @__PURE__ */ function() { + function object() { + } + return function(proto) { + if (!isObject(proto)) { + return {}; + } + if (objectCreate) { + return objectCreate(proto); + } + object.prototype = proto; + var result = new object(); + object.prototype = void 0; + return result; + }; + }(); + module2.exports = baseCreate; + } +}); + +// ../../node_modules/lodash/_initCloneObject.js +var require_initCloneObject = __commonJS({ + "../../node_modules/lodash/_initCloneObject.js"(exports2, module2) { + var baseCreate = require_baseCreate(); + var getPrototype = require_getPrototype(); + var isPrototype = require_isPrototype(); + function initCloneObject(object) { + return typeof object.constructor == "function" && !isPrototype(object) ? baseCreate(getPrototype(object)) : {}; + } + module2.exports = initCloneObject; + } +}); + +// ../../node_modules/lodash/_baseIsMap.js +var require_baseIsMap = __commonJS({ + "../../node_modules/lodash/_baseIsMap.js"(exports2, module2) { + var getTag = require_getTag(); + var isObjectLike = require_isObjectLike(); + var mapTag = "[object Map]"; + function baseIsMap(value) { + return isObjectLike(value) && getTag(value) == mapTag; + } + module2.exports = baseIsMap; + } +}); + +// ../../node_modules/lodash/isMap.js +var require_isMap = __commonJS({ + "../../node_modules/lodash/isMap.js"(exports2, module2) { + var baseIsMap = require_baseIsMap(); + var baseUnary = require_baseUnary(); + var nodeUtil = require_nodeUtil(); + var nodeIsMap = nodeUtil && nodeUtil.isMap; + var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap; + module2.exports = isMap; + } +}); + +// ../../node_modules/lodash/_baseIsSet.js +var require_baseIsSet = __commonJS({ + "../../node_modules/lodash/_baseIsSet.js"(exports2, module2) { + var getTag = require_getTag(); + var isObjectLike = require_isObjectLike(); + var setTag = "[object Set]"; + function baseIsSet(value) { + return isObjectLike(value) && getTag(value) == setTag; + } + module2.exports = baseIsSet; + } +}); + +// ../../node_modules/lodash/isSet.js +var require_isSet = __commonJS({ + "../../node_modules/lodash/isSet.js"(exports2, module2) { + var baseIsSet = require_baseIsSet(); + var baseUnary = require_baseUnary(); + var nodeUtil = require_nodeUtil(); + var nodeIsSet = nodeUtil && nodeUtil.isSet; + var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet; + module2.exports = isSet; + } +}); + +// ../../node_modules/lodash/_baseClone.js +var require_baseClone = __commonJS({ + "../../node_modules/lodash/_baseClone.js"(exports2, module2) { + var Stack = require_Stack(); + var arrayEach = require_arrayEach(); + var assignValue = require_assignValue(); + var baseAssign = require_baseAssign(); + var baseAssignIn = require_baseAssignIn(); + var cloneBuffer = require_cloneBuffer(); + var copyArray = require_copyArray(); + var copySymbols = require_copySymbols(); + var copySymbolsIn = require_copySymbolsIn(); + var getAllKeys = require_getAllKeys(); + var getAllKeysIn = require_getAllKeysIn(); + var getTag = require_getTag(); + var initCloneArray = require_initCloneArray(); + var initCloneByTag = require_initCloneByTag(); + var initCloneObject = require_initCloneObject(); + var isArray = require_isArray(); + var isBuffer = require_isBuffer(); + var isMap = require_isMap(); + var isObject = require_isObject(); + var isSet = require_isSet(); + var keys = require_keys(); + var keysIn = require_keysIn(); + var CLONE_DEEP_FLAG = 1; + var CLONE_FLAT_FLAG = 2; + var CLONE_SYMBOLS_FLAG = 4; + var argsTag = "[object Arguments]"; + var arrayTag = "[object Array]"; + var boolTag = "[object Boolean]"; + var dateTag = "[object Date]"; + var errorTag = "[object Error]"; + var funcTag = "[object Function]"; + var genTag = "[object GeneratorFunction]"; + var mapTag = "[object Map]"; + var numberTag = "[object Number]"; + var objectTag = "[object Object]"; + var regexpTag = "[object RegExp]"; + var setTag = "[object Set]"; + var stringTag = "[object String]"; + var symbolTag = "[object Symbol]"; + var weakMapTag = "[object WeakMap]"; + var arrayBufferTag = "[object ArrayBuffer]"; + var dataViewTag = "[object DataView]"; + var float32Tag = "[object Float32Array]"; + var float64Tag = "[object Float64Array]"; + var int8Tag = "[object Int8Array]"; + var int16Tag = "[object Int16Array]"; + var int32Tag = "[object Int32Array]"; + var uint8Tag = "[object Uint8Array]"; + var uint8ClampedTag = "[object Uint8ClampedArray]"; + var uint16Tag = "[object Uint16Array]"; + var uint32Tag = "[object Uint32Array]"; + var cloneableTags = {}; + cloneableTags[argsTag] = cloneableTags[arrayTag] = cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = cloneableTags[boolTag] = cloneableTags[dateTag] = cloneableTags[float32Tag] = cloneableTags[float64Tag] = cloneableTags[int8Tag] = cloneableTags[int16Tag] = cloneableTags[int32Tag] = cloneableTags[mapTag] = cloneableTags[numberTag] = cloneableTags[objectTag] = cloneableTags[regexpTag] = cloneableTags[setTag] = cloneableTags[stringTag] = cloneableTags[symbolTag] = cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true; + cloneableTags[errorTag] = cloneableTags[funcTag] = cloneableTags[weakMapTag] = false; + function baseClone(value, bitmask, customizer, key, object, stack) { + var result, isDeep = bitmask & CLONE_DEEP_FLAG, isFlat = bitmask & CLONE_FLAT_FLAG, isFull = bitmask & CLONE_SYMBOLS_FLAG; + if (customizer) { + result = object ? customizer(value, key, object, stack) : customizer(value); + } + if (result !== void 0) { + return result; + } + if (!isObject(value)) { + return value; + } + var isArr = isArray(value); + if (isArr) { + result = initCloneArray(value); + if (!isDeep) { + return copyArray(value, result); + } + } else { + var tag = getTag(value), isFunc = tag == funcTag || tag == genTag; + if (isBuffer(value)) { + return cloneBuffer(value, isDeep); + } + if (tag == objectTag || tag == argsTag || isFunc && !object) { + result = isFlat || isFunc ? {} : initCloneObject(value); + if (!isDeep) { + return isFlat ? copySymbolsIn(value, baseAssignIn(result, value)) : copySymbols(value, baseAssign(result, value)); + } + } else { + if (!cloneableTags[tag]) { + return object ? value : {}; + } + result = initCloneByTag(value, tag, isDeep); + } + } + stack || (stack = new Stack()); + var stacked = stack.get(value); + if (stacked) { + return stacked; + } + stack.set(value, result); + if (isSet(value)) { + value.forEach(function(subValue) { + result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack)); + }); + } else if (isMap(value)) { + value.forEach(function(subValue, key2) { + result.set(key2, baseClone(subValue, bitmask, customizer, key2, value, stack)); + }); + } + var keysFunc = isFull ? isFlat ? getAllKeysIn : getAllKeys : isFlat ? keysIn : keys; + var props = isArr ? void 0 : keysFunc(value); + arrayEach(props || value, function(subValue, key2) { + if (props) { + key2 = subValue; + subValue = value[key2]; + } + assignValue(result, key2, baseClone(subValue, bitmask, customizer, key2, value, stack)); + }); + return result; + } + module2.exports = baseClone; + } +}); + +// ../../node_modules/lodash/cloneDeep.js +var require_cloneDeep = __commonJS({ + "../../node_modules/lodash/cloneDeep.js"(exports2, module2) { + var baseClone = require_baseClone(); + var CLONE_DEEP_FLAG = 1; + var CLONE_SYMBOLS_FLAG = 4; + function cloneDeep(value) { + return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG); + } + module2.exports = cloneDeep; + } +}); + +// ../../node_modules/lodash/_setCacheAdd.js +var require_setCacheAdd = __commonJS({ + "../../node_modules/lodash/_setCacheAdd.js"(exports2, module2) { + var HASH_UNDEFINED = "__lodash_hash_undefined__"; + function setCacheAdd(value) { + this.__data__.set(value, HASH_UNDEFINED); + return this; + } + module2.exports = setCacheAdd; + } +}); + +// ../../node_modules/lodash/_setCacheHas.js +var require_setCacheHas = __commonJS({ + "../../node_modules/lodash/_setCacheHas.js"(exports2, module2) { + function setCacheHas(value) { + return this.__data__.has(value); + } + module2.exports = setCacheHas; + } +}); + +// ../../node_modules/lodash/_SetCache.js +var require_SetCache = __commonJS({ + "../../node_modules/lodash/_SetCache.js"(exports2, module2) { + var MapCache = require_MapCache(); + var setCacheAdd = require_setCacheAdd(); + var setCacheHas = require_setCacheHas(); + function SetCache(values) { + var index = -1, length = values == null ? 0 : values.length; + this.__data__ = new MapCache(); + while (++index < length) { + this.add(values[index]); + } + } + SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; + SetCache.prototype.has = setCacheHas; + module2.exports = SetCache; + } +}); + +// ../../node_modules/lodash/_arraySome.js +var require_arraySome = __commonJS({ + "../../node_modules/lodash/_arraySome.js"(exports2, module2) { + function arraySome(array, predicate) { + var index = -1, length = array == null ? 0 : array.length; + while (++index < length) { + if (predicate(array[index], index, array)) { + return true; + } + } + return false; + } + module2.exports = arraySome; + } +}); + +// ../../node_modules/lodash/_cacheHas.js +var require_cacheHas = __commonJS({ + "../../node_modules/lodash/_cacheHas.js"(exports2, module2) { + function cacheHas(cache, key) { + return cache.has(key); + } + module2.exports = cacheHas; + } +}); + +// ../../node_modules/lodash/_equalArrays.js +var require_equalArrays = __commonJS({ + "../../node_modules/lodash/_equalArrays.js"(exports2, module2) { + var SetCache = require_SetCache(); + var arraySome = require_arraySome(); + var cacheHas = require_cacheHas(); + var COMPARE_PARTIAL_FLAG = 1; + var COMPARE_UNORDERED_FLAG = 2; + function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, arrLength = array.length, othLength = other.length; + if (arrLength != othLength && !(isPartial && othLength > arrLength)) { + return false; + } + var arrStacked = stack.get(array); + var othStacked = stack.get(other); + if (arrStacked && othStacked) { + return arrStacked == other && othStacked == array; + } + var index = -1, result = true, seen = bitmask & COMPARE_UNORDERED_FLAG ? new SetCache() : void 0; + stack.set(array, other); + stack.set(other, array); + while (++index < arrLength) { + var arrValue = array[index], othValue = other[index]; + if (customizer) { + var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack); + } + if (compared !== void 0) { + if (compared) { + continue; + } + result = false; + break; + } + if (seen) { + if (!arraySome(other, function(othValue2, othIndex) { + if (!cacheHas(seen, othIndex) && (arrValue === othValue2 || equalFunc(arrValue, othValue2, bitmask, customizer, stack))) { + return seen.push(othIndex); + } + })) { + result = false; + break; + } + } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { + result = false; + break; + } + } + stack["delete"](array); + stack["delete"](other); + return result; + } + module2.exports = equalArrays; + } +}); + +// ../../node_modules/lodash/_mapToArray.js +var require_mapToArray = __commonJS({ + "../../node_modules/lodash/_mapToArray.js"(exports2, module2) { + function mapToArray(map) { + var index = -1, result = Array(map.size); + map.forEach(function(value, key) { + result[++index] = [key, value]; + }); + return result; + } + module2.exports = mapToArray; + } +}); + +// ../../node_modules/lodash/_setToArray.js +var require_setToArray = __commonJS({ + "../../node_modules/lodash/_setToArray.js"(exports2, module2) { + function setToArray(set) { + var index = -1, result = Array(set.size); + set.forEach(function(value) { + result[++index] = value; + }); + return result; + } + module2.exports = setToArray; + } +}); + +// ../../node_modules/lodash/_equalByTag.js +var require_equalByTag = __commonJS({ + "../../node_modules/lodash/_equalByTag.js"(exports2, module2) { + var Symbol2 = require_Symbol(); + var Uint8Array2 = require_Uint8Array(); + var eq = require_eq2(); + var equalArrays = require_equalArrays(); + var mapToArray = require_mapToArray(); + var setToArray = require_setToArray(); + var COMPARE_PARTIAL_FLAG = 1; + var COMPARE_UNORDERED_FLAG = 2; + var boolTag = "[object Boolean]"; + var dateTag = "[object Date]"; + var errorTag = "[object Error]"; + var mapTag = "[object Map]"; + var numberTag = "[object Number]"; + var regexpTag = "[object RegExp]"; + var setTag = "[object Set]"; + var stringTag = "[object String]"; + var symbolTag = "[object Symbol]"; + var arrayBufferTag = "[object ArrayBuffer]"; + var dataViewTag = "[object DataView]"; + var symbolProto = Symbol2 ? Symbol2.prototype : void 0; + var symbolValueOf = symbolProto ? symbolProto.valueOf : void 0; + function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { + switch (tag) { + case dataViewTag: + if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) { + return false; + } + object = object.buffer; + other = other.buffer; + case arrayBufferTag: + if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array2(object), new Uint8Array2(other))) { + return false; + } + return true; + case boolTag: + case dateTag: + case numberTag: + return eq(+object, +other); + case errorTag: + return object.name == other.name && object.message == other.message; + case regexpTag: + case stringTag: + return object == other + ""; + case mapTag: + var convert2 = mapToArray; + case setTag: + var isPartial = bitmask & COMPARE_PARTIAL_FLAG; + convert2 || (convert2 = setToArray); + if (object.size != other.size && !isPartial) { + return false; + } + var stacked = stack.get(object); + if (stacked) { + return stacked == other; + } + bitmask |= COMPARE_UNORDERED_FLAG; + stack.set(object, other); + var result = equalArrays(convert2(object), convert2(other), bitmask, customizer, equalFunc, stack); + stack["delete"](object); + return result; + case symbolTag: + if (symbolValueOf) { + return symbolValueOf.call(object) == symbolValueOf.call(other); + } + } + return false; + } + module2.exports = equalByTag; + } +}); + +// ../../node_modules/lodash/_equalObjects.js +var require_equalObjects = __commonJS({ + "../../node_modules/lodash/_equalObjects.js"(exports2, module2) { + var getAllKeys = require_getAllKeys(); + var COMPARE_PARTIAL_FLAG = 1; + var objectProto = Object.prototype; + var hasOwnProperty = objectProto.hasOwnProperty; + function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, objProps = getAllKeys(object), objLength = objProps.length, othProps = getAllKeys(other), othLength = othProps.length; + if (objLength != othLength && !isPartial) { + return false; + } + var index = objLength; + while (index--) { + var key = objProps[index]; + if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { + return false; + } + } + var objStacked = stack.get(object); + var othStacked = stack.get(other); + if (objStacked && othStacked) { + return objStacked == other && othStacked == object; + } + var result = true; + stack.set(object, other); + stack.set(other, object); + var skipCtor = isPartial; + while (++index < objLength) { + key = objProps[index]; + var objValue = object[key], othValue = other[key]; + if (customizer) { + var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack); + } + if (!(compared === void 0 ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) : compared)) { + result = false; + break; + } + skipCtor || (skipCtor = key == "constructor"); + } + if (result && !skipCtor) { + var objCtor = object.constructor, othCtor = other.constructor; + if (objCtor != othCtor && ("constructor" in object && "constructor" in other) && !(typeof objCtor == "function" && objCtor instanceof objCtor && typeof othCtor == "function" && othCtor instanceof othCtor)) { + result = false; + } + } + stack["delete"](object); + stack["delete"](other); + return result; + } + module2.exports = equalObjects; + } +}); + +// ../../node_modules/lodash/_baseIsEqualDeep.js +var require_baseIsEqualDeep = __commonJS({ + "../../node_modules/lodash/_baseIsEqualDeep.js"(exports2, module2) { + var Stack = require_Stack(); + var equalArrays = require_equalArrays(); + var equalByTag = require_equalByTag(); + var equalObjects = require_equalObjects(); + var getTag = require_getTag(); + var isArray = require_isArray(); + var isBuffer = require_isBuffer(); + var isTypedArray = require_isTypedArray(); + var COMPARE_PARTIAL_FLAG = 1; + var argsTag = "[object Arguments]"; + var arrayTag = "[object Array]"; + var objectTag = "[object Object]"; + var objectProto = Object.prototype; + var hasOwnProperty = objectProto.hasOwnProperty; + function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { + var objIsArr = isArray(object), othIsArr = isArray(other), objTag = objIsArr ? arrayTag : getTag(object), othTag = othIsArr ? arrayTag : getTag(other); + objTag = objTag == argsTag ? objectTag : objTag; + othTag = othTag == argsTag ? objectTag : othTag; + var objIsObj = objTag == objectTag, othIsObj = othTag == objectTag, isSameTag = objTag == othTag; + if (isSameTag && isBuffer(object)) { + if (!isBuffer(other)) { + return false; + } + objIsArr = true; + objIsObj = false; + } + if (isSameTag && !objIsObj) { + stack || (stack = new Stack()); + return objIsArr || isTypedArray(object) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); + } + if (!(bitmask & COMPARE_PARTIAL_FLAG)) { + var objIsWrapped = objIsObj && hasOwnProperty.call(object, "__wrapped__"), othIsWrapped = othIsObj && hasOwnProperty.call(other, "__wrapped__"); + if (objIsWrapped || othIsWrapped) { + var objUnwrapped = objIsWrapped ? object.value() : object, othUnwrapped = othIsWrapped ? other.value() : other; + stack || (stack = new Stack()); + return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); + } + } + if (!isSameTag) { + return false; + } + stack || (stack = new Stack()); + return equalObjects(object, other, bitmask, customizer, equalFunc, stack); + } + module2.exports = baseIsEqualDeep; + } +}); + +// ../../node_modules/lodash/_baseIsEqual.js +var require_baseIsEqual = __commonJS({ + "../../node_modules/lodash/_baseIsEqual.js"(exports2, module2) { + var baseIsEqualDeep = require_baseIsEqualDeep(); + var isObjectLike = require_isObjectLike(); + function baseIsEqual(value, other, bitmask, customizer, stack) { + if (value === other) { + return true; + } + if (value == null || other == null || !isObjectLike(value) && !isObjectLike(other)) { + return value !== value && other !== other; + } + return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); + } + module2.exports = baseIsEqual; + } +}); + +// ../../node_modules/lodash/isEqual.js +var require_isEqual = __commonJS({ + "../../node_modules/lodash/isEqual.js"(exports2, module2) { + var baseIsEqual = require_baseIsEqual(); + function isEqual(value, other) { + return baseIsEqual(value, other); + } + module2.exports = isEqual; + } +}); + +// ../../node_modules/lodash/_isFlattenable.js +var require_isFlattenable = __commonJS({ + "../../node_modules/lodash/_isFlattenable.js"(exports2, module2) { + var Symbol2 = require_Symbol(); + var isArguments = require_isArguments(); + var isArray = require_isArray(); + var spreadableSymbol = Symbol2 ? Symbol2.isConcatSpreadable : void 0; + function isFlattenable(value) { + return isArray(value) || isArguments(value) || !!(spreadableSymbol && value && value[spreadableSymbol]); + } + module2.exports = isFlattenable; + } +}); + +// ../../node_modules/lodash/_baseFlatten.js +var require_baseFlatten = __commonJS({ + "../../node_modules/lodash/_baseFlatten.js"(exports2, module2) { + var arrayPush = require_arrayPush(); + var isFlattenable = require_isFlattenable(); + function baseFlatten(array, depth, predicate, isStrict, result) { + var index = -1, length = array.length; + predicate || (predicate = isFlattenable); + result || (result = []); + while (++index < length) { + var value = array[index]; + if (depth > 0 && predicate(value)) { + if (depth > 1) { + baseFlatten(value, depth - 1, predicate, isStrict, result); + } else { + arrayPush(result, value); + } + } else if (!isStrict) { + result[result.length] = value; + } + } + return result; + } + module2.exports = baseFlatten; + } +}); + +// ../../node_modules/lodash/_arrayMap.js +var require_arrayMap = __commonJS({ + "../../node_modules/lodash/_arrayMap.js"(exports2, module2) { + function arrayMap(array, iteratee) { + var index = -1, length = array == null ? 0 : array.length, result = Array(length); + while (++index < length) { + result[index] = iteratee(array[index], index, array); + } + return result; + } + module2.exports = arrayMap; + } +}); + +// ../../node_modules/lodash/isSymbol.js +var require_isSymbol = __commonJS({ + "../../node_modules/lodash/isSymbol.js"(exports2, module2) { + var baseGetTag = require_baseGetTag(); + var isObjectLike = require_isObjectLike(); + var symbolTag = "[object Symbol]"; + function isSymbol(value) { + return typeof value == "symbol" || isObjectLike(value) && baseGetTag(value) == symbolTag; + } + module2.exports = isSymbol; + } +}); + +// ../../node_modules/lodash/_isKey.js +var require_isKey = __commonJS({ + "../../node_modules/lodash/_isKey.js"(exports2, module2) { + var isArray = require_isArray(); + var isSymbol = require_isSymbol(); + var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/; + var reIsPlainProp = /^\w*$/; + function isKey(value, object) { + if (isArray(value)) { + return false; + } + var type = typeof value; + if (type == "number" || type == "symbol" || type == "boolean" || value == null || isSymbol(value)) { + return true; + } + return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object(object); + } + module2.exports = isKey; + } +}); + +// ../../node_modules/lodash/memoize.js +var require_memoize = __commonJS({ + "../../node_modules/lodash/memoize.js"(exports2, module2) { + var MapCache = require_MapCache(); + var FUNC_ERROR_TEXT = "Expected a function"; + function memoize(func, resolver) { + if (typeof func != "function" || resolver != null && typeof resolver != "function") { + throw new TypeError(FUNC_ERROR_TEXT); + } + var memoized = function() { + var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache = memoized.cache; + if (cache.has(key)) { + return cache.get(key); + } + var result = func.apply(this, args); + memoized.cache = cache.set(key, result) || cache; + return result; + }; + memoized.cache = new (memoize.Cache || MapCache)(); + return memoized; + } + memoize.Cache = MapCache; + module2.exports = memoize; + } +}); + +// ../../node_modules/lodash/_memoizeCapped.js +var require_memoizeCapped = __commonJS({ + "../../node_modules/lodash/_memoizeCapped.js"(exports2, module2) { + var memoize = require_memoize(); + var MAX_MEMOIZE_SIZE = 500; + function memoizeCapped(func) { + var result = memoize(func, function(key) { + if (cache.size === MAX_MEMOIZE_SIZE) { + cache.clear(); + } + return key; + }); + var cache = result.cache; + return result; + } + module2.exports = memoizeCapped; + } +}); + +// ../../node_modules/lodash/_stringToPath.js +var require_stringToPath = __commonJS({ + "../../node_modules/lodash/_stringToPath.js"(exports2, module2) { + var memoizeCapped = require_memoizeCapped(); + var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; + var reEscapeChar = /\\(\\)?/g; + var stringToPath = memoizeCapped(function(string) { + var result = []; + if (string.charCodeAt(0) === 46) { + result.push(""); + } + string.replace(rePropName, function(match, number, quote, subString) { + result.push(quote ? subString.replace(reEscapeChar, "$1") : number || match); + }); + return result; + }); + module2.exports = stringToPath; + } +}); + +// ../../node_modules/lodash/_baseToString.js +var require_baseToString = __commonJS({ + "../../node_modules/lodash/_baseToString.js"(exports2, module2) { + var Symbol2 = require_Symbol(); + var arrayMap = require_arrayMap(); + var isArray = require_isArray(); + var isSymbol = require_isSymbol(); + var INFINITY = 1 / 0; + var symbolProto = Symbol2 ? Symbol2.prototype : void 0; + var symbolToString = symbolProto ? symbolProto.toString : void 0; + function baseToString(value) { + if (typeof value == "string") { + return value; + } + if (isArray(value)) { + return arrayMap(value, baseToString) + ""; + } + if (isSymbol(value)) { + return symbolToString ? symbolToString.call(value) : ""; + } + var result = value + ""; + return result == "0" && 1 / value == -INFINITY ? "-0" : result; + } + module2.exports = baseToString; + } +}); + +// ../../node_modules/lodash/toString.js +var require_toString = __commonJS({ + "../../node_modules/lodash/toString.js"(exports2, module2) { + var baseToString = require_baseToString(); + function toString(value) { + return value == null ? "" : baseToString(value); + } + module2.exports = toString; + } +}); + +// ../../node_modules/lodash/_castPath.js +var require_castPath = __commonJS({ + "../../node_modules/lodash/_castPath.js"(exports2, module2) { + var isArray = require_isArray(); + var isKey = require_isKey(); + var stringToPath = require_stringToPath(); + var toString = require_toString(); + function castPath(value, object) { + if (isArray(value)) { + return value; + } + return isKey(value, object) ? [value] : stringToPath(toString(value)); + } + module2.exports = castPath; + } +}); + +// ../../node_modules/lodash/_toKey.js +var require_toKey = __commonJS({ + "../../node_modules/lodash/_toKey.js"(exports2, module2) { + var isSymbol = require_isSymbol(); + var INFINITY = 1 / 0; + function toKey(value) { + if (typeof value == "string" || isSymbol(value)) { + return value; + } + var result = value + ""; + return result == "0" && 1 / value == -INFINITY ? "-0" : result; + } + module2.exports = toKey; + } +}); + +// ../../node_modules/lodash/_baseGet.js +var require_baseGet = __commonJS({ + "../../node_modules/lodash/_baseGet.js"(exports2, module2) { + var castPath = require_castPath(); + var toKey = require_toKey(); + function baseGet(object, path) { + path = castPath(path, object); + var index = 0, length = path.length; + while (object != null && index < length) { + object = object[toKey(path[index++])]; + } + return index && index == length ? object : void 0; + } + module2.exports = baseGet; + } +}); + +// ../../node_modules/lodash/_baseIsMatch.js +var require_baseIsMatch = __commonJS({ + "../../node_modules/lodash/_baseIsMatch.js"(exports2, module2) { + var Stack = require_Stack(); + var baseIsEqual = require_baseIsEqual(); + var COMPARE_PARTIAL_FLAG = 1; + var COMPARE_UNORDERED_FLAG = 2; + function baseIsMatch(object, source, matchData, customizer) { + var index = matchData.length, length = index, noCustomizer = !customizer; + if (object == null) { + return !length; + } + object = Object(object); + while (index--) { + var data = matchData[index]; + if (noCustomizer && data[2] ? data[1] !== object[data[0]] : !(data[0] in object)) { + return false; + } + } + while (++index < length) { + data = matchData[index]; + var key = data[0], objValue = object[key], srcValue = data[1]; + if (noCustomizer && data[2]) { + if (objValue === void 0 && !(key in object)) { + return false; + } + } else { + var stack = new Stack(); + if (customizer) { + var result = customizer(objValue, srcValue, key, object, source, stack); + } + if (!(result === void 0 ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack) : result)) { + return false; + } + } + } + return true; + } + module2.exports = baseIsMatch; + } +}); + +// ../../node_modules/lodash/_isStrictComparable.js +var require_isStrictComparable = __commonJS({ + "../../node_modules/lodash/_isStrictComparable.js"(exports2, module2) { + var isObject = require_isObject(); + function isStrictComparable(value) { + return value === value && !isObject(value); + } + module2.exports = isStrictComparable; + } +}); + +// ../../node_modules/lodash/_getMatchData.js +var require_getMatchData = __commonJS({ + "../../node_modules/lodash/_getMatchData.js"(exports2, module2) { + var isStrictComparable = require_isStrictComparable(); + var keys = require_keys(); + function getMatchData(object) { + var result = keys(object), length = result.length; + while (length--) { + var key = result[length], value = object[key]; + result[length] = [key, value, isStrictComparable(value)]; + } + return result; + } + module2.exports = getMatchData; + } +}); + +// ../../node_modules/lodash/_matchesStrictComparable.js +var require_matchesStrictComparable = __commonJS({ + "../../node_modules/lodash/_matchesStrictComparable.js"(exports2, module2) { + function matchesStrictComparable(key, srcValue) { + return function(object) { + if (object == null) { + return false; + } + return object[key] === srcValue && (srcValue !== void 0 || key in Object(object)); + }; + } + module2.exports = matchesStrictComparable; + } +}); + +// ../../node_modules/lodash/_baseMatches.js +var require_baseMatches = __commonJS({ + "../../node_modules/lodash/_baseMatches.js"(exports2, module2) { + var baseIsMatch = require_baseIsMatch(); + var getMatchData = require_getMatchData(); + var matchesStrictComparable = require_matchesStrictComparable(); + function baseMatches(source) { + var matchData = getMatchData(source); + if (matchData.length == 1 && matchData[0][2]) { + return matchesStrictComparable(matchData[0][0], matchData[0][1]); + } + return function(object) { + return object === source || baseIsMatch(object, source, matchData); + }; + } + module2.exports = baseMatches; + } +}); + +// ../../node_modules/lodash/get.js +var require_get = __commonJS({ + "../../node_modules/lodash/get.js"(exports2, module2) { + var baseGet = require_baseGet(); + function get(object, path, defaultValue) { + var result = object == null ? void 0 : baseGet(object, path); + return result === void 0 ? defaultValue : result; + } + module2.exports = get; + } +}); + +// ../../node_modules/lodash/_baseHasIn.js +var require_baseHasIn = __commonJS({ + "../../node_modules/lodash/_baseHasIn.js"(exports2, module2) { + function baseHasIn(object, key) { + return object != null && key in Object(object); + } + module2.exports = baseHasIn; + } +}); + +// ../../node_modules/lodash/_hasPath.js +var require_hasPath = __commonJS({ + "../../node_modules/lodash/_hasPath.js"(exports2, module2) { + var castPath = require_castPath(); + var isArguments = require_isArguments(); + var isArray = require_isArray(); + var isIndex = require_isIndex(); + var isLength = require_isLength(); + var toKey = require_toKey(); + function hasPath(object, path, hasFunc) { + path = castPath(path, object); + var index = -1, length = path.length, result = false; + while (++index < length) { + var key = toKey(path[index]); + if (!(result = object != null && hasFunc(object, key))) { + break; + } + object = object[key]; + } + if (result || ++index != length) { + return result; + } + length = object == null ? 0 : object.length; + return !!length && isLength(length) && isIndex(key, length) && (isArray(object) || isArguments(object)); + } + module2.exports = hasPath; + } +}); + +// ../../node_modules/lodash/hasIn.js +var require_hasIn = __commonJS({ + "../../node_modules/lodash/hasIn.js"(exports2, module2) { + var baseHasIn = require_baseHasIn(); + var hasPath = require_hasPath(); + function hasIn(object, path) { + return object != null && hasPath(object, path, baseHasIn); + } + module2.exports = hasIn; + } +}); + +// ../../node_modules/lodash/_baseMatchesProperty.js +var require_baseMatchesProperty = __commonJS({ + "../../node_modules/lodash/_baseMatchesProperty.js"(exports2, module2) { + var baseIsEqual = require_baseIsEqual(); + var get = require_get(); + var hasIn = require_hasIn(); + var isKey = require_isKey(); + var isStrictComparable = require_isStrictComparable(); + var matchesStrictComparable = require_matchesStrictComparable(); + var toKey = require_toKey(); + var COMPARE_PARTIAL_FLAG = 1; + var COMPARE_UNORDERED_FLAG = 2; + function baseMatchesProperty(path, srcValue) { + if (isKey(path) && isStrictComparable(srcValue)) { + return matchesStrictComparable(toKey(path), srcValue); + } + return function(object) { + var objValue = get(object, path); + return objValue === void 0 && objValue === srcValue ? hasIn(object, path) : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG); + }; + } + module2.exports = baseMatchesProperty; + } +}); + +// ../../node_modules/lodash/identity.js +var require_identity = __commonJS({ + "../../node_modules/lodash/identity.js"(exports2, module2) { + function identity(value) { + return value; + } + module2.exports = identity; + } +}); + +// ../../node_modules/lodash/_baseProperty.js +var require_baseProperty = __commonJS({ + "../../node_modules/lodash/_baseProperty.js"(exports2, module2) { + function baseProperty(key) { + return function(object) { + return object == null ? void 0 : object[key]; + }; + } + module2.exports = baseProperty; + } +}); + +// ../../node_modules/lodash/_basePropertyDeep.js +var require_basePropertyDeep = __commonJS({ + "../../node_modules/lodash/_basePropertyDeep.js"(exports2, module2) { + var baseGet = require_baseGet(); + function basePropertyDeep(path) { + return function(object) { + return baseGet(object, path); + }; + } + module2.exports = basePropertyDeep; + } +}); + +// ../../node_modules/lodash/property.js +var require_property2 = __commonJS({ + "../../node_modules/lodash/property.js"(exports2, module2) { + var baseProperty = require_baseProperty(); + var basePropertyDeep = require_basePropertyDeep(); + var isKey = require_isKey(); + var toKey = require_toKey(); + function property(path) { + return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path); + } + module2.exports = property; + } +}); + +// ../../node_modules/lodash/_baseIteratee.js +var require_baseIteratee = __commonJS({ + "../../node_modules/lodash/_baseIteratee.js"(exports2, module2) { + var baseMatches = require_baseMatches(); + var baseMatchesProperty = require_baseMatchesProperty(); + var identity = require_identity(); + var isArray = require_isArray(); + var property = require_property2(); + function baseIteratee(value) { + if (typeof value == "function") { + return value; + } + if (value == null) { + return identity; + } + if (typeof value == "object") { + return isArray(value) ? baseMatchesProperty(value[0], value[1]) : baseMatches(value); + } + return property(value); + } + module2.exports = baseIteratee; + } +}); + +// ../../node_modules/lodash/_createBaseFor.js +var require_createBaseFor = __commonJS({ + "../../node_modules/lodash/_createBaseFor.js"(exports2, module2) { + function createBaseFor(fromRight) { + return function(object, iteratee, keysFunc) { + var index = -1, iterable = Object(object), props = keysFunc(object), length = props.length; + while (length--) { + var key = props[fromRight ? length : ++index]; + if (iteratee(iterable[key], key, iterable) === false) { + break; + } + } + return object; + }; + } + module2.exports = createBaseFor; + } +}); + +// ../../node_modules/lodash/_baseFor.js +var require_baseFor = __commonJS({ + "../../node_modules/lodash/_baseFor.js"(exports2, module2) { + var createBaseFor = require_createBaseFor(); + var baseFor = createBaseFor(); + module2.exports = baseFor; + } +}); + +// ../../node_modules/lodash/_baseForOwn.js +var require_baseForOwn = __commonJS({ + "../../node_modules/lodash/_baseForOwn.js"(exports2, module2) { + var baseFor = require_baseFor(); + var keys = require_keys(); + function baseForOwn(object, iteratee) { + return object && baseFor(object, iteratee, keys); + } + module2.exports = baseForOwn; + } +}); + +// ../../node_modules/lodash/_createBaseEach.js +var require_createBaseEach = __commonJS({ + "../../node_modules/lodash/_createBaseEach.js"(exports2, module2) { + var isArrayLike = require_isArrayLike(); + function createBaseEach(eachFunc, fromRight) { + return function(collection, iteratee) { + if (collection == null) { + return collection; + } + if (!isArrayLike(collection)) { + return eachFunc(collection, iteratee); + } + var length = collection.length, index = fromRight ? length : -1, iterable = Object(collection); + while (fromRight ? index-- : ++index < length) { + if (iteratee(iterable[index], index, iterable) === false) { + break; + } + } + return collection; + }; + } + module2.exports = createBaseEach; + } +}); + +// ../../node_modules/lodash/_baseEach.js +var require_baseEach = __commonJS({ + "../../node_modules/lodash/_baseEach.js"(exports2, module2) { + var baseForOwn = require_baseForOwn(); + var createBaseEach = require_createBaseEach(); + var baseEach = createBaseEach(baseForOwn); + module2.exports = baseEach; + } +}); + +// ../../node_modules/lodash/_baseMap.js +var require_baseMap = __commonJS({ + "../../node_modules/lodash/_baseMap.js"(exports2, module2) { + var baseEach = require_baseEach(); + var isArrayLike = require_isArrayLike(); + function baseMap(collection, iteratee) { + var index = -1, result = isArrayLike(collection) ? Array(collection.length) : []; + baseEach(collection, function(value, key, collection2) { + result[++index] = iteratee(value, key, collection2); + }); + return result; + } + module2.exports = baseMap; + } +}); + +// ../../node_modules/lodash/_baseSortBy.js +var require_baseSortBy = __commonJS({ + "../../node_modules/lodash/_baseSortBy.js"(exports2, module2) { + function baseSortBy(array, comparer) { + var length = array.length; + array.sort(comparer); + while (length--) { + array[length] = array[length].value; + } + return array; + } + module2.exports = baseSortBy; + } +}); + +// ../../node_modules/lodash/_compareAscending.js +var require_compareAscending = __commonJS({ + "../../node_modules/lodash/_compareAscending.js"(exports2, module2) { + var isSymbol = require_isSymbol(); + function compareAscending(value, other) { + if (value !== other) { + var valIsDefined = value !== void 0, valIsNull = value === null, valIsReflexive = value === value, valIsSymbol = isSymbol(value); + var othIsDefined = other !== void 0, othIsNull = other === null, othIsReflexive = other === other, othIsSymbol = isSymbol(other); + if (!othIsNull && !othIsSymbol && !valIsSymbol && value > other || valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol || valIsNull && othIsDefined && othIsReflexive || !valIsDefined && othIsReflexive || !valIsReflexive) { + return 1; + } + if (!valIsNull && !valIsSymbol && !othIsSymbol && value < other || othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol || othIsNull && valIsDefined && valIsReflexive || !othIsDefined && valIsReflexive || !othIsReflexive) { + return -1; + } + } + return 0; + } + module2.exports = compareAscending; + } +}); + +// ../../node_modules/lodash/_compareMultiple.js +var require_compareMultiple = __commonJS({ + "../../node_modules/lodash/_compareMultiple.js"(exports2, module2) { + var compareAscending = require_compareAscending(); + function compareMultiple(object, other, orders) { + var index = -1, objCriteria = object.criteria, othCriteria = other.criteria, length = objCriteria.length, ordersLength = orders.length; + while (++index < length) { + var result = compareAscending(objCriteria[index], othCriteria[index]); + if (result) { + if (index >= ordersLength) { + return result; + } + var order = orders[index]; + return result * (order == "desc" ? -1 : 1); + } + } + return object.index - other.index; + } + module2.exports = compareMultiple; + } +}); + +// ../../node_modules/lodash/_baseOrderBy.js +var require_baseOrderBy = __commonJS({ + "../../node_modules/lodash/_baseOrderBy.js"(exports2, module2) { + var arrayMap = require_arrayMap(); + var baseGet = require_baseGet(); + var baseIteratee = require_baseIteratee(); + var baseMap = require_baseMap(); + var baseSortBy = require_baseSortBy(); + var baseUnary = require_baseUnary(); + var compareMultiple = require_compareMultiple(); + var identity = require_identity(); + var isArray = require_isArray(); + function baseOrderBy(collection, iteratees, orders) { + if (iteratees.length) { + iteratees = arrayMap(iteratees, function(iteratee) { + if (isArray(iteratee)) { + return function(value) { + return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee); + }; + } + return iteratee; + }); + } else { + iteratees = [identity]; + } + var index = -1; + iteratees = arrayMap(iteratees, baseUnary(baseIteratee)); + var result = baseMap(collection, function(value, key, collection2) { + var criteria = arrayMap(iteratees, function(iteratee) { + return iteratee(value); + }); + return { "criteria": criteria, "index": ++index, "value": value }; + }); + return baseSortBy(result, function(object, other) { + return compareMultiple(object, other, orders); + }); + } + module2.exports = baseOrderBy; + } +}); + +// ../../node_modules/lodash/_apply.js +var require_apply = __commonJS({ + "../../node_modules/lodash/_apply.js"(exports2, module2) { + function apply(func, thisArg, args) { + switch (args.length) { + case 0: + return func.call(thisArg); + case 1: + return func.call(thisArg, args[0]); + case 2: + return func.call(thisArg, args[0], args[1]); + case 3: + return func.call(thisArg, args[0], args[1], args[2]); + } + return func.apply(thisArg, args); + } + module2.exports = apply; + } +}); + +// ../../node_modules/lodash/_overRest.js +var require_overRest = __commonJS({ + "../../node_modules/lodash/_overRest.js"(exports2, module2) { + var apply = require_apply(); + var nativeMax = Math.max; + function overRest(func, start, transform) { + start = nativeMax(start === void 0 ? func.length - 1 : start, 0); + return function() { + var args = arguments, index = -1, length = nativeMax(args.length - start, 0), array = Array(length); + while (++index < length) { + array[index] = args[start + index]; + } + index = -1; + var otherArgs = Array(start + 1); + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = transform(array); + return apply(func, this, otherArgs); + }; + } + module2.exports = overRest; + } +}); + +// ../../node_modules/lodash/constant.js +var require_constant = __commonJS({ + "../../node_modules/lodash/constant.js"(exports2, module2) { + function constant(value) { + return function() { + return value; + }; + } + module2.exports = constant; + } +}); + +// ../../node_modules/lodash/_baseSetToString.js +var require_baseSetToString = __commonJS({ + "../../node_modules/lodash/_baseSetToString.js"(exports2, module2) { + var constant = require_constant(); + var defineProperty = require_defineProperty(); + var identity = require_identity(); + var baseSetToString = !defineProperty ? identity : function(func, string) { + return defineProperty(func, "toString", { + "configurable": true, + "enumerable": false, + "value": constant(string), + "writable": true + }); + }; + module2.exports = baseSetToString; + } +}); + +// ../../node_modules/lodash/_shortOut.js +var require_shortOut = __commonJS({ + "../../node_modules/lodash/_shortOut.js"(exports2, module2) { + var HOT_COUNT = 800; + var HOT_SPAN = 16; + var nativeNow = Date.now; + function shortOut(func) { + var count = 0, lastCalled = 0; + return function() { + var stamp = nativeNow(), remaining = HOT_SPAN - (stamp - lastCalled); + lastCalled = stamp; + if (remaining > 0) { + if (++count >= HOT_COUNT) { + return arguments[0]; + } + } else { + count = 0; + } + return func.apply(void 0, arguments); + }; + } + module2.exports = shortOut; + } +}); + +// ../../node_modules/lodash/_setToString.js +var require_setToString = __commonJS({ + "../../node_modules/lodash/_setToString.js"(exports2, module2) { + var baseSetToString = require_baseSetToString(); + var shortOut = require_shortOut(); + var setToString = shortOut(baseSetToString); + module2.exports = setToString; + } +}); + +// ../../node_modules/lodash/_baseRest.js +var require_baseRest = __commonJS({ + "../../node_modules/lodash/_baseRest.js"(exports2, module2) { + var identity = require_identity(); + var overRest = require_overRest(); + var setToString = require_setToString(); + function baseRest(func, start) { + return setToString(overRest(func, start, identity), func + ""); + } + module2.exports = baseRest; + } +}); + +// ../../node_modules/lodash/_isIterateeCall.js +var require_isIterateeCall = __commonJS({ + "../../node_modules/lodash/_isIterateeCall.js"(exports2, module2) { + var eq = require_eq2(); + var isArrayLike = require_isArrayLike(); + var isIndex = require_isIndex(); + var isObject = require_isObject(); + function isIterateeCall(value, index, object) { + if (!isObject(object)) { + return false; + } + var type = typeof index; + if (type == "number" ? isArrayLike(object) && isIndex(index, object.length) : type == "string" && index in object) { + return eq(object[index], value); + } + return false; + } + module2.exports = isIterateeCall; + } +}); + +// ../../node_modules/lodash/sortBy.js +var require_sortBy = __commonJS({ + "../../node_modules/lodash/sortBy.js"(exports2, module2) { + var baseFlatten = require_baseFlatten(); + var baseOrderBy = require_baseOrderBy(); + var baseRest = require_baseRest(); + var isIterateeCall = require_isIterateeCall(); + var sortBy = baseRest(function(collection, iteratees) { + if (collection == null) { + return []; + } + var length = iteratees.length; + if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) { + iteratees = []; + } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) { + iteratees = [iteratees[0]]; + } + return baseOrderBy(collection, baseFlatten(iteratees, 1), []); + }); + module2.exports = sortBy; + } +}); + +// ../../node_modules/lodash/_baseFindIndex.js +var require_baseFindIndex = __commonJS({ + "../../node_modules/lodash/_baseFindIndex.js"(exports2, module2) { + function baseFindIndex(array, predicate, fromIndex, fromRight) { + var length = array.length, index = fromIndex + (fromRight ? 1 : -1); + while (fromRight ? index-- : ++index < length) { + if (predicate(array[index], index, array)) { + return index; + } + } + return -1; + } + module2.exports = baseFindIndex; + } +}); + +// ../../node_modules/lodash/_baseIsNaN.js +var require_baseIsNaN = __commonJS({ + "../../node_modules/lodash/_baseIsNaN.js"(exports2, module2) { + function baseIsNaN(value) { + return value !== value; + } + module2.exports = baseIsNaN; + } +}); + +// ../../node_modules/lodash/_strictIndexOf.js +var require_strictIndexOf = __commonJS({ + "../../node_modules/lodash/_strictIndexOf.js"(exports2, module2) { + function strictIndexOf(array, value, fromIndex) { + var index = fromIndex - 1, length = array.length; + while (++index < length) { + if (array[index] === value) { + return index; + } + } + return -1; + } + module2.exports = strictIndexOf; + } +}); + +// ../../node_modules/lodash/_baseIndexOf.js +var require_baseIndexOf = __commonJS({ + "../../node_modules/lodash/_baseIndexOf.js"(exports2, module2) { + var baseFindIndex = require_baseFindIndex(); + var baseIsNaN = require_baseIsNaN(); + var strictIndexOf = require_strictIndexOf(); + function baseIndexOf(array, value, fromIndex) { + return value === value ? strictIndexOf(array, value, fromIndex) : baseFindIndex(array, baseIsNaN, fromIndex); + } + module2.exports = baseIndexOf; + } +}); + +// ../../node_modules/lodash/_arrayIncludes.js +var require_arrayIncludes = __commonJS({ + "../../node_modules/lodash/_arrayIncludes.js"(exports2, module2) { + var baseIndexOf = require_baseIndexOf(); + function arrayIncludes(array, value) { + var length = array == null ? 0 : array.length; + return !!length && baseIndexOf(array, value, 0) > -1; + } + module2.exports = arrayIncludes; + } +}); + +// ../../node_modules/lodash/_arrayIncludesWith.js +var require_arrayIncludesWith = __commonJS({ + "../../node_modules/lodash/_arrayIncludesWith.js"(exports2, module2) { + function arrayIncludesWith(array, value, comparator) { + var index = -1, length = array == null ? 0 : array.length; + while (++index < length) { + if (comparator(value, array[index])) { + return true; + } + } + return false; + } + module2.exports = arrayIncludesWith; + } +}); + +// ../../node_modules/lodash/noop.js +var require_noop = __commonJS({ + "../../node_modules/lodash/noop.js"(exports2, module2) { + function noop() { + } + module2.exports = noop; + } +}); + +// ../../node_modules/lodash/_createSet.js +var require_createSet = __commonJS({ + "../../node_modules/lodash/_createSet.js"(exports2, module2) { + var Set2 = require_Set(); + var noop = require_noop(); + var setToArray = require_setToArray(); + var INFINITY = 1 / 0; + var createSet = !(Set2 && 1 / setToArray(new Set2([, -0]))[1] == INFINITY) ? noop : function(values) { + return new Set2(values); + }; + module2.exports = createSet; + } +}); + +// ../../node_modules/lodash/_baseUniq.js +var require_baseUniq = __commonJS({ + "../../node_modules/lodash/_baseUniq.js"(exports2, module2) { + var SetCache = require_SetCache(); + var arrayIncludes = require_arrayIncludes(); + var arrayIncludesWith = require_arrayIncludesWith(); + var cacheHas = require_cacheHas(); + var createSet = require_createSet(); + var setToArray = require_setToArray(); + var LARGE_ARRAY_SIZE = 200; + function baseUniq(array, iteratee, comparator) { + var index = -1, includes = arrayIncludes, length = array.length, isCommon = true, result = [], seen = result; + if (comparator) { + isCommon = false; + includes = arrayIncludesWith; + } else if (length >= LARGE_ARRAY_SIZE) { + var set = iteratee ? null : createSet(array); + if (set) { + return setToArray(set); + } + isCommon = false; + includes = cacheHas; + seen = new SetCache(); + } else { + seen = iteratee ? [] : result; + } + outer: + while (++index < length) { + var value = array[index], computed = iteratee ? iteratee(value) : value; + value = comparator || value !== 0 ? value : 0; + if (isCommon && computed === computed) { + var seenIndex = seen.length; + while (seenIndex--) { + if (seen[seenIndex] === computed) { + continue outer; + } + } + if (iteratee) { + seen.push(computed); + } + result.push(value); + } else if (!includes(seen, computed, comparator)) { + if (seen !== result) { + seen.push(computed); + } + result.push(value); + } + } + return result; + } + module2.exports = baseUniq; + } +}); + +// ../../node_modules/lodash/uniq.js +var require_uniq = __commonJS({ + "../../node_modules/lodash/uniq.js"(exports2, module2) { + var baseUniq = require_baseUniq(); + function uniq(array) { + return array && array.length ? baseUniq(array) : []; + } + module2.exports = uniq; + } +}); + +// ../../node_modules/lodash/uniqWith.js +var require_uniqWith = __commonJS({ + "../../node_modules/lodash/uniqWith.js"(exports2, module2) { + var baseUniq = require_baseUniq(); + function uniqWith(array, comparator) { + comparator = typeof comparator == "function" ? comparator : void 0; + return array && array.length ? baseUniq(array, void 0, comparator) : []; + } + module2.exports = uniqWith; + } +}); + +// ../../node_modules/lodash/defaults.js +var require_defaults2 = __commonJS({ + "../../node_modules/lodash/defaults.js"(exports2, module2) { + var baseRest = require_baseRest(); + var eq = require_eq2(); + var isIterateeCall = require_isIterateeCall(); + var keysIn = require_keysIn(); + var objectProto = Object.prototype; + var hasOwnProperty = objectProto.hasOwnProperty; + var defaults = baseRest(function(object, sources) { + object = Object(object); + var index = -1; + var length = sources.length; + var guard = length > 2 ? sources[2] : void 0; + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + length = 1; + } + while (++index < length) { + var source = sources[index]; + var props = keysIn(source); + var propsIndex = -1; + var propsLength = props.length; + while (++propsIndex < propsLength) { + var key = props[propsIndex]; + var value = object[key]; + if (value === void 0 || eq(value, objectProto[key]) && !hasOwnProperty.call(object, key)) { + object[key] = source[key]; + } + } + } + return object; + }); + module2.exports = defaults; + } +}); + +// ../../node_modules/lodash/_baseIntersection.js +var require_baseIntersection = __commonJS({ + "../../node_modules/lodash/_baseIntersection.js"(exports2, module2) { + var SetCache = require_SetCache(); + var arrayIncludes = require_arrayIncludes(); + var arrayIncludesWith = require_arrayIncludesWith(); + var arrayMap = require_arrayMap(); + var baseUnary = require_baseUnary(); + var cacheHas = require_cacheHas(); + var nativeMin = Math.min; + function baseIntersection(arrays, iteratee, comparator) { + var includes = comparator ? arrayIncludesWith : arrayIncludes, length = arrays[0].length, othLength = arrays.length, othIndex = othLength, caches = Array(othLength), maxLength = Infinity, result = []; + while (othIndex--) { + var array = arrays[othIndex]; + if (othIndex && iteratee) { + array = arrayMap(array, baseUnary(iteratee)); + } + maxLength = nativeMin(array.length, maxLength); + caches[othIndex] = !comparator && (iteratee || length >= 120 && array.length >= 120) ? new SetCache(othIndex && array) : void 0; + } + array = arrays[0]; + var index = -1, seen = caches[0]; + outer: + while (++index < length && result.length < maxLength) { + var value = array[index], computed = iteratee ? iteratee(value) : value; + value = comparator || value !== 0 ? value : 0; + if (!(seen ? cacheHas(seen, computed) : includes(result, computed, comparator))) { + othIndex = othLength; + while (--othIndex) { + var cache = caches[othIndex]; + if (!(cache ? cacheHas(cache, computed) : includes(arrays[othIndex], computed, comparator))) { + continue outer; + } + } + if (seen) { + seen.push(computed); + } + result.push(value); + } + } + return result; + } + module2.exports = baseIntersection; + } +}); + +// ../../node_modules/lodash/isArrayLikeObject.js +var require_isArrayLikeObject = __commonJS({ + "../../node_modules/lodash/isArrayLikeObject.js"(exports2, module2) { + var isArrayLike = require_isArrayLike(); + var isObjectLike = require_isObjectLike(); + function isArrayLikeObject(value) { + return isObjectLike(value) && isArrayLike(value); + } + module2.exports = isArrayLikeObject; + } +}); + +// ../../node_modules/lodash/_castArrayLikeObject.js +var require_castArrayLikeObject = __commonJS({ + "../../node_modules/lodash/_castArrayLikeObject.js"(exports2, module2) { + var isArrayLikeObject = require_isArrayLikeObject(); + function castArrayLikeObject(value) { + return isArrayLikeObject(value) ? value : []; + } + module2.exports = castArrayLikeObject; + } +}); + +// ../../node_modules/lodash/last.js +var require_last = __commonJS({ + "../../node_modules/lodash/last.js"(exports2, module2) { + function last(array) { + var length = array == null ? 0 : array.length; + return length ? array[length - 1] : void 0; + } + module2.exports = last; + } +}); + +// ../../node_modules/lodash/intersectionWith.js +var require_intersectionWith = __commonJS({ + "../../node_modules/lodash/intersectionWith.js"(exports2, module2) { + var arrayMap = require_arrayMap(); + var baseIntersection = require_baseIntersection(); + var baseRest = require_baseRest(); + var castArrayLikeObject = require_castArrayLikeObject(); + var last = require_last(); + var intersectionWith = baseRest(function(arrays) { + var comparator = last(arrays), mapped = arrayMap(arrays, castArrayLikeObject); + comparator = typeof comparator == "function" ? comparator : void 0; + if (comparator) { + mapped.pop(); + } + return mapped.length && mapped[0] === arrays[0] ? baseIntersection(mapped, void 0, comparator) : []; + }); + module2.exports = intersectionWith; + } +}); + +// ../../node_modules/lodash/isPlainObject.js +var require_isPlainObject = __commonJS({ + "../../node_modules/lodash/isPlainObject.js"(exports2, module2) { + var baseGetTag = require_baseGetTag(); + var getPrototype = require_getPrototype(); + var isObjectLike = require_isObjectLike(); + var objectTag = "[object Object]"; + var funcProto = Function.prototype; + var objectProto = Object.prototype; + var funcToString = funcProto.toString; + var hasOwnProperty = objectProto.hasOwnProperty; + var objectCtorString = funcToString.call(Object); + function isPlainObject(value) { + if (!isObjectLike(value) || baseGetTag(value) != objectTag) { + return false; + } + var proto = getPrototype(value); + if (proto === null) { + return true; + } + var Ctor = hasOwnProperty.call(proto, "constructor") && proto.constructor; + return typeof Ctor == "function" && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString; + } + module2.exports = isPlainObject; + } +}); + +// ../../node_modules/lodash/isBoolean.js +var require_isBoolean = __commonJS({ + "../../node_modules/lodash/isBoolean.js"(exports2, module2) { + var baseGetTag = require_baseGetTag(); + var isObjectLike = require_isObjectLike(); + var boolTag = "[object Boolean]"; + function isBoolean(value) { + return value === true || value === false || isObjectLike(value) && baseGetTag(value) == boolTag; + } + module2.exports = isBoolean; + } +}); + +// ../../node_modules/json-schema-compare/src/index.js +var require_src = __commonJS({ + "../../node_modules/json-schema-compare/src/index.js"(exports2, module2) { + var isEqual = require_isEqual(); + var sortBy = require_sortBy(); + var uniq = require_uniq(); + var uniqWith = require_uniqWith(); + var defaults = require_defaults2(); + var intersectionWith = require_intersectionWith(); + var isPlainObject = require_isPlainObject(); + var isBoolean = require_isBoolean(); + var normalizeArray = (val) => Array.isArray(val) ? val : [val]; + var undef = (val) => val === void 0; + var keys = (obj) => isPlainObject(obj) || Array.isArray(obj) ? Object.keys(obj) : []; + var has = (obj, key) => obj.hasOwnProperty(key); + var stringArray = (arr) => sortBy(uniq(arr)); + var undefEmpty = (val) => undef(val) || Array.isArray(val) && val.length === 0; + var keyValEqual = (a, b, key, compare2) => b && has(b, key) && a && has(a, key) && compare2(a[key], b[key]); + var undefAndZero = (a, b) => undef(a) && b === 0 || undef(b) && a === 0 || isEqual(a, b); + var falseUndefined = (a, b) => undef(a) && b === false || undef(b) && a === false || isEqual(a, b); + var emptySchema = (schema2) => undef(schema2) || isEqual(schema2, {}) || schema2 === true; + var emptyObjUndef = (schema2) => undef(schema2) || isEqual(schema2, {}); + var isSchema = (val) => undef(val) || isPlainObject(val) || val === true || val === false; + function undefArrayEqual(a, b) { + if (undefEmpty(a) && undefEmpty(b)) { + return true; + } else { + return isEqual(stringArray(a), stringArray(b)); + } + } + function unsortedNormalizedArray(a, b) { + a = normalizeArray(a); + b = normalizeArray(b); + return isEqual(stringArray(a), stringArray(b)); + } + function schemaGroup(a, b, key, compare2) { + var allProps = uniq(keys(a).concat(keys(b))); + if (emptyObjUndef(a) && emptyObjUndef(b)) { + return true; + } else if (emptyObjUndef(a) && keys(b).length) { + return false; + } else if (emptyObjUndef(b) && keys(a).length) { + return false; + } + return allProps.every(function(key2) { + var aVal = a[key2]; + var bVal = b[key2]; + if (Array.isArray(aVal) && Array.isArray(bVal)) { + return isEqual(stringArray(a), stringArray(b)); + } else if (Array.isArray(aVal) && !Array.isArray(bVal)) { + return false; + } else if (Array.isArray(bVal) && !Array.isArray(aVal)) { + return false; + } + return keyValEqual(a, b, key2, compare2); + }); + } + function items(a, b, key, compare2) { + if (isPlainObject(a) && isPlainObject(b)) { + return compare2(a, b); + } else if (Array.isArray(a) && Array.isArray(b)) { + return schemaGroup(a, b, key, compare2); + } else { + return isEqual(a, b); + } + } + function unsortedArray(a, b, key, compare2) { + var uniqueA = uniqWith(a, compare2); + var uniqueB = uniqWith(b, compare2); + var inter = intersectionWith(uniqueA, uniqueB, compare2); + return inter.length === Math.max(uniqueA.length, uniqueB.length); + } + var comparers = { + title: isEqual, + uniqueItems: falseUndefined, + minLength: undefAndZero, + minItems: undefAndZero, + minProperties: undefAndZero, + required: undefArrayEqual, + enum: undefArrayEqual, + type: unsortedNormalizedArray, + items, + anyOf: unsortedArray, + allOf: unsortedArray, + oneOf: unsortedArray, + properties: schemaGroup, + patternProperties: schemaGroup, + dependencies: schemaGroup + }; + var acceptsUndefined = [ + "properties", + "patternProperties", + "dependencies", + "uniqueItems", + "minLength", + "minItems", + "minProperties", + "required" + ]; + var schemaProps = ["additionalProperties", "additionalItems", "contains", "propertyNames", "not"]; + function compare(a, b, options) { + options = defaults(options, { + ignore: [] + }); + if (emptySchema(a) && emptySchema(b)) { + return true; + } + if (!isSchema(a) || !isSchema(b)) { + throw new Error("Either of the values are not a JSON schema."); + } + if (a === b) { + return true; + } + if (isBoolean(a) && isBoolean(b)) { + return a === b; + } + if (a === void 0 && b === false || b === void 0 && a === false) { + return false; + } + if (undef(a) && !undef(b) || !undef(a) && undef(b)) { + return false; + } + var allKeys = uniq(Object.keys(a).concat(Object.keys(b))); + if (options.ignore.length) { + allKeys = allKeys.filter((k) => options.ignore.indexOf(k) === -1); + } + if (!allKeys.length) { + return true; + } + function innerCompare(a2, b2) { + return compare(a2, b2, options); + } + return allKeys.every(function(key) { + var aValue = a[key]; + var bValue = b[key]; + if (schemaProps.indexOf(key) !== -1) { + return compare(aValue, bValue, options); + } + var comparer = comparers[key]; + if (!comparer) { + comparer = isEqual; + } + if (isEqual(aValue, bValue)) { + return true; + } + if (acceptsUndefined.indexOf(key) === -1) { + if (!has(a, key) && has(b, key) || has(a, key) && !has(b, key)) { + return aValue === bValue; + } + } + var result = comparer(aValue, bValue, key, innerCompare); + if (!isBoolean(result)) { + throw new Error("Comparer must return true or false"); + } + return result; + }); + } + module2.exports = compare; + } +}); + +// ../../node_modules/validate.io-array/lib/index.js +var require_lib6 = __commonJS({ + "../../node_modules/validate.io-array/lib/index.js"(exports2, module2) { + "use strict"; + function isArray(value) { + return Object.prototype.toString.call(value) === "[object Array]"; + } + module2.exports = Array.isArray || isArray; + } +}); + +// ../../node_modules/validate.io-number/lib/index.js +var require_lib7 = __commonJS({ + "../../node_modules/validate.io-number/lib/index.js"(exports2, module2) { + "use strict"; + function isNumber(value) { + return (typeof value === "number" || Object.prototype.toString.call(value) === "[object Number]") && value.valueOf() === value.valueOf(); + } + module2.exports = isNumber; + } +}); + +// ../../node_modules/validate.io-integer/lib/index.js +var require_lib8 = __commonJS({ + "../../node_modules/validate.io-integer/lib/index.js"(exports2, module2) { + "use strict"; + var isNumber = require_lib7(); + function isInteger(value) { + return isNumber(value) && value % 1 === 0; + } + module2.exports = isInteger; + } +}); + +// ../../node_modules/validate.io-integer-array/lib/index.js +var require_lib9 = __commonJS({ + "../../node_modules/validate.io-integer-array/lib/index.js"(exports2, module2) { + "use strict"; + var isArray = require_lib6(); + var isInteger = require_lib8(); + function isIntegerArray(value) { + var len; + if (!isArray(value)) { + return false; + } + len = value.length; + if (!len) { + return false; + } + for (var i = 0; i < len; i++) { + if (!isInteger(value[i])) { + return false; + } + } + return true; + } + module2.exports = isIntegerArray; + } +}); + +// ../../node_modules/validate.io-function/lib/index.js +var require_lib10 = __commonJS({ + "../../node_modules/validate.io-function/lib/index.js"(exports2, module2) { + "use strict"; + function isFunction(value) { + return typeof value === "function"; + } + module2.exports = isFunction; + } +}); + +// ../../node_modules/compute-gcd/lib/index.js +var require_lib11 = __commonJS({ + "../../node_modules/compute-gcd/lib/index.js"(exports2, module2) { + "use strict"; + var isArray = require_lib6(); + var isIntegerArray = require_lib9(); + var isFunction = require_lib10(); + var MAXINT = Math.pow(2, 31) - 1; + function gcd(a, b) { + var k = 1, t; + if (a === 0) { + return b; + } + if (b === 0) { + return a; + } + while (a % 2 === 0 && b % 2 === 0) { + a = a / 2; + b = b / 2; + k = k * 2; + } + while (a % 2 === 0) { + a = a / 2; + } + while (b) { + while (b % 2 === 0) { + b = b / 2; + } + if (a > b) { + t = b; + b = a; + a = t; + } + b = b - a; + } + return k * a; + } + function bitwise(a, b) { + var k = 0, t; + if (a === 0) { + return b; + } + if (b === 0) { + return a; + } + while ((a & 1) === 0 && (b & 1) === 0) { + a >>>= 1; + b >>>= 1; + k++; + } + while ((a & 1) === 0) { + a >>>= 1; + } + while (b) { + while ((b & 1) === 0) { + b >>>= 1; + } + if (a > b) { + t = b; + b = a; + a = t; + } + b = b - a; + } + return a << k; + } + function compute() { + var nargs = arguments.length, args, clbk, arr, len, a, b, i; + args = new Array(nargs); + for (i = 0; i < nargs; i++) { + args[i] = arguments[i]; + } + if (isIntegerArray(args)) { + if (nargs === 2) { + a = args[0]; + b = args[1]; + if (a < 0) { + a = -a; + } + if (b < 0) { + b = -b; + } + if (a <= MAXINT && b <= MAXINT) { + return bitwise(a, b); + } else { + return gcd(a, b); + } + } + arr = args; + } else if (!isArray(args[0])) { + throw new TypeError("gcd()::invalid input argument. Must provide an array of integers. Value: `" + args[0] + "`."); + } else if (nargs > 1) { + arr = args[0]; + clbk = args[1]; + if (!isFunction(clbk)) { + throw new TypeError("gcd()::invalid input argument. Accessor must be a function. Value: `" + clbk + "`."); + } + } else { + arr = args[0]; + } + len = arr.length; + if (len < 2) { + return null; + } + if (clbk) { + a = new Array(len); + for (i = 0; i < len; i++) { + a[i] = clbk(arr[i], i); + } + arr = a; + } + if (nargs < 3) { + if (!isIntegerArray(arr)) { + throw new TypeError("gcd()::invalid input argument. Accessed array values must be integers. Value: `" + arr + "`."); + } + } + for (i = 0; i < len; i++) { + a = arr[i]; + if (a < 0) { + arr[i] = -a; + } + } + a = arr[0]; + for (i = 1; i < len; i++) { + b = arr[i]; + if (b <= MAXINT && a <= MAXINT) { + a = bitwise(a, b); + } else { + a = gcd(a, b); + } + } + return a; + } + module2.exports = compute; + } +}); + +// ../../node_modules/compute-lcm/lib/index.js +var require_lib12 = __commonJS({ + "../../node_modules/compute-lcm/lib/index.js"(exports2, module2) { + "use strict"; + var gcd = require_lib11(); + var isArray = require_lib6(); + var isIntegerArray = require_lib9(); + var isFunction = require_lib10(); + function lcm() { + var nargs = arguments.length, args, clbk, arr, len, a, b, i; + args = new Array(nargs); + for (i = 0; i < nargs; i++) { + args[i] = arguments[i]; + } + if (isIntegerArray(args)) { + if (nargs === 2) { + a = args[0]; + b = args[1]; + if (a < 0) { + a = -a; + } + if (b < 0) { + b = -b; + } + if (a === 0 || b === 0) { + return 0; + } + return a / gcd(a, b) * b; + } + arr = args; + } else if (!isArray(args[0])) { + throw new TypeError("lcm()::invalid input argument. Must provide an array of integers. Value: `" + args[0] + "`."); + } else if (nargs > 1) { + arr = args[0]; + clbk = args[1]; + if (!isFunction(clbk)) { + throw new TypeError("lcm()::invalid input argument. Accessor must be a function. Value: `" + clbk + "`."); + } + } else { + arr = args[0]; + } + len = arr.length; + if (len < 2) { + return null; + } + if (clbk) { + a = new Array(len); + for (i = 0; i < len; i++) { + a[i] = clbk(arr[i], i); + } + arr = a; + } + if (nargs < 3) { + if (!isIntegerArray(arr)) { + throw new TypeError("lcm()::invalid input argument. Accessed array values must be integers. Value: `" + arr + "`."); + } + } + for (i = 0; i < len; i++) { + a = arr[i]; + if (a < 0) { + arr[i] = -a; + } + } + a = arr[0]; + for (i = 1; i < len; i++) { + b = arr[i]; + if (a === 0 || b === 0) { + return 0; + } + a = a / gcd(a, b) * b; + } + return a; + } + module2.exports = lcm; + } +}); + +// ../../node_modules/lodash/_assignMergeValue.js +var require_assignMergeValue = __commonJS({ + "../../node_modules/lodash/_assignMergeValue.js"(exports2, module2) { + var baseAssignValue = require_baseAssignValue(); + var eq = require_eq2(); + function assignMergeValue(object, key, value) { + if (value !== void 0 && !eq(object[key], value) || value === void 0 && !(key in object)) { + baseAssignValue(object, key, value); + } + } + module2.exports = assignMergeValue; + } +}); + +// ../../node_modules/lodash/_safeGet.js +var require_safeGet = __commonJS({ + "../../node_modules/lodash/_safeGet.js"(exports2, module2) { + function safeGet(object, key) { + if (key === "constructor" && typeof object[key] === "function") { + return; + } + if (key == "__proto__") { + return; + } + return object[key]; + } + module2.exports = safeGet; + } +}); + +// ../../node_modules/lodash/toPlainObject.js +var require_toPlainObject = __commonJS({ + "../../node_modules/lodash/toPlainObject.js"(exports2, module2) { + var copyObject = require_copyObject(); + var keysIn = require_keysIn(); + function toPlainObject(value) { + return copyObject(value, keysIn(value)); + } + module2.exports = toPlainObject; + } +}); + +// ../../node_modules/lodash/_baseMergeDeep.js +var require_baseMergeDeep = __commonJS({ + "../../node_modules/lodash/_baseMergeDeep.js"(exports2, module2) { + var assignMergeValue = require_assignMergeValue(); + var cloneBuffer = require_cloneBuffer(); + var cloneTypedArray = require_cloneTypedArray(); + var copyArray = require_copyArray(); + var initCloneObject = require_initCloneObject(); + var isArguments = require_isArguments(); + var isArray = require_isArray(); + var isArrayLikeObject = require_isArrayLikeObject(); + var isBuffer = require_isBuffer(); + var isFunction = require_isFunction(); + var isObject = require_isObject(); + var isPlainObject = require_isPlainObject(); + var isTypedArray = require_isTypedArray(); + var safeGet = require_safeGet(); + var toPlainObject = require_toPlainObject(); + function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) { + var objValue = safeGet(object, key), srcValue = safeGet(source, key), stacked = stack.get(srcValue); + if (stacked) { + assignMergeValue(object, key, stacked); + return; + } + var newValue = customizer ? customizer(objValue, srcValue, key + "", object, source, stack) : void 0; + var isCommon = newValue === void 0; + if (isCommon) { + var isArr = isArray(srcValue), isBuff = !isArr && isBuffer(srcValue), isTyped = !isArr && !isBuff && isTypedArray(srcValue); + newValue = srcValue; + if (isArr || isBuff || isTyped) { + if (isArray(objValue)) { + newValue = objValue; + } else if (isArrayLikeObject(objValue)) { + newValue = copyArray(objValue); + } else if (isBuff) { + isCommon = false; + newValue = cloneBuffer(srcValue, true); + } else if (isTyped) { + isCommon = false; + newValue = cloneTypedArray(srcValue, true); + } else { + newValue = []; + } + } else if (isPlainObject(srcValue) || isArguments(srcValue)) { + newValue = objValue; + if (isArguments(objValue)) { + newValue = toPlainObject(objValue); + } else if (!isObject(objValue) || isFunction(objValue)) { + newValue = initCloneObject(srcValue); + } + } else { + isCommon = false; + } + } + if (isCommon) { + stack.set(srcValue, newValue); + mergeFunc(newValue, srcValue, srcIndex, customizer, stack); + stack["delete"](srcValue); + } + assignMergeValue(object, key, newValue); + } + module2.exports = baseMergeDeep; + } +}); + +// ../../node_modules/lodash/_baseMerge.js +var require_baseMerge = __commonJS({ + "../../node_modules/lodash/_baseMerge.js"(exports2, module2) { + var Stack = require_Stack(); + var assignMergeValue = require_assignMergeValue(); + var baseFor = require_baseFor(); + var baseMergeDeep = require_baseMergeDeep(); + var isObject = require_isObject(); + var keysIn = require_keysIn(); + var safeGet = require_safeGet(); + function baseMerge(object, source, srcIndex, customizer, stack) { + if (object === source) { + return; + } + baseFor(source, function(srcValue, key) { + stack || (stack = new Stack()); + if (isObject(srcValue)) { + baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack); + } else { + var newValue = customizer ? customizer(safeGet(object, key), srcValue, key + "", object, source, stack) : void 0; + if (newValue === void 0) { + newValue = srcValue; + } + assignMergeValue(object, key, newValue); + } + }, keysIn); + } + module2.exports = baseMerge; + } +}); + +// ../../node_modules/lodash/_customDefaultsMerge.js +var require_customDefaultsMerge = __commonJS({ + "../../node_modules/lodash/_customDefaultsMerge.js"(exports2, module2) { + var baseMerge = require_baseMerge(); + var isObject = require_isObject(); + function customDefaultsMerge(objValue, srcValue, key, object, source, stack) { + if (isObject(objValue) && isObject(srcValue)) { + stack.set(srcValue, objValue); + baseMerge(objValue, srcValue, void 0, customDefaultsMerge, stack); + stack["delete"](srcValue); + } + return objValue; + } + module2.exports = customDefaultsMerge; + } +}); + +// ../../node_modules/lodash/_createAssigner.js +var require_createAssigner = __commonJS({ + "../../node_modules/lodash/_createAssigner.js"(exports2, module2) { + var baseRest = require_baseRest(); + var isIterateeCall = require_isIterateeCall(); + function createAssigner(assigner) { + return baseRest(function(object, sources) { + var index = -1, length = sources.length, customizer = length > 1 ? sources[length - 1] : void 0, guard = length > 2 ? sources[2] : void 0; + customizer = assigner.length > 3 && typeof customizer == "function" ? (length--, customizer) : void 0; + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + customizer = length < 3 ? void 0 : customizer; + length = 1; + } + object = Object(object); + while (++index < length) { + var source = sources[index]; + if (source) { + assigner(object, source, index, customizer); + } + } + return object; + }); + } + module2.exports = createAssigner; + } +}); + +// ../../node_modules/lodash/mergeWith.js +var require_mergeWith = __commonJS({ + "../../node_modules/lodash/mergeWith.js"(exports2, module2) { + var baseMerge = require_baseMerge(); + var createAssigner = require_createAssigner(); + var mergeWith = createAssigner(function(object, source, srcIndex, customizer) { + baseMerge(object, source, srcIndex, customizer); + }); + module2.exports = mergeWith; + } +}); + +// ../../node_modules/lodash/defaultsDeep.js +var require_defaultsDeep = __commonJS({ + "../../node_modules/lodash/defaultsDeep.js"(exports2, module2) { + var apply = require_apply(); + var baseRest = require_baseRest(); + var customDefaultsMerge = require_customDefaultsMerge(); + var mergeWith = require_mergeWith(); + var defaultsDeep = baseRest(function(args) { + args.push(void 0, customDefaultsMerge); + return apply(mergeWith, void 0, args); + }); + module2.exports = defaultsDeep; + } +}); + +// ../../node_modules/lodash/flatten.js +var require_flatten = __commonJS({ + "../../node_modules/lodash/flatten.js"(exports2, module2) { + var baseFlatten = require_baseFlatten(); + function flatten(array) { + var length = array == null ? 0 : array.length; + return length ? baseFlatten(array, 1) : []; + } + module2.exports = flatten; + } +}); + +// ../../node_modules/lodash/flattenDeep.js +var require_flattenDeep = __commonJS({ + "../../node_modules/lodash/flattenDeep.js"(exports2, module2) { + var baseFlatten = require_baseFlatten(); + var INFINITY = 1 / 0; + function flattenDeep(array) { + var length = array == null ? 0 : array.length; + return length ? baseFlatten(array, INFINITY) : []; + } + module2.exports = flattenDeep; + } +}); + +// ../../node_modules/lodash/intersection.js +var require_intersection = __commonJS({ + "../../node_modules/lodash/intersection.js"(exports2, module2) { + var arrayMap = require_arrayMap(); + var baseIntersection = require_baseIntersection(); + var baseRest = require_baseRest(); + var castArrayLikeObject = require_castArrayLikeObject(); + var intersection = baseRest(function(arrays) { + var mapped = arrayMap(arrays, castArrayLikeObject); + return mapped.length && mapped[0] === arrays[0] ? baseIntersection(mapped) : []; + }); + module2.exports = intersection; + } +}); + +// ../../node_modules/lodash/_baseIndexOfWith.js +var require_baseIndexOfWith = __commonJS({ + "../../node_modules/lodash/_baseIndexOfWith.js"(exports2, module2) { + function baseIndexOfWith(array, value, fromIndex, comparator) { + var index = fromIndex - 1, length = array.length; + while (++index < length) { + if (comparator(array[index], value)) { + return index; + } + } + return -1; + } + module2.exports = baseIndexOfWith; + } +}); + +// ../../node_modules/lodash/_basePullAll.js +var require_basePullAll = __commonJS({ + "../../node_modules/lodash/_basePullAll.js"(exports2, module2) { + var arrayMap = require_arrayMap(); + var baseIndexOf = require_baseIndexOf(); + var baseIndexOfWith = require_baseIndexOfWith(); + var baseUnary = require_baseUnary(); + var copyArray = require_copyArray(); + var arrayProto = Array.prototype; + var splice = arrayProto.splice; + function basePullAll(array, values, iteratee, comparator) { + var indexOf = comparator ? baseIndexOfWith : baseIndexOf, index = -1, length = values.length, seen = array; + if (array === values) { + values = copyArray(values); + } + if (iteratee) { + seen = arrayMap(array, baseUnary(iteratee)); + } + while (++index < length) { + var fromIndex = 0, value = values[index], computed = iteratee ? iteratee(value) : value; + while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) { + if (seen !== array) { + splice.call(seen, fromIndex, 1); + } + splice.call(array, fromIndex, 1); + } + } + return array; + } + module2.exports = basePullAll; + } +}); + +// ../../node_modules/lodash/pullAll.js +var require_pullAll = __commonJS({ + "../../node_modules/lodash/pullAll.js"(exports2, module2) { + var basePullAll = require_basePullAll(); + function pullAll(array, values) { + return array && array.length && values && values.length ? basePullAll(array, values) : array; + } + module2.exports = pullAll; + } +}); + +// ../../node_modules/lodash/_castFunction.js +var require_castFunction = __commonJS({ + "../../node_modules/lodash/_castFunction.js"(exports2, module2) { + var identity = require_identity(); + function castFunction(value) { + return typeof value == "function" ? value : identity; + } + module2.exports = castFunction; + } +}); + +// ../../node_modules/lodash/forEach.js +var require_forEach = __commonJS({ + "../../node_modules/lodash/forEach.js"(exports2, module2) { + var arrayEach = require_arrayEach(); + var baseEach = require_baseEach(); + var castFunction = require_castFunction(); + var isArray = require_isArray(); + function forEach(collection, iteratee) { + var func = isArray(collection) ? arrayEach : baseEach; + return func(collection, castFunction(iteratee)); + } + module2.exports = forEach; + } +}); + +// ../../node_modules/lodash/_baseDifference.js +var require_baseDifference = __commonJS({ + "../../node_modules/lodash/_baseDifference.js"(exports2, module2) { + var SetCache = require_SetCache(); + var arrayIncludes = require_arrayIncludes(); + var arrayIncludesWith = require_arrayIncludesWith(); + var arrayMap = require_arrayMap(); + var baseUnary = require_baseUnary(); + var cacheHas = require_cacheHas(); + var LARGE_ARRAY_SIZE = 200; + function baseDifference(array, values, iteratee, comparator) { + var index = -1, includes = arrayIncludes, isCommon = true, length = array.length, result = [], valuesLength = values.length; + if (!length) { + return result; + } + if (iteratee) { + values = arrayMap(values, baseUnary(iteratee)); + } + if (comparator) { + includes = arrayIncludesWith; + isCommon = false; + } else if (values.length >= LARGE_ARRAY_SIZE) { + includes = cacheHas; + isCommon = false; + values = new SetCache(values); + } + outer: + while (++index < length) { + var value = array[index], computed = iteratee == null ? value : iteratee(value); + value = comparator || value !== 0 ? value : 0; + if (isCommon && computed === computed) { + var valuesIndex = valuesLength; + while (valuesIndex--) { + if (values[valuesIndex] === computed) { + continue outer; + } + } + result.push(value); + } else if (!includes(values, computed, comparator)) { + result.push(value); + } + } + return result; + } + module2.exports = baseDifference; + } +}); + +// ../../node_modules/lodash/without.js +var require_without = __commonJS({ + "../../node_modules/lodash/without.js"(exports2, module2) { + var baseDifference = require_baseDifference(); + var baseRest = require_baseRest(); + var isArrayLikeObject = require_isArrayLikeObject(); + var without = baseRest(function(array, values) { + return isArrayLikeObject(array) ? baseDifference(array, values) : []; + }); + module2.exports = without; + } +}); + +// ../../node_modules/json-schema-merge-allof/src/common.js +var require_common2 = __commonJS({ + "../../node_modules/json-schema-merge-allof/src/common.js"(exports2, module2) { + var flatten = require_flatten(); + var flattenDeep = require_flattenDeep(); + var isPlainObject = require_isPlainObject(); + var uniq = require_uniq(); + var uniqWith = require_uniqWith(); + var without = require_without(); + function deleteUndefinedProps(returnObject) { + for (const prop in returnObject) { + if (has(returnObject, prop) && isEmptySchema(returnObject[prop])) { + delete returnObject[prop]; + } + } + return returnObject; + } + var allUniqueKeys = (arr) => uniq(flattenDeep(arr.map(keys))); + var getValues = (schemas, key) => schemas.map((schema2) => schema2 && schema2[key]); + var has = (obj, propName) => Object.prototype.hasOwnProperty.call(obj, propName); + var keys = (obj) => { + if (isPlainObject(obj) || Array.isArray(obj)) { + return Object.keys(obj); + } else { + return []; + } + }; + var notUndefined = (val) => val !== void 0; + var isSchema = (val) => isPlainObject(val) || val === true || val === false; + var isEmptySchema = (obj) => !keys(obj).length && obj !== false && obj !== true; + var withoutArr = (arr, ...rest) => without.apply(null, [arr].concat(flatten(rest))); + module2.exports = { + allUniqueKeys, + deleteUndefinedProps, + getValues, + has, + isEmptySchema, + isSchema, + keys, + notUndefined, + uniqWith, + withoutArr + }; + } +}); + +// ../../node_modules/json-schema-merge-allof/src/complex-resolvers/properties.js +var require_properties2 = __commonJS({ + "../../node_modules/json-schema-merge-allof/src/complex-resolvers/properties.js"(exports2, module2) { + var compare = require_src(); + var forEach = require_forEach(); + var { + allUniqueKeys, + deleteUndefinedProps, + getValues, + keys, + notUndefined, + uniqWith, + withoutArr + } = require_common2(); + function removeFalseSchemas(target) { + forEach(target, function(schema2, prop) { + if (schema2 === false) { + delete target[prop]; + } + }); + } + function mergeSchemaGroup(group, mergeSchemas) { + const allKeys = allUniqueKeys(group); + return allKeys.reduce(function(all, key) { + const schemas = getValues(group, key); + const compacted = uniqWith(schemas.filter(notUndefined), compare); + all[key] = mergeSchemas(compacted, key); + return all; + }, {}); + } + module2.exports = { + keywords: ["properties", "patternProperties", "additionalProperties"], + resolver(values, parents, mergers, options) { + if (!options.ignoreAdditionalProperties) { + values.forEach(function(subSchema) { + const otherSubSchemas = values.filter((s) => s !== subSchema); + const ownKeys = keys(subSchema.properties); + const ownPatternKeys = keys(subSchema.patternProperties); + const ownPatterns = ownPatternKeys.map((k) => new RegExp(k)); + otherSubSchemas.forEach(function(other) { + const allOtherKeys = keys(other.properties); + const keysMatchingPattern = allOtherKeys.filter((k) => ownPatterns.some((pk) => pk.test(k))); + const additionalKeys = withoutArr(allOtherKeys, ownKeys, keysMatchingPattern); + additionalKeys.forEach(function(key) { + other.properties[key] = mergers.properties([ + other.properties[key], + subSchema.additionalProperties + ], key); + }); + }); + }); + values.forEach(function(subSchema) { + const otherSubSchemas = values.filter((s) => s !== subSchema); + const ownPatternKeys = keys(subSchema.patternProperties); + if (subSchema.additionalProperties === false) { + otherSubSchemas.forEach(function(other) { + const allOtherPatterns = keys(other.patternProperties); + const additionalPatternKeys = withoutArr(allOtherPatterns, ownPatternKeys); + additionalPatternKeys.forEach((key) => delete other.patternProperties[key]); + }); + } + }); + } + const returnObject = { + additionalProperties: mergers.additionalProperties(values.map((s) => s.additionalProperties)), + patternProperties: mergeSchemaGroup(values.map((s) => s.patternProperties), mergers.patternProperties), + properties: mergeSchemaGroup(values.map((s) => s.properties), mergers.properties) + }; + if (returnObject.additionalProperties === false) { + removeFalseSchemas(returnObject.properties); + } + return deleteUndefinedProps(returnObject); + } + }; + } +}); + +// ../../node_modules/json-schema-merge-allof/src/complex-resolvers/items.js +var require_items2 = __commonJS({ + "../../node_modules/json-schema-merge-allof/src/complex-resolvers/items.js"(exports2, module2) { + var compare = require_src(); + var forEach = require_forEach(); + var { + allUniqueKeys, + deleteUndefinedProps, + has, + isSchema, + notUndefined, + uniqWith + } = require_common2(); + function removeFalseSchemasFromArray(target) { + forEach(target, function(schema2, index) { + if (schema2 === false) { + target.splice(index, 1); + } + }); + } + function getItemSchemas(subSchemas, key) { + return subSchemas.map(function(sub) { + if (!sub) { + return void 0; + } + if (Array.isArray(sub.items)) { + const schemaAtPos = sub.items[key]; + if (isSchema(schemaAtPos)) { + return schemaAtPos; + } else if (has(sub, "additionalItems")) { + return sub.additionalItems; + } + } else { + return sub.items; + } + return void 0; + }); + } + function getAdditionalSchemas(subSchemas) { + return subSchemas.map(function(sub) { + if (!sub) { + return void 0; + } + if (Array.isArray(sub.items)) { + return sub.additionalItems; + } + return sub.items; + }); + } + function mergeItems(group, mergeSchemas, items) { + const allKeys = allUniqueKeys(items); + return allKeys.reduce(function(all, key) { + const schemas = getItemSchemas(group, key); + const compacted = uniqWith(schemas.filter(notUndefined), compare); + all[key] = mergeSchemas(compacted, key); + return all; + }, []); + } + module2.exports = { + keywords: ["items", "additionalItems"], + resolver(values, parents, mergers) { + const items = values.map((s) => s.items); + const itemsCompacted = items.filter(notUndefined); + const returnObject = {}; + if (itemsCompacted.every(isSchema)) { + returnObject.items = mergers.items(items); + } else { + returnObject.items = mergeItems(values, mergers.items, items); + } + let schemasAtLastPos; + if (itemsCompacted.every(Array.isArray)) { + schemasAtLastPos = values.map((s) => s.additionalItems); + } else if (itemsCompacted.some(Array.isArray)) { + schemasAtLastPos = getAdditionalSchemas(values); + } + if (schemasAtLastPos) { + returnObject.additionalItems = mergers.additionalItems(schemasAtLastPos); + } + if (returnObject.additionalItems === false && Array.isArray(returnObject.items)) { + removeFalseSchemasFromArray(returnObject.items); + } + return deleteUndefinedProps(returnObject); + } + }; + } +}); + +// ../../node_modules/json-schema-merge-allof/src/index.js +var require_src2 = __commonJS({ + "../../node_modules/json-schema-merge-allof/src/index.js"(exports2, module2) { + var cloneDeep = require_cloneDeep(); + var compare = require_src(); + var computeLcm = require_lib12(); + var defaultsDeep = require_defaultsDeep(); + var flatten = require_flatten(); + var flattenDeep = require_flattenDeep(); + var intersection = require_intersection(); + var intersectionWith = require_intersectionWith(); + var isEqual = require_isEqual(); + var isPlainObject = require_isPlainObject(); + var pullAll = require_pullAll(); + var sortBy = require_sortBy(); + var uniq = require_uniq(); + var uniqWith = require_uniqWith(); + var propertiesResolver = require_properties2(); + var itemsResolver = require_items2(); + var contains = (arr, val) => arr.indexOf(val) !== -1; + var isSchema = (val) => isPlainObject(val) || val === true || val === false; + var isFalse = (val) => val === false; + var isTrue = (val) => val === true; + var schemaResolver = (compacted, key, mergeSchemas) => mergeSchemas(compacted); + var stringArray = (values) => sortBy(uniq(flattenDeep(values))); + var notUndefined = (val) => val !== void 0; + var allUniqueKeys = (arr) => uniq(flattenDeep(arr.map(keys))); + var first = (compacted) => compacted[0]; + var required = (compacted) => stringArray(compacted); + var maximumValue = (compacted) => Math.max.apply(Math, compacted); + var minimumValue = (compacted) => Math.min.apply(Math, compacted); + var uniqueItems = (compacted) => compacted.some(isTrue); + var examples = (compacted) => uniqWith(flatten(compacted), isEqual); + function compareProp(key) { + return function(a, b) { + return compare({ + [key]: a + }, { [key]: b }); + }; + } + function getAllOf(schema2) { + let { allOf = [], ...copy } = schema2; + copy = isPlainObject(schema2) ? copy : schema2; + return [copy, ...allOf.map(getAllOf)]; + } + function getValues(schemas, key) { + return schemas.map((schema2) => schema2 && schema2[key]); + } + function tryMergeSchemaGroups(schemaGroups, mergeSchemas) { + return schemaGroups.map(function(schemas, index) { + try { + return mergeSchemas(schemas, index); + } catch (e) { + return void 0; + } + }).filter(notUndefined); + } + function keys(obj) { + if (isPlainObject(obj) || Array.isArray(obj)) { + return Object.keys(obj); + } else { + return []; + } + } + function getAnyOfCombinations(arrOfArrays, combinations) { + combinations = combinations || []; + if (!arrOfArrays.length) { + return combinations; + } + const values = arrOfArrays.slice(0).shift(); + const rest = arrOfArrays.slice(1); + if (combinations.length) { + return getAnyOfCombinations(rest, flatten(combinations.map((combination) => values.map((item) => [item].concat(combination))))); + } + return getAnyOfCombinations(rest, values.map((item) => item)); + } + function throwIncompatible(values, paths) { + let asJSON; + try { + asJSON = values.map(function(val) { + return JSON.stringify(val, null, 2); + }).join("\n"); + } catch (variable) { + asJSON = values.join(", "); + } + throw new Error('Could not resolve values for path:"' + paths.join(".") + '". They are probably incompatible. Values: \n' + asJSON); + } + function callGroupResolver(complexKeywords, resolverName, schemas, mergeSchemas, options, parents) { + if (complexKeywords.length) { + const resolverConfig = options.complexResolvers[resolverName]; + if (!resolverConfig || !resolverConfig.resolver) { + throw new Error("No resolver found for " + resolverName); + } + const extractedKeywordsOnly = schemas.map((schema2) => complexKeywords.reduce((all, key) => { + if (schema2[key] !== void 0) all[key] = schema2[key]; + return all; + }, {})); + const unique = uniqWith(extractedKeywordsOnly, compare); + const mergers = resolverConfig.keywords.reduce((all, key) => ({ + ...all, + [key]: (schemas2, extraKey = []) => mergeSchemas(schemas2, null, parents.concat(key, extraKey)) + }), {}); + const result = resolverConfig.resolver(unique, parents.concat(resolverName), mergers, options); + if (!isPlainObject(result)) { + throwIncompatible(unique, parents.concat(resolverName)); + } + return result; + } + } + function createRequiredMetaArray(arr) { + return { required: arr }; + } + var schemaGroupProps = ["properties", "patternProperties", "definitions", "dependencies"]; + var schemaArrays = ["anyOf", "oneOf"]; + var schemaProps = [ + "additionalProperties", + "additionalItems", + "contains", + "propertyNames", + "not", + "items" + ]; + var defaultResolvers = { + type(compacted) { + if (compacted.some(Array.isArray)) { + const normalized = compacted.map(function(val) { + return Array.isArray(val) ? val : [val]; + }); + const common = intersection.apply(null, normalized); + if (common.length === 1) { + return common[0]; + } else if (common.length > 1) { + return uniq(common); + } + } + }, + dependencies(compacted, paths, mergeSchemas) { + const allChildren = allUniqueKeys(compacted); + return allChildren.reduce(function(all, childKey) { + const childSchemas = getValues(compacted, childKey); + let innerCompacted = uniqWith(childSchemas.filter(notUndefined), isEqual); + const innerArrays = innerCompacted.filter(Array.isArray); + if (innerArrays.length) { + if (innerArrays.length === innerCompacted.length) { + all[childKey] = stringArray(innerCompacted); + } else { + const innerSchemas = innerCompacted.filter(isSchema); + const arrayMetaScheams = innerArrays.map(createRequiredMetaArray); + all[childKey] = mergeSchemas(innerSchemas.concat(arrayMetaScheams), childKey); + } + return all; + } + innerCompacted = uniqWith(innerCompacted, compare); + all[childKey] = mergeSchemas(innerCompacted, childKey); + return all; + }, {}); + }, + oneOf(compacted, paths, mergeSchemas) { + const combinations = getAnyOfCombinations(cloneDeep(compacted)); + const result = tryMergeSchemaGroups(combinations, mergeSchemas); + const unique = uniqWith(result, compare); + if (unique.length) { + return unique; + } + }, + not(compacted) { + return { anyOf: compacted }; + }, + pattern(compacted) { + return compacted.map((r) => "(?=" + r + ")").join(""); + }, + multipleOf(compacted) { + let integers = compacted.slice(0); + let factor = 1; + while (integers.some((n) => !Number.isInteger(n))) { + integers = integers.map((n) => n * 10); + factor = factor * 10; + } + return computeLcm(integers) / factor; + }, + enum(compacted) { + const enums = intersectionWith.apply(null, compacted.concat(isEqual)); + if (enums.length) { + return sortBy(enums); + } + } + }; + defaultResolvers.$id = first; + defaultResolvers.$ref = first; + defaultResolvers.$schema = first; + defaultResolvers.additionalItems = schemaResolver; + defaultResolvers.additionalProperties = schemaResolver; + defaultResolvers.anyOf = defaultResolvers.oneOf; + defaultResolvers.contains = schemaResolver; + defaultResolvers.default = first; + defaultResolvers.definitions = defaultResolvers.dependencies; + defaultResolvers.description = first; + defaultResolvers.examples = examples; + defaultResolvers.exclusiveMaximum = minimumValue; + defaultResolvers.exclusiveMinimum = maximumValue; + defaultResolvers.items = itemsResolver; + defaultResolvers.maximum = minimumValue; + defaultResolvers.maxItems = minimumValue; + defaultResolvers.maxLength = minimumValue; + defaultResolvers.maxProperties = minimumValue; + defaultResolvers.minimum = maximumValue; + defaultResolvers.minItems = maximumValue; + defaultResolvers.minLength = maximumValue; + defaultResolvers.minProperties = maximumValue; + defaultResolvers.properties = propertiesResolver; + defaultResolvers.propertyNames = schemaResolver; + defaultResolvers.required = required; + defaultResolvers.title = first; + defaultResolvers.uniqueItems = uniqueItems; + var defaultComplexResolvers = { + properties: propertiesResolver, + items: itemsResolver + }; + function merger(rootSchema, options, totalSchemas) { + totalSchemas = totalSchemas || []; + options = defaultsDeep(options, { + ignoreAdditionalProperties: false, + resolvers: defaultResolvers, + complexResolvers: defaultComplexResolvers, + deep: true + }); + const complexResolvers = Object.entries(options.complexResolvers); + function mergeSchemas(schemas, base, parents) { + schemas = cloneDeep(schemas.filter(notUndefined)); + parents = parents || []; + const merged2 = isPlainObject(base) ? base : {}; + if (!schemas.length) { + return; + } + if (schemas.some(isFalse)) { + return false; + } + if (schemas.every(isTrue)) { + return true; + } + schemas = schemas.filter(isPlainObject); + const allKeys = allUniqueKeys(schemas); + if (options.deep && contains(allKeys, "allOf")) { + return merger({ + allOf: schemas + }, options, totalSchemas); + } + const complexKeysArr = complexResolvers.map(([mainKeyWord, resolverConf]) => allKeys.filter((k) => resolverConf.keywords.includes(k))); + complexKeysArr.forEach((keys2) => pullAll(allKeys, keys2)); + allKeys.forEach(function(key) { + const values = getValues(schemas, key); + const compacted = uniqWith(values.filter(notUndefined), compareProp(key)); + if (compacted.length === 1 && contains(schemaArrays, key)) { + merged2[key] = compacted[0].map((schema2) => mergeSchemas([schema2], schema2)); + } else if (compacted.length === 1 && !contains(schemaGroupProps, key) && !contains(schemaProps, key)) { + merged2[key] = compacted[0]; + } else { + const resolver = options.resolvers[key] || options.resolvers.defaultResolver; + if (!resolver) throw new Error("No resolver found for key " + key + ". You can provide a resolver for this keyword in the options, or provide a default resolver."); + const merger2 = (schemas2, extraKey = []) => mergeSchemas(schemas2, null, parents.concat(key, extraKey)); + merged2[key] = resolver(compacted, parents.concat(key), merger2, options); + if (merged2[key] === void 0) { + throwIncompatible(compacted, parents.concat(key)); + } else if (merged2[key] === void 0) { + delete merged2[key]; + } + } + }); + return complexResolvers.reduce((all, [resolverKeyword, config], index) => ({ + ...all, + ...callGroupResolver(complexKeysArr[index], resolverKeyword, schemas, mergeSchemas, options, parents) + }), merged2); + } + const allSchemas = flattenDeep(getAllOf(rootSchema)); + const merged = mergeSchemas(allSchemas); + return merged; + } + merger.options = { + resolvers: defaultResolvers + }; + module2.exports = merger; + } +}); + +// ../../node_modules/neotraverse/dist/legacy/legacy.cjs +var require_legacy = __commonJS({ + "../../node_modules/neotraverse/dist/legacy/legacy.cjs"(exports2, module2) { + "use strict"; + function _array_like_to_array(arr, len) { + if (len == null || len > arr.length) len = arr.length; + for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; + return arr2; + } + function _array_with_holes(arr) { + if (Array.isArray(arr)) return arr; + } + function _class_call_check(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } + } + function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + function _create_class(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; + } + function _instanceof(left, right) { + if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) { + return !!right[Symbol.hasInstance](left); + } else { + return left instanceof right; + } + } + function _iterable_to_array_limit(arr, i) { + var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; + if (_i == null) return; + var _arr = []; + var _n = true; + var _d = false; + var _s, _e; + try { + for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { + _arr.push(_s.value); + if (i && _arr.length === i) break; + } + } catch (err) { + _d = true; + _e = err; + } finally { + try { + if (!_n && _i["return"] != null) _i["return"](); + } finally { + if (_d) throw _e; + } + } + return _arr; + } + function _non_iterable_rest() { + throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); + } + function _sliced_to_array(arr, i) { + return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest(); + } + function _type_of(obj) { + "@swc/helpers - typeof"; + return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj; + } + function _unsupported_iterable_to_array(o, minLen) { + if (!o) return; + if (typeof o === "string") return _array_like_to_array(o, minLen); + var n = Object.prototype.toString.call(o).slice(8, -1); + if (n === "Object" && o.constructor) n = o.constructor.name; + if (n === "Map" || n === "Set") return Array.from(n); + if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen); + } + var __defProp2 = Object.defineProperty; + var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; + var __getOwnPropNames2 = Object.getOwnPropertyNames; + var __hasOwnProp2 = Object.prototype.hasOwnProperty; + var __typeError = function(msg) { + throw TypeError(msg); + }; + var __export2 = function(target, all) { + for (var name in all) __defProp2(target, name, { + get: all[name], + enumerable: true + }); + }; + var __copyProps2 = function(to, from, except, desc) { + if (from && (typeof from === "undefined" ? "undefined" : _type_of(from)) === "object" || typeof from === "function") { + var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0; + try { + var _loop = function() { + var key = _step.value; + if (!__hasOwnProp2.call(to, key) && key !== except) __defProp2(to, key, { + get: function() { + return from[key]; + }, + enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable + }); + }; + for (var _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) _loop(); + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + } + return to; + }; + var __toCommonJS2 = function(mod) { + return __copyProps2(__defProp2({}, "__esModule", { + value: true + }), mod); + }; + var __accessCheck = function(obj, member, msg) { + return member.has(obj) || __typeError("Cannot " + msg); + }; + var __privateGet = function(obj, member, getter) { + return __accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj); + }; + var __privateAdd = function(obj, member, value) { + return member.has(obj) ? __typeError("Cannot add the same private member more than once") : _instanceof(member, WeakSet) ? member.add(obj) : member.set(obj, value); + }; + var __privateSet = function(obj, member, value, setter) { + return __accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value; + }; + var legacy_exports = {}; + __export2(legacy_exports, { + default: function() { + return src_default; + } + }); + module2.exports = __toCommonJS2(legacy_exports); + var to_string = function(obj) { + return Object.prototype.toString.call(obj); + }; + var is_typed_array = function(value) { + return ArrayBuffer.isView(value) && !_instanceof(value, DataView); + }; + var is_date = function(obj) { + return to_string(obj) === "[object Date]"; + }; + var is_regexp = function(obj) { + return to_string(obj) === "[object RegExp]"; + }; + var is_error = function(obj) { + return to_string(obj) === "[object Error]"; + }; + var is_boolean = function(obj) { + return to_string(obj) === "[object Boolean]"; + }; + var is_number = function(obj) { + return to_string(obj) === "[object Number]"; + }; + var is_string = function(obj) { + return to_string(obj) === "[object String]"; + }; + var is_array = Array.isArray; + var gopd = Object.getOwnPropertyDescriptor; + var is_property_enumerable = Object.prototype.propertyIsEnumerable; + var get_own_property_symbols = Object.getOwnPropertySymbols; + var has_own_property = Object.prototype.hasOwnProperty; + function own_enumerable_keys(obj) { + var res = Object.keys(obj); + var symbols = get_own_property_symbols(obj); + for (var i = 0; i < symbols.length; i++) { + if (is_property_enumerable.call(obj, symbols[i])) { + res.push(symbols[i]); + } + } + return res; + } + function is_writable(object, key) { + var _gopd; + return !((_gopd = gopd(object, key)) === null || _gopd === void 0 ? void 0 : _gopd.writable); + } + function copy(src, options) { + if ((typeof src === "undefined" ? "undefined" : _type_of(src)) === "object" && src !== null) { + var dst; + if (is_array(src)) { + dst = []; + } else if (is_date(src)) { + dst = new Date(src.getTime ? src.getTime() : src); + } else if (is_regexp(src)) { + dst = new RegExp(src); + } else if (is_error(src)) { + dst = { + message: src.message + }; + } else if (is_boolean(src) || is_number(src) || is_string(src)) { + dst = Object(src); + } else if (is_typed_array(src)) { + return src.slice(); + } else { + dst = Object.create(Object.getPrototypeOf(src)); + } + var iterator_function = options.includeSymbols ? own_enumerable_keys : Object.keys; + var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0; + try { + for (var _iterator = iterator_function(src)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var key = _step.value; + dst[key] = src[key]; + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + return dst; + } + return src; + } + var empty_null = { + includeSymbols: false, + immutable: false + }; + function walk(root, cb) { + var options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : empty_null; + var path = []; + var parents = []; + var alive = true; + var iterator_function = options.includeSymbols ? own_enumerable_keys : Object.keys; + var immutable = !!options.immutable; + return function walker(node_) { + var node = immutable ? copy(node_, options) : node_; + var modifiers = {}; + var keep_going = true; + var state = { + node, + node_, + path: [].concat(path), + parent: parents[parents.length - 1], + parents, + key: path[path.length - 1], + isRoot: path.length === 0, + level: path.length, + circular: void 0, + isLeaf: false, + notLeaf: true, + notRoot: true, + isFirst: false, + isLast: false, + update: function update(x) { + var stopHere = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false; + if (!state.isRoot) { + state.parent.node[state.key] = x; + } + state.node = x; + if (stopHere) { + keep_going = false; + } + }, + delete: function _delete(stopHere) { + delete state.parent.node[state.key]; + if (stopHere) { + keep_going = false; + } + }, + remove: function remove(stopHere) { + if (is_array(state.parent.node)) { + state.parent.node.splice(state.key, 1); + } else { + delete state.parent.node[state.key]; + } + if (stopHere) { + keep_going = false; + } + }, + keys: null, + before: function before(f) { + modifiers.before = f; + }, + after: function after(f) { + modifiers.after = f; + }, + pre: function pre(f) { + modifiers.pre = f; + }, + post: function post(f) { + modifiers.post = f; + }, + stop: function stop() { + alive = false; + }, + block: function block() { + keep_going = false; + } + }; + if (!alive) { + return state; + } + function update_state() { + if (_type_of(state.node) === "object" && state.node !== null) { + if (!state.keys || state.node_ !== state.node) { + state.keys = iterator_function(state.node); + } + state.isLeaf = state.keys.length === 0; + for (var i = 0; i < parents.length; i++) { + if (parents[i].node_ === node_) { + state.circular = parents[i]; + break; + } + } + } else { + state.isLeaf = true; + state.keys = null; + } + state.notLeaf = !state.isLeaf; + state.notRoot = !state.isRoot; + } + update_state(); + var ret = cb.call(state, state.node); + if (ret !== void 0 && state.update) { + state.update(ret); + } + if (modifiers.before) { + modifiers.before.call(state, state.node); + } + if (!keep_going) { + return state; + } + if (_type_of(state.node) === "object" && state.node !== null && !state.circular) { + parents.push(state); + update_state(); + var _state_keys; + var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0; + try { + for (var _iterator = Object.entries((_state_keys = state.keys) !== null && _state_keys !== void 0 ? _state_keys : [])[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var _step_value = _sliced_to_array(_step.value, 2), index = _step_value[0], key = _step_value[1]; + var _state_keys1; + path.push(key); + if (modifiers.pre) { + modifiers.pre.call(state, state.node[key], key); + } + var child = walker(state.node[key]); + if (immutable && has_own_property.call(state.node, key) && !is_writable(state.node, key)) { + state.node[key] = child.node; + } + child.isLast = ((_state_keys1 = state.keys) === null || _state_keys1 === void 0 ? void 0 : _state_keys1.length) ? +index === state.keys.length - 1 : false; + child.isFirst = +index === 0; + if (modifiers.post) { + modifiers.post.call(state, child); + } + path.pop(); + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + parents.pop(); + } + if (modifiers.after) { + modifiers.after.call(state, state.node); + } + return state; + }(root).node; + } + var _value; + var _options; + var Traverse = /* @__PURE__ */ function() { + function Traverse2(obj) { + var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : empty_null; + _class_call_check(this, Traverse2); + __privateAdd(this, _value); + __privateAdd(this, _options); + __privateSet(this, _value, obj); + __privateSet(this, _options, options); + } + _create_class(Traverse2, [ + { + /** + * Get the element at the array `path`. + */ + key: "get", + value: function get(paths) { + var node = __privateGet(this, _value); + for (var i = 0; node && i < paths.length; i++) { + var key = paths[i]; + if (!has_own_property.call(node, key) || !__privateGet(this, _options).includeSymbols && (typeof key === "undefined" ? "undefined" : _type_of(key)) === "symbol") { + return void 0; + } + node = node[key]; + } + return node; + } + }, + { + /** + * Return whether the element at the array `path` exists. + */ + key: "has", + value: function has(paths) { + var node = __privateGet(this, _value); + for (var i = 0; node && i < paths.length; i++) { + var key = paths[i]; + if (!has_own_property.call(node, key) || !__privateGet(this, _options).includeSymbols && (typeof key === "undefined" ? "undefined" : _type_of(key)) === "symbol") { + return false; + } + node = node[key]; + } + return true; + } + }, + { + /** + * Set the element at the array `path` to `value`. + */ + key: "set", + value: function set(path, value) { + var node = __privateGet(this, _value); + var i = 0; + for (i = 0; i < path.length - 1; i++) { + var key = path[i]; + if (!has_own_property.call(node, key)) { + node[key] = {}; + } + node = node[key]; + } + node[path[i]] = value; + return value; + } + }, + { + /** + * Execute `fn` for each node in the object and return a new object with the results of the walk. To update nodes in the result use `this.update(value)`. + */ + key: "map", + value: function map(cb) { + return walk(__privateGet(this, _value), cb, { + immutable: true, + includeSymbols: !!__privateGet(this, _options).includeSymbols + }); + } + }, + { + /** + * Execute `fn` for each node in the object but unlike `.map()`, when `this.update()` is called it updates the object in-place. + */ + key: "forEach", + value: function forEach(cb) { + __privateSet(this, _value, walk(__privateGet(this, _value), cb, __privateGet(this, _options))); + return __privateGet(this, _value); + } + }, + { + /** + * For each node in the object, perform a [left-fold](http://en.wikipedia.org/wiki/Fold_(higher-order_function)) with the return value of `fn(acc, node)`. + * + * If `init` isn't specified, `init` is set to the root object for the first step and the root element is skipped. + */ + key: "reduce", + value: function reduce(cb, init) { + var skip = arguments.length === 1; + var acc = skip ? __privateGet(this, _value) : init; + this.forEach(function(x) { + if (!this.isRoot || !skip) { + acc = cb.call(this, acc, x); + } + }); + return acc; + } + }, + { + /** + * Return an `Array` of every possible non-cyclic path in the object. + * Paths are `Array`s of string keys. + */ + key: "paths", + value: function paths() { + var acc = []; + this.forEach(function() { + acc.push(this.path); + }); + return acc; + } + }, + { + /** + * Return an `Array` of every node in the object. + */ + key: "nodes", + value: function nodes() { + var acc = []; + this.forEach(function() { + acc.push(this.node); + }); + return acc; + } + }, + { + /** + * Create a deep clone of the object. + */ + key: "clone", + value: function clone() { + var parents = []; + var nodes = []; + var options = __privateGet(this, _options); + if (is_typed_array(__privateGet(this, _value))) { + return __privateGet(this, _value).slice(); + } + return function clone2(src) { + for (var i = 0; i < parents.length; i++) { + if (parents[i] === src) { + return nodes[i]; + } + } + if ((typeof src === "undefined" ? "undefined" : _type_of(src)) === "object" && src !== null) { + var dst = copy(src, options); + parents.push(src); + nodes.push(dst); + var iteratorFunction = options.includeSymbols ? own_enumerable_keys : Object.keys; + var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0; + try { + for (var _iterator = iteratorFunction(src)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var key = _step.value; + dst[key] = clone2(src[key]); + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return != null) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + parents.pop(); + nodes.pop(); + return dst; + } + return src; + }(__privateGet(this, _value)); + } + } + ]); + return Traverse2; + }(); + _value = /* @__PURE__ */ new WeakMap(); + _options = /* @__PURE__ */ new WeakMap(); + var traverse = function(obj, options) { + return new Traverse(obj, options); + }; + traverse.get = function(obj, paths, options) { + return new Traverse(obj, options).get(paths); + }; + traverse.set = function(obj, path, value, options) { + return new Traverse(obj, options).set(path, value); + }; + traverse.has = function(obj, paths, options) { + return new Traverse(obj, options).has(paths); + }; + traverse.map = function(obj, cb, options) { + return new Traverse(obj, options).map(cb); + }; + traverse.forEach = function(obj, cb, options) { + return new Traverse(obj, options).forEach(cb); + }; + traverse.reduce = function(obj, cb, init, options) { + return new Traverse(obj, options).reduce(cb, init); + }; + traverse.paths = function(obj, options) { + return new Traverse(obj, options).paths(); + }; + traverse.nodes = function(obj, options) { + return new Traverse(obj, options).nodes(); + }; + traverse.clone = function(obj, options) { + return new Traverse(obj, options).clone(); + }; + var src_default = traverse; + module2.exports = src_default; + } +}); + +// ../../node_modules/openapi-to-postmanv2/lib/deref.js +var require_deref = __commonJS({ + "../../node_modules/openapi-to-postmanv2/lib/deref.js"(exports2, module2) { + var _2 = require_lodash(); + var mergeAllOf = require_src2(); + var { typesMap } = require_schemaUtilsCommon(); + var PARAMETER_SOURCE = { + REQUEST: "REQUEST", + RESPONSE: "RESPONSE" + }; + var SCHEMA_TYPES = { + array: "array", + boolean: "boolean", + integer: "integer", + number: "number", + object: "object", + string: "string" + }; + var SUPPORTED_FORMATS = [ + "date", + "time", + "date-time", + "uri", + "uri-reference", + "uri-template", + "email", + "hostname", + "ipv4", + "ipv6", + "regex", + "uuid", + "json-pointer", + "int64", + "float", + "double" + ]; + var RESOLVE_REF_DEFAULTS = { + resolveFor: "CONVERSION", + resolveTo: "schema", + stack: 0, + stackLimit: 10, + isAllOf: false + }; + var DEFAULT_SCHEMA_UTILS = require_schemaUtils30X(); + var traverseUtility = require_legacy(); + var PROPERTIES_TO_ASSIGN_ON_CASCADE = ["type", "nullable"]; + function hasReference(currentNode, seenRef) { + let hasRef = false; + traverseUtility(currentNode).forEach(function(property) { + if (property) { + let hasReferenceTypeKey; + hasReferenceTypeKey = Object.keys(property).find( + (key) => { + return key === "$ref"; + } + ); + if (hasReferenceTypeKey && seenRef[property.$ref]) { + hasRef = true; + } + } + }); + return hasRef; + } + module2.exports = { + /** + * @param {*} rootObject - the object from which you're trying to read a property + * @param {*} pathArray - each element in this array a property of the previous object + * @param {*} defValue - what to return if the required path is not found + * @returns {*} - required property value + * @description - this is similar to _.get(rootObject, pathArray.join('.')), but also works for cases where + * there's a . in the property name + */ + _getEscaped: function(rootObject, pathArray, defValue) { + if (!(pathArray instanceof Array)) { + return null; + } + if (!rootObject) { + return defValue; + } + if (_2.isEmpty(pathArray)) { + return rootObject; + } + return this._getEscaped(rootObject[pathArray.shift()], pathArray, defValue); + }, + /** + * Creates a schema that's a union of all input schemas (only type: object is supported) + * + * @param {*} schema REQUIRED - OpenAPI defined schema object to be resolved + * @param {string} parameterSourceOption REQUIRED tells that the schema object is of request or response + * @param {*} components REQUIRED components in openapi spec. + * @param {object} options - REQUIRED a list of options to indicate the type of resolution needed. + * @param {*} options.resolveFor - resolve refs for validation/conversion (value to be one of VALIDATION/CONVERSION) + * @param {string} options.resolveTo The desired JSON-generation mechanism (schema: prefer using the JSONschema to + generate a fake object, example: use specified examples as-is). Default: schema + * @param {*} options.stack counter which keeps a tab on nested schemas + * @param {*} options.seenRef References that are repeated. Used to identify circular references. + * @param {*} options.stackLimit Depth to which the schema should be resolved. + * @returns {*} schema - schema that adheres to all individual schemas in schemaArr + */ + resolveAllOf: function(schema2, parameterSourceOption, components, { + resolveFor = RESOLVE_REF_DEFAULTS.resolveFor, + resolveTo = RESOLVE_REF_DEFAULTS.resolveTo, + stack = RESOLVE_REF_DEFAULTS.stack, + seenRef = {}, + stackLimit = RESOLVE_REF_DEFAULTS.stackLimit, + analytics = {} + }) { + if (_2.isEmpty(schema2)) { + return null; + } + let resolvedNonAllOfSchema = {}; + if (_2.keys(schema2).length > 1) { + resolvedNonAllOfSchema = this.resolveRefs( + _2.omit(schema2, "allOf"), + parameterSourceOption, + components, + { stack, seenRef: _2.cloneDeep(seenRef), resolveFor, resolveTo, stackLimit, isAllOf: true, analytics } + ); + } + try { + return mergeAllOf(_2.assign(resolvedNonAllOfSchema, { + allOf: _2.map(schema2.allOf, (schema3) => { + return this.resolveRefs( + schema3, + parameterSourceOption, + components, + { stack, seenRef: _2.cloneDeep(seenRef), resolveFor, resolveTo, stackLimit, isAllOf: true, analytics } + ); + }) + }), { + // below option is required to make sure schemas with additionalProperties set to false are resolved correctly + ignoreAdditionalProperties: true, + resolvers: { + // for keywords in OpenAPI schema that are not standard defined JSON schema keywords, use default resolver + defaultResolver: (compacted) => { + return compacted[0]; + }, + // Default resolver seems to fail for enum, so adding custom resolver that will return all unique enum values + enum: (values) => { + return _2.uniq(_2.concat(...values)); + } + } + }); + } catch (e) { + console.warn("Error while resolving allOf schema: ", e); + return { value: " stackLimit) { + return { value: ERR_TOO_MANY_LEVELS }; + } + if (!schema2) { + return { value: "" }; + } + if (schema2.anyOf) { + if (resolveFor === "CONVERSION") { + return this.resolveRefs(schema2.anyOf[0], parameterSourceOption, components, { + resolveFor, + resolveTo, + stack, + seenRef: _2.cloneDeep(seenRef), + stackLimit, + analytics + }); + } + return { anyOf: _2.map(schema2.anyOf, (schemaElement) => { + PROPERTIES_TO_ASSIGN_ON_CASCADE.forEach((prop2) => { + if (_2.isNil(schemaElement[prop2]) && !_2.isNil(schema2[prop2])) { + schemaElement[prop2] = schema2[prop2]; + } + }); + return this.resolveRefs( + schemaElement, + parameterSourceOption, + components, + { + resolveFor, + resolveTo, + stack, + seenRef: _2.cloneDeep(seenRef), + stackLimit, + analytics + } + ); + }) }; + } + if (schema2.oneOf) { + if (resolveFor === "CONVERSION") { + return this.resolveRefs( + schema2.oneOf[0], + parameterSourceOption, + components, + { + resolveFor, + resolveTo, + stack, + seenRef: _2.cloneDeep(seenRef), + stackLimit, + analytics + } + ); + } + return { oneOf: _2.map(schema2.oneOf, (schemaElement) => { + PROPERTIES_TO_ASSIGN_ON_CASCADE.forEach((prop2) => { + if (_2.isNil(schemaElement[prop2]) && !_2.isNil(schema2[prop2])) { + schemaElement[prop2] = schema2[prop2]; + } + }); + return this.resolveRefs( + schemaElement, + parameterSourceOption, + components, + { + resolveFor, + resolveTo, + stack, + seenRef: _2.cloneDeep(seenRef), + stackLimit, + analytics + } + ); + }) }; + } + if (schema2.allOf) { + return this.resolveAllOf( + schema2, + parameterSourceOption, + components, + { + resolveFor, + resolveTo, + stack, + seenRef: _2.cloneDeep(seenRef), + stackLimit, + analytics + } + ); + } + if (schema2.$ref && _2.isFunction(schema2.$ref.split)) { + let refKey = schema2.$ref, outerProperties = concreteUtils.getOuterPropsIfIsSupported(schema2); + splitRef = refKey.split("/"); + if (splitRef.length < 4) { + return { value: "reference " + schema2.$ref + " not found in the OpenAPI spec" }; + } + splitRef = splitRef.slice(1).map((elem) => { + return decodeURIComponent( + elem.replace(/~1/g, "/").replace(/~0/g, "~") + ); + }); + resolvedSchema = this._getEscaped(components, splitRef); + if (seenRef[refKey] && hasReference(resolvedSchema, seenRef)) { + return { value: "" }; + } + seenRef[refKey] = stack; + if (outerProperties) { + resolvedSchema = concreteUtils.addOuterPropsToRefSchemaIfIsSupported(resolvedSchema, outerProperties); + } + if (resolvedSchema) { + if (schema2.example) { + resolvedSchema.example = schema2.example; + } + let refResolvedSchema = this.resolveRefs( + resolvedSchema, + parameterSourceOption, + components, + { + resolveFor, + resolveTo, + stack, + seenRef: _2.cloneDeep(seenRef), + stackLimit, + analytics + } + ); + return refResolvedSchema; + } + return { value: "reference " + schema2.$ref + " not found in the OpenAPI spec" }; + } + if (concreteUtils.compareTypes(schema2.type, SCHEMA_TYPES.object) || schema2.hasOwnProperty("properties") || schema2.hasOwnProperty("additionalProperties") && !schema2.hasOwnProperty("type")) { + schema2.type = SCHEMA_TYPES.object; + if (_2.has(schema2, "properties") || _2.has(schema2, "additionalProperties")) { + let tempSchema = _2.omit(schema2, ["properties", "additionalProperties"]); + if (_2.has(schema2, "additionalProperties")) { + if (_2.isBoolean(schema2.additionalProperties)) { + tempSchema.additionalProperties = schema2.additionalProperties; + } else { + tempSchema.additionalProperties = this.resolveRefs( + schema2.additionalProperties, + parameterSourceOption, + components, + { + resolveFor, + resolveTo, + stack, + seenRef: _2.cloneDeep(seenRef), + stackLimit, + analytics + } + ); + } + } + !_2.isEmpty(schema2.properties) && (tempSchema.properties = {}); + for (prop in schema2.properties) { + if (schema2.properties.hasOwnProperty(prop)) { + let property = schema2.properties[prop]; + if (!property) { + continue; + } + if (property.readOnly && parameterSourceOption === PARAMETER_SOURCE.REQUEST) { + if (_2.includes(tempSchema.required, prop)) { + _2.remove(tempSchema.required, _2.matches(prop)); + } + continue; + } else if (property.writeOnly && parameterSourceOption === PARAMETER_SOURCE.RESPONSE) { + if (_2.includes(tempSchema.required, prop)) { + _2.remove(tempSchema.required, _2.matches(prop)); + } + continue; + } + tempSchema.properties[prop] = _2.isEmpty(property) ? {} : this.resolveRefs( + property, + parameterSourceOption, + components, + { + resolveFor, + resolveTo, + stack, + seenRef: _2.cloneDeep(seenRef), + stackLimit, + analytics + } + ); + } + } + return tempSchema; + } + if (resolveFor === "CONVERSION" && resolveTo === "schema") { + schema2.default = typesMap.object; + } + } else if (concreteUtils.compareTypes(schema2.type, SCHEMA_TYPES.array) && schema2.items) { + if (resolveFor === "CONVERSION") { + if (!_2.has(schema2, "minItems") && _2.has(schema2, "maxItems") && schema2.maxItems >= 2) { + schema2.minItems = 2; + } + if (_2.has(schema2, "minItems") && schema2.minItems > 0) { + schema2.maxItems = schema2.minItems; + } + !_2.has(schema2, "maxItems") && (schema2.maxItems = 2); + } + let tempSchema = _2.omit(schema2, ["items", "additionalProperties"]); + tempSchema.items = this.resolveRefs( + schema2.items, + parameterSourceOption, + components, + { + resolveFor, + resolveTo, + stack, + seenRef: _2.cloneDeep(seenRef), + stackLimit, + analytics + } + ); + return tempSchema; + } else if (!schema2.hasOwnProperty("default")) { + if (schema2.hasOwnProperty("type")) { + if (resolveFor === "CONVERSION" && resolveTo === "schema") { + if (!schema2.hasOwnProperty("format")) { + schema2.default = "<" + schema2.type + ">"; + } else if (typesMap.hasOwnProperty(schema2.type)) { + schema2.default = typesMap[schema2.type][schema2.format]; + if (!schema2.default && schema2.format) { + schema2.default = "<" + schema2.format + ">"; + } + } else { + schema2.default = "<" + schema2.type + (schema2.format ? "-" + schema2.format : "") + ">"; + } + } + } else if (schema2.enum && schema2.enum.length > 0) { + if (resolveFor === "CONVERSION" && resolveTo === "schema") { + schema2.type = typeof schema2.enum[0]; + if (!schema2.hasOwnProperty("format")) { + schema2.default = "<" + schema2.type + ">"; + } else if (typesMap.hasOwnProperty(schema2.type)) { + schema2.default = typesMap[schema2.type][schema2.format]; + if (!schema2.default && schema2.format) { + schema2.default = "<" + schema2.format + ">"; + } + } else { + schema2.default = "<" + schema2.type + (schema2.format ? "-" + schema2.format : "") + ">"; + } + } else { + return { + type: typeof schema2.enum[0], + value: schema2.enum[0] + }; + } + } else if (isAllOf) { + return schema2; + } else { + return { + type: SCHEMA_TYPES.object + }; + } + if (!schema2.type) { + schema2.type = SCHEMA_TYPES.string; + } + if (!_2.includes(SUPPORTED_FORMATS, schema2.format) || schema2.pattern && schema2.format) { + return _2.omit(schema2, "format"); + } + } + return schema2; + } + }; + } +}); + +// ../../node_modules/openapi-to-postmanv2/lib/common/js2xml.js +var require_js2xml = __commonJS({ + "../../node_modules/openapi-to-postmanv2/lib/common/js2xml.js"(exports2, module2) { + var currentElement; + var currentElementName; + var DEFAULT_OPTIONS = { + spaces: " ", + compact: true + }; + function isArray(value) { + if (Array.isArray) { + return Array.isArray(value); + } + return Object.prototype.toString.call(value) === "[object Array]"; + } + var helper = { + copyOptions: function(options) { + var key, copy = {}; + for (key in options) { + if (options.hasOwnProperty(key)) { + copy[key] = options[key]; + } + } + return copy; + }, + ensureFlagExists: function(item, options) { + if (!(item in options) || typeof options[item] !== "boolean") { + options[item] = false; + } + }, + ensureSpacesExists: function(options) { + if (!("spaces" in options) || typeof options.spaces !== "number" && typeof options.spaces !== "string") { + options.spaces = 0; + } + }, + ensureAlwaysArrayExists: function(options) { + if (!("alwaysArray" in options) || typeof options.alwaysArray !== "boolean" && !isArray(options.alwaysArray)) { + options.alwaysArray = false; + } + }, + ensureKeyExists: function(key, options) { + if (!(key + "Key" in options) || typeof options[key + "Key"] !== "string") { + options[key + "Key"] = options.compact ? "_" + key : key; + } + }, + checkFnExists: function(key, options) { + return key + "Fn" in options; + } + }; + function validateOptions(userOptions) { + var options = helper.copyOptions(userOptions); + helper.ensureFlagExists("ignoreDeclaration", options); + helper.ensureFlagExists("ignoreInstruction", options); + helper.ensureFlagExists("ignoreAttributes", options); + helper.ensureFlagExists("ignoreText", options); + helper.ensureFlagExists("ignoreComment", options); + helper.ensureFlagExists("ignoreCdata", options); + helper.ensureFlagExists("ignoreDoctype", options); + helper.ensureFlagExists("compact", options); + helper.ensureFlagExists("indentText", options); + helper.ensureFlagExists("indentCdata", options); + helper.ensureFlagExists("indentAttributes", options); + helper.ensureFlagExists("indentInstruction", options); + helper.ensureFlagExists("fullTagEmptyElement", options); + helper.ensureFlagExists("noQuotesForNativeAttributes", options); + helper.ensureSpacesExists(options); + if (typeof options.spaces === "number") { + options.spaces = Array(options.spaces + 1).join(" "); + } + helper.ensureKeyExists("declaration", options); + helper.ensureKeyExists("instruction", options); + helper.ensureKeyExists("attributes", options); + helper.ensureKeyExists("text", options); + helper.ensureKeyExists("comment", options); + helper.ensureKeyExists("cdata", options); + helper.ensureKeyExists("doctype", options); + helper.ensureKeyExists("type", options); + helper.ensureKeyExists("name", options); + helper.ensureKeyExists("elements", options); + helper.checkFnExists("doctype", options); + helper.checkFnExists("instruction", options); + helper.checkFnExists("cdata", options); + helper.checkFnExists("comment", options); + helper.checkFnExists("text", options); + helper.checkFnExists("instructionName", options); + helper.checkFnExists("elementName", options); + helper.checkFnExists("attributeName", options); + helper.checkFnExists("attributeValue", options); + helper.checkFnExists("attributes", options); + helper.checkFnExists("fullTagEmptyElement", options); + return options; + } + function writeIndentation(options, depth, firstLine) { + return (!firstLine && options.spaces ? "\n" : "") + Array(depth + 1).join(options.spaces); + } + function writeAttributes(attributes, options, depth) { + if (options.ignoreAttributes) { + return ""; + } + if ("attributesFn" in options) { + attributes = options.attributesFn(attributes, currentElementName, currentElement); + } + var key, attr, attrName, attrPlusValue, quote, result = []; + var attrLineWidth = (depth + 1) * options.spaces; + var wrapped = false; + for (key in attributes) { + if (attributes.hasOwnProperty(key) && attributes[key] !== null && attributes[key] !== void 0) { + quote = options.noQuotesForNativeAttributes && typeof attributes[key] !== "string" ? "" : '"'; + attr = "" + attributes[key]; + attr = attr.replace(/"/g, """); + attr = attr.replace(/ options.indentAttributesWidth) { + result.push(writeIndentation(options, depth + 1, false)); + attrLineWidth = (depth + 1) * options.spaces + attrPlusValue.length + 1; + wrapped = true; + } else { + result.push(" "); + } + } else { + result.push( + options.spaces && options.indentAttributes ? writeIndentation(options, depth + 1, false) : " " + ); + } + result.push(attrPlusValue); + } + } + if (attributes && Object.keys(attributes).length && options.spaces && options.indentAttributes) { + if (options.indentAttributesWidth && !wrapped) { + result.push(" "); + } else { + result.push(writeIndentation(options, depth, false)); + } + } + return result.join(""); + } + function writeDeclaration(declaration, options, depth) { + currentElement = declaration; + currentElementName = "xml"; + return options.ignoreDeclaration ? "" : ""; + } + function writeInstruction(instruction, options, depth) { + if (options.ignoreInstruction) { + return ""; + } + var key; + for (key in instruction) { + if (instruction.hasOwnProperty(key)) { + break; + } + } + var instructionName = "instructionNameFn" in options ? options.instructionNameFn(key, instruction[key], currentElementName, currentElement) : key; + if (typeof instruction[key] === "object") { + currentElement = instruction; + currentElementName = instructionName; + return ""; + } else { + var instructionValue = instruction[key] ? instruction[key] : ""; + if ("instructionFn" in options) instructionValue = options.instructionFn(instructionValue, key, currentElementName, currentElement); + return ""; + } + } + function writeComment(comment, options) { + return options.ignoreComment ? "" : ""; + } + function writeCdata(cdata, options) { + return options.ignoreCdata ? "" : "", "]]]]>")) + "]]>"; + } + function writeDoctype(doctype, options) { + return options.ignoreDoctype ? "" : ""; + } + function writeText(text, options) { + if (options.ignoreText) return ""; + text = "" + text; + text = text.replace(/&/g, "&"); + text = text.replace(/&/g, "&").replace(//g, ">"); + return "textFn" in options ? options.textFn(text, currentElementName, currentElement) : text; + } + function hasContent(element, options) { + var i; + if (element.elements && element.elements.length) { + for (i = 0; i < element.elements.length; ++i) { + switch (element.elements[i][options.typeKey]) { + case "text": + if (options.indentText) { + return true; + } + break; + case "cdata": + if (options.indentCdata) { + return true; + } + break; + case "instruction": + if (options.indentInstruction) { + return true; + } + break; + case "doctype": + case "comment": + case "element": + return true; + default: + return true; + } + } + } + return false; + } + function writeElement(element, options, depth) { + currentElement = element; + currentElementName = element.name; + var xml = [], elementName = "elementNameFn" in options ? options.elementNameFn(element.name, element) : element.name; + xml.push("<" + elementName); + if (element[options.attributesKey]) { + xml.push(writeAttributes(element[options.attributesKey], options, depth)); + } + var withClosingTag = element[options.elementsKey] && element[options.elementsKey].length || element[options.attributesKey] && element[options.attributesKey]["xml:space"] === "preserve"; + if (!withClosingTag) { + if ("fullTagEmptyElementFn" in options) { + withClosingTag = options.fullTagEmptyElementFn(element.name, element); + } else { + withClosingTag = options.fullTagEmptyElement; + } + } + if (withClosingTag) { + xml.push(">"); + if (element[options.elementsKey] && element[options.elementsKey].length) { + xml.push(writeElements(element[options.elementsKey], options, depth + 1)); + currentElement = element; + currentElementName = element.name; + } + xml.push(options.spaces && hasContent(element, options) ? "\n" + Array(depth + 1).join(options.spaces) : ""); + xml.push(""); + } else { + xml.push("/>"); + } + return xml.join(""); + } + function writeElements(elements, options, depth, firstLine) { + return elements.reduce(function(xml, element) { + var indent = writeIndentation(options, depth, firstLine && !xml); + switch (element.type) { + case "element": + return xml + indent + writeElement(element, options, depth); + case "comment": + return xml + indent + writeComment(element[options.commentKey], options); + case "doctype": + return xml + indent + writeDoctype(element[options.doctypeKey], options); + case "cdata": + return xml + (options.indentCdata ? indent : "") + writeCdata(element[options.cdataKey], options); + case "text": + return xml + (options.indentText ? indent : "") + writeText(element[options.textKey], options); + case "instruction": + var instruction = {}; + instruction[element[options.nameKey]] = element[options.attributesKey] ? element : element[options.instructionKey]; + return xml + (options.indentInstruction ? indent : "") + writeInstruction(instruction, options, depth); + } + }, ""); + } + function hasContentCompact(element, options, anyContent) { + var key; + for (key in element) { + if (element.hasOwnProperty(key)) { + switch (key) { + case options.parentKey: + case options.attributesKey: + break; + case options.textKey: + if (options.indentText || anyContent) { + return true; + } + break; + case options.cdataKey: + if (options.indentCdata || anyContent) { + return true; + } + break; + case options.instructionKey: + if (options.indentInstruction || anyContent) { + return true; + } + break; + case options.doctypeKey: + case options.commentKey: + return true; + default: + return true; + } + } + } + return false; + } + function writeElementCompact(element, name, options, depth, indent) { + currentElement = element; + currentElementName = name; + var elementName = "elementNameFn" in options ? options.elementNameFn(name, element) : name; + if (typeof element === "undefined" || element === null || element === "") { + return "fullTagEmptyElementFn" in options && options.fullTagEmptyElementFn(name, element) || options.fullTagEmptyElement ? "<" + elementName + ">" : "<" + elementName + "/>"; + } + var xml = []; + if (name) { + xml.push("<" + elementName); + if (typeof element !== "object") { + xml.push(">" + writeText(element, options) + ""); + return xml.join(""); + } + if (element[options.attributesKey]) { + xml.push(writeAttributes(element[options.attributesKey], options, depth)); + } + var withClosingTag = hasContentCompact(element, options, true) || element[options.attributesKey] && element[options.attributesKey]["xml:space"] === "preserve"; + if (!withClosingTag) { + if ("fullTagEmptyElementFn" in options) { + withClosingTag = options.fullTagEmptyElementFn(name, element); + } else { + withClosingTag = options.fullTagEmptyElement; + } + } + if (withClosingTag) { + xml.push(">"); + } else { + xml.push("/>"); + return xml.join(""); + } + } + xml.push(writeElementsCompact(element, options, depth + 1, false)); + currentElement = element; + currentElementName = name; + if (name) { + xml.push((indent ? writeIndentation(options, depth, false) : "") + ""); + } + return xml.join(""); + } + function writeElementsCompact(element, options, depth, firstLine) { + var i, key, nodes, xml = []; + for (key in element) { + if (element.hasOwnProperty(key)) { + nodes = isArray(element[key]) ? element[key] : [element[key]]; + for (i = 0; i < nodes.length; ++i) { + switch (key) { + case options.declarationKey: + xml.push(writeDeclaration(nodes[i], options, depth)); + break; + case options.instructionKey: + xml.push((options.indentInstruction ? writeIndentation(options, depth, firstLine) : "") + writeInstruction(nodes[i], options, depth)); + break; + case options.attributesKey: + case options.parentKey: + break; + case options.textKey: + xml.push((options.indentText ? writeIndentation(options, depth, firstLine) : "") + writeText(nodes[i], options)); + break; + case options.cdataKey: + xml.push((options.indentCdata ? writeIndentation(options, depth, firstLine) : "") + writeCdata(nodes[i], options)); + break; + case options.doctypeKey: + xml.push(writeIndentation(options, depth, firstLine) + writeDoctype(nodes[i], options)); + break; + case options.commentKey: + xml.push(writeIndentation(options, depth, firstLine) + writeComment(nodes[i], options)); + break; + default: + xml.push(writeIndentation(options, depth, firstLine) + writeElementCompact(nodes[i], key, options, depth, hasContentCompact(nodes[i], options))); + } + firstLine = firstLine && !xml.length; + } + } + } + return xml.join(""); + } + module2.exports = function(js, indentChar) { + if (typeof js !== "object") { + return js; + } + try { + let options = DEFAULT_OPTIONS; + indentChar && (options.spaces = indentChar); + options = validateOptions(options); + var xml = []; + currentElement = js; + currentElementName = "_root_"; + if (options.compact) { + xml.push(writeElementsCompact(js, options, 0, true)); + } else { + if (js[options.declarationKey]) { + xml.push(writeDeclaration(js[options.declarationKey], options, 0)); + } + if (js[options.elementsKey] && js[options.elementsKey].length) { + xml.push(writeElements(js[options.elementsKey], options, 0, !xml.length)); + } + } + return xml.join(""); + } catch (err) { + console.error(err); + return "Failed to generate XML data from provided Example."; + } + }; + } +}); + +// ../../node_modules/openapi-to-postmanv2/lib/xmlSchemaFaker.js +var require_xmlSchemaFaker = __commonJS({ + "../../node_modules/openapi-to-postmanv2/lib/xmlSchemaFaker.js"(exports2, module2) { + var _2 = require_lodash(); + var js2xml = require_js2xml(); + function indentContent(content, initialIndent) { + let contentArr = _2.split(content, "\n"), indentedContent = _2.join(_2.map(contentArr, (contentElement) => { + return initialIndent + contentElement; + }), "\n"); + return indentedContent; + } + function convertSchemaToXML(name, schema2, attribute, indentChar, indent, resolveTo) { + var tagPrefix = "", cIndent = _2.times(indent, _2.constant(indentChar)).join(""), retVal = ""; + if (schema2 === null || typeof schema2 === "undefined") { + return retVal; + } + const schemaExample = typeof schema2 === "object" && schema2.example; + name = _2.get(schema2, "xml.name", name || "element"); + if (_2.get(schema2, "xml.prefix")) { + tagPrefix = schema2.xml.prefix ? `${schema2.xml.prefix}:` : ""; + } + if (["integer", "string", "boolean", "number"].includes(schema2.type)) { + if (schema2.type === "integer") { + actualValue = "(integer)"; + } else if (schema2.type === "string") { + actualValue = "(string)"; + } else if (schema2.type === "boolean") { + actualValue = "(boolean)"; + } else if (schema2.type === "number") { + actualValue = "(number)"; + } + if (resolveTo === "example" && typeof schemaExample !== "undefined") { + actualValue = schemaExample; + } + if (attribute) { + return actualValue; + } else { + retVal = ` +${cIndent}<${tagPrefix + name}`; + if (_2.get(schema2, "xml.namespace")) { + retVal += ` xmlns:${tagPrefix.slice(0, -1)}="${schema2.xml.namespace}"`; + } + retVal += `>${actualValue}`; + } + } else if (schema2.type === "object") { + if (resolveTo === "example" && typeof schemaExample === "string") { + return "\n" + schemaExample; + } else if (resolveTo === "example" && typeof schemaExample === "object") { + const elementName = _2.get(schema2, "items.xml.name", name || "element"), fakedContent = js2xml({ [elementName]: schemaExample }, indentChar); + retVal = "\n" + indentContent(fakedContent, cIndent); + } else { + var propVal, attributes = [], childNodes = ""; + retVal = "\n" + cIndent + `<${tagPrefix}${name}`; + if (_2.get(schema2, "xml.namespace")) { + let formattedTagPrefix = tagPrefix ? `:${tagPrefix.slice(0, -1)}` : ""; + retVal += ` xmlns${formattedTagPrefix}="${schema2.xml.namespace}"`; + } + _2.forOwn(schema2.properties, (value, key) => { + propVal = convertSchemaToXML(key, value, _2.get(value, "xml.attribute"), indentChar, indent + 1, resolveTo); + if (_2.get(value, "xml.attribute")) { + attributes.push(`${key}="${propVal}"`); + } else { + childNodes += _2.isString(propVal) ? propVal : ""; + } + }); + if (attributes.length > 0) { + retVal += " " + attributes.join(" "); + } + retVal += ">"; + retVal += childNodes; + retVal += ` +${cIndent}`; + } + } else if (schema2.type === "array") { + var isWrapped = _2.get(schema2, "xml.wrapped"), extraIndent = isWrapped ? 1 : 0, arrayElemName = _2.get(schema2, "items.xml.name", name || "element"), schemaItemsWithXmlProps = _2.cloneDeep(schema2.items), contents; + schemaItemsWithXmlProps.xml = schema2.xml; + if (resolveTo === "example" && typeof schemaExample === "string") { + return "\n" + schemaExample; + } else if (resolveTo === "example" && typeof schemaExample === "object") { + const fakedContent = js2xml({ [arrayElemName]: schemaExample }, indentChar); + contents = "\n" + indentContent(fakedContent, cIndent); + } else { + let singleElementContent = convertSchemaToXML( + arrayElemName, + schemaItemsWithXmlProps, + false, + indentChar, + indent + extraIndent, + resolveTo + ); + contents = singleElementContent + singleElementContent; + } + if (isWrapped) { + return ` +${cIndent}<${tagPrefix}${name}>${contents} +${cIndent}`; + } else { + return contents; + } + } + return retVal; + } + module2.exports = function(name, schema2, indentCharacter, resolveTo) { + return convertSchemaToXML(name, schema2, false, indentCharacter, 0, resolveTo).substring(1); + }; + } +}); + +// ../../node_modules/openapi-to-postmanv2/lib/ajValidation/ajvValidationError.js +var require_ajvValidationError = __commonJS({ + "../../node_modules/openapi-to-postmanv2/lib/ajValidation/ajvValidationError.js"(exports2, module2) { + var _2 = require_lodash(); + var { formatDataPath } = require_schemaUtilsCommon(); + function ajvValidationError(ajvValidationErrorObj, data) { + var mismatchPropName = formatDataPath(_2.get(ajvValidationErrorObj, "instancePath", "")), mismatchObj; + if (mismatchPropName[0] === ".") { + mismatchPropName = mismatchPropName.slice(1); + } + mismatchObj = { + reason: `The ${data.humanPropName} property "${mismatchPropName}" ${ajvValidationErrorObj.message}`, + reasonCode: "INVALID_TYPE" + }; + switch (ajvValidationErrorObj.keyword) { + case "additionalProperties": + mismatchObj.reasonCode = "MISSING_IN_SCHEMA"; + break; + case "required": + mismatchObj.reasonCode = "MISSING_IN_REQUEST"; + mismatchObj.reason = `The ${data.humanPropName} property "${mismatchPropName}" should have required property "${_2.get(ajvValidationErrorObj, "params.missingProperty")}"`; + break; + default: + break; + } + return mismatchObj; + } + module2.exports = ajvValidationError; + } +}); + +// ../../node_modules/openapi-to-postmanv2/lib/trie.js +var require_trie = __commonJS({ + "../../node_modules/openapi-to-postmanv2/lib/trie.js"(exports2, module2) { + function Node(options) { + this.name = options ? options.name : "/"; + this.requestCount = options ? options.requestCount : 0; + this.type = options ? options.type : "item"; + this.children = {}; + this.childCount = 0; + this.requests = []; + this.addChildren = function(child, value) { + this.children[child] = value; + }; + this.addMethod = function(method) { + this.requests.push(method); + }; + } + var Trie = class { + constructor(node) { + this.root = node; + } + }; + module2.exports = { + Trie, + Node + }; + } +}); + +// ../../node_modules/openapi-to-postmanv2/lib/common/ParseError.js +var require_ParseError = __commonJS({ + "../../node_modules/openapi-to-postmanv2/lib/common/ParseError.js"(exports2, module2) { + var ParseError = class extends Error { + constructor(message) { + super(message); + this.name = "ParseError"; + } + }; + module2.exports = { + ParseError + }; + } +}); + +// ../../node_modules/openapi-to-postmanv2/lib/dfs.js +var require_dfs = __commonJS({ + "../../node_modules/openapi-to-postmanv2/lib/dfs.js"(exports2, module2) { + var DFS = class { + traverse(node, getAdjacent) { + let traverseOrder = [], stack = [], missing = [], visited = /* @__PURE__ */ new Set(); + stack.push(node); + while (stack.length > 0) { + node = stack.pop(); + if (!visited.has(node)) { + traverseOrder.push(node); + visited.add(node); + let { graphAdj, missingNodes } = getAdjacent(node); + missing.push(...missingNodes); + for (let j = 0; j < graphAdj.length; j++) { + stack.push(graphAdj[j]); + } + } + } + missing = [ + ...new Set( + missing.map((obj) => { + return JSON.stringify(obj); + }) + ) + ].map((str) => { + return JSON.parse(str); + }); + return { traverseOrder, missing }; + } + async traverseAndBundle(node, getAdjacentAndBundle) { + let traverseOrder = [], stack = [], missing = [], visited = /* @__PURE__ */ new Set(), nodeContents = {}, globalReferences = {}, hrefsVisited = /* @__PURE__ */ new Set(); + stack.push(node); + while (stack.length > 0) { + node = stack.pop(); + if (!visited.has(node) && /** + * For nodes that are fetched for remote URLs we ensure they + * aren't visited more than once + */ + (!node.href || !hrefsVisited.has(node.href))) { + traverseOrder.push(node); + visited.add(node); + node.href && hrefsVisited.add(node.href); + let { + graphAdj, + missingNodes, + nodeContent, + nodeReferenceDirectory, + nodeName + } = await getAdjacentAndBundle(node, globalReferences); + nodeContents[nodeName] = nodeContent; + Object.entries(nodeReferenceDirectory).forEach(([key, data]) => { + globalReferences[key] = data; + }); + missing.push(...missingNodes); + for (let j = 0; j < graphAdj.length; j++) { + stack.push(graphAdj[j]); + } + } + } + missing = [ + ...new Set( + missing.map((obj) => { + return JSON.stringify(obj); + }) + ) + ].map((str) => { + return JSON.parse(str); + }); + return { traverseOrder, missing, nodeContents, globalReferences }; + } + }; + module2.exports = { + DFS + }; + } +}); + +// ../../node_modules/openapi-to-postmanv2/lib/bundleRules/resolvers.js +var require_resolvers = __commonJS({ + "../../node_modules/openapi-to-postmanv2/lib/bundleRules/resolvers.js"(exports2, module2) { + module2.exports = { + /** + * Resolve the scenario if the item is in second level + * @param {array} trace The keyInComponents + * @param {number} index the current index + * @return {undefined} + */ + resolveSecondLevelChild: function(trace, index, definitions) { + const item = definitions[trace[index + 2]]; + if (item) { + trace[index + 1] = item; + } + }, + /** + * If the provided item is included in any defined container it returns the container name + * else it return the same item + * @param {string} item The current item in the iteration + * @returns {string} the name of container where item is included or the item if it's not included + * in any container + */ + resolveFirstLevelChild: function(item, containers) { + for (let [key, containerItems] of Object.entries(containers)) { + if (containerItems.includes(item)) { + return key; + } + } + return item; + } + }; + } +}); + +// ../../node_modules/openapi-to-postmanv2/lib/jsonPointer.js +var require_jsonPointer = __commonJS({ + "../../node_modules/openapi-to-postmanv2/lib/jsonPointer.js"(exports2, module2) { + var slashes = /\//g; + var tildes = /~/g; + var escapedSlash = /~1/g; + var escapedSlashString = "~1"; + var localPointer = "#"; + var httpSeparator = "http"; + var escapedTilde = /~0/g; + var jsonPointerLevelSeparator = "/"; + var escapedTildeString = "~0"; + var { isSwagger, getBundleRulesDataByVersion } = require_versionUtils(); + var { + resolveFirstLevelChild, + resolveSecondLevelChild + } = require_resolvers(); + function jsonPointerEncodeAndReplace(filePathName) { + return encodeURIComponent(filePathName.replace(tildes, escapedTildeString).replace(slashes, escapedSlashString)); + } + function jsonPointerDecodeAndReplace(filePathName) { + return decodeURIComponent(filePathName.replace(escapedSlash, jsonPointerLevelSeparator).replace(escapedTilde, "~")); + } + function generateObjectName(filePathName, hash = "") { + let decodedRef = jsonPointerDecodeAndReplace(filePathName), validName = decodedRef.replace(/\//g, "_").replace(/#/g, "-"), hashPart = hash ? `_${hash}` : ""; + validName = `${validName.replace(/[^a-zA-Z0-9\.\-_]/g, "")}${hashPart}`; + return validName; + } + function getKeyInComponents(traceFromParent, mainKey, version2, commonPathFromData, parentNodeKey = void 0) { + const { + CONTAINERS, + DEFINITIONS, + COMPONENTS_KEYS, + INLINE, + ROOT_CONTAINERS_KEYS + } = getBundleRulesDataByVersion(version2); + let result, newFPN = mainKey.replace(generateObjectName(commonPathFromData), ""), trace = [ + ...traceFromParent, + jsonPointerDecodeAndReplace(newFPN) + ].reverse(), traceToKey = [], matchFound = false, hasNotParent = parentNodeKey === void 0, isRootAndReusableItemsContainer = ROOT_CONTAINERS_KEYS.includes(traceFromParent[0]), isAComponentKeyReferenced = COMPONENTS_KEYS.includes(traceFromParent[0]) && hasNotParent; + if (isRootAndReusableItemsContainer || isAComponentKeyReferenced) { + return []; + } + for (let [index, item] of trace.entries()) { + let itemShouldBeResolvedInline = INLINE.includes(item); + if (itemShouldBeResolvedInline) { + matchFound = false; + break; + } + item = resolveFirstLevelChild(item, CONTAINERS); + resolveSecondLevelChild(trace, index, DEFINITIONS); + traceToKey.push(item.replace(/\s/g, "")); + if (COMPONENTS_KEYS.includes(item)) { + matchFound = true; + break; + } + } + result = matchFound ? traceToKey.reverse() : []; + return result; + } + function concatJsonPointer(traceFromParent, targetInRoot) { + const traceFromParentAsString = traceFromParent.join(jsonPointerLevelSeparator); + return localPointer + targetInRoot + jsonPointerLevelSeparator + traceFromParentAsString; + } + function getJsonPointerRelationToRoot(refValue, traceFromKey, version2) { + let targetInRoot = isSwagger(version2) ? "" : "/components"; + if (refValue.startsWith(localPointer)) { + return refValue; + } + return concatJsonPointer(traceFromKey, targetInRoot); + } + function stringIsAValidUrl(stringToCheck) { + try { + let url2 = new URL(stringToCheck); + if (url2) { + return true; + } + return false; + } catch (err) { + try { + var url = require("url"); + let urlObj = url.parse(stringToCheck); + return urlObj.hostname !== null; + } catch (parseErr) { + return false; + } + } + } + function isExtRef(obj, key) { + return key === "$ref" && typeof obj[key] === "string" && obj[key] !== void 0 && !obj[key].startsWith(localPointer) && !stringIsAValidUrl(obj[key]); + } + function isExtURLRef(obj, key) { + return key === "$ref" && typeof obj[key] === "string" && obj[key] !== void 0 && !obj[key].startsWith(localPointer) && stringIsAValidUrl(obj[key]); + } + function isExtRemoteRef(obj, key) { + return isExtRef(obj, key) || isExtURLRef(obj, key); + } + function removeLocalReferenceFromPath(refValue) { + if (refValue.$ref.includes(localPointer)) { + return refValue.$ref.split(localPointer)[0]; + } + return refValue.$ref; + } + function isLocalRef(obj, key) { + return key === "$ref" && typeof obj[key] === "string" && obj[key] !== void 0 && obj[key].startsWith(localPointer); + } + function isRemoteRef(obj, key) { + return key === "$ref" && typeof obj[key] === "string" && obj[key] !== void 0 && !obj[key].startsWith(localPointer) && stringIsAValidUrl(obj[key]); + } + function getEntityName(jsonPointer) { + if (!jsonPointer) { + return ""; + } + let segment = jsonPointer.substring(jsonPointer.lastIndexOf(jsonPointerLevelSeparator) + 1); + return segment; + } + module2.exports = { + jsonPointerEncodeAndReplace, + jsonPointerDecodeAndReplace, + getJsonPointerRelationToRoot, + concatJsonPointer, + getKeyInComponents, + isExtRef, + isExtURLRef, + isExtRemoteRef, + removeLocalReferenceFromPath, + isLocalRef, + getEntityName, + isRemoteRef, + localPointer, + httpSeparator, + jsonPointerLevelSeparator, + generateObjectName, + stringIsAValidUrl + }; + } +}); + +// ../../node_modules/openapi-to-postmanv2/lib/relatedFiles.js +var require_relatedFiles = __commonJS({ + "../../node_modules/openapi-to-postmanv2/lib/relatedFiles.js"(exports2, module2) { + var parse2 = require_parse(); + var traverseUtility = require_legacy(); + var BROWSER = "browser"; + var { DFS } = require_dfs(); + var { isExtRef, removeLocalReferenceFromPath } = require_jsonPointer(); + var path = require("path"); + var pathBrowserify = require_path_browserify(); + function comparePaths(path1, path2) { + return path1 === path2; + } + function calculatePath(parentFileName, referencePath) { + if (path.isAbsolute(referencePath)) { + return referencePath; + } + let currentDirName = path.dirname(parentFileName), refDirName = path.join(currentDirName, referencePath); + return refDirName; + } + function calculatePathMissing(parentFileName, referencePath) { + let currentDirName = path.dirname(parentFileName), refDirName = path.join(currentDirName, referencePath); + if (refDirName.startsWith(".." + path.sep)) { + return { path: void 0, $ref: referencePath }; + } else if (path.isAbsolute(parentFileName) && !path.isAbsolute(referencePath)) { + let relativeToRoot = path.join(currentDirName.replace(path.sep, ""), referencePath); + if (relativeToRoot.startsWith(".." + path.sep)) { + return { path: void 0, $ref: referencePath }; + } + } + return { path: refDirName, $ref: void 0 }; + } + function findNodeFromPath(referencePath, allData) { + return allData.find((node) => { + return comparePaths(node.fileName, referencePath); + }); + } + function added(path2, referencesInNode) { + return referencesInNode.find((reference) => { + return reference.path === path2; + }) !== void 0; + } + function getReferences(currentNode, refTypeResolver, pathSolver) { + let referencesInNode = []; + traverseUtility(currentNode).forEach((property) => { + if (property) { + let hasReferenceTypeKey; + hasReferenceTypeKey = Object.keys(property).find( + (key) => { + return refTypeResolver(property, key); + } + ); + if (hasReferenceTypeKey) { + if (!added(property.$ref, referencesInNode)) { + referencesInNode.push({ path: pathSolver(property) }); + } + } + } + }); + return referencesInNode; + } + function getAdjacentAndMissing(currentNode, allData, specRoot) { + let currentNodeReferences, currentContent = currentNode.content, graphAdj = [], missingNodes = [], OASObject; + if (currentNode.parsed) { + OASObject = currentNode.parsed; + } else { + OASObject = parse2.getOasObject(currentContent); + } + currentNodeReferences = getReferences(OASObject, isExtRef, removeLocalReferenceFromPath); + currentNodeReferences.forEach((reference) => { + let referencePath = reference.path, adjacentNode = findNodeFromPath(calculatePath(currentNode.fileName, referencePath), allData); + if (adjacentNode) { + graphAdj.push(adjacentNode); + } else if (!comparePaths(referencePath, specRoot.fileName)) { + let calculatedPathForMissing = calculatePathMissing(currentNode.fileName, referencePath); + if (!calculatedPathForMissing.$ref) { + missingNodes.push({ path: calculatedPathForMissing.path }); + } else { + missingNodes.push({ $ref: calculatedPathForMissing.$ref, path: null }); + } + } + }); + return { graphAdj, missingNodes }; + } + module2.exports = { + /** + * Maps the output from get root files to detect root files + * @param {object} specRoot - root file information + * @param {Array} allData - array of { path, content} objects + * @param {Array} origin - process origin (BROWSER or node) + * @returns {object} - Detect root files result object + */ + getRelatedFiles: function(specRoot, allData, origin) { + if (origin === BROWSER) { + path = pathBrowserify; + } + let algorithm = new DFS(), { traverseOrder, missing } = algorithm.traverse(specRoot, (currentNode) => { + return getAdjacentAndMissing(currentNode, allData, specRoot); + }), outputRelatedFiles = traverseOrder.slice(1).map((relatedFile) => { + return { + path: relatedFile.fileName + }; + }); + return { relatedFiles: outputRelatedFiles, missingRelatedFiles: missing }; + }, + getReferences, + getAdjacentAndMissing, + calculatePath, + calculatePathMissing, + removeLocalReferenceFromPath + }; + } +}); + +// ../../node_modules/openapi-to-postmanv2/lib/bundle.js +var require_bundle = __commonJS({ + "../../node_modules/openapi-to-postmanv2/lib/bundle.js"(exports2, module2) { + var _2 = require_lodash(); + var { + isExtRef, + isExtURLRef, + stringIsAValidUrl, + isExtRemoteRef, + getKeyInComponents, + getJsonPointerRelationToRoot, + removeLocalReferenceFromPath, + localPointer, + httpSeparator, + jsonPointerLevelSeparator, + isLocalRef, + jsonPointerDecodeAndReplace, + generateObjectName + } = require_jsonPointer(); + var traverseUtility = require_legacy(); + var parse2 = require_parse(); + var { ParseError } = require_ParseError(); + var Utils = require_utils2(); + var crypto4 = require("crypto"); + var path = require("path"); + var pathBrowserify = require_path_browserify(); + var BROWSER = "browser"; + var { DFS } = require_dfs(); + var deref = require_deref(); + var { isSwagger, getBundleRulesDataByVersion } = require_versionUtils(); + var CIRCULAR_OR_REF_EXT_PROP = "x-orRef"; + function comparePaths(path1, path2) { + return path1 === path2; + } + function parseFileOrThrow(fileContent) { + const result = parse2.getOasObject(fileContent); + if (result.result === false) { + throw new ParseError(result.reason); + } + return result; + } + function parseFile(fileContent) { + const result = parse2.getOasObject(fileContent); + return result; + } + function calculatePath(parentFileName, referencePath) { + if (path.isAbsolute(referencePath)) { + return referencePath; + } + if (referencePath[0] === localPointer) { + return `${parentFileName}${referencePath}`; + } + let currentDirName = path.dirname(parentFileName), refDirName = path.join(currentDirName, referencePath); + return refDirName; + } + function findNodeFromPath(referencePath, allData) { + const isReferenceRemoteURL = stringIsAValidUrl(referencePath), partialComponents = referencePath.split(localPointer), isPartial = partialComponents.length > 1; + let node = allData.find((node2) => { + if (isPartial && !isReferenceRemoteURL) { + referencePath = partialComponents[0]; + } + if (isReferenceRemoteURL) { + return _2.startsWith(node2.path, referencePath); + } + return comparePaths(node2.fileName, referencePath); + }); + return node; + } + function calculatePathMissing(parentFileName, referencePath) { + let currentDirName = path.dirname(parentFileName), refDirName = path.join(currentDirName, referencePath); + if (refDirName.startsWith(".." + path.sep)) { + return { path: void 0, $ref: referencePath }; + } else if (path.isAbsolute(parentFileName) && !path.isAbsolute(referencePath)) { + let relativeToRoot = path.join(currentDirName.replace(path.sep, ""), referencePath); + if (relativeToRoot.startsWith(".." + path.sep)) { + return { path: void 0, $ref: referencePath }; + } + } + return { path: refDirName, $ref: void 0 }; + } + function added(path2, referencesInNode) { + return referencesInNode.find((reference) => { + return reference.path === path2; + }) !== void 0; + } + function getRootFileTrace(nodeParents) { + let trace = []; + for (let parentKey of nodeParents) { + if ([void 0, "oasObject"].includes(parentKey)) { + break; + } + trace.push(parentKey); + } + return trace.reverse(); + } + function getContentFromTrace(content, partial) { + if (!partial) { + return content; + } + partial = partial[0] === jsonPointerLevelSeparator ? partial.substring(1) : partial; + const trace = partial.split(jsonPointerLevelSeparator).map((item) => { + return jsonPointerDecodeAndReplace(item); + }); + let currentValue = content; + currentValue = deref._getEscaped(content, trace, void 0); + return currentValue; + } + function setValueInComponents(keyInComponents, components, value, componentsKeys) { + let currentPlace = components, target = keyInComponents[keyInComponents.length - 2], key = keyInComponents.length === 2 && componentsKeys.includes(keyInComponents[0]) ? keyInComponents[1] : null; + if (componentsKeys.includes(keyInComponents[0])) { + if (keyInComponents[0] === "schema") { + keyInComponents[0] = "schemas"; + } + target = key; + } + for (let place of keyInComponents) { + if (place === target) { + currentPlace[place] = value; + break; + } else if (currentPlace[place]) { + currentPlace = currentPlace[place]; + } else { + currentPlace[place] = {}; + currentPlace = currentPlace[place]; + } + } + } + function createComponentHashedKey(currentKey) { + let hashPart = crypto4.createHash("sha1").update(currentKey).digest("base64").substring(0, 4), newKey = generateObjectName(currentKey, hashPart); + return newKey; + } + function createComponentMainKey(tempRef, mainKeys) { + let newKey = generateObjectName(tempRef), mainKey = mainKeys[newKey]; + if (mainKey && mainKey !== tempRef) { + newKey = createComponentHashedKey(tempRef); + } + return newKey; + } + function getTraceFromParentKeyInComponents(nodeContext, tempRef, mainKeys, version2, commonPathFromData) { + const parents = [...nodeContext.parents].reverse(), isArrayKeyRegexp = new RegExp("^\\d+$", "g"), key = nodeContext.key, keyIsAnArrayItem = key.match(isArrayKeyRegexp), parentKeys = [...parents.map((parent) => { + return parent.key; + })], nodeParentsKey = keyIsAnArrayItem ? parentKeys : [key, ...parentKeys], nodeTrace = getRootFileTrace(nodeParentsKey), componentKey = createComponentMainKey(tempRef, mainKeys), parentNodeKey = nodeContext.parent.key, keyTraceInComponents = getKeyInComponents( + nodeTrace, + componentKey, + version2, + commonPathFromData, + parentNodeKey + ); + return keyTraceInComponents; + } + function handleLocalCollisions(trace, initialMainKeys) { + if (trace.length === 0) { + return trace; + } + const componentType = trace[trace.length - 2], initialKeysOfType = initialMainKeys[componentType], generatedKeyIndex = trace.length - 1; + if (initialKeysOfType && initialKeysOfType.includes(trace[generatedKeyIndex])) { + trace[generatedKeyIndex] = createComponentHashedKey(trace[generatedKeyIndex]); + } + return trace; + } + async function getReferences(currentNode, isOutOfRoot, pathSolver, parentFilename, version2, rootMainKeys, commonPathFromData, allData, globalReferences, remoteRefResolver) { + let referencesInNode = [], nodeReferenceDirectory = {}, mainKeys = {}, remoteRefContentMap = /* @__PURE__ */ new Map(), remoteRefSet = /* @__PURE__ */ new Set(), remoteRefResolutionPromises = []; + remoteRefResolver && traverseUtility(currentNode).forEach(function(property) { + if (property) { + let hasReferenceTypeKey; + hasReferenceTypeKey = Object.keys(property).find( + (key) => { + const isExternal = isExtURLRef(property, key), isReferenciable = isExternal; + return isReferenciable; + } + ); + if (hasReferenceTypeKey) { + const tempRef = calculatePath(parentFilename, property.$ref), isRefEncountered = remoteRefSet.has(tempRef); + if (isRefEncountered) { + return; + } + remoteRefResolutionPromises.push( + new Promise(async (resolveInner) => { + function convertToJSONString(content) { + if (typeof content === "object") { + return JSON.stringify(content); + } + const parsedFile = parseFile(content); + return JSON.stringify(parsedFile.oasObject); + } + try { + let contentFromRemote = await remoteRefResolver(property.$ref), nodeTemp = { + fileName: tempRef, + path: tempRef, + content: convertToJSONString(contentFromRemote), + href: property.$ref + }; + remoteRefContentMap.set(tempRef, contentFromRemote); + allData.push(nodeTemp); + } catch (err) { + } finally { + resolveInner(); + } + }) + ); + remoteRefSet.add(tempRef); + } + } + }); + await Promise.all(remoteRefResolutionPromises); + traverseUtility(currentNode).forEach(function(property) { + if (property) { + let hasReferenceTypeKey; + hasReferenceTypeKey = Object.keys(property).find( + (key) => { + const isLocalOutOfRoot = isOutOfRoot && isLocalRef(property, key), isExternal = isExtRef(property, key), isReferenciable = isLocalOutOfRoot || isExternal; + return isReferenciable; + } + ); + if (hasReferenceTypeKey) { + const tempRef = calculatePath(parentFilename, property.$ref), nodeTrace = handleLocalCollisions( + getTraceFromParentKeyInComponents(this, tempRef, mainKeys, version2, commonPathFromData), + rootMainKeys + ), componentKey = nodeTrace[nodeTrace.length - 1], referenceInDocument = getJsonPointerRelationToRoot( + tempRef, + nodeTrace, + version2 + ), traceToParent = [...this.parents.map((item) => { + return item.key; + }).filter((item) => { + return item !== void 0; + }), this.key]; + let newValue, [, local] = tempRef.split(localPointer), nodeFromData, refHasContent = false, parseResult, newRefInDoc, inline; + newValue = Object.assign({}, this.node); + nodeFromData = findNodeFromPath(tempRef, allData); + if (nodeFromData && nodeFromData.content) { + parseResult = parseFile(nodeFromData.content); + if (parseResult.result) { + newValue.$ref = referenceInDocument; + refHasContent = true; + nodeFromData.parsed = parseResult; + } + } + this.update({ $ref: tempRef }); + if (nodeTrace.length === 0) { + inline = true; + } + if (_2.isNil(globalReferences[tempRef])) { + nodeReferenceDirectory[tempRef] = { + local, + keyInComponents: nodeTrace, + node: newValue, + reference: inline ? newRefInDoc : referenceInDocument, + traceToParent, + parentNodeKey: parentFilename, + mainKeyInTrace: nodeTrace[nodeTrace.length - 1], + refHasContent, + inline + }; + } + mainKeys[componentKey] = tempRef; + if (!added(property.$ref, referencesInNode)) { + referencesInNode.push({ path: pathSolver(property), keyInComponents: nodeTrace, newValue: this.node }); + } + } + const hasRemoteReferenceTypeKey = Object.keys(property).find( + (key) => { + const isExternal = isExtURLRef(property, key), isReferenciable = isExternal && _2.isFunction(remoteRefResolver); + return isReferenciable; + } + ), handleRemoteURLReference = () => { + const tempRef = calculatePath(parentFilename, property.$ref); + if (remoteRefContentMap.get(tempRef) === void 0) { + return; + } + let nodeTrace = handleLocalCollisions( + getTraceFromParentKeyInComponents(this, tempRef, mainKeys, version2, commonPathFromData), + rootMainKeys + ), componentKey = nodeTrace[nodeTrace.length - 1], referenceInDocument = getJsonPointerRelationToRoot( + tempRef, + nodeTrace, + version2 + ), traceToParent = [...this.parents.map((item) => { + return item.key; + }).filter((item) => { + return item !== void 0; + }), this.key], newValue = Object.assign({}, this.node), [, local] = tempRef.split(localPointer), nodeFromData, refHasContent = false, parseResult, newRefInDoc, inline, contentFromRemote = remoteRefContentMap.get(tempRef), nodeTemp = { + fileName: tempRef, + path: tempRef, + content: contentFromRemote + }; + nodeFromData = nodeTemp; + if (nodeFromData && nodeFromData.content) { + parseResult = parseFile(JSON.stringify(nodeFromData.content)); + if (parseResult.result) { + newValue.$ref = referenceInDocument; + refHasContent = true; + nodeFromData.parsed = parseResult; + } + } + this.update({ $ref: tempRef }); + if (nodeTrace.length === 0) { + inline = true; + } + if (_2.isNil(globalReferences[tempRef])) { + nodeReferenceDirectory[tempRef] = { + local, + keyInComponents: nodeTrace, + node: newValue, + reference: inline ? newRefInDoc : referenceInDocument, + traceToParent, + parentNodeKey: parentFilename, + mainKeyInTrace: nodeTrace[nodeTrace.length - 1], + refHasContent, + inline + }; + } + mainKeys[componentKey] = tempRef; + if (!added(property.$ref, referencesInNode)) { + referencesInNode.push({ path: pathSolver(property), keyInComponents: nodeTrace, newValue: this.node }); + } + }; + if (hasRemoteReferenceTypeKey) { + handleRemoteURLReference(); + } + } + }); + return { referencesInNode, nodeReferenceDirectory }; + } + async function getNodeContentAndReferences(currentNode, allData, specRoot, version2, rootMainKeys, commonPathFromData, globalReferences, remoteRefResolver) { + let graphAdj = [], missingNodes = [], nodeContent, parseResult; + if (currentNode.parsed) { + nodeContent = currentNode.parsed.oasObject; + } else { + parseResult = parseFile(currentNode.content); + if (parseResult.result === false) { + return { graphAdj, missingNodes, undefined: void 0, nodeReferenceDirectory: {}, nodeName: currentNode.fileName }; + } + nodeContent = parseResult.oasObject; + } + const { referencesInNode, nodeReferenceDirectory } = await getReferences( + nodeContent, + currentNode.fileName !== specRoot.fileName, + removeLocalReferenceFromPath, + currentNode.fileName, + version2, + rootMainKeys, + commonPathFromData, + allData, + globalReferences, + remoteRefResolver + ); + referencesInNode.forEach((reference) => { + let referencePath = reference.path, adjacentNode = findNodeFromPath(calculatePath(currentNode.fileName, referencePath), allData); + if (adjacentNode) { + graphAdj.push(adjacentNode); + } else if (!comparePaths(referencePath, specRoot.fileName)) { + let calculatedPathForMissing = calculatePathMissing(currentNode.fileName, referencePath); + if (!calculatedPathForMissing.$ref) { + missingNodes.push({ path: calculatedPathForMissing.path }); + } else { + missingNodes.push({ $ref: calculatedPathForMissing.$ref, path: null }); + } + } + }); + return { graphAdj, missingNodes, nodeContent, nodeReferenceDirectory, nodeName: currentNode.fileName }; + } + function resolveJsonPointerInlineNodes(parents, key) { + let pointer = parents.filter((parent) => { + return parent !== void 0; + }).map((parent) => { + return parent.key; + }).join(jsonPointerLevelSeparator); + if (pointer) { + pointer = localPointer + pointer; + } else { + pointer += localPointer; + } + pointer += jsonPointerLevelSeparator + key; + return pointer; + } + function findReferenceByMainKeyInTraceFromContext(documentContext, mainKeyInTrace) { + let relatedRef = "", globalRef; + globalRef = Object.values(documentContext.globalReferences).find((item) => { + return item.mainKeyInTrace === mainKeyInTrace; + }); + if (globalRef) { + relatedRef = globalRef.reference; + } + return relatedRef; + } + function isCircularReference(traverseContext, contentFromTrace) { + return traverseContext.parents.find((parent) => { + return parent.node === contentFromTrace; + }) !== void 0; + } + function handleCircularReference(traverseContext, documentContext) { + let relatedRef = ""; + if (traverseContext.circular) { + relatedRef = findReferenceByMainKeyInTraceFromContext(documentContext, traverseContext.circular.key); + traverseContext.update({ $ref: relatedRef }); + } + if (traverseContext.keys && traverseContext.keys.includes(CIRCULAR_OR_REF_EXT_PROP)) { + traverseContext.update({ $ref: traverseContext.node[CIRCULAR_OR_REF_EXT_PROP] }); + } + } + function generateComponentsObject(documentContext, rootContent, refTypeResolver, components, version2, remoteRefResolver) { + let notInLine = Object.entries(documentContext.globalReferences).filter(([, value]) => { + return value.keyInComponents.length !== 0; + }), circularRefsSet = /* @__PURE__ */ new Set(); + const { COMPONENTS_KEYS } = getBundleRulesDataByVersion(version2); + notInLine.forEach(([key, value]) => { + let [nodeRef, partial] = key.split(localPointer); + if (documentContext.globalReferences[key].refHasContent) { + setValueInComponents( + value.keyInComponents, + components, + getContentFromTrace(documentContext.nodeContents[nodeRef], partial), + COMPONENTS_KEYS + ); + } + }); + [rootContent, components].forEach((contentData, index) => { + if (index === 1 && contentData.hasOwnProperty("$ref")) { + delete contentData.$ref; + } + traverseUtility(contentData).forEach(function(property) { + if (property) { + let hasReferenceTypeKey; + hasReferenceTypeKey = Object.keys(property).find( + (key) => { + return refTypeResolver(property, key); + } + ); + if (hasReferenceTypeKey) { + let tempRef = property.$ref, [nodeRef, local] = tempRef.split(localPointer), refData = documentContext.globalReferences[tempRef], isMissingNode = documentContext.missing.find((missingNode) => { + return missingNode.path === nodeRef; + }); + if (isMissingNode) { + refData.nodeContent = refData.node; + refData.local = false; + } else if (!refData) { + return; + } else if (!isExtRef(property, "$ref") && isExtURLRef(property, "$ref")) { + let splitPathByHttp = property.$ref.split(httpSeparator), prefix = splitPathByHttp.slice(0, splitPathByHttp.length - 1).join(httpSeparator) + httpSeparator + splitPathByHttp[splitPathByHttp.length - 1].split(localPointer)[0], separatedPaths = [prefix, splitPathByHttp[splitPathByHttp.length - 1].split(localPointer)[1]]; + nodeRef = separatedPaths[0]; + local = separatedPaths[1]; + refData.nodeContent = documentContext.nodeContents[nodeRef]; + const isReferenceRemoteURL = stringIsAValidUrl(nodeRef); + if (isReferenceRemoteURL && _2.isFunction(remoteRefResolver)) { + Object.keys(documentContext.nodeContents).forEach((key) => { + if (_2.startsWith(key, nodeRef) && !key.split(nodeRef)[1].includes(httpSeparator)) { + refData.nodeContent = documentContext.nodeContents[key]; + } + }); + } + } else { + refData.nodeContent = documentContext.nodeContents[nodeRef]; + } + if (local) { + let contentFromTrace = getContentFromTrace(refData.nodeContent, local); + if (!contentFromTrace) { + refData.nodeContent = { $ref: `${localPointer + local}` }; + } else if (isCircularReference(this, contentFromTrace)) { + if (refData.inline) { + refData.nodeContent = { [CIRCULAR_OR_REF_EXT_PROP]: tempRef }; + circularRefsSet.add(tempRef); + } else { + refData.node = { [CIRCULAR_OR_REF_EXT_PROP]: refData.reference }; + refData.nodeContent = contentFromTrace; + circularRefsSet.add(refData.reference); + } + } else { + refData.nodeContent = contentFromTrace; + } + } + if (refData.inline) { + let referenceSiblings = _2.omit(property, ["$ref"]), hasSiblings = !_2.isEmpty(referenceSiblings); + refData.node = hasSiblings ? _2.merge(referenceSiblings, refData.nodeContent) : refData.nodeContent; + documentContext.globalReferences[tempRef].reference = resolveJsonPointerInlineNodes(this.parents, this.key); + } else if (refData.refHasContent) { + setValueInComponents( + refData.keyInComponents, + components, + refData.nodeContent, + COMPONENTS_KEYS + ); + } + this.update(refData.node); + } + } + }); + }); + return { + resRoot: traverseUtility(rootContent).map(function() { + handleCircularReference(this, documentContext); + }), + newComponents: traverseUtility(components).map(function() { + handleCircularReference(this, documentContext); + }), + circularRefs: [...circularRefsSet] + }; + } + function generateComponentsWrapper(parsedOasObject, version2, nodesContent = {}) { + let components = _2.isNil(parsedOasObject.components) ? {} : parsedOasObject.components, componentsAreReferenced = components.$ref !== void 0 && !_2.isEmpty(nodesContent); + if (isSwagger(version2)) { + getBundleRulesDataByVersion(version2).COMPONENTS_KEYS.forEach((property) => { + if (parsedOasObject.hasOwnProperty(property)) { + components[property] = parsedOasObject[property]; + } + }); + } else if (parsedOasObject.hasOwnProperty("components")) { + if (componentsAreReferenced) { + components = _2.merge(parsedOasObject.components, nodesContent[components.$ref]); + delete components.$ref; + } + } + return components; + } + function getReferenceMap(globalReferences) { + const output = {}; + _2.forEach(globalReferences, (globalReference, refKey) => { + if (_2.isString(refKey) && _2.isString(globalReference.reference)) { + output[globalReference.reference] = { + path: refKey, + type: globalReference.inline ? "inline" : "component" + }; + } + }); + return output; + } + function getMainKeysFromComponents(components, version2) { + const { + COMPONENTS_KEYS + } = getBundleRulesDataByVersion(version2); + let componentsDictionary = {}; + COMPONENTS_KEYS.forEach((key) => { + if (components[key]) { + componentsDictionary[key] = Object.keys(components[key]); + } + }); + return componentsDictionary; + } + module2.exports = { + /** + * Takes in an spec root file and an array of data files + * Bundles the content of the files into one single file according to the + * json pointers ($ref) + * @param {object} specRoot - root file information + * @param {Array} allData - array of { path, content} objects + * @param {Array} origin - process origin (BROWSER or node) + * @param {string} version - The version we are using + * @param {function} remoteRefResolver - The function that would be called to fetch remote ref contents + * @returns {object} - Detect root files result object + */ + getBundleContentAndComponents: async function(specRoot, allData, origin, version2, remoteRefResolver) { + if (origin === BROWSER) { + path = pathBrowserify; + } + const initialComponents = generateComponentsWrapper( + specRoot.parsed.oasObject, + version2 + ), initialMainKeys = getMainKeysFromComponents(initialComponents, version2); + let algorithm = new DFS(), components = {}, commonPathFromData = "", finalElements = {}, rootContextData; + commonPathFromData = Utils.findCommonSubpath(allData.map((fileData) => { + return fileData.fileName; + })); + rootContextData = await algorithm.traverseAndBundle(specRoot, (currentNode, globalReferences) => { + return getNodeContentAndReferences( + currentNode, + allData, + specRoot, + version2, + initialMainKeys, + commonPathFromData, + globalReferences, + remoteRefResolver + ); + }); + components = generateComponentsWrapper( + specRoot.parsed.oasObject, + version2, + rootContextData.nodeContents + ); + finalElements = generateComponentsObject( + rootContextData, + rootContextData.nodeContents[specRoot.fileName], + isExtRemoteRef, + components, + version2, + remoteRefResolver + ); + return { + fileContent: finalElements.resRoot, + components: finalElements.newComponents, + fileName: specRoot.fileName, + referenceMap: getReferenceMap(rootContextData.globalReferences), + circularRefs: finalElements.circularRefs + }; + }, + getReferences, + parseFileOrThrow + }; + } +}); + +// ../../node_modules/openapi-to-postmanv2/lib/schemaUtils.js +var require_schemaUtils = __commonJS({ + "../../node_modules/openapi-to-postmanv2/lib/schemaUtils.js"(exports2, module2) { + var { formatDataPath, checkIsCorrectType, isKnownType } = require_schemaUtilsCommon(); + var { getConcreteSchemaUtils, isSwagger, validateSupportedVersion } = require_versionUtils(); + var async = require_async(); + var { Variable } = require_variable(); + var { QueryParam } = require_query_param(); + var { Header } = require_header(); + var { ItemGroup } = require_item_group(); + var { Item } = require_item(); + var { FormParam } = require_form_param(); + var { RequestAuth } = require_request_auth(); + var { Response } = require_response(); + var { RequestBody } = require_request_body(); + var schemaFaker = require_json_schema_faker(); + var deref = require_deref(); + var _2 = require_lodash(); + var xmlFaker = require_xmlSchemaFaker(); + var openApiErr = require_error(); + var ajvValidationError = require_ajvValidationError(); + var utils = require_utils2(); + var { Node, Trie } = require_trie(); + var { validateSchema } = require_ajvValidation(); + var inputValidation = require_inputValidation(); + var traverseUtility = require_legacy(); + var { ParseError } = require_ParseError(); + var SCHEMA_FORMATS = { + DEFAULT: "default", + // used for non-request-body data and json + XML: "xml" + // used for request-body XMLs + }; + var URLENCODED = "application/x-www-form-urlencoded"; + var APP_JSON = "application/json"; + var APP_JS = "application/javascript"; + var TEXT_XML = "text/xml"; + var APP_XML = "application/xml"; + var TEXT_PLAIN = "text/plain"; + var TEXT_HTML = "text/html"; + var FORM_DATA = "multipart/form-data"; + var REQUEST_TYPE = { + EXAMPLE: "EXAMPLE", + ROOT: "ROOT" + }; + var PARAMETER_SOURCE = { + REQUEST: "REQUEST", + RESPONSE: "RESPONSE" + }; + var HEADER_TYPE = { + JSON: "json", + XML: "xml", + INVALID: "invalid" + }; + var PREVIEW_LANGUAGE = { + JSON: "json", + XML: "xml", + TEXT: "text", + HTML: "html" + }; + var authMap = { + basicAuth: "basic", + bearerAuth: "bearer", + digestAuth: "digest", + hawkAuth: "hawk", + oAuth1: "oauth1", + oAuth2: "oauth2", + ntlmAuth: "ntlm", + awsSigV4: "awsv4", + normal: null + }; + var propNames = { + QUERYPARAM: "query parameter", + PATHVARIABLE: "path variable", + HEADER: "header", + BODY: "request body", + RESPONSE_HEADER: "response header", + RESPONSE_BODY: "response body" + }; + var PROCESSING_TYPE = { + VALIDATION: "VALIDATION", + CONVERSION: "CONVERSION" + }; + var FLOW_TYPE = { + authorizationCode: "authorization_code", + implicit: "implicit", + password: "password_credentials", + clientCredentials: "client_credentials" + }; + var METHODS = ["get", "put", "post", "delete", "options", "head", "patch", "trace"]; + var IMPLICIT_HEADERS = [ + "content-type", + // 'content-type' is defined based on content/media-type of req/res body, + "accept", + "authorization" + ]; + var crypto4 = require("crypto"); + var DEFAULT_SCHEMA_UTILS = require_schemaUtils30X(); + var { getRelatedFiles } = require_relatedFiles(); + var { compareVersion } = require_versionUtils(); + var parse2 = require_parse(); + var { getBundleContentAndComponents, parseFileOrThrow } = require_bundle(); + var MULTI_FILE_API_TYPE_ALLOWED_VALUE = "multiFile"; + var MEDIA_TYPE_ALL_RANGES = "*/*"; + schemaFaker.option({ + requiredOnly: false, + optionalsProbability: 1, + // always add optional fields + maxLength: 256, + minItems: 1, + // for arrays + maxItems: 20, + // limit on maximum number of items faked for (type: arrray) + useDefaultValue: true, + ignoreMissingRefs: true, + avoidExampleItemsLength: true + // option to avoid validating type array schema example's minItems and maxItems props. + }); + function hash(input) { + return crypto4.createHash("sha1").update(input).digest("base64"); + } + function verifyDeprecatedProperties(resolvedSchema, includeDeprecated) { + traverseUtility(resolvedSchema.properties).forEach(function(property) { + if (property && typeof property === "object") { + if (property.deprecated === true && includeDeprecated === false) { + this.delete(); + } + } + }); + } + function getXmlVersionContent(bodyContent) { + bodyContent = typeof bodyContent === "string" ? bodyContent : ""; + const regExp = new RegExp('([<\\?xml]+[\\s{1,}]+[version="\\d.\\d"]+[\\sencoding="]+.{1,15}"\\?>)'); + let xmlBody = bodyContent; + if (!bodyContent.match(regExp)) { + const versionContent = '\n'; + xmlBody = versionContent + xmlBody; + } + return xmlBody; + } + function safeSchemaFaker(oldSchema, resolveTo, resolveFor, parameterSourceOption, components, schemaFormat, schemaCache, options) { + var prop, key, resolvedSchema, fakedSchema, schemaFakerCache = _2.get(schemaCache, "schemaFakerCache", {}); + let concreteUtils = components && components.hasOwnProperty("concreteUtils") ? components.concreteUtils : DEFAULT_SCHEMA_UTILS; + const indentCharacter = options.indentCharacter, includeDeprecated = options.includeDeprecated; + resolvedSchema = deref.resolveRefs(oldSchema, parameterSourceOption, components, { + resolveFor, + resolveTo, + stackLimit: options.stackLimit, + analytics: _2.get(schemaCache, "analytics", {}) + }); + resolvedSchema = concreteUtils.fixExamplesByVersion(resolvedSchema); + key = JSON.stringify(resolvedSchema); + if (resolveTo === "schema") { + key = "resolveToSchema " + key; + schemaFaker.option({ + useExamplesValue: false, + useDefaultValue: true + }); + } else if (resolveTo === "example") { + key = "resolveToExample " + key; + schemaFaker.option({ + useExamplesValue: true + }); + } + if (resolveFor === PROCESSING_TYPE.VALIDATION) { + schemaFaker.option({ + useDefaultValue: false, + avoidExampleItemsLength: false + }); + } + if (schemaFormat === "xml") { + key += " schemaFormatXML"; + } else { + key += " schemaFormatDEFAULT"; + } + key = hash(key); + if (schemaFakerCache[key]) { + return schemaFakerCache[key]; + } + if (resolvedSchema.properties) { + for (prop in resolvedSchema.properties) { + if (resolvedSchema.properties.hasOwnProperty(prop)) { + if (resolvedSchema.properties[prop].format === "binary") { + delete resolvedSchema.properties[prop].format; + } + } + } + verifyDeprecatedProperties(resolvedSchema, includeDeprecated); + } + try { + if (schemaFormat === SCHEMA_FORMATS.XML) { + fakedSchema = xmlFaker(null, resolvedSchema, indentCharacter, resolveTo); + schemaFakerCache[key] = fakedSchema; + return fakedSchema; + } + fakedSchema = schemaFaker(resolvedSchema, null, _2.get(schemaCache, "schemaValidationCache")); + schemaFakerCache[key] = fakedSchema; + return fakedSchema; + } catch (e) { + console.warn( + "Error faking a schema. Not faking this schema. Schema:", + resolvedSchema, + "Error", + e + ); + return null; + } + } + function shouldAddDeprecatedOperation(operation, options) { + if (typeof operation === "object") { + return !operation.deprecated || operation.deprecated === true && options.includeDeprecated === true; + } + return false; + } + module2.exports = { + safeSchemaFaker, + /** + * Analyzes the spec to determine the size of the spec, + * number of request that will be generated out this spec, and + * number or references present in the spec. + * + * @param {Object} spec JSON + * @return {Object} returns number of requests that will be generated, + * number of refs present and size of the spec. + */ + analyzeSpec: function(spec) { + var size, numberOfRefs = 0, numberOfExamples = 0, specString, numberOfRequests = 0; + specString = JSON.stringify(spec); + size = Buffer.byteLength(specString, "utf8") / (1024 * 1024); + if (size < 8) { + if (_2.isObject(spec.paths)) { + Object.values(spec.paths).forEach((value) => { + _2.keys(value).forEach((key) => { + if (METHODS.includes(key)) { + numberOfRequests++; + } + }); + }); + } + numberOfRefs = (specString.match(/\$ref/g) || []).length; + numberOfExamples = (specString.match(/example/g) || []).length; + } + return { + size, + numberOfRefs, + numberOfRequests, + numberOfExamples + }; + }, + /** Determines the complexity score and stackLimit + * + * @param {Object} analysis the object returned by analyzeSpec function + * @param {Object} options Current options + * + * @returns {Object} computedOptions - contains two new options i.e. stackLimit and complexity score + */ + determineOptions: function(analysis, options) { + let size = analysis.size, numberOfRefs = analysis.numberOfRefs, numberOfRequests = analysis.numberOfRequests; + var computedOptions = _2.clone(options); + computedOptions.stackLimit = 10; + computedOptions.complexityScore = 0; + if (size >= 8) { + console.warn("Complexity score = 10"); + computedOptions.stackLimit = 2; + computedOptions.complexityScore = 10; + return computedOptions; + } else if (size >= 5 || numberOfRequests > 1500 || numberOfRefs > 1500) { + computedOptions.stackLimit = 3; + computedOptions.complexityScore = 9; + return computedOptions; + } else if (size >= 1 && (numberOfRequests > 1e3 || numberOfRefs > 1e3)) { + computedOptions.stackLimit = 5; + computedOptions.complexityScore = 8; + return computedOptions; + } else if (numberOfRefs > 500 || numberOfRequests > 500) { + computedOptions.stackLimit = 6; + computedOptions.complexityScore = 6; + return computedOptions; + } + return computedOptions; + }, + /** + * Changes the {} around scheme and path variables to :variable + * @param {string} url - the url string + * @returns {string} string after replacing /{pet}/ with /:pet/ + */ + fixPathVariablesInUrl: function(url) { + if (typeof url !== "string") { + return ""; + } + let replacer = function(match, p1, offset, string) { + if (string[offset - 1] === "{" && string[offset + match.length + 1] !== "}") { + return match; + } + return "{" + p1 + "}"; + }; + return _2.isString(url) ? url.replace(/(\{[^\/\{\}]+\})/g, replacer) : ""; + }, + /** + * Changes path structure that contains {var} to :var and '/' to '_' + * This is done so generated collection variable is in correct format + * i.e. variable '{{item/{itemId}}}' is considered separates variable in URL by collection sdk + * @param {string} path - path defined in openapi spec + * @returns {string} - string after replacing {itemId} with :itemId + */ + fixPathVariableName: function(path) { + return path.replace(/\//g, "-").replace(/[{}]/g, "") + "-Url"; + }, + /** + * Returns a description that's usable at the collection-level + * Adds the collection description and uses any relevant contact info + * @param {*} openapi The JSON representation of the OAS spec + * @returns {string} description + */ + getCollectionDescription: function(openapi) { + let description = _2.get(openapi, "info.description", ""); + if (_2.get(openapi, "info.contact")) { + let contact = []; + if (openapi.info.contact.name) { + contact.push(" Name: " + openapi.info.contact.name); + } + if (openapi.info.contact.email) { + contact.push(" Email: " + openapi.info.contact.email); + } + if (contact.length > 0) { + if (description !== "") { + description += "\n\n"; + } + description += "Contact Support:\n" + contact.join("\n"); + } + } + return description; + }, + /** + * Get the format of content type header + * @param {string} cTypeHeader - the content type header string + * @returns {string} type of content type header + */ + getHeaderFamily: function(cTypeHeader) { + let mediaType = this.parseMediaType(cTypeHeader); + if (mediaType.type === "application" && (mediaType.subtype === "json" || _2.endsWith(mediaType.subtype, "+json"))) { + return HEADER_TYPE.JSON; + } + if ((mediaType.type === "application" || mediaType.type === "text") && (mediaType.subtype === "xml" || _2.endsWith(mediaType.subtype, "+xml"))) { + return HEADER_TYPE.XML; + } + return HEADER_TYPE.INVALID; + }, + /** + * Gets the description of the parameter. + * If the parameter is required, it prepends a `(Requried)` before the parameter description + * If the parameter type is enum, it appends the possible enum values + * @param {object} parameter - input param for which description needs to be returned + * @returns {string} description of the parameters + */ + getParameterDescription: function(parameter) { + if (!_2.isObject(parameter)) { + return ""; + } + return (parameter.required ? "(Required) " : "") + (parameter.description || "") + (parameter.enum ? " (This can only be one of " + parameter.enum + ")" : ""); + }, + /** + * Given parameter objects, it assigns example/examples of parameter object as schema example. + * + * @param {Object} parameter - parameter object + * @returns {null} - null + */ + assignParameterExamples: function(parameter) { + let example = _2.get(parameter, "example"), examples = _2.values(_2.get(parameter, "examples")); + if (example !== void 0) { + _2.set(parameter, "schema.example", example); + } else if (examples) { + let exampleToUse = _2.get(examples, "[0].value"); + !_2.isUndefined(exampleToUse) && _2.set(parameter, "schema.example", exampleToUse); + } + }, + /** + * Converts the necessary server variables to the + * something that can be added to the collection + * TODO: Figure out better description + * @param {object} serverVariables - Object containing the server variables at the root/path-item level + * @param {string} keyName - an additional key to add the serverUrl to the variable list + * @param {string} serverUrl - URL from the server object + * @returns {object} modified collection after the addition of the server variables + */ + convertToPmCollectionVariables: function(serverVariables, keyName, serverUrl = "") { + var variables = []; + if (serverVariables) { + _2.forOwn(serverVariables, (value, key) => { + let description = this.getParameterDescription(value); + variables.push(new Variable({ + key, + value: value.default || "", + description + })); + }); + } + if (keyName) { + variables.push(new Variable({ + key: keyName, + value: serverUrl, + type: "string" + })); + } + return variables; + }, + /** + * Returns params applied to specific operation with resolved references. Params from parent + * blocks (collection/folder) are merged, so that the request has a flattened list of params needed. + * OperationParams take precedence over pathParams + * @param {array} operationParam operation (Postman request)-level params. + * @param {array} pathParam are path parent-level params. + * @param {object} components - components defined in the OAS spec. These are used to + * resolve references while generating params. + * @param {object} options - a standard list of options that's globally passed around. Check options.js for more. + * @returns {*} combined requestParams from operation and path params. + */ + getRequestParams: function(operationParam, pathParam, components, options) { + if (!Array.isArray(operationParam)) { + operationParam = []; + } + if (!Array.isArray(pathParam)) { + pathParam = []; + } + pathParam.forEach((param, index, arr) => { + if (_2.has(param, "$ref")) { + arr[index] = this.getRefObject(param.$ref, components, options); + } + }); + operationParam.forEach((param, index, arr) => { + if (_2.has(param, "$ref")) { + arr[index] = this.getRefObject(param.$ref, components, options); + } + }); + if (_2.isEmpty(pathParam)) { + return operationParam; + } else if (_2.isEmpty(operationParam)) { + return pathParam; + } + var reqParam = operationParam.slice(); + pathParam.forEach((param) => { + var dupParam = operationParam.find(function(element) { + return element.name === param.name && element.in === param.in && // the below two conditions because undefined === undefined returns true + element.name && param.name && element.in && param.in; + }); + if (!dupParam) { + reqParam.push(param); + } + }); + return reqParam; + }, + /** + * Generates a Trie-like folder structure from the root path object of the OpenAPI specification. + * @param {Object} spec - specification in json format + * @param {object} options - a standard list of options that's globally passed around. Check options.js for more. + * @param {boolean} fromWebhooks - true when we are creating the webhooks group trie - default: false + * @returns {Object} - The final object consists of the tree structure + */ + generateTrieFromPaths: function(spec, options, fromWebhooks = false) { + let concreteUtils = getConcreteSchemaUtils({ type: "json", data: spec }), specComponentsAndUtils = { + concreteUtils + }; + var paths = fromWebhooks ? spec.webhooks : spec.paths, currentPath = "", currentPathObject = "", commonParams = "", collectionVariables = {}, operationItem, pathLevelServers = "", pathLength, currentPathRequestCount, currentNode, i, summary, path, pathMethods = [], trie = new Trie(new Node({ + name: "/" + })), getPathMethods = function(pathKeys) { + var methods = []; + pathKeys && pathKeys.forEach(function(element) { + if (METHODS.includes(element)) { + methods.push(element); + } + }); + return methods; + }; + Object.assign(specComponentsAndUtils, concreteUtils.getRequiredData(spec)); + for (path in paths) { + if (paths.hasOwnProperty(path) && typeof paths[path] === "object" && paths[path]) { + currentPathObject = paths[path]; + if (path[0] === "/") { + path = path.substring(1); + } + if (fromWebhooks) { + currentPath = path === "" ? ["(root)"] : [path]; + } else { + currentPath = path === "" ? ["(root)"] : path.split("/").filter((pathItem) => { + return pathItem !== ""; + }); + } + pathLength = currentPath.length; + pathMethods = getPathMethods(_2.keys(currentPathObject)); + currentPathRequestCount = pathMethods.length; + currentNode = trie.root; + for (i = 0; i < pathLength; i++) { + if (!(typeof currentNode.children === "object" && currentNode.children.hasOwnProperty(currentPath[i]))) { + currentNode.addChildren(currentPath[i], new Node({ + name: currentPath[i], + requestCount: 0, + requests: [], + children: {}, + type: "item-group", + childCount: 0 + })); + currentNode.childCount += 1; + } + currentNode.children[currentPath[i]].requestCount += currentPathRequestCount; + currentNode = currentNode.children[currentPath[i]]; + } + if (currentPathObject.hasOwnProperty("parameters")) { + commonParams = currentPathObject.parameters; + } + if (currentPathObject.hasOwnProperty("servers")) { + pathLevelServers = currentPathObject.servers; + collectionVariables[this.fixPathVariableName(path)] = pathLevelServers[0]; + delete currentPathObject.servers; + } + _2.each(pathMethods, (method) => { + operationItem = currentPathObject[method] || {}; + operationItem.parameters = this.getRequestParams( + operationItem.parameters, + commonParams, + specComponentsAndUtils, + options + ); + summary = operationItem.summary || operationItem.description; + _2.isFunction(currentNode.addMethod) && currentNode.addMethod({ + name: summary, + method, + path, + properties: operationItem, + type: "item", + servers: pathLevelServers || void 0 + }); + currentNode.childCount += 1; + }); + pathLevelServers = void 0; + commonParams = []; + } + } + return { + tree: trie, + variables: collectionVariables + // server variables that are to be converted into collection variables. + }; + }, + addCollectionItemsFromWebhooks: function(spec, generatedStore, components, options, schemaCache) { + let webhooksObj = this.generateTrieFromPaths(spec, options, true), webhooksTree = webhooksObj.tree, webhooksFolder = new ItemGroup({ name: "Webhooks" }), variableStore = {}, webhooksVariables = []; + if (_2.keys(webhooksTree.root.children).length === 0) { + return; + } + for (let child in webhooksTree.root.children) { + if (webhooksTree.root.children.hasOwnProperty(child) && webhooksTree.root.children[child].requestCount > 0) { + webhooksVariables.push(new Variable({ + key: this.cleanWebhookName(child), + value: "/", + type: "string" + })); + webhooksFolder.items.add( + this.convertChildToItemGroup( + spec, + webhooksTree.root.children[child], + components, + options, + schemaCache, + variableStore, + true + ) + ); + } + } + generatedStore.collection.items.add(webhooksFolder); + webhooksVariables.forEach((variable) => { + generatedStore.collection.variables.add(variable); + }); + }, + /** + * Adds Postman Collection Items using paths. + * Folders are grouped based on trie that's generated using all paths. + * + * @param {object} spec - openAPI spec object + * @param {object} generatedStore - the store that holds the generated collection. Modified in-place + * @param {object} components - components defined in the OAS spec. These are used to + * resolve references while generating params. + * @param {object} options - a standard list of options that's globally passed around. Check options.js for more. + * @param {object} schemaCache - object storing schemaFaker and schmeResolution caches + * @returns {void} - generatedStore is modified in-place + */ + addCollectionItemsUsingPaths: function(spec, generatedStore, components, options, schemaCache) { + var folderTree, folderObj, child, key, variableStore = {}; + folderObj = this.generateTrieFromPaths(spec, options); + folderTree = folderObj.tree; + if (folderObj.variables) { + _2.forOwn(folderObj.variables, (server, key2) => { + this.convertToPmCollectionVariables( + server.variables, + // these are path variables in the server block + key2, + // the name of the variable + this.fixPathVariablesInUrl(server.url) + ).forEach((element) => { + generatedStore.collection.variables.add(element); + }); + }); + } + for (child in folderTree.root.children) { + if (folderTree.root.children.hasOwnProperty(child) && folderTree.root.children[child].requestCount > 0) { + generatedStore.collection.items.add( + this.convertChildToItemGroup( + spec, + folderTree.root.children[child], + components, + options, + schemaCache, + variableStore + ) + ); + } + } + for (key in variableStore) { + if (variableStore[key].type === "collection") { + const collectionVar = new Variable(variableStore[key]); + generatedStore.collection.variables.add(collectionVar); + } + } + }, + /** + * Adds Postman Collection Items using tags. + * Each tag from OpenAPI tags object is mapped to a collection item-group (Folder), and all operation that has + * corresponding tag in operation object's tags array is included in mapped item-group. + * + * @param {object} spec - openAPI spec object + * @param {object} generatedStore - the store that holds the generated collection. Modified in-place + * @param {object} components - components defined in the OAS spec. These are used to + * resolve references while generating params. + * @param {object} options - a standard list of options that's globally passed around. Check options.js for more. + * @param {object} schemaCache - object storing schemaFaker and schmeResolution caches + * @returns {object} returns an object containing objects of tags and their requests + */ + addCollectionItemsUsingTags: function(spec, generatedStore, components, options, schemaCache) { + var globalTags = spec.tags || [], paths = spec.paths || {}, pathMethods, variableStore = {}, tagFolders = {}; + _2.forEach(globalTags, (globalTag) => { + tagFolders[globalTag.name] = { + description: _2.get(globalTag, "description", ""), + requests: [] + }; + }); + _2.forEach(paths, (currentPathObject, path) => { + var commonParams = [], collectionVariables, pathLevelServers = ""; + if (path[0] === "/") { + path = path.substring(1); + } + if (currentPathObject.hasOwnProperty("parameters")) { + commonParams = currentPathObject.parameters; + } + if (currentPathObject.hasOwnProperty("servers")) { + pathLevelServers = currentPathObject.servers; + collectionVariables = this.convertToPmCollectionVariables( + pathLevelServers[0].variables, + // these are path variables in the server block + this.fixPathVariableName(path), + // the name of the variable + this.fixPathVariablesInUrl(pathLevelServers[0].url) + ); + _2.forEach(collectionVariables, (collectionVariable) => { + generatedStore.collection.variables.add(collectionVariable); + }); + delete currentPathObject.servers; + } + pathMethods = _2.filter(_2.keys(currentPathObject), (key) => { + return _2.includes(METHODS, key); + }); + _2.forEach(pathMethods, (pathMethod) => { + var summary, operationItem = currentPathObject[pathMethod] || {}, localTags = operationItem.tags; + operationItem.parameters = this.getRequestParams( + operationItem.parameters, + commonParams, + components, + options + ); + summary = operationItem.summary || operationItem.description; + if (_2.isEmpty(localTags)) { + let tempRequest = { + name: summary, + method: pathMethod, + path, + properties: operationItem, + type: "item", + servers: pathLevelServers || void 0 + }; + if (shouldAddDeprecatedOperation(tempRequest.properties, options)) { + generatedStore.collection.items.add(this.convertRequestToItem( + spec, + tempRequest, + components, + options, + schemaCache, + variableStore + )); + } + } else { + _2.forEach(localTags, (localTag) => { + if (!_2.has(tagFolders, localTag)) { + tagFolders[localTag] = { + description: "", + requests: [] + }; + } + tagFolders[localTag].requests.push({ + name: summary, + method: pathMethod, + path, + properties: operationItem, + type: "item", + servers: pathLevelServers || void 0 + }); + }); + } + }); + }); + _2.forEachRight(tagFolders, (tagFolder, tagName) => { + var itemGroup = new ItemGroup({ + name: tagName, + description: tagFolder.description + }); + _2.forEach(tagFolder.requests, (request) => { + if (shouldAddDeprecatedOperation(request.properties, options)) { + itemGroup.items.add( + this.convertRequestToItem(spec, request, components, options, schemaCache, variableStore) + ); + } + }); + generatedStore.collection.items.prepend(itemGroup); + }); + _2.forEach(variableStore, (variable) => { + if (variable.type === "collection") { + const collectionVar = new Variable(variable); + generatedStore.collection.variables.add(collectionVar); + } + }); + }, + /** + * Generates an array of SDK Variables from the common and provided path vars + * @param {string} type - Level at the tree root/path level. Can be method/root/param. + * method: request(operation)-level, root: spec-level, param: url-level + * @param {Array} providedPathVars - Array of path variables + * @param {object|array} commonPathVars - Object of path variables taken from the specification + * @param {object} components - components defined in the OAS spec. These are used to + * resolve references while generating params. + * @param {object} options - a standard list of options that's globally passed around. Check options.js for more. + * @param {object} schemaCache - object storing schemaFaker and schmeResolution caches + * @returns {Array} returns an array of Collection SDK Variable + */ + convertPathVariables: function(type, providedPathVars, commonPathVars, components, options, schemaCache) { + var variables = []; + if (type === "root" || type === "method") { + _2.forOwn(commonPathVars, (value, key) => { + let description = this.getParameterDescription(value); + variables.push({ + key, + value: type === "root" ? "{{" + key + "}}" : value.default, + description + }); + }); + } else { + _2.forEach(commonPathVars, (variable) => { + let fakedData, convertedPathVar; + this.assignParameterExamples(variable); + fakedData = options.schemaFaker ? safeSchemaFaker( + variable.schema || {}, + options.requestParametersResolution, + PROCESSING_TYPE.CONVERSION, + PARAMETER_SOURCE.REQUEST, + components, + SCHEMA_FORMATS.DEFAULT, + schemaCache, + options + ) : ""; + convertedPathVar = this.convertParamsWithStyle( + variable, + fakedData, + PARAMETER_SOURCE.REQUEST, + components, + schemaCache, + options + ); + variables = _2.concat(variables, convertedPathVar); + }); + } + return _2.concat(variables, providedPathVars); + }, + /** + * convert childItem from OpenAPI to Postman itemGroup if requestCount(no of requests inside childitem)>1 + * otherwise return postman request + * @param {*} openapi object with root-level data like pathVariables baseurl + * @param {*} child object is of type itemGroup or request + * resolve references while generating params. + * @param {object} components - components defined in the OAS spec. These are used to + * resolve references while generating params. + * @param {object} options - a standard list of options that's globally passed around. Check options.js for more. + * @param {object} schemaCache - object storing schemaFaker and schmeResolution caches + * @param {object} variableStore - array for storing collection variables + * @param {boolean} fromWebhooks - true if we are processing the webhooks group, false by default + * @returns {*} Postman itemGroup or request + * @no-unit-test + */ + convertChildToItemGroup: function(openapi, child, components, options, schemaCache, variableStore, fromWebhooks = false) { + var resource = child, itemGroup, subChild, i, requestCount; + if (resource.requestCount > 1) { + itemGroup = new ItemGroup({ + name: resource.name + // TODO: have to add auth here (but first, auth to be put into the openapi tree) + }); + if (resource.childCount === 1 && options.collapseFolders) { + let subChild2 = _2.keys(resource.children)[0], resourceSubChild = resource.children[subChild2]; + resourceSubChild.name = resource.name + "/" + resourceSubChild.name; + return this.convertChildToItemGroup( + openapi, + resourceSubChild, + components, + options, + schemaCache, + variableStore, + fromWebhooks + ); + } + for (i = 0, requestCount = resource.requests.length; i < requestCount; i++) { + if (shouldAddDeprecatedOperation(resource.requests[i].properties, options)) { + itemGroup.items.add( + this.convertRequestToItem( + openapi, + resource.requests[i], + components, + options, + schemaCache, + variableStore, + fromWebhooks + ) + ); + } + } + for (subChild in resource.children) { + if (resource.children.hasOwnProperty(subChild) && resource.children[subChild].requestCount > 0) { + itemGroup.items.add( + this.convertChildToItemGroup( + openapi, + resource.children[subChild], + components, + options, + schemaCache, + variableStore, + fromWebhooks + ) + ); + } + } + return itemGroup; + } + if (resource.requests.length === 1) { + if (shouldAddDeprecatedOperation(resource.requests[0].properties, options)) { + return this.convertRequestToItem( + openapi, + resource.requests[0], + components, + options, + schemaCache, + variableStore, + fromWebhooks + ); + } + } + for (subChild in resource.children) { + if (resource.children.hasOwnProperty(subChild) && resource.children[subChild].requestCount === 1) { + return this.convertChildToItemGroup( + openapi, + resource.children[subChild], + components, + options, + schemaCache, + variableStore, + fromWebhooks + ); + } + } + }, + /** + * Gets helper object based on the root spec and the operation.security object + * @param {*} openapi - the json object representing the OAS spec + * @param {Array} securitySet - the security object at an operation level + * @returns {object} The authHelper to use while constructing the Postman Request. This is + * not directly supported in the SDK - the caller needs to determine the header/body based on the return + * value + * @no-unit-test + */ + getAuthHelper: function(openapi, securitySet) { + var securityDef, helper; + if (!securitySet || Array.isArray(securitySet) && securitySet.length === 0) { + return null; + } + _2.forEach(securitySet, (security) => { + if (_2.isObject(security) && _2.isEmpty(security)) { + helper = { + type: "noauth" + }; + return false; + } + securityDef = _2.get(openapi, ["securityDefs", _2.keys(security)[0]]); + if (!_2.isObject(securityDef)) { + return; + } else if (securityDef.type === "http") { + if (_2.toLower(securityDef.scheme) === "basic") { + helper = { + type: "basic", + basic: [ + { key: "username", value: "{{basicAuthUsername}}" }, + { key: "password", value: "{{basicAuthPassword}}" } + ] + }; + } else if (_2.toLower(securityDef.scheme) === "bearer") { + helper = { + type: "bearer", + bearer: [{ key: "token", value: "{{bearerToken}}" }] + }; + } else if (_2.toLower(securityDef.scheme) === "digest") { + helper = { + type: "digest", + digest: [ + { key: "username", value: "{{digestAuthUsername}}" }, + { key: "password", value: "{{digestAuthPassword}}" }, + { key: "realm", value: "{{realm}}" } + ] + }; + } else if (_2.toLower(securityDef.scheme) === "oauth" || _2.toLower(securityDef.scheme) === "oauth1") { + helper = { + type: "oauth1", + oauth1: [ + { key: "consumerSecret", value: "{{consumerSecret}}" }, + { key: "consumerKey", value: "{{consumerKey}}" }, + { key: "addParamsToHeader", value: true } + ] + }; + } + } else if (securityDef.type === "oauth2") { + let flowObj, currentFlowType; + helper = { + type: "oauth2", + oauth2: [] + }; + if (_2.isObject(securityDef.flows) && FLOW_TYPE[_2.keys(securityDef.flows)[0]]) { + currentFlowType = FLOW_TYPE[_2.keys(securityDef.flows)[0]]; + flowObj = _2.get(securityDef, `flows.${_2.keys(securityDef.flows)[0]}`); + } + if (currentFlowType) { + if (!_2.isEmpty(flowObj.scopes)) { + helper.oauth2.push({ + key: "scope", + value: _2.keys(flowObj.scopes).join(" ") + }); + } + if (!_2.isEmpty(flowObj.refreshUrl)) { + helper.oauth2.push({ + key: "redirect_uri", + value: _2.isString(flowObj.refreshUrl) ? flowObj.refreshUrl : "{{oAuth2CallbackURL}}" + }); + } + if (currentFlowType !== FLOW_TYPE.implicit) { + if (!_2.isEmpty(flowObj.tokenUrl)) { + helper.oauth2.push({ + key: "accessTokenUrl", + value: _2.isString(flowObj.tokenUrl) ? flowObj.tokenUrl : "{{oAuth2AccessTokenURL}}" + }); + } + } + if (currentFlowType !== FLOW_TYPE.password && currentFlowType !== FLOW_TYPE.clientCredentials) { + if (!_2.isEmpty(flowObj.authorizationUrl)) { + helper.oauth2.push({ + key: "authUrl", + value: _2.isString(flowObj.authorizationUrl) ? flowObj.authorizationUrl : "{{oAuth2AuthURL}}" + }); + } + } + helper.oauth2.push({ + key: "grant_type", + value: currentFlowType + }); + } + } else if (securityDef.type === "apiKey") { + helper = { + type: "apikey", + apikey: [ + { + key: "key", + value: _2.isString(securityDef.name) ? securityDef.name : "{{apiKeyName}}" + }, + { key: "value", value: "{{apiKey}}" }, + { + key: "in", + value: _2.includes(["query", "header"], securityDef.in) ? securityDef.in : "header" + } + ] + }; + } + if (!_2.isEmpty(helper)) { + return false; + } + }); + return helper; + }, + /** + * Generates appropriate collection element based on parameter location + * + * @param {Object} param - Parameter object habing key, value and description (optional) + * @param {String} location - Parameter location ("in" property of OAS defined parameter object) + * @returns {Object} - SDK element + */ + generateSdkParam: function(param, location2) { + const sdkElementMap = { + "query": QueryParam, + "header": Header, + "path": Variable + }; + let generatedParam = { + key: param.key, + value: param.value + }; + _2.has(param, "disabled") && (generatedParam.disabled = param.disabled); + if (sdkElementMap[location2]) { + generatedParam = new sdkElementMap[location2](generatedParam); + } + param.description && (generatedParam.description = param.description); + return generatedParam; + }, + /** + * Generates Auth helper for response, params (query, headers) in helper object is added in + * request (originalRequest) part of example. + * + * @param {*} requestAuthHelper - Auth helper object of corresponding request + * @returns {Object} - Response Auth helper object containing params to be added + */ + getResponseAuthHelper: function(requestAuthHelper) { + var responseAuthHelper = { + query: [], + header: [] + }, getValueFromHelper = function(authParams, keyName) { + return _2.find(authParams, { key: keyName }).value; + }, paramLocation, description; + if (!_2.isObject(requestAuthHelper)) { + return responseAuthHelper; + } + description = "Added as a part of security scheme: " + requestAuthHelper.type; + switch (requestAuthHelper.type) { + case "apikey": + paramLocation = getValueFromHelper(requestAuthHelper.apikey, "in"); + responseAuthHelper[paramLocation].push({ + key: getValueFromHelper(requestAuthHelper.apikey, "key"), + value: "", + description + }); + break; + case "basic": + responseAuthHelper.header.push({ + key: "Authorization", + value: "Basic ", + description + }); + break; + case "bearer": + responseAuthHelper.header.push({ + key: "Authorization", + value: "Bearer ", + description + }); + break; + case "digest": + responseAuthHelper.header.push({ + key: "Authorization", + value: "Digest ", + description + }); + break; + case "oauth1": + responseAuthHelper.header.push({ + key: "Authorization", + value: "OAuth ", + description + }); + break; + case "oauth2": + responseAuthHelper.header.push({ + key: "Authorization", + value: "", + description + }); + break; + default: + break; + } + return responseAuthHelper; + }, + /** + * Converts a 'content' object into Postman response body. Any content-type header determined + * from the body is returned as well + * @param {*} contentObj response content - this is the content property of the response body + * https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#responseObject + * @param {object} components - components defined in the OAS spec. These are used to + * resolve references while generating params. + * @param {object} options - a standard list of options that's globally passed around. Check options.js for more. + * @param {object} schemaCache - object storing schemaFaker and schmeResolution caches + * @return {object} responseBody, contentType header needed + */ + convertToPmResponseBody: function(contentObj, components, options, schemaCache) { + var responseBody, cTypeHeader, hasComputedType, cTypes, headerFamily, isJsonLike = false; + if (!contentObj) { + return { + contentTypeHeader: null, + responseBody: "" + }; + } + let headers = _2.keys(contentObj); + for (let i = 0; i < headers.length; i++) { + let headerFamily2 = this.getHeaderFamily(headers[i]); + if (headerFamily2 !== HEADER_TYPE.INVALID) { + cTypeHeader = headers[i]; + hasComputedType = true; + if (headerFamily2 === HEADER_TYPE.JSON) { + break; + } + } + } + if (!hasComputedType) { + cTypes = _2.keys(contentObj); + if (cTypes.length > 0) { + cTypeHeader = cTypes[0]; + hasComputedType = true; + } else { + return { + contentTypeHeader: null, + responseBody: "" + }; + } + } + headerFamily = this.getHeaderFamily(cTypeHeader); + responseBody = this.convertToPmBodyData( + contentObj[cTypeHeader], + REQUEST_TYPE.EXAMPLE, + cTypeHeader, + PARAMETER_SOURCE.RESPONSE, + options.indentCharacter, + components, + options, + schemaCache + ); + if (headerFamily === HEADER_TYPE.JSON) { + responseBody = JSON.stringify(responseBody, null, options.indentCharacter); + } else if (cTypeHeader === TEXT_XML || cTypeHeader === APP_XML || headerFamily === HEADER_TYPE.XML) { + responseBody = getXmlVersionContent(responseBody); + } else if (typeof responseBody !== "string") { + if (cTypeHeader === MEDIA_TYPE_ALL_RANGES) { + if (!_2.isObject(responseBody) && _2.isFunction(_2.get(responseBody, "toString"))) { + responseBody = responseBody.toString(); + } else { + responseBody = JSON.stringify(responseBody, null, options.indentCharacter); + isJsonLike = true; + } + } else { + responseBody = ""; + } + } + return { + contentTypeHeader: cTypeHeader, + responseBody, + isJsonLike + }; + }, + /** + * Create parameters specific for a request + * @param {*} localParams parameters array + * @param {object} options - a standard list of options that's globally passed around. Check options.js for more. + * @returns {Object} with three arrays of query, header and path as keys. + * @no-unit-test + */ + getParametersForPathItem: function(localParams, options) { + let tempParam, params = { + query: [], + header: [], + path: [] + }, includeDeprecated = options.includeDeprecated !== false; + _2.forEach(localParams, (param) => { + if (!_2.isObject(param)) { + return; + } + tempParam = param; + let verifyAddDeprecated = includeDeprecated || includeDeprecated === false && tempParam.deprecated !== true; + if (verifyAddDeprecated) { + if (tempParam.in === "query") { + params.query.push(tempParam); + } else if (tempParam.in === "header") { + params.header.push(tempParam); + } else if (tempParam.in === "path") { + params.path.push(tempParam); + } + } + }); + return params; + }, + /** + * returns first example in the input map + * @param {*} exampleObj map[string, exampleObject] + * @param {object} components - components defined in the OAS spec. These are used to + * resolve references while generating params. + * @param {object} options - a standard list of options that's globally passed around. Check options.js for more. + * @returns {*} first example in the input map type + */ + getExampleData: function(exampleObj, components, options) { + var example, exampleKey; + if (!exampleObj || typeof exampleObj !== "object") { + return ""; + } + exampleKey = _2.keys(exampleObj)[0]; + example = exampleObj[exampleKey]; + if (_2.has(example, "$ref")) { + example = this.getRefObject(example.$ref, components, options); + } + if (_2.has(example, "value")) { + example = example.value; + } + return example; + }, + /** + * converts one of the eamples or schema in Media Type object to postman data + * @param {*} bodyObj is MediaTypeObject + * @param {*} requestType - Specifies whether the request body is of example request or root request + * @param {*} contentType - content type header + * @param {string} parameterSourceOption tells that the schema object is of request or response + * @param {string} indentCharacter is needed for XML/JSON bodies only + * @param {object} components - components defined in the OAS spec. These are used to + * resolve references while generating params. + * @param {object} options - a standard list of options that's globally passed around. Check options.js for more. + * @param {object} schemaCache - object storing schemaFaker and schmeResolution caches + * @returns {*} postman body data + */ + // TODO: We also need to accept the content type + // and generate the body accordingly + // right now, even if the content-type was XML, we'll generate + // a JSON example/schema + convertToPmBodyData: function(bodyObj, requestType, contentType, parameterSourceOption, indentCharacter, components, options, schemaCache) { + var bodyData = "", schemaFormat = SCHEMA_FORMATS.DEFAULT, schemaType, resolveTo = this.resolveToExampleOrSchema( + requestType, + options.requestParametersResolution, + options.exampleParametersResolution + ); + let concreteUtils = components && components.hasOwnProperty("concreteUtils") ? components.concreteUtils : DEFAULT_SCHEMA_UTILS, headerFamily = this.getHeaderFamily(contentType); + if (_2.isEmpty(bodyObj)) { + return bodyData; + } + if (bodyObj.example && (resolveTo === "example" || !bodyObj.schema)) { + if (bodyObj.example.hasOwnProperty("$ref")) { + bodyObj.example = this.getRefObject(bodyObj.example.$ref, components, options); + if (headerFamily === HEADER_TYPE.JSON) { + try { + bodyObj.example = JSON.parse(bodyObj.example); + } catch (e) { + } + } + } + bodyData = bodyObj.example; + if (contentType === TEXT_XML || contentType === APP_XML || headerFamily === HEADER_TYPE.XML) { + let bodySchemaWithExample = bodyObj.schema; + if (typeof bodyObj.schema === "object") { + bodySchemaWithExample = Object.assign({}, bodyObj.schema, { example: bodyData }); + } + bodyData = xmlFaker(null, bodySchemaWithExample, indentCharacter, resolveTo); + } + } else if (!_2.isEmpty(bodyObj.examples) && (resolveTo === "example" || !bodyObj.schema)) { + bodyData = this.getExampleData(bodyObj.examples, components, options); + if (contentType === TEXT_XML || contentType === APP_XML || headerFamily === HEADER_TYPE.XML) { + let bodySchemaWithExample = bodyObj.schema; + if (typeof bodyObj.schema === "object") { + bodySchemaWithExample = Object.assign({}, bodyObj.schema, { example: bodyData }); + } + bodyData = xmlFaker(null, bodySchemaWithExample, indentCharacter, resolveTo); + } + } else if (bodyObj.schema) { + if (bodyObj.schema.hasOwnProperty("$ref")) { + let outerProps = concreteUtils.getOuterPropsIfIsSupported(bodyObj.schema), resolvedSchema; + if (outerProps) { + resolvedSchema = this.getRefObject(bodyObj.schema.$ref, components, options); + bodyObj.schema = concreteUtils.addOuterPropsToRefSchemaIfIsSupported(resolvedSchema, outerProps); + } else { + bodyObj.schema = this.getRefObject(bodyObj.schema.$ref, components, options); + } + } + if (options.schemaFaker) { + if (this.getHeaderFamily(contentType) === HEADER_TYPE.XML) { + schemaFormat = SCHEMA_FORMATS.XML; + } + if (options.complexityScore === 10) { + schemaType = _2.get(this.getRefObject(bodyObj.schema.$ref, components, options), "type"); + if (schemaType === "object") { + return { + value: "" + }; + } + if (schemaType === "array") { + return [ + "" + ]; + } + return ""; + } + bodyData = safeSchemaFaker( + bodyObj.schema || {}, + resolveTo, + PROCESSING_TYPE.CONVERSION, + parameterSourceOption, + components, + schemaFormat, + schemaCache, + options + ); + } else { + bodyData = ""; + } + } + return bodyData; + }, + /** + * returns whether to resolve to example or schema + * @param {string} requestType - Specifies whether the request body is of example request or root request + * @param {string} requestParametersResolution - the option value of requestParametersResolution + * @param {string} exampleParametersResolution - the option value of exampleParametersResolution + * @returns {string} Whether to resolve to example or schema + */ + resolveToExampleOrSchema(requestType, requestParametersResolution, exampleParametersResolution) { + if (requestType === REQUEST_TYPE.ROOT) { + if (requestParametersResolution === "example") { + return "example"; + } else if (requestParametersResolution === "schema") { + return "schema"; + } + } + if (requestType === REQUEST_TYPE.EXAMPLE) { + if (exampleParametersResolution === "example") { + return "example"; + } else if (exampleParametersResolution === "schema") { + return "schema"; + } + } + return "schema"; + }, + /** + * convert param with in='query' to string considering style and type + * @param {*} param with in='query' + * @param {*} requestType Specifies whether the request body is of example request or root request + * @param {object} components - components defined in the OAS spec. These are used to + * resolve references while generating params. + * @param {object} options - a standard list of options that's globally passed around. Check options.js for more. + * @param {object} schemaCache - object storing schemaFaker and schmeResolution caches + * @returns {array} converted queryparam + */ + convertToPmQueryParameters: function(param, requestType, components, options, schemaCache) { + var pmParams = [], paramValue, resolveTo = this.resolveToExampleOrSchema( + requestType, + options.requestParametersResolution, + options.exampleParametersResolution + ); + if (!param) { + return []; + } + if (param.hasOwnProperty("schema")) { + this.assignParameterExamples(param); + paramValue = options.schemaFaker ? safeSchemaFaker( + param.schema, + resolveTo, + PROCESSING_TYPE.CONVERSION, + PARAMETER_SOURCE.REQUEST, + components, + SCHEMA_FORMATS.DEFAULT, + schemaCache, + options + ) : ""; + if (typeof paramValue === "number" || typeof paramValue === "boolean") { + paramValue = paramValue.toString(); + } + return this.convertParamsWithStyle(param, paramValue, PARAMETER_SOURCE.REQUEST, components, schemaCache, options); + } + let description = this.getParameterDescription(param); + pmParams.push({ + key: param.name, + value: "", + description + }); + return pmParams; + }, + /** + * Recursively extracts key-value pair from deep objects. + * + * @param {*} deepObject - Deep object + * @param {*} objectKey - key associated with deep object + * @returns {Array} array of param key-value pairs + */ + extractDeepObjectParams: function(deepObject, objectKey) { + let extractedParams = []; + _2.keys(deepObject).forEach((key) => { + let value = deepObject[key]; + if (value && typeof value === "object") { + extractedParams = _2.concat(extractedParams, this.extractDeepObjectParams(value, objectKey + "[" + key + "]")); + } else { + extractedParams.push({ key: objectKey + "[" + key + "]", value }); + } + }); + return extractedParams; + }, + /** + * Returns an array of parameters + * Handles array/object/string param types + * @param {*} param - the param object, as defined in + * https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#parameterObject + * @param {any} paramValue - the value to use (from schema or example) for the given param. + * This will be exploded/parsed according to the param type + * @param {*} parameterSource — Specifies whether the schema being faked is from a request or response. + * @param {object} components - components defined in the OAS spec. These are used to + * resolve references while generating params. + * @param {object} schemaCache - object storing schemaFaker and schmeResolution caches + * @param {object} options - a standard list of options that's globally passed around. Check options.js for more. + * @returns {array} parameters. One param with type=array might lead to multiple params + * in the return value + * The styles are documented at + * https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#style-values + */ + convertParamsWithStyle: function(param, paramValue, parameterSource, components, schemaCache, options) { + var paramName = _2.get(param, "name"), pmParams = [], serialisedValue = "", description = this.getParameterDescription(param), disabled = false; + if (!_2.isObject(param)) { + return null; + } + let { style, explode, startValue, propSeparator, keyValueSeparator, isExplodable } = this.getParamSerialisationInfo(param, parameterSource, components); + if (options && !options.enableOptionalParameters) { + disabled = !param.required; + } + switch (style) { + case "form": + if (explode && _2.isObject(paramValue)) { + _2.forEach(paramValue, (value, key) => { + pmParams.push(this.generateSdkParam({ + key: _2.isArray(paramValue) ? paramName : key, + value: value === void 0 ? "" : value, + description, + disabled + }, _2.get(param, "in"))); + }); + return pmParams; + } + if (explode && _2.get(param, "schema.type") === "object" && _2.isEmpty(_2.get(param, "schema.properties"))) { + return pmParams; + } + break; + case "deepObject": + if (_2.isObject(paramValue)) { + let extractedParams = this.extractDeepObjectParams(paramValue, paramName); + _2.forEach(extractedParams, (extractedParam) => { + pmParams.push(this.generateSdkParam({ + key: extractedParam.key, + value: extractedParam.value || "", + description, + disabled + }, _2.get(param, "in"))); + }); + } + return pmParams; + default: + break; + } + if (_2.isObject(paramValue)) { + _2.forEach(paramValue, (value, key) => { + !_2.isEmpty(serialisedValue) && (serialisedValue += propSeparator); + isExplodable && (serialisedValue += key + keyValueSeparator); + serialisedValue += value === void 0 ? "" : value; + }); + } else if (!_2.isNil(paramValue)) { + serialisedValue += paramValue; + } + serialisedValue = startValue + serialisedValue; + pmParams.push(this.generateSdkParam({ + key: paramName, + value: serialisedValue, + description, + disabled + }, _2.get(param, "in"))); + return pmParams; + }, + /** + * converts params with in='header' to a Postman header object + * @param {*} header param with in='header' + * @param {*} requestType Specifies whether the request body is of example request or root request + * @param {*} parameterSource — Specifies whether the schema being faked is from a request or response. + * @param {object} components - components defined in the OAS spec. These are used to + * resolve references while generating params. + * @param {object} options - a standard list of options that's globally passed around. Check options.js for more. + * @param {object} schemaCache - object storing schemaFaker and schmeResolution caches + * @returns {Object} instance of a Postman SDK Header + */ + convertToPmHeader: function(header, requestType, parameterSource, components, options, schemaCache) { + var fakeData, convertedHeader, reqHeader, resolveTo = this.resolveToExampleOrSchema( + requestType, + options.requestParametersResolution, + options.exampleParametersResolution + ); + if (header.hasOwnProperty("schema")) { + if (!options.schemaFaker) { + fakeData = ""; + } else { + this.assignParameterExamples(header); + fakeData = safeSchemaFaker( + header.schema || {}, + resolveTo, + PROCESSING_TYPE.CONVERSION, + parameterSource, + components, + SCHEMA_FORMATS.DEFAULT, + schemaCache, + options + ); + } + } else { + fakeData = ""; + } + convertedHeader = _2.get(this.convertParamsWithStyle( + header, + fakeData, + parameterSource, + components, + schemaCache, + options + ), "[0]"); + reqHeader = new Header(convertedHeader); + reqHeader.description = this.getParameterDescription(header); + return reqHeader; + }, + /** + * converts operation item requestBody to a Postman request body + * @param {*} requestBody in operationItem + * @param {*} requestType - Specifies whether the request body is of example request or root request + * @param {object} components - components defined in the OAS spec. These are used to + * resolve references while generating params. + * @param {object} options - a standard list of options that's globally passed around. Check options.js for more. + * @param {object} schemaCache - object storing schemaFaker and schmeResolution caches + * @returns {Object} - Postman requestBody and Content-Type Header + */ + convertToPmBody: function(requestBody, requestType, components, options, schemaCache) { + var contentObj, bodyData, param, originalParam, paramArray = [], updateOptions = {}, reqBody = new RequestBody(), contentHeader, contentTypes = {}, rDataMode, params, encoding, cType, description, required, enumValue, formHeaders = []; + let concreteUtils = components && components.hasOwnProperty("concreteUtils") ? components.concreteUtils : DEFAULT_SCHEMA_UTILS; + contentObj = requestBody.content; + if (!contentObj) { + return { + body: reqBody, + contentHeader: null, + formHeaders: null + }; + } + if (contentObj.hasOwnProperty(URLENCODED)) { + rDataMode = "urlencoded"; + bodyData = this.convertToPmBodyData( + contentObj[URLENCODED], + requestType, + URLENCODED, + PARAMETER_SOURCE.REQUEST, + options.indentCharacter, + components, + options, + schemaCache + ); + encoding = contentObj[URLENCODED].encoding ? contentObj[URLENCODED].encoding : {}; + if (contentObj[URLENCODED].hasOwnProperty("schema") && contentObj[URLENCODED].schema.hasOwnProperty("$ref")) { + contentObj[URLENCODED].schema = this.getRefObject(contentObj[URLENCODED].schema.$ref, components, options); + } + _2.forOwn(bodyData, (value, key) => { + if (_2.get(contentObj[URLENCODED], "schema.type") === "object") { + description = _2.get(contentObj[URLENCODED], ["schema", "properties", key, "description"], ""); + required = _2.includes(_2.get(contentObj[URLENCODED], ["schema", "required"]), key); + enumValue = _2.get(contentObj[URLENCODED], ["schema", "properties", key, "enum"]); + } + !encoding[key] && (encoding[key] = {}); + encoding[key].name = key; + encoding[key].schema = { + type: typeof value + }; + encoding[key].in = "query"; + _2.isBoolean(required) && (encoding[key].required = required); + encoding[key].description = description; + params = this.convertParamsWithStyle( + encoding[key], + value, + PARAMETER_SOURCE.REQUEST, + components, + schemaCache, + options + ); + params && params.forEach((element) => { + if (typeof element.value !== "string") { + try { + element.value = JSON.stringify(element.value); + } catch (e) { + element.value = "INVALID_URLENCODED_PARAM_TYPE"; + } + } + }); + paramArray.push(...params); + }); + updateOptions = { + mode: rDataMode, + urlencoded: paramArray + }; + contentHeader = new Header({ + key: "Content-Type", + value: URLENCODED + }); + reqBody.update(updateOptions); + } else if (contentObj.hasOwnProperty(FORM_DATA)) { + rDataMode = "formdata"; + bodyData = this.convertToPmBodyData( + contentObj[FORM_DATA], + requestType, + FORM_DATA, + PARAMETER_SOURCE.REQUEST, + options.indentCharacter, + components, + options, + schemaCache + ); + encoding = contentObj[FORM_DATA].encoding ? contentObj[FORM_DATA].encoding : {}; + if (contentObj[FORM_DATA].hasOwnProperty("schema") && contentObj[FORM_DATA].schema.hasOwnProperty("$ref")) { + contentObj[FORM_DATA].schema = this.getRefObject(contentObj[FORM_DATA].schema.$ref, components, options); + } + _2.forOwn(bodyData, (value, key) => { + if (_2.get(contentObj[FORM_DATA], "schema.type") === "object") { + description = _2.get(contentObj[FORM_DATA], ["schema", "properties", key, "description"], ""); + required = _2.includes(_2.get(contentObj[FORM_DATA], ["schema", "required"]), key); + enumValue = _2.get(contentObj[FORM_DATA], ["schema", "properties", key, "enum"]); + } + description = (required ? "(Required) " : "") + description + (enumValue ? " (This can only be one of " + enumValue + ")" : ""); + if (encoding.hasOwnProperty(key)) { + _2.forOwn(encoding[key].headers, (value2, key2) => { + if (key2 !== "Content-Type") { + if (encoding[key2].headers[key2].hasOwnProperty("$ref")) { + encoding[key2].headers[key2] = getRefObject(encoding[key2].headers[key2].$ref, components, options); + } + encoding[key2].headers[key2].name = key2; + formHeaders.push(this.convertToPmHeader( + encoding[key2].headers[key2], + REQUEST_TYPE.ROOT, + PARAMETER_SOURCE.REQUEST, + components, + options, + schemaCache + )); + } + }); + if (typeof _2.get(encoding, `[${key}].contentType`) === "string") { + contentTypes[key] = encoding[key].contentType; + } + } + if (typeof value !== "string") { + try { + value = JSON.stringify(value); + } catch (e) { + value = "INVALID_FORM_PARAM_TYPE"; + } + } + originalParam = _2.get(contentObj[FORM_DATA], ["schema", "properties", key]); + if (originalParam && originalParam.type === "string" && originalParam.format === "binary") { + param = new FormParam({ + key, + value: "", + type: "file" + }); + } else { + param = new FormParam({ + key, + value, + type: "text" + }); + } + param.description = description; + if (contentTypes[key]) { + param.contentType = contentTypes[key]; + } + paramArray.push(param); + }); + updateOptions = { + mode: rDataMode, + formdata: paramArray + }; + contentHeader = new Header({ + key: "Content-Type", + value: FORM_DATA + }); + reqBody.update(updateOptions); + } else { + rDataMode = "raw"; + let bodyType, language; + if (contentObj.hasOwnProperty(APP_JS)) { + bodyType = APP_JS; + } else if (contentObj.hasOwnProperty(APP_JSON)) { + bodyType = APP_JSON; + } else if (contentObj.hasOwnProperty(TEXT_HTML)) { + bodyType = TEXT_HTML; + } else if (contentObj.hasOwnProperty(TEXT_PLAIN)) { + bodyType = TEXT_PLAIN; + } else if (contentObj.hasOwnProperty(APP_XML)) { + bodyType = APP_XML; + } else if (contentObj.hasOwnProperty(TEXT_XML)) { + bodyType = TEXT_XML; + } else { + for (cType in contentObj) { + if (contentObj.hasOwnProperty(cType)) { + bodyType = cType; + break; + } + } + } + if (concreteUtils.isBinaryContentType(bodyType, contentObj)) { + updateOptions = { + mode: "file" + }; + } else { + let headerFamily; + bodyData = this.convertToPmBodyData( + contentObj[bodyType], + requestType, + bodyType, + PARAMETER_SOURCE.REQUEST, + options.indentCharacter, + components, + options, + schemaCache + ); + headerFamily = this.getHeaderFamily(bodyType); + bodyData = bodyType === TEXT_XML || bodyType === APP_XML || headerFamily === HEADER_TYPE.XML ? getXmlVersionContent(bodyData) : bodyData; + updateOptions = { + mode: rDataMode, + raw: !_2.isObject(bodyData) && _2.isFunction(_2.get(bodyData, "toString")) ? bodyData.toString() : JSON.stringify(bodyData, null, options.indentCharacter) + }; + } + language = this.getHeaderFamily(bodyType); + if (language !== HEADER_TYPE.INVALID) { + updateOptions.options = { + raw: { + language + } + }; + } + contentHeader = new Header({ + key: "Content-Type", + value: bodyType + }); + reqBody.update(updateOptions); + } + return { + body: reqBody, + contentHeader, + formHeaders + }; + }, + /** + * @param {*} response in operationItem responses + * @param {*} code - response Code + * @param {*} originalRequest - the request for the example + * @param {object} components - components defined in the OAS spec. These are used to + * resolve references while generating params. + * @param {object} options - a standard list of options that's globally passed around. Check options.js for more. + * @param {object} schemaCache - object storing schemaFaker and schmeResolution caches + * @returns {Object} postman response + */ + convertToPmResponse: function(response, code, originalRequest, components, options, schemaCache) { + var responseHeaders = [], previewLanguage = "text", responseBodyWrapper, header, sdkResponse, responseMediaTypes; + if (!_2.isObject(response)) { + return null; + } + _2.forOwn(response.headers, (value, key) => { + if (!_2.isObject(value)) { + return; + } + if (_2.toLower(key) !== "content-type") { + if (_2.get(value, "$ref")) { + header = this.getRefObject(value.$ref, components, options); + } else { + header = value; + } + header.name = key; + if (!_2.includes(IMPLICIT_HEADERS, _2.toLower(key))) { + responseHeaders.push(this.convertToPmHeader( + header, + REQUEST_TYPE.EXAMPLE, + PARAMETER_SOURCE.RESPONSE, + components, + options, + schemaCache + )); + } + } + }); + responseBodyWrapper = this.convertToPmResponseBody(response.content, components, options, schemaCache); + previewLanguage = this.resolveResponsePreviewLanguageAndResponseHeader( + responseBodyWrapper, + responseHeaders, + response + ); + code = code.replace(/X|x/g, "0"); + code = code === "default" ? 500 : _2.toSafeInteger(code); + responseMediaTypes = _2.keys(response.content); + if (responseMediaTypes.length > 0) { + let acceptHeader = new Header({ + key: "Accept", + value: responseMediaTypes[0] + }); + if (_2.isArray(_2.get(originalRequest, "header"))) { + originalRequest.header.push(acceptHeader); + } + } + sdkResponse = new Response({ + name: response.description, + code: code || 500, + header: responseHeaders, + body: responseBodyWrapper.responseBody, + originalRequest + }); + sdkResponse._postman_previewlanguage = previewLanguage; + return sdkResponse; + }, + /** + * Identifies the previewLanguage to use and also adds the identified content header to the responseHeaders array + * @param {object} responseBodyWrapper generated response body and its related information + * @param {object} responseHeaders - The existent array of response headers + * @param {object} response in operationItem responses + * @returns {string} previewLanguage + */ + resolveResponsePreviewLanguageAndResponseHeader: function(responseBodyWrapper, responseHeaders, response) { + let previewLanguage = "text"; + if (responseBodyWrapper.contentTypeHeader) { + responseHeaders.push({ key: "Content-Type", value: responseBodyWrapper.contentTypeHeader }); + if (this.getHeaderFamily(responseBodyWrapper.contentTypeHeader) === HEADER_TYPE.JSON) { + previewLanguage = PREVIEW_LANGUAGE.JSON; + } else if (this.getHeaderFamily(responseBodyWrapper.contentTypeHeader) === HEADER_TYPE.XML) { + previewLanguage = PREVIEW_LANGUAGE.XML; + } else if (responseBodyWrapper.isJsonLike) { + previewLanguage = PREVIEW_LANGUAGE.JSON; + } + } else if (response.content && _2.keys(response.content).length > 0) { + responseHeaders.push({ key: "Content-Type", value: _2.keys(response.content)[0] }); + if (this.getHeaderFamily(_2.keys(response.content)[0]) === HEADER_TYPE.JSON) { + previewLanguage = PREVIEW_LANGUAGE.JSON; + } else if (this.getHeaderFamily(_2.keys(response.content)[0]) === HEADER_TYPE.XML) { + previewLanguage = PREVIEW_LANGUAGE.XML; + } else if (responseBodyWrapper.isJsonLike) { + previewLanguage = PREVIEW_LANGUAGE.JSON; + } + } else { + responseHeaders.push({ key: "Content-Type", value: TEXT_PLAIN }); + } + return previewLanguage; + }, + /** + * @param {*} $ref reference object + * @param {object} components - components defined in the OAS spec. These are used to + * resolve references while generating params. + * @param {object} options - a standard list of options that's globally passed around. Check options.js for more. + * @param {*} seenRef - References that are repeated. Used to identify circular references. + * @returns {Object} reference object from the saved components + * @no-unit-tests + */ + getRefObject: function($ref, components, options, seenRef = {}) { + var refObj, savedSchema; + if (typeof $ref !== "string") { + return { value: `Invalid $ref: ${$ref} was found` }; + } + if (seenRef[$ref]) { + return { value: `Error: "${$ref}" contains circular references in it.` }; + } + savedSchema = $ref.split("/").slice(1).map((elem) => { + return decodeURIComponent( + elem.replace(/~1/g, "/").replace(/~0/g, "~") + ); + }); + if (savedSchema.length < 3) { + console.warn(`ref ${$ref} not found.`); + return { value: `reference ${$ref} not found in the given specification` }; + } + if (savedSchema[0] !== "components" && savedSchema[0] !== "paths") { + console.warn(`Error reading ${$ref}. Can only use references from components and paths`); + return { value: `Error reading ${$ref}. Can only use references from components and paths` }; + } + refObj = _2.get(components, savedSchema); + if (!refObj) { + console.warn(`ref ${$ref} not found.`); + return { value: `reference ${$ref} not found in the given specification` }; + } + seenRef[$ref] = true; + if (refObj.$ref) { + return this.getRefObject(refObj.$ref, components, options, seenRef); + } + seenRef[$ref] = false; + return refObj; + }, + /** Finds all the possible path variables in a given path string + * @param {string} path Path string : /pets/{petId} + * @returns {array} Array of path variables. + */ + findPathVariablesFromPath: function(path) { + return path.match(/(\/\{\{[^\/\{\}]+\}\})(?=\/|$)/g); + }, + /** Finds all the possible collection variables in a given path string + * @param {string} path Path string : /pets/{petId} + * @returns {array} Array of collection variables. + */ + findCollectionVariablesFromPath: function(path) { + return path.match(/(\{\{[^\/\{\}]+\}\})/g); + }, + /** + * Finds all the possible path variables conversion from schema path, + * and excludes path variable that are converted to collection variable + * @param {string} path Path string + * @returns {array} Array of path variables. + */ + findPathVariablesFromSchemaPath: function(path) { + let matches = path.match(/(\/\{[^\/\{\}]+\}(?=[\/\0]|$))/g); + return _2.map(matches, (match) => { + return match.slice(2, -1); + }); + }, + /** + * Finds fixed parts present in path segment of collection or schema. + * + * @param {String} segment - Path segment + * @param {String} pathType - Path type (one of 'collection' / 'schema') + * @returns {Array} - Array of strings where each element is fixed part in order of their occurence + */ + getFixedPartsFromPathSegment: function(segment, pathType = "collection") { + var tempSegment = segment, varMatches = segment.match(pathType === "schema" ? /(\{[^\/\{\}]+\})/g : /(\{\{[^\/\{\}]+\}\})/g), fixedParts = []; + _2.forEach(varMatches, (match) => { + let matchedIndex = tempSegment.indexOf(match); + matchedIndex !== 0 && fixedParts.push(tempSegment.slice(0, matchedIndex)); + tempSegment = tempSegment.substr(matchedIndex + match.length); + }); + tempSegment.length > 0 && fixedParts.push(tempSegment); + return fixedParts; + }, + /** Separates out collection and path variables from the reqUrl + * + * @param {string} reqUrl Request Url + * @param {Array} pathVars Path variables + * + * @returns {Object} reqUrl, updated path Variables array and collection Variables. + */ + sanitizeUrlPathParams: function(reqUrl, pathVars) { + var matches, collectionVars = []; + matches = this.findPathVariablesFromPath(reqUrl); + if (matches) { + matches.forEach((match) => { + const replaceWith = match.replace(/{{/g, ":").replace(/}}/g, ""); + reqUrl = reqUrl.replace(match, replaceWith); + }); + } + matches = this.findCollectionVariablesFromPath(reqUrl); + if (matches) { + matches.forEach((match) => { + const collVar = match.replace(/{{/g, "").replace(/}}/g, ""); + pathVars = pathVars.filter((item) => { + if (item.name === collVar) { + collectionVars.push(item); + } + return !(item.name === collVar); + }); + }); + } + return { url: reqUrl, pathVars, collectionVars }; + }, + cleanWebhookName: function(webhookName) { + return webhookName.replace(/[:/]/g, "_").replace(/[{}]/g, ""); + }, + /** + * function to convert an openapi path item to postman item + * @param {*} openapi openapi object with root properties + * @param {*} operationItem path operationItem from tree structure + * @param {object} components - components defined in the OAS spec. These are used to + * resolve references while generating params. + * @param {object} options - a standard list of options that's globally passed around. Check options.js for more. + * @param {object} schemaCache - object storing schemaFaker and schmeResolution caches + * @param {array} variableStore - array + * @param {boolean} fromWebhooks - true if we are processing the webhooks group, false by default + * @returns {Object} postman request Item + * @no-unit-test + */ + convertRequestToItem: function(openapi, operationItem, components, options, schemaCache, variableStore, fromWebhooks = false) { + var reqName, pathVariables = openapi.baseUrlVariables, operation = operationItem.properties, reqBody = operationItem.properties.requestBody, itemParams = operationItem.properties.parameters, reqParams = this.getParametersForPathItem(itemParams, options), baseUrl = fromWebhooks ? `{{${this.cleanWebhookName(operationItem.path)}}}` : "{{baseUrl}}", pathVarArray = [], authHelper, item, serverObj, displayUrl, reqUrl = fromWebhooks ? "" : "/" + operationItem.path, pmBody, authMeta, swagResponse, localServers = fromWebhooks ? "" : _2.get(operationItem, "properties.servers"), exampleRequestBody, sanitizeResult, globalServers = fromWebhooks ? "" : _2.get(operationItem, "servers"), responseMediaTypes, acceptHeader; + reqUrl = this.fixPathVariablesInUrl(reqUrl); + sanitizeResult = this.sanitizeUrlPathParams(reqUrl, reqParams.path); + reqUrl = sanitizeResult.url; + reqParams.path = sanitizeResult.pathVars; + sanitizeResult.collectionVars.forEach((element) => { + if (!variableStore[element.name]) { + let fakedData = options.schemaFaker ? safeSchemaFaker( + element.schema || {}, + options.requestParametersResolution, + PROCESSING_TYPE.CONVERSION, + PARAMETER_SOURCE.REQUEST, + components, + SCHEMA_FORMATS.DEFAULT, + schemaCache, + options + ) : "", convertedPathVar = _2.get(this.convertParamsWithStyle( + element, + fakedData, + PARAMETER_SOURCE.REQUEST, + components, + schemaCache, + options + ), "[0]", {}); + variableStore[element.name] = _2.assign(convertedPathVar, { key: element.name, type: "collection" }); + } + }); + if (Array.isArray(localServers) && localServers.length) { + serverObj = operationItem.properties.servers[0]; + baseUrl = this.fixPathVariablesInUrl(serverObj.url); + if (serverObj.variables) { + _2.forOwn(serverObj.variables, (value, key) => { + pathVarArray.push({ + name: key, + value: value.default || "", + description: this.getParameterDescription(value) + }); + }); + sanitizeResult = this.sanitizeUrlPathParams(baseUrl, pathVarArray); + baseUrl = sanitizeResult.url; + sanitizeResult.collectionVars.forEach((element) => { + if (!variableStore[element.name]) { + variableStore[element.name] = { + key: element.name, + value: element.value || "", + description: element.description, + type: "collection" + }; + } + }); + serverObj.pathVariables = {}; + sanitizeResult.pathVars.forEach((element) => { + serverObj.pathVariables[element.name] = serverObj.variables[element.name]; + }); + pathVarArray = this.convertPathVariables( + "method", + [], + serverObj.pathVariables, + components, + options, + schemaCache + ); + } + baseUrl += reqUrl; + } else { + if (Array.isArray(globalServers) && globalServers.length) { + displayUrl = "{{" + this.fixPathVariableName(operationItem.path) + "}}" + reqUrl; + } else { + baseUrl += reqUrl; + if (pathVariables || fromWebhooks) { + displayUrl = baseUrl; + } else { + displayUrl = "{{baseUrl}}" + reqUrl; + } + } + pathVarArray = this.convertPathVariables("root", [], pathVariables, components, options, schemaCache); + } + switch (options.requestNameSource) { + case "fallback": { + if (fromWebhooks) { + reqName = operation.summary || utils.insertSpacesInName(operation.operationId) || operation.description || `${this.cleanWebhookName(operationItem.path)} - ${operationItem.method}`; + } else { + reqName = operation.summary || utils.insertSpacesInName(operation.operationId) || operation.description || reqUrl; + } + break; + } + case "url": { + reqName = displayUrl || baseUrl; + break; + } + default: { + reqName = operation[options.requestNameSource]; + break; + } + } + if (!reqName) { + throw new openApiErr(`requestNameSource (${options.requestNameSource}) in options is invalid or property does not exist in ${operationItem.path}`); + } + if (!options.alwaysInheritAuthentication) { + authHelper = this.getAuthHelper(openapi, operation.security); + } + item = new Item({ + name: reqName, + request: { + description: operation.description, + url: displayUrl || baseUrl, + name: reqName, + method: operationItem.method.toUpperCase() + } + }); + authMeta = operation["x-postman-meta"]; + if (authMeta && authMeta.currentHelper && authMap[authMeta.currentHelper]) { + let thisAuthObject = { + type: authMap[authMeta.currentHelper] + }; + thisAuthObject[authMap[authMeta.currentHelper]] = authMeta.helperAttributes; + item.request.auth = new RequestAuth(thisAuthObject); + } else { + item.request.auth = authHelper; + } + _2.forEach(reqParams.query, (queryParam) => { + this.convertToPmQueryParameters(queryParam, REQUEST_TYPE.ROOT, components, options, schemaCache).forEach((pmParam) => { + item.request.url.addQueryParams(pmParam); + }); + }); + item.request.url.query.members.forEach((query) => { + if (typeof query.value !== "string") { + try { + query.value = JSON.stringify(query.value); + } catch (e) { + query.value = "INVALID_QUERY_PARAM_TYPE"; + } + } + }); + item.request.url.variables.clear(); + item.request.url.variables.assimilate(this.convertPathVariables( + "param", + pathVarArray, + reqParams.path, + components, + options, + schemaCache + )); + if (item.request.url.variables.members && item.request.url.variables.members.length > 0) { + item.request.url.variables.members = _2.map(item.request.url.variables.members, (m) => { + if (m.description && typeof m.description === "object" && m.description.content) { + m.description = m.description.content; + } + return m; + }); + } + _2.forEach(reqParams.header, (header) => { + if (options.keepImplicitHeaders || !_2.includes(IMPLICIT_HEADERS, _2.toLower(_2.get(header, "name")))) { + item.request.addHeader(this.convertToPmHeader( + header, + REQUEST_TYPE.ROOT, + PARAMETER_SOURCE.REQUEST, + components, + options, + schemaCache + )); + } + }); + if (reqBody) { + if (reqBody.$ref) { + reqBody = this.getRefObject(reqBody.$ref, components, options); + } + pmBody = this.convertToPmBody(reqBody, REQUEST_TYPE.ROOT, components, options, schemaCache); + item.request.body = pmBody.body; + if (!options.keepImplicitHeaders || !_2.find(reqParams.header, (h) => { + return _2.toLower(_2.get(h, "name")) === "content-type"; + })) { + item.request.addHeader(pmBody.contentHeader); + } + pmBody.formHeaders && pmBody.formHeaders.forEach((element) => { + item.request.addHeader(element); + }); + } + if (operation.responses) { + let thisOriginalRequest = {}, responseAuthHelper, authQueryParams, convertedResponse; + if (options.includeAuthInfoInExample) { + responseAuthHelper = this.getResponseAuthHelper(authHelper); + if (_2.isEmpty(authHelper)) { + responseAuthHelper = this.getResponseAuthHelper(this.getAuthHelper(openapi, openapi.security)); + } + authQueryParams = _2.map(responseAuthHelper.query, (queryParam) => { + return queryParam.key + "=" + queryParam.value; + }); + } + _2.forOwn(operation.responses, (response, code) => { + let originalRequestHeaders = [], originalRequestQueryParams = this.convertToPmQueryArray( + reqParams, + REQUEST_TYPE.EXAMPLE, + components, + options, + schemaCache + ); + swagResponse = response; + if (_2.get(response, "$ref")) { + swagResponse = this.getRefObject(response.$ref, components, options); + } + if (options.includeAuthInfoInExample) { + originalRequestQueryParams = _2.concat(originalRequestQueryParams, authQueryParams); + originalRequestHeaders = _2.concat(originalRequestHeaders, responseAuthHelper.header); + } + thisOriginalRequest.method = item.request.method; + const clonedItemURL = _2.cloneDeep(item.request.url); + thisOriginalRequest.url = clonedItemURL; + thisOriginalRequest.url.variable = clonedItemURL.variables.members; + thisOriginalRequest.url.query = []; + if (originalRequestQueryParams.length) { + thisOriginalRequest.url.query = originalRequestQueryParams.join("&"); + } + _2.forEach(reqParams.header, (header) => { + originalRequestHeaders.push(this.convertToPmHeader( + header, + REQUEST_TYPE.EXAMPLE, + PARAMETER_SOURCE.REQUEST, + components, + options, + schemaCache + )); + }); + thisOriginalRequest.header = originalRequestHeaders; + try { + exampleRequestBody = this.convertToPmBody( + operationItem.properties.requestBody, + REQUEST_TYPE.EXAMPLE, + components, + options, + schemaCache + ); + thisOriginalRequest.body = exampleRequestBody.body ? exampleRequestBody.body.toJSON() : {}; + } catch (e) { + thisOriginalRequest.body = {}; + } + if (_2.isEmpty(acceptHeader)) { + responseMediaTypes = _2.keys(_2.get(swagResponse, "content")); + if (responseMediaTypes.length > 0) { + acceptHeader = { + key: "Accept", + value: responseMediaTypes[0] + }; + } + } + convertedResponse = this.convertToPmResponse( + swagResponse, + code, + thisOriginalRequest, + components, + options, + schemaCache + ); + convertedResponse && item.responses.add(convertedResponse); + }); + } + if (!_2.isEmpty(acceptHeader) && !item.request.headers.has("accept")) { + item.request.addHeader(acceptHeader); + } + item.protocolProfileBehavior = { disableBodyPruning: true }; + return item; + }, + /** + * function to convert an openapi query params object to array of query params + * @param {*} reqParams openapi query params object + * @param {*} requestType Specifies whether the request body is of example request or root request + * @param {object} components - components defined in the OAS spec. These are used to + * resolve references while generating params. + * @param {object} options - a standard list of options that's globally passed around. Check options.js for more. + * @param {object} schemaCache - object storing schemaFaker and schmeResolution caches + * @returns {*} array of all query params + */ + convertToPmQueryArray: function(reqParams, requestType, components, options, schemaCache) { + let requestQueryParams = []; + _2.forEach(reqParams.query, (queryParam) => { + this.convertToPmQueryParameters(queryParam, requestType, components, options, schemaCache).forEach((pmParam) => { + requestQueryParams.push(pmParam.key + "=" + pmParam.value); + }); + }); + return requestQueryParams; + }, + // along with the path object, this also returns the values of the + // path variable's values + // also, any endpoint-level params are merged into the returned pathItemObject + findMatchingRequestFromSchema: function(method, url, schema2, options) { + let parsedUrl = require("url").parse(_2.isString(url) ? url : ""), retVal = [], pathToMatch, matchedPath, matchedPathJsonPath, schemaPathItems = schema2.paths, pathToMatchServer, filteredPathItemsArray = []; + try { + pathToMatch = decodeURI(parsedUrl.pathname); + if (!_2.isNil(parsedUrl.hash)) { + pathToMatch += parsedUrl.hash; + } + } catch (e) { + console.warn( + "Error decoding request URI endpoint. URI: ", + url, + "Error", + e + ); + return retVal; + } + if (!pathToMatch.startsWith("/")) { + pathToMatch = pathToMatch.substring(pathToMatch.indexOf("/")); + } + _2.forOwn(schemaPathItems, (pathItemObject, path) => { + if (!pathItemObject) { + return true; + } + if (!pathItemObject.hasOwnProperty(method.toLowerCase())) { + return true; + } + pathItemObject.parameters = _2.reduce(pathItemObject.parameters, (accumulator, param) => { + if (!_2.isEmpty(param)) { + accumulator.push(param); + } + return accumulator; + }, []); + let schemaMatchResult = { match: false }; + if (pathItemObject[method.toLowerCase()].servers) { + pathToMatchServer = this.handleExplicitServersPathToMatch(pathToMatch, path); + schemaMatchResult = this.getPostmanUrlSchemaMatchScore(pathToMatchServer, path, options); + } else { + schemaMatchResult = this.getPostmanUrlSchemaMatchScore(pathToMatch, path, options); + } + if (!schemaMatchResult.match) { + return true; + } + filteredPathItemsArray.push({ + path, + pathItem: pathItemObject, + matchScore: schemaMatchResult.score, + pathVars: schemaMatchResult.pathVars, + // No. of fixed segment matches between schema and postman url path + // i.e. schema path /user/{userId} and request path /user/{{userId}} has 1 fixed segment match ('user') + fixedMatchedSegments: schemaMatchResult.fixedMatchedSegments, + // No. of variable segment matches between schema and postman url path + // i.e. schema path /user/{userId} and request path /user/{{userId}} has 1 variable segment match ('{userId}') + variableMatchedSegments: schemaMatchResult.variableMatchedSegments + }); + }); + filteredPathItemsArray = _2.orderBy( + filteredPathItemsArray, + ["fixedMatchedSegments", "variableMatchedSegments"], + ["desc", "desc"] + ); + _2.each(filteredPathItemsArray, (fp) => { + let path = fp.path, pathItemObject = fp.pathItem, score = fp.matchScore, pathVars = fp.pathVars; + matchedPath = pathItemObject[method.toLowerCase()]; + if (!matchedPath) { + return true; + } + matchedPathJsonPath = `$.paths[${path}]`; + matchedPath.parameters = _2.reduce(matchedPath.parameters, (accumulator, param) => { + if (!_2.isEmpty(param)) { + accumulator.push(param); + } + return accumulator; + }, []); + matchedPath.parameters = _2.map(matchedPath.parameters, (commonParam) => { + commonParam.pathPrefix = `${matchedPathJsonPath}.${method.toLowerCase()}.parameters`; + return commonParam; + }).concat( + _2.map(pathItemObject.parameters || [], (commonParam) => { + commonParam.pathPrefix = matchedPathJsonPath + ".parameters"; + return commonParam; + }) + ); + retVal.push({ + // using path instead of operationId / sumamry since it's widely understood + name: method + " " + path, + // assign path as schemaPathName property to use path in path object + path: _2.assign(matchedPath, { schemaPathName: path }), + jsonPath: matchedPathJsonPath + "." + method.toLowerCase(), + pathVariables: pathVars, + score + }); + return true; + }); + return retVal; + }, + /** + * Checks if value is postman variable or not + * + * @param {*} value - Value to check for + * @returns {Boolean} postman variable or not + */ + isPmVariable: function(value) { + return _2.isString(value) && _2.startsWith(value, "{{") && _2.endsWith(value, "}}"); + }, + /** + * This function is little modified version of lodash _.get() + * where if path is empty it will return source object instead undefined/fallback value + * + * @param {Object} sourceValue - source from where value is to be extracted + * @param {String} dataPath - json path to value that is to be extracted + * @param {*} fallback - fallback value if sourceValue doesn't contain value at dataPath + * @returns {*} extracted value + */ + getPathValue: function(sourceValue, dataPath, fallback) { + return dataPath === "" ? sourceValue : _2.get(sourceValue, dataPath, fallback); + }, + /** + * Returns all security params that can be applied during converion. + * + * @param {Object} components - OpenAPI components + * @param {String} location - location for which we want to get security params (i.e. 'header' | 'query') + * @returns {Array} applicable security params + */ + getSecurityParams: function(components, location2) { + let securityDefs = _2.get(components, "securitySchemes", {}), securityParams = []; + _2.forEach(securityDefs, (securityDef) => { + if (_2.get(securityDef, "type") === "apiKey" && _2.get(securityDef, "in") === location2) { + securityParams.push(securityDef); + } + }); + return securityParams; + }, + /** + * Provides information regarding serialisation of param + * + * @param {*} param - OpenAPI Parameter object + * @param {String} parameterSource - Specifies whether the schema being faked is from a request or response. + * @param {Object} components - OpenAPI components defined in the OAS spec. These are used to + * resolve references while generating params. + * @param {Object} schemaCache - object storing schemaFaker and schmeResolution caches + * @returns {Object} - Information regarding parameter serialisation. Contains following properties. + * { + * style - style property defined/inferred from schema + * explode - explode property defined/inferred from schema + * startValue - starting value that is prepended to serialised value + * propSeparator - Character that separates two properties or values in serialised string of respective param + * keyValueSeparator - Character that separates key from values in serialised string of respective param + * isExplodable - whether params can be exploded (serialised value can contain key and value) + * } + */ + getParamSerialisationInfo: function(param, parameterSource, components) { + var paramName = _2.get(param, "name"), paramSchema = deref.resolveRefs(_2.cloneDeep(param.schema), parameterSource, components, {}), style, explode, propSeparator, keyValueSeparator, startValue = "", isExplodable = paramSchema.type === "object"; + if (!_2.isObject(param)) { + return null; + } + switch (param.in) { + case "path": + style = _2.includes(["matrix", "label", "simple"], param.style) ? param.style : "simple"; + break; + case "query": + style = _2.includes(["form", "spaceDelimited", "pipeDelimited", "deepObject"], param.style) ? param.style : "form"; + break; + case "header": + style = "simple"; + break; + default: + style = "simple"; + break; + } + explode = _2.isBoolean(param.explode) ? param.explode : _2.includes(["form", "deepObject"], style); + switch (style) { + case "matrix": + isExplodable = paramSchema.type === "object" || explode; + startValue = ";" + (paramSchema.type === "object" && explode ? "" : paramName + "="); + propSeparator = explode ? ";" : ","; + keyValueSeparator = explode ? "=" : ","; + break; + case "label": + startValue = "."; + propSeparator = "."; + keyValueSeparator = explode ? "=" : "."; + break; + case "form": + propSeparator = keyValueSeparator = ","; + break; + case "simple": + propSeparator = ","; + keyValueSeparator = explode ? "=" : ","; + break; + case "spaceDelimited": + explode = false; + propSeparator = keyValueSeparator = "%20"; + break; + case "pipeDelimited": + explode = false; + propSeparator = keyValueSeparator = "|"; + break; + case "deepObject": + explode = true; + break; + default: + break; + } + return { style, explode, startValue, propSeparator, keyValueSeparator, isExplodable }; + }, + /** + * This functiom deserialises parameter value based on param schema + * + * @param {*} param - OpenAPI Parameter object + * @param {String} paramValue - Parameter value to be deserialised + * @param {String} parameterSource - Specifies whether the schema being faked is from a request or response. + * @param {Object} components - OpenAPI components defined in the OAS spec. These are used to + * resolve references while generating params. + * @param {Object} schemaCache - object storing schemaFaker and schmeResolution caches + * @returns {*} - deserialises parameter value + */ + deserialiseParamValue: function(param, paramValue, parameterSource, components) { + var constructedValue, paramSchema = deref.resolveRefs(_2.cloneDeep(param.schema), parameterSource, components, {}), isEvenNumber = (num) => { + return num % 2 === 0; + }, convertToDataType = (value) => { + try { + return JSON.parse(value); + } catch (e) { + return value; + } + }; + if (!_2.isObject(param) || !_2.isString(paramValue)) { + return null; + } + let { startValue, propSeparator, keyValueSeparator, isExplodable } = this.getParamSerialisationInfo(param, parameterSource, components); + keyValueSeparator === "%20" && (keyValueSeparator = " "); + propSeparator === "%20" && (propSeparator = " "); + paramValue = paramValue.slice(paramValue.indexOf(startValue) === 0 ? startValue.length : 0); + paramSchema.type === "object" && (constructedValue = {}); + paramSchema.type === "array" && (constructedValue = []); + if (constructedValue) { + let allProps = paramValue.split(propSeparator); + _2.forEach(allProps, (element, index) => { + let keyValArray; + if (propSeparator === keyValueSeparator && isExplodable) { + if (isEvenNumber(index)) { + keyValArray = _2.slice(allProps, index, index + 2); + } else { + return; + } + } else if (isExplodable) { + keyValArray = element.split(keyValueSeparator); + } + if (paramSchema.type === "object") { + _2.set(constructedValue, keyValArray[0], convertToDataType(keyValArray[1])); + } else if (paramSchema.type === "array") { + constructedValue.push(convertToDataType(_2.get(keyValArray, "[1]", element))); + } + }); + } else { + constructedValue = paramValue; + } + return constructedValue; + }, + /** + * Parses media type from given content-type header or media type + * from content object into type and subtype + * + * @param {String} str - string to be parsed + * @returns {Object} - Parsed media type into type and subtype + */ + parseMediaType: function(str) { + let simpleMediaTypeRegExp = /^\s*([^\s\/;]+)\/([^;\s]+)\s*(?:;(.*))?$/, match = simpleMediaTypeRegExp.exec(str), type = "", subtype = ""; + if (match) { + type = _2.toLower(match[1]); + subtype = _2.toLower(match[2]); + } + return { type, subtype }; + }, + /** + * Extracts all child parameters from explodable param + * + * @param {*} schema - Corresponding schema object of parent parameter to be devided into child params + * @param {*} paramKey - Parameter name of parent param object + * @param {*} metaInfo - meta information of param (i.e. required) + * @returns {Array} - Extracted child parameters + */ + extractChildParamSchema: function(schema2, paramKey, metaInfo) { + let childParamSchemas = []; + _2.forEach(_2.get(schema2, "properties", {}), (value, key) => { + if (_2.get(value, "type") === "object") { + childParamSchemas = _2.concat(childParamSchemas, this.extractChildParamSchema( + value, + `${paramKey}[${key}]`, + metaInfo + )); + } else { + let required = _2.get(metaInfo, "required") || false, description = _2.get(metaInfo, "description") || "", pathPrefix = _2.get(metaInfo, "pathPrefix"); + childParamSchemas.push({ + name: `${paramKey}[${key}]`, + schema: value, + description, + required, + isResolvedParam: true, + pathPrefix + }); + } + }); + return childParamSchemas; + }, + /** + * Tests whether given parameter is of complex array type from param key + * + * @param {*} paramKey - Parmaeter key that is to be tested + * @returns {Boolean} - result + */ + isParamComplexArray: function(paramKey) { + let regex = /\[[\d]+\]/gm; + return regex.test(paramKey); + }, + /** + * Finds valid JSON media type object from content object + * + * @param {*} contentObj - Content Object from schema + * @returns {*} - valid JSON media type if exists + */ + getJsonContentType: function(contentObj) { + let jsonContentType = _2.find(_2.keys(contentObj), (contentType) => { + let mediaType = this.parseMediaType(contentType); + return mediaType.type === "application" && (mediaType.subtype === "json" || _2.endsWith(mediaType.subtype, "+json")); + }); + return jsonContentType; + }, + /** + * + * @param {String} property - one of QUERYPARAM, PATHVARIABLE, HEADER, BODY, RESPONSE_HEADER, RESPONSE_BODY + * @param {String} jsonPathPrefix - this will be prepended to all JSON schema paths on the request + * @param {String} txnParamName - Optional - The name of the param being validated (useful for query params, + * req headers, res headers) + * @param {*} value - the value of the property in the request + * @param {String} schemaPathPrefix - this will be prepended to all JSON schema paths on the schema + * @param {Object} openApiSchemaObj - The OpenAPI schema object against which to validate + * @param {String} parameterSourceOption tells that the schema object is of request or response + * @param {Object} components - Components in the spec that the schema might refer to + * @param {Object} options - Global options + * @param {Object} schemaCache object storing schemaFaker and schmeResolution caches + * @param {string} jsonSchemaDialect The schema dialect defined in the OAS object + * @param {Function} callback - For return + * @returns {Array} array of mismatches + */ + checkValueAgainstSchema: function(property, jsonPathPrefix, txnParamName, value, schemaPathPrefix, openApiSchemaObj, parameterSourceOption, components, options, schemaCache, jsonSchemaDialect, callback) { + let mismatches = [], jsonValue, humanPropName = propNames[property], needJsonMatching = property === "BODY" || property === "RESPONSE_BODY", invalidJson = false, valueToUse = value, schema2 = deref.resolveRefs(openApiSchemaObj, parameterSourceOption, components, { + resolveFor: PROCESSING_TYPE.VALIDATION, + resolveTo: "example", + stackLimit: options.stackLimit + }), compositeSchema = schema2.oneOf || schema2.anyOf; + if (needJsonMatching) { + try { + jsonValue = JSON.parse(value); + valueToUse = jsonValue; + } catch (e) { + jsonValue = ""; + invalidJson = true; + } + } + if (compositeSchema) { + async.map(compositeSchema, (elementSchema, cb) => { + setTimeout(() => { + this.checkValueAgainstSchema( + property, + jsonPathPrefix, + txnParamName, + value, + `${schemaPathPrefix}.${schema2.oneOf ? "oneOf" : "anyOf"}[${_2.findIndex(compositeSchema, elementSchema)}]`, + elementSchema, + parameterSourceOption, + components, + options, + schemaCache, + jsonSchemaDialect, + cb + ); + }, 0); + }, (err, results) => { + let sortedResults; + if (err) { + return callback(err, []); + } + sortedResults = _2.sortBy(results, (res) => { + return res.length; + }); + return callback(null, sortedResults[0]); + }); + } else if (schema2 && schema2.type) { + if (isKnownType(schema2)) { + let isCorrectType; + if (options.ignoreUnresolvedVariables && this.isPmVariable(valueToUse)) { + isCorrectType = true; + } else { + isCorrectType = checkIsCorrectType(valueToUse, schema2); + } + if (!isCorrectType) { + let reason = "", mismatchObj; + if (_2.includes(["QUERYPARAM", "PATHVARIABLE", "HEADER"], property) && (schema2.type === "object" || schema2.type === "array")) { + return callback(null, []); + } + if (property === "RESPONSE_BODY" || property === "BODY") { + reason = "The " + humanPropName; + } else if (txnParamName) { + reason = `The ${humanPropName} "${txnParamName}"`; + } else { + reason = `A ${humanPropName}`; + } + reason += ` needs to be of type ${schema2.type}, but we found `; + if (!options.shortValidationErrors) { + reason += `"${valueToUse}"`; + } else if (invalidJson) { + reason += "invalid JSON"; + } else if (Array.isArray(valueToUse)) { + reason += "an array instead"; + } else if (typeof valueToUse === "object") { + reason += "an object instead"; + } else { + reason += `a ${typeof valueToUse} instead`; + } + mismatchObj = { + property, + transactionJsonPath: jsonPathPrefix, + schemaJsonPath: schemaPathPrefix, + reasonCode: "INVALID_TYPE", + reason + }; + if (options.suggestAvailableFixes) { + mismatchObj.suggestedFix = { + key: txnParamName, + actualValue: valueToUse, + suggestedValue: safeSchemaFaker( + openApiSchemaObj || {}, + "example", + PROCESSING_TYPE.VALIDATION, + parameterSourceOption, + components, + SCHEMA_FORMATS.DEFAULT, + schemaCache, + options.includeDeprecated + ) + }; + } + return callback(null, [mismatchObj]); + } + if (isCorrectType && needJsonMatching) { + let filteredValidationError = validateSchema(schema2, valueToUse, options, jsonSchemaDialect); + if (!_2.isEmpty(filteredValidationError)) { + let mismatchObj, suggestedValue, fakedValue = safeSchemaFaker( + openApiSchemaObj || {}, + "example", + PROCESSING_TYPE.VALIDATION, + parameterSourceOption, + components, + SCHEMA_FORMATS.DEFAULT, + schemaCache, + options + ); + if (options.detailedBlobValidation && needJsonMatching) { + _2.forEach(filteredValidationError, (ajvError) => { + let localSchemaPath = ajvError.schemaPath.replace(/\//g, ".").slice(2), dataPath = formatDataPath(ajvError.instancePath || ""); + if (dataPath[0] === ".") { + dataPath = dataPath.slice(1); + } + mismatchObj = _2.assign({ + property, + transactionJsonPath: jsonPathPrefix + formatDataPath(ajvError.instancePath), + schemaJsonPath: schemaPathPrefix + "." + localSchemaPath + }, ajvValidationError(ajvError, { property, humanPropName })); + if (options.suggestAvailableFixes) { + mismatchObj.suggestedFix = { + key: _2.split(dataPath, ".").pop(), + actualValue: this.getPathValue(valueToUse, dataPath, null), + suggestedValue: this.getSuggestedValue(fakedValue, valueToUse, ajvError) + }; + } + mismatches.push(mismatchObj); + }); + } else { + mismatchObj = { + reason: `The ${humanPropName} didn't match the specified schema`, + reasonCode: "INVALID_TYPE" + }; + if (property === "BODY") { + mismatchObj.reasonCode = "INVALID_BODY"; + } else if (property === "RESPONSE_BODY") { + mismatchObj.reasonCode = "INVALID_RESPONSE_BODY"; + } + if (options.suggestAvailableFixes) { + suggestedValue = _2.cloneDeep(valueToUse); + _2.forEach(filteredValidationError, (ajvError) => { + let dataPath = formatDataPath(ajvError.instancePath || ""); + if (dataPath[0] === ".") { + dataPath = dataPath.slice(1); + } + if (dataPath === "") { + suggestedValue = this.getSuggestedValue(fakedValue, suggestedValue, ajvError); + } else { + _2.set(suggestedValue, dataPath, this.getSuggestedValue(fakedValue, suggestedValue, ajvError)); + } + }); + mismatchObj.suggestedFix = { + key: property.toLowerCase(), + actualValue: valueToUse, + suggestedValue + }; + } + mismatches.push(_2.assign({ + property, + transactionJsonPath: jsonPathPrefix, + schemaJsonPath: schemaPathPrefix + }, mismatchObj)); + } + return callback(null, mismatches); + } + return callback(null, []); + } else if (needJsonMatching) { + return callback(null, [{ + property, + transactionJsonPath: jsonPathPrefix, + schemaJsonPath: schemaPathPrefix, + reasonCode: "INVALID_TYPE", + reason: `The ${humanPropName} needs to be of type object/array, but we found "${valueToUse}"`, + suggestedFix: { + key: null, + actualValue: valueToUse, + suggestedValue: {} + // suggest value to be object + } + }]); + } else { + return callback(null, []); + } + } else { + return callback(null, []); + } + } else { + return callback(null, []); + } + }, + /** + * + * @param {*} matchedPathData the matchedPath data + * @param {*} transactionPathPrefix the jsonpath for this validation (will be prepended to all identified mismatches) + * @param {*} schemaPath the applicable pathItem defined at the schema level + * @param {*} components the components + paths from the OAS spec that need to be used to resolve $refs + * @param {*} options OAS options + * @param {*} schemaCache object storing schemaFaker and schmeResolution caches + * @param {string} jsonSchemaDialect Defined schema dialect at the OAS object + * @param {*} callback Callback + * @returns {array} mismatches (in the callback) + */ + checkPathVariables: function(matchedPathData, transactionPathPrefix, schemaPath, components, options, schemaCache, jsonSchemaDialect, callback) { + var mismatchProperty = "PATHVARIABLE", schemaPathVariables, pmPathVariables, determinedPathVariables = matchedPathData.pathVariables, unmatchedVariablesFromTransaction = matchedPathData.unmatchedVariablesFromTransaction; + if (options.validationPropertiesToIgnore.includes(mismatchProperty)) { + return callback(null, []); + } + pmPathVariables = this.findPathVariablesFromSchemaPath(schemaPath.schemaPathName); + schemaPathVariables = _2.filter(schemaPath.parameters, (param) => { + return param.in === "path" && _2.includes(pmPathVariables, param.name); + }); + async.map(determinedPathVariables, (pathVar, cb) => { + let mismatches = [], resolvedParamValue, index = _2.findIndex(determinedPathVariables, pathVar); + const schemaPathVar = _2.find(schemaPathVariables, (param) => { + return param.name === pathVar.key; + }); + if (!schemaPathVar) { + if (options.showMissingInSchemaErrors) { + mismatches.push({ + property: mismatchProperty, + // not adding the pathVar name to the jsonPath because URL is just a string + transactionJsonPath: transactionPathPrefix + `[${index}]`, + schemaJsonPath: null, + reasonCode: "MISSING_IN_SCHEMA", + reason: `The path variable "${pathVar.key}" was not found in the schema` + }); + } + return cb(null, mismatches); + } + if (!pathVar._varMatched && !options.allowUrlPathVarMatching) { + return cb(null, mismatches); + } + this.assignParameterExamples(schemaPathVar); + resolvedParamValue = this.deserialiseParamValue( + schemaPathVar, + pathVar.value, + PARAMETER_SOURCE.REQUEST, + components, + schemaCache + ); + setTimeout(() => { + if (!(schemaPathVar && schemaPathVar.schema)) { + return cb(null, []); + } + this.checkValueAgainstSchema( + mismatchProperty, + transactionPathPrefix + `[${index}].value`, + pathVar.key, + resolvedParamValue, + schemaPathVar.pathPrefix + "[?(@.name=='" + schemaPathVar.name + "')]", + schemaPathVar.schema, + PARAMETER_SOURCE.REQUEST, + components, + options, + schemaCache, + jsonSchemaDialect, + cb + ); + }, 0); + }, (err, res) => { + let mismatches = [], mismatchObj; + const unmatchedSchemaVariableNames = determinedPathVariables.filter((pathVariable) => { + return !pathVariable._varMatched; + }).map((schemaPathVar) => { + return schemaPathVar.key; + }); + if (err) { + return callback(err); + } + _2.each(schemaPathVariables, (pathVar, index) => { + if (!_2.find(determinedPathVariables, (param) => { + return param.key === pathVar.name && (options.allowUrlPathVarMatching || param._varMatched); + })) { + let reasonCode = "MISSING_IN_REQUEST", reason, actualValue2, currentUnmatchedVariableInTransaction = unmatchedVariablesFromTransaction[index], isInvalidValue = currentUnmatchedVariableInTransaction !== void 0; + if (unmatchedSchemaVariableNames.length > 0 && isInvalidValue) { + reason = `The ${currentUnmatchedVariableInTransaction.key} path variable does not match with path variable expected (${unmatchedSchemaVariableNames[index]}) in the schema at this position`; + actualValue2 = { + key: currentUnmatchedVariableInTransaction.key, + description: this.getParameterDescription(currentUnmatchedVariableInTransaction), + value: currentUnmatchedVariableInTransaction.value + }; + } else { + reason = `The required path variable "${pathVar.name}" was not found in the transaction`; + actualValue2 = null; + } + this.assignParameterExamples(pathVar); + mismatchObj = { + property: mismatchProperty, + transactionJsonPath: transactionPathPrefix, + schemaJsonPath: pathVar.pathPrefix, + reasonCode, + reason + }; + if (options.suggestAvailableFixes) { + mismatchObj.suggestedFix = { + key: pathVar.name, + actualValue: actualValue2, + suggestedValue: { + key: pathVar.name, + value: safeSchemaFaker( + pathVar.schema || {}, + "example", + PROCESSING_TYPE.VALIDATION, + PARAMETER_SOURCE.REQUEST, + components, + SCHEMA_FORMATS.DEFAULT, + schemaCache, + options + ), + description: this.getParameterDescription(pathVar) + } + }; + } + mismatches.push(mismatchObj); + } + }); + return callback(null, _2.concat(_2.flatten(res), mismatches)); + }); + }, + /** + * + * @param {*} transaction Transaction with which to compare + * @param {*} transactionPathPrefix the jsonpath for this validation (will be prepended to all identified mismatches) + * @param {*} schemaPath the applicable pathItem defined at the schema level + * @param {*} pathRoute Route to applicable pathItem (i.e. 'GET /users/{userID}') + * @param {*} options OAS options + * @param {*} callback Callback + * @returns {array} mismatches (in the callback) + */ + checkMetadata(transaction, transactionPathPrefix, schemaPath, pathRoute, options, callback) { + let expectedReqName, expectedReqDesc, reqNameMismatch, actualReqName = _2.get(transaction, "name"), trimmedReqName, actualReqDesc, mismatches = [], mismatchObj, reqUrl; + if (!options.validateMetadata) { + return callback(null, []); + } + trimmedReqName = utils.trimRequestName(actualReqName); + reqUrl = this.fixPathVariablesInUrl(pathRoute.slice(pathRoute.indexOf("/"))); + reqUrl = this.sanitizeUrlPathParams(reqUrl, []).url; + actualReqDesc = _2.isObject(_2.get(transaction, "request.description")) ? _2.get(transaction, "request.description.content") : _2.get(transaction, "request.description"); + expectedReqDesc = schemaPath.description; + switch (options.requestNameSource) { + case "fallback": { + expectedReqName = schemaPath.summary || utils.insertSpacesInName(schemaPath.operationId) || reqUrl; + expectedReqName = utils.trimRequestName(expectedReqName); + reqNameMismatch = trimmedReqName !== expectedReqName; + break; + } + case "url": { + expectedReqName = reqUrl; + reqNameMismatch = !_2.endsWith(actualReqName, reqUrl); + break; + } + default: { + expectedReqName = schemaPath[options.requestNameSource]; + expectedReqName = utils.trimRequestName(expectedReqName); + reqNameMismatch = trimmedReqName !== expectedReqName; + break; + } + } + if (reqNameMismatch) { + mismatchObj = { + property: "REQUEST_NAME", + transactionJsonPath: transactionPathPrefix + ".name", + schemaJsonPath: null, + reasonCode: "INVALID_VALUE", + reason: "The request name didn't match with specified schema" + }; + options.suggestAvailableFixes && (mismatchObj.suggestedFix = { + key: "name", + actualValue: actualReqName || null, + suggestedValue: expectedReqName + }); + mismatches.push(mismatchObj); + } + if ((!_2.isEmpty(actualReqDesc) || !_2.isEmpty(expectedReqDesc)) && actualReqDesc !== expectedReqDesc) { + mismatchObj = { + property: "REQUEST_DESCRIPTION", + transactionJsonPath: transactionPathPrefix + ".request.description", + schemaJsonPath: null, + reasonCode: "INVALID_VALUE", + reason: "The request description didn't match with specified schema" + }; + options.suggestAvailableFixes && (mismatchObj.suggestedFix = { + key: "description", + actualValue: actualReqDesc || null, + suggestedValue: expectedReqDesc + }); + mismatches.push(mismatchObj); + } + return callback(null, mismatches); + }, + checkQueryParams(requestUrl, transactionPathPrefix, schemaPath, components, options, schemaCache, jsonSchemaDialect, callback) { + let parsedUrl = require("url").parse(requestUrl), schemaParams = _2.filter(schemaPath.parameters, (param) => { + return param.in === "query"; + }), requestQueryArray = [], requestQueryParams = [], resolvedSchemaParams = [], mismatchProperty = "QUERYPARAM", securityParams, urlMalformedError; + if (options.validationPropertiesToIgnore.includes(mismatchProperty)) { + return callback(null, []); + } + if (!parsedUrl.query) { + parsedUrl.query = ""; + } + requestQueryArray = parsedUrl.query.split("&"); + _2.each(requestQueryArray, (rqp) => { + let parts = rqp.split("="), qKey, qVal; + try { + qKey = decodeURIComponent(parts[0]); + qVal = decodeURIComponent(parts.slice(1).join("=")); + } catch (err) { + return urlMalformedError = err; + } + if (qKey.length > 0) { + requestQueryParams.push({ + key: qKey, + value: qVal + }); + } + }); + if (urlMalformedError) { + return callback(urlMalformedError); + } + securityParams = _2.map(this.getSecurityParams(_2.get(components, "components"), "query"), "name"); + requestQueryParams = _2.filter(requestQueryParams, (pQuery) => { + return !_2.includes(securityParams, pQuery.key); + }); + _2.forEach(schemaParams, (param) => { + let pathPrefix = param.pathPrefix, paramSchema = deref.resolveRefs(_2.cloneDeep(param.schema), PARAMETER_SOURCE.REQUEST, components, {}), { style, explode } = this.getParamSerialisationInfo(param, PARAMETER_SOURCE.REQUEST, components), isPropSeparable = _2.includes(["form", "deepObject"], style); + if (isPropSeparable && paramSchema.type === "array" && explode) { + if (!_2.includes(["array", "object"], _2.get(paramSchema, "items.type"))) { + resolvedSchemaParams.push(_2.assign({}, param, { + schema: _2.get(paramSchema, "items"), + isResolvedParam: true + })); + } + } else if (isPropSeparable && paramSchema.type === "object" && explode) { + if (style === "deepObject") { + resolvedSchemaParams = _2.concat(resolvedSchemaParams, this.extractChildParamSchema( + paramSchema, + param.name, + { required: _2.get(param, "required"), pathPrefix, description: _2.get(param, "description") } + )); + } else { + _2.forEach(_2.get(paramSchema, "properties", {}), (propSchema, propName) => { + resolvedSchemaParams.push({ + name: propName, + schema: propSchema, + required: _2.get(param, "required") || false, + description: _2.get(param, "description"), + isResolvedParam: true, + pathPrefix + }); + }); + } + } else { + resolvedSchemaParams.push(param); + } + }); + return async.map(requestQueryParams, (pQuery, cb) => { + let mismatches = [], index = _2.findIndex(requestQueryParams, pQuery), resolvedParamValue = pQuery.value; + const schemaParam = _2.find(resolvedSchemaParams, (param) => { + return param.name === pQuery.key; + }); + if (!schemaParam) { + if (this.isParamComplexArray(pQuery.key)) { + return cb(null, mismatches); + } + if (options.showMissingInSchemaErrors) { + mismatches.push({ + property: mismatchProperty, + transactionJsonPath: transactionPathPrefix + `[${index}]`, + schemaJsonPath: null, + reasonCode: "MISSING_IN_SCHEMA", + reason: `The query parameter ${pQuery.key} was not found in the schema` + }); + } + return cb(null, mismatches); + } + this.assignParameterExamples(schemaParam); + if (!schemaParam.isResolvedParam) { + resolvedParamValue = this.deserialiseParamValue( + schemaParam, + pQuery.value, + PARAMETER_SOURCE.REQUEST, + components, + schemaCache + ); + } + setTimeout(() => { + if (!schemaParam.schema) { + return cb(null, []); + } + this.checkValueAgainstSchema( + mismatchProperty, + transactionPathPrefix + `[${index}].value`, + pQuery.key, + resolvedParamValue, + schemaParam.pathPrefix + "[?(@.name=='" + schemaParam.name + "')]", + schemaParam.schema, + PARAMETER_SOURCE.REQUEST, + components, + options, + schemaCache, + jsonSchemaDialect, + cb + ); + }, 0); + }, (err, res) => { + let mismatches = [], mismatchObj; + _2.each(_2.filter(resolvedSchemaParams, (q) => { + return q.required; + }), (qp) => { + if (!_2.find(requestQueryParams, (param) => { + return param.key === qp.name; + })) { + this.assignParameterExamples(qp); + mismatchObj = { + property: mismatchProperty, + transactionJsonPath: transactionPathPrefix, + schemaJsonPath: qp.pathPrefix + "[?(@.name=='" + qp.name + "')]", + reasonCode: "MISSING_IN_REQUEST", + reason: `The required query parameter "${qp.name}" was not found in the transaction` + }; + if (options.suggestAvailableFixes) { + mismatchObj.suggestedFix = { + key: qp.name, + actualValue: null, + suggestedValue: { + key: qp.name, + value: safeSchemaFaker( + qp.schema || {}, + "example", + PROCESSING_TYPE.VALIDATION, + PARAMETER_SOURCE.REQUEST, + components, + SCHEMA_FORMATS.DEFAULT, + schemaCache, + options + ), + description: this.getParameterDescription(qp) + } + }; + } + mismatches.push(mismatchObj); + } + }); + return callback(null, _2.concat(_2.flatten(res), mismatches)); + }); + }, + /** + * Gives mismtach for content type header for request/response + * + * @param {Array} headers - Transaction Headers + * @param {String} transactionPathPrefix - Transaction Path to headers + * @param {String} schemaPathPrefix - Schema path to content object + * @param {Object} contentObj - Corresponding Schema content object + * @param {String} mismatchProperty - Mismatch property (HEADER / RESPONSE_HEADER) + * @param {*} options - OAS options, check lib/options.js for more + * @returns {Array} found mismatch objects + */ + checkContentTypeHeader: function(headers, transactionPathPrefix, schemaPathPrefix, contentObj, mismatchProperty, options) { + let mediaTypes = [], contentHeader, contentHeaderIndex, contentHeaderMediaType, suggestedContentHeader, hasComputedType, humanPropName = mismatchProperty === "HEADER" ? "header" : "response header", mismatches = []; + _2.forEach(_2.keys(contentObj), (contentType) => { + let contentMediaType = this.parseMediaType(contentType); + mediaTypes.push({ + type: contentMediaType.type, + subtype: contentMediaType.subtype, + contentType: contentMediaType.type + "/" + contentMediaType.subtype + }); + }); + _2.forEach(mediaTypes, (mediaType) => { + let headerFamily = this.getHeaderFamily(mediaType.contentType); + if (headerFamily !== HEADER_TYPE.INVALID) { + suggestedContentHeader = mediaType.contentType; + hasComputedType = true; + if (headerFamily === HEADER_TYPE.JSON) { + return false; + } + } + }); + if (!hasComputedType && mediaTypes.length > 0) { + suggestedContentHeader = mediaTypes[0].contentType; + hasComputedType = true; + } + _2.forEach(headers, (header, index) => { + if (_2.toLower(header.key) === "content-type") { + let mediaType = this.parseMediaType(header.value); + contentHeader = header; + contentHeaderIndex = index; + contentHeaderMediaType = mediaType.type + "/" + mediaType.subtype; + return false; + } + }); + if (!_2.isEmpty(contentHeader) && _2.isEmpty(mediaTypes)) { + if (options.showMissingInSchemaErrors && _2.toLower(contentHeaderMediaType) !== TEXT_PLAIN) { + mismatches.push({ + property: mismatchProperty, + transactionJsonPath: transactionPathPrefix + `[${contentHeaderIndex}]`, + schemaJsonPath: null, + reasonCode: "MISSING_IN_SCHEMA", + // Reason for missing in schema suggests that certain media type in req/res body is not present + reason: `The ${mismatchProperty === "HEADER" ? "request" : "response"} body should have media type "${contentHeaderMediaType}"` + }); + } + } else if (_2.isEmpty(contentHeader) && !_2.isEmpty(mediaTypes)) { + let mismatchObj = { + property: mismatchProperty, + transactionJsonPath: transactionPathPrefix, + schemaJsonPath: schemaPathPrefix, + reasonCode: "MISSING_IN_REQUEST", + reason: `The ${humanPropName} "Content-Type" was not found in the transaction` + }; + if (options.suggestAvailableFixes) { + mismatchObj.suggestedFix = { + key: "Content-Type", + actualValue: null, + suggestedValue: { + key: "Content-Type", + value: suggestedContentHeader + } + }; + } + mismatches.push(mismatchObj); + } else if (!_2.isEmpty(contentHeader)) { + let mismatchObj, matched = false; + _2.forEach(mediaTypes, (mediaType) => { + let transactionHeader = _2.split(contentHeaderMediaType, "/"), headerTypeMatched = mediaType.type === "*" || mediaType.type === transactionHeader[0], headerSubtypeMatched = mediaType.subtype === "*" || mediaType.subtype === transactionHeader[1]; + if (headerTypeMatched && headerSubtypeMatched) { + matched = true; + } + }); + if (!matched) { + mismatchObj = { + property: mismatchProperty, + transactionJsonPath: transactionPathPrefix + `[${contentHeaderIndex}].value`, + schemaJsonPath: schemaPathPrefix, + reasonCode: "INVALID_TYPE", + reason: `The ${humanPropName} "Content-Type" needs to be "${suggestedContentHeader}", but we found "${contentHeaderMediaType}" instead` + }; + if (options.suggestAvailableFixes) { + mismatchObj.suggestedFix = { + key: "Content-Type", + actualValue: contentHeader.value, + suggestedValue: suggestedContentHeader + }; + } + mismatches.push(mismatchObj); + } + } + return mismatches; + }, + checkRequestHeaders: function(headers, transactionPathPrefix, schemaPathPrefix, schemaPath, components, options, schemaCache, jsonSchemaDialect, callback) { + let schemaHeaders = _2.filter(schemaPath.parameters, (param) => { + return param.in === "header"; + }), securityHeaders = _2.map(this.getSecurityParams(_2.get(components, "components"), "header"), "name"), reqHeaders = _2.filter(headers, (header) => { + return !_2.includes(IMPLICIT_HEADERS, _2.toLower(_2.get(header, "key"))) && !_2.includes(securityHeaders, header.key); + }), mismatchProperty = "HEADER"; + if (options.validationPropertiesToIgnore.includes(mismatchProperty)) { + return callback(null, []); + } + return async.map(reqHeaders, (pHeader, cb) => { + let mismatches = [], resolvedParamValue, index = _2.findIndex(headers, pHeader); + const schemaHeader = _2.find(schemaHeaders, (header) => { + return header.name === pHeader.key; + }); + if (!schemaHeader) { + if (options.showMissingInSchemaErrors) { + mismatches.push({ + property: mismatchProperty, + transactionJsonPath: transactionPathPrefix + `[${index}]`, + schemaJsonPath: null, + reasonCode: "MISSING_IN_SCHEMA", + reason: `The header ${pHeader.key} was not found in the schema` + }); + } + return cb(null, mismatches); + } + this.assignParameterExamples(schemaHeader); + resolvedParamValue = this.deserialiseParamValue( + schemaHeader, + pHeader.value, + PARAMETER_SOURCE.REQUEST, + components, + schemaCache + ); + setTimeout(() => { + if (!schemaHeader.schema) { + return cb(null, []); + } + this.checkValueAgainstSchema( + mismatchProperty, + transactionPathPrefix + `[${index}].value`, + pHeader.key, + resolvedParamValue, + schemaHeader.pathPrefix + "[?(@.name=='" + schemaHeader.name + "')]", + schemaHeader.schema, + PARAMETER_SOURCE.REQUEST, + components, + options, + schemaCache, + jsonSchemaDialect, + cb + ); + }, 0); + }, (err, res) => { + let mismatches = [], mismatchObj, reqBody = _2.get(schemaPath, "requestBody"), contentHeaderMismatches = []; + if (reqBody) { + if (_2.has(reqBody, "$ref")) { + reqBody = this.getRefObject(reqBody.$ref, components, options); + } + contentHeaderMismatches = this.checkContentTypeHeader( + headers, + transactionPathPrefix, + schemaPathPrefix + ".requestBody.content", + _2.get(reqBody, "content"), + mismatchProperty, + options + ); + } + _2.each(_2.filter(schemaHeaders, (h) => { + return h.required && !_2.includes(IMPLICIT_HEADERS, _2.toLower(h.name)); + }), (header) => { + if (!_2.find(reqHeaders, (param) => { + return param.key === header.name; + })) { + this.assignParameterExamples(header); + mismatchObj = { + property: mismatchProperty, + transactionJsonPath: transactionPathPrefix, + schemaJsonPath: header.pathPrefix + "[?(@.name=='" + header.name + "')]", + reasonCode: "MISSING_IN_REQUEST", + reason: `The required header "${header.name}" was not found in the transaction` + }; + if (options.suggestAvailableFixes) { + mismatchObj.suggestedFix = { + key: header.name, + actualValue: null, + suggestedValue: { + key: header.name, + value: safeSchemaFaker( + header.schema || {}, + "example", + PROCESSING_TYPE.VALIDATION, + PARAMETER_SOURCE.REQUEST, + components, + SCHEMA_FORMATS.DEFAULT, + schemaCache, + options + ), + description: this.getParameterDescription(header) + } + }; + } + mismatches.push(mismatchObj); + } + }); + return callback(null, _2.concat(contentHeaderMismatches, _2.flatten(res), mismatches)); + }); + }, + checkResponseHeaders: function(schemaResponse, headers, transactionPathPrefix, schemaPathPrefix, components, options, schemaCache, jsonSchemaDialect, callback) { + let schemaHeaders, resHeaders = _2.filter(headers, (header) => { + return !_2.includes(IMPLICIT_HEADERS, _2.toLower(_2.get(header, "key"))); + }), mismatchProperty = "RESPONSE_HEADER"; + if (options.validationPropertiesToIgnore.includes(mismatchProperty)) { + return callback(null, []); + } + if (!schemaResponse) { + return callback(null, []); + } + schemaHeaders = schemaResponse.headers; + return async.map(resHeaders, (pHeader, cb) => { + let mismatches = [], index = _2.findIndex(headers, pHeader); + const schemaHeader = _2.get(schemaHeaders, pHeader.key); + if (!schemaHeader) { + if (options.showMissingInSchemaErrors) { + mismatches.push({ + property: mismatchProperty, + transactionJsonPath: transactionPathPrefix + `[${index}]`, + schemaJsonPath: schemaPathPrefix + ".headers", + reasonCode: "MISSING_IN_SCHEMA", + reason: `The header ${pHeader.key} was not found in the schema` + }); + } + return cb(null, mismatches); + } + this.assignParameterExamples(schemaHeader); + setTimeout(() => { + if (!schemaHeader.schema) { + return cb(null, []); + } + return this.checkValueAgainstSchema( + mismatchProperty, + transactionPathPrefix + `[${index}].value`, + pHeader.key, + pHeader.value, + schemaPathPrefix + ".headers[" + pHeader.key + "]", + schemaHeader.schema, + PARAMETER_SOURCE.RESPONSE, + components, + options, + schemaCache, + jsonSchemaDialect, + cb + ); + }, 0); + }, (err, res) => { + let mismatches = [], mismatchObj, contentHeaderMismatches = this.checkContentTypeHeader( + headers, + transactionPathPrefix, + schemaPathPrefix + ".content", + _2.get(schemaResponse, "content"), + mismatchProperty, + options + ); + _2.each(_2.filter(schemaHeaders, (h, hName) => { + if (_2.isEmpty(h)) { + return false; + } + h.name = hName; + return h.required && !_2.includes(IMPLICIT_HEADERS, _2.toLower(hName)); + }), (header) => { + if (!_2.find(resHeaders, (param) => { + return param.key === header.name; + })) { + this.assignParameterExamples(header); + mismatchObj = { + property: mismatchProperty, + transactionJsonPath: transactionPathPrefix, + schemaJsonPath: schemaPathPrefix + ".headers['" + header.name + "']", + reasonCode: "MISSING_IN_REQUEST", + reason: `The required response header "${header.name}" was not found in the transaction` + }; + if (options.suggestAvailableFixes) { + mismatchObj.suggestedFix = { + key: header.name, + actualValue: null, + suggestedValue: { + key: header.name, + value: safeSchemaFaker( + header.schema || {}, + "example", + PROCESSING_TYPE.VALIDATION, + PARAMETER_SOURCE.REQUEST, + components, + SCHEMA_FORMATS.DEFAULT, + schemaCache, + options + ), + description: this.getParameterDescription(header) + } + }; + } + mismatches.push(mismatchObj); + } + }); + callback(null, _2.concat(contentHeaderMismatches, _2.flatten(res), mismatches)); + }); + }, + // Only application/json and application/x-www-form-urlencoded is validated for now + checkRequestBody: function(requestBody, transactionPathPrefix, schemaPathPrefix, schemaPath, components, options, schemaCache, jsonSchemaDialect, callback) { + let jsonSchemaBody, jsonContentType, mismatchProperty = "BODY"; + if (options.validationPropertiesToIgnore.includes(mismatchProperty)) { + return callback(null, []); + } + if (!_2.isEmpty(_2.get(schemaPath, "requestBody.$ref"))) { + schemaPath.requestBody = this.getRefObject(schemaPath.requestBody.$ref, components, options); + } + jsonContentType = this.getJsonContentType(_2.get(schemaPath, "requestBody.content", {})); + jsonSchemaBody = _2.get(schemaPath, ["requestBody", "content", jsonContentType, "schema"]); + if (requestBody && requestBody.mode === "raw" && jsonSchemaBody) { + setTimeout(() => { + return this.checkValueAgainstSchema( + mismatchProperty, + transactionPathPrefix, + null, + // no param name for the request body + requestBody.raw, + schemaPathPrefix + ".requestBody.content[" + jsonContentType + "].schema", + jsonSchemaBody, + PARAMETER_SOURCE.REQUEST, + components, + _2.extend({}, options, { shortValidationErrors: true }), + schemaCache, + jsonSchemaDialect, + callback + ); + }, 0); + } else if (requestBody && requestBody.mode === "urlencoded") { + let urlencodedBodySchema = _2.get(schemaPath, ["requestBody", "content", URLENCODED, "schema"]), resolvedSchemaParams = [], pathPrefix = `${schemaPathPrefix}.requestBody.content[${URLENCODED}].schema`; + urlencodedBodySchema = deref.resolveRefs(urlencodedBodySchema, PARAMETER_SOURCE.REQUEST, components, { + resolveFor: PROCESSING_TYPE.VALIDATION, + stackLimit: options.stackLimit + }); + _2.forEach(_2.get(urlencodedBodySchema, "properties"), (propSchema, propName) => { + let resolvedProp = { + name: propName, + schema: propSchema, + in: "query", + // serialization follows same behaviour as query params + description: _2.get(propSchema, "description") || "" + }, encodingValue = _2.get(schemaPath, ["requestBody", "content", URLENCODED, "encoding", propName]), pSerialisationInfo, isPropSeparable; + if (_2.isObject(encodingValue)) { + _2.has(encodingValue, "style") && (resolvedProp.style = encodingValue.style); + _2.has(encodingValue, "explode") && (resolvedProp.explode = encodingValue.explode); + } + if (_2.includes(_2.get(urlencodedBodySchema, "required"), propName)) { + resolvedProp.required = true; + } + pSerialisationInfo = this.getParamSerialisationInfo( + resolvedProp, + PARAMETER_SOURCE.REQUEST, + components + ); + isPropSeparable = _2.includes(["form", "deepObject"], pSerialisationInfo.style); + if (isPropSeparable && propSchema.type === "array" && pSerialisationInfo.explode) { + if (!_2.includes(["array", "object"], _2.get(propSchema, "items.type"))) { + resolvedSchemaParams.push(_2.assign({}, resolvedProp, { + schema: _2.get(propSchema, "items"), + isResolvedParam: true + })); + } + } else if (isPropSeparable && propSchema.type === "object" && pSerialisationInfo.explode) { + if (pSerialisationInfo.style === "deepObject") { + resolvedSchemaParams = _2.concat(resolvedSchemaParams, this.extractChildParamSchema( + propSchema, + propName, + { required: resolvedProp.required || false, description: resolvedProp.description } + )); + } else { + _2.forEach(_2.get(propSchema, "properties", {}), (value, key) => { + resolvedSchemaParams.push({ + name: key, + schema: value, + isResolvedParam: true, + required: resolvedProp.required || false, + description: resolvedProp.description + }); + }); + } + } else { + resolvedSchemaParams.push(resolvedProp); + } + }); + return async.map(requestBody.urlencoded, (uParam, cb) => { + let mismatches = [], index = _2.findIndex(requestBody.urlencoded, uParam), resolvedParamValue = uParam.value; + const schemaParam = _2.find(resolvedSchemaParams, (param) => { + return param.name === uParam.key; + }); + if (!schemaParam) { + if (this.isParamComplexArray(uParam.key)) { + return cb(null, mismatches); + } + if (options.showMissingInSchemaErrors) { + mismatches.push({ + property: mismatchProperty, + transactionJsonPath: transactionPathPrefix + `.urlencoded[${index}]`, + schemaJsonPath: null, + reasonCode: "MISSING_IN_SCHEMA", + reason: `The Url Encoded body param "${uParam.key}" was not found in the schema` + }); + } + return cb(null, mismatches); + } + if (!schemaParam.isResolvedParam) { + resolvedParamValue = this.deserialiseParamValue( + schemaParam, + uParam.value, + PARAMETER_SOURCE.REQUEST, + components, + schemaCache + ); + } + schemaParam.actualValue = uParam.value; + setTimeout(() => { + if (!schemaParam.schema) { + return cb(null, []); + } + this.checkValueAgainstSchema( + mismatchProperty, + transactionPathPrefix + `.urlencoded[${index}].value`, + uParam.key, + resolvedParamValue, + pathPrefix + ".properties[" + schemaParam.name + "]", + schemaParam.schema, + PARAMETER_SOURCE.REQUEST, + components, + options, + schemaCache, + jsonSchemaDialect, + cb + ); + }, 0); + }, (err, res) => { + let mismatches = [], mismatchObj, getPropNameFromSchemPath = (schemaPath2) => { + let regex = /\.properties\[(.+)\]/gm; + return _2.last(regex.exec(schemaPath2)); + }; + _2.forEach(_2.flatten(res), (mismatchObj2) => { + if (!_2.isEmpty(mismatchObj2)) { + let propertyName = getPropNameFromSchemPath(mismatchObj2.schemaJsonPath), schemaParam = _2.find(resolvedSchemaParams, (param) => { + return param.name === propertyName; + }), serializedParamValue; + if (schemaParam) { + serializedParamValue = _2.get( + this.convertParamsWithStyle(schemaParam, _2.get( + mismatchObj2, + "suggestedFix.suggestedValue" + ), PARAMETER_SOURCE.REQUEST, components, schemaCache, options), + "[0].value" + ); + _2.set(mismatchObj2, "suggestedFix.actualValue", schemaParam.actualValue); + _2.set(mismatchObj2, "suggestedFix.suggestedValue", serializedParamValue); + } + } + }); + _2.each(resolvedSchemaParams, (uParam) => { + if (!_2.find(requestBody.urlencoded, (param) => { + return param.key === uParam.name; + }) && uParam.required) { + mismatchObj = { + property: mismatchProperty, + transactionJsonPath: transactionPathPrefix + ".urlencoded", + schemaJsonPath: pathPrefix + ".properties[" + uParam.name + "]", + reasonCode: "MISSING_IN_REQUEST", + reason: `The Url Encoded body param "${uParam.name}" was not found in the transaction` + }; + if (options.suggestAvailableFixes) { + mismatchObj.suggestedFix = { + key: uParam.name, + actualValue: null, + suggestedValue: { + key: uParam.name, + value: safeSchemaFaker( + uParam.schema || {}, + "example", + PROCESSING_TYPE.VALIDATION, + PARAMETER_SOURCE.REQUEST, + components, + SCHEMA_FORMATS.DEFAULT, + schemaCache, + options + ), + description: this.getParameterDescription(uParam) + } + }; + } + mismatches.push(mismatchObj); + } + }); + return callback(null, _2.concat(_2.flatten(res), mismatches)); + }); + } else { + return callback(null, []); + } + }, + checkResponseBody: function(schemaResponse, body, transactionPathPrefix, schemaPathPrefix, components, options, schemaCache, jsonSchemaDialect, callback) { + let schemaContent, jsonContentType, mismatchProperty = "RESPONSE_BODY"; + if (options.validationPropertiesToIgnore.includes(mismatchProperty)) { + return callback(null, []); + } + jsonContentType = this.getJsonContentType(_2.get(schemaResponse, "content", {})); + schemaContent = _2.get(schemaResponse, ["content", jsonContentType, "schema"]); + if (!schemaContent) { + return callback(null, []); + } + setTimeout(() => { + return this.checkValueAgainstSchema( + mismatchProperty, + transactionPathPrefix, + null, + // no param name for the response body + body, + schemaPathPrefix + ".content[" + jsonContentType + "].schema", + schemaContent, + PARAMETER_SOURCE.RESPONSE, + components, + _2.extend({}, options, { shortValidationErrors: true }), + schemaCache, + jsonSchemaDialect, + callback + ); + }, 0); + }, + checkResponses: function(responses, transactionPathPrefix, schemaPathPrefix, schemaPath, components, options, schemaCache, jsonSchemaDialect, cb) { + async.map(responses, (response, responseCallback) => { + let thisResponseCode = response.code, thisSchemaResponse = _2.get(schemaPath, ["responses", thisResponseCode]), responsePathPrefix = thisResponseCode; + if (!thisSchemaResponse) { + thisSchemaResponse = _2.get(schemaPath, ["responses", "default"]); + responsePathPrefix = "default"; + } + if (!_2.isEmpty(_2.get(thisSchemaResponse, "$ref"))) { + thisSchemaResponse = this.getRefObject(thisSchemaResponse.$ref, components, options); + } + _2.forEach(_2.get(thisSchemaResponse, "headers"), (header) => { + if (_2.has(header, "$ref")) { + _2.assign(header, this.getRefObject(header.$ref, components, options)); + _2.unset(header, "$ref"); + } + }); + if (!thisSchemaResponse) { + responseCallback(null); + } else { + async.parallel({ + headers: (cb2) => { + this.checkResponseHeaders( + thisSchemaResponse, + response.header, + transactionPathPrefix + "[" + response.id + "].header", + schemaPathPrefix + ".responses." + responsePathPrefix, + components, + options, + schemaCache, + jsonSchemaDialect, + cb2 + ); + }, + body: (cb2) => { + this.checkResponseBody( + thisSchemaResponse, + response.body, + transactionPathPrefix + "[" + response.id + "].body", + schemaPathPrefix + ".responses." + responsePathPrefix, + components, + options, + schemaCache, + jsonSchemaDialect, + cb2 + ); + } + }, (err, result) => { + return responseCallback(null, { + id: response.id, + matched: result.body.length === 0 && result.headers.length === 0, + mismatches: result.body.concat(result.headers) + }); + }); + } + }, (err, result) => { + var retVal = _2.keyBy(_2.reject(result, (ai) => { + return !ai; + }), "id"); + return cb(null, retVal); + }); + }, + /** + * Takes in the postman path and the schema path + * takes from the path the number of segments present in the schema path + * and returns the last segments from the path to match in an string format + * + * @param {string} pathToMatch - parsed path (exclude host and params) from the Postman request + * @param {string} schemaPath - schema path from the OAS spec (exclude servers object) + * @returns {string} only the selected segments from the pathToMatch + */ + handleExplicitServersPathToMatch: function(pathToMatch, schemaPath) { + let pathTMatchSlice, schemaPathArr = _2.reject(schemaPath.split("/"), (segment) => { + return segment === ""; + }), schemaPathSegments = schemaPathArr.length, pathToMatchArr = _2.reject(pathToMatch.split("/"), (segment) => { + return segment === ""; + }), pathToMatchSegments = pathToMatchArr.length; + if (pathToMatchSegments < schemaPathSegments) { + return pathToMatch; + } + pathTMatchSlice = pathToMatchArr.slice(pathToMatchArr.length - schemaPathSegments, pathToMatchArr.length); + return pathTMatchSlice.join("/"); + }, + /** + * @param {string} postmanPath - parsed path (exclude host and params) from the Postman request + * @param {string} schemaPath - schema path from the OAS spec (exclude servers object) + * @param {object} options - a standard list of options that's globally passed around. Check options.js for more. + * @returns {*} score + match + pathVars - higher score - better match. null - no match + */ + getPostmanUrlSchemaMatchScore: function(postmanPath, schemaPath, options) { + var postmanPathArr = _2.reject(postmanPath.split("/"), (segment) => { + return segment === ""; + }), schemaPathArr = _2.reject(schemaPath.split("/"), (segment) => { + return segment === ""; + }), matchedPathVars = null, maxScoreFound = -Infinity, anyMatchFound = false, fixedMatchedSegments, variableMatchedSegments, postmanPathSuffixes = []; + for (let i = postmanPathArr.length; i > 0; i--) { + postmanPathSuffixes.push(postmanPathArr.slice(-i)); + break; + } + _2.each(postmanPathSuffixes, (pps) => { + let suffixMatchResult = this.getPostmanUrlSuffixSchemaScore(pps, schemaPathArr, options); + if (suffixMatchResult.match && suffixMatchResult.score > maxScoreFound) { + maxScoreFound = suffixMatchResult.score; + matchedPathVars = suffixMatchResult.pathVars; + fixedMatchedSegments = suffixMatchResult.fixedMatchedSegments; + variableMatchedSegments = suffixMatchResult.variableMatchedSegments; + anyMatchFound = true; + } + }); + if (postmanPath === "/" && schemaPath === "/") { + anyMatchFound = true; + maxScoreFound = 1; + matchedPathVars = []; + fixedMatchedSegments = 0; + variableMatchedSegments = 0; + } + if (anyMatchFound) { + return { + match: true, + score: maxScoreFound, + pathVars: matchedPathVars, + fixedMatchedSegments, + variableMatchedSegments + }; + } + return { + match: false + }; + }, + /** + * @param {*} pmSuffix - Collection request's path suffix array + * @param {*} schemaPath - schema operation's path suffix array + * @param {object} options - a standard list of options that's globally passed around. Check options.js for more. + * @returns {*} score - null of no match, int for match. higher value indicates better match + * You get points for the number of URL segments that match + * You are penalized for the number of schemaPath segments that you skipped + */ + getPostmanUrlSuffixSchemaScore: function(pmSuffix, schemaPath, options) { + let mismatchFound = false, variables = [], minLength = Math.min(pmSuffix.length, schemaPath.length), sMax = schemaPath.length - 1, pMax = pmSuffix.length - 1, matchedSegments = 0, fixedMatchedSegments = 0, variableMatchedSegments = 0, isSchemaSegmentPathVar = (segment) => { + return segment.startsWith("{") && segment.endsWith("}") && // check that only one path variable is present as collection path variable can contain only one var + segment.indexOf("}") === segment.lastIndexOf("}"); + }; + if (options.strictRequestMatching && pmSuffix.length !== schemaPath.length) { + return { + match: false, + score: null, + pathVars: [] + }; + } + for (let i = 0; i < minLength; i++) { + let schemaFixedParts = this.getFixedPartsFromPathSegment(schemaPath[sMax - i], "schema"), collectionFixedParts = this.getFixedPartsFromPathSegment(pmSuffix[pMax - i], "collection"); + if (_2.isEqual(schemaFixedParts, collectionFixedParts) || // exact fixed parts match + isSchemaSegmentPathVar(schemaPath[sMax - i]) || // schema segment is a pathVar + pmSuffix[pMax - i].startsWith(":") || // postman segment is a pathVar + this.isPmVariable(pmSuffix[pMax - i])) { + if (isSchemaSegmentPathVar(schemaPath[sMax - i]) && // schema segment is a pathVar + (pmSuffix[pMax - i].startsWith(":") || // postman segment is a pathVar + this.isPmVariable(pmSuffix[pMax - i]))) { + variableMatchedSegments++; + } else if (_2.isEqual(schemaFixedParts, collectionFixedParts)) { + fixedMatchedSegments++; + } + if (isSchemaSegmentPathVar(schemaPath[sMax - i])) { + variables.push({ + key: schemaPath[sMax - i].substring(1, schemaPath[sMax - i].length - 1), + value: pmSuffix[pMax - i] + }); + } + matchedSegments++; + } else { + mismatchFound = true; + break; + } + } + if (!mismatchFound) { + return { + match: true, + // schemaPath endsWith postman path suffix + // score is length of the postman path array + schema array - length difference + // the assumption is that a longer path matching a longer path is a higher score, with + // penalty for any length difference + // schemaPath will always be > postmanPathSuffix because SchemaPath ands with pps + score: 2 * matchedSegments / (schemaPath.length + pmSuffix.length), + fixedMatchedSegments, + variableMatchedSegments, + pathVars: _2.reverse(variables) + // keep index in order of left to right + }; + } + return { + match: false, + score: null, + pathVars: [] + }; + }, + /** + * This function extracts suggested value from faked value at Ajv mismatch path (dataPath) + * + * @param {*} fakedValue Faked value by jsf + * @param {*} actualValue Actual value in transaction + * @param {*} ajvValidationErrorObj Ajv error for which fix is suggested + * @returns {*} Suggested Value + */ + getSuggestedValue: function(fakedValue, actualValue2, ajvValidationErrorObj) { + var suggestedValue, tempSuggestedValue, dataPath = formatDataPath(ajvValidationErrorObj.instancePath || ""), targetActualValue, targetFakedValue; + if (dataPath[0] === ".") { + dataPath = dataPath.slice(1); + } + targetActualValue = this.getPathValue(actualValue2, dataPath, {}); + targetFakedValue = this.getPathValue(fakedValue, dataPath, {}); + switch (ajvValidationErrorObj.keyword) { + case "minProperties": + suggestedValue = _2.assign( + {}, + targetActualValue, + _2.pick(targetFakedValue, _2.difference(_2.keys(targetFakedValue), _2.keys(targetActualValue))) + ); + break; + case "maxProperties": + suggestedValue = _2.pick(targetActualValue, _2.intersection(_2.keys(targetActualValue), _2.keys(targetFakedValue))); + break; + case "required": + suggestedValue = _2.assign( + {}, + targetActualValue, + _2.pick(targetFakedValue, ajvValidationErrorObj.params.missingProperty) + ); + break; + case "minItems": + suggestedValue = _2.concat(targetActualValue, _2.slice(targetFakedValue, targetActualValue.length)); + break; + case "maxItems": + suggestedValue = _2.slice(targetActualValue, 0, ajvValidationErrorObj.params.limit); + break; + case "uniqueItems": + tempSuggestedValue = _2.cloneDeep(targetActualValue); + tempSuggestedValue[ajvValidationErrorObj.params.j] = _2.last(targetFakedValue); + suggestedValue = tempSuggestedValue; + break; + default: + suggestedValue = this.getPathValue(fakedValue, dataPath, null); + break; + } + return suggestedValue; + }, + /** + * @param {*} schema OpenAPI spec + * @param {Array} matchedEndpoints - All matched endpoints + * @param {object} components - components defined in the OAS spec. These are used to + * resolve references while generating params. + * @param {object} options - a standard list of options that's globally passed around. Check options.js for more. + * @param {object} schemaCache - object storing schemaFaker and schmeResolution caches + * @returns {Array} - Array of all MISSING_ENDPOINT objects + */ + getMissingSchemaEndpoints: function(schema2, matchedEndpoints, components, options, schemaCache) { + let endpoints = [], schemaPaths = schema2.paths, rootCollectionVariables, schemaJsonPath; + rootCollectionVariables = this.convertToPmCollectionVariables( + schema2.baseUrlVariables, + "baseUrl", + schema2.baseUrl + ); + _2.forEach(schemaPaths, (schemaPathObj, schemaPath) => { + _2.forEach(_2.keys(schemaPathObj), (pathKey) => { + schemaJsonPath = `$.paths[${schemaPath}].${_2.toLower(pathKey)}`; + let operationItem = _2.get(schemaPathObj, pathKey) || {}, shouldValidateDeprecated = shouldAddDeprecatedOperation(operationItem, options); + if (METHODS.includes(pathKey) && !matchedEndpoints.includes(schemaJsonPath) && shouldValidateDeprecated) { + let mismatchObj = { + property: "ENDPOINT", + transactionJsonPath: null, + schemaJsonPath, + reasonCode: "MISSING_ENDPOINT", + reason: `The endpoint "${_2.toUpper(pathKey)} ${schemaPath}" is missing in collection`, + endpoint: _2.toUpper(pathKey) + " " + schemaPath + }; + if (options.suggestAvailableFixes) { + let operationItem2 = _2.get(schemaPathObj, pathKey) || {}, convertedRequest, variables = rootCollectionVariables, path = schemaPath, request; + operationItem2.parameters = this.getRequestParams( + operationItem2.parameters, + _2.get(schemaPathObj, "parameters"), + components, + options + ); + if (path[0] === "/") { + path = path.substring(1); + } + if (!_2.isEmpty(_2.get(schemaPathObj, "servers"))) { + let pathLevelServers = schemaPathObj.servers; + variables = this.convertToPmCollectionVariables( + pathLevelServers[0].variables, + // these are path variables in the server block + this.fixPathVariableName(path), + // the name of the variable + this.fixPathVariablesInUrl(pathLevelServers[0].url) + ); + } + request = { + name: operationItem2.summary || operationItem2.description, + method: pathKey, + path: schemaPath[0] === "/" ? schemaPath.substring(1) : schemaPath, + properties: operationItem2, + type: "item", + servers: _2.isEmpty(_2.get(schemaPathObj, "servers")) + }; + convertedRequest = this.convertRequestToItem(schema2, request, components, options, schemaCache, variables); + mismatchObj.suggestedFix = { + key: pathKey, + actualValue: null, + // Not adding colloection variables for now + suggestedValue: { + request: convertedRequest, + variables: _2.values(variables) + } + }; + } + endpoints.push(mismatchObj); + } + }); + }); + return endpoints; + }, + inputValidation, + /** + * Maps the input from detect root files to get root files + * @param {object} input - input schema + * @returns {Array} - Array of all MISSING_ENDPOINT objects + */ + mapDetectRootFilesInputToGetRootFilesInput(input) { + let adaptedData = input.data.map((file) => { + return { fileName: file.fileName }; + }); + return { data: adaptedData }; + }, + /** + * Maps the input from detect root files to get root files + * @param {object} input - input schema + * @returns {Array} - Array of all MISSING_ENDPOINT objects + */ + mapDetectRootFilesInputToFolderInput(input) { + let adaptedData = input.data.map((file) => { + if (file.content) { + return { fileName: file.path, content: file.content }; + } else { + return { fileName: file.path }; + } + }); + input.data = adaptedData; + return input; + }, + /** + * Maps the output from get root files to detect root files + * @param {object} output - output schema + * @param {string} version - specified version of the process + * @returns {object} - Detect root files result object + */ + mapGetRootFilesOutputToDetectRootFilesOutput(output, version2) { + if (!version2) { + version2 = "3.0"; + } + let adaptedData = output.map((file) => { + return { path: file }; + }); + return { + result: true, + output: { + type: "rootFiles", + specification: { + type: "OpenAPI", + version: version2 + }, + data: adaptedData + } + }; + }, + /** + * + * @description Takes in a the root files obtains the related files and + * generates the result object + * @param {object} parsedRootFiles - found parsed root files + * @param {array} inputData - file data information [{path, content}] + * @param {Array} origin - process origin (BROWSER or node) + * + * @returns {object} process result { rootFile, relatedFiles, missingRelatedFiles } + */ + getRelatedFilesData(parsedRootFiles, inputData, origin) { + const data = parsedRootFiles.map((root) => { + let relatedData = getRelatedFiles(root, inputData, origin), result = { + rootFile: { path: root.fileName }, + relatedFiles: relatedData.relatedFiles, + missingRelatedFiles: relatedData.missingRelatedFiles + }; + return result; + }); + return data; + }, + /** + * Maps the output for each bundled root file + * @param {object} format - defined output format from options + * @param {string} parsedRootFiles - The parsed root files + * @param {string} version - specified version of the process + * @param {object} options - a standard list of options that's globally passed around. Check options.js for more. + * @returns {object} - { rootFile: { path }, bundledContent } + */ + mapBundleOutput(format, parsedRootFiles, version2, options = {}) { + return (contentAndComponents) => { + let bundledFile = contentAndComponents.fileContent, bundleOutput; + if (isSwagger(version2)) { + _2.isObject(contentAndComponents.components) && Object.entries(contentAndComponents.components).forEach(([key, value]) => { + bundledFile[key] = value; + }); + } else if (!_2.isEmpty(contentAndComponents.components)) { + bundledFile.components = contentAndComponents.components; + } + if (!format) { + let rootFormat = parsedRootFiles.find((inputRoot) => { + return inputRoot.fileName === contentAndComponents.fileName; + }).parsed.inputFormat; + if (rootFormat.toLowerCase() === parse2.YAML_FORMAT) { + bundledFile = parse2.toYAML(bundledFile); + } else if (rootFormat.toLowerCase() === parse2.JSON_FORMAT) { + bundledFile = parse2.toJSON(bundledFile, null); + } + } else if (format.toLowerCase() === parse2.YAML_FORMAT) { + bundledFile = parse2.toYAML(bundledFile); + } else if (format.toLowerCase() === parse2.JSON_FORMAT) { + bundledFile = parse2.toJSON(bundledFile, null); + } + bundleOutput = { + rootFile: { path: contentAndComponents.fileName }, + bundledContent: bundledFile + }; + if (options.includeReferenceMap) { + bundleOutput.referenceMap = contentAndComponents.referenceMap; + } + return bundleOutput; + }; + }, + /* + * @description Takes in parsed root files and bundle it + * @param {object} parsedRootFiles - found parsed root files + * @param {array} inputData - file data information [{path, content}] + * @param {Array} origin - process origin (BROWSER or node) + * @param {string} format - output format could be either YAML or JSON + * @param {string} version - specification version specified in the input + * @param {object} options - a standard list of options that's globally passed around. Check options.js for more. + * + * @returns {object} process result { rootFile, bundledContent } + */ + async getBundledFileData(parsedRootFiles, inputData, origin, format, version2, options = {}, remoteRefResolver) { + const data = []; + for (const file of parsedRootFiles) { + let bundleDataFile = await getBundleContentAndComponents(file, inputData, origin, version2, remoteRefResolver); + data.push(bundleDataFile); + } + let bundleData = data.map(this.mapBundleOutput(format, parsedRootFiles, version2, options)); + return bundleData; + }, + /** + * + * @description Takes in root files, input data and origin process every root + * to find related files + * @param {object} rootFiles - rootFile:{path:string} + * @param {array} inputData - [{path:string}]} + * @param {string} origin - process origin + * @param {string} version - process specification version + * @param {string} format - the format required by the user + * @param {boolean} toBundle - if it will be used in bundle + * @param {object} options - a standard list of options that's globally passed around. Check options.js for more. + * @param {function} remoteRefResolver - The function that would be called to fetch remote ref contents + * + * @returns {object} root files information and data input + */ + async mapProcessRelatedFiles(rootFiles, inputData, origin, version2, format, toBundle = false, options = {}, remoteRefResolver) { + let bundleFormat = format, parsedRootFiles = rootFiles.map((rootFile) => { + let parsedContent = parseFileOrThrow(rootFile.content); + return { fileName: rootFile.fileName, content: rootFile.content, parsed: parsedContent }; + }).filter((rootWithParsedContent) => { + let fileVersion = isSwagger(version2) ? rootWithParsedContent.parsed.oasObject.swagger : rootWithParsedContent.parsed.oasObject.openapi; + return compareVersion(version2, fileVersion); + }), data = toBundle ? await this.getBundledFileData( + parsedRootFiles, + inputData, + origin, + bundleFormat, + version2, + options, + remoteRefResolver + ) : this.getRelatedFilesData(parsedRootFiles, inputData, origin); + return data; + }, + /** + * + * @description Takes in a folder and identifies the related files from the + * root file perspective (using $ref property) + * @param {string} inputRelatedFiles - {rootFile:{path:string}, data: [{path:string}]} + * @param {boolean} toBundle - if true it will return the bundle data + * @param {object} options - a standard list of options that's globally passed around. Check options.js for more. + * + * @returns {object} root files information and data input + */ + async processRelatedFiles(inputRelatedFiles, toBundle = false, options = {}) { + let version2 = inputRelatedFiles.specificationVersion ? inputRelatedFiles.specificationVersion : "3.0", res = { + result: true, + output: { + type: toBundle ? "bundledContent" : "relatedFiles", + specification: { + type: "OpenAPI", + version: version2 + }, + data: [] + } + }; + if (inputRelatedFiles.rootFiles && inputRelatedFiles.rootFiles.length > 0) { + try { + res.output.data = await this.mapProcessRelatedFiles( + inputRelatedFiles.rootFiles, + inputRelatedFiles.data, + inputRelatedFiles.origin, + version2, + inputRelatedFiles.bundleFormat, + toBundle, + options, + inputRelatedFiles.remoteRefResolver + ); + if (res.output.data === void 0 || res.output.data.result === false || res.output.data.length === 0) { + res.result = false; + } + } catch (error) { + if (error instanceof ParseError) { + throw error; + } + let newError = new Error("There was an error during the process"); + newError.stack = error.stack; + throw newError; + } + return res; + } else { + throw new Error("Input should have at least one root file"); + } + }, + /** + * + * @description Validates the input for multi file APIs + * @param {string} processInput - Process input data + * + * @returns {undefined} - nothing + */ + validateInputMultiFileAPI(processInput) { + if (_2.isEmpty(processInput)) { + throw new Error('Input object must have "type" and "data" information'); + } + if (!processInput.type) { + throw new Error('"Type" parameter should be provided'); + } + if (processInput.type !== MULTI_FILE_API_TYPE_ALLOWED_VALUE) { + throw new Error('"Type" parameter value allowed is ' + MULTI_FILE_API_TYPE_ALLOWED_VALUE); + } + if (!processInput.data || processInput.data.length === 0) { + throw new Error('"Data" parameter should be provided'); + } + if (processInput.data[0].path === "") { + throw new Error('"Path" of the data element should be provided'); + } + if (processInput.specificationVersion && !validateSupportedVersion(processInput.specificationVersion)) { + throw new Error(`The provided version "${processInput.specificationVersion}" is not valid`); + } + }, + MULTI_FILE_API_TYPE_ALLOWED_VALUE, + verifyDeprecatedProperties + }; + } +}); + +// ../../node_modules/lodash/clone.js +var require_clone2 = __commonJS({ + "../../node_modules/lodash/clone.js"(exports2, module2) { + var baseClone = require_baseClone(); + var CLONE_SYMBOLS_FLAG = 4; + function clone(value) { + return baseClone(value, CLONE_SYMBOLS_FLAG); + } + module2.exports = clone; + } +}); + +// ../../node_modules/lodash/each.js +var require_each = __commonJS({ + "../../node_modules/lodash/each.js"(exports2, module2) { + module2.exports = require_forEach(); + } +}); + +// ../../node_modules/lodash/_baseFilter.js +var require_baseFilter = __commonJS({ + "../../node_modules/lodash/_baseFilter.js"(exports2, module2) { + var baseEach = require_baseEach(); + function baseFilter(collection, predicate) { + var result = []; + baseEach(collection, function(value, index, collection2) { + if (predicate(value, index, collection2)) { + result.push(value); + } + }); + return result; + } + module2.exports = baseFilter; + } +}); + +// ../../node_modules/lodash/filter.js +var require_filter = __commonJS({ + "../../node_modules/lodash/filter.js"(exports2, module2) { + var arrayFilter = require_arrayFilter(); + var baseFilter = require_baseFilter(); + var baseIteratee = require_baseIteratee(); + var isArray = require_isArray(); + function filter(collection, predicate) { + var func = isArray(collection) ? arrayFilter : baseFilter; + return func(collection, baseIteratee(predicate, 3)); + } + module2.exports = filter; + } +}); + +// ../../node_modules/lodash/_baseHas.js +var require_baseHas = __commonJS({ + "../../node_modules/lodash/_baseHas.js"(exports2, module2) { + var objectProto = Object.prototype; + var hasOwnProperty = objectProto.hasOwnProperty; + function baseHas(object, key) { + return object != null && hasOwnProperty.call(object, key); + } + module2.exports = baseHas; + } +}); + +// ../../node_modules/lodash/has.js +var require_has = __commonJS({ + "../../node_modules/lodash/has.js"(exports2, module2) { + var baseHas = require_baseHas(); + var hasPath = require_hasPath(); + function has(object, path) { + return object != null && hasPath(object, path, baseHas); + } + module2.exports = has; + } +}); + +// ../../node_modules/lodash/isEmpty.js +var require_isEmpty = __commonJS({ + "../../node_modules/lodash/isEmpty.js"(exports2, module2) { + var baseKeys = require_baseKeys(); + var getTag = require_getTag(); + var isArguments = require_isArguments(); + var isArray = require_isArray(); + var isArrayLike = require_isArrayLike(); + var isBuffer = require_isBuffer(); + var isPrototype = require_isPrototype(); + var isTypedArray = require_isTypedArray(); + var mapTag = "[object Map]"; + var setTag = "[object Set]"; + var objectProto = Object.prototype; + var hasOwnProperty = objectProto.hasOwnProperty; + function isEmpty(value) { + if (value == null) { + return true; + } + if (isArrayLike(value) && (isArray(value) || typeof value == "string" || typeof value.splice == "function" || isBuffer(value) || isTypedArray(value) || isArguments(value))) { + return !value.length; + } + var tag = getTag(value); + if (tag == mapTag || tag == setTag) { + return !value.size; + } + if (isPrototype(value)) { + return !baseKeys(value).length; + } + for (var key in value) { + if (hasOwnProperty.call(value, key)) { + return false; + } + } + return true; + } + module2.exports = isEmpty; + } +}); + +// ../../node_modules/lodash/isUndefined.js +var require_isUndefined = __commonJS({ + "../../node_modules/lodash/isUndefined.js"(exports2, module2) { + function isUndefined(value) { + return value === void 0; + } + module2.exports = isUndefined; + } +}); + +// ../../node_modules/lodash/map.js +var require_map2 = __commonJS({ + "../../node_modules/lodash/map.js"(exports2, module2) { + var arrayMap = require_arrayMap(); + var baseIteratee = require_baseIteratee(); + var baseMap = require_baseMap(); + var isArray = require_isArray(); + function map(collection, iteratee) { + var func = isArray(collection) ? arrayMap : baseMap; + return func(collection, baseIteratee(iteratee, 3)); + } + module2.exports = map; + } +}); + +// ../../node_modules/lodash/_arrayReduce.js +var require_arrayReduce = __commonJS({ + "../../node_modules/lodash/_arrayReduce.js"(exports2, module2) { + function arrayReduce(array, iteratee, accumulator, initAccum) { + var index = -1, length = array == null ? 0 : array.length; + if (initAccum && length) { + accumulator = array[++index]; + } + while (++index < length) { + accumulator = iteratee(accumulator, array[index], index, array); + } + return accumulator; + } + module2.exports = arrayReduce; + } +}); + +// ../../node_modules/lodash/_baseReduce.js +var require_baseReduce = __commonJS({ + "../../node_modules/lodash/_baseReduce.js"(exports2, module2) { + function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) { + eachFunc(collection, function(value, index, collection2) { + accumulator = initAccum ? (initAccum = false, value) : iteratee(accumulator, value, index, collection2); + }); + return accumulator; + } + module2.exports = baseReduce; + } +}); + +// ../../node_modules/lodash/reduce.js +var require_reduce = __commonJS({ + "../../node_modules/lodash/reduce.js"(exports2, module2) { + var arrayReduce = require_arrayReduce(); + var baseEach = require_baseEach(); + var baseIteratee = require_baseIteratee(); + var baseReduce = require_baseReduce(); + var isArray = require_isArray(); + function reduce(collection, iteratee, accumulator) { + var func = isArray(collection) ? arrayReduce : baseReduce, initAccum = arguments.length < 3; + return func(collection, baseIteratee(iteratee, 4), accumulator, initAccum, baseEach); + } + module2.exports = reduce; + } +}); + +// ../../node_modules/lodash/isString.js +var require_isString = __commonJS({ + "../../node_modules/lodash/isString.js"(exports2, module2) { + var baseGetTag = require_baseGetTag(); + var isArray = require_isArray(); + var isObjectLike = require_isObjectLike(); + var stringTag = "[object String]"; + function isString(value) { + return typeof value == "string" || !isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag; + } + module2.exports = isString; + } +}); + +// ../../node_modules/lodash/_asciiSize.js +var require_asciiSize = __commonJS({ + "../../node_modules/lodash/_asciiSize.js"(exports2, module2) { + var baseProperty = require_baseProperty(); + var asciiSize = baseProperty("length"); + module2.exports = asciiSize; + } +}); + +// ../../node_modules/lodash/_hasUnicode.js +var require_hasUnicode = __commonJS({ + "../../node_modules/lodash/_hasUnicode.js"(exports2, module2) { + var rsAstralRange = "\\ud800-\\udfff"; + var rsComboMarksRange = "\\u0300-\\u036f"; + var reComboHalfMarksRange = "\\ufe20-\\ufe2f"; + var rsComboSymbolsRange = "\\u20d0-\\u20ff"; + var rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange; + var rsVarRange = "\\ufe0e\\ufe0f"; + var rsZWJ = "\\u200d"; + var reHasUnicode = RegExp("[" + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + "]"); + function hasUnicode(string) { + return reHasUnicode.test(string); + } + module2.exports = hasUnicode; + } +}); + +// ../../node_modules/lodash/_unicodeSize.js +var require_unicodeSize = __commonJS({ + "../../node_modules/lodash/_unicodeSize.js"(exports2, module2) { + var rsAstralRange = "\\ud800-\\udfff"; + var rsComboMarksRange = "\\u0300-\\u036f"; + var reComboHalfMarksRange = "\\ufe20-\\ufe2f"; + var rsComboSymbolsRange = "\\u20d0-\\u20ff"; + var rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange; + var rsVarRange = "\\ufe0e\\ufe0f"; + var rsAstral = "[" + rsAstralRange + "]"; + var rsCombo = "[" + rsComboRange + "]"; + var rsFitz = "\\ud83c[\\udffb-\\udfff]"; + var rsModifier = "(?:" + rsCombo + "|" + rsFitz + ")"; + var rsNonAstral = "[^" + rsAstralRange + "]"; + var rsRegional = "(?:\\ud83c[\\udde6-\\uddff]){2}"; + var rsSurrPair = "[\\ud800-\\udbff][\\udc00-\\udfff]"; + var rsZWJ = "\\u200d"; + var reOptMod = rsModifier + "?"; + var rsOptVar = "[" + rsVarRange + "]?"; + var rsOptJoin = "(?:" + rsZWJ + "(?:" + [rsNonAstral, rsRegional, rsSurrPair].join("|") + ")" + rsOptVar + reOptMod + ")*"; + var rsSeq = rsOptVar + reOptMod + rsOptJoin; + var rsSymbol = "(?:" + [rsNonAstral + rsCombo + "?", rsCombo, rsRegional, rsSurrPair, rsAstral].join("|") + ")"; + var reUnicode = RegExp(rsFitz + "(?=" + rsFitz + ")|" + rsSymbol + rsSeq, "g"); + function unicodeSize(string) { + var result = reUnicode.lastIndex = 0; + while (reUnicode.test(string)) { + ++result; + } + return result; + } + module2.exports = unicodeSize; + } +}); + +// ../../node_modules/lodash/_stringSize.js +var require_stringSize = __commonJS({ + "../../node_modules/lodash/_stringSize.js"(exports2, module2) { + var asciiSize = require_asciiSize(); + var hasUnicode = require_hasUnicode(); + var unicodeSize = require_unicodeSize(); + function stringSize(string) { + return hasUnicode(string) ? unicodeSize(string) : asciiSize(string); + } + module2.exports = stringSize; + } +}); + +// ../../node_modules/lodash/size.js +var require_size = __commonJS({ + "../../node_modules/lodash/size.js"(exports2, module2) { + var baseKeys = require_baseKeys(); + var getTag = require_getTag(); + var isArrayLike = require_isArrayLike(); + var isString = require_isString(); + var stringSize = require_stringSize(); + var mapTag = "[object Map]"; + var setTag = "[object Set]"; + function size(collection) { + if (collection == null) { + return 0; + } + if (isArrayLike(collection)) { + return isString(collection) ? stringSize(collection) : collection.length; + } + var tag = getTag(collection); + if (tag == mapTag || tag == setTag) { + return collection.size; + } + return baseKeys(collection).length; + } + module2.exports = size; + } +}); + +// ../../node_modules/lodash/transform.js +var require_transform = __commonJS({ + "../../node_modules/lodash/transform.js"(exports2, module2) { + var arrayEach = require_arrayEach(); + var baseCreate = require_baseCreate(); + var baseForOwn = require_baseForOwn(); + var baseIteratee = require_baseIteratee(); + var getPrototype = require_getPrototype(); + var isArray = require_isArray(); + var isBuffer = require_isBuffer(); + var isFunction = require_isFunction(); + var isObject = require_isObject(); + var isTypedArray = require_isTypedArray(); + function transform(object, iteratee, accumulator) { + var isArr = isArray(object), isArrLike = isArr || isBuffer(object) || isTypedArray(object); + iteratee = baseIteratee(iteratee, 4); + if (accumulator == null) { + var Ctor = object && object.constructor; + if (isArrLike) { + accumulator = isArr ? new Ctor() : []; + } else if (isObject(object)) { + accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {}; + } else { + accumulator = {}; + } + } + (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object2) { + return iteratee(accumulator, value, index, object2); + }); + return accumulator; + } + module2.exports = transform; + } +}); + +// ../../node_modules/lodash/union.js +var require_union = __commonJS({ + "../../node_modules/lodash/union.js"(exports2, module2) { + var baseFlatten = require_baseFlatten(); + var baseRest = require_baseRest(); + var baseUniq = require_baseUniq(); + var isArrayLikeObject = require_isArrayLikeObject(); + var union = baseRest(function(arrays) { + return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true)); + }); + module2.exports = union; + } +}); + +// ../../node_modules/lodash/_baseValues.js +var require_baseValues = __commonJS({ + "../../node_modules/lodash/_baseValues.js"(exports2, module2) { + var arrayMap = require_arrayMap(); + function baseValues(object, props) { + return arrayMap(props, function(key) { + return object[key]; + }); + } + module2.exports = baseValues; + } +}); + +// ../../node_modules/lodash/values.js +var require_values = __commonJS({ + "../../node_modules/lodash/values.js"(exports2, module2) { + var baseValues = require_baseValues(); + var keys = require_keys(); + function values(object) { + return object == null ? [] : baseValues(object, keys(object)); + } + module2.exports = values; + } +}); + +// ../../node_modules/graphlib/lib/lodash.js +var require_lodash2 = __commonJS({ + "../../node_modules/graphlib/lib/lodash.js"(exports2, module2) { + var lodash; + if (typeof require === "function") { + try { + lodash = { + clone: require_clone2(), + constant: require_constant(), + each: require_each(), + filter: require_filter(), + has: require_has(), + isArray: require_isArray(), + isEmpty: require_isEmpty(), + isFunction: require_isFunction(), + isUndefined: require_isUndefined(), + keys: require_keys(), + map: require_map2(), + reduce: require_reduce(), + size: require_size(), + transform: require_transform(), + union: require_union(), + values: require_values() + }; + } catch (e) { + } + } + if (!lodash) { + lodash = window._; + } + module2.exports = lodash; + } +}); + +// ../../node_modules/graphlib/lib/graph.js +var require_graph = __commonJS({ + "../../node_modules/graphlib/lib/graph.js"(exports2, module2) { + "use strict"; + var _2 = require_lodash2(); + module2.exports = Graph; + var DEFAULT_EDGE_NAME = "\0"; + var GRAPH_NODE = "\0"; + var EDGE_KEY_DELIM = ""; + function Graph(opts) { + this._isDirected = _2.has(opts, "directed") ? opts.directed : true; + this._isMultigraph = _2.has(opts, "multigraph") ? opts.multigraph : false; + this._isCompound = _2.has(opts, "compound") ? opts.compound : false; + this._label = void 0; + this._defaultNodeLabelFn = _2.constant(void 0); + this._defaultEdgeLabelFn = _2.constant(void 0); + this._nodes = {}; + if (this._isCompound) { + this._parent = {}; + this._children = {}; + this._children[GRAPH_NODE] = {}; + } + this._in = {}; + this._preds = {}; + this._out = {}; + this._sucs = {}; + this._edgeObjs = {}; + this._edgeLabels = {}; + } + Graph.prototype._nodeCount = 0; + Graph.prototype._edgeCount = 0; + Graph.prototype.isDirected = function() { + return this._isDirected; + }; + Graph.prototype.isMultigraph = function() { + return this._isMultigraph; + }; + Graph.prototype.isCompound = function() { + return this._isCompound; + }; + Graph.prototype.setGraph = function(label) { + this._label = label; + return this; + }; + Graph.prototype.graph = function() { + return this._label; + }; + Graph.prototype.setDefaultNodeLabel = function(newDefault) { + if (!_2.isFunction(newDefault)) { + newDefault = _2.constant(newDefault); + } + this._defaultNodeLabelFn = newDefault; + return this; + }; + Graph.prototype.nodeCount = function() { + return this._nodeCount; + }; + Graph.prototype.nodes = function() { + return _2.keys(this._nodes); + }; + Graph.prototype.sources = function() { + var self2 = this; + return _2.filter(this.nodes(), function(v) { + return _2.isEmpty(self2._in[v]); + }); + }; + Graph.prototype.sinks = function() { + var self2 = this; + return _2.filter(this.nodes(), function(v) { + return _2.isEmpty(self2._out[v]); + }); + }; + Graph.prototype.setNodes = function(vs, value) { + var args = arguments; + var self2 = this; + _2.each(vs, function(v) { + if (args.length > 1) { + self2.setNode(v, value); + } else { + self2.setNode(v); + } + }); + return this; + }; + Graph.prototype.setNode = function(v, value) { + if (_2.has(this._nodes, v)) { + if (arguments.length > 1) { + this._nodes[v] = value; + } + return this; + } + this._nodes[v] = arguments.length > 1 ? value : this._defaultNodeLabelFn(v); + if (this._isCompound) { + this._parent[v] = GRAPH_NODE; + this._children[v] = {}; + this._children[GRAPH_NODE][v] = true; + } + this._in[v] = {}; + this._preds[v] = {}; + this._out[v] = {}; + this._sucs[v] = {}; + ++this._nodeCount; + return this; + }; + Graph.prototype.node = function(v) { + return this._nodes[v]; + }; + Graph.prototype.hasNode = function(v) { + return _2.has(this._nodes, v); + }; + Graph.prototype.removeNode = function(v) { + var self2 = this; + if (_2.has(this._nodes, v)) { + var removeEdge = function(e) { + self2.removeEdge(self2._edgeObjs[e]); + }; + delete this._nodes[v]; + if (this._isCompound) { + this._removeFromParentsChildList(v); + delete this._parent[v]; + _2.each(this.children(v), function(child) { + self2.setParent(child); + }); + delete this._children[v]; + } + _2.each(_2.keys(this._in[v]), removeEdge); + delete this._in[v]; + delete this._preds[v]; + _2.each(_2.keys(this._out[v]), removeEdge); + delete this._out[v]; + delete this._sucs[v]; + --this._nodeCount; + } + return this; + }; + Graph.prototype.setParent = function(v, parent) { + if (!this._isCompound) { + throw new Error("Cannot set parent in a non-compound graph"); + } + if (_2.isUndefined(parent)) { + parent = GRAPH_NODE; + } else { + parent += ""; + for (var ancestor = parent; !_2.isUndefined(ancestor); ancestor = this.parent(ancestor)) { + if (ancestor === v) { + throw new Error("Setting " + parent + " as parent of " + v + " would create a cycle"); + } + } + this.setNode(parent); + } + this.setNode(v); + this._removeFromParentsChildList(v); + this._parent[v] = parent; + this._children[parent][v] = true; + return this; + }; + Graph.prototype._removeFromParentsChildList = function(v) { + delete this._children[this._parent[v]][v]; + }; + Graph.prototype.parent = function(v) { + if (this._isCompound) { + var parent = this._parent[v]; + if (parent !== GRAPH_NODE) { + return parent; + } + } + }; + Graph.prototype.children = function(v) { + if (_2.isUndefined(v)) { + v = GRAPH_NODE; + } + if (this._isCompound) { + var children = this._children[v]; + if (children) { + return _2.keys(children); + } + } else if (v === GRAPH_NODE) { + return this.nodes(); + } else if (this.hasNode(v)) { + return []; + } + }; + Graph.prototype.predecessors = function(v) { + var predsV = this._preds[v]; + if (predsV) { + return _2.keys(predsV); + } + }; + Graph.prototype.successors = function(v) { + var sucsV = this._sucs[v]; + if (sucsV) { + return _2.keys(sucsV); + } + }; + Graph.prototype.neighbors = function(v) { + var preds = this.predecessors(v); + if (preds) { + return _2.union(preds, this.successors(v)); + } + }; + Graph.prototype.isLeaf = function(v) { + var neighbors; + if (this.isDirected()) { + neighbors = this.successors(v); + } else { + neighbors = this.neighbors(v); + } + return neighbors.length === 0; + }; + Graph.prototype.filterNodes = function(filter) { + var copy = new this.constructor({ + directed: this._isDirected, + multigraph: this._isMultigraph, + compound: this._isCompound + }); + copy.setGraph(this.graph()); + var self2 = this; + _2.each(this._nodes, function(value, v) { + if (filter(v)) { + copy.setNode(v, value); + } + }); + _2.each(this._edgeObjs, function(e) { + if (copy.hasNode(e.v) && copy.hasNode(e.w)) { + copy.setEdge(e, self2.edge(e)); + } + }); + var parents = {}; + function findParent(v) { + var parent = self2.parent(v); + if (parent === void 0 || copy.hasNode(parent)) { + parents[v] = parent; + return parent; + } else if (parent in parents) { + return parents[parent]; + } else { + return findParent(parent); + } + } + if (this._isCompound) { + _2.each(copy.nodes(), function(v) { + copy.setParent(v, findParent(v)); + }); + } + return copy; + }; + Graph.prototype.setDefaultEdgeLabel = function(newDefault) { + if (!_2.isFunction(newDefault)) { + newDefault = _2.constant(newDefault); + } + this._defaultEdgeLabelFn = newDefault; + return this; + }; + Graph.prototype.edgeCount = function() { + return this._edgeCount; + }; + Graph.prototype.edges = function() { + return _2.values(this._edgeObjs); + }; + Graph.prototype.setPath = function(vs, value) { + var self2 = this; + var args = arguments; + _2.reduce(vs, function(v, w) { + if (args.length > 1) { + self2.setEdge(v, w, value); + } else { + self2.setEdge(v, w); + } + return w; + }); + return this; + }; + Graph.prototype.setEdge = function() { + var v, w, name, value; + var valueSpecified = false; + var arg0 = arguments[0]; + if (typeof arg0 === "object" && arg0 !== null && "v" in arg0) { + v = arg0.v; + w = arg0.w; + name = arg0.name; + if (arguments.length === 2) { + value = arguments[1]; + valueSpecified = true; + } + } else { + v = arg0; + w = arguments[1]; + name = arguments[3]; + if (arguments.length > 2) { + value = arguments[2]; + valueSpecified = true; + } + } + v = "" + v; + w = "" + w; + if (!_2.isUndefined(name)) { + name = "" + name; + } + var e = edgeArgsToId(this._isDirected, v, w, name); + if (_2.has(this._edgeLabels, e)) { + if (valueSpecified) { + this._edgeLabels[e] = value; + } + return this; + } + if (!_2.isUndefined(name) && !this._isMultigraph) { + throw new Error("Cannot set a named edge when isMultigraph = false"); + } + this.setNode(v); + this.setNode(w); + this._edgeLabels[e] = valueSpecified ? value : this._defaultEdgeLabelFn(v, w, name); + var edgeObj = edgeArgsToObj(this._isDirected, v, w, name); + v = edgeObj.v; + w = edgeObj.w; + Object.freeze(edgeObj); + this._edgeObjs[e] = edgeObj; + incrementOrInitEntry(this._preds[w], v); + incrementOrInitEntry(this._sucs[v], w); + this._in[w][e] = edgeObj; + this._out[v][e] = edgeObj; + this._edgeCount++; + return this; + }; + Graph.prototype.edge = function(v, w, name) { + var e = arguments.length === 1 ? edgeObjToId(this._isDirected, arguments[0]) : edgeArgsToId(this._isDirected, v, w, name); + return this._edgeLabels[e]; + }; + Graph.prototype.hasEdge = function(v, w, name) { + var e = arguments.length === 1 ? edgeObjToId(this._isDirected, arguments[0]) : edgeArgsToId(this._isDirected, v, w, name); + return _2.has(this._edgeLabels, e); + }; + Graph.prototype.removeEdge = function(v, w, name) { + var e = arguments.length === 1 ? edgeObjToId(this._isDirected, arguments[0]) : edgeArgsToId(this._isDirected, v, w, name); + var edge = this._edgeObjs[e]; + if (edge) { + v = edge.v; + w = edge.w; + delete this._edgeLabels[e]; + delete this._edgeObjs[e]; + decrementOrRemoveEntry(this._preds[w], v); + decrementOrRemoveEntry(this._sucs[v], w); + delete this._in[w][e]; + delete this._out[v][e]; + this._edgeCount--; + } + return this; + }; + Graph.prototype.inEdges = function(v, u) { + var inV = this._in[v]; + if (inV) { + var edges = _2.values(inV); + if (!u) { + return edges; + } + return _2.filter(edges, function(edge) { + return edge.v === u; + }); + } + }; + Graph.prototype.outEdges = function(v, w) { + var outV = this._out[v]; + if (outV) { + var edges = _2.values(outV); + if (!w) { + return edges; + } + return _2.filter(edges, function(edge) { + return edge.w === w; + }); + } + }; + Graph.prototype.nodeEdges = function(v, w) { + var inEdges = this.inEdges(v, w); + if (inEdges) { + return inEdges.concat(this.outEdges(v, w)); + } + }; + function incrementOrInitEntry(map, k) { + if (map[k]) { + map[k]++; + } else { + map[k] = 1; + } + } + function decrementOrRemoveEntry(map, k) { + if (!--map[k]) { + delete map[k]; + } + } + function edgeArgsToId(isDirected, v_, w_, name) { + var v = "" + v_; + var w = "" + w_; + if (!isDirected && v > w) { + var tmp = v; + v = w; + w = tmp; + } + return v + EDGE_KEY_DELIM + w + EDGE_KEY_DELIM + (_2.isUndefined(name) ? DEFAULT_EDGE_NAME : name); + } + function edgeArgsToObj(isDirected, v_, w_, name) { + var v = "" + v_; + var w = "" + w_; + if (!isDirected && v > w) { + var tmp = v; + v = w; + w = tmp; + } + var edgeObj = { v, w }; + if (name) { + edgeObj.name = name; + } + return edgeObj; + } + function edgeObjToId(isDirected, edgeObj) { + return edgeArgsToId(isDirected, edgeObj.v, edgeObj.w, edgeObj.name); + } + } +}); + +// ../../node_modules/graphlib/lib/version.js +var require_version3 = __commonJS({ + "../../node_modules/graphlib/lib/version.js"(exports2, module2) { + module2.exports = "2.1.8"; + } +}); + +// ../../node_modules/graphlib/lib/index.js +var require_lib13 = __commonJS({ + "../../node_modules/graphlib/lib/index.js"(exports2, module2) { + module2.exports = { + Graph: require_graph(), + version: require_version3() + }; + } +}); + +// ../../node_modules/graphlib/lib/json.js +var require_json2 = __commonJS({ + "../../node_modules/graphlib/lib/json.js"(exports2, module2) { + var _2 = require_lodash2(); + var Graph = require_graph(); + module2.exports = { + write, + read + }; + function write(g) { + var json = { + options: { + directed: g.isDirected(), + multigraph: g.isMultigraph(), + compound: g.isCompound() + }, + nodes: writeNodes(g), + edges: writeEdges(g) + }; + if (!_2.isUndefined(g.graph())) { + json.value = _2.clone(g.graph()); + } + return json; + } + function writeNodes(g) { + return _2.map(g.nodes(), function(v) { + var nodeValue = g.node(v); + var parent = g.parent(v); + var node = { v }; + if (!_2.isUndefined(nodeValue)) { + node.value = nodeValue; + } + if (!_2.isUndefined(parent)) { + node.parent = parent; + } + return node; + }); + } + function writeEdges(g) { + return _2.map(g.edges(), function(e) { + var edgeValue = g.edge(e); + var edge = { v: e.v, w: e.w }; + if (!_2.isUndefined(e.name)) { + edge.name = e.name; + } + if (!_2.isUndefined(edgeValue)) { + edge.value = edgeValue; + } + return edge; + }); + } + function read(json) { + var g = new Graph(json.options).setGraph(json.value); + _2.each(json.nodes, function(entry) { + g.setNode(entry.v, entry.value); + if (entry.parent) { + g.setParent(entry.v, entry.parent); + } + }); + _2.each(json.edges, function(entry) { + g.setEdge({ v: entry.v, w: entry.w, name: entry.name }, entry.value); + }); + return g; + } + } +}); + +// ../../node_modules/graphlib/lib/alg/components.js +var require_components = __commonJS({ + "../../node_modules/graphlib/lib/alg/components.js"(exports2, module2) { + var _2 = require_lodash2(); + module2.exports = components; + function components(g) { + var visited = {}; + var cmpts = []; + var cmpt; + function dfs(v) { + if (_2.has(visited, v)) return; + visited[v] = true; + cmpt.push(v); + _2.each(g.successors(v), dfs); + _2.each(g.predecessors(v), dfs); + } + _2.each(g.nodes(), function(v) { + cmpt = []; + dfs(v); + if (cmpt.length) { + cmpts.push(cmpt); + } + }); + return cmpts; + } + } +}); + +// ../../node_modules/graphlib/lib/data/priority-queue.js +var require_priority_queue = __commonJS({ + "../../node_modules/graphlib/lib/data/priority-queue.js"(exports2, module2) { + var _2 = require_lodash2(); + module2.exports = PriorityQueue; + function PriorityQueue() { + this._arr = []; + this._keyIndices = {}; + } + PriorityQueue.prototype.size = function() { + return this._arr.length; + }; + PriorityQueue.prototype.keys = function() { + return this._arr.map(function(x) { + return x.key; + }); + }; + PriorityQueue.prototype.has = function(key) { + return _2.has(this._keyIndices, key); + }; + PriorityQueue.prototype.priority = function(key) { + var index = this._keyIndices[key]; + if (index !== void 0) { + return this._arr[index].priority; + } + }; + PriorityQueue.prototype.min = function() { + if (this.size() === 0) { + throw new Error("Queue underflow"); + } + return this._arr[0].key; + }; + PriorityQueue.prototype.add = function(key, priority) { + var keyIndices = this._keyIndices; + key = String(key); + if (!_2.has(keyIndices, key)) { + var arr = this._arr; + var index = arr.length; + keyIndices[key] = index; + arr.push({ key, priority }); + this._decrease(index); + return true; + } + return false; + }; + PriorityQueue.prototype.removeMin = function() { + this._swap(0, this._arr.length - 1); + var min = this._arr.pop(); + delete this._keyIndices[min.key]; + this._heapify(0); + return min.key; + }; + PriorityQueue.prototype.decrease = function(key, priority) { + var index = this._keyIndices[key]; + if (priority > this._arr[index].priority) { + throw new Error("New priority is greater than current priority. Key: " + key + " Old: " + this._arr[index].priority + " New: " + priority); + } + this._arr[index].priority = priority; + this._decrease(index); + }; + PriorityQueue.prototype._heapify = function(i) { + var arr = this._arr; + var l = 2 * i; + var r = l + 1; + var largest = i; + if (l < arr.length) { + largest = arr[l].priority < arr[largest].priority ? l : largest; + if (r < arr.length) { + largest = arr[r].priority < arr[largest].priority ? r : largest; + } + if (largest !== i) { + this._swap(i, largest); + this._heapify(largest); + } + } + }; + PriorityQueue.prototype._decrease = function(index) { + var arr = this._arr; + var priority = arr[index].priority; + var parent; + while (index !== 0) { + parent = index >> 1; + if (arr[parent].priority < priority) { + break; + } + this._swap(index, parent); + index = parent; + } + }; + PriorityQueue.prototype._swap = function(i, j) { + var arr = this._arr; + var keyIndices = this._keyIndices; + var origArrI = arr[i]; + var origArrJ = arr[j]; + arr[i] = origArrJ; + arr[j] = origArrI; + keyIndices[origArrJ.key] = i; + keyIndices[origArrI.key] = j; + }; + } +}); + +// ../../node_modules/graphlib/lib/alg/dijkstra.js +var require_dijkstra = __commonJS({ + "../../node_modules/graphlib/lib/alg/dijkstra.js"(exports2, module2) { + var _2 = require_lodash2(); + var PriorityQueue = require_priority_queue(); + module2.exports = dijkstra; + var DEFAULT_WEIGHT_FUNC = _2.constant(1); + function dijkstra(g, source, weightFn, edgeFn) { + return runDijkstra( + g, + String(source), + weightFn || DEFAULT_WEIGHT_FUNC, + edgeFn || function(v) { + return g.outEdges(v); + } + ); + } + function runDijkstra(g, source, weightFn, edgeFn) { + var results = {}; + var pq = new PriorityQueue(); + var v, vEntry; + var updateNeighbors = function(edge) { + var w = edge.v !== v ? edge.v : edge.w; + var wEntry = results[w]; + var weight = weightFn(edge); + var distance = vEntry.distance + weight; + if (weight < 0) { + throw new Error("dijkstra does not allow negative edge weights. Bad edge: " + edge + " Weight: " + weight); + } + if (distance < wEntry.distance) { + wEntry.distance = distance; + wEntry.predecessor = v; + pq.decrease(w, distance); + } + }; + g.nodes().forEach(function(v2) { + var distance = v2 === source ? 0 : Number.POSITIVE_INFINITY; + results[v2] = { distance }; + pq.add(v2, distance); + }); + while (pq.size() > 0) { + v = pq.removeMin(); + vEntry = results[v]; + if (vEntry.distance === Number.POSITIVE_INFINITY) { + break; + } + edgeFn(v).forEach(updateNeighbors); + } + return results; + } + } +}); + +// ../../node_modules/graphlib/lib/alg/dijkstra-all.js +var require_dijkstra_all = __commonJS({ + "../../node_modules/graphlib/lib/alg/dijkstra-all.js"(exports2, module2) { + var dijkstra = require_dijkstra(); + var _2 = require_lodash2(); + module2.exports = dijkstraAll; + function dijkstraAll(g, weightFunc, edgeFunc) { + return _2.transform(g.nodes(), function(acc, v) { + acc[v] = dijkstra(g, v, weightFunc, edgeFunc); + }, {}); + } + } +}); + +// ../../node_modules/graphlib/lib/alg/tarjan.js +var require_tarjan = __commonJS({ + "../../node_modules/graphlib/lib/alg/tarjan.js"(exports2, module2) { + var _2 = require_lodash2(); + module2.exports = tarjan; + function tarjan(g) { + var index = 0; + var stack = []; + var visited = {}; + var results = []; + function dfs(v) { + var entry = visited[v] = { + onStack: true, + lowlink: index, + index: index++ + }; + stack.push(v); + g.successors(v).forEach(function(w2) { + if (!_2.has(visited, w2)) { + dfs(w2); + entry.lowlink = Math.min(entry.lowlink, visited[w2].lowlink); + } else if (visited[w2].onStack) { + entry.lowlink = Math.min(entry.lowlink, visited[w2].index); + } + }); + if (entry.lowlink === entry.index) { + var cmpt = []; + var w; + do { + w = stack.pop(); + visited[w].onStack = false; + cmpt.push(w); + } while (v !== w); + results.push(cmpt); + } + } + g.nodes().forEach(function(v) { + if (!_2.has(visited, v)) { + dfs(v); + } + }); + return results; + } + } +}); + +// ../../node_modules/graphlib/lib/alg/find-cycles.js +var require_find_cycles = __commonJS({ + "../../node_modules/graphlib/lib/alg/find-cycles.js"(exports2, module2) { + var _2 = require_lodash2(); + var tarjan = require_tarjan(); + module2.exports = findCycles; + function findCycles(g) { + return _2.filter(tarjan(g), function(cmpt) { + return cmpt.length > 1 || cmpt.length === 1 && g.hasEdge(cmpt[0], cmpt[0]); + }); + } + } +}); + +// ../../node_modules/graphlib/lib/alg/floyd-warshall.js +var require_floyd_warshall = __commonJS({ + "../../node_modules/graphlib/lib/alg/floyd-warshall.js"(exports2, module2) { + var _2 = require_lodash2(); + module2.exports = floydWarshall; + var DEFAULT_WEIGHT_FUNC = _2.constant(1); + function floydWarshall(g, weightFn, edgeFn) { + return runFloydWarshall( + g, + weightFn || DEFAULT_WEIGHT_FUNC, + edgeFn || function(v) { + return g.outEdges(v); + } + ); + } + function runFloydWarshall(g, weightFn, edgeFn) { + var results = {}; + var nodes = g.nodes(); + nodes.forEach(function(v) { + results[v] = {}; + results[v][v] = { distance: 0 }; + nodes.forEach(function(w) { + if (v !== w) { + results[v][w] = { distance: Number.POSITIVE_INFINITY }; + } + }); + edgeFn(v).forEach(function(edge) { + var w = edge.v === v ? edge.w : edge.v; + var d = weightFn(edge); + results[v][w] = { distance: d, predecessor: v }; + }); + }); + nodes.forEach(function(k) { + var rowK = results[k]; + nodes.forEach(function(i) { + var rowI = results[i]; + nodes.forEach(function(j) { + var ik = rowI[k]; + var kj = rowK[j]; + var ij = rowI[j]; + var altDistance = ik.distance + kj.distance; + if (altDistance < ij.distance) { + ij.distance = altDistance; + ij.predecessor = kj.predecessor; + } + }); + }); + }); + return results; + } + } +}); + +// ../../node_modules/graphlib/lib/alg/topsort.js +var require_topsort = __commonJS({ + "../../node_modules/graphlib/lib/alg/topsort.js"(exports2, module2) { + var _2 = require_lodash2(); + module2.exports = topsort; + topsort.CycleException = CycleException; + function topsort(g) { + var visited = {}; + var stack = {}; + var results = []; + function visit(node) { + if (_2.has(stack, node)) { + throw new CycleException(); + } + if (!_2.has(visited, node)) { + stack[node] = true; + visited[node] = true; + _2.each(g.predecessors(node), visit); + delete stack[node]; + results.push(node); + } + } + _2.each(g.sinks(), visit); + if (_2.size(visited) !== g.nodeCount()) { + throw new CycleException(); + } + return results; + } + function CycleException() { + } + CycleException.prototype = new Error(); + } +}); + +// ../../node_modules/graphlib/lib/alg/is-acyclic.js +var require_is_acyclic = __commonJS({ + "../../node_modules/graphlib/lib/alg/is-acyclic.js"(exports2, module2) { + var topsort = require_topsort(); + module2.exports = isAcyclic; + function isAcyclic(g) { + try { + topsort(g); + } catch (e) { + if (e instanceof topsort.CycleException) { + return false; + } + throw e; + } + return true; + } + } +}); + +// ../../node_modules/graphlib/lib/alg/dfs.js +var require_dfs2 = __commonJS({ + "../../node_modules/graphlib/lib/alg/dfs.js"(exports2, module2) { + var _2 = require_lodash2(); + module2.exports = dfs; + function dfs(g, vs, order) { + if (!_2.isArray(vs)) { + vs = [vs]; + } + var navigation = (g.isDirected() ? g.successors : g.neighbors).bind(g); + var acc = []; + var visited = {}; + _2.each(vs, function(v) { + if (!g.hasNode(v)) { + throw new Error("Graph does not have node: " + v); + } + doDfs(g, v, order === "post", visited, navigation, acc); + }); + return acc; + } + function doDfs(g, v, postorder, visited, navigation, acc) { + if (!_2.has(visited, v)) { + visited[v] = true; + if (!postorder) { + acc.push(v); + } + _2.each(navigation(v), function(w) { + doDfs(g, w, postorder, visited, navigation, acc); + }); + if (postorder) { + acc.push(v); + } + } + } + } +}); + +// ../../node_modules/graphlib/lib/alg/postorder.js +var require_postorder = __commonJS({ + "../../node_modules/graphlib/lib/alg/postorder.js"(exports2, module2) { + var dfs = require_dfs2(); + module2.exports = postorder; + function postorder(g, vs) { + return dfs(g, vs, "post"); + } + } +}); + +// ../../node_modules/graphlib/lib/alg/preorder.js +var require_preorder = __commonJS({ + "../../node_modules/graphlib/lib/alg/preorder.js"(exports2, module2) { + var dfs = require_dfs2(); + module2.exports = preorder; + function preorder(g, vs) { + return dfs(g, vs, "pre"); + } + } +}); + +// ../../node_modules/graphlib/lib/alg/prim.js +var require_prim = __commonJS({ + "../../node_modules/graphlib/lib/alg/prim.js"(exports2, module2) { + var _2 = require_lodash2(); + var Graph = require_graph(); + var PriorityQueue = require_priority_queue(); + module2.exports = prim; + function prim(g, weightFunc) { + var result = new Graph(); + var parents = {}; + var pq = new PriorityQueue(); + var v; + function updateNeighbors(edge) { + var w = edge.v === v ? edge.w : edge.v; + var pri = pq.priority(w); + if (pri !== void 0) { + var edgeWeight = weightFunc(edge); + if (edgeWeight < pri) { + parents[w] = v; + pq.decrease(w, edgeWeight); + } + } + } + if (g.nodeCount() === 0) { + return result; + } + _2.each(g.nodes(), function(v2) { + pq.add(v2, Number.POSITIVE_INFINITY); + result.setNode(v2); + }); + pq.decrease(g.nodes()[0], 0); + var init = false; + while (pq.size() > 0) { + v = pq.removeMin(); + if (_2.has(parents, v)) { + result.setEdge(v, parents[v]); + } else if (init) { + throw new Error("Input graph is not connected: " + g); + } else { + init = true; + } + g.nodeEdges(v).forEach(updateNeighbors); + } + return result; + } + } +}); + +// ../../node_modules/graphlib/lib/alg/index.js +var require_alg = __commonJS({ + "../../node_modules/graphlib/lib/alg/index.js"(exports2, module2) { + module2.exports = { + components: require_components(), + dijkstra: require_dijkstra(), + dijkstraAll: require_dijkstra_all(), + findCycles: require_find_cycles(), + floydWarshall: require_floyd_warshall(), + isAcyclic: require_is_acyclic(), + postorder: require_postorder(), + preorder: require_preorder(), + prim: require_prim(), + tarjan: require_tarjan(), + topsort: require_topsort() + }; + } +}); + +// ../../node_modules/graphlib/index.js +var require_graphlib = __commonJS({ + "../../node_modules/graphlib/index.js"(exports2, module2) { + var lib = require_lib13(); + module2.exports = { + Graph: lib.Graph, + json: require_json2(), + alg: require_alg(), + version: lib.version + }; + } +}); + +// ../../node_modules/openapi-to-postmanv2/libV2/helpers/collection/generateSkeletionTreeFromOpenAPI.js +var require_generateSkeletionTreeFromOpenAPI = __commonJS({ + "../../node_modules/openapi-to-postmanv2/libV2/helpers/collection/generateSkeletionTreeFromOpenAPI.js"(exports2, module2) { + var _2 = require_lodash(); + var Graph = require_graphlib().Graph; + var PATH_WEBHOOK = "path~webhook"; + var ALLOWED_HTTP_METHODS = { + get: true, + head: true, + post: true, + put: true, + patch: true, + delete: true, + connect: true, + options: true, + trace: true + }; + var _generateTreeFromPathsV2 = function(openapi, { includeDeprecated }) { + let tree = new Graph(); + tree.setNode("root:collection", { + type: "collection", + data: {}, + meta: {} + }); + const paths = Object.keys(openapi.paths); + if (_2.isEmpty(paths)) { + return tree; + } + _2.forEach(paths, function(completePath) { + let pathSplit = completePath === "/" ? [completePath] : _2.compact(completePath.split("/")); + if (pathSplit.length === 1) { + let methods = openapi.paths[completePath]; + _2.forEach(methods, function(data, method) { + if (!ALLOWED_HTTP_METHODS[method]) { + return; + } + if (!includeDeprecated && data.deprecated) { + return; + } + if (!tree.hasNode(`path:folder:${pathSplit[0]}`)) { + tree.setNode(`path:folder:${pathSplit[0]}`, { + type: "folder", + meta: { + name: pathSplit[0], + path: pathSplit[0], + pathIdentifier: pathSplit[0] + }, + data: {} + }); + tree.setEdge("root:collection", `path:folder:${pathSplit[0]}`); + } + tree.setNode(`path:request:${pathSplit[0]}:${method}`, { + type: "request", + data: {}, + meta: { + path: completePath, + method, + pathIdentifier: pathSplit[0] + } + }); + tree.setEdge(`path:folder:${pathSplit[0]}`, `path:request:${pathSplit[0]}:${method}`); + }); + } else { + _2.forEach(pathSplit, function(path, index) { + let previousPathIdentified = pathSplit.slice(0, index).join("/"), pathIdentifier = pathSplit.slice(0, index + 1).join("/"); + if (index + 1 === pathSplit.length) { + let methods = openapi.paths[completePath]; + _2.forEach(methods, function(data, method) { + if (!ALLOWED_HTTP_METHODS[method]) { + return; + } + if (!includeDeprecated && data.deprecated) { + return; + } + if (!tree.hasNode(`path:folder:${pathIdentifier}`)) { + tree.setNode(`path:folder:${pathIdentifier}`, { + type: "folder", + meta: { + name: path, + path, + pathIdentifier + }, + data: {} + }); + tree.setEdge( + index === 0 ? "root:collection" : `path:folder:${previousPathIdentified}`, + `path:folder:${pathIdentifier}` + ); + } + tree.setNode(`path:request:${pathIdentifier}:${method}`, { + type: "request", + data: {}, + meta: { + path: completePath, + method, + pathIdentifier + } + }); + tree.setEdge(`path:folder:${pathIdentifier}`, `path:request:${pathIdentifier}:${method}`); + }); + } else { + let fromNode = index === 0 ? "root:collection" : `path:folder:${previousPathIdentified}`, toNode = `path:folder:${pathIdentifier}`; + if (!tree.hasNode(toNode)) { + tree.setNode(toNode, { + type: "folder", + meta: { + name: path, + path, + pathIdentifier + }, + data: {} + }); + } + if (!tree.hasEdge(fromNode, toNode)) { + tree.setEdge(fromNode, toNode); + } + } + }); + } + }); + return tree; + }; + var _generateTreeFromTags = function(openapi, { includeDeprecated }) { + let tree = new Graph(), tagDescMap = _2.reduce(openapi.tags, function(acc, data) { + acc[data.name] = data.description; + return acc; + }, {}); + tree.setNode("root:collection", { + type: "collection", + data: {}, + meta: {} + }); + _2.forEach(tagDescMap, function(desc, tag) { + if (tree.hasNode(`path:${tag}`)) { + return; + } + tree.setNode(`path:${tag}`, { + type: "folder", + meta: { + path: "", + name: tag, + description: tagDescMap[tag] + }, + data: {} + }); + tree.setEdge("root:collection", `path:${tag}`); + }); + _2.forEach(openapi.paths, function(methods, path) { + _2.forEach(methods, function(data, method) { + if (!ALLOWED_HTTP_METHODS[method]) { + return; + } + if (!includeDeprecated && data.deprecated) { + return; + } + if (data.tags && data.tags.length > 0) { + _2.forEach(data.tags, function(tag) { + tree.setNode(`path:${tag}:${path}:${method}`, { + type: "request", + data: {}, + meta: { + tag, + path, + method + } + }); + if (!tree.hasNode(`path:${tag}`)) { + tree.setNode(`path:${tag}`, { + type: "folder", + meta: { + path, + name: tag, + description: tagDescMap[tag] + }, + data: {} + }); + tree.setEdge("root:collection", `path:${tag}`); + } + tree.setEdge(`path:${tag}`, `path:${tag}:${path}:${method}`); + }); + } else { + tree.setNode(`path:${path}:${method}`, { + type: "request", + data: {}, + meta: { + path, + method + } + }); + tree.setEdge("root:collection", `path:${path}:${method}`); + } + }); + }); + return tree; + }; + var _generateWebhookEndpoints = function(openapi, tree, { includeDeprecated }) { + if (!_2.isEmpty(openapi.webhooks)) { + tree.setNode(`${PATH_WEBHOOK}:folder`, { + type: "webhook~folder", + meta: { + path: "webhook~folder", + name: "webhook~folder", + description: "" + }, + data: {} + }); + tree.setEdge("root:collection", `${PATH_WEBHOOK}:folder`); + } + _2.forEach(openapi.webhooks, function(methodData, path) { + _2.forEach(methodData, function(data, method) { + if (!includeDeprecated && data.deprecated) { + return; + } + tree.setNode(`${PATH_WEBHOOK}:${path}:${method}`, { + type: "webhook~request", + meta: { path, method }, + data: {} + }); + tree.setEdge(`${PATH_WEBHOOK}:folder`, `${PATH_WEBHOOK}:${path}:${method}`); + }); + }); + return tree; + }; + module2.exports = function(openapi, { folderStrategy, includeWebhooks, includeDeprecated }) { + let skeletonTree; + switch (folderStrategy) { + case "tags": + skeletonTree = _generateTreeFromTags(openapi, { includeDeprecated }); + break; + case "paths": + skeletonTree = _generateTreeFromPathsV2(openapi, { includeDeprecated }); + break; + default: + throw new Error("generateSkeletonTreeFromOpenAPI~folderStrategy not valid"); + } + if (includeWebhooks) { + skeletonTree = _generateWebhookEndpoints(openapi, skeletonTree, { includeDeprecated }); + } + return skeletonTree; + }; + } +}); + +// ../../node_modules/foreach/index.js +var require_foreach = __commonJS({ + "../../node_modules/foreach/index.js"(exports2, module2) { + var hasOwn = Object.prototype.hasOwnProperty; + var toString = Object.prototype.toString; + module2.exports = function forEach(obj, fn, ctx) { + if (toString.call(fn) !== "[object Function]") { + throw new TypeError("iterator must be a function"); + } + var l = obj.length; + if (l === +l) { + for (var i = 0; i < l; i++) { + fn.call(ctx, obj[i], i, obj); + } + } else { + for (var k in obj) { + if (hasOwn.call(obj, k)) { + fn.call(ctx, obj[k], k, obj); + } + } + } + }; + } +}); + +// ../../node_modules/json-pointer/index.js +var require_json_pointer = __commonJS({ + "../../node_modules/json-pointer/index.js"(exports2, module2) { + "use strict"; + var each = require_foreach(); + module2.exports = api; + function api(obj, pointer, value) { + if (arguments.length === 3) { + return api.set(obj, pointer, value); + } + if (arguments.length === 2) { + return api.get(obj, pointer); + } + var wrapped = api.bind(api, obj); + for (var name in api) { + if (api.hasOwnProperty(name)) { + wrapped[name] = api[name].bind(wrapped, obj); + } + } + return wrapped; + } + api.get = function get(obj, pointer) { + var refTokens = Array.isArray(pointer) ? pointer : api.parse(pointer); + for (var i = 0; i < refTokens.length; ++i) { + var tok = refTokens[i]; + if (!(typeof obj == "object" && tok in obj)) { + throw new Error("Invalid reference token: " + tok); + } + obj = obj[tok]; + } + return obj; + }; + api.set = function set(obj, pointer, value) { + var refTokens = Array.isArray(pointer) ? pointer : api.parse(pointer), nextTok = refTokens[0]; + if (refTokens.length === 0) { + throw Error("Can not set the root object"); + } + for (var i = 0; i < refTokens.length - 1; ++i) { + var tok = refTokens[i]; + if (typeof tok !== "string" && typeof tok !== "number") { + tok = String(tok); + } + if (tok === "__proto__" || tok === "constructor" || tok === "prototype") { + continue; + } + if (tok === "-" && Array.isArray(obj)) { + tok = obj.length; + } + nextTok = refTokens[i + 1]; + if (!(tok in obj)) { + if (nextTok.match(/^(\d+|-)$/)) { + obj[tok] = []; + } else { + obj[tok] = {}; + } + } + obj = obj[tok]; + } + if (nextTok === "-" && Array.isArray(obj)) { + nextTok = obj.length; + } + obj[nextTok] = value; + return this; + }; + api.remove = function(obj, pointer) { + var refTokens = Array.isArray(pointer) ? pointer : api.parse(pointer); + var finalToken = refTokens[refTokens.length - 1]; + if (finalToken === void 0) { + throw new Error('Invalid JSON pointer for remove: "' + pointer + '"'); + } + var parent = api.get(obj, refTokens.slice(0, -1)); + if (Array.isArray(parent)) { + var index = +finalToken; + if (finalToken === "" && isNaN(index)) { + throw new Error('Invalid array index: "' + finalToken + '"'); + } + Array.prototype.splice.call(parent, index, 1); + } else { + delete parent[finalToken]; + } + }; + api.dict = function dict(obj, descend) { + var results = {}; + api.walk(obj, function(value, pointer) { + results[pointer] = value; + }, descend); + return results; + }; + api.walk = function walk(obj, iterator, descend) { + var refTokens = []; + descend = descend || function(value) { + var type = Object.prototype.toString.call(value); + return type === "[object Object]" || type === "[object Array]"; + }; + (function next(cur) { + each(cur, function(value, key) { + refTokens.push(String(key)); + if (descend(value)) { + next(value); + } else { + iterator(value, api.compile(refTokens)); + } + refTokens.pop(); + }); + })(obj); + }; + api.has = function has(obj, pointer) { + try { + api.get(obj, pointer); + } catch (e) { + return false; + } + return true; + }; + api.escape = function escape2(str) { + return str.toString().replace(/~/g, "~0").replace(/\//g, "~1"); + }; + api.unescape = function unescape2(str) { + return str.replace(/~1/g, "/").replace(/~0/g, "~"); + }; + api.parse = function parse2(pointer) { + if (pointer === "") { + return []; + } + if (pointer.charAt(0) !== "/") { + throw new Error("Invalid JSON pointer: " + pointer); + } + return pointer.substring(1).split(/\//).map(api.unescape); + }; + api.compile = function compile(refTokens) { + if (refTokens.length === 0) { + return ""; + } + return "/" + refTokens.map(api.escape).join("/"); + }; + } +}); + +// ../../node_modules/openapi-to-postmanv2/libV2/utils.js +var require_utils3 = __commonJS({ + "../../node_modules/openapi-to-postmanv2/libV2/utils.js"(exports2, module2) { + var _2 = require_lodash(); + var jsonPointer = require_json_pointer(); + var { Item } = require_item(); + var { Response } = require_response(); + var COLLECTION_NAME = "Imported from OpenAPI"; + var generatePmResponseObject = (response) => { + const requestItem = generateRequestItemObject({ + // eslint-disable-line no-use-before-define + request: response.originalRequest + }), originalRequest = { + method: response.originalRequest.method, + url: requestItem.request.url + }, originalRequestQueryParams = _2.get( + response, + "originalRequest.params.queryParams", + _2.get(response, "originalRequest.url.query", []) + ); + originalRequest.url.variable = _2.get(requestItem, "request.url.variables.members", []); + originalRequest.url.query = []; + originalRequest.header = _2.get(response, "originalRequest.headers", []); + originalRequest.body = requestItem.request.body; + response.code = response.code.replace(/X|x/g, "0"); + response.code = response.code === "default" ? 500 : _2.toSafeInteger(response.code); + let sdkResponse = new Response({ + name: response.name, + code: response.code, + header: response.headers, + body: response.body, + originalRequest + }); + sdkResponse.originalRequest.url.query.assimilate(originalRequestQueryParams); + sdkResponse._postman_previewlanguage = response._postman_previewlanguage; + return sdkResponse; + }; + var generateRequestItemObject = (requestObject) => { + const requestItem = new Item(requestObject), queryParams = _2.get(requestObject, "request.params.queryParams"), pathParams = _2.get(requestObject, "request.params.pathParams", []), headers = _2.get(requestObject, "request.headers", []), responses = _2.get(requestObject, "request.responses", []), auth = _2.get(requestObject, "request.auth", null); + _2.forEach(queryParams, (param) => { + requestItem.request.url.addQueryParams(param); + }); + _2.forEach(headers, (header) => { + requestItem.request.addHeader(header); + }); + requestItem.request.url.variables.assimilate(pathParams); + requestItem.request.auth = auth; + _2.forEach(responses, (response) => { + requestItem.responses.add(generatePmResponseObject(response, requestItem)); + }); + requestItem.protocolProfileBehavior = { disableBodyPruning: true }; + return requestItem.toJSON(); + }; + module2.exports = { + /** + * Converts Title/Camel case to a space-separated string + * @param {*} string - string in snake/camelCase + * @returns {string} space-separated string + */ + insertSpacesInName: function(string) { + if (!string || typeof string !== "string") { + return ""; + } + return string.replace(/([a-z])([A-Z])/g, "$1 $2").replace(/([A-Z])([A-Z][a-z])/g, "$1 $2").replace(/(_+)([a-zA-Z0-9])/g, " $2"); + }, + /** + * Trims request name string to 255 characters. + * + * @param {*} reqName - Request name + * @returns {*} trimmed string upto 255 characters + */ + trimRequestName: function(reqName) { + if (typeof reqName === "string") { + return reqName.substring(0, 255); + } + return reqName; + }, + /** + * Finds all the possible path variables conversion from schema path, + * and excludes path variable that are converted to collection variable + * @param {string} path Path string + * @returns {array} Array of path variables. + */ + findPathVariablesFromSchemaPath: function(path) { + let matches = path.match(/(\/\{[^\/\{\}]+\}(?=[\/\0]|$))/g); + return _2.map(matches, (match) => { + return match.slice(2, -1); + }); + }, + /** Finds all the possible path variables in a given path string + * @param {string} path Path string : /pets/{petId} + * @returns {array} Array of path variables. + */ + findPathVariablesFromPath: function(path) { + return path.match(/(\/\{\{[^\/\{\}]+\}\})(?=\/|$)/g); + }, + /** Finds all the possible collection variables in a given path string + * @param {string} path Path string : /pets/{petId} + * @returns {array} Array of collection variables. + */ + findCollectionVariablesFromPath: function(path) { + return path.match(/(\{\{[^\/\{\}]+\}\})/g); + }, + /** + * Changes path structure that contains {var} to :var and '/' to '_' + * This is done so generated collection variable is in correct format + * i.e. variable '{{item/{itemId}}}' is considered separates variable in URL by collection sdk + * @param {string} path - path defined in openapi spec + * @returns {string} - string after replacing {itemId} with :itemId + */ + fixPathVariableName: function(path) { + return path.replace(/\//g, "-").replace(/[{}]/g, "") + "-Url"; + }, + /** + * Changes the {} around scheme and path variables to :variable + * @param {string} url - the url string + * @returns {string} string after replacing /{pet}/ with /:pet/ + */ + fixPathVariablesInUrl: function(url) { + if (typeof url !== "string") { + return ""; + } + let replacer = function(match, p1, offset, string) { + if (string[offset - 1] === "{" && string[offset + match.length + 1] !== "}") { + return match; + } + return "{" + p1 + "}"; + }; + return _2.isString(url) ? url.replace(/(\{[^\/\{\}]+\})/g, replacer) : ""; + }, + /** + * Provides collection name to be used for generated collection + * + * @param {*} title - Definition title + * @returns {String} - Collection name + */ + getCollectionName: function(title) { + if (_2.isEmpty(title) || !_2.isString(title)) { + return COLLECTION_NAME; + } + return title; + }, + /** + * Adds provided property array to the given JSON path + * + * @param {string} jsonPath - JSON path to which properties should be added + * @param {array} propArray - Array of properties to be added to JSON path + * @returns {string} - Combined JSON path + */ + addToJsonPath: function(jsonPath, propArray) { + const jsonPathArray = jsonPointer.parse(jsonPath), escapedPropArray = _2.map(propArray, (prop) => { + return jsonPointer.escape(prop); + }); + return jsonPointer.compile(jsonPathArray.concat(escapedPropArray)); + }, + /** + * Merges two JSON paths. i.e. Parent JSON path and Child JSON path + * + * @param {string} parentJsonPath - Parent JSON path + * @param {string} childJsonPath - Child JSON path + * @returns {string} - Merged JSON path + */ + mergeJsonPath: function(parentJsonPath, childJsonPath) { + let jsonPathArray = jsonPointer.parse(parentJsonPath); + jsonPathArray = jsonPathArray.concat(jsonPointer.parse(childJsonPath)); + return jsonPointer.compile(jsonPathArray); + }, + /** + * Gets JSON path in array from string JSON path + * + * @param {string} jsonPath - input JSON path + * @returns {array} - Parsed JSON path (each part is distributed in an array) + */ + getJsonPathArray: function(jsonPath) { + return jsonPointer.parse(jsonPointer.unescape(jsonPath)); + }, + generatePmResponseObject, + generateRequestItemObject + }; + } +}); + +// ../../node_modules/openapi-to-postmanv2/libV2/helpers/collection/generateAuthForCollectionFromOpenAPI.js +var require_generateAuthForCollectionFromOpenAPI = __commonJS({ + "../../node_modules/openapi-to-postmanv2/libV2/helpers/collection/generateAuthForCollectionFromOpenAPI.js"(exports2, module2) { + var _2 = require_lodash(); + var FLOW_TYPE = { + authorizationCode: "authorization_code", + implicit: "implicit", + password: "password_credentials", + clientCredentials: "client_credentials" + }; + module2.exports = function(openapi, securitySet) { + let securityDef, helper; + if (!securitySet || Array.isArray(securitySet) && securitySet.length === 0) { + return null; + } + _2.forEach(securitySet, (security) => { + if (_2.isObject(security) && _2.isEmpty(security)) { + helper = { + type: "noauth" + }; + return false; + } + securityDef = _2.get(openapi, ["securityDefs", Object.keys(security)[0]]); + if (!_2.isObject(securityDef)) { + return; + } else if (securityDef.type === "http") { + if (_2.toLower(securityDef.scheme) === "basic") { + helper = { + type: "basic", + basic: [ + { key: "username", value: "{{basicAuthUsername}}" }, + { key: "password", value: "{{basicAuthPassword}}" } + ] + }; + } else if (_2.toLower(securityDef.scheme) === "bearer") { + helper = { + type: "bearer", + bearer: [{ key: "token", value: "{{bearerToken}}" }] + }; + } else if (_2.toLower(securityDef.scheme) === "digest") { + helper = { + type: "digest", + digest: [ + { key: "username", value: "{{digestAuthUsername}}" }, + { key: "password", value: "{{digestAuthPassword}}" }, + { key: "realm", value: "{{realm}}" } + ] + }; + } else if (_2.toLower(securityDef.scheme) === "oauth" || _2.toLower(securityDef.scheme) === "oauth1") { + helper = { + type: "oauth1", + oauth1: [ + { key: "consumerSecret", value: "{{consumerSecret}}" }, + { key: "consumerKey", value: "{{consumerKey}}" }, + { key: "addParamsToHeader", value: true } + ] + }; + } + } else if (securityDef.type === "oauth2") { + let flowObj, currentFlowType; + helper = { + type: "oauth2", + oauth2: [] + }; + if (_2.isObject(securityDef.flows) && FLOW_TYPE[Object.keys(securityDef.flows)[0]]) { + currentFlowType = FLOW_TYPE[Object.keys(securityDef.flows)[0]]; + flowObj = _2.get(securityDef, `flows.${Object.keys(securityDef.flows)[0]}`); + } + if (currentFlowType) { + if (!_2.isEmpty(flowObj.scopes)) { + helper.oauth2.push({ + key: "scope", + value: Object.keys(flowObj.scopes).join(" ") + }); + } + if (!_2.isEmpty(flowObj.refreshUrl)) { + helper.oauth2.push({ + key: "redirect_uri", + value: _2.isString(flowObj.refreshUrl) ? flowObj.refreshUrl : "{{oAuth2CallbackURL}}" + }); + } + if (currentFlowType !== FLOW_TYPE.implicit) { + if (!_2.isEmpty(flowObj.tokenUrl)) { + helper.oauth2.push({ + key: "accessTokenUrl", + value: _2.isString(flowObj.tokenUrl) ? flowObj.tokenUrl : "{{oAuth2AccessTokenURL}}" + }); + } + } + if (currentFlowType !== FLOW_TYPE.password && currentFlowType !== FLOW_TYPE.clientCredentials) { + if (!_2.isEmpty(flowObj.authorizationUrl)) { + helper.oauth2.push({ + key: "authUrl", + value: _2.isString(flowObj.authorizationUrl) ? flowObj.authorizationUrl : "{{oAuth2AuthURL}}" + }); + } + } + helper.oauth2.push({ + key: "grant_type", + value: currentFlowType + }); + } + } else if (securityDef.type === "apiKey") { + helper = { + type: "apikey", + apikey: [ + { + key: "key", + value: _2.isString(securityDef.name) ? securityDef.name : "{{apiKeyName}}" + }, + { key: "value", value: "{{apiKey}}" }, + { + key: "in", + value: _2.includes(["query", "header"], securityDef.in) ? securityDef.in : "header" + } + ] + }; + } + if (!_2.isEmpty(helper)) { + return false; + } + }); + return helper; + }; + } +}); + +// ../../node_modules/openapi-to-postmanv2/libV2/helpers/collection/generateCollectionFromOpenAPI.js +var require_generateCollectionFromOpenAPI = __commonJS({ + "../../node_modules/openapi-to-postmanv2/libV2/helpers/collection/generateCollectionFromOpenAPI.js"(exports2, module2) { + var _2 = require_lodash(); + var utils = require_utils3(); + var generateAuthrForCollectionFromOpenAPI = require_generateAuthForCollectionFromOpenAPI(); + var getCollectionDescription = function(openapi) { + let description = _2.get(openapi, "info.description", ""); + if (_2.get(openapi, "info.contact")) { + let contact = []; + if (openapi.info.contact.name) { + contact.push(" Name: " + openapi.info.contact.name); + } + if (openapi.info.contact.email) { + contact.push(" Email: " + openapi.info.contact.email); + } + if (contact.length > 0) { + if (description !== "") { + description += "\n\n"; + } + description += "Contact Support:\n" + contact.join("\n"); + } + } + return description; + }; + var fixPathVariablesInUrl = function(url) { + if (typeof url !== "string") { + return ""; + } + let replacer = function(match, p1, offset, string) { + if (string[offset - 1] === "{" && string[offset + match.length + 1] !== "}") { + return match; + } + return "{" + p1 + "}"; + }; + return _2.isString(url) ? url.replace(/(\{[^\/\{\}]+\})/g, replacer) : ""; + }; + var resolveCollectionVariablesForBaseUrlFromServersObject = (serverObject) => { + if (!serverObject) { + return []; + } + let baseUrl = fixPathVariablesInUrl(serverObject.url), collectionVariables = []; + _2.forOwn(serverObject.variables, (value, key) => { + collectionVariables.push({ + key, + value: value.default || "" + }); + }); + collectionVariables.push({ + key: "baseUrl", + value: baseUrl + }); + return collectionVariables; + }; + module2.exports = function({ openapi }) { + openapi.servers = _2.isEmpty(openapi.servers) ? [{ url: "/" }] : openapi.servers; + openapi.securityDefs = _2.get(openapi, "components.securitySchemes", {}); + openapi.baseUrlVariables = _2.get(openapi, "servers.0.variables"); + openapi.baseUrl = fixPathVariablesInUrl(_2.get(openapi, "servers.0.url", "{{baseURL}}")); + const collectionVariables = resolveCollectionVariablesForBaseUrlFromServersObject(_2.get(openapi, "servers.0")); + return { + data: { + info: { + name: utils.getCollectionName(_2.get(openapi, "info.title")), + description: getCollectionDescription(openapi) + }, + auth: generateAuthrForCollectionFromOpenAPI(openapi, openapi.security) + }, + variables: collectionVariables + }; + }; + } +}); + +// ../../node_modules/openapi-to-postmanv2/libV2/helpers/folder/generateFolderForOpenAPI.js +var require_generateFolderForOpenAPI = __commonJS({ + "../../node_modules/openapi-to-postmanv2/libV2/helpers/folder/generateFolderForOpenAPI.js"(exports2, module2) { + var _2 = require_lodash(); + module2.exports = function(openapi, node) { + return { + data: { + name: node.type === "webhook~folder" ? "Webhooks" : _2.get(node, "meta.name", "FOLDER"), + description: _2.get(node, "meta.description", ""), + item: [] + } + }; + }; + } +}); + +// ../../node_modules/openapi-to-postmanv2/libV2/xmlSchemaFaker.js +var require_xmlSchemaFaker2 = __commonJS({ + "../../node_modules/openapi-to-postmanv2/libV2/xmlSchemaFaker.js"(exports2, module2) { + var _2 = require_lodash(); + var js2xml = require_js2xml(); + function indentContent(content, initialIndent) { + let contentArr = _2.split(content, "\n"), indentedContent = _2.join(_2.map(contentArr, (contentElement) => { + return initialIndent + contentElement; + }), "\n"); + return indentedContent; + } + function convertSchemaToXML(name, schema2, attribute, indentChar, indent, resolveTo) { + var tagPrefix = "", cIndent = _2.times(indent, _2.constant(indentChar)).join(""), retVal = ""; + if (schema2 === null || typeof schema2 === "undefined") { + return retVal; + } + const schemaExample = typeof schema2 === "object" && schema2.example; + name = _2.get(schema2, "xml.name", name || "element"); + if (_2.get(schema2, "xml.prefix")) { + tagPrefix = schema2.xml.prefix ? `${schema2.xml.prefix}:` : ""; + } + if (["integer", "string", "boolean", "number"].includes(schema2.type)) { + if (schema2.type === "integer") { + actualValue = "(integer)"; + } else if (schema2.type === "string") { + actualValue = "(string)"; + } else if (schema2.type === "boolean") { + actualValue = "(boolean)"; + } else if (schema2.type === "number") { + actualValue = "(number)"; + } + if (resolveTo === "example" && typeof schemaExample !== "undefined") { + actualValue = schemaExample; + } + if (attribute) { + return actualValue; + } else { + retVal = ` +${cIndent}<${tagPrefix + name}`; + if (_2.get(schema2, "xml.namespace")) { + retVal += ` xmlns:${tagPrefix.slice(0, -1)}="${schema2.xml.namespace}"`; + } + retVal += `>${actualValue}`; + } + } else if (schema2.type === "object") { + if (resolveTo === "example" && typeof schemaExample === "string") { + return "\n" + schemaExample; + } else if (resolveTo === "example" && typeof schemaExample === "object") { + const elementName = _2.get(schema2, "items.xml.name", name || "element"), fakedContent = js2xml({ [elementName]: schemaExample }, indentChar); + retVal = "\n" + indentContent(fakedContent, cIndent); + } else { + var propVal, attributes = [], childNodes = ""; + retVal = "\n" + cIndent + `<${tagPrefix}${name}`; + if (_2.get(schema2, "xml.namespace")) { + let formattedTagPrefix = tagPrefix ? `:${tagPrefix.slice(0, -1)}` : ""; + retVal += ` xmlns${formattedTagPrefix}="${schema2.xml.namespace}"`; + } + _2.forOwn(schema2.properties, (value, key) => { + propVal = convertSchemaToXML(key, value, _2.get(value, "xml.attribute"), indentChar, indent + 1, resolveTo); + if (_2.get(value, "xml.attribute")) { + attributes.push(`${key}="${propVal}"`); + } else { + childNodes += _2.isString(propVal) ? propVal : ""; + } + }); + if (attributes.length > 0) { + retVal += " " + attributes.join(" "); + } + retVal += ">"; + retVal += childNodes; + retVal += ` +${cIndent}`; + } + } else if (schema2.type === "array") { + var isWrapped = _2.get(schema2, "xml.wrapped"), extraIndent = isWrapped ? 1 : 0, arrayElemName = _2.get(schema2, "items.xml.name", name || "element"), schemaItemsWithXmlProps = _2.cloneDeep(schema2.items), contents; + schemaItemsWithXmlProps.xml = schema2.xml; + if (resolveTo === "example" && typeof schemaExample === "string") { + return "\n" + schemaExample; + } else if (resolveTo === "example" && typeof schemaExample === "object") { + const fakedContent = js2xml({ [arrayElemName]: schemaExample }, indentChar); + contents = "\n" + indentContent(fakedContent, cIndent); + } else { + let singleElementContent = convertSchemaToXML( + arrayElemName, + schemaItemsWithXmlProps, + false, + indentChar, + indent + extraIndent, + resolveTo + ); + contents = singleElementContent + singleElementContent; + } + if (isWrapped) { + return ` +${cIndent}<${tagPrefix}${name}>${contents} +${cIndent}`; + } else { + return contents; + } + } + return retVal; + } + module2.exports = function(name, schema2, indentCharacter, resolveTo) { + return convertSchemaToXML(name, schema2, false, indentCharacter, 0, resolveTo).substring(1); + }; + } +}); + +// ../../node_modules/openapi-to-postmanv2/libV2/schemaUtils.js +var require_schemaUtils2 = __commonJS({ + "../../node_modules/openapi-to-postmanv2/libV2/schemaUtils.js"(exports2, module2) { + var generateAuthForCollectionFromOpenAPI = require_generateAuthForCollectionFromOpenAPI(); + var utils = require_utils3(); + var schemaFaker = require_json_schema_faker(); + var _2 = require_lodash(); + var mergeAllOf = require_src2(); + var xmlFaker = require_xmlSchemaFaker2(); + var URLENCODED = "application/x-www-form-urlencoded"; + var APP_JSON = "application/json"; + var APP_JS = "application/javascript"; + var TEXT_XML = "text/xml"; + var APP_XML = "application/xml"; + var TEXT_PLAIN = "text/plain"; + var TEXT_HTML = "text/html"; + var FORM_DATA = "multipart/form-data"; + var HEADER_TYPE = { + JSON: "json", + XML: "xml", + INVALID: "invalid" + }; + var HEADER_TYPE_PREVIEW_LANGUAGE_MAP = { + [HEADER_TYPE.JSON]: "json", + [HEADER_TYPE.XML]: "xml" + }; + var IMPLICIT_HEADERS = [ + "content-type", + // 'content-type' is defined based on content/media-type of req/res body, + "accept", + "authorization" + ]; + var SCHEMA_PROPERTIES_TO_EXCLUDE = [ + "default", + "enum", + "pattern" + ]; + var SUPPORTED_FORMATS = [ + "date", + "time", + "date-time", + "uri", + "uri-reference", + "uri-template", + "email", + "hostname", + "ipv4", + "ipv6", + "regex", + "uuid", + "binary", + "json-pointer", + "int64", + "float", + "double" + ]; + var typesMap = { + integer: { + int32: "", + int64: "" + }, + number: { + float: "", + double: "" + }, + string: { + byte: "", + binary: "", + date: "", + "date-time": "", + password: "" + }, + boolean: "", + array: "", + object: "" + }; + var SCHEMA_SIZE_OPTIMIZATION_THRESHOLD = 50 * 1024; + var PROPERTIES_TO_ASSIGN_ON_CASCADE = ["type", "nullable", "properties"]; + var crypto4 = require("crypto"); + var _getEscaped = (rootObject, pathArray, defValue) => { + if (!(pathArray instanceof Array)) { + return null; + } + if (rootObject === void 0) { + return defValue; + } + if (_2.isEmpty(pathArray)) { + return rootObject; + } + return _getEscaped(rootObject[pathArray.shift()], pathArray, defValue); + }; + var getXmlVersionContent = (bodyContent) => { + const regExp = new RegExp('([<\\?xml]+[\\s{1,}]+[version="\\d.\\d"]+[\\sencoding="]+.{1,15}"\\?>)'); + let xmlBody = bodyContent; + if (_2.isFunction(bodyContent.match) && !bodyContent.match(regExp)) { + const versionContent = '\n'; + xmlBody = versionContent + xmlBody; + } + return xmlBody; + }; + schemaFaker.option({ + requiredOnly: false, + optionalsProbability: 1, + // always add optional fields + maxLength: 256, + minItems: 1, + // for arrays + maxItems: 20, + // limit on maximum number of items faked for (type: arrray) + useDefaultValue: true, + ignoreMissingRefs: true, + avoidExampleItemsLength: true, + // option to avoid validating type array schema example's minItems and maxItems props. + failOnInvalidFormat: false + }); + var QUERYPARAM = "query"; + var CONVERSION = "conversion"; + var HEADER = "header"; + var PATHPARAM = "path"; + var SCHEMA_TYPES = { + array: "array", + boolean: "boolean", + integer: "integer", + number: "number", + object: "object", + string: "string" + }; + var SCHEMA_FORMATS = { + DEFAULT: "default", + // used for non-request-body data and json + XML: "xml" + // used for request-body XMLs + }; + var REF_STACK_LIMIT = 30; + var ERR_TOO_MANY_LEVELS = ""; + var sanitizeUrl = (url) => { + if (typeof url !== "string") { + return ""; + } + const replacer = function(match, p1, offset, string) { + if (string[offset - 1] === "{" && string[offset + match.length + 1] !== "}") { + return match; + } + return "{" + p1 + "}"; + }; + url = _2.isString(url) ? url.replace(/(\{[^\/\{\}]+\})/g, replacer) : ""; + let pathVariables = url.match(/(\/\{\{[^\/\{\}]+\}\})(?=\/|$)/g); + if (pathVariables) { + pathVariables.forEach((match) => { + const replaceWith = match.replace(/{{/g, ":").replace(/}}/g, ""); + url = url.replace(match, replaceWith); + }); + } + return url; + }; + var filterCollectionAndPathVariables = (url, pathVariables) => { + if (typeof url !== "string") { + return ""; + } + let variables = url.match(/(\{\{[^\/\{\}]+\}\})/g), collectionVariables = [], collectionVariableMap = {}, filteredPathVariables = []; + _2.forEach(variables, (variable) => { + const collVar = variable.replace(/{{/g, "").replace(/}}/g, ""); + collectionVariableMap[collVar] = true; + }); + _2.forEach(pathVariables, (pathVariable) => { + if (collectionVariableMap[pathVariable.key]) { + collectionVariables.push(_2.pick(pathVariable, ["key", "value"])); + } else { + filteredPathVariables.push(pathVariable); + } + }); + return { + collectionVariables, + pathVariables: filteredPathVariables + }; + }; + var resolveBaseUrlForPostmanRequest = (operationItem) => { + let serverObj = _2.get(operationItem, "servers.0"), baseUrl = "{{baseUrl}}", serverVariables = [], pathVariables = [], collectionVariables = []; + if (!serverObj) { + return { collectionVariables, pathVariables, baseUrl }; + } + baseUrl = sanitizeUrl(serverObj.url); + _2.forOwn(serverObj.variables, (value, key) => { + serverVariables.push({ + key, + value: _2.get(value, "default") || "" + }); + }); + ({ collectionVariables, pathVariables } = filterCollectionAndPathVariables(baseUrl, serverVariables)); + return { collectionVariables, pathVariables, baseUrl }; + }; + var getRefStackLimit = (stackLimit) => { + if (typeof stackLimit === "number" && stackLimit > REF_STACK_LIMIT) { + return stackLimit; + } + return REF_STACK_LIMIT; + }; + var resetReadWritePropCache = (context) => { + context.readOnlyPropCache = {}; + context.writeOnlyPropCache = {}; + }; + var mergeReadWritePropCache = (context, readOnlyPropCache, writeOnlyPropCache, currentPath = "") => { + _2.forOwn(readOnlyPropCache, (value, key) => { + context.readOnlyPropCache[utils.mergeJsonPath(currentPath, key)] = true; + }); + _2.forOwn(writeOnlyPropCache, (value, key) => { + context.writeOnlyPropCache[utils.mergeJsonPath(currentPath, key)] = true; + }); + }; + var resolveRefFromSchema = (context, $ref, stackDepth = 0, seenRef = {}) => { + const { specComponents } = context, { stackLimit } = context.computedOptions; + if (stackDepth >= getRefStackLimit(stackLimit)) { + return { value: ERR_TOO_MANY_LEVELS }; + } + stackDepth++; + seenRef[$ref] = true; + if (context.schemaCache[$ref]) { + mergeReadWritePropCache( + context, + context.schemaCache[$ref].readOnlyPropCache, + context.schemaCache[$ref].writeOnlyPropCache + ); + return context.schemaCache[$ref].schema; + } + if (!_2.isFunction($ref.split)) { + return { value: `reference ${$ref} not found in the OpenAPI spec` }; + } + let splitRef = $ref.split("/"), resolvedSchema; + if (splitRef.length < 4) { + return { value: `reference ${$ref} not found in the OpenAPI spec` }; + } + splitRef = splitRef.slice(1).map((elem) => { + return decodeURIComponent( + elem.replace(/~1/g, "/").replace(/~0/g, "~") + ); + }); + resolvedSchema = _getEscaped(specComponents, splitRef); + if (resolvedSchema === void 0) { + return { value: "reference " + $ref + " not found in the OpenAPI spec" }; + } + if (_2.get(resolvedSchema, "$ref")) { + if (seenRef[resolvedSchema.$ref]) { + return { + value: "" + }; + } + return resolveRefFromSchema(context, resolvedSchema.$ref, stackDepth, _2.cloneDeep(seenRef)); + } + return resolvedSchema; + }; + var resolveRefForExamples = (context, $ref, stackDepth = 0, seenRef = {}) => { + const { specComponents } = context, { stackLimit } = context.computedOptions; + if (stackDepth >= getRefStackLimit(stackLimit)) { + return { value: ERR_TOO_MANY_LEVELS }; + } + stackDepth++; + seenRef[$ref] = true; + if (context.schemaCache[$ref]) { + mergeReadWritePropCache( + context, + context.schemaCache[$ref].readOnlyPropCache, + context.schemaCache[$ref].writeOnlyPropCache + ); + return context.schemaCache[$ref].schema; + } + if (!_2.isFunction($ref.split)) { + return { value: `reference ${schema.$ref} not found in the OpenAPI spec` }; + } + let splitRef = $ref.split("/"), resolvedExample; + if (splitRef.length < 4) { + return { value: `reference ${$ref} not found in the OpenAPI spec` }; + } + splitRef = splitRef.slice(1).map((elem) => { + return decodeURIComponent( + elem.replace(/~1/g, "/").replace(/~0/g, "~") + ); + }); + resolvedExample = _getEscaped(specComponents, splitRef); + if (resolvedExample === void 0) { + return { value: "reference " + $ref + " not found in the OpenAPI spec" }; + } + if (_2.has(resolvedExample, "$ref")) { + if (seenRef[resolvedExample.$ref]) { + return { + value: `` + }; + } + return resolveRefFromSchema(context, resolvedExample.$ref, stackDepth, _2.cloneDeep(seenRef)); + } + context.schemaCache[$ref] = { + schema: resolvedExample, + readOnlyPropCache: {}, + writeOnlyPropCache: {} + }; + return resolvedExample; + }; + var resolveExampleData = (context, exampleData) => { + if (_2.has(exampleData, "$ref")) { + const resolvedRef = resolveRefForExamples(context, exampleData.$ref); + exampleData = resolveExampleData(context, resolvedRef); + } else if (typeof exampleData === "object") { + _2.forOwn(exampleData, (data, key) => { + exampleData[key] = resolveExampleData(context, data); + }); + } + return exampleData; + }; + var getExampleData = (context, exampleObj) => { + let example = {}, exampleKey; + if (!exampleObj || typeof exampleObj !== "object") { + return ""; + } + exampleKey = Object.keys(exampleObj)[0]; + example = exampleObj[exampleKey]; + if (example.$ref) { + example = resolveExampleData(context, example); + } + if (_2.get(example, "value")) { + example = resolveExampleData(context, example.value); + } + return example; + }; + var resolveAllOfSchema = (context, schema2, stack = 0, resolveFor = CONVERSION, seenRef = {}, currentPath = "") => { + try { + return mergeAllOf(_2.assign(schema2, { + allOf: _2.map(schema2.allOf, (schema3) => { + return _resolveSchema(context, schema3, stack, resolveFor, _2.cloneDeep(seenRef), currentPath); + }) + }), { + // below option is required to make sure schemas with additionalProperties set to false are resolved correctly + ignoreAdditionalProperties: true, + resolvers: { + // for keywords in OpenAPI schema that are not standard defined JSON schema keywords, use default resolver + defaultResolver: (compacted) => { + return compacted[0]; + }, + enum: (values) => { + return _2.uniq(_2.concat(...values)); + } + } + }); + } catch (e) { + console.warn("Error while resolving allOf schema: ", e); + return { value: " { + if (!schema2) { + return new Error("Schema is empty"); + } + const { stackLimit } = context.computedOptions; + if (stack >= getRefStackLimit(stackLimit)) { + return { value: ERR_TOO_MANY_LEVELS }; + } + stack++; + const compositeKeyword = schema2.anyOf ? "anyOf" : "oneOf", { concreteUtils } = context; + let compositeSchema = schema2.anyOf || schema2.oneOf; + if (compositeSchema) { + compositeSchema = _2.map(compositeSchema, (schemaElement) => { + const isSchemaFullyResolved = _2.get(schemaElement, "value") === ERR_TOO_MANY_LEVELS && !_2.startsWith(_2.get(schemaElement, "value", ""), " { + if (_2.isNil(schemaElement[prop]) && !_2.isNil(schema2[prop]) && isSchemaFullyResolved) { + schemaElement[prop] = schema2[prop]; + } + }); + return schemaElement; + }); + if (resolveFor === CONVERSION) { + return _resolveSchema(context, compositeSchema[0], stack, resolveFor, _2.cloneDeep(seenRef), currentPath); + } + return { [compositeKeyword]: _2.map(compositeSchema, (schemaElement, index) => { + return _resolveSchema( + context, + schemaElement, + stack, + resolveFor, + _2.cloneDeep(seenRef), + utils.addToJsonPath(currentPath, [compositeKeyword, index]) + ); + }) }; + } + if (schema2.allOf) { + return resolveAllOfSchema(context, schema2, stack, resolveFor, _2.cloneDeep(seenRef), currentPath); + } + if (schema2.$ref) { + const schemaRef = schema2.$ref; + if (seenRef[schemaRef]) { + return { + value: "" + }; + } + seenRef[schemaRef] = true; + if (context.schemaCache[schemaRef]) { + mergeReadWritePropCache( + context, + context.schemaCache[schemaRef].readOnlyPropCache, + context.schemaCache[schemaRef].writeOnlyPropCache, + currentPath + ); + schema2 = context.schemaCache[schemaRef].schema; + } else { + const existingReadPropCache = context.readOnlyPropCache, existingWritePropCache = context.writeOnlyPropCache; + schema2 = resolveRefFromSchema(context, schemaRef, stack, _2.cloneDeep(seenRef)); + resetReadWritePropCache(context); + schema2 = _resolveSchema(context, schema2, stack, resolveFor, _2.cloneDeep(seenRef), ""); + context.schemaCache[schemaRef] = { + schema: schema2, + readOnlyPropCache: context.readOnlyPropCache, + writeOnlyPropCache: context.writeOnlyPropCache + }; + const newReadPropCache = context.readOnlyPropCache, newWritePropCache = context.writeOnlyPropCache; + context.readOnlyPropCache = existingReadPropCache; + context.writeOnlyPropCache = existingWritePropCache; + mergeReadWritePropCache(context, newReadPropCache, newWritePropCache, currentPath); + } + return schema2; + } + if (!_2.includes(SUPPORTED_FORMATS, schema2.format) || schema2.pattern && schema2.format) { + schema2.format && delete schema2.format; + } + if (concreteUtils.compareTypes(schema2.type, SCHEMA_TYPES.object) || schema2.hasOwnProperty("properties")) { + let resolvedSchemaProps = {}, { includeDeprecated } = context.computedOptions; + _2.forOwn(schema2.properties, (property, propertyName) => { + if (!_2.isObject(property)) { + return; + } + if (property.format === "decimal" || property.format === "byte" || property.format === "password" || property.format === "unix-time") { + delete property.format; + } + if (!includeDeprecated && property.deprecated) { + return; + } + const currentPropPath = utils.addToJsonPath(currentPath, ["properties", propertyName]); + resolvedSchemaProps[propertyName] = _resolveSchema( + context, + property, + stack, + resolveFor, + _2.cloneDeep(seenRef), + currentPropPath + ); + }); + schema2.properties = resolvedSchemaProps; + schema2.type = schema2.type || SCHEMA_TYPES.object; + } else if (concreteUtils.compareTypes(schema2.type, SCHEMA_TYPES.array) && schema2.items) { + schema2.items = _resolveSchema( + context, + schema2.items, + stack, + resolveFor, + _2.cloneDeep(seenRef), + utils.addToJsonPath(currentPath, ["items"]) + ); + } else if (_2.every(SCHEMA_PROPERTIES_TO_EXCLUDE, (schemaKey) => { + return !schema2.hasOwnProperty(schemaKey); + })) { + if (schema2.hasOwnProperty("type")) { + let { parametersResolution } = context.computedOptions; + if (resolveFor === CONVERSION && parametersResolution === "schema") { + if (!schema2.hasOwnProperty("format")) { + schema2.default = "<" + schema2.type + ">"; + } else if (typesMap.hasOwnProperty(schema2.type)) { + schema2.default = typesMap[schema2.type][schema2.format]; + if (!schema2.default && schema2.format) { + schema2.default = "<" + (schema2.type === SCHEMA_TYPES.string ? schema2.format : schema2.type) + ">"; + } + } else { + schema2.default = "<" + schema2.type + (schema2.format ? "-" + schema2.format : "") + ">"; + } + } + } + } + if (schema2.hasOwnProperty("additionalProperties")) { + schema2.additionalProperties = _2.isBoolean(schema2.additionalProperties) ? schema2.additionalProperties : _resolveSchema( + context, + schema2.additionalProperties, + stack, + resolveFor, + _2.cloneDeep(seenRef), + utils.addToJsonPath(currentPath, ["additionalProperties"]) + ); + schema2.type = schema2.type || SCHEMA_TYPES.object; + } + if (schema2.hasOwnProperty("enum")) { + _2.forEach(schema2.enum, (item, index) => { + if (item && item.hasOwnProperty("$ref")) { + schema2.enum[index] = resolveRefFromSchema( + context, + item.$ref, + stack, + _2.cloneDeep(seenRef) + ); + } + }); + } + if (schema2.readOnly) { + context.readOnlyPropCache[currentPath] = true; + } + if (schema2.writeOnly) { + context.writeOnlyPropCache[currentPath] = true; + } + return schema2; + }; + var resolveSchema = (context, schema2, { stack = 0, resolveFor = CONVERSION, seenRef = {}, isResponseSchema = false } = {}) => { + resetReadWritePropCache(context); + let resolvedSchema = _resolveSchema(context, schema2, stack, resolveFor, seenRef); + if (!_2.isEmpty(context.readOnlyPropCache) || !_2.isEmpty(context.writeOnlyPropCache)) { + resolvedSchema = _2.cloneDeep(resolvedSchema); + } + if (isResponseSchema) { + _2.forOwn(context.writeOnlyPropCache, (value, key) => { + _2.unset(resolvedSchema, utils.getJsonPathArray(key)); + }); + } else { + _2.forOwn(context.readOnlyPropCache, (value, key) => { + _2.unset(resolvedSchema, utils.getJsonPathArray(key)); + }); + } + return resolvedSchema; + }; + var getParamSerialisationInfo = (context, param, { isResponseSchema = false } = {}) => { + let paramName = _2.get(param, "name"), paramSchema, style, explode, propSeparator, keyValueSeparator, startValue = "", isExplodable; + if (!_2.isObject(param)) { + return {}; + } + paramSchema = resolveSchema(context, param.schema, { isResponseSchema }); + isExplodable = paramSchema.type === "object"; + switch (param.in) { + case "path": + style = _2.includes(["matrix", "label", "simple"], param.style) ? param.style : "simple"; + break; + case "query": + style = _2.includes(["form", "spaceDelimited", "pipeDelimited", "deepObject"], param.style) ? param.style : "form"; + break; + case "header": + style = "simple"; + break; + default: + style = "simple"; + break; + } + explode = _2.isBoolean(param.explode) ? param.explode : _2.includes(["form", "deepObject"], style); + switch (style) { + case "matrix": + isExplodable = paramSchema.type === "object" || explode; + startValue = ";" + (paramSchema.type === "object" && explode ? "" : paramName + "="); + propSeparator = explode ? ";" : ","; + keyValueSeparator = explode ? "=" : ","; + break; + case "label": + startValue = "."; + propSeparator = "."; + keyValueSeparator = explode ? "=" : "."; + break; + case "form": + propSeparator = keyValueSeparator = ","; + break; + case "simple": + propSeparator = ","; + keyValueSeparator = explode ? "=" : ","; + break; + case "spaceDelimited": + explode = false; + propSeparator = keyValueSeparator = "%20"; + break; + case "pipeDelimited": + explode = false; + propSeparator = keyValueSeparator = "|"; + break; + case "deepObject": + explode = true; + break; + default: + break; + } + return { style, explode, startValue, propSeparator, keyValueSeparator, isExplodable }; + }; + var hash = (input) => { + return crypto4.createHash("sha1").update(input).digest("base64"); + }; + var fakeSchema = (context, schema2, shouldGenerateFromExample = true) => { + try { + let stringifiedSchema = typeof schema2 === "object" && JSON.stringify(schema2), key = hash(stringifiedSchema), restrictArrayItems = typeof stringifiedSchema === "string" && stringifiedSchema.length > SCHEMA_SIZE_OPTIMIZATION_THRESHOLD, fakedSchema; + stringifiedSchema = null; + if (context.schemaFakerCache[key]) { + return context.schemaFakerCache[key]; + } + schemaFaker.option({ + useExamplesValue: shouldGenerateFromExample, + defaultMinItems: restrictArrayItems ? 1 : 2, + defaultMaxItems: restrictArrayItems ? 1 : 2 + }); + fakedSchema = schemaFaker(schema2, null, context.schemaValidationCache || {}); + context.schemaFakerCache[key] = fakedSchema; + return fakedSchema; + } catch (error) { + console.warn( + "Error faking a schema. Not faking this schema. Schema:", + schema2, + "Error", + error + ); + return null; + } + }; + var resolveValueOfParameter = (context, param, { schemaFormat = SCHEMA_FORMATS.DEFAULT, isResponseSchema = false } = {}) => { + if (!param || !param.hasOwnProperty("schema")) { + return ""; + } + const { indentCharacter } = context.computedOptions, resolvedSchema = resolveSchema(context, param.schema, { isResponseSchema }), { parametersResolution } = context.computedOptions, shouldGenerateFromExample = parametersResolution === "example", hasExample = param.example !== void 0 || param.schema.example !== void 0 || param.examples !== void 0 || param.schema.examples !== void 0; + if (shouldGenerateFromExample && hasExample) { + let example; + if (param.example !== void 0) { + example = param.example; + } else if (param.schema.example !== void 0) { + example = _2.has(param.schema.example, "value") ? param.schema.example.value : param.schema.example; + } else { + example = getExampleData(context, param.examples || param.schema.examples); + } + return example; + } + schemaFaker.option({ + useExamplesValue: true + }); + if (resolvedSchema.properties) { + for (const prop in resolvedSchema.properties) { + if (resolvedSchema.properties.hasOwnProperty(prop)) { + if (resolvedSchema.properties[prop].format === "byte" || resolvedSchema.properties[prop].format === "decimal") { + delete resolvedSchema.properties[prop].format; + } + } + } + } + try { + if (schemaFormat === SCHEMA_FORMATS.XML) { + return xmlFaker(null, resolvedSchema, indentCharacter, parametersResolution); + } + return fakeSchema(context, resolvedSchema, shouldGenerateFromExample); + } catch (e) { + console.warn( + "Error faking a schema. Not faking this schema. Schema:", + resolvedSchema, + "Error", + e + ); + return ""; + } + }; + var resolveUrlForPostmanRequest = (operationPath) => { + return sanitizeUrl(operationPath); + }; + var extractDeepObjectParams = (deepObject, objectKey) => { + let extractedParams = []; + _2.keys(deepObject).forEach((key) => { + let value = deepObject[key]; + if (value && typeof value === "object") { + extractedParams = _2.concat(extractedParams, extractDeepObjectParams(value, objectKey + "[" + key + "]")); + } else { + extractedParams.push({ key: objectKey + "[" + key + "]", value }); + } + }); + return extractedParams; + }; + var getParameterDescription = (parameter) => { + if (!_2.isObject(parameter)) { + return ""; + } + return (parameter.required ? "(Required) " : "") + (parameter.description || "") + (parameter.enum ? " (This can only be one of " + parameter.enum + ")" : ""); + }; + var serialiseParamsBasedOnStyle = (context, param, paramValue, { isResponseSchema = false } = {}) => { + const { style, explode, startValue, propSeparator, keyValueSeparator, isExplodable } = getParamSerialisationInfo(context, param, { isResponseSchema }), { enableOptionalParameters } = context.computedOptions; + let serialisedValue = "", description = getParameterDescription(param), paramName = _2.get(param, "name"), disabled = !enableOptionalParameters && _2.get(param, "required") !== true, pmParams = [], isNotSerializable = false; + switch (style) { + case "form": + if (explode && _2.isObject(paramValue)) { + const isArrayValue = _2.isArray(paramValue); + _2.forEach(paramValue, (value, key) => { + pmParams.push({ + key: isArrayValue ? paramName : key, + value: value === void 0 ? "" : _2.toString(value), + description, + disabled + }); + }); + return pmParams; + } + break; + case "deepObject": + if (_2.isObject(paramValue) && !_2.isArray(paramValue)) { + let extractedParams = extractDeepObjectParams(paramValue, paramName); + _2.forEach(extractedParams, (extractedParam) => { + pmParams.push({ + key: extractedParam.key, + value: _2.toString(extractedParam.value) || "", + description, + disabled + }); + }); + return pmParams; + } else if (_2.isArray(paramValue)) { + isNotSerializable = true; + pmParams.push({ + key: paramName, + value: "", + disabled + }); + } + break; + default: + break; + } + if (isNotSerializable) { + return pmParams; + } + if (_2.isObject(paramValue)) { + _2.forEach(paramValue, (value, key) => { + !_2.isEmpty(serialisedValue) && (serialisedValue += propSeparator); + isExplodable && (serialisedValue += key + keyValueSeparator); + serialisedValue += value === void 0 ? "" : _2.toString(value); + }); + } else if (!_2.isNil(paramValue)) { + serialisedValue += paramValue; + } + serialisedValue = startValue + serialisedValue; + pmParams.push({ + key: paramName, + value: _2.toString(serialisedValue), + description, + disabled + }); + return pmParams; + }; + var getTypeOfContent = (content) => { + if (_2.isArray(content)) { + return SCHEMA_TYPES.array; + } + return typeof content; + }; + var parseMediaType = (str) => { + let simpleMediaTypeRegExp = /^\s*([^\s\/;]+)\/([^;\s]+)\s*(?:;(.*))?$/, match = simpleMediaTypeRegExp.exec(str), type = "", subtype = ""; + if (match) { + type = _2.toLower(match[1]); + subtype = _2.toLower(match[2]); + } + return { type, subtype }; + }; + var getHeaderFamily = (cTypeHeader) => { + let mediaType = parseMediaType(cTypeHeader); + if (mediaType.type === "application" && (mediaType.subtype === "json" || _2.endsWith(mediaType.subtype, "+json"))) { + return HEADER_TYPE.JSON; + } + if ((mediaType.type === "application" || mediaType.type === "text") && (mediaType.subtype === "xml" || _2.endsWith(mediaType.subtype, "+xml"))) { + return HEADER_TYPE.XML; + } + return HEADER_TYPE.INVALID; + }; + var getXMLExampleData = (context, exampleData, requestBodySchema) => { + const { parametersResolution, indentCharacter } = context.computedOptions; + let reqBodySchemaWithExample = requestBodySchema; + if (typeof requestBodySchema === "object") { + reqBodySchemaWithExample = Object.assign({}, requestBodySchema, { example: exampleData }); + } + return xmlFaker(null, reqBodySchemaWithExample, indentCharacter, parametersResolution); + }; + var generateExamples = (context, responseExamples, requestBodyExamples, responseBodySchema, isXMLExample) => { + const pmExamples = [], responseExampleKeys = _2.map(responseExamples, "key"), requestBodyExampleKeys = _2.map(requestBodyExamples, "key"), usedRequestExamples = _2.fill(Array(requestBodyExamples.length), false), exampleKeyComparator = (example, key) => { + return _2.toLower(example.key) === _2.toLower(key); + }; + let matchedKeys = _2.intersectionBy(responseExampleKeys, requestBodyExampleKeys, _2.toLower), isResponseCodeMatching = false; + if (!matchedKeys.length && responseExamples.length === 1 && responseExamples[0].key === "_default") { + const responseCodes = _2.map(responseExamples, "responseCode"); + matchedKeys = _2.intersectionBy(responseCodes, requestBodyExampleKeys, _2.toLower); + isResponseCodeMatching = matchedKeys.length > 0; + } + if (matchedKeys.length) { + _2.forEach(matchedKeys, (key) => { + const matchedRequestExamples = _2.filter(requestBodyExamples, (example) => { + return exampleKeyComparator(example, key); + }), responseExample2 = _2.find(responseExamples, (example) => { + if (isResponseCodeMatching) { + return example.responseCode === key; + } + return exampleKeyComparator(example, key); + }); + let requestExample = _2.find(matchedRequestExamples, ["contentType", _2.get(responseExample2, "contentType")]), responseExampleData2; + if (!requestExample) { + requestExample = _2.head(matchedRequestExamples); + } + responseExampleData2 = getExampleData(context, { [responseExample2.key]: responseExample2.value }); + if (isXMLExample) { + responseExampleData2 = getXMLExampleData(context, responseExampleData2, responseBodySchema); + } + pmExamples.push({ + request: getExampleData(context, { [requestExample.key]: requestExample.value }), + response: responseExampleData2, + name: _2.get(responseExample2, "value.summary") || responseExample2.key !== "_default" && responseExample2.key || _2.get(requestExample, "value.summary") || requestExample.key || "Example" + }); + }); + return pmExamples; + } + _2.forEach(responseExamples, (responseExample2, index) => { + if (!_2.isObject(responseExample2)) { + return; + } + let responseExampleData2 = getExampleData(context, { [responseExample2.key]: responseExample2.value }), requestExample; + if (isXMLExample) { + responseExampleData2 = getXMLExampleData(context, responseExampleData2, responseBodySchema); + } + if (_2.isEmpty(requestBodyExamples)) { + pmExamples.push({ + response: responseExampleData2, + name: _2.get(responseExample2, "value.summary") || responseExample2.key + }); + return; + } + if (requestBodyExamples[index] && !usedRequestExamples[index]) { + requestExample = requestBodyExamples[index]; + usedRequestExamples[index] = true; + } else { + requestExample = requestBodyExamples[0]; + } + pmExamples.push({ + request: getExampleData(context, { [requestExample.key]: requestExample.value }), + response: responseExampleData2, + name: _2.get(responseExample2, "value.summary") || responseExample2.key !== "_default" && responseExample2.key || _2.get(requestExample, "value.summary") || requestExample.key || "Example" + }); + }); + let responseExample, responseExampleData; + for (let i = 0; i < requestBodyExamples.length; i++) { + if (!usedRequestExamples[i] || pmExamples.length === 0) { + if (!responseExample) { + responseExample = _2.head(responseExamples); + if (responseExample) { + responseExampleData = getExampleData(context, { [responseExample.key]: responseExample.value }); + } + if (isXMLExample) { + responseExampleData = getXMLExampleData(context, responseExampleData, responseBodySchema); + } + } + pmExamples.push({ + request: getExampleData(context, { [requestBodyExamples[i].key]: requestBodyExamples[i].value }), + response: responseExampleData, + name: _2.get(requestBodyExamples[i], "value.summary") || requestBodyExamples[i].key !== "_default" && requestBodyExamples[i].key || _2.get(responseExample, "value.summary") || "Example" + }); + } + } + return pmExamples; + }; + var resolveBodyData = (context, requestBodySchema, bodyType, isExampleBody = false, responseCode = null, requestBodyExamples = {}) => { + let { parametersResolution, indentCharacter } = context.computedOptions, headerFamily = getHeaderFamily(bodyType), bodyData = "", shouldGenerateFromExample = parametersResolution === "example", isBodyTypeXML = bodyType === APP_XML || bodyType === TEXT_XML || headerFamily === HEADER_TYPE.XML, bodyKey = isExampleBody ? "response" : "request", responseExamples, example, examples; + if (_2.isEmpty(requestBodySchema)) { + return [{ [bodyKey]: bodyData }]; + } + if (requestBodySchema.$ref) { + requestBodySchema = resolveSchema(context, requestBodySchema, { isResponseSchema: isExampleBody }); + } + if (requestBodySchema.example !== void 0) { + const shouldResolveValueKey = _2.has(requestBodySchema.example, "value") && _2.keys(requestBodySchema.example).length <= 1; + example = shouldResolveValueKey ? requestBodySchema.example.value : requestBodySchema.example; + } else if (_2.get(requestBodySchema, "schema.example") !== void 0) { + const shouldResolveValueKey = _2.has(requestBodySchema.schema.example, "value") && _2.keys(requestBodySchema.schema.example).length <= 1; + example = shouldResolveValueKey ? requestBodySchema.schema.example.value : requestBodySchema.schema.example; + } + examples = requestBodySchema.examples || _2.get(requestBodySchema, "schema.examples"); + requestBodySchema = requestBodySchema.schema || requestBodySchema; + requestBodySchema = resolveSchema(context, requestBodySchema, { isResponseSchema: isExampleBody }); + if (example === void 0 && _2.get(requestBodySchema, "example") !== void 0) { + example = requestBodySchema.example; + } + if (shouldGenerateFromExample && (example !== void 0 || examples)) { + const exampleData = example || getExampleData(context, examples); + if (isBodyTypeXML) { + bodyData = getXMLExampleData(context, exampleData, requestBodySchema); + } else { + bodyData = exampleData; + } + } else if (requestBodySchema) { + requestBodySchema = requestBodySchema.schema || requestBodySchema; + if (requestBodySchema.$ref) { + requestBodySchema = resolveSchema(context, requestBodySchema, { isResponseSchema: isExampleBody }); + } + if (isBodyTypeXML) { + bodyData = xmlFaker(null, requestBodySchema, indentCharacter, parametersResolution); + } else { + if (requestBodySchema.properties) { + _2.forOwn(requestBodySchema.properties, (schema2, prop) => { + if (!_2.isObject(requestBodySchema.properties[prop])) { + return; + } + if (requestBodySchema.properties[prop].format === "byte" || requestBodySchema.properties[prop].format === "decimal") { + delete requestBodySchema.properties[prop].format; + } + }); + } + try { + bodyData = fakeSchema(context, requestBodySchema, shouldGenerateFromExample); + } catch (e) { + console.warn( + "Error faking a schema. Not faking this schema. Schema:", + requestBodySchema, + "Error", + e.message + ); + bodyData = ""; + } + } + } + if (isExampleBody && shouldGenerateFromExample && (_2.size(examples) > 1 || _2.size(requestBodyExamples) > 1)) { + responseExamples = [{ + key: "_default", + value: bodyData, + contentType: bodyType, + responseCode + }]; + if (!_2.isEmpty(examples)) { + responseExamples = _2.map(examples, (example2, key) => { + return { + key, + value: example2, + contentType: bodyType + }; + }); + } + let matchedRequestBodyExamples = _2.filter(requestBodyExamples, ["contentType", bodyType]); + if (_2.isEmpty(matchedRequestBodyExamples)) { + matchedRequestBodyExamples = requestBodyExamples; + } + return generateExamples(context, responseExamples, matchedRequestBodyExamples, requestBodySchema, isBodyTypeXML); + } + return [{ [bodyKey]: bodyData }]; + }; + var resolveUrlEncodedRequestBodyForPostmanRequest = (context, requestBodyContent) => { + let bodyData = "", urlEncodedParams = [], requestBodyData = { + mode: "urlencoded", + urlencoded: urlEncodedParams + }, resolvedBody; + if (_2.isEmpty(requestBodyContent)) { + return requestBodyData; + } + if (_2.has(requestBodyContent, "schema.$ref")) { + requestBodyContent.schema = resolveSchema(context, requestBodyContent.schema); + } + resolvedBody = resolveBodyData(context, requestBodyContent.schema)[0]; + resolvedBody && (bodyData = resolvedBody.request); + const encoding = requestBodyContent.encoding || {}; + _2.forOwn(bodyData, (value, key) => { + let description, required; + if (requestBodyContent.schema) { + description = _2.get(requestBodyContent, ["schema", "properties", key, "description"], ""); + required = _2.has(requestBodyContent.schema, "required") ? _2.indexOf(requestBodyContent.schema.required, key) !== -1 : _2.get(requestBodyContent, ["schema.properties", key], false); + } + const param = encoding[key] || {}; + param.name = key; + param.schema = { type: getTypeOfContent(value) }; + param.in = "query"; + param.description = description; + param.required = required; + urlEncodedParams.push(...serialiseParamsBasedOnStyle(context, param, value)); + }); + return { + body: requestBodyData, + headers: [{ + key: "Content-Type", + value: URLENCODED + }] + }; + }; + var resolveFormDataRequestBodyForPostmanRequest = (context, requestBodyContent) => { + let bodyData = "", formDataParams = [], encoding = {}, requestBodyData = { + mode: "formdata", + formdata: formDataParams + }, resolvedBody; + if (_2.isEmpty(requestBodyContent)) { + return requestBodyData; + } + resolvedBody = resolveBodyData(context, requestBodyContent.schema)[0]; + resolvedBody && (bodyData = resolvedBody.request); + encoding = _2.get(requestBodyContent, "encoding", {}); + _2.forOwn(bodyData, (value, key) => { + let requestBodySchema, contentType = null, paramSchema, description, param; + requestBodySchema = _2.has(requestBodyContent, "schema.$ref") ? resolveSchema(context, requestBodyContent.schema) : _2.get(requestBodyContent, "schema"); + paramSchema = _2.get(requestBodySchema, ["properties", key], {}); + paramSchema.required = _2.has(paramSchema, "required") ? paramSchema.required : _2.indexOf(requestBodySchema.required, key) !== -1; + description = getParameterDescription(paramSchema); + if (typeof _2.get(encoding, `[${key}].contentType`) === "string") { + contentType = encoding[key].contentType; + } + if (paramSchema && paramSchema.type === "string" && paramSchema.format === "binary") { + param = { + key, + value: "", + type: "file" + }; + } else { + param = { + key, + value: _2.toString(value), + type: "text" + }; + } + param.description = description; + if (contentType) { + param.contentType = contentType; + } + formDataParams.push(param); + }); + return { + body: requestBodyData, + headers: [{ + key: "Content-Type", + value: FORM_DATA + }] + }; + }; + var getRawBodyType = (content) => { + let bodyType; + if (content.hasOwnProperty(APP_JS)) { + bodyType = APP_JS; + } else if (content.hasOwnProperty(APP_JSON)) { + bodyType = APP_JSON; + } else if (content.hasOwnProperty(TEXT_HTML)) { + bodyType = TEXT_HTML; + } else if (content.hasOwnProperty(TEXT_PLAIN)) { + bodyType = TEXT_PLAIN; + } else if (content.hasOwnProperty(APP_XML)) { + bodyType = APP_XML; + } else if (content.hasOwnProperty(TEXT_XML)) { + bodyType = TEXT_XML; + } else { + _2.forOwn(content, (value, key) => { + if (content.hasOwnProperty(key) && getHeaderFamily(key) === HEADER_TYPE.JSON) { + bodyType = key; + return false; + } + }); + if (!bodyType) { + for (const cType in content) { + if (content.hasOwnProperty(cType)) { + bodyType = cType; + break; + } + } + } + } + return bodyType; + }; + var resolveRawModeRequestBodyForPostmanRequest = (context, requestContent) => { + let bodyType = getRawBodyType(requestContent), bodyData, headerFamily, dataToBeReturned = {}, { concreteUtils } = context, resolvedBody; + headerFamily = getHeaderFamily(bodyType); + if (concreteUtils.isBinaryContentType(bodyType, requestContent)) { + dataToBeReturned = { + mode: "file" + }; + } else { + resolvedBody = resolveBodyData(context, requestContent[bodyType], bodyType)[0]; + resolvedBody && (bodyData = resolvedBody.request); + if (bodyType === TEXT_XML || bodyType === APP_XML || headerFamily === HEADER_TYPE.XML) { + bodyData = getXmlVersionContent(bodyData); + } + const { indentCharacter } = context.computedOptions, rawModeData = !_2.isObject(bodyData) && _2.isFunction(_2.get(bodyData, "toString")) ? bodyData.toString() : JSON.stringify(bodyData, null, indentCharacter); + dataToBeReturned = { + mode: "raw", + raw: rawModeData + }; + } + if (headerFamily !== HEADER_TYPE.INVALID) { + dataToBeReturned.options = { + raw: { + headerFamily, + language: headerFamily + } + }; + } + return { + body: dataToBeReturned, + headers: [{ + key: "Content-Type", + value: bodyType + }] + }; + }; + var resolveRequestBodyForPostmanRequest = (context, operationItem) => { + let requestBody = operationItem.requestBody, requestContent, encodedRequestBody, formDataRequestBody, rawModeRequestBody; + const { preferredRequestBodyType: optionRequestBodyType } = context.computedOptions, preferredRequestBodyType = optionRequestBodyType || "first-listed"; + if (!requestBody) { + return requestBody; + } + if (requestBody.$ref) { + requestBody = resolveSchema(context, requestBody); + } + requestContent = requestBody.content; + if (!_2.isObject(requestContent)) { + return { + body: "", + headers: [] + }; + } + for (const contentType in requestContent) { + if (contentType === URLENCODED) { + encodedRequestBody = resolveUrlEncodedRequestBodyForPostmanRequest(context, requestContent[contentType]); + if (preferredRequestBodyType === "first-listed") { + return encodedRequestBody; + } + } else if (contentType === FORM_DATA) { + formDataRequestBody = resolveFormDataRequestBodyForPostmanRequest(context, requestContent[contentType]); + if (preferredRequestBodyType === "first-listed") { + return formDataRequestBody; + } + } else { + rawModeRequestBody = resolveRawModeRequestBodyForPostmanRequest(context, requestContent); + if (preferredRequestBodyType === "first-listed") { + return rawModeRequestBody; + } + } + } + if (preferredRequestBodyType) { + if (preferredRequestBodyType === "x-www-form-urlencoded" && encodedRequestBody) { + return encodedRequestBody; + } else if (preferredRequestBodyType === "form-data" && formDataRequestBody) { + return formDataRequestBody; + } + } + return rawModeRequestBody; + }; + var resolvePathItemParams = (context, operationParam, pathParam) => { + if (!Array.isArray(operationParam)) { + operationParam = []; + } + if (!Array.isArray(pathParam)) { + pathParam = []; + } + pathParam.forEach((param, index, arr) => { + if (_2.has(param, "$ref")) { + arr[index] = resolveSchema(context, param); + } + }); + operationParam.forEach((param, index, arr) => { + if (_2.has(param, "$ref")) { + arr[index] = resolveSchema(context, param); + } + }); + if (_2.isEmpty(pathParam)) { + return operationParam; + } else if (_2.isEmpty(operationParam)) { + return pathParam; + } + var reqParam = operationParam.slice(); + pathParam.forEach((param) => { + var dupParam = operationParam.find(function(element) { + return element.name === param.name && element.in === param.in && // the below two conditions because undefined === undefined returns true + element.name && param.name && element.in && param.in; + }); + if (!dupParam) { + reqParam.push(param); + } + }); + return reqParam; + }; + var resolveQueryParamsForPostmanRequest = (context, operationItem, method) => { + const params = resolvePathItemParams(context, operationItem[method].parameters, operationItem.parameters), pmParams = [], { includeDeprecated } = context.computedOptions; + _2.forEach(params, (param) => { + if (!_2.isObject(param)) { + return; + } + if (_2.has(param, "$ref")) { + param = resolveSchema(context, param); + } + if (param.in !== QUERYPARAM || !includeDeprecated && param.deprecated) { + return; + } + let paramValue = resolveValueOfParameter(context, param); + if (typeof paramValue === "number" || typeof paramValue === "boolean") { + paramValue = paramValue.toString(); + } + const deserialisedParams = serialiseParamsBasedOnStyle(context, param, paramValue); + pmParams.push(...deserialisedParams); + }); + return pmParams; + }; + var resolvePathParamsForPostmanRequest = (context, operationItem, method) => { + const params = resolvePathItemParams(context, operationItem[method].parameters, operationItem.parameters), pmParams = []; + _2.forEach(params, (param) => { + if (!_2.isObject(param)) { + return; + } + if (_2.has(param, "$ref")) { + param = resolveSchema(context, param); + } + if (param.in !== PATHPARAM) { + return; + } + let paramValue = resolveValueOfParameter(context, param); + if (typeof paramValue === "number" || typeof paramValue === "boolean") { + paramValue = paramValue.toString(); + } + const deserialisedParams = serialiseParamsBasedOnStyle(context, param, paramValue); + pmParams.push(...deserialisedParams); + }); + return pmParams; + }; + var resolveNameForPostmanReqeust = (context, operationItem, requestUrl) => { + let reqName, { requestNameSource } = context.computedOptions; + switch (requestNameSource) { + case "fallback": { + reqName = operationItem.summary || utils.insertSpacesInName(operationItem.operationId) || operationItem.description || requestUrl; + break; + } + case "url": { + reqName = requestUrl; + break; + } + default: { + reqName = operationItem[requestNameSource] || ""; + break; + } + } + reqName = utils.trimRequestName(reqName); + return reqName; + }; + var resolveHeadersForPostmanRequest = (context, operationItem, method) => { + const params = resolvePathItemParams(context, operationItem[method].parameters, operationItem.parameters), pmParams = [], { keepImplicitHeaders, includeDeprecated } = context.computedOptions; + _2.forEach(params, (param) => { + if (!_2.isObject(param)) { + return; + } + if (_2.has(param, "$ref")) { + param = resolveSchema(context, param); + } + if (param.in !== HEADER || !includeDeprecated && param.deprecated) { + return; + } + if (!keepImplicitHeaders && _2.includes(IMPLICIT_HEADERS, _2.toLower(_2.get(param, "name")))) { + return; + } + let paramValue = resolveValueOfParameter(context, param); + if (typeof paramValue === "number" || typeof paramValue === "boolean") { + paramValue = paramValue.toString(); + } + const deserialisedParams = serialiseParamsBasedOnStyle(context, param, paramValue); + pmParams.push(...deserialisedParams); + }); + return pmParams; + }; + var resolveResponseBody = (context, responseBody = {}, requestBodyExamples = {}, code = null) => { + let responseContent, bodyType, allBodyData, headerFamily, acceptHeader, emptyResponse = [{ + body: void 0 + }]; + if (_2.isEmpty(responseBody)) { + return emptyResponse; + } + if (responseBody.$ref) { + responseBody = resolveSchema(context, responseBody, { isResponseSchema: true }); + } + responseContent = responseBody.content; + if (_2.isEmpty(responseContent)) { + return emptyResponse; + } + bodyType = getRawBodyType(responseContent); + headerFamily = getHeaderFamily(bodyType); + allBodyData = resolveBodyData(context, responseContent[bodyType], bodyType, true, code, requestBodyExamples); + return _2.map(allBodyData, (bodyData) => { + let requestBodyData = bodyData.request, responseBodyData = bodyData.response, exampleName = bodyData.name; + if (bodyType === TEXT_XML || bodyType === APP_XML || headerFamily === HEADER_TYPE.XML) { + responseBodyData && (responseBodyData = getXmlVersionContent(responseBodyData)); + } + const { indentCharacter } = context.computedOptions, getRawModeData = (bodyData2) => { + return !_2.isObject(bodyData2) && _2.isFunction(_2.get(bodyData2, "toString")) ? bodyData2.toString() : JSON.stringify(bodyData2, null, indentCharacter); + }, requestRawModeData = getRawModeData(requestBodyData), responseRawModeData = getRawModeData(responseBodyData), responseMediaTypes = _2.keys(responseContent); + if (responseMediaTypes.length > 0) { + acceptHeader = [{ + key: "Accept", + value: responseMediaTypes[0] + }]; + } + return { + request: { + body: requestRawModeData + }, + body: responseRawModeData, + contentHeader: [{ + key: "Content-Type", + value: bodyType + }], + name: exampleName, + bodyType, + acceptHeader + }; + }); + }; + var resolveResponseHeaders = (context, responseHeaders) => { + const headers = [], { includeDeprecated } = context.computedOptions; + if (_2.has(responseHeaders, "$ref")) { + responseHeaders = resolveSchema(context, responseHeaders, { isResponseSchema: true }); + } + _2.forOwn(responseHeaders, (value, headerName) => { + if (!_2.isObject(value)) { + return; + } + if (!includeDeprecated && value.deprecated) { + return; + } + let headerValue = resolveValueOfParameter(context, value, { isResponseSchema: true }); + if (typeof headerValue === "number" || typeof headerValue === "boolean") { + headerValue = headerValue.toString(); + } + const headerData = Object.assign({}, value, { name: headerName }), serialisedHeader = serialiseParamsBasedOnStyle(context, headerData, headerValue, { isResponseSchema: true }); + headers.push(...serialisedHeader); + }); + return headers; + }; + var getPreviewLangugaForResponseBody = (bodyType) => { + const headerFamily = getHeaderFamily(bodyType); + return HEADER_TYPE_PREVIEW_LANGUAGE_MAP[headerFamily] || "text"; + }; + var getResponseAuthHelper = (requestAuthHelper) => { + var responseAuthHelper = { + query: [], + header: [] + }, getValueFromHelper = function(authParams, keyName) { + return _2.find(authParams, { key: keyName }).value; + }, paramLocation, description; + if (!_2.isObject(requestAuthHelper)) { + return responseAuthHelper; + } + description = "Added as a part of security scheme: " + requestAuthHelper.type; + switch (requestAuthHelper.type) { + case "apikey": + paramLocation = getValueFromHelper(requestAuthHelper.apikey, "in"); + responseAuthHelper[paramLocation].push({ + key: getValueFromHelper(requestAuthHelper.apikey, "key"), + value: "", + description + }); + break; + case "basic": + responseAuthHelper.header.push({ + key: "Authorization", + value: "Basic ", + description + }); + break; + case "bearer": + responseAuthHelper.header.push({ + key: "Authorization", + value: "Bearer ", + description + }); + break; + case "digest": + responseAuthHelper.header.push({ + key: "Authorization", + value: "Digest ", + description + }); + break; + case "oauth1": + responseAuthHelper.header.push({ + key: "Authorization", + value: "OAuth ", + description + }); + break; + case "oauth2": + responseAuthHelper.header.push({ + key: "Authorization", + value: "", + description + }); + break; + default: + break; + } + return responseAuthHelper; + }; + var resolveResponseForPostmanRequest = (context, operationItem, request) => { + let responses = [], requestBodyExamples = [], requestAcceptHeader, requestBody = operationItem.requestBody, requestContent, rawBodyType, headerFamily, isBodyTypeXML; + if (typeof requestBody === "object") { + if (requestBody.$ref) { + requestBody = resolveSchema(context, requestBody, { isResponseSchema: true }); + } + requestContent = requestBody.content; + if (typeof requestContent === "object") { + rawBodyType = getRawBodyType(requestContent); + headerFamily = getHeaderFamily(rawBodyType); + isBodyTypeXML = rawBodyType === APP_XML || rawBodyType === TEXT_XML || headerFamily === HEADER_TYPE.XML; + _2.forEach(requestContent, (content, contentType) => { + if (_2.has(content, "examples")) { + _2.forEach(content.examples, (example, name) => { + const exampleObj = example; + if (isBodyTypeXML && exampleObj.value) { + const exampleData = getExampleData(context, { [name]: exampleObj }); + if (isBodyTypeXML) { + let bodyData = getXMLExampleData(context, exampleData, resolveSchema( + context, + content.schema, + { isResponseSchema: true } + )); + exampleObj.value = getXmlVersionContent(bodyData); + } + } + requestBodyExamples.push({ + contentType, + key: name, + value: example + }); + }); + } + }); + } + } + _2.forOwn(operationItem.responses, (responseObj, code) => { + let responseSchema = _2.has(responseObj, "$ref") ? resolveSchema(context, responseObj, { isResponseSchema: true }) : responseObj, { includeAuthInfoInExample } = context.computedOptions, auth = request.auth, resolvedExamples = resolveResponseBody(context, responseSchema, requestBodyExamples, code) || {}, headers = resolveResponseHeaders(context, responseSchema.headers); + _2.forOwn(resolvedExamples, (resolvedExample = {}) => { + let { body, contentHeader = [], bodyType, acceptHeader, name } = resolvedExample, resolvedRequestBody = _2.get(resolvedExample, "request.body"), originalRequest, response, responseAuthHelper, requestBodyObj = {}, reqHeaders = _2.clone(request.headers) || [], reqQueryParams = _2.clone(_2.get(request, "params.queryParams", [])); + _2.isArray(acceptHeader) && reqHeaders.push(...acceptHeader); + if (_2.get(request, "body.mode") === "raw" && !_2.isNil(resolvedRequestBody)) { + requestBodyObj = { + body: Object.assign({}, request.body, { raw: resolvedRequestBody }) + }; + } + if (includeAuthInfoInExample) { + if (!auth) { + auth = generateAuthForCollectionFromOpenAPI(context.openapi, context.openapi.security); + } + responseAuthHelper = getResponseAuthHelper(auth); + reqHeaders.push(...responseAuthHelper.header); + reqQueryParams.push(...responseAuthHelper.query); + originalRequest = _2.assign({}, request, { + headers: reqHeaders, + params: _2.assign({}, request.params, { queryParams: reqQueryParams }) + }, requestBodyObj); + } else { + originalRequest = _2.assign({}, request, { headers: reqHeaders }, requestBodyObj); + } + if (_2.get(resolvedExample, "name") === "_default" || !(typeof name === "string" && name.length)) { + name = _2.get(responseSchema, "description", `${code} response`); + } + if (_2.isEmpty(requestAcceptHeader)) { + requestAcceptHeader = acceptHeader; + } + response = { + name, + body, + headers: _2.concat(contentHeader, headers), + code, + originalRequest, + _postman_previewlanguage: getPreviewLangugaForResponseBody(bodyType) + }; + responses.push(response); + }); + }); + return { responses, acceptHeader: requestAcceptHeader }; + }; + module2.exports = { + resolvePostmanRequest: function(context, operationItem, path, method) { + context.schemaCache = context.schemaCache || {}; + context.schemaFakerCache = context.schemaFakerCache || {}; + let url = resolveUrlForPostmanRequest(path), baseUrlData = resolveBaseUrlForPostmanRequest(operationItem[method]), requestName = resolveNameForPostmanReqeust(context, operationItem[method], url), queryParams = resolveQueryParamsForPostmanRequest(context, operationItem, method), headers = resolveHeadersForPostmanRequest(context, operationItem, method), pathParams = resolvePathParamsForPostmanRequest(context, operationItem, method), { pathVariables, collectionVariables } = filterCollectionAndPathVariables(url, pathParams), requestBody = resolveRequestBodyForPostmanRequest(context, operationItem[method]), request, securitySchema = _2.get(operationItem, [method, "security"]), authHelper = generateAuthForCollectionFromOpenAPI(context.openapi, securitySchema), { alwaysInheritAuthentication } = context.computedOptions; + headers.push(..._2.get(requestBody, "headers", [])); + pathVariables.push(...baseUrlData.pathVariables); + collectionVariables.push(...baseUrlData.collectionVariables); + url = _2.get(baseUrlData, "baseUrl", "") + url; + request = { + description: operationItem[method].description, + url, + name: requestName, + method: method.toUpperCase(), + params: { + queryParams, + pathParams: pathVariables + }, + headers, + body: _2.get(requestBody, "body"), + auth: alwaysInheritAuthentication ? void 0 : authHelper + }; + const { responses, acceptHeader } = resolveResponseForPostmanRequest(context, operationItem[method], request); + if (!_2.isEmpty(acceptHeader)) { + request.headers = _2.concat(request.headers, acceptHeader); + } + return { + request: { + name: requestName, + request: Object.assign({}, request, { + responses + }) + }, + collectionVariables + }; + }, + resolveResponseForPostmanRequest, + resolveRequestBodyForPostmanRequest, + resolveRefFromSchema, + resolveSchema + }; + } +}); + +// ../../node_modules/openapi-to-postmanv2/libV2/requestMatchingUtils.js +var require_requestMatchingUtils = __commonJS({ + "../../node_modules/openapi-to-postmanv2/libV2/requestMatchingUtils.js"(exports2, module2) { + var _2 = require_lodash(); + function isPmVariable(value) { + return _2.isString(value) && _2.startsWith(value, "{{") && _2.endsWith(value, "}}"); + } + function handleExplicitServersPathToMatch(pathToMatch, schemaPath) { + let pathTMatchSlice, schemaPathArr = _2.reject(schemaPath.split("/"), (segment) => { + return segment === ""; + }), schemaPathSegments = schemaPathArr.length, pathToMatchArr = _2.reject(pathToMatch.split("/"), (segment) => { + return segment === ""; + }), pathToMatchSegments = pathToMatchArr.length; + if (pathToMatchSegments < schemaPathSegments) { + return pathToMatch; + } + pathTMatchSlice = pathToMatchArr.slice(pathToMatchArr.length - schemaPathSegments, pathToMatchArr.length); + return pathTMatchSlice.join("/"); + } + function getFixedPartsFromPathSegment(segment, pathType = "collection") { + var tempSegment = segment, varMatches = segment.match(pathType === "schema" ? /(\{[^\/\{\}]+\})/g : /(\{\{[^\/\{\}]+\}\})/g), fixedParts = []; + _2.forEach(varMatches, (match) => { + let matchedIndex = tempSegment.indexOf(match); + matchedIndex !== 0 && fixedParts.push(tempSegment.slice(0, matchedIndex)); + tempSegment = tempSegment.substr(matchedIndex + match.length); + }); + tempSegment.length > 0 && fixedParts.push(tempSegment); + return fixedParts; + } + function getPostmanUrlSuffixSchemaScore(pmSuffix, schemaPath, options) { + let mismatchFound = false, variables = [], minLength = Math.min(pmSuffix.length, schemaPath.length), sMax = schemaPath.length - 1, pMax = pmSuffix.length - 1, matchedSegments = 0, fixedMatchedSegments = 0, variableMatchedSegments = 0, isSchemaSegmentPathVar = (segment) => { + return segment.startsWith("{") && segment.endsWith("}") && // check that only one path variable is present as collection path variable can contain only one var + segment.indexOf("}") === segment.lastIndexOf("}"); + }; + if (options.strictRequestMatching && pmSuffix.length !== schemaPath.length) { + return { + match: false, + score: null, + pathVars: [] + }; + } + for (let i = 0; i < minLength; i++) { + let schemaFixedParts = getFixedPartsFromPathSegment(schemaPath[sMax - i], "schema"), collectionFixedParts = getFixedPartsFromPathSegment(pmSuffix[pMax - i], "collection"); + if (_2.isEqual(schemaFixedParts, collectionFixedParts) || // exact fixed parts match + isSchemaSegmentPathVar(schemaPath[sMax - i]) || // schema segment is a pathVar + pmSuffix[pMax - i].startsWith(":") || // postman segment is a pathVar + isPmVariable(pmSuffix[pMax - i])) { + if (isSchemaSegmentPathVar(schemaPath[sMax - i]) && // schema segment is a pathVar + (pmSuffix[pMax - i].startsWith(":") || // postman segment is a pathVar + isPmVariable(pmSuffix[pMax - i]))) { + variableMatchedSegments++; + } else if (_2.isEqual(schemaFixedParts, collectionFixedParts)) { + fixedMatchedSegments++; + } + if (isSchemaSegmentPathVar(schemaPath[sMax - i])) { + variables.push({ + key: schemaPath[sMax - i].substring(1, schemaPath[sMax - i].length - 1), + value: pmSuffix[pMax - i] + }); + } + matchedSegments++; + } else { + mismatchFound = true; + break; + } + } + if (!mismatchFound) { + return { + match: true, + // schemaPath endsWith postman path suffix + // score is length of the postman path array + schema array - length difference + // the assumption is that a longer path matching a longer path is a higher score, with + // penalty for any length difference + // schemaPath will always be > postmanPathSuffix because SchemaPath ands with pps + score: 2 * matchedSegments / (schemaPath.length + pmSuffix.length), + fixedMatchedSegments, + variableMatchedSegments, + pathVars: _2.reverse(variables) + // keep index in order of left to right + }; + } + return { + match: false, + score: null, + pathVars: [] + }; + } + function getPostmanUrlSchemaMatchScore(postmanPath, schemaPath, options) { + var postmanPathArr = _2.reject(postmanPath.split("/"), (segment) => { + return segment === ""; + }), schemaPathArr = _2.reject(schemaPath.split("/"), (segment) => { + return segment === ""; + }), matchedPathVars = null, maxScoreFound = -Infinity, anyMatchFound = false, fixedMatchedSegments, variableMatchedSegments, postmanPathSuffixes = []; + for (let i = postmanPathArr.length; i > 0; i--) { + postmanPathSuffixes.push(postmanPathArr.slice(-i)); + break; + } + _2.each(postmanPathSuffixes, (pps) => { + let suffixMatchResult = getPostmanUrlSuffixSchemaScore(pps, schemaPathArr, options); + if (suffixMatchResult.match && suffixMatchResult.score > maxScoreFound) { + maxScoreFound = suffixMatchResult.score; + matchedPathVars = suffixMatchResult.pathVars; + fixedMatchedSegments = suffixMatchResult.fixedMatchedSegments; + variableMatchedSegments = suffixMatchResult.variableMatchedSegments; + anyMatchFound = true; + } + }); + if (postmanPath === "/" && schemaPath === "/") { + anyMatchFound = true; + maxScoreFound = 1; + matchedPathVars = []; + fixedMatchedSegments = 0; + variableMatchedSegments = 0; + } + if (anyMatchFound) { + return { + match: true, + score: maxScoreFound, + pathVars: matchedPathVars, + fixedMatchedSegments, + variableMatchedSegments + }; + } + return { + match: false + }; + } + module2.exports = { + /** + * Finds matching endpoint from definition corresponding to request/transaction. + * + * @param {*} method - Request method + * @param {*} url - Request URL + * @param {*} schema - OAS definition object + * @param {*} options - a standard list of options that's globally passed around. Check options.js for more. + * @returns {Array} - Array of matched definition endpoints + */ + findMatchingRequestFromSchema: function(method, url, schema2, options) { + let parsedUrl = require("url").parse(_2.isString(url) ? url : ""), retVal = [], pathToMatch, matchedPath, matchedPathJsonPath, schemaPathItems = schema2.paths, pathToMatchServer, filteredPathItemsArray = []; + try { + pathToMatch = decodeURI(parsedUrl.pathname); + if (!_2.isNil(parsedUrl.hash)) { + pathToMatch += parsedUrl.hash; + } + } catch (e) { + console.warn( + "Error decoding request URI endpoint. URI: ", + url, + "Error", + e + ); + return retVal; + } + if (!pathToMatch.startsWith("/")) { + pathToMatch = pathToMatch.substring(pathToMatch.indexOf("/")); + } + _2.forOwn(schemaPathItems, (pathItemObject, path) => { + if (!pathItemObject) { + return true; + } + if (!pathItemObject.hasOwnProperty(method.toLowerCase())) { + return true; + } + pathItemObject.parameters = _2.reduce(pathItemObject.parameters, (accumulator, param) => { + if (!_2.isEmpty(param)) { + accumulator.push(param); + } + return accumulator; + }, []); + let schemaMatchResult = { match: false }; + if (pathItemObject[method.toLowerCase()].servers) { + pathToMatchServer = handleExplicitServersPathToMatch(pathToMatch, path); + schemaMatchResult = getPostmanUrlSchemaMatchScore(pathToMatchServer, path, options); + } else { + schemaMatchResult = getPostmanUrlSchemaMatchScore(pathToMatch, path, options); + } + if (!schemaMatchResult.match) { + return true; + } + filteredPathItemsArray.push({ + path, + pathItem: pathItemObject, + matchScore: schemaMatchResult.score, + pathVars: schemaMatchResult.pathVars, + // No. of fixed segment matches between schema and postman url path + // i.e. schema path /user/{userId} and request path /user/{{userId}} has 1 fixed segment match ('user') + fixedMatchedSegments: schemaMatchResult.fixedMatchedSegments, + // No. of variable segment matches between schema and postman url path + // i.e. schema path /user/{userId} and request path /user/{{userId}} has 1 variable segment match ('{userId}') + variableMatchedSegments: schemaMatchResult.variableMatchedSegments + }); + }); + filteredPathItemsArray = _2.orderBy( + filteredPathItemsArray, + ["fixedMatchedSegments", "variableMatchedSegments"], + ["desc", "desc"] + ); + _2.each(filteredPathItemsArray, (fp) => { + let path = fp.path, pathItemObject = fp.pathItem, score = fp.matchScore, pathVars = fp.pathVars; + matchedPath = pathItemObject[method.toLowerCase()]; + if (!matchedPath) { + return true; + } + matchedPathJsonPath = `$.paths[${path}]`; + matchedPath.parameters = _2.reduce(matchedPath.parameters, (accumulator, param) => { + if (!_2.isEmpty(param)) { + accumulator.push(param); + } + return accumulator; + }, []); + matchedPath.parameters = _2.map(matchedPath.parameters, (commonParam) => { + commonParam.pathPrefix = `${matchedPathJsonPath}.${method.toLowerCase()}.parameters`; + return commonParam; + }).concat( + _2.map(pathItemObject.parameters || [], (commonParam) => { + commonParam.pathPrefix = matchedPathJsonPath + ".parameters"; + return commonParam; + }) + ); + retVal.push({ + // using path instead of operationId / sumamry since it's widely understood + name: method + " " + path, + // assign path as schemaPathName property to use path in path object + path: _2.assign(matchedPath, { schemaPathName: path }), + jsonPath: matchedPathJsonPath + "." + method.toLowerCase(), + pathVariables: pathVars, + score + }); + return true; + }); + return retVal; + }, + getPostmanUrlSuffixSchemaScore, + isPmVariable + }; + } +}); + +// ../../node_modules/openapi-to-postmanv2/libV2/validationUtils.js +var require_validationUtils = __commonJS({ + "../../node_modules/openapi-to-postmanv2/libV2/validationUtils.js"(exports2, module2) { + var _2 = require_lodash(); + var { Header } = require_header(); + var { QueryParam } = require_query_param(); + var { Url } = require_url(); + var { Variable } = require_variable(); + var async = require_async(); + var crypto4 = require("crypto"); + var schemaFaker = require_json_schema_faker(); + var xmlFaker = require_xmlSchemaFaker2(); + var utils = require_utils3(); + var { + resolveSchema, + resolveRefFromSchema, + resolvePostmanRequest, + resolveResponseForPostmanRequest + } = require_schemaUtils2(); + var concreteUtils = require_schemaUtils30X(); + var ajvValidationError = require_ajvValidationError(); + var { validateSchema } = require_ajvValidation(); + var { + formatDataPath, + checkIsCorrectType, + isKnownType, + getServersPathVars + } = require_schemaUtilsCommon(); + var { findMatchingRequestFromSchema, isPmVariable } = require_requestMatchingUtils(); + var SCHEMA_FORMATS = { + DEFAULT: "default", + // used for non-request-body data and json + XML: "xml" + // used for request-body XMLs + }; + var URLENCODED = "application/x-www-form-urlencoded"; + var TEXT_PLAIN = "text/plain"; + var PARAMETER_SOURCE = { + REQUEST: "REQUEST", + RESPONSE: "RESPONSE" + }; + var HEADER_TYPE = { + JSON: "json", + XML: "xml", + INVALID: "invalid" + }; + var propNames = { + QUERYPARAM: "query parameter", + PATHVARIABLE: "path variable", + HEADER: "header", + BODY: "request body", + RESPONSE_HEADER: "response header", + RESPONSE_BODY: "response body" + }; + var PROCESSING_TYPE = { + VALIDATION: "VALIDATION", + CONVERSION: "CONVERSION" + }; + var METHODS = ["get", "put", "post", "delete", "options", "head", "patch", "trace"]; + var IMPLICIT_HEADERS = [ + "content-type", + // 'content-type' is defined based on content/media-type of req/res body, + "accept", + "authorization" + ]; + var OAS_NOT_SUPPORTED = ""; + var VALIDATE_OPTIONAL_PARAMS = true; + schemaFaker.option({ + requiredOnly: false, + optionalsProbability: 1, + // always add optional fields + maxLength: 256, + minItems: 1, + // for arrays + maxItems: 20, + // limit on maximum number of items faked for (type: array) + useDefaultValue: true, + ignoreMissingRefs: true, + avoidExampleItemsLength: true, + // option to avoid validating type array schema example's minItems and maxItems props. + failOnInvalidFormat: false + }); + function hash(input) { + return crypto4.createHash("sha1").update(input).digest("base64"); + } + function getDefaultContext(options, components = {}) { + return { + concreteUtils, + schemaCache: {}, + computedOptions: options, + schemaValidationCache: /* @__PURE__ */ new Map(), + specComponents: { components: components.components } + }; + } + function shouldAddDeprecatedOperation(operation, options) { + if (typeof operation === "object") { + return !operation.deprecated || operation.deprecated === true && options.includeDeprecated === true; + } + return false; + } + function safeSchemaFaker(context, oldSchema, resolveFor, parameterSourceOption, components, schemaFormat, schemaCache) { + let prop, key, resolvedSchema, fakedSchema, schemaFakerCache = _2.get(schemaCache, "schemaFakerCache", {}), concreteUtils2 = context.concreteUtils; + const options = context.computedOptions, resolveTo = _2.get(options, "parametersResolution", "example"), indentCharacter = options.indentCharacter; + resolvedSchema = resolveSchema(context, _2.cloneDeep(oldSchema), { + resolveFor: _2.toLower(PROCESSING_TYPE.CONVERSION), + isResponseSchema: parameterSourceOption === PARAMETER_SOURCE.RESPONSE + }); + resolvedSchema = concreteUtils2.fixExamplesByVersion(resolvedSchema); + key = JSON.stringify(resolvedSchema); + if (resolveTo === "schema") { + key = "resolveToSchema " + key; + schemaFaker.option({ + useExamplesValue: false, + useDefaultValue: true + }); + } else if (resolveTo === "example") { + key = "resolveToExample " + key; + schemaFaker.option({ + useExamplesValue: true + }); + } + if (resolveFor === PROCESSING_TYPE.VALIDATION) { + schemaFaker.option({ + avoidExampleItemsLength: false + }); + } + if (schemaFormat === "xml") { + key += " schemaFormatXML"; + } else { + key += " schemaFormatDEFAULT"; + } + key = hash(key); + if (schemaFakerCache[key]) { + return schemaFakerCache[key]; + } + if (resolvedSchema.properties) { + for (prop in resolvedSchema.properties) { + if (resolvedSchema.properties.hasOwnProperty(prop)) { + if (resolvedSchema.properties[prop].format === "binary") { + delete resolvedSchema.properties[prop].format; + } + } + } + } + try { + if (schemaFormat === SCHEMA_FORMATS.XML) { + fakedSchema = xmlFaker(null, resolvedSchema, indentCharacter); + schemaFakerCache[key] = fakedSchema; + return fakedSchema; + } + fakedSchema = schemaFaker(resolvedSchema, null, _2.get(schemaCache, "schemaValidationCache")); + schemaFakerCache[key] = fakedSchema; + return fakedSchema; + } catch (e) { + console.warn( + "Error faking a schema. Not faking this schema. Schema:", + resolvedSchema, + "Error", + e + ); + return null; + } + } + function sanitizeUrlPathParams(reqUrl, pathVars) { + var matches, collectionVars = []; + matches = utils.findPathVariablesFromPath(reqUrl); + if (matches) { + matches.forEach((match) => { + const replaceWith = match.replace(/{{/g, ":").replace(/}}/g, ""); + reqUrl = reqUrl.replace(match, replaceWith); + }); + } + matches = utils.findCollectionVariablesFromPath(reqUrl); + if (matches) { + matches.forEach((match) => { + const collVar = match.replace(/{{/g, "").replace(/}}/g, ""); + pathVars = pathVars.filter((item) => { + if (item.name === collVar) { + collectionVars.push(item); + } + return !(item.name === collVar); + }); + }); + } + return { url: reqUrl, pathVars, collectionVars }; + } + function checkMetadata(transaction, transactionPathPrefix, schemaPath, pathRoute, options, callback) { + let expectedReqName, reqNameMismatch, actualReqName = _2.get(transaction, "name"), trimmedReqName, mismatches = [], mismatchObj, reqUrl; + if (!options.validateMetadata) { + return callback(null, []); + } + trimmedReqName = utils.trimRequestName(actualReqName); + reqUrl = utils.fixPathVariablesInUrl(pathRoute.slice(pathRoute.indexOf("/"))); + reqUrl = sanitizeUrlPathParams(reqUrl, []).url; + switch (options.requestNameSource) { + case "fallback": { + expectedReqName = schemaPath.summary || utils.insertSpacesInName(schemaPath.operationId) || schemaPath.description || reqUrl; + expectedReqName = utils.trimRequestName(expectedReqName); + reqNameMismatch = trimmedReqName !== expectedReqName; + break; + } + case "url": { + expectedReqName = reqUrl; + expectedReqName = utils.trimRequestName(expectedReqName); + reqNameMismatch = !_2.endsWith(actualReqName, reqUrl); + break; + } + default: { + expectedReqName = schemaPath[options.requestNameSource]; + expectedReqName = utils.trimRequestName(expectedReqName); + reqNameMismatch = trimmedReqName !== expectedReqName; + break; + } + } + if (reqNameMismatch) { + mismatchObj = { + property: "REQUEST_NAME", + transactionJsonPath: transactionPathPrefix + ".name", + schemaJsonPath: null, + reasonCode: "INVALID_VALUE", + reason: "The request name didn't match with specified schema" + }; + options.suggestAvailableFixes && (mismatchObj.suggestedFix = { + key: "name", + actualValue: actualReqName || null, + suggestedValue: expectedReqName + }); + mismatches.push(mismatchObj); + } + return callback(null, mismatches); + } + function assignParameterExamples(parameter) { + let example = _2.get(parameter, "example"), examples = _2.values(_2.get(parameter, "examples")); + if (example !== void 0) { + _2.set(parameter, "schema.example", example); + } else if (examples) { + let exampleToUse = _2.get(examples, "[0].value"); + !_2.isUndefined(exampleToUse) && _2.set(parameter, "schema.example", exampleToUse); + } + } + function getParameterDescription(parameter) { + if (!_2.isObject(parameter)) { + return ""; + } + return (parameter.required ? "(Required) " : "") + (parameter.description || "") + (parameter.enum ? " (This can only be one of " + parameter.enum + ")" : ""); + } + function getParamSerialisationInfo(param, parameterSource, components, options) { + var paramName = _2.get(param, "name"), paramSchema = resolveSchema(getDefaultContext(options, components), _2.cloneDeep(param.schema), { + resolveFor: PROCESSING_TYPE.VALIDATION, + isResponseSchema: parameterSource === PARAMETER_SOURCE.RESPONSE + }), style, explode, propSeparator, keyValueSeparator, startValue = "", isExplodable = paramSchema.type === "object"; + if (!_2.isObject(param)) { + return null; + } + switch (param.in) { + case "path": + style = _2.includes(["matrix", "label", "simple"], param.style) ? param.style : "simple"; + break; + case "query": + style = _2.includes(["form", "spaceDelimited", "pipeDelimited", "deepObject"], param.style) ? param.style : "form"; + break; + case "header": + style = "simple"; + break; + default: + style = "simple"; + break; + } + explode = _2.isBoolean(param.explode) ? param.explode : _2.includes(["form", "deepObject"], style); + switch (style) { + case "matrix": + isExplodable = paramSchema.type === "object" || explode; + startValue = ";" + (paramSchema.type === "object" && explode ? "" : paramName + "="); + propSeparator = explode ? ";" : ","; + keyValueSeparator = explode ? "=" : ","; + break; + case "label": + startValue = "."; + propSeparator = "."; + keyValueSeparator = explode ? "=" : "."; + break; + case "form": + propSeparator = keyValueSeparator = ","; + break; + case "simple": + propSeparator = ","; + keyValueSeparator = explode ? "=" : ","; + break; + case "spaceDelimited": + explode = false; + propSeparator = keyValueSeparator = "%20"; + break; + case "pipeDelimited": + explode = false; + propSeparator = keyValueSeparator = "|"; + break; + case "deepObject": + explode = true; + break; + default: + break; + } + return { style, explode, startValue, propSeparator, keyValueSeparator, isExplodable }; + } + function deserialiseParamValue(param, paramValue, parameterSource, components, options) { + var constructedValue, paramSchema = resolveSchema(getDefaultContext(options, components), _2.cloneDeep(param.schema), { + resolveFor: PROCESSING_TYPE.VALIDATION, + isResponseSchema: parameterSource === PARAMETER_SOURCE.RESPONSE + }), isEvenNumber = (num) => { + return num % 2 === 0; + }, convertToDataType = (value) => { + try { + return JSON.parse(value); + } catch (e) { + return value; + } + }; + if (!_2.isObject(param) || !_2.isString(paramValue)) { + return null; + } + let { startValue, propSeparator, keyValueSeparator, isExplodable } = getParamSerialisationInfo(param, parameterSource, components, options); + keyValueSeparator === "%20" && (keyValueSeparator = " "); + propSeparator === "%20" && (propSeparator = " "); + paramValue = paramValue.slice(paramValue.indexOf(startValue) === 0 ? startValue.length : 0); + paramSchema.type === "object" && (constructedValue = {}); + paramSchema.type === "array" && (constructedValue = []); + if (constructedValue) { + let allProps = paramValue.split(propSeparator); + _2.forEach(allProps, (element, index) => { + let keyValArray; + if (propSeparator === keyValueSeparator && isExplodable) { + if (isEvenNumber(index)) { + keyValArray = _2.slice(allProps, index, index + 2); + } else { + return; + } + } else if (isExplodable) { + keyValArray = element.split(keyValueSeparator); + } + if (paramSchema.type === "object") { + _2.set(constructedValue, keyValArray[0], convertToDataType(keyValArray[1])); + } else if (paramSchema.type === "array") { + constructedValue.push(convertToDataType(_2.get(keyValArray, "[1]", element))); + } + }); + } else { + constructedValue = paramValue; + } + return constructedValue; + } + function getPathValue(sourceValue, dataPath, fallback) { + return dataPath === "" ? sourceValue : _2.get(sourceValue, dataPath, fallback); + } + function getSuggestedValue(fakedValue, actualValue2, ajvValidationErrorObj) { + var suggestedValue, tempSuggestedValue, dataPath = formatDataPath(ajvValidationErrorObj.instancePath || ""), targetActualValue, targetFakedValue; + if (dataPath[0] === ".") { + dataPath = dataPath.slice(1); + } + targetActualValue = getPathValue(actualValue2, dataPath, {}); + targetFakedValue = getPathValue(fakedValue, dataPath, {}); + switch (ajvValidationErrorObj.keyword) { + case "minProperties": + suggestedValue = _2.assign( + {}, + targetActualValue, + _2.pick(targetFakedValue, _2.difference(_2.keys(targetFakedValue), _2.keys(targetActualValue))) + ); + break; + case "maxProperties": + suggestedValue = _2.pick(targetActualValue, _2.intersection(_2.keys(targetActualValue), _2.keys(targetFakedValue))); + break; + case "required": + suggestedValue = _2.assign( + {}, + targetActualValue, + _2.pick(targetFakedValue, ajvValidationErrorObj.params.missingProperty) + ); + break; + case "minItems": + suggestedValue = _2.concat(targetActualValue, _2.slice(targetFakedValue, targetActualValue.length)); + break; + case "maxItems": + suggestedValue = _2.slice(targetActualValue, 0, ajvValidationErrorObj.params.limit); + break; + case "uniqueItems": + tempSuggestedValue = _2.cloneDeep(targetActualValue); + tempSuggestedValue[ajvValidationErrorObj.params.j] = _2.last(targetFakedValue); + suggestedValue = tempSuggestedValue; + break; + default: + suggestedValue = getPathValue(fakedValue, dataPath, null); + break; + } + return suggestedValue; + } + function isParamComplexArray(paramKey) { + let regex = /\[[\d]+\]/gm; + return regex.test(paramKey); + } + function parseMediaType(str) { + let simpleMediaTypeRegExp = /^\s*([^\s\/;]+)\/([^;\s]+)\s*(?:;(.*))?$/, match = simpleMediaTypeRegExp.exec(str), type = "", subtype = ""; + if (match) { + type = _2.toLower(match[1]); + subtype = _2.toLower(match[2]); + } + return { type, subtype }; + } + function getHeaderFamily(cTypeHeader) { + let mediaType = parseMediaType(cTypeHeader); + if (mediaType.type === "application" && (mediaType.subtype === "json" || _2.endsWith(mediaType.subtype, "+json"))) { + return HEADER_TYPE.JSON; + } + if ((mediaType.type === "application" || mediaType.type === "text") && (mediaType.subtype === "xml" || _2.endsWith(mediaType.subtype, "+xml"))) { + return HEADER_TYPE.XML; + } + return HEADER_TYPE.INVALID; + } + function getJsonContentType(contentObj) { + let jsonContentType = _2.find(_2.keys(contentObj), (contentType) => { + let mediaType = parseMediaType(contentType); + return mediaType.type === "application" && (mediaType.subtype === "json" || _2.endsWith(mediaType.subtype, "+json")); + }); + return jsonContentType; + } + function checkContentTypeHeader(headers, transactionPathPrefix, schemaPathPrefix, contentObj, mismatchProperty, options) { + let mediaTypes = [], contentHeader, contentHeaderIndex, contentHeaderMediaType, suggestedContentHeader, hasComputedType, humanPropName = mismatchProperty === "HEADER" ? "header" : "response header", mismatches = []; + _2.forEach(_2.keys(contentObj), (contentType) => { + let contentMediaType = parseMediaType(contentType); + mediaTypes.push({ + type: contentMediaType.type, + subtype: contentMediaType.subtype, + contentType: contentMediaType.type + "/" + contentMediaType.subtype + }); + }); + _2.forEach(mediaTypes, (mediaType) => { + let headerFamily = getHeaderFamily(mediaType.contentType); + if (headerFamily !== HEADER_TYPE.INVALID) { + suggestedContentHeader = mediaType.contentType; + hasComputedType = true; + if (headerFamily === HEADER_TYPE.JSON) { + return false; + } + } + }); + if (!hasComputedType && mediaTypes.length > 0) { + suggestedContentHeader = mediaTypes[0].contentType; + hasComputedType = true; + } + _2.forEach(headers, (header, index) => { + if (_2.toLower(header.key) === "content-type") { + let mediaType = parseMediaType(header.value); + contentHeader = header; + contentHeaderIndex = index; + contentHeaderMediaType = mediaType.type + "/" + mediaType.subtype; + return false; + } + }); + if (!_2.isEmpty(contentHeader) && _2.isEmpty(mediaTypes)) { + if (options.showMissingInSchemaErrors && _2.toLower(contentHeaderMediaType) !== TEXT_PLAIN) { + mismatches.push({ + property: mismatchProperty, + transactionJsonPath: transactionPathPrefix + `[${contentHeaderIndex}]`, + schemaJsonPath: null, + reasonCode: "MISSING_IN_SCHEMA", + // Reason for missing in schema suggests that certain media type in req/res body is not present + reason: `The ${mismatchProperty === "HEADER" ? "request" : "response"} body should have media type "${contentHeaderMediaType}"` + }); + } + } else if (_2.isEmpty(contentHeader) && !_2.isEmpty(mediaTypes)) { + let mismatchObj = { + property: mismatchProperty, + transactionJsonPath: transactionPathPrefix, + schemaJsonPath: schemaPathPrefix, + reasonCode: "MISSING_IN_REQUEST", + reason: `The ${humanPropName} "Content-Type" was not found in the transaction` + }; + if (options.suggestAvailableFixes) { + mismatchObj.suggestedFix = { + key: "Content-Type", + actualValue: null, + suggestedValue: { + key: "Content-Type", + value: suggestedContentHeader + } + }; + } + mismatches.push(mismatchObj); + } else if (!_2.isEmpty(contentHeader)) { + let mismatchObj, matched = false; + _2.forEach(mediaTypes, (mediaType) => { + let transactionHeader = _2.split(contentHeaderMediaType, "/"), headerTypeMatched = mediaType.type === "*" || mediaType.type === transactionHeader[0], headerSubtypeMatched = mediaType.subtype === "*" || mediaType.subtype === transactionHeader[1]; + if (headerTypeMatched && headerSubtypeMatched) { + matched = true; + } + }); + if (!matched) { + mismatchObj = { + property: mismatchProperty, + transactionJsonPath: transactionPathPrefix + `[${contentHeaderIndex}].value`, + schemaJsonPath: schemaPathPrefix, + reasonCode: "INVALID_TYPE", + reason: `The ${humanPropName} "Content-Type" needs to be "${suggestedContentHeader}", but we found "${contentHeaderMediaType}" instead` + }; + if (options.suggestAvailableFixes) { + mismatchObj.suggestedFix = { + key: "Content-Type", + actualValue: contentHeader.value, + suggestedValue: suggestedContentHeader + }; + } + mismatches.push(mismatchObj); + } + } + return mismatches; + } + function generateSdkParam(param, location2) { + const sdkElementMap = { + "query": QueryParam, + "header": Header, + "path": Variable + }; + let generatedParam = { + key: param.key, + value: param.value + }; + _2.has(param, "disabled") && (generatedParam.disabled = param.disabled); + if (sdkElementMap[location2]) { + generatedParam = new sdkElementMap[location2](generatedParam); + } + param.description && (generatedParam.description = param.description); + return generatedParam; + } + function extractDeepObjectParams(deepObject, objectKey) { + let extractedParams = []; + Object.keys(deepObject).forEach((key) => { + let value = deepObject[key]; + if (value && typeof value === "object") { + extractedParams = _2.concat(extractedParams, extractDeepObjectParams(value, objectKey + "[" + key + "]")); + } else { + extractedParams.push({ key: objectKey + "[" + key + "]", value }); + } + }); + return extractedParams; + } + function convertParamsWithStyle(param, paramValue, parameterSource, components, schemaCache, options) { + var paramName = _2.get(param, "name"), pmParams = [], serialisedValue = "", description = getParameterDescription(param), disabled = false; + if (!_2.isObject(param)) { + return null; + } + let { style, explode, startValue, propSeparator, keyValueSeparator, isExplodable } = getParamSerialisationInfo(param, parameterSource, components, options); + if (options && !options.enableOptionalParameters) { + disabled = !param.required; + } + switch (style) { + case "form": + if (explode && _2.isObject(paramValue)) { + _2.forEach(paramValue, (value, key) => { + pmParams.push(generateSdkParam({ + key: _2.isArray(paramValue) ? paramName : key, + value: value === void 0 ? "" : value, + description, + disabled + }, _2.get(param, "in"))); + }); + return pmParams; + } + if (explode && _2.get(param, "schema.type") === "object" && _2.isEmpty(_2.get(param, "schema.properties"))) { + return pmParams; + } + break; + case "deepObject": + if (_2.isObject(paramValue)) { + let extractedParams = extractDeepObjectParams(paramValue, paramName); + _2.forEach(extractedParams, (extractedParam) => { + pmParams.push(generateSdkParam({ + key: extractedParam.key, + value: extractedParam.value || "", + description, + disabled + }, _2.get(param, "in"))); + }); + return pmParams; + } + break; + default: + break; + } + if (_2.isObject(paramValue)) { + _2.forEach(paramValue, (value, key) => { + !_2.isEmpty(serialisedValue) && (serialisedValue += propSeparator); + isExplodable && (serialisedValue += key + keyValueSeparator); + serialisedValue += value === void 0 ? "" : value; + }); + } else if (!_2.isNil(paramValue)) { + serialisedValue += paramValue; + } + serialisedValue = startValue + serialisedValue; + pmParams.push(generateSdkParam({ + key: paramName, + value: serialisedValue, + description, + disabled + }, _2.get(param, "in"))); + return pmParams; + } + function convertToPmCollectionVariables(serverVariables, keyName, serverUrl = "") { + var variables = []; + if (serverVariables) { + _2.forOwn(serverVariables, (value, key) => { + let description = getParameterDescription(value); + variables.push(new Variable({ + key, + value: value.default || "", + description + })); + }); + } + if (keyName) { + variables.push(new Variable({ + key: keyName, + value: serverUrl, + type: "string" + })); + } + return variables; + } + function getRequestParams(context, operationParam, pathParam) { + if (!Array.isArray(operationParam)) { + operationParam = []; + } + if (!Array.isArray(pathParam)) { + pathParam = []; + } + pathParam.forEach((param, index, arr) => { + if (_2.has(param, "$ref")) { + arr[index] = resolveRefFromSchema(context, param.$ref); + } + }); + operationParam.forEach((param, index, arr) => { + if (_2.has(param, "$ref")) { + arr[index] = resolveRefFromSchema(context, param.$ref); + } + }); + if (_2.isEmpty(pathParam)) { + return operationParam; + } else if (_2.isEmpty(operationParam)) { + return pathParam; + } + var reqParam = operationParam.slice(); + pathParam.forEach((param) => { + var dupParam = operationParam.find(function(element) { + return element.name === param.name && element.in === param.in && // the below two conditions because undefined === undefined returns true + element.name && param.name && element.in && param.in; + }); + if (!dupParam) { + reqParam.push(param); + } + }); + return reqParam; + } + function resolveFormParamSchema(schema2, schemaKey, encodingObj, requestParams, metaInfo, components, options, shouldIterateChildren) { + let resolvedSchemaParams = [], resolvedProp, encodingValue, pSerialisationInfo, isPropSeparable; + if (_2.isArray(schema2.anyOf) || _2.isArray(schema2.oneOf)) { + _2.forEach(schema2.anyOf || schema2.oneOf, (schemaElement) => { + resolvedSchemaParams = _2.concat(resolvedSchemaParams, resolveFormParamSchema( + schemaElement, + schemaKey, + encodingObj, + requestParams, + _2.assign(metaInfo, { required: false, isComposite: true }), + components, + options, + shouldIterateChildren + )); + }); + return resolvedSchemaParams; + } + resolvedProp = { + name: schemaKey, + schema: schema2, + required: _2.get(metaInfo, "required"), + in: "query", + // serialization follows same behaviour as query params + description: _2.get(schema2, "description", _2.get(metaInfo, "description", "")), + pathPrefix: _2.get(metaInfo, "pathPrefix"), + isComposite: _2.get(metaInfo, "isComposite", false), + deprecated: _2.get(schema2, "deprecated", _2.get(metaInfo, "deprecated")) + }; + encodingValue = _2.get(encodingObj, schemaKey); + if (_2.isObject(encodingValue)) { + _2.has(encodingValue, "style") && (resolvedProp.style = encodingValue.style); + _2.has(encodingValue, "explode") && (resolvedProp.explode = encodingValue.explode); + } + pSerialisationInfo = getParamSerialisationInfo( + resolvedProp, + PARAMETER_SOURCE.REQUEST, + components, + options + ); + isPropSeparable = _2.includes(["form", "deepObject"], pSerialisationInfo.style); + if (!isPropSeparable || !_2.includes(["object", "array"], _2.get(schema2, "type")) && !_2.isEmpty(schemaKey) || _2.isEmpty(schemaKey) && _2.get(schema2, "type") === "array" || !pSerialisationInfo.explode) { + resolvedSchemaParams.push(resolvedProp); + } else if (_2.get(schema2, "type") === "array" && pSerialisationInfo.style === "form" && pSerialisationInfo.explode) { + resolvedProp.schema = _2.get(schema2, "items", {}); + resolvedSchemaParams.push(resolvedProp); + } else { + _2.forEach(_2.get(schema2, "properties"), (propSchema, propName) => { + let resolvedPropName = _2.isEmpty(schemaKey) ? propName : `${schemaKey}[${propName}]`, resolvedProp2 = { + name: resolvedPropName, + schema: propSchema, + in: "query", + // serialization follows same behaviour as query params + description: _2.get(propSchema, "description") || _2.get(metaInfo, "description") || "", + required: _2.get(metaInfo, "required"), + isComposite: _2.get(metaInfo, "isComposite", false), + deprecated: _2.get(propSchema, "deprecated") || _2.get(metaInfo, "deprecated") + }, parentPropName = resolvedPropName.indexOf("[") === -1 ? resolvedPropName : resolvedPropName.slice(0, resolvedPropName.indexOf("[")), encodingValue2 = _2.get(encodingObj, parentPropName), pSerialisationInfo2, isPropSeparable2; + if (_2.isObject(encodingValue2)) { + _2.has(encodingValue2, "style") && (resolvedProp2.style = encodingValue2.style); + _2.has(encodingValue2, "explode") && (resolvedProp2.explode = encodingValue2.explode); + } + if (_2.isUndefined(metaInfo.required) && _2.includes(_2.get(schema2, "required"), propName)) { + resolvedProp2.required = true; + } + pSerialisationInfo2 = getParamSerialisationInfo( + resolvedProp2, + PARAMETER_SOURCE.REQUEST, + components, + options + ); + isPropSeparable2 = _2.includes(["form", "deepObject"], pSerialisationInfo2.style); + if (_2.isArray(propSchema.anyOf) || _2.isArray(propSchema.oneOf)) { + _2.forEach(propSchema.anyOf || propSchema.oneOf, (schemaElement) => { + let nextSchemaKey = _2.isEmpty(schemaKey) ? propName : `${schemaKey}[${propName}]`; + resolvedSchemaParams = _2.concat(resolvedSchemaParams, resolveFormParamSchema( + schemaElement, + nextSchemaKey, + encodingObj, + requestParams, + _2.assign(metaInfo, { required: false, isComposite: true }), + components, + options, + pSerialisationInfo2.style === "deepObject" + )); + }); + return resolvedSchemaParams; + } + if (isPropSeparable2 && propSchema.type === "array" && pSerialisationInfo2.explode) { + if (pSerialisationInfo2.style !== "deepObject" && !_2.includes(["array", "object"], _2.get(propSchema, "items.type"))) { + resolvedSchemaParams.push(_2.assign({}, resolvedProp2, { + schema: _2.get(propSchema, "items"), + isResolvedParam: true + })); + } + } else if (isPropSeparable2 && propSchema.type === "object" && pSerialisationInfo2.explode) { + let localMetaInfo = _2.isEmpty(metaInfo) ? metaInfo = { + required: resolvedProp2.required, + description: resolvedProp2.description, + deprecated: _2.get(resolvedProp2, "deprecated") + } : metaInfo, nextSchemaKey = _2.isEmpty(schemaKey) ? propName : `${schemaKey}[${propName}]`; + if (pSerialisationInfo2.style === "deepObject") { + resolvedSchemaParams = _2.concat(resolvedSchemaParams, resolveFormParamSchema( + propSchema, + nextSchemaKey, + encodingObj, + requestParams, + localMetaInfo, + components, + options, + true + )); + } else { + _2.forEach(_2.get(propSchema, "properties", {}), (value, key) => { + resolvedSchemaParams.push({ + name: key, + schema: value, + isResolvedParam: true, + required: resolvedProp2.required, + description: resolvedProp2.description, + isComposite: _2.get(metaInfo, "isComposite", false), + deprecated: _2.get(resolvedProp2, "deprecated") || _2.get(metaInfo, "deprecated") + }); + }); + } + } else { + resolvedSchemaParams.push(resolvedProp2); + } + }); + if (_2.isObject(_2.get(schema2, "additionalProperties"))) { + const additionalPropSchema = _2.get(schema2, "additionalProperties"), matchingRequestParamKeys = []; + _2.forEach(requestParams, ({ key }) => { + if (_2.isString(key) && schemaKey === "") { + const isParamResolved = _2.some(resolvedSchemaParams, (param) => { + return key === param.key; + }); + !isParamResolved && matchingRequestParamKeys.push(key); + } else if (_2.isString(key) && _2.startsWith(key, schemaKey + "[") && _2.endsWith(key, "]")) { + const childKey = key.substring(key.indexOf(schemaKey + "[") + schemaKey.length + 1, key.length - 1); + if (!_2.includes(childKey, "[")) { + matchingRequestParamKeys.push(key); + } else { + matchingRequestParamKeys.push(schemaKey + "[" + childKey.slice(0, childKey.indexOf("["))); + } + } + }); + _2.forEach(matchingRequestParamKeys, (matchedRequestParamKey) => { + if (_2.get(additionalPropSchema, "type") === "object" && shouldIterateChildren) { + resolvedSchemaParams = _2.concat(resolvedSchemaParams, resolveFormParamSchema( + additionalPropSchema, + matchedRequestParamKey, + encodingObj, + requestParams, + metaInfo, + components, + options, + shouldIterateChildren + )); + } else if (_2.get(additionalPropSchema, "type") !== "array") { + resolvedSchemaParams.push({ + name: matchedRequestParamKey, + schema: additionalPropSchema, + description: _2.get(additionalPropSchema, "description") || _2.get(metaInfo, "description") || "", + required: false, + isResolvedParam: true, + isComposite: true, + deprecated: _2.get(additionalPropSchema, "deprecated") || _2.get(metaInfo, "deprecated") + }); + } + }); + } + } + return resolvedSchemaParams; + } + function checkValueAgainstSchema(context, property, jsonPathPrefix, txnParamName, value, schemaPathPrefix, openApiSchemaObj, parameterSourceOption, components, options, schemaCache, jsonSchemaDialect, callback) { + let mismatches = [], jsonValue, humanPropName = propNames[property], needJsonMatching = property === "BODY" || property === "RESPONSE_BODY", invalidJson = false, valueToUse = value, schema2 = resolveSchema(context, openApiSchemaObj, { + resolveFor: PROCESSING_TYPE.VALIDATION, + isResponseSchema: parameterSourceOption === PARAMETER_SOURCE.RESPONSE + }), compositeSchema = schema2.oneOf || schema2.anyOf, compareTypes = _2.get(context, "concreteUtils.compareTypes") || concreteUtils.compareTypes; + if (needJsonMatching) { + try { + jsonValue = JSON.parse(value); + valueToUse = jsonValue; + } catch (e) { + jsonValue = ""; + invalidJson = true; + } + } + if (compositeSchema) { + async.map(compositeSchema, (elementSchema, cb) => { + setTimeout(() => { + checkValueAgainstSchema( + context, + property, + jsonPathPrefix, + txnParamName, + value, + `${schemaPathPrefix}.${schema2.oneOf ? "oneOf" : "anyOf"}[${_2.findIndex(compositeSchema, elementSchema)}]`, + elementSchema, + parameterSourceOption, + components, + options, + schemaCache, + jsonSchemaDialect, + cb + ); + }, 0); + }, (err, results) => { + let sortedResults; + if (err) { + return callback(err, []); + } + sortedResults = _2.sortBy(results, (res) => { + return res.length; + }); + return callback(null, sortedResults[0]); + }); + } else if (schema2 && schema2.type) { + if (isKnownType(schema2)) { + let isCorrectType; + if (options.ignoreUnresolvedVariables && isPmVariable(valueToUse)) { + isCorrectType = true; + } else { + isCorrectType = checkIsCorrectType(valueToUse, schema2); + } + if (!isCorrectType) { + let reason = "", mismatchObj; + if (_2.includes(["QUERYPARAM", "PATHVARIABLE", "HEADER"], property) && (compareTypes(schema2.type, "object") || compareTypes(schema2.type, "array"))) { + return callback(null, []); + } + if (property === "RESPONSE_BODY" || property === "BODY") { + reason = "The " + humanPropName; + } else if (txnParamName) { + reason = `The ${humanPropName} "${txnParamName}"`; + } else { + reason = `A ${humanPropName}`; + } + reason += ` needs to be of type ${schema2.type}, but we found `; + if (!options.shortValidationErrors) { + reason += `"${valueToUse}"`; + } else if (invalidJson) { + reason += "invalid JSON"; + } else if (Array.isArray(valueToUse)) { + reason += "an array instead"; + } else if (typeof valueToUse === "object") { + reason += "an object instead"; + } else { + reason += `a ${typeof valueToUse} instead`; + } + mismatchObj = { + property, + transactionJsonPath: jsonPathPrefix, + schemaJsonPath: schemaPathPrefix, + reasonCode: "INVALID_TYPE", + reason + }; + if (options.suggestAvailableFixes) { + mismatchObj.suggestedFix = { + key: txnParamName, + actualValue: valueToUse, + suggestedValue: safeSchemaFaker( + context, + schema2 || {}, + PROCESSING_TYPE.VALIDATION, + parameterSourceOption, + components, + SCHEMA_FORMATS.DEFAULT, + schemaCache + ) + }; + } + return callback(null, [mismatchObj]); + } + if (isCorrectType && needJsonMatching) { + let filteredValidationError = validateSchema(schema2, valueToUse, options, jsonSchemaDialect); + if (!_2.isEmpty(filteredValidationError)) { + let mismatchObj, suggestedValue, fakedValue = safeSchemaFaker( + context, + schema2 || {}, + PROCESSING_TYPE.VALIDATION, + parameterSourceOption, + components, + SCHEMA_FORMATS.DEFAULT, + schemaCache + ); + if (options.detailedBlobValidation && needJsonMatching) { + _2.forEach(filteredValidationError, (ajvError) => { + let localSchemaPath = ajvError.schemaPath.replace(/\//g, ".").slice(2), dataPath = formatDataPath(ajvError.instancePath || ""); + if (dataPath[0] === ".") { + dataPath = dataPath.slice(1); + } + mismatchObj = _2.assign({ + property, + transactionJsonPath: jsonPathPrefix + formatDataPath(ajvError.instancePath), + schemaJsonPath: schemaPathPrefix + "." + localSchemaPath + }, ajvValidationError(ajvError, { property, humanPropName })); + if (options.suggestAvailableFixes) { + mismatchObj.suggestedFix = { + key: _2.split(dataPath, ".").pop(), + actualValue: getPathValue(valueToUse, dataPath, null), + suggestedValue: getSuggestedValue(fakedValue, valueToUse, ajvError) + }; + } + mismatches.push(mismatchObj); + }); + } else { + mismatchObj = { + reason: `The ${humanPropName} didn't match the specified schema`, + reasonCode: "INVALID_TYPE" + }; + if (property === "BODY") { + mismatchObj.reasonCode = "INVALID_BODY"; + } else if (property === "RESPONSE_BODY") { + mismatchObj.reasonCode = "INVALID_RESPONSE_BODY"; + } + if (options.suggestAvailableFixes) { + suggestedValue = _2.cloneDeep(valueToUse); + _2.forEach(filteredValidationError, (ajvError) => { + let dataPath = formatDataPath(ajvError.instancePath || ""); + if (dataPath[0] === ".") { + dataPath = dataPath.slice(1); + } + if (dataPath === "") { + suggestedValue = getSuggestedValue(fakedValue, suggestedValue, ajvError); + } else { + _2.set(suggestedValue, dataPath, getSuggestedValue(fakedValue, suggestedValue, ajvError)); + } + }); + mismatchObj.suggestedFix = { + key: property.toLowerCase(), + actualValue: valueToUse, + suggestedValue + }; + } + mismatches.push(_2.assign({ + property, + transactionJsonPath: jsonPathPrefix, + schemaJsonPath: schemaPathPrefix + }, mismatchObj)); + } + return callback(null, mismatches); + } + return callback(null, []); + } else if (needJsonMatching) { + return callback(null, [{ + property, + transactionJsonPath: jsonPathPrefix, + schemaJsonPath: schemaPathPrefix, + reasonCode: "INVALID_TYPE", + reason: `The ${humanPropName} needs to be of type object/array, but we found "${valueToUse}"`, + suggestedFix: { + key: null, + actualValue: valueToUse, + suggestedValue: {} + // suggest value to be object + } + }]); + } else { + return callback(null, []); + } + } else { + return callback(null, []); + } + } else { + return callback(null, []); + } + } + function checkPathVariables(context, matchedPathData, transactionPathPrefix, schemaPath, components, options, schemaCache, jsonSchemaDialect, callback) { + var mismatchProperty = "PATHVARIABLE", schemaPathVariables, pmPathVariables, determinedPathVariables = matchedPathData.pathVariables, unmatchedVariablesFromTransaction = matchedPathData.unmatchedVariablesFromTransaction; + if (options.validationPropertiesToIgnore.includes(mismatchProperty)) { + return callback(null, []); + } + pmPathVariables = utils.findPathVariablesFromSchemaPath(schemaPath.schemaPathName); + schemaPathVariables = _2.filter(schemaPath.parameters, (param) => { + return param.in === "path" && _2.includes(pmPathVariables, param.name); + }); + async.map(determinedPathVariables, (pathVar, cb) => { + let mismatches = [], resolvedParamValue, index = _2.findIndex(determinedPathVariables, pathVar); + const schemaPathVar = _2.find(schemaPathVariables, (param) => { + return param.name === pathVar.key; + }); + if (!schemaPathVar) { + if (options.showMissingInSchemaErrors) { + mismatches.push({ + property: mismatchProperty, + // not adding the pathVar name to the jsonPath because URL is just a string + transactionJsonPath: transactionPathPrefix + `[${index}]`, + schemaJsonPath: null, + reasonCode: "MISSING_IN_SCHEMA", + reason: `The path variable "${pathVar.key}" was not found in the schema` + }); + } + return cb(null, mismatches); + } + if (!pathVar._varMatched && !options.allowUrlPathVarMatching) { + return cb(null, mismatches); + } + assignParameterExamples(schemaPathVar); + resolvedParamValue = deserialiseParamValue( + schemaPathVar, + pathVar.value, + PARAMETER_SOURCE.REQUEST, + components, + options, + schemaCache + ); + setTimeout(() => { + if (!(schemaPathVar && schemaPathVar.schema)) { + return cb(null, []); + } + checkValueAgainstSchema( + context, + mismatchProperty, + transactionPathPrefix + `[${index}].value`, + pathVar.key, + resolvedParamValue, + schemaPathVar.pathPrefix + "[?(@.name=='" + schemaPathVar.name + "')]", + schemaPathVar.schema, + PARAMETER_SOURCE.REQUEST, + components, + options, + schemaCache, + jsonSchemaDialect, + cb + ); + }, 0); + }, (err, res) => { + let mismatches = [], mismatchObj; + const unmatchedSchemaVariableNames = determinedPathVariables.filter((pathVariable) => { + return !pathVariable._varMatched; + }).map((schemaPathVar) => { + return schemaPathVar.key; + }); + if (err) { + return callback(err); + } + _2.each(schemaPathVariables, (pathVar, index) => { + if (!_2.find(determinedPathVariables, (param) => { + return param.key === pathVar.name && (options.allowUrlPathVarMatching || param._varMatched); + })) { + let reasonCode = "MISSING_IN_REQUEST", reason, actualValue2, currentUnmatchedVariableInTransaction = unmatchedVariablesFromTransaction[index], isInvalidValue = currentUnmatchedVariableInTransaction !== void 0; + if (unmatchedSchemaVariableNames.length > 0 && isInvalidValue) { + reason = `The ${currentUnmatchedVariableInTransaction.key} path variable does not match with path variable expected (${unmatchedSchemaVariableNames[index]}) in the schema at this position`; + actualValue2 = { + key: currentUnmatchedVariableInTransaction.key, + description: getParameterDescription(currentUnmatchedVariableInTransaction), + value: currentUnmatchedVariableInTransaction.value + }; + } else { + reason = `The required path variable "${pathVar.name}" was not found in the transaction`; + actualValue2 = null; + } + assignParameterExamples(pathVar); + mismatchObj = { + property: mismatchProperty, + transactionJsonPath: transactionPathPrefix, + schemaJsonPath: pathVar.pathPrefix, + reasonCode, + reason + }; + if (options.suggestAvailableFixes) { + const resolvedSchema = resolveSchema(context, pathVar.schema, { + resolveFor: PROCESSING_TYPE.VALIDATION + }); + mismatchObj.suggestedFix = { + key: pathVar.name, + actualValue: actualValue2, + suggestedValue: { + key: pathVar.name, + value: safeSchemaFaker( + context, + resolvedSchema || {}, + PROCESSING_TYPE.VALIDATION, + PARAMETER_SOURCE.REQUEST, + components, + SCHEMA_FORMATS.DEFAULT, + schemaCache + ), + description: getParameterDescription(pathVar) + } + }; + } + mismatches.push(mismatchObj); + } + }); + return callback(null, _2.concat(_2.flatten(res), mismatches)); + }); + } + function checkQueryParams(context, queryParams, transactionPathPrefix, schemaPath, components, options, schemaCache, jsonSchemaDialect, callback) { + let schemaParams = _2.filter(schemaPath.parameters, (param) => { + return param.in === "query"; + }), requestQueryParams = [], resolvedSchemaParams = [], mismatchProperty = "QUERYPARAM", { includeDeprecated, enableOptionalParameters } = context.computedOptions; + if (options.validationPropertiesToIgnore.includes(mismatchProperty)) { + return callback(null, []); + } + requestQueryParams = _2.filter(queryParams, (pQuery) => { + if (pQuery.disabled === true) { + return false; + } + return pQuery.value !== OAS_NOT_SUPPORTED; + }); + _2.forEach(schemaParams, (param) => { + let pathPrefix = param.pathPrefix, paramSchema = resolveSchema(context, _2.cloneDeep(param.schema), { + resolveFor: PROCESSING_TYPE.VALIDATION + }), { style, explode } = getParamSerialisationInfo(param, PARAMETER_SOURCE.REQUEST, components, options), encodingObj = { [param.name]: { style, explode } }, metaInfo = { + required: _2.get(param, "required") || false, + description: _2.get(param, "description"), + deprecated: _2.get(param, "deprecated") || false, + pathPrefix + }; + resolvedSchemaParams = _2.concat(resolvedSchemaParams, resolveFormParamSchema( + paramSchema, + param.name, + encodingObj, + requestQueryParams, + metaInfo, + components, + options + )); + }); + return async.map(requestQueryParams, (pQuery, cb) => { + let mismatches = [], index = _2.findIndex(queryParams, pQuery), resolvedParamValue = pQuery.value; + const schemaParam = _2.find(resolvedSchemaParams, (param) => { + return param.name === pQuery.key; + }); + if (!schemaParam) { + if (isParamComplexArray(pQuery.key)) { + return cb(null, mismatches); + } + if (options.showMissingInSchemaErrors) { + mismatches.push({ + property: mismatchProperty, + transactionJsonPath: transactionPathPrefix + `[${index}]`, + schemaJsonPath: null, + reasonCode: "MISSING_IN_SCHEMA", + reason: `The query parameter ${pQuery.key} was not found in the schema` + }); + } + return cb(null, mismatches); + } + assignParameterExamples(schemaParam); + if (!schemaParam.isResolvedParam) { + resolvedParamValue = deserialiseParamValue( + schemaParam, + pQuery.value, + PARAMETER_SOURCE.REQUEST, + components, + options, + schemaCache + ); + } + setTimeout(() => { + if (!schemaParam.schema) { + return cb(null, []); + } + checkValueAgainstSchema( + context, + mismatchProperty, + transactionPathPrefix + `[${index}].value`, + pQuery.key, + resolvedParamValue, + schemaParam.pathPrefix + "[?(@.name=='" + schemaParam.name + "')]", + schemaParam.schema, + PARAMETER_SOURCE.REQUEST, + components, + options, + schemaCache, + jsonSchemaDialect, + cb + ); + }, 0); + }, (err, res) => { + let mismatches = [], mismatchObj, filteredSchemaParams = _2.filter(resolvedSchemaParams, (q) => { + if (VALIDATE_OPTIONAL_PARAMS) { + return !q.isComposite; + } + return q.required && !q.isComposite; + }); + _2.each(filteredSchemaParams, (qp) => { + if (qp.deprecated && !includeDeprecated) { + return; + } + if (!enableOptionalParameters && qp.required !== true) { + return; + } + if (!_2.find(requestQueryParams, (param) => { + return param.key === qp.name; + })) { + assignParameterExamples(qp); + mismatchObj = { + property: mismatchProperty, + transactionJsonPath: transactionPathPrefix, + schemaJsonPath: qp.pathPrefix + "[?(@.name=='" + qp.name + "')]", + reasonCode: "MISSING_IN_REQUEST", + reason: `The required query parameter "${qp.name}" was not found in the transaction` + }; + if (options.suggestAvailableFixes) { + const resolvedSchema = resolveSchema(context, qp.schema, { + resolveFor: PROCESSING_TYPE.VALIDATION + }); + mismatchObj.suggestedFix = { + key: qp.name, + actualValue: null, + suggestedValue: { + key: qp.name, + value: safeSchemaFaker( + context, + resolvedSchema || {}, + PROCESSING_TYPE.VALIDATION, + PARAMETER_SOURCE.REQUEST, + components, + SCHEMA_FORMATS.DEFAULT, + schemaCache + ), + description: getParameterDescription(qp) + } + }; + } + mismatches.push(mismatchObj); + } + }); + return callback(null, _2.concat(_2.flatten(res), mismatches)); + }); + } + function checkRequestHeaders(context, headers, transactionPathPrefix, schemaPathPrefix, schemaPath, components, options, schemaCache, jsonSchemaDialect, callback) { + let schemaHeaders = _2.filter(schemaPath.parameters, (param) => { + return param.in === "header"; + }), reqHeaders = _2.filter(headers, (header) => { + if (options.disabledParametersValidation && header.disabled) { + return !header.disabled; + } + return !_2.includes(IMPLICIT_HEADERS, _2.toLower(_2.get(header, "key"))); + }), mismatchProperty = "HEADER", { includeDeprecated, enableOptionalParameters } = context.computedOptions; + if (options.validationPropertiesToIgnore.includes(mismatchProperty)) { + return callback(null, []); + } + return async.map(reqHeaders, (pHeader, cb) => { + let mismatches = [], resolvedParamValue, index = _2.findIndex(headers, pHeader); + const schemaHeader = _2.find(schemaHeaders, (header) => { + return header.name === pHeader.key; + }); + if (!schemaHeader) { + if (options.showMissingInSchemaErrors) { + mismatches.push({ + property: mismatchProperty, + transactionJsonPath: transactionPathPrefix + `[${index}]`, + schemaJsonPath: null, + reasonCode: "MISSING_IN_SCHEMA", + reason: `The header ${pHeader.key} was not found in the schema` + }); + } + return cb(null, mismatches); + } + assignParameterExamples(schemaHeader); + resolvedParamValue = deserialiseParamValue( + schemaHeader, + pHeader.value, + PARAMETER_SOURCE.REQUEST, + components, + options, + schemaCache + ); + setTimeout(() => { + if (!schemaHeader.schema) { + return cb(null, []); + } + checkValueAgainstSchema( + context, + mismatchProperty, + transactionPathPrefix + `[${index}].value`, + pHeader.key, + resolvedParamValue, + schemaHeader.pathPrefix + "[?(@.name=='" + schemaHeader.name + "')]", + schemaHeader.schema, + PARAMETER_SOURCE.REQUEST, + components, + options, + schemaCache, + jsonSchemaDialect, + cb + ); + }, 0); + }, (err, res) => { + let mismatches = [], mismatchObj, reqBody = _2.get(schemaPath, "requestBody"), contentHeaderMismatches = [], filteredHeaders; + if (reqBody) { + if (_2.has(reqBody, "$ref")) { + reqBody = resolveRefFromSchema(context, reqBody.$ref); + } + contentHeaderMismatches = checkContentTypeHeader( + headers, + transactionPathPrefix, + schemaPathPrefix + ".requestBody.content", + _2.get(reqBody, "content"), + mismatchProperty, + options + ); + } + filteredHeaders = _2.filter(schemaHeaders, (h) => { + const isImplicitHeader = _2.includes(IMPLICIT_HEADERS, _2.toLower(h.name)); + if (VALIDATE_OPTIONAL_PARAMS) { + return !h.isComposite && !isImplicitHeader; + } + return h.required && !h.isComposite && !isImplicitHeader; + }); + _2.each(filteredHeaders, (header) => { + if (!_2.find(reqHeaders, (param) => { + return param.key === header.name; + })) { + if (header.deprecated && !includeDeprecated) { + return; + } + if (!enableOptionalParameters && header.required !== true) { + return; + } + assignParameterExamples(header); + mismatchObj = { + property: mismatchProperty, + transactionJsonPath: transactionPathPrefix, + schemaJsonPath: header.pathPrefix + "[?(@.name=='" + header.name + "')]", + reasonCode: "MISSING_IN_REQUEST", + reason: `The required header "${header.name}" was not found in the transaction` + }; + if (options.suggestAvailableFixes) { + const resolvedSchema = resolveSchema(context, header.schema, { + resolveFor: PROCESSING_TYPE.VALIDATION + }); + mismatchObj.suggestedFix = { + key: header.name, + actualValue: null, + suggestedValue: { + key: header.name, + value: safeSchemaFaker( + context, + resolvedSchema || {}, + PROCESSING_TYPE.VALIDATION, + PARAMETER_SOURCE.REQUEST, + components, + SCHEMA_FORMATS.DEFAULT, + schemaCache + ), + description: getParameterDescription(header) + } + }; + } + mismatches.push(mismatchObj); + } + }); + return callback(null, _2.concat(contentHeaderMismatches, _2.flatten(res), mismatches)); + }); + } + function checkResponseHeaders(context, schemaResponse, headers, transactionPathPrefix, schemaPathPrefix, components, options, schemaCache, jsonSchemaDialect, callback) { + let schemaHeaders, resHeaders = _2.filter(headers, (header) => { + if (options.disabledParametersValidation && header.disabled) { + return !header.disabled; + } + return !_2.includes(IMPLICIT_HEADERS, _2.toLower(_2.get(header, "key"))); + }), mismatchProperty = "RESPONSE_HEADER", { includeDeprecated, enableOptionalParameters } = context.computedOptions; + if (options.validationPropertiesToIgnore.includes(mismatchProperty)) { + return callback(null, []); + } + if (!schemaResponse) { + return callback(null, []); + } + schemaHeaders = schemaResponse.headers; + return async.map(resHeaders, (pHeader, cb) => { + let mismatches = [], index = _2.findIndex(headers, pHeader); + const schemaHeader = _2.get(schemaHeaders, pHeader.key); + if (!schemaHeader) { + if (options.showMissingInSchemaErrors) { + mismatches.push({ + property: mismatchProperty, + transactionJsonPath: transactionPathPrefix + `[${index}]`, + schemaJsonPath: schemaPathPrefix + ".headers", + reasonCode: "MISSING_IN_SCHEMA", + reason: `The header ${pHeader.key} was not found in the schema` + }); + } + return cb(null, mismatches); + } + assignParameterExamples(schemaHeader); + setTimeout(() => { + if (!schemaHeader.schema) { + return cb(null, []); + } + return checkValueAgainstSchema( + context, + mismatchProperty, + transactionPathPrefix + `[${index}].value`, + pHeader.key, + pHeader.value, + schemaPathPrefix + ".headers[" + pHeader.key + "]", + schemaHeader.schema, + PARAMETER_SOURCE.RESPONSE, + components, + options, + schemaCache, + jsonSchemaDialect, + cb + ); + }, 0); + }, (err, res) => { + let mismatches = [], mismatchObj, contentHeaderMismatches = checkContentTypeHeader( + headers, + transactionPathPrefix, + schemaPathPrefix + ".content", + _2.get(schemaResponse, "content"), + mismatchProperty, + options + ), filteredHeaders = _2.filter(schemaHeaders, (h, hName) => { + if (_2.isEmpty(h)) { + return false; + } + h.name = hName; + const isImplicitHeader = _2.includes(IMPLICIT_HEADERS, _2.toLower(hName)); + if (VALIDATE_OPTIONAL_PARAMS) { + return !h.isComposite && !isImplicitHeader; + } + return h.required && !h.isComposite && !isImplicitHeader; + }); + _2.each(filteredHeaders, (header) => { + if (header.deprecated && !includeDeprecated) { + return; + } + if (!enableOptionalParameters && header.required !== true) { + return; + } + if (!_2.find(resHeaders, (param) => { + return param.key === header.name; + })) { + assignParameterExamples(header); + mismatchObj = { + property: mismatchProperty, + transactionJsonPath: transactionPathPrefix, + schemaJsonPath: schemaPathPrefix + ".headers['" + header.name + "']", + reasonCode: "MISSING_IN_REQUEST", + reason: `The required response header "${header.name}" was not found in the transaction` + }; + if (options.suggestAvailableFixes) { + const resolvedSchema = resolveSchema(context, header.schema, { + resolveFor: PROCESSING_TYPE.VALIDATION, + isResponseSchema: true + }); + mismatchObj.suggestedFix = { + key: header.name, + actualValue: null, + suggestedValue: { + key: header.name, + value: safeSchemaFaker( + context, + resolvedSchema || {}, + PROCESSING_TYPE.VALIDATION, + PARAMETER_SOURCE.RESPONSE, + components, + SCHEMA_FORMATS.DEFAULT, + schemaCache + ), + description: getParameterDescription(header) + } + }; + } + mismatches.push(mismatchObj); + } + }); + callback(null, _2.concat(contentHeaderMismatches, _2.flatten(res), mismatches)); + }); + } + function checkRequestBody(context, requestBody, transactionPathPrefix, schemaPathPrefix, schemaPath, components, options, schemaCache, jsonSchemaDialect, callback) { + let jsonSchemaBody, jsonContentType, mismatchProperty = "BODY", { includeDeprecated, enableOptionalParameters } = context.computedOptions; + if (options.validationPropertiesToIgnore.includes(mismatchProperty)) { + return callback(null, []); + } + if (!_2.isEmpty(_2.get(schemaPath, "requestBody.$ref"))) { + schemaPath.requestBody = resolveRefFromSchema(context, schemaPath.requestBody.$ref); + } + jsonContentType = getJsonContentType(_2.get(schemaPath, "requestBody.content", {})); + jsonSchemaBody = _2.get(schemaPath, ["requestBody", "content", jsonContentType, "schema"]); + if (requestBody && requestBody.mode === "raw" && jsonSchemaBody) { + setTimeout(() => { + return checkValueAgainstSchema( + context, + mismatchProperty, + transactionPathPrefix, + null, + // no param name for the request body + requestBody.raw, + schemaPathPrefix + ".requestBody.content[" + jsonContentType + "].schema", + jsonSchemaBody, + PARAMETER_SOURCE.REQUEST, + components, + _2.extend({}, options, { shortValidationErrors: true }), + schemaCache, + jsonSchemaDialect, + callback + ); + }, 0); + } else if (requestBody && requestBody.mode === "urlencoded") { + let urlencodedBodySchema = _2.get(schemaPath, ["requestBody", "content", URLENCODED, "schema"]), resolvedSchemaParams = [], pathPrefix = `${schemaPathPrefix}.requestBody.content[${URLENCODED}].schema`, encodingObj = _2.get(schemaPath, ["requestBody", "content", URLENCODED, "encoding"]), filteredUrlEncodedBody = _2.filter(requestBody.urlencoded, (param) => { + if (options.disabledParametersValidation && param.disabled) { + return !param.disabled; + } + return param.value !== OAS_NOT_SUPPORTED; + }); + urlencodedBodySchema = resolveSchema(context, urlencodedBodySchema, { + resolveFor: PROCESSING_TYPE.VALIDATION + }); + resolvedSchemaParams = resolveFormParamSchema( + urlencodedBodySchema, + "", + encodingObj, + filteredUrlEncodedBody, + {}, + components, + options + ); + return async.map(filteredUrlEncodedBody, (uParam, cb) => { + let mismatches = [], index = _2.findIndex(filteredUrlEncodedBody, uParam), resolvedParamValue = uParam.value; + const schemaParam = _2.find(resolvedSchemaParams, (param) => { + return param.name === uParam.key; + }); + if (!schemaParam) { + if (isParamComplexArray(uParam.key)) { + return cb(null, mismatches); + } + if (options.showMissingInSchemaErrors && _2.get(urlencodedBodySchema, "additionalProperties") !== true) { + mismatches.push({ + property: mismatchProperty, + transactionJsonPath: transactionPathPrefix + `.urlencoded[${index}]`, + schemaJsonPath: null, + reasonCode: "MISSING_IN_SCHEMA", + reason: `The Url Encoded body param "${uParam.key}" was not found in the schema` + }); + } + return cb(null, mismatches); + } + if (!schemaParam.isResolvedParam) { + resolvedParamValue = deserialiseParamValue( + schemaParam, + uParam.value, + PARAMETER_SOURCE.REQUEST, + components, + options, + schemaCache + ); + } + schemaParam.actualValue = uParam.value; + setTimeout(() => { + if (!schemaParam.schema) { + return cb(null, []); + } + checkValueAgainstSchema( + context, + mismatchProperty, + transactionPathPrefix + `.urlencoded[${index}].value`, + uParam.key, + resolvedParamValue, + pathPrefix + ".properties[" + schemaParam.name + "]", + schemaParam.schema, + PARAMETER_SOURCE.REQUEST, + components, + options, + schemaCache, + jsonSchemaDialect, + cb + ); + }, 0); + }, (err, res) => { + let mismatches = [], mismatchObj, getPropNameFromSchemaPath = (schemaPath2) => { + let regex = /\.properties\[(.+)\]/gm; + return _2.last(regex.exec(schemaPath2)); + }; + _2.forEach(_2.flatten(res), (mismatchObj2) => { + if (!_2.isEmpty(mismatchObj2)) { + let propertyName = getPropNameFromSchemaPath(mismatchObj2.schemaJsonPath), schemaParam = _2.find(resolvedSchemaParams, (param) => { + return param.name === propertyName; + }), serializedParamValue; + if (schemaParam) { + serializedParamValue = _2.get(convertParamsWithStyle( + schemaParam, + _2.get(mismatchObj2, "suggestedFix.suggestedValue"), + PARAMETER_SOURCE.REQUEST, + components, + schemaCache, + options + ), "[0].value"); + _2.set(mismatchObj2, "suggestedFix.actualValue", schemaParam.actualValue); + _2.set(mismatchObj2, "suggestedFix.suggestedValue", serializedParamValue); + } + } + }); + const filteredSchemaParams = _2.filter(resolvedSchemaParams, (q) => { + if (VALIDATE_OPTIONAL_PARAMS) { + return !q.isComposite; + } + return q.required && !q.isComposite; + }); + _2.each(filteredSchemaParams, (uParam) => { + if (uParam.deprecated && !includeDeprecated) { + return; + } + if (!enableOptionalParameters && uParam.required !== true) { + return; + } + if (!_2.find(filteredUrlEncodedBody, (param) => { + return param.key === uParam.name; + })) { + mismatchObj = { + property: mismatchProperty, + transactionJsonPath: transactionPathPrefix + ".urlencoded", + schemaJsonPath: pathPrefix + ".properties[" + uParam.name + "]", + reasonCode: "MISSING_IN_REQUEST", + reason: `The Url Encoded body param "${uParam.name}" was not found in the transaction` + }; + if (options.suggestAvailableFixes) { + const resolvedSchema = resolveSchema(context, uParam.schema, { + resolveFor: PROCESSING_TYPE.VALIDATION + }); + mismatchObj.suggestedFix = { + key: uParam.name, + actualValue: null, + suggestedValue: { + key: uParam.name, + value: safeSchemaFaker( + context, + resolvedSchema || {}, + PROCESSING_TYPE.VALIDATION, + PARAMETER_SOURCE.REQUEST, + components, + SCHEMA_FORMATS.DEFAULT, + schemaCache + ), + description: getParameterDescription(uParam) + } + }; + } + mismatches.push(mismatchObj); + } + }); + return callback(null, _2.concat(_2.flatten(res), mismatches)); + }); + } else { + return callback(null, []); + } + } + function checkResponseBody(context, schemaResponse, body, transactionPathPrefix, schemaPathPrefix, components, options, schemaCache, jsonSchemaDialect, callback) { + let schemaContent, jsonContentType, mismatchProperty = "RESPONSE_BODY"; + if (options.validationPropertiesToIgnore.includes(mismatchProperty)) { + return callback(null, []); + } + jsonContentType = getJsonContentType(_2.get(schemaResponse, "content", {})); + schemaContent = _2.get(schemaResponse, ["content", jsonContentType, "schema"]); + if (!schemaContent) { + return callback(null, []); + } + setTimeout(() => { + return checkValueAgainstSchema( + context, + mismatchProperty, + transactionPathPrefix, + null, + // no param name for the response body + body, + schemaPathPrefix + ".content[" + jsonContentType + "].schema", + schemaContent, + PARAMETER_SOURCE.RESPONSE, + components, + _2.extend({}, options, { shortValidationErrors: true }), + schemaCache, + jsonSchemaDialect, + callback + ); + }, 0); + } + function checkResponses(context, transaction, transactionPathPrefix, schemaPathPrefix, schemaPath, components, options, schemaCache, jsonSchemaDialect, cb) { + let matchedResponses = [], responses = transaction.response, mismatchProperty = "RESPONSE"; + async.map(responses, (response, responseCallback) => { + let thisResponseCode = _2.toString(response.code), thisSchemaResponse = _2.get(schemaPath, ["responses", thisResponseCode], _2.get(schemaPath, "responses.default")), responsePathPrefix = thisResponseCode; + if (!thisSchemaResponse) { + let wildcardResponseCode = thisResponseCode.charAt(0) + "XX"; + thisSchemaResponse = _2.get(schemaPath, ["responses", wildcardResponseCode]); + responsePathPrefix = wildcardResponseCode; + } + if (!thisSchemaResponse) { + thisSchemaResponse = _2.get(schemaPath, ["responses", "default"]); + responsePathPrefix = "default"; + } + if (!_2.isEmpty(_2.get(thisSchemaResponse, "$ref"))) { + thisSchemaResponse = resolveRefFromSchema(context, thisSchemaResponse.$ref); + } + _2.forEach(_2.get(thisSchemaResponse, "headers"), (header) => { + if (_2.has(header, "$ref")) { + _2.assign(header, resolveRefFromSchema(context, header.$ref)); + _2.unset(header, "$ref"); + } + }); + if (!thisSchemaResponse) { + let mismatches = []; + if (options.showMissingInSchemaErrors) { + mismatches.push({ + property: mismatchProperty, + transactionJsonPath: transactionPathPrefix + `[${response.id}]`, + schemaJsonPath: null, + reasonCode: "MISSING_IN_SCHEMA", + reason: `The response "${thisResponseCode}" was not found in the schema` + }); + } + return responseCallback(null, { + id: response.id, + matched: _2.isEmpty(mismatches), + mismatches + }); + } else { + matchedResponses.push(responsePathPrefix); + async.parallel({ + headers: (cb2) => { + checkResponseHeaders( + context, + thisSchemaResponse, + response.header, + transactionPathPrefix + "[" + response.id + "].header", + schemaPathPrefix + ".responses." + responsePathPrefix, + components, + options, + schemaCache, + jsonSchemaDialect, + cb2 + ); + }, + body: (cb2) => { + checkResponseBody( + context, + thisSchemaResponse, + response.body, + transactionPathPrefix + "[" + response.id + "].body", + schemaPathPrefix + ".responses." + responsePathPrefix, + components, + options, + schemaCache, + jsonSchemaDialect, + cb2 + ); + } + }, (err, result) => { + return responseCallback(null, { + id: response.id, + matched: result.body.length === 0 && result.headers.length === 0, + mismatches: result.body.concat(result.headers) + }); + }); + } + }, (err, result) => { + let retVal = _2.keyBy(_2.reject(result, (ai) => { + return !ai; + }), "id"), missingResponses = []; + _2.each(_2.get(schemaPath, "responses"), (responseObj, responseCode) => { + responseCode = responseCode === "default" ? "500" : responseCode; + if (!_2.includes(matchedResponses, responseCode)) { + let mismatchObj = { + property: "RESPONSE", + transactionJsonPath: transactionPathPrefix, + schemaJsonPath: schemaPathPrefix + ".responses." + responseCode, + reasonCode: "MISSING_IN_REQUEST", + reason: `The response "${responseCode}" was not found in the transaction` + }; + if (options.suggestAvailableFixes) { + let generatedResponse, resolvedResponse, originalRequest = _2.omit(_2.get(transaction, "request", {}), "response"), resolvedResponses = resolveResponseForPostmanRequest( + context, + { responses: { [responseCode]: responseObj } }, + originalRequest + ); + resolvedResponse = _2.head(resolvedResponses.responses); + generatedResponse = utils.generatePmResponseObject(resolvedResponse); + if (_2.isFunction(generatedResponse.toJSON)) { + generatedResponse = generatedResponse.toJSON(); + } + mismatchObj.suggestedFix = { + key: responseCode, + actualValue: null, + suggestedValue: generatedResponse + }; + } + missingResponses.push(mismatchObj); + } + }); + return cb(null, { mismatches: retVal, missingResponses }); + }); + } + module2.exports = { + validateTransaction: function(context, transaction, { + schema: schema2, + options, + componentsAndPaths, + schemaCache, + matchedEndpoints = [] + }, callback) { + if (!transaction.id || !transaction.request) { + return callback(new Error("All transactions must have `id` and `request` properties.")); + } + const jsonSchemaDialect = schema2.jsonSchemaDialect; + let requestUrl = transaction.request.url, matchedPaths, queryParams = []; + if (typeof requestUrl === "object") { + _2.forEach(requestUrl.variable, (pathVar) => { + if (_2.isNil(pathVar.value) || typeof pathVar.value === "string" && _2.trim(pathVar.value).length === 0) { + pathVar.value = ":" + pathVar.key; + } + }); + queryParams = [...requestUrl.query || []]; + requestUrl = new Url(requestUrl).toString(); + } + matchedPaths = findMatchingRequestFromSchema( + transaction.request.method, + requestUrl, + schema2, + options + ); + if (!matchedPaths.length) { + return callback(null, { + requestId: transaction.id, + endpoints: [] + }); + } + return async.map(matchedPaths, (matchedPath, pathsCallback) => { + const transactionPathVariables = _2.get(transaction, "request.url.variable", []), localServers = matchedPath.path.hasOwnProperty("servers") ? matchedPath.path.servers : [], serversPathVars = [...getServersPathVars(localServers), ...getServersPathVars(schema2.servers)], isNotAServerPathVar = (pathVarName) => { + return !serversPathVars.includes(pathVarName); + }; + matchedPath.unmatchedVariablesFromTransaction = []; + _2.forEach(matchedPath.pathVariables, (pathVar) => { + const mappedPathVar = _2.find(transactionPathVariables, (transactionPathVar) => { + let matched = transactionPathVar.key === pathVar.key; + if (!matched && isNotAServerPathVar(transactionPathVar.key) && !matchedPath.unmatchedVariablesFromTransaction.includes(transactionPathVar)) { + matchedPath.unmatchedVariablesFromTransaction.push(transactionPathVar); + } + return matched; + }); + pathVar.value = _2.get(mappedPathVar, "value", pathVar.value); + pathVar._varMatched = !_2.isEmpty(mappedPathVar); + }); + _2.forEach(_2.get(matchedPath, "path.parameters"), (param) => { + if (param.hasOwnProperty("$ref")) { + _2.assign(param, resolveRefFromSchema(context, param.$ref)); + _2.unset(param, "$ref"); + } + }); + matchedEndpoints.push(matchedPath.jsonPath); + async.parallel({ + metadata: function(cb) { + checkMetadata(transaction, "$", matchedPath.path, matchedPath.name, options, cb); + }, + path: function(cb) { + checkPathVariables( + context, + matchedPath, + "$.request.url.variable", + matchedPath.path, + componentsAndPaths, + options, + schemaCache, + jsonSchemaDialect, + cb + ); + }, + queryparams: function(cb) { + checkQueryParams( + context, + queryParams, + "$.request.url.query", + matchedPath.path, + componentsAndPaths, + options, + schemaCache, + jsonSchemaDialect, + cb + ); + }, + headers: function(cb) { + checkRequestHeaders( + context, + transaction.request.header, + "$.request.header", + matchedPath.jsonPath, + matchedPath.path, + componentsAndPaths, + options, + schemaCache, + jsonSchemaDialect, + cb + ); + }, + requestBody: function(cb) { + checkRequestBody( + context, + transaction.request.body, + "$.request.body", + matchedPath.jsonPath, + matchedPath.path, + componentsAndPaths, + options, + schemaCache, + jsonSchemaDialect, + cb + ); + }, + responses: function(cb) { + checkResponses( + context, + transaction, + "$.responses", + matchedPath.jsonPath, + matchedPath.path, + componentsAndPaths, + options, + schemaCache, + jsonSchemaDialect, + cb + ); + } + }, (err, result) => { + let allMismatches = _2.concat( + result.metadata, + result.queryparams, + result.headers, + result.path, + result.requestBody + ), responseMismatchesPresent = false, retVal, responsesResult = result.responses.mismatches, missingResponses = result.responses.missingResponses || []; + _2.each(responsesResult, (response) => { + if (_2.get(response, "mismatches", []).length > 0) { + responseMismatchesPresent = true; + return false; + } + }); + retVal = { + matched: allMismatches.length === 0 && !responseMismatchesPresent && _2.isEmpty(missingResponses), + endpointMatchScore: matchedPath.score, + endpoint: matchedPath.name, + mismatches: allMismatches, + responses: responsesResult, + missingResponses + }; + pathsCallback(null, retVal); + }); + }, (err, result) => { + let highestScore = -Infinity, bestResults; + result.forEach((endpoint) => { + if (endpoint.endpointMatchScore > highestScore) { + highestScore = endpoint.endpointMatchScore; + } + }); + bestResults = _2.filter(result, (ep) => { + return ep.endpointMatchScore === highestScore; + }); + callback(err, { + requestId: transaction.id, + endpoints: bestResults + }); + }); + }, + /** + * @param {Object} context - Required context from related SchemaPack function + * @param {*} schema OpenAPI spec + * @param {Array} matchedEndpoints - All matched endpoints + * @param {object} components - components defined in the OAS spec. These are used to + * resolve references while generating params. + * @param {object} options - a standard list of options that's globally passed around. Check options.js for more. + * @returns {Array} - Array of all MISSING_ENDPOINT objects + */ + getMissingSchemaEndpoints: function(context, schema2, matchedEndpoints, components, options) { + let endpoints = [], schemaPaths = schema2.paths, rootCollectionVariables, schemaJsonPath; + rootCollectionVariables = convertToPmCollectionVariables( + schema2.baseUrlVariables, + "baseUrl", + schema2.baseUrl + ); + _2.forEach(schemaPaths, (schemaPathObj, schemaPath) => { + _2.forEach(_2.keys(schemaPathObj), (pathKey) => { + schemaJsonPath = `$.paths[${schemaPath}].${_2.toLower(pathKey)}`; + let operationItem = _2.get(schemaPathObj, pathKey) || {}, shouldValidateDeprecated = shouldAddDeprecatedOperation(operationItem, options); + if (METHODS.includes(pathKey) && !matchedEndpoints.includes(schemaJsonPath) && shouldValidateDeprecated) { + let mismatchObj = { + property: "ENDPOINT", + transactionJsonPath: null, + schemaJsonPath, + reasonCode: "MISSING_ENDPOINT", + reason: `The endpoint "${_2.toUpper(pathKey)} ${schemaPath}" is missing in collection`, + endpoint: _2.toUpper(pathKey) + " " + schemaPath + }; + if (options.suggestAvailableFixes) { + let operationItem2 = _2.get(schemaPathObj, pathKey) || {}, conversionResult, variables = rootCollectionVariables, path = schemaPath, requestItem; + operationItem2.parameters = getRequestParams( + context, + operationItem2.parameters, + _2.get(schemaPathObj, "parameters") + ); + if (path[0] === "/") { + path = path.substring(1); + } + if (!_2.isEmpty(_2.get(schemaPathObj, "servers"))) { + let pathLevelServers = schemaPathObj.servers; + variables = convertToPmCollectionVariables( + pathLevelServers[0].variables, + // these are path variables in the server block + utils.fixPathVariableName(path), + // the name of the variable + utils.fixPathVariablesInUrl(pathLevelServers[0].url) + ); + } + conversionResult = resolvePostmanRequest(context, schemaPathObj, schemaPath, pathKey); + requestItem = utils.generateRequestItemObject(conversionResult.request); + _2.set(requestItem, "request.url.raw", conversionResult.request.request.url); + mismatchObj.suggestedFix = { + key: pathKey, + actualValue: null, + // Not adding collection variables for now + suggestedValue: { + request: requestItem, + variables: _2.concat(conversionResult.collectionVariables, _2.values(variables)) + } + }; + } + endpoints.push(mismatchObj); + } + }); + }); + return endpoints; + } + }; + } +}); + +// ../../node_modules/openapi-to-postmanv2/libV2/index.js +var require_libV2 = __commonJS({ + "../../node_modules/openapi-to-postmanv2/libV2/index.js"(exports2, module2) { + var _2 = require_lodash(); + var { Collection } = require_collection(); + var GraphLib = require_graphlib(); + var generateSkeletonTreeFromOpenAPI = require_generateSkeletionTreeFromOpenAPI(); + var generateCollectionFromOpenAPI = require_generateCollectionFromOpenAPI(); + var generateFolderFromOpenAPI = require_generateFolderForOpenAPI(); + var Ajv = require_ajv(); + var addFormats = require_dist5(); + var async = require_async(); + var transactionSchema = require_validationRequestListSchema(); + var OpenApiErr = require_error(); + var { validateTransaction, getMissingSchemaEndpoints } = require_validationUtils(); + var { resolvePostmanRequest } = require_schemaUtils2(); + var { generateRequestItemObject, fixPathVariablesInUrl } = require_utils3(); + module2.exports = { + convertV2: function(context, cb) { + let collectionTree = generateSkeletonTreeFromOpenAPI(context.openapi, context.computedOptions); + let preOrderTraversal = GraphLib.alg.preorder(collectionTree, "root:collection"); + let collection = {}; + _2.forEach(preOrderTraversal, function(nodeIdentified) { + let node = collectionTree.node(nodeIdentified); + switch (node.type) { + case "collection": { + const { data, variables } = generateCollectionFromOpenAPI(context, node); + collection = new Collection(data); + collection = collection.toJSON(); + collection.variable.push(...variables); + collectionTree.setNode( + nodeIdentified, + Object.assign(node, { + ref: collection + }) + ); + break; + } + case "folder": { + let folder = generateFolderFromOpenAPI(context, node).data || {}; + let parent = collectionTree.predecessors(nodeIdentified); + parent = collectionTree.node(parent && parent[0]); + if (!parent.ref.item) { + parent.ref.item = []; + } + parent.ref.item.push(folder); + collectionTree.setNode( + nodeIdentified, + Object.assign(node, { + ref: _2.last(parent.ref.item) + }) + ); + break; + } + case "request": { + let request = {}, collectionVariables = [], requestObject = {}; + try { + ({ request, collectionVariables } = resolvePostmanRequest( + context, + context.openapi.paths[node.meta.path], + node.meta.path, + node.meta.method + )); + requestObject = generateRequestItemObject(request); + } catch (error) { + console.error(error); + break; + } + collection.variable.push(...collectionVariables); + let parent = collectionTree.predecessors(nodeIdentified); + parent = collectionTree.node(parent && parent[0]); + if (!parent.ref.item) { + parent.ref.item = []; + } + parent.ref.item.push(requestObject); + collectionTree.setNode( + nodeIdentified, + Object.assign(node, { + ref: _2.last(parent.ref.item) + }) + ); + break; + } + case "webhook~folder": { + let folder = generateFolderFromOpenAPI(context, node).data || {}; + let parent = collectionTree.predecessors(nodeIdentified); + parent = collectionTree.node(parent && parent[0]); + if (!parent.ref.item) { + parent.ref.item = []; + } + parent.ref.item.push(folder); + collectionTree.setNode( + nodeIdentified, + Object.assign(node, { + ref: _2.last(parent.ref.item) + }) + ); + break; + } + case "webhook~request": { + let request = {}, collectionVariables = [], requestObject = {}; + if (node.meta.method === "parameters") { + break; + } + try { + ({ request, collectionVariables } = resolvePostmanRequest( + context, + context.openapi.webhooks[node.meta.path], + node.meta.path, + node.meta.method + )); + requestObject = generateRequestItemObject(request); + } catch (error) { + console.error(error); + break; + } + collection.variable.push(...collectionVariables); + let parent = collectionTree.predecessors(nodeIdentified); + parent = collectionTree.node(parent && parent[0]); + if (!parent.ref.item) { + parent.ref.item = []; + } + parent.ref.item.push(requestObject); + collectionTree.setNode( + nodeIdentified, + Object.assign(node, { + ref: _2.last(parent.ref.item) + }) + ); + break; + } + default: + break; + } + }); + if (!_2.isEmpty(collection.variable)) { + collection.variable = _2.uniqBy(collection.variable, "key"); + } + return cb(null, { + result: true, + output: [{ + type: "collection", + data: collection + }], + analytics: this.analytics || {} + }); + }, + /** + * + * @description Takes in a request collection (transaction object) and validates it against + * corresponding definition matching endpoint + * + * @param {Object} context - Required context from related SchemaPack function + * @param {Array} transactions - Transactions to be validated + * @param {*} callback return + * @returns {boolean} validation + */ + validateTransactionV2(context, transactions, callback) { + let schema2 = context.openapi, options = context.computedOptions, concreteUtils = context.concreteUtils, componentsAndPaths = { concreteUtils }, schemaCache = context.schemaFakerCache, matchedEndpoints = []; + context.schemaCache = context.schemaCache || {}; + context.schemaFakerCache = context.schemaFakerCache || {}; + Object.assign(componentsAndPaths, concreteUtils.getRequiredData(schema2)); + schema2.servers = _2.isEmpty(schema2.servers) ? [{ url: "/" }] : schema2.servers; + schema2.securityDefs = _2.get(schema2, "components.securitySchemes", {}); + schema2.baseUrl = _2.get(schema2, "servers.0.url", "{{baseURL}}"); + schema2.baseUrlVariables = _2.get(schema2, "servers.0.variables"); + schema2.baseUrl = fixPathVariablesInUrl(schema2.baseUrl); + try { + let ajv = new Ajv({ + allErrors: true, + strict: false + }), validate2, res; + addFormats(ajv); + validate2 = ajv.compile(transactionSchema); + res = validate2(transactions); + if (!res) { + return callback(new OpenApiErr("Invalid syntax provided for requestList", validate2.errors)); + } + } catch (e) { + return callback(new OpenApiErr("Invalid syntax provided for requestList", e)); + } + return async.map(transactions, (transaction, callback2) => { + return validateTransaction(context, transaction, { + schema: schema2, + options, + componentsAndPaths, + schemaCache, + matchedEndpoints + }, callback2); + }, (err, result) => { + var retVal; + if (err) { + return callback(err); + } + retVal = { + requests: _2.keyBy(result, "requestId"), + missingEndpoints: getMissingSchemaEndpoints( + context, + schema2, + matchedEndpoints, + componentsAndPaths, + options, + schemaCache + ) + }; + return callback(null, retVal); + }); + } + }; + } +}); + +// ../../node_modules/ajv-draft-04/dist/vocabulary/core.js +var require_core5 = __commonJS({ + "../../node_modules/ajv-draft-04/dist/vocabulary/core.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var ref_1 = require_ref(); + var core = [ + "$schema", + "id", + "$defs", + { keyword: "$comment" }, + "definitions", + ref_1.default + ]; + exports2.default = core; + } +}); + +// ../../node_modules/ajv-draft-04/dist/vocabulary/validation/limitNumber.js +var require_limitNumber2 = __commonJS({ + "../../node_modules/ajv-draft-04/dist/vocabulary/validation/limitNumber.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var core_1 = require_core2(); + 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 error = { + message: (cxt) => core_1.str`must be ${kwdOp(cxt).okStr} ${cxt.schemaCode}`, + params: (cxt) => core_1._`{comparison: ${kwdOp(cxt).okStr}, limit: ${cxt.schemaCode}}` + }; + var def = { + keyword: Object.keys(KWDs), + type: "number", + schemaType: "number", + $data: true, + error, + code(cxt) { + const { data, schemaCode } = cxt; + cxt.fail$data(core_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]; + } + exports2.default = def; + } +}); + +// ../../node_modules/ajv-draft-04/dist/vocabulary/validation/limitNumberExclusive.js +var require_limitNumberExclusive = __commonJS({ + "../../node_modules/ajv-draft-04/dist/vocabulary/validation/limitNumberExclusive.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__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}`); + } + } + }; + exports2.default = def; + } +}); + +// ../../node_modules/ajv-draft-04/dist/vocabulary/validation/index.js +var require_validation3 = __commonJS({ + "../../node_modules/ajv-draft-04/dist/vocabulary/validation/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var limitNumber_1 = require_limitNumber2(); + var limitNumberExclusive_1 = require_limitNumberExclusive(); + 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 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, + limitNumberExclusive_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 + ]; + exports2.default = validation; + } +}); + +// ../../node_modules/ajv-draft-04/dist/vocabulary/draft4.js +var require_draft4 = __commonJS({ + "../../node_modules/ajv-draft-04/dist/vocabulary/draft4.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var core_1 = require_core5(); + var validation_1 = require_validation3(); + var applicator_1 = require_applicator(); + var format_1 = require_format2(); + var metadataVocabulary = ["title", "description", "default"]; + var draft4Vocabularies = [ + core_1.default, + validation_1.default, + applicator_1.default(), + format_1.default, + metadataVocabulary + ]; + exports2.default = draft4Vocabularies; + } +}); + +// ../../node_modules/ajv-draft-04/dist/refs/json-schema-draft-04.json +var require_json_schema_draft_042 = __commonJS({ + "../../node_modules/ajv-draft-04/dist/refs/json-schema-draft-04.json"(exports2, module2) { + module2.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: {} + }; + } +}); + +// ../../node_modules/ajv-draft-04/dist/index.js +var require_dist6 = __commonJS({ + "../../node_modules/ajv-draft-04/dist/index.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.CodeGen = exports2.Name = exports2.nil = exports2.stringify = exports2.str = exports2._ = exports2.KeywordCxt = void 0; + var core_1 = require_core2(); + var draft4_1 = require_draft4(); + var discriminator_1 = require_discriminator(); + var draft4MetaSchema = require_json_schema_draft_042(); + var META_SUPPORT_DATA = ["/properties"]; + var META_SCHEMA_ID = "http://json-schema.org/draft-04/schema"; + var Ajv = class extends core_1.default { + constructor(opts = {}) { + super({ + ...opts, + schemaId: "id" + }); + } + _addVocabularies() { + super._addVocabularies(); + draft4_1.default.forEach((v) => this.addVocabulary(v)); + 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); + } + }; + module2.exports = exports2 = Ajv; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.default = Ajv; + var core_2 = require_core2(); + Object.defineProperty(exports2, "KeywordCxt", { enumerable: true, get: function() { + return core_2.KeywordCxt; + } }); + var core_3 = require_core2(); + Object.defineProperty(exports2, "_", { enumerable: true, get: function() { + return core_3._; + } }); + Object.defineProperty(exports2, "str", { enumerable: true, get: function() { + return core_3.str; + } }); + Object.defineProperty(exports2, "stringify", { enumerable: true, get: function() { + return core_3.stringify; + } }); + Object.defineProperty(exports2, "nil", { enumerable: true, get: function() { + return core_3.nil; + } }); + Object.defineProperty(exports2, "Name", { enumerable: true, get: function() { + return core_3.Name; + } }); + Object.defineProperty(exports2, "CodeGen", { enumerable: true, get: function() { + return core_3.CodeGen; + } }); + } +}); + +// ../../node_modules/openapi-to-postmanv2/lib/common/UserError.js +var require_UserError = __commonJS({ + "../../node_modules/openapi-to-postmanv2/lib/common/UserError.js"(exports2, module2) { + var UserError = class extends Error { + constructor(message, data) { + super(message); + this.name = "UserError"; + this.data = data || {}; + } + }; + module2.exports = UserError; + } +}); + +// ../../node_modules/openapi-to-postmanv2/assets/openapi3Schema.json +var require_openapi3Schema = __commonJS({ + "../../node_modules/openapi-to-postmanv2/assets/openapi3Schema.json"(exports2, module2) { + module2.exports = { + id: "https://spec.openapis.org/oas/3.0/schema/2021-09-28", + $schema: "http://json-schema.org/draft-04/schema#", + description: "Validation schema for OpenAPI Specification 3.0.X.", + type: "object", + required: [ + "openapi", + "info", + "paths" + ], + properties: { + openapi: { + type: "string", + pattern: "^3\\.0\\.\\d(-.+)?$" + }, + info: { + $ref: "#/definitions/Info" + }, + externalDocs: { + $ref: "#/definitions/ExternalDocumentation" + }, + servers: { + type: "array", + items: { + $ref: "#/definitions/Server" + } + }, + security: { + type: "array", + items: { + $ref: "#/definitions/SecurityRequirement" + } + }, + tags: { + type: "array", + items: { + $ref: "#/definitions/Tag" + }, + uniqueItems: true + }, + paths: { + $ref: "#/definitions/Paths" + }, + components: { + $ref: "#/definitions/Components" + } + }, + patternProperties: { + "^x-": {} + }, + additionalProperties: true, + definitions: { + Reference: { + type: "object", + required: [ + "$ref" + ], + patternProperties: { + "^\\$ref$": { + type: "string", + format: "uri-reference" + } + } + }, + Info: { + type: "object", + required: [ + "title", + "version" + ], + properties: { + title: { + type: "string" + }, + description: { + type: "string" + }, + termsOfService: { + type: "string", + format: "uri-reference" + }, + contact: { + $ref: "#/definitions/Contact" + }, + license: { + $ref: "#/definitions/License" + }, + version: { + type: "string" + } + }, + patternProperties: { + "^x-": {} + }, + additionalProperties: true + }, + Contact: { + type: "object", + properties: { + name: { + type: "string" + }, + url: { + type: "string", + format: "uri-reference" + }, + email: { + type: "string", + format: "email" + } + }, + patternProperties: { + "^x-": {} + }, + additionalProperties: true + }, + License: { + type: "object", + required: [ + "name" + ], + properties: { + name: { + type: "string" + }, + url: { + type: "string", + format: "uri-reference" + } + }, + patternProperties: { + "^x-": {} + }, + additionalProperties: true + }, + Server: { + type: "object", + required: [ + "url" + ], + properties: { + url: { + type: "string" + }, + description: { + type: "string" + }, + variables: { + type: "object", + additionalProperties: { + $ref: "#/definitions/ServerVariable" + } + } + }, + patternProperties: { + "^x-": {} + }, + additionalProperties: true + }, + ServerVariable: { + type: "object", + required: [ + "default" + ], + properties: { + enum: { + type: "array", + items: { + type: "string" + } + }, + default: { + type: "string" + }, + description: { + type: "string" + } + }, + patternProperties: { + "^x-": {} + }, + additionalProperties: true + }, + Components: { + type: "object", + properties: { + schemas: { + type: "object", + patternProperties: { + "^[a-zA-Z0-9\\.\\-_]+$": { + oneOf: [ + { + $ref: "#/definitions/Schema" + }, + { + $ref: "#/definitions/Reference" + } + ] + } + } + }, + responses: { + type: "object", + patternProperties: { + "^[a-zA-Z0-9\\.\\-_]+$": { + oneOf: [ + { + $ref: "#/definitions/Reference" + }, + { + $ref: "#/definitions/Response" + } + ] + } + } + }, + parameters: { + type: "object", + patternProperties: { + "^[a-zA-Z0-9\\.\\-_]+$": { + oneOf: [ + { + $ref: "#/definitions/Reference" + }, + { + $ref: "#/definitions/Parameter" + } + ] + } + } + }, + examples: { + type: "object", + patternProperties: { + "^[a-zA-Z0-9\\.\\-_]+$": { + oneOf: [ + { + $ref: "#/definitions/Reference" + }, + { + $ref: "#/definitions/Example" + } + ] + } + } + }, + requestBodies: { + type: "object", + patternProperties: { + "^[a-zA-Z0-9\\.\\-_]+$": { + oneOf: [ + { + $ref: "#/definitions/Reference" + }, + { + $ref: "#/definitions/RequestBody" + } + ] + } + } + }, + headers: { + type: "object", + patternProperties: { + "^[a-zA-Z0-9\\.\\-_]+$": { + oneOf: [ + { + $ref: "#/definitions/Reference" + }, + { + $ref: "#/definitions/Header" + } + ] + } + } + }, + securitySchemes: { + type: "object", + patternProperties: { + "^[a-zA-Z0-9\\.\\-_]+$": { + oneOf: [ + { + $ref: "#/definitions/Reference" + }, + { + $ref: "#/definitions/SecurityScheme" + } + ] + } + } + }, + links: { + type: "object", + patternProperties: { + "^[a-zA-Z0-9\\.\\-_]+$": { + oneOf: [ + { + $ref: "#/definitions/Reference" + }, + { + $ref: "#/definitions/Link" + } + ] + } + } + }, + callbacks: { + type: "object", + patternProperties: { + "^[a-zA-Z0-9\\.\\-_]+$": { + oneOf: [ + { + $ref: "#/definitions/Reference" + }, + { + $ref: "#/definitions/Callback" + } + ] + } + } + } + }, + patternProperties: { + "^x-": {} + }, + additionalProperties: true + }, + Schema: { + type: "object", + properties: { + title: { + type: "string" + }, + multipleOf: { + type: "number", + minimum: 0, + exclusiveMinimum: true + }, + maximum: { + type: "number" + }, + exclusiveMaximum: { + type: "boolean", + default: false + }, + minimum: { + type: "number" + }, + exclusiveMinimum: { + type: "boolean", + default: false + }, + maxLength: { + type: "integer", + minimum: 0 + }, + minLength: { + type: "integer", + minimum: 0, + default: 0 + }, + pattern: { + type: "string", + format: "regex" + }, + maxItems: { + type: "integer", + minimum: 0 + }, + minItems: { + type: "integer", + minimum: 0, + default: 0 + }, + uniqueItems: { + type: "boolean", + default: false + }, + maxProperties: { + type: "integer", + minimum: 0 + }, + minProperties: { + type: "integer", + minimum: 0, + default: 0 + }, + required: { + type: "array", + items: { + type: "string" + }, + minItems: 1, + uniqueItems: true + }, + enum: { + type: "array", + items: {}, + minItems: 1, + uniqueItems: false + }, + type: { + type: "string", + enum: [ + "array", + "boolean", + "integer", + "number", + "object", + "string" + ] + }, + not: { + oneOf: [ + { + $ref: "#/definitions/Schema" + }, + { + $ref: "#/definitions/Reference" + } + ] + }, + allOf: { + type: "array", + items: { + oneOf: [ + { + $ref: "#/definitions/Schema" + }, + { + $ref: "#/definitions/Reference" + } + ] + } + }, + oneOf: { + type: "array", + items: { + oneOf: [ + { + $ref: "#/definitions/Schema" + }, + { + $ref: "#/definitions/Reference" + } + ] + } + }, + anyOf: { + type: "array", + items: { + oneOf: [ + { + $ref: "#/definitions/Schema" + }, + { + $ref: "#/definitions/Reference" + } + ] + } + }, + items: { + oneOf: [ + { + $ref: "#/definitions/Schema" + }, + { + $ref: "#/definitions/Reference" + } + ] + }, + properties: { + type: "object", + additionalProperties: { + oneOf: [ + { + $ref: "#/definitions/Schema" + }, + { + $ref: "#/definitions/Reference" + } + ] + } + }, + additionalProperties: { + oneOf: [ + { + $ref: "#/definitions/Schema" + }, + { + $ref: "#/definitions/Reference" + }, + { + type: "boolean" + } + ], + default: true + }, + description: { + type: "string" + }, + format: { + type: "string" + }, + default: {}, + nullable: { + type: "boolean", + default: false + }, + discriminator: { + $ref: "#/definitions/Discriminator" + }, + readOnly: { + type: "boolean", + default: false + }, + writeOnly: { + type: "boolean", + default: false + }, + example: {}, + externalDocs: { + $ref: "#/definitions/ExternalDocumentation" + }, + deprecated: { + type: "boolean", + default: false + }, + xml: { + $ref: "#/definitions/XML" + }, + reference: { + type: "string" + } + }, + patternProperties: { + "^x-": {} + }, + additionalProperties: false + }, + Discriminator: { + type: "object", + required: [ + "propertyName" + ], + properties: { + propertyName: { + type: "string" + }, + mapping: { + type: "object", + additionalProperties: { + type: "string" + } + } + } + }, + XML: { + type: "object", + properties: { + name: { + type: "string" + }, + namespace: { + type: "string", + format: "uri" + }, + prefix: { + type: "string" + }, + attribute: { + type: "boolean", + default: false + }, + wrapped: { + type: "boolean", + default: false + } + }, + patternProperties: { + "^x-": {} + }, + additionalProperties: true + }, + Response: { + type: "object", + required: [ + "description" + ], + properties: { + description: { + type: "string" + }, + headers: { + type: "object", + additionalProperties: { + oneOf: [ + { + $ref: "#/definitions/Header" + }, + { + $ref: "#/definitions/Reference" + } + ] + } + }, + content: { + type: "object", + additionalProperties: { + $ref: "#/definitions/MediaType" + } + }, + links: { + type: "object", + additionalProperties: { + oneOf: [ + { + $ref: "#/definitions/Link" + }, + { + $ref: "#/definitions/Reference" + } + ] + } + } + }, + patternProperties: { + "^x-": {} + }, + additionalProperties: true + }, + MediaType: { + type: "object", + properties: { + schema: { + oneOf: [ + { + $ref: "#/definitions/Schema" + }, + { + $ref: "#/definitions/Reference" + } + ] + }, + example: {}, + examples: { + type: "object", + additionalProperties: { + oneOf: [ + { + $ref: "#/definitions/Example" + }, + { + $ref: "#/definitions/Reference" + } + ] + } + }, + encoding: { + type: "object", + additionalProperties: { + $ref: "#/definitions/Encoding" + } + } + }, + patternProperties: { + "^x-": {} + }, + additionalProperties: true, + allOf: [ + { + $ref: "#/definitions/ExampleXORExamples" + } + ] + }, + Example: { + type: "object", + properties: { + summary: { + type: "string" + }, + description: { + type: "string" + }, + value: {}, + externalValue: { + type: "string", + format: "uri-reference" + } + }, + patternProperties: { + "^x-": {} + }, + additionalProperties: true + }, + Header: { + type: "object", + properties: { + description: { + type: "string" + }, + required: { + type: "boolean", + default: false + }, + deprecated: { + type: "boolean", + default: false + }, + allowEmptyValue: { + type: "boolean", + default: false + }, + style: { + type: "string", + enum: [ + "simple" + ], + default: "simple" + }, + explode: { + type: "boolean" + }, + allowReserved: { + type: "boolean", + default: false + }, + schema: { + oneOf: [ + { + $ref: "#/definitions/Schema" + }, + { + $ref: "#/definitions/Reference" + } + ] + }, + content: { + type: "object", + additionalProperties: { + $ref: "#/definitions/MediaType" + }, + minProperties: 1, + maxProperties: 1 + }, + example: {}, + examples: { + type: "object", + additionalProperties: { + oneOf: [ + { + $ref: "#/definitions/Example" + }, + { + $ref: "#/definitions/Reference" + } + ] + } + } + }, + patternProperties: { + "^x-": {} + }, + additionalProperties: true, + allOf: [ + { + $ref: "#/definitions/ExampleXORExamples" + }, + { + $ref: "#/definitions/SchemaXORContent" + } + ] + }, + Paths: { + type: "object", + patternProperties: { + "^\\/": { + $ref: "#/definitions/PathItem" + }, + "^x-": {} + }, + additionalProperties: true + }, + PathItem: { + type: "object", + properties: { + $ref: { + type: "string" + }, + summary: { + type: "string" + }, + description: { + type: "string" + }, + servers: { + type: "array", + items: { + $ref: "#/definitions/Server" + } + }, + parameters: { + type: "array", + items: { + oneOf: [ + { + $ref: "#/definitions/Parameter" + }, + { + $ref: "#/definitions/Reference" + } + ] + }, + uniqueItems: false + } + }, + patternProperties: { + "^(get|put|post|delete|options|head|patch|trace)$": { + $ref: "#/definitions/Operation" + }, + "^x-": {} + }, + additionalProperties: true + }, + Operation: { + type: "object", + required: [ + "responses" + ], + properties: { + tags: { + type: "array", + items: { + type: "string" + } + }, + summary: { + type: "string" + }, + description: { + type: "string" + }, + externalDocs: { + $ref: "#/definitions/ExternalDocumentation" + }, + operationId: { + type: "string" + }, + parameters: { + type: "array", + items: { + oneOf: [ + { + $ref: "#/definitions/Parameter" + }, + { + $ref: "#/definitions/Reference" + } + ] + }, + uniqueItems: false + }, + requestBody: { + oneOf: [ + { + $ref: "#/definitions/RequestBody" + }, + { + $ref: "#/definitions/Reference" + } + ] + }, + responses: { + $ref: "#/definitions/Responses" + }, + callbacks: { + type: "object", + additionalProperties: { + oneOf: [ + { + $ref: "#/definitions/Callback" + }, + { + $ref: "#/definitions/Reference" + } + ] + } + }, + deprecated: { + type: "boolean", + default: false + }, + security: { + type: "array", + items: { + $ref: "#/definitions/SecurityRequirement" + } + }, + servers: { + type: "array", + items: { + $ref: "#/definitions/Server" + } + } + }, + patternProperties: { + "^x-": {} + }, + additionalProperties: true + }, + Responses: { + type: "object", + properties: { + default: { + oneOf: [ + { + $ref: "#/definitions/Response" + }, + { + $ref: "#/definitions/Reference" + } + ] + } + }, + patternProperties: { + "^[1-5](?:\\d{2}|XX)$": { + oneOf: [ + { + $ref: "#/definitions/Response" + }, + { + $ref: "#/definitions/Reference" + } + ] + }, + "^x-": {} + }, + minProperties: 1, + additionalProperties: true + }, + SecurityRequirement: { + type: "object", + additionalProperties: { + type: "array", + items: { + type: "string" + } + } + }, + Tag: { + type: "object", + required: [ + "name" + ], + properties: { + name: { + type: "string" + }, + description: { + type: "string" + }, + externalDocs: { + $ref: "#/definitions/ExternalDocumentation" + } + }, + patternProperties: { + "^x-": {} + }, + additionalProperties: true + }, + ExternalDocumentation: { + type: "object", + required: [ + "url" + ], + properties: { + description: { + type: "string" + }, + url: { + type: "string", + format: "uri-reference" + } + }, + patternProperties: { + "^x-": {} + }, + additionalProperties: true + }, + ExampleXORExamples: { + description: "Example and examples are mutually exclusive", + not: { + required: [ + "example", + "examples" + ] + } + }, + SchemaXORContent: { + description: "Schema and content are mutually exclusive, at least one is required", + not: { + required: [ + "schema", + "content" + ] + }, + oneOf: [ + { + required: [ + "schema" + ] + }, + { + required: [ + "content" + ], + description: "Some properties are not allowed if content is present", + allOf: [ + { + not: { + required: [ + "style" + ] + } + }, + { + not: { + required: [ + "explode" + ] + } + }, + { + not: { + required: [ + "allowReserved" + ] + } + }, + { + not: { + required: [ + "example" + ] + } + }, + { + not: { + required: [ + "examples" + ] + } + } + ] + } + ] + }, + Parameter: { + type: "object", + properties: { + name: { + type: "string" + }, + in: { + type: "string" + }, + description: { + type: "string" + }, + required: { + type: "boolean", + default: false + }, + deprecated: { + type: "boolean", + default: false + }, + allowEmptyValue: { + type: "boolean", + default: false + }, + style: { + type: "string" + }, + explode: { + type: "boolean" + }, + allowReserved: { + type: "boolean", + default: false + }, + schema: { + oneOf: [ + { + $ref: "#/definitions/Schema" + }, + { + $ref: "#/definitions/Reference" + } + ] + }, + content: { + type: "object", + additionalProperties: { + $ref: "#/definitions/MediaType" + }, + minProperties: 1, + maxProperties: 1 + }, + example: {}, + examples: { + type: "object", + additionalProperties: { + oneOf: [ + { + $ref: "#/definitions/Example" + }, + { + $ref: "#/definitions/Reference" + } + ] + } + } + }, + patternProperties: { + "^x-": {} + }, + additionalProperties: true, + required: [ + "name", + "in" + ], + allOf: [ + { + $ref: "#/definitions/ExampleXORExamples" + }, + { + $ref: "#/definitions/SchemaXORContent" + }, + { + $ref: "#/definitions/ParameterLocation" + } + ] + }, + ParameterLocation: { + description: "Parameter location", + oneOf: [ + { + description: "Parameter in path", + required: [ + "required" + ], + properties: { + in: { + enum: [ + "path" + ] + }, + style: { + enum: [ + "matrix", + "label", + "simple" + ], + default: "simple" + }, + required: { + enum: [ + true + ] + } + } + }, + { + description: "Parameter in query", + properties: { + in: { + enum: [ + "query" + ] + }, + style: { + enum: [ + "form", + "spaceDelimited", + "pipeDelimited", + "deepObject" + ], + default: "form" + } + } + }, + { + description: "Parameter in header", + properties: { + in: { + enum: [ + "header" + ] + }, + style: { + enum: [ + "simple" + ], + default: "simple" + } + } + }, + { + description: "Parameter in cookie", + properties: { + in: { + enum: [ + "cookie" + ] + }, + style: { + enum: [ + "form" + ], + default: "form" + } + } + } + ] + }, + RequestBody: { + type: "object", + required: [ + "content" + ], + properties: { + description: { + type: "string" + }, + content: { + type: "object", + additionalProperties: { + $ref: "#/definitions/MediaType" + } + }, + required: { + type: "boolean", + default: false + } + }, + patternProperties: { + "^x-": {} + }, + additionalProperties: true + }, + SecurityScheme: { + oneOf: [ + { + $ref: "#/definitions/APIKeySecurityScheme" + }, + { + $ref: "#/definitions/HTTPSecurityScheme" + }, + { + $ref: "#/definitions/OAuth2SecurityScheme" + }, + { + $ref: "#/definitions/OpenIdConnectSecurityScheme" + } + ] + }, + APIKeySecurityScheme: { + type: "object", + required: [ + "type", + "name", + "in" + ], + properties: { + type: { + type: "string", + enum: [ + "apiKey" + ] + }, + name: { + type: "string" + }, + in: { + type: "string", + enum: [ + "header", + "query", + "cookie" + ] + }, + description: { + type: "string" + } + }, + patternProperties: { + "^x-": {} + }, + additionalProperties: true + }, + HTTPSecurityScheme: { + type: "object", + required: [ + "scheme", + "type" + ], + properties: { + scheme: { + type: "string" + }, + bearerFormat: { + type: "string" + }, + description: { + type: "string" + }, + type: { + type: "string", + enum: [ + "http" + ] + } + }, + patternProperties: { + "^x-": {} + }, + additionalProperties: true, + oneOf: [ + { + description: "Bearer", + properties: { + scheme: { + type: "string", + pattern: "^[Bb][Ee][Aa][Rr][Ee][Rr]$" + } + } + }, + { + description: "Non Bearer", + not: { + required: [ + "bearerFormat" + ] + }, + properties: { + scheme: { + not: { + type: "string", + pattern: "^[Bb][Ee][Aa][Rr][Ee][Rr]$" + } + } + } + } + ] + }, + OAuth2SecurityScheme: { + type: "object", + required: [ + "type", + "flows" + ], + properties: { + type: { + type: "string", + enum: [ + "oauth2" + ] + }, + flows: { + $ref: "#/definitions/OAuthFlows" + }, + description: { + type: "string" + } + }, + patternProperties: { + "^x-": {} + }, + additionalProperties: true + }, + OpenIdConnectSecurityScheme: { + type: "object", + required: [ + "type", + "openIdConnectUrl" + ], + properties: { + type: { + type: "string", + enum: [ + "openIdConnect" + ] + }, + openIdConnectUrl: { + type: "string", + format: "uri-reference" + }, + description: { + type: "string" + } + }, + patternProperties: { + "^x-": {} + }, + additionalProperties: true + }, + OAuthFlows: { + type: "object", + properties: { + implicit: { + $ref: "#/definitions/ImplicitOAuthFlow" + }, + password: { + $ref: "#/definitions/PasswordOAuthFlow" + }, + clientCredentials: { + $ref: "#/definitions/ClientCredentialsFlow" + }, + authorizationCode: { + $ref: "#/definitions/AuthorizationCodeOAuthFlow" + } + }, + patternProperties: { + "^x-": {} + }, + additionalProperties: true + }, + ImplicitOAuthFlow: { + type: "object", + required: [ + "authorizationUrl", + "scopes" + ], + properties: { + authorizationUrl: { + type: "string", + format: "uri-reference" + }, + refreshUrl: { + type: "string", + format: "uri-reference" + }, + scopes: { + type: "object", + additionalProperties: { + type: "string" + } + } + }, + patternProperties: { + "^x-": {} + }, + additionalProperties: true + }, + PasswordOAuthFlow: { + type: "object", + required: [ + "tokenUrl", + "scopes" + ], + properties: { + tokenUrl: { + type: "string", + format: "uri-reference" + }, + refreshUrl: { + type: "string", + format: "uri-reference" + }, + scopes: { + type: "object", + additionalProperties: { + type: "string" + } + } + }, + patternProperties: { + "^x-": {} + }, + additionalProperties: true + }, + ClientCredentialsFlow: { + type: "object", + required: [ + "tokenUrl", + "scopes" + ], + properties: { + tokenUrl: { + type: "string", + format: "uri-reference" + }, + refreshUrl: { + type: "string", + format: "uri-reference" + }, + scopes: { + type: "object", + additionalProperties: { + type: "string" + } + } + }, + patternProperties: { + "^x-": {} + }, + additionalProperties: true + }, + AuthorizationCodeOAuthFlow: { + type: "object", + required: [ + "authorizationUrl", + "tokenUrl", + "scopes" + ], + properties: { + authorizationUrl: { + type: "string", + format: "uri-reference" + }, + tokenUrl: { + type: "string", + format: "uri-reference" + }, + refreshUrl: { + type: "string", + format: "uri-reference" + }, + scopes: { + type: "object", + additionalProperties: { + type: "string" + } + } + }, + patternProperties: { + "^x-": {} + }, + additionalProperties: true + }, + Link: { + type: "object", + properties: { + operationId: { + type: "string" + }, + operationRef: { + type: "string", + format: "uri-reference" + }, + parameters: { + type: "object", + additionalProperties: {} + }, + requestBody: {}, + description: { + type: "string" + }, + server: { + $ref: "#/definitions/Server" + } + }, + patternProperties: { + "^x-": {} + }, + additionalProperties: true, + not: { + description: "Operation Id and Operation Ref are mutually exclusive", + required: [ + "operationId", + "operationRef" + ] + } + }, + Callback: { + type: "object", + additionalProperties: { + $ref: "#/definitions/PathItem" + }, + patternProperties: { + "^x-": {} + } + }, + Encoding: { + type: "object", + properties: { + contentType: { + type: "string" + }, + headers: { + type: "object", + additionalProperties: { + oneOf: [ + { + $ref: "#/definitions/Header" + }, + { + $ref: "#/definitions/Reference" + } + ] + } + }, + style: { + type: "string", + enum: [ + "form", + "spaceDelimited", + "pipeDelimited", + "deepObject" + ] + }, + explode: { + type: "boolean" + }, + allowReserved: { + type: "boolean", + default: false + } + }, + additionalProperties: true + } + } + }; + } +}); + +// ../../node_modules/openapi-to-postmanv2/assets/swagger2Schema.json +var require_swagger2Schema = __commonJS({ + "../../node_modules/openapi-to-postmanv2/assets/swagger2Schema.json"(exports2, module2) { + module2.exports = { + title: "A JSON Schema for Swagger 2.0 API.", + id: "http://swagger.io/v2/schema.json#", + $schema: "http://json-schema.org/draft-04/schema#", + type: "object", + required: [ + "swagger", + "info", + "paths" + ], + additionalProperties: false, + patternProperties: { + "^x-": { + $ref: "#/definitions/vendorExtension" + } + }, + properties: { + swagger: { + type: "string", + enum: [ + "2.0" + ], + description: "The Swagger version of this document." + }, + info: { + $ref: "#/definitions/info" + }, + host: { + type: "string", + pattern: "^[^{}/ :\\\\]+(?::\\d+)?$", + description: "The host (name or ip) of the API. Example: 'swagger.io'" + }, + basePath: { + type: "string", + pattern: "^/", + description: "The base path to the API. Example: '/api'." + }, + schemes: { + $ref: "#/definitions/schemesList" + }, + consumes: { + description: "A list of MIME types accepted by the API.", + allOf: [ + { + $ref: "#/definitions/mediaTypeList" + } + ] + }, + produces: { + description: "A list of MIME types the API can produce.", + allOf: [ + { + $ref: "#/definitions/mediaTypeList" + } + ] + }, + paths: { + $ref: "#/definitions/paths" + }, + definitions: { + $ref: "#/definitions/definitions" + }, + parameters: { + $ref: "#/definitions/parameterDefinitions" + }, + responses: { + $ref: "#/definitions/responseDefinitions" + }, + security: { + $ref: "#/definitions/security" + }, + securityDefinitions: { + $ref: "#/definitions/securityDefinitions" + }, + tags: { + type: "array", + items: { + $ref: "#/definitions/tag" + }, + uniqueItems: true + }, + externalDocs: { + $ref: "#/definitions/externalDocs" + } + }, + definitions: { + info: { + type: "object", + description: "General information about the API.", + required: [ + "version", + "title" + ], + additionalProperties: false, + patternProperties: { + "^x-": { + $ref: "#/definitions/vendorExtension" + } + }, + properties: { + title: { + type: "string", + description: "A unique and precise title of the API." + }, + version: { + type: "string", + description: "A semantic version number of the API." + }, + description: { + type: "string", + description: "A longer description of the API. Should be different from the title. GitHub Flavored Markdown is allowed." + }, + termsOfService: { + type: "string", + description: "The terms of service for the API." + }, + contact: { + $ref: "#/definitions/contact" + }, + license: { + $ref: "#/definitions/license" + } + } + }, + contact: { + type: "object", + description: "Contact information for the owners of the API.", + additionalProperties: false, + properties: { + name: { + type: "string", + description: "The identifying name of the contact person/organization." + }, + url: { + type: "string", + description: "The URL pointing to the contact information.", + format: "uri" + }, + email: { + type: "string", + description: "The email address of the contact person/organization.", + format: "email" + } + }, + patternProperties: { + "^x-": { + $ref: "#/definitions/vendorExtension" + } + } + }, + license: { + type: "object", + required: [ + "name" + ], + additionalProperties: false, + properties: { + name: { + type: "string", + description: "The name of the license type. It's encouraged to use an OSI compatible license." + }, + url: { + type: "string", + description: "The URL pointing to the license.", + format: "uri" + } + }, + patternProperties: { + "^x-": { + $ref: "#/definitions/vendorExtension" + } + } + }, + paths: { + type: "object", + description: "Relative paths to the individual endpoints. They must be relative to the 'basePath'.", + patternProperties: { + "^x-": { + $ref: "#/definitions/vendorExtension" + }, + "^/": { + $ref: "#/definitions/pathItem" + } + }, + additionalProperties: false + }, + definitions: { + type: "object", + additionalProperties: { + $ref: "#/definitions/schema" + }, + description: "One or more JSON objects describing the schemas being consumed and produced by the API." + }, + parameterDefinitions: { + type: "object", + additionalProperties: { + $ref: "#/definitions/parameter" + }, + description: "One or more JSON representations for parameters" + }, + responseDefinitions: { + type: "object", + additionalProperties: { + $ref: "#/definitions/response" + }, + description: "One or more JSON representations for responses" + }, + externalDocs: { + type: "object", + additionalProperties: false, + description: "information about external documentation", + required: [ + "url" + ], + properties: { + description: { + type: "string" + }, + url: { + type: "string", + format: "uri" + } + }, + patternProperties: { + "^x-": { + $ref: "#/definitions/vendorExtension" + } + } + }, + examples: { + type: "object", + additionalProperties: true + }, + mimeType: { + type: "string", + description: "The MIME type of the HTTP message." + }, + operation: { + type: "object", + required: [ + "responses" + ], + additionalProperties: false, + patternProperties: { + "^x-": { + $ref: "#/definitions/vendorExtension" + } + }, + properties: { + tags: { + type: "array", + items: { + type: "string" + }, + uniqueItems: true + }, + summary: { + type: "string", + description: "A brief summary of the operation." + }, + description: { + type: "string", + description: "A longer description of the operation, GitHub Flavored Markdown is allowed." + }, + externalDocs: { + $ref: "#/definitions/externalDocs" + }, + operationId: { + type: "string", + description: "A unique identifier of the operation." + }, + produces: { + description: "A list of MIME types the API can produce.", + allOf: [ + { + $ref: "#/definitions/mediaTypeList" + } + ] + }, + consumes: { + description: "A list of MIME types the API can consume.", + allOf: [ + { + $ref: "#/definitions/mediaTypeList" + } + ] + }, + parameters: { + $ref: "#/definitions/parametersList" + }, + responses: { + $ref: "#/definitions/responses" + }, + schemes: { + $ref: "#/definitions/schemesList" + }, + deprecated: { + type: "boolean", + default: false + }, + security: { + $ref: "#/definitions/security" + } + } + }, + pathItem: { + type: "object", + additionalProperties: false, + patternProperties: { + "^x-": { + $ref: "#/definitions/vendorExtension" + } + }, + properties: { + $ref: { + type: "string" + }, + get: { + $ref: "#/definitions/operation" + }, + put: { + $ref: "#/definitions/operation" + }, + post: { + $ref: "#/definitions/operation" + }, + delete: { + $ref: "#/definitions/operation" + }, + options: { + $ref: "#/definitions/operation" + }, + head: { + $ref: "#/definitions/operation" + }, + patch: { + $ref: "#/definitions/operation" + }, + parameters: { + $ref: "#/definitions/parametersList" + } + } + }, + responses: { + type: "object", + description: "Response objects names can either be any valid HTTP status code or 'default'.", + minProperties: 1, + additionalProperties: false, + patternProperties: { + "^([0-9]{3})$|^(default)$": { + $ref: "#/definitions/responseValue" + }, + "^x-": { + $ref: "#/definitions/vendorExtension" + } + }, + not: { + type: "object", + additionalProperties: false, + patternProperties: { + "^x-": { + $ref: "#/definitions/vendorExtension" + } + } + } + }, + responseValue: { + oneOf: [ + { + $ref: "#/definitions/response" + }, + { + $ref: "#/definitions/jsonReference" + } + ] + }, + response: { + type: "object", + required: [ + "description" + ], + properties: { + description: { + type: "string" + }, + schema: { + oneOf: [ + { + $ref: "#/definitions/schema" + }, + { + $ref: "#/definitions/fileSchema" + } + ] + }, + headers: { + $ref: "#/definitions/headers" + }, + examples: { + $ref: "#/definitions/examples" + } + }, + additionalProperties: false, + patternProperties: { + "^x-": { + $ref: "#/definitions/vendorExtension" + } + } + }, + headers: { + type: "object", + additionalProperties: { + $ref: "#/definitions/header" + } + }, + header: { + type: "object", + additionalProperties: false, + required: [ + "type" + ], + properties: { + type: { + type: "string", + enum: [ + "string", + "number", + "integer", + "boolean", + "array" + ] + }, + format: { + type: "string" + }, + items: { + $ref: "#/definitions/primitivesItems" + }, + collectionFormat: { + $ref: "#/definitions/collectionFormat" + }, + default: { + $ref: "#/definitions/default" + }, + maximum: { + $ref: "#/definitions/maximum" + }, + exclusiveMaximum: { + $ref: "#/definitions/exclusiveMaximum" + }, + minimum: { + $ref: "#/definitions/minimum" + }, + exclusiveMinimum: { + $ref: "#/definitions/exclusiveMinimum" + }, + maxLength: { + $ref: "#/definitions/maxLength" + }, + minLength: { + $ref: "#/definitions/minLength" + }, + pattern: { + $ref: "#/definitions/pattern" + }, + maxItems: { + $ref: "#/definitions/maxItems" + }, + minItems: { + $ref: "#/definitions/minItems" + }, + uniqueItems: { + $ref: "#/definitions/uniqueItems" + }, + enum: { + $ref: "#/definitions/enum" + }, + multipleOf: { + $ref: "#/definitions/multipleOf" + }, + description: { + type: "string" + } + }, + patternProperties: { + "^x-": { + $ref: "#/definitions/vendorExtension" + } + } + }, + vendorExtension: { + description: "Any property starting with x- is valid.", + additionalProperties: true, + additionalItems: true + }, + bodyParameter: { + type: "object", + required: [ + "name", + "in", + "schema" + ], + patternProperties: { + "^x-": { + $ref: "#/definitions/vendorExtension" + } + }, + properties: { + description: { + type: "string", + description: "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed." + }, + name: { + type: "string", + description: "The name of the parameter." + }, + in: { + type: "string", + description: "Determines the location of the parameter.", + enum: [ + "body" + ] + }, + required: { + type: "boolean", + description: "Determines whether or not this parameter is required or optional.", + default: false + }, + schema: { + $ref: "#/definitions/schema" + } + }, + additionalProperties: false + }, + headerParameterSubSchema: { + additionalProperties: false, + patternProperties: { + "^x-": { + $ref: "#/definitions/vendorExtension" + } + }, + properties: { + required: { + type: "boolean", + description: "Determines whether or not this parameter is required or optional.", + default: false + }, + in: { + type: "string", + description: "Determines the location of the parameter.", + enum: [ + "header" + ] + }, + description: { + type: "string", + description: "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed." + }, + name: { + type: "string", + description: "The name of the parameter." + }, + type: { + type: "string", + enum: [ + "string", + "number", + "boolean", + "integer", + "array" + ] + }, + format: { + type: "string" + }, + items: { + $ref: "#/definitions/primitivesItems" + }, + collectionFormat: { + $ref: "#/definitions/collectionFormat" + }, + default: { + $ref: "#/definitions/default" + }, + maximum: { + $ref: "#/definitions/maximum" + }, + exclusiveMaximum: { + $ref: "#/definitions/exclusiveMaximum" + }, + minimum: { + $ref: "#/definitions/minimum" + }, + exclusiveMinimum: { + $ref: "#/definitions/exclusiveMinimum" + }, + maxLength: { + $ref: "#/definitions/maxLength" + }, + minLength: { + $ref: "#/definitions/minLength" + }, + pattern: { + $ref: "#/definitions/pattern" + }, + maxItems: { + $ref: "#/definitions/maxItems" + }, + minItems: { + $ref: "#/definitions/minItems" + }, + uniqueItems: { + $ref: "#/definitions/uniqueItems" + }, + enum: { + $ref: "#/definitions/enum" + }, + multipleOf: { + $ref: "#/definitions/multipleOf" + } + } + }, + queryParameterSubSchema: { + additionalProperties: false, + patternProperties: { + "^x-": { + $ref: "#/definitions/vendorExtension" + } + }, + properties: { + required: { + type: "boolean", + description: "Determines whether or not this parameter is required or optional.", + default: false + }, + in: { + type: "string", + description: "Determines the location of the parameter.", + enum: [ + "query" + ] + }, + description: { + type: "string", + description: "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed." + }, + name: { + type: "string", + description: "The name of the parameter." + }, + allowEmptyValue: { + type: "boolean", + default: false, + description: "allows sending a parameter by name only or with an empty value." + }, + type: { + type: "string", + enum: [ + "string", + "number", + "boolean", + "integer", + "array" + ] + }, + format: { + type: "string" + }, + items: { + $ref: "#/definitions/primitivesItems" + }, + collectionFormat: { + $ref: "#/definitions/collectionFormatWithMulti" + }, + default: { + $ref: "#/definitions/default" + }, + maximum: { + $ref: "#/definitions/maximum" + }, + exclusiveMaximum: { + $ref: "#/definitions/exclusiveMaximum" + }, + minimum: { + $ref: "#/definitions/minimum" + }, + exclusiveMinimum: { + $ref: "#/definitions/exclusiveMinimum" + }, + maxLength: { + $ref: "#/definitions/maxLength" + }, + minLength: { + $ref: "#/definitions/minLength" + }, + pattern: { + $ref: "#/definitions/pattern" + }, + maxItems: { + $ref: "#/definitions/maxItems" + }, + minItems: { + $ref: "#/definitions/minItems" + }, + uniqueItems: { + $ref: "#/definitions/uniqueItems" + }, + enum: { + $ref: "#/definitions/enum" + }, + multipleOf: { + $ref: "#/definitions/multipleOf" + } + } + }, + formDataParameterSubSchema: { + additionalProperties: false, + patternProperties: { + "^x-": { + $ref: "#/definitions/vendorExtension" + } + }, + properties: { + required: { + type: "boolean", + description: "Determines whether or not this parameter is required or optional.", + default: false + }, + in: { + type: "string", + description: "Determines the location of the parameter.", + enum: [ + "formData" + ] + }, + description: { + type: "string", + description: "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed." + }, + name: { + type: "string", + description: "The name of the parameter." + }, + allowEmptyValue: { + type: "boolean", + default: false, + description: "allows sending a parameter by name only or with an empty value." + }, + type: { + type: "string", + enum: [ + "string", + "number", + "boolean", + "integer", + "array", + "file" + ] + }, + format: { + type: "string" + }, + items: { + $ref: "#/definitions/primitivesItems" + }, + collectionFormat: { + $ref: "#/definitions/collectionFormatWithMulti" + }, + default: { + $ref: "#/definitions/default" + }, + maximum: { + $ref: "#/definitions/maximum" + }, + exclusiveMaximum: { + $ref: "#/definitions/exclusiveMaximum" + }, + minimum: { + $ref: "#/definitions/minimum" + }, + exclusiveMinimum: { + $ref: "#/definitions/exclusiveMinimum" + }, + maxLength: { + $ref: "#/definitions/maxLength" + }, + minLength: { + $ref: "#/definitions/minLength" + }, + pattern: { + $ref: "#/definitions/pattern" + }, + maxItems: { + $ref: "#/definitions/maxItems" + }, + minItems: { + $ref: "#/definitions/minItems" + }, + uniqueItems: { + $ref: "#/definitions/uniqueItems" + }, + enum: { + $ref: "#/definitions/enum" + }, + multipleOf: { + $ref: "#/definitions/multipleOf" + } + } + }, + pathParameterSubSchema: { + additionalProperties: false, + patternProperties: { + "^x-": { + $ref: "#/definitions/vendorExtension" + } + }, + required: [ + "required" + ], + properties: { + required: { + type: "boolean", + enum: [ + true + ], + description: "Determines whether or not this parameter is required or optional." + }, + in: { + type: "string", + description: "Determines the location of the parameter.", + enum: [ + "path" + ] + }, + description: { + type: "string", + description: "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed." + }, + name: { + type: "string", + description: "The name of the parameter." + }, + type: { + type: "string", + enum: [ + "string", + "number", + "boolean", + "integer", + "array" + ] + }, + format: { + type: "string" + }, + items: { + $ref: "#/definitions/primitivesItems" + }, + collectionFormat: { + $ref: "#/definitions/collectionFormat" + }, + default: { + $ref: "#/definitions/default" + }, + maximum: { + $ref: "#/definitions/maximum" + }, + exclusiveMaximum: { + $ref: "#/definitions/exclusiveMaximum" + }, + minimum: { + $ref: "#/definitions/minimum" + }, + exclusiveMinimum: { + $ref: "#/definitions/exclusiveMinimum" + }, + maxLength: { + $ref: "#/definitions/maxLength" + }, + minLength: { + $ref: "#/definitions/minLength" + }, + pattern: { + $ref: "#/definitions/pattern" + }, + maxItems: { + $ref: "#/definitions/maxItems" + }, + minItems: { + $ref: "#/definitions/minItems" + }, + uniqueItems: { + $ref: "#/definitions/uniqueItems" + }, + enum: { + $ref: "#/definitions/enum" + }, + multipleOf: { + $ref: "#/definitions/multipleOf" + } + } + }, + nonBodyParameter: { + type: "object", + required: [ + "name", + "in", + "type" + ], + oneOf: [ + { + $ref: "#/definitions/headerParameterSubSchema" + }, + { + $ref: "#/definitions/formDataParameterSubSchema" + }, + { + $ref: "#/definitions/queryParameterSubSchema" + }, + { + $ref: "#/definitions/pathParameterSubSchema" + } + ] + }, + parameter: { + oneOf: [ + { + $ref: "#/definitions/bodyParameter" + }, + { + $ref: "#/definitions/nonBodyParameter" + } + ] + }, + schema: { + type: "object", + description: "A deterministic version of a JSON Schema object.", + patternProperties: { + "^x-": { + $ref: "#/definitions/vendorExtension" + } + }, + properties: { + $ref: { + type: "string" + }, + format: { + type: "string" + }, + title: { + $ref: "http://json-schema.org/draft-04/schema#/properties/title" + }, + description: { + $ref: "http://json-schema.org/draft-04/schema#/properties/description" + }, + default: { + $ref: "http://json-schema.org/draft-04/schema#/properties/default" + }, + multipleOf: { + $ref: "http://json-schema.org/draft-04/schema#/properties/multipleOf" + }, + maximum: { + $ref: "http://json-schema.org/draft-04/schema#/properties/maximum" + }, + exclusiveMaximum: { + $ref: "http://json-schema.org/draft-04/schema#/properties/exclusiveMaximum" + }, + minimum: { + $ref: "http://json-schema.org/draft-04/schema#/properties/minimum" + }, + exclusiveMinimum: { + $ref: "http://json-schema.org/draft-04/schema#/properties/exclusiveMinimum" + }, + maxLength: { + $ref: "http://json-schema.org/draft-04/schema#/definitions/positiveInteger" + }, + minLength: { + $ref: "http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0" + }, + pattern: { + $ref: "http://json-schema.org/draft-04/schema#/properties/pattern" + }, + maxItems: { + $ref: "http://json-schema.org/draft-04/schema#/definitions/positiveInteger" + }, + minItems: { + $ref: "http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0" + }, + uniqueItems: { + $ref: "http://json-schema.org/draft-04/schema#/properties/uniqueItems" + }, + maxProperties: { + $ref: "http://json-schema.org/draft-04/schema#/definitions/positiveInteger" + }, + minProperties: { + $ref: "http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0" + }, + required: { + $ref: "http://json-schema.org/draft-04/schema#/definitions/stringArray" + }, + enum: { + $ref: "http://json-schema.org/draft-04/schema#/properties/enum" + }, + additionalProperties: { + anyOf: [ + { + $ref: "#/definitions/schema" + }, + { + type: "boolean" + } + ], + default: {} + }, + type: { + $ref: "http://json-schema.org/draft-04/schema#/properties/type" + }, + items: { + anyOf: [ + { + $ref: "#/definitions/schema" + }, + { + type: "array", + minItems: 1, + items: { + $ref: "#/definitions/schema" + } + } + ], + default: {} + }, + allOf: { + type: "array", + minItems: 1, + items: { + $ref: "#/definitions/schema" + } + }, + properties: { + type: "object", + additionalProperties: { + $ref: "#/definitions/schema" + }, + default: {} + }, + discriminator: { + type: "string" + }, + readOnly: { + type: "boolean", + default: false + }, + xml: { + $ref: "#/definitions/xml" + }, + externalDocs: { + $ref: "#/definitions/externalDocs" + }, + example: {} + }, + additionalProperties: false + }, + fileSchema: { + type: "object", + description: "A deterministic version of a JSON Schema object.", + patternProperties: { + "^x-": { + $ref: "#/definitions/vendorExtension" + } + }, + required: [ + "type" + ], + properties: { + format: { + type: "string" + }, + title: { + $ref: "http://json-schema.org/draft-04/schema#/properties/title" + }, + description: { + $ref: "http://json-schema.org/draft-04/schema#/properties/description" + }, + default: { + $ref: "http://json-schema.org/draft-04/schema#/properties/default" + }, + required: { + $ref: "http://json-schema.org/draft-04/schema#/definitions/stringArray" + }, + type: { + type: "string", + enum: [ + "file" + ] + }, + readOnly: { + type: "boolean", + default: false + }, + externalDocs: { + $ref: "#/definitions/externalDocs" + }, + example: {} + }, + additionalProperties: false + }, + primitivesItems: { + type: "object", + additionalProperties: false, + properties: { + type: { + type: "string", + enum: [ + "string", + "number", + "integer", + "boolean", + "array" + ] + }, + format: { + type: "string" + }, + items: { + $ref: "#/definitions/primitivesItems" + }, + collectionFormat: { + $ref: "#/definitions/collectionFormat" + }, + default: { + $ref: "#/definitions/default" + }, + maximum: { + $ref: "#/definitions/maximum" + }, + exclusiveMaximum: { + $ref: "#/definitions/exclusiveMaximum" + }, + minimum: { + $ref: "#/definitions/minimum" + }, + exclusiveMinimum: { + $ref: "#/definitions/exclusiveMinimum" + }, + maxLength: { + $ref: "#/definitions/maxLength" + }, + minLength: { + $ref: "#/definitions/minLength" + }, + pattern: { + $ref: "#/definitions/pattern" + }, + maxItems: { + $ref: "#/definitions/maxItems" + }, + minItems: { + $ref: "#/definitions/minItems" + }, + uniqueItems: { + $ref: "#/definitions/uniqueItems" + }, + enum: { + $ref: "#/definitions/enum" + }, + multipleOf: { + $ref: "#/definitions/multipleOf" + } + }, + patternProperties: { + "^x-": { + $ref: "#/definitions/vendorExtension" + } + } + }, + security: { + type: "array", + items: { + $ref: "#/definitions/securityRequirement" + }, + uniqueItems: true + }, + securityRequirement: { + type: "object", + additionalProperties: { + type: "array", + items: { + type: "string" + }, + uniqueItems: true + } + }, + xml: { + type: "object", + additionalProperties: false, + properties: { + name: { + type: "string" + }, + namespace: { + type: "string" + }, + prefix: { + type: "string" + }, + attribute: { + type: "boolean", + default: false + }, + wrapped: { + type: "boolean", + default: false + } + }, + patternProperties: { + "^x-": { + $ref: "#/definitions/vendorExtension" + } + } + }, + tag: { + type: "object", + additionalProperties: false, + required: [ + "name" + ], + properties: { + name: { + type: "string" + }, + description: { + type: "string" + }, + externalDocs: { + $ref: "#/definitions/externalDocs" + } + }, + patternProperties: { + "^x-": { + $ref: "#/definitions/vendorExtension" + } + } + }, + securityDefinitions: { + type: "object", + additionalProperties: { + oneOf: [ + { + $ref: "#/definitions/basicAuthenticationSecurity" + }, + { + $ref: "#/definitions/apiKeySecurity" + }, + { + $ref: "#/definitions/oauth2ImplicitSecurity" + }, + { + $ref: "#/definitions/oauth2PasswordSecurity" + }, + { + $ref: "#/definitions/oauth2ApplicationSecurity" + }, + { + $ref: "#/definitions/oauth2AccessCodeSecurity" + } + ] + } + }, + basicAuthenticationSecurity: { + type: "object", + additionalProperties: false, + required: [ + "type" + ], + properties: { + type: { + type: "string", + enum: [ + "basic" + ] + }, + description: { + type: "string" + } + }, + patternProperties: { + "^x-": { + $ref: "#/definitions/vendorExtension" + } + } + }, + apiKeySecurity: { + type: "object", + additionalProperties: false, + required: [ + "type", + "name", + "in" + ], + properties: { + type: { + type: "string", + enum: [ + "apiKey" + ] + }, + name: { + type: "string" + }, + in: { + type: "string", + enum: [ + "header", + "query" + ] + }, + description: { + type: "string" + } + }, + patternProperties: { + "^x-": { + $ref: "#/definitions/vendorExtension" + } + } + }, + oauth2ImplicitSecurity: { + type: "object", + additionalProperties: false, + required: [ + "type", + "flow", + "authorizationUrl" + ], + properties: { + type: { + type: "string", + enum: [ + "oauth2" + ] + }, + flow: { + type: "string", + enum: [ + "implicit" + ] + }, + scopes: { + $ref: "#/definitions/oauth2Scopes" + }, + authorizationUrl: { + type: "string", + format: "uri" + }, + description: { + type: "string" + } + }, + patternProperties: { + "^x-": { + $ref: "#/definitions/vendorExtension" + } + } + }, + oauth2PasswordSecurity: { + type: "object", + additionalProperties: false, + required: [ + "type", + "flow", + "tokenUrl" + ], + properties: { + type: { + type: "string", + enum: [ + "oauth2" + ] + }, + flow: { + type: "string", + enum: [ + "password" + ] + }, + scopes: { + $ref: "#/definitions/oauth2Scopes" + }, + tokenUrl: { + type: "string", + format: "uri" + }, + description: { + type: "string" + } + }, + patternProperties: { + "^x-": { + $ref: "#/definitions/vendorExtension" + } + } + }, + oauth2ApplicationSecurity: { + type: "object", + additionalProperties: false, + required: [ + "type", + "flow", + "tokenUrl" + ], + properties: { + type: { + type: "string", + enum: [ + "oauth2" + ] + }, + flow: { + type: "string", + enum: [ + "application" + ] + }, + scopes: { + $ref: "#/definitions/oauth2Scopes" + }, + tokenUrl: { + type: "string", + format: "uri" + }, + description: { + type: "string" + } + }, + patternProperties: { + "^x-": { + $ref: "#/definitions/vendorExtension" + } + } + }, + oauth2AccessCodeSecurity: { + type: "object", + additionalProperties: false, + required: [ + "type", + "flow", + "authorizationUrl", + "tokenUrl" + ], + properties: { + type: { + type: "string", + enum: [ + "oauth2" + ] + }, + flow: { + type: "string", + enum: [ + "accessCode" + ] + }, + scopes: { + $ref: "#/definitions/oauth2Scopes" + }, + authorizationUrl: { + type: "string", + format: "uri" + }, + tokenUrl: { + type: "string", + format: "uri" + }, + description: { + type: "string" + } + }, + patternProperties: { + "^x-": { + $ref: "#/definitions/vendorExtension" + } + } + }, + oauth2Scopes: { + type: "object", + additionalProperties: { + type: "string" + } + }, + mediaTypeList: { + type: "array", + items: { + $ref: "#/definitions/mimeType" + }, + uniqueItems: true + }, + parametersList: { + type: "array", + description: "The parameters needed to send a valid API call.", + additionalItems: false, + items: { + oneOf: [ + { + $ref: "#/definitions/parameter" + }, + { + $ref: "#/definitions/jsonReference" + } + ] + }, + uniqueItems: true + }, + schemesList: { + type: "array", + description: "The transfer protocol of the API.", + items: { + type: "string", + enum: [ + "http", + "https", + "ws", + "wss" + ] + }, + uniqueItems: true + }, + collectionFormat: { + type: "string", + enum: [ + "csv", + "ssv", + "tsv", + "pipes" + ], + default: "csv" + }, + collectionFormatWithMulti: { + type: "string", + enum: [ + "csv", + "ssv", + "tsv", + "pipes", + "multi" + ], + default: "csv" + }, + title: { + $ref: "http://json-schema.org/draft-04/schema#/properties/title" + }, + description: { + $ref: "http://json-schema.org/draft-04/schema#/properties/description" + }, + default: { + $ref: "http://json-schema.org/draft-04/schema#/properties/default" + }, + multipleOf: { + $ref: "http://json-schema.org/draft-04/schema#/properties/multipleOf" + }, + maximum: { + $ref: "http://json-schema.org/draft-04/schema#/properties/maximum" + }, + exclusiveMaximum: { + $ref: "http://json-schema.org/draft-04/schema#/properties/exclusiveMaximum" + }, + minimum: { + $ref: "http://json-schema.org/draft-04/schema#/properties/minimum" + }, + exclusiveMinimum: { + $ref: "http://json-schema.org/draft-04/schema#/properties/exclusiveMinimum" + }, + maxLength: { + $ref: "http://json-schema.org/draft-04/schema#/definitions/positiveInteger" + }, + minLength: { + $ref: "http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0" + }, + pattern: { + $ref: "http://json-schema.org/draft-04/schema#/properties/pattern" + }, + maxItems: { + $ref: "http://json-schema.org/draft-04/schema#/definitions/positiveInteger" + }, + minItems: { + $ref: "http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0" + }, + uniqueItems: { + $ref: "http://json-schema.org/draft-04/schema#/properties/uniqueItems" + }, + enum: { + $ref: "http://json-schema.org/draft-04/schema#/properties/enum" + }, + jsonReference: { + type: "object", + required: [ + "$ref" + ], + additionalProperties: false, + properties: { + $ref: { + type: "string" + } + } + } + } + }; + } +}); + +// ../../node_modules/openapi-to-postmanv2/lib/common/generateValidationError.js +var require_generateValidationError = __commonJS({ + "../../node_modules/openapi-to-postmanv2/lib/common/generateValidationError.js"(exports2, module2) { + var Ajv = require_dist6(); + var UserError = require_UserError(); + var addFormats = require_dist5(); + var openapi3Schema = require_openapi3Schema(); + var swagger2Schema = require_swagger2Schema(); + var openapi3Utils = require_schemaUtils30X(); + var swagger2Utils = require_schemaUtilsSwagger(); + var { jsonPointerDecodeAndReplace } = require_jsonPointer(); + function constructErrorMessage(ajvError) { + let message = "Provided API Specification is invalid. "; + message += ajvError.message; + if (ajvError.params) { + message += " " + JSON.stringify(ajvError.params); + } + if (typeof ajvError.instancePath === "string") { + message += ` at "${jsonPointerDecodeAndReplace(ajvError.instancePath)}"`; + } + return message; + } + function generateError(definition, definitionVersion, error) { + let ajv = new Ajv({ + schemaId: "auto", + strict: false + }), validate2, valid = true; + console.error(error); + addFormats(ajv); + if (definitionVersion === openapi3Utils.version) { + validate2 = ajv.compile(openapi3Schema); + } else if (definitionVersion === swagger2Utils.version) { + validate2 = ajv.compile(swagger2Schema); + } + validate2 && (valid = validate2(definition)); + if (valid) { + if (error instanceof Error) { + return error; + } + const errorMessage = typeof error === "string" ? error : _.get(error, "message", "Failed to generate collection."); + return new Error(errorMessage); + } else { + return new UserError(constructErrorMessage(validate2.errors[0]), error); + } + } + module2.exports = { + generateError + }; + } +}); + +// ../../node_modules/openapi-to-postmanv2/lib/schemapack.js +var require_schemapack = __commonJS({ + "../../node_modules/openapi-to-postmanv2/lib/schemapack.js"(exports2, module2) { + "use strict"; + var { getConcreteSchemaUtils } = require_versionUtils(); + var { convertToOAS30IfSwagger } = require_swaggerToOpenapi(); + var BROWSER = "browser"; + var Ajv = require_ajv(); + var addFormats = require_dist5(); + var async = require_async(); + var { Collection } = require_collection(); + var { Url } = require_url(); + var OasResolverOptions = { + resolve: true, + // Resolve external references + jsonSchema: true + // Treat $ref like JSON Schema and convert to OpenAPI Schema Objects + }; + var parse2 = require_parse(); + var getOptions = require_options().getOptions; + var transactionSchema = require_validationRequestListSchema(); + var utils = require_utils2(); + var _2 = require_lodash(); + var fs = require("fs"); + var OpenApiErr = require_error(); + var schemaUtils = require_schemaUtils(); + var v2 = require_libV2(); + var { getServersPathVars } = require_schemaUtilsCommon(); + var { generateError } = require_generateValidationError(); + var MODULE_VERSION = { + V1: "v1", + V2: "v2" + }; + var path = require("path"); + var concreteUtils; + var pathBrowserify = require_path_browserify(); + var SchemaPack = class { + constructor(input, options = {}, moduleVersion = MODULE_VERSION.V1) { + if (input.type === schemaUtils.MULTI_FILE_API_TYPE_ALLOWED_VALUE && input.data && input.data[0] && input.data[0].path) { + input = schemaUtils.mapDetectRootFilesInputToFolderInput(input); + } + this.input = input; + this.validated = false; + this.openapi = null; + this.validationResult = null; + this.definedOptions = getOptions({ + moduleVersion + }); + this.computedOptions = null; + this.schemaFakerCache = {}; + this.schemaValidationCache = /* @__PURE__ */ new Map(); + this.analytics = { + actualStack: 0, + numberOfRequests: 0 + }; + this.computedOptions = utils.mergeOptions( + // predefined options + _2.keyBy(this.definedOptions, "id"), + // options provided by the user + options + ); + this.computedOptions.schemaFaker = true; + let indentCharacter = this.computedOptions.indentCharacter; + this.computedOptions.indentCharacter = indentCharacter === "tab" ? " " : " "; + try { + this.hasDefinedVersion = true; + concreteUtils = getConcreteSchemaUtils(input); + } catch (error) { + this.hasDefinedVersion = false; + } + this.validate(); + } + convertV2(callback) { + if (!this.validated) { + return callback(new OpenApiErr("The schema must be validated before attempting conversion")); + } + try { + return convertToOAS30IfSwagger(getConcreteSchemaUtils(this.input), this.openapi, (err, convertedOpenAPI) => { + if (err) { + const error = generateError(this.openapi, _2.get(this.validationResult, "specificationVersion"), err); + return callback(error); + } + this.openapi = convertedOpenAPI; + this.concreteUtils = concreteUtils; + this.specComponents = concreteUtils.getRequiredData(this.openapi); + v2.convertV2(this, callback); + }); + } catch (err) { + const error = generateError(this.openapi, _2.get(this.validationResult, "specificationVersion"), err); + return callback(error); + } + } + // need to store the schema here + validate() { + let input = this.input, json, specParseResult, isFolder = this.input.type === "folder"; + this.computedOptions = Object.assign({ isFolder }, this.computedOptions); + if (!input) { + return { + result: false, + reason: "Input not provided" + }; + } + if (input.type === "string" || input.type === "json") { + json = input.data; + } else if (input.type === "file") { + try { + json = fs.readFileSync(input.data, "utf8"); + } catch (e) { + this.validationResult = { + result: false, + reason: e.message + }; + return this.validationResult; + } + } else if (input.type === "folder") { + this.validationResult = { + result: false, + reason: "Input data not validated, please call mergeAndValidate() for input.type 'folder'" + }; + return this.validationResult; + } else { + this.validationResult = { + result: false, + reason: `Invalid input type (${input.type}). type must be one of file/json/string.` + }; + return this.validationResult; + } + if (_2.isEmpty(json)) { + this.validationResult = { + result: false, + reason: "Empty input schema provided." + }; + return this.validationResult; + } + specParseResult = concreteUtils.parseSpec(json, this.computedOptions); + if (!specParseResult.result) { + this.validationResult = { + result: false, + reason: specParseResult.reason + }; + return this.validationResult; + } + this.openapi = specParseResult.openapi; + this.validated = true; + this.validationResult = { + result: true, + specificationVersion: concreteUtils.version + }; + return this.validationResult; + } + getMetaData(cb) { + let input = this.input; + if (input.type !== "folder" && !this.validated) { + return cb(null, this.validationResult); + } else if (this.validated) { + let name = utils.getCollectionName(_2.get(this.openapi, "info.title")); + return cb(null, { + result: true, + name, + output: [{ + type: "collection", + name + }] + }); + } else if (input.type === "folder") { + this.mergeAndValidate((err, validationResult) => { + if (err) { + return cb(err); + } + if (!validationResult.result) { + return cb(null, validationResult); + } + let name = utils.getCollectionName(_2.get(this.openapi, "info.title")); + return cb(null, { + result: true, + name, + output: [{ + type: "collection", + name + }] + }); + }); + } + } + mergeAndValidate(cb) { + let input = this.input, validationResult, files = {}, rootFiles; + if (input.origin === BROWSER) { + path = pathBrowserify; + OasResolverOptions.browser = true; + } + if ("content" in input.data[0]) { + input.data.forEach((file) => { + files[path.resolve(file.fileName)] = file.content ? file.content : ""; + }); + } + try { + rootFiles = parse2.getRootFiles(input, concreteUtils.inputValidation, this.computedOptions, files); + } catch (e) { + return cb(null, { + result: false, + reason: e + }); + } + if (rootFiles.length > 1) { + this.validationResult = { + result: false, + reason: "More than one root file not supported." + }; + return cb(null, this.validationResult); + } + if (rootFiles.length) { + parse2.mergeFiles(rootFiles[0], OasResolverOptions, files).then((spec) => { + this.input = { + type: "json", + data: spec + }; + validationResult = this.validate(); + return cb(null, validationResult); + }).catch((err) => { + this.validationResult = { + result: false, + reason: "Error while merging files.", + error: err + }; + return cb(null, this.validationResult); + }); + } else { + return cb(null, { + result: false, + reason: "No root files present / input is not an OpenAPI spec." + }); + } + } + // convert method, this is called when you want to convert a schema that you've already loaded + // in the constructor + convert(callback) { + let openapi, options = this.computedOptions, analysis, generatedStore = {}, collectionJSON, specComponentsAndUtils, authHelper, schemaCache = { + schemaFakerCache: this.schemaFakerCache, + schemaValidationCache: this.schemaValidationCache, + analytics: this.analytics + }; + if (!this.validated) { + return callback(new OpenApiErr("The schema must be validated before attempting conversion")); + } + try { + convertToOAS30IfSwagger(concreteUtils, this.openapi, (err, newOpenapi) => { + if (err) { + const error = generateError(this.openapi, _2.get(this.validationResult, "specificationVersion"), err); + return callback(error); + } + this.openapi = newOpenapi; + specComponentsAndUtils = { concreteUtils }; + Object.assign(specComponentsAndUtils, concreteUtils.getRequiredData(this.openapi)); + openapi = this.openapi; + openapi.servers = _2.isEmpty(openapi.servers) ? [{ url: "/" }] : openapi.servers; + openapi.securityDefs = _2.get(openapi, "components.securitySchemes", {}); + openapi.baseUrl = _2.get(openapi, "servers.0.url", "{{baseURL}}"); + openapi.baseUrlVariables = _2.get(openapi, "servers.0.variables"); + openapi.baseUrl = schemaUtils.fixPathVariablesInUrl(openapi.baseUrl); + generatedStore.collection = new Collection({ + info: { + name: utils.getCollectionName(_2.get(openapi, "info.title")) + } + }); + if (openapi.security) { + authHelper = schemaUtils.getAuthHelper(openapi, openapi.security); + if (authHelper) { + generatedStore.collection.auth = authHelper; + } + } + schemaUtils.convertToPmCollectionVariables( + openapi.baseUrlVariables, + "baseUrl", + openapi.baseUrl + ).forEach((element) => { + generatedStore.collection.variables.add(element); + }); + generatedStore.collection.describe(schemaUtils.getCollectionDescription(openapi)); + if (options.optimizeConversion) { + analysis = schemaUtils.analyzeSpec(openapi); + options = schemaUtils.determineOptions(analysis, options); + } + Object.assign(this.analytics, analysis); + Object.assign(this.analytics, { + assignedStack: options.stackLimit, + complexityScore: options.complexityScore + }); + try { + if (options.folderStrategy === "tags") { + schemaUtils.addCollectionItemsUsingTags( + openapi, + generatedStore, + specComponentsAndUtils, + options, + schemaCache + ); + } else { + schemaUtils.addCollectionItemsUsingPaths( + openapi, + generatedStore, + specComponentsAndUtils, + options, + schemaCache + ); + } + if (options.includeWebhooks) { + schemaUtils.addCollectionItemsFromWebhooks( + openapi, + generatedStore, + specComponentsAndUtils, + options, + schemaCache + ); + } + } catch (e) { + const error = generateError(this.openapi, _2.get(this.validationResult, "specificationVersion"), e); + return callback(error); + } + collectionJSON = generatedStore.collection.toJSON(); + delete collectionJSON.info.version; + return callback(null, { + result: true, + output: [{ + type: "collection", + data: collectionJSON + }], + analytics: this.analytics + }); + }); + } catch (err) { + const error = generateError(this.openapi, _2.get(this.validationResult, "specificationVersion"), err); + return callback(error); + } + } + /** + * + * @description Takes in a transaction object (meant to represent a Postman history object) + * + * @param {*} transactions RequestList + * @param {*} callback return + * @returns {boolean} validation + */ + validateTransaction(transactions, callback) { + let schema2 = this.openapi, componentsAndPaths, analysis, options = this.computedOptions, schemaCache = { + schemaFakerCache: this.schemaFakerCache + }, matchedEndpoints = [], jsonSchemaDialect = schema2.jsonSchemaDialect; + if (options.optimizeConversion) { + analysis = schemaUtils.analyzeSpec(schema2); + options = schemaUtils.determineOptions(analysis, options); + } + if (!this.validated) { + return callback(new OpenApiErr("The schema must be validated before attempting conversion")); + } + componentsAndPaths = { concreteUtils }; + Object.assign(componentsAndPaths, concreteUtils.getRequiredData(this.openapi)); + schema2.servers = _2.isEmpty(schema2.servers) ? [{ url: "/" }] : schema2.servers; + schema2.securityDefs = _2.get(schema2, "components.securitySchemes", {}); + schema2.baseUrl = _2.get(schema2, "servers.0.url", "{{baseURL}}"); + schema2.baseUrlVariables = _2.get(schema2, "servers.0.variables"); + schema2.baseUrl = schemaUtils.fixPathVariablesInUrl(schema2.baseUrl); + try { + let ajv = new Ajv({ + allErrors: true, + strict: false + }), validate2, res; + addFormats(ajv); + validate2 = ajv.compile(transactionSchema); + res = validate2(transactions); + if (!res) { + return callback(new OpenApiErr("Invalid syntax provided for requestList", validate2.errors)); + } + } catch (e) { + return callback(new OpenApiErr("Invalid syntax provided for requestList", e)); + } + return setTimeout(() => { + async.map(transactions, (transaction, requestCallback) => { + if (!transaction.id || !transaction.request) { + return requestCallback(new Error("All transactions must have `id` and `request` properties.")); + } + let requestUrl = transaction.request.url, matchedPaths; + if (typeof requestUrl === "object") { + _2.forEach(requestUrl.variable, (pathVar) => { + if (_2.isNil(pathVar.value) || typeof pathVar.value === "string" && _2.trim(pathVar.value).length === 0) { + pathVar.value = ":" + pathVar.key; + } + }); + requestUrl = new Url(requestUrl).toString(); + } + matchedPaths = schemaUtils.findMatchingRequestFromSchema( + transaction.request.method, + requestUrl, + schema2, + options + ); + if (!matchedPaths.length) { + return requestCallback(null, { + requestId: transaction.id, + endpoints: [] + }); + } + return setTimeout(() => { + return async.map(matchedPaths, (matchedPath, pathsCallback) => { + const transactionPathVariables = _2.get(transaction, "request.url.variable", []), localServers = matchedPath.path.hasOwnProperty("servers") ? matchedPath.path.servers : [], serversPathVars = [...getServersPathVars(localServers), ...getServersPathVars(schema2.servers)], isNotAServerPathVar = (pathVarName) => { + return !serversPathVars.includes(pathVarName); + }; + matchedPath.unmatchedVariablesFromTransaction = []; + _2.forEach(matchedPath.pathVariables, (pathVar) => { + const mappedPathVar = _2.find(transactionPathVariables, (transactionPathVar) => { + let matched = transactionPathVar.key === pathVar.key; + if (!matched && isNotAServerPathVar(transactionPathVar.key) && !matchedPath.unmatchedVariablesFromTransaction.includes(transactionPathVar)) { + matchedPath.unmatchedVariablesFromTransaction.push(transactionPathVar); + } + return matched; + }); + pathVar.value = _2.get(mappedPathVar, "value", pathVar.value); + pathVar._varMatched = !_2.isEmpty(mappedPathVar); + }); + _2.forEach(_2.get(matchedPath, "path.parameters"), (param) => { + if (param.hasOwnProperty("$ref")) { + _2.assign(param, schemaUtils.getRefObject(param.$ref, componentsAndPaths, options)); + _2.unset(param, "$ref"); + } + }); + matchedEndpoints.push(matchedPath.jsonPath); + async.parallel({ + metadata: function(cb) { + schemaUtils.checkMetadata(transaction, "$", matchedPath.path, matchedPath.name, options, cb); + }, + path: function(cb) { + schemaUtils.checkPathVariables( + matchedPath, + "$.request.url.variable", + matchedPath.path, + componentsAndPaths, + options, + schemaCache, + jsonSchemaDialect, + cb + ); + }, + queryparams: function(cb) { + schemaUtils.checkQueryParams( + requestUrl, + "$.request.url.query", + matchedPath.path, + componentsAndPaths, + options, + schemaCache, + jsonSchemaDialect, + cb + ); + }, + headers: function(cb) { + schemaUtils.checkRequestHeaders( + transaction.request.header, + "$.request.header", + matchedPath.jsonPath, + matchedPath.path, + componentsAndPaths, + options, + schemaCache, + jsonSchemaDialect, + cb + ); + }, + requestBody: function(cb) { + schemaUtils.checkRequestBody( + transaction.request.body, + "$.request.body", + matchedPath.jsonPath, + matchedPath.path, + componentsAndPaths, + options, + schemaCache, + jsonSchemaDialect, + cb + ); + }, + responses: function(cb) { + schemaUtils.checkResponses( + transaction.response, + "$.responses", + matchedPath.jsonPath, + matchedPath.path, + componentsAndPaths, + options, + schemaCache, + jsonSchemaDialect, + cb + ); + } + }, (err, result) => { + let allMismatches = _2.concat( + result.metadata, + result.queryparams, + result.headers, + result.path, + result.requestBody + ), responseMismatchesPresent = false, retVal; + _2.each(result.responses, (response) => { + if (_2.get(response, "mismatches", []).length > 0) { + responseMismatchesPresent = true; + return false; + } + }); + retVal = { + matched: allMismatches.length === 0 && !responseMismatchesPresent, + endpointMatchScore: matchedPath.score, + endpoint: matchedPath.name, + mismatches: allMismatches, + responses: result.responses + }; + pathsCallback(null, retVal); + }); + }, (err, result) => { + let highestScore = -Infinity, bestResults; + result.forEach((endpoint) => { + if (endpoint.endpointMatchScore > highestScore) { + highestScore = endpoint.endpointMatchScore; + } + }); + bestResults = _2.filter(result, (ep) => { + return ep.endpointMatchScore === highestScore; + }); + requestCallback(err, { + requestId: transaction.id, + endpoints: bestResults + }); + }); + }, 0); + }, (err, result) => { + var retVal; + if (err) { + return callback(err); + } + _2.each(result, (reqRes) => { + let thisMismatch = false; + _2.each(reqRes.endpoints, (ep) => { + if (!ep.matched) { + return false; + } + }); + if (thisMismatch) { + return false; + } + }); + retVal = { + requests: _2.keyBy(result, "requestId"), + missingEndpoints: schemaUtils.getMissingSchemaEndpoints( + schema2, + matchedEndpoints, + componentsAndPaths, + options, + schemaCache + ) + }; + callback(null, retVal); + }); + }, 0); + } + /** + * + * @description Takes in a transaction object (meant to represent a Postman history object) + * + * @param {*} transactions RequestList + * @param {*} callback return + * @returns {boolean} validation + */ + validateTransactionV2(transactions, callback) { + if (!this.validated) { + return callback(new OpenApiErr("The schema must be validated before attempting conversion")); + } + this.concreteUtils = concreteUtils; + this.specComponents = concreteUtils.getRequiredData(this.openapi); + return v2.validateTransactionV2(this, transactions, callback); + } + static getOptions(mode, criteria) { + return getOptions(mode, criteria); + } + /** + * + * @description Takes in a folder and identifies the root files in that folder + * if there are different specification's versions will return only the ones that + * corresponds to the field specificationVersion + * + * @returns {object} root files information found in the input + */ + async detectRootFiles() { + const input = this.input; + schemaUtils.validateInputMultiFileAPI(input); + if (!this.hasDefinedVersion && "content" in input.data[0]) { + return schemaUtils.mapGetRootFilesOutputToDetectRootFilesOutput([], input.specificationVersion); + } + let files = {}, rootFiles, res, adaptedInput; + if (input.origin === BROWSER) { + path = pathBrowserify; + OasResolverOptions.browser = true; + } + input.data.forEach((file) => { + files[path.resolve(file.fileName)] = file.content ? file.content : ""; + }); + adaptedInput = schemaUtils.mapDetectRootFilesInputToGetRootFilesInput(input); + adaptedInput.origin = input.origin; + rootFiles = parse2.getRootFiles( + adaptedInput, + concreteUtils.inputValidation, + this.computedOptions, + files, + input.specificationVersion, + false + ); + res = schemaUtils.mapGetRootFilesOutputToDetectRootFilesOutput(rootFiles, input.specificationVersion); + return res; + } + /** + * + * @description Takes in a folder and identifies the related files from the + * root file perspective (using $ref property) + * + * @returns {object} root files information and data input + */ + async detectRelatedFiles() { + const input = this.input; + schemaUtils.validateInputMultiFileAPI(input); + if (!input.rootFiles || input.rootFiles.length === 0) { + let rootFiles = await this.detectRootFiles(input); + if (rootFiles.output.data) { + let inputContent = []; + rootFiles.output.data.forEach((rootFile) => { + let founInData = input.data.find((dataFile) => { + return dataFile.fileName === rootFile.path; + }); + if (founInData) { + inputContent.push({ fileName: founInData.fileName, content: founInData.content }); + } + }); + input.rootFiles = inputContent; + return schemaUtils.processRelatedFiles(input); + } + } + let adaptedRootFiles = input.rootFiles.map((rootFile) => { + let foundInData = input.data.find((file) => { + return file.fileName === rootFile.path; + }); + if (!foundInData) { + return void 0; + } + return { fileName: rootFile.path, content: foundInData.content }; + }).filter((rootFile) => { + return rootFile !== void 0; + }); + if (adaptedRootFiles.length === 0) { + throw new Error("Root file content not found in data array"); + } + input.rootFiles = adaptedRootFiles; + return schemaUtils.processRelatedFiles(input); + } + /** + * + * @description Takes in a folder and identifies the related files from the + * root file perspective (using $ref property) + * + * @returns {object} root files information and data input + */ + async bundle() { + const input = this.input; + schemaUtils.validateInputMultiFileAPI(input); + if (!input.rootFiles || input.rootFiles.length === 0) { + let rootFiles = await this.detectRootFiles(input); + if (rootFiles.output.data) { + let inputContent = []; + rootFiles.output.data.forEach((rootFile) => { + let foundInData = input.data.find((dataFile) => { + return dataFile.fileName === rootFile.path; + }); + if (foundInData) { + inputContent.push({ fileName: foundInData.fileName, content: foundInData.content }); + } + }); + input.rootFiles = inputContent; + return schemaUtils.processRelatedFiles(input, true, this.computedOptions); + } + } + let adaptedRootFiles = input.rootFiles.map((rootFile) => { + let foundInData = input.data.find((file) => { + return file.fileName === rootFile.path; + }); + if (!foundInData) { + return void 0; + } + return { fileName: rootFile.path, content: foundInData.content }; + }).filter((rootFile) => { + return rootFile !== void 0; + }); + if (adaptedRootFiles.length === 0) { + throw new Error("Root file content not found in data array"); + } + input.rootFiles = adaptedRootFiles; + return schemaUtils.processRelatedFiles(input, true, this.computedOptions); + } + }; + module2.exports = { + SchemaPack, + MODULE_VERSION + }; + } +}); + +// ../../node_modules/openapi-to-postmanv2/index.js +var require_openapi_to_postmanv2 = __commonJS({ + "../../node_modules/openapi-to-postmanv2/index.js"(exports2, module2) { + "use strict"; + var { MODULE_VERSION } = require_schemapack(); + var _2 = require_lodash(); + var SchemaPack = require_schemapack().SchemaPack; + var UserError = require_UserError(); + var DEFAULT_INVALID_ERROR = "Provided definition is invalid"; + module2.exports = { + // Old API wrapping the new API + convert: function(input, options, cb) { + var schema2 = new SchemaPack(input, options); + if (schema2.validated) { + return schema2.convert(cb); + } + return cb(new UserError(_2.get(schema2, "validationResult.reason", DEFAULT_INVALID_ERROR))); + }, + convertV2: function(input, options, cb) { + var schema2 = new SchemaPack(input, options, MODULE_VERSION.V2); + if (schema2.validated) { + return schema2.convertV2(cb); + } + return cb(new UserError(_2.get(schema2, "validationResult.reason", DEFAULT_INVALID_ERROR))); + }, + validate: function(input) { + var schema2 = new SchemaPack(input); + return schema2.validationResult; + }, + getMetaData: function(input, cb) { + var schema2 = new SchemaPack(input); + schema2.getMetaData(cb); + }, + mergeAndValidate: function(input, cb) { + var schema2 = new SchemaPack(input); + schema2.mergeAndValidate(cb); + }, + getOptions: function(mode, criteria) { + return SchemaPack.getOptions(mode, criteria); + }, + detectRootFiles: async function(input) { + var schema2 = new SchemaPack(input); + return schema2.detectRootFiles(); + }, + detectRelatedFiles: async function(input) { + var schema2 = new SchemaPack(input); + return schema2.detectRelatedFiles(); + }, + bundle: async function(input) { + var schema2 = new SchemaPack(input, _2.has(input, "options") ? input.options : {}); + return schema2.bundle(); + }, + // new API + SchemaPack + }; + } +}); + +// src/index.ts +var src_exports = {}; +__export(src_exports, { + pluginHookImport: () => pluginHookImport2 +}); +module.exports = __toCommonJS(src_exports); +var import_openapi_to_postmanv2 = __toESM(require_openapi_to_postmanv2()); + +// ../importer-postman/src/index.ts +var POSTMAN_2_1_0_SCHEMA = "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"; +var POSTMAN_2_0_0_SCHEMA = "https://schema.getpostman.com/json/collection/v2.0.0/collection.json"; +var VALID_SCHEMAS = [POSTMAN_2_0_0_SCHEMA, POSTMAN_2_1_0_SCHEMA]; +function pluginHookImport(_ctx, contents) { + const root = parseJSONToRecord(contents); + if (root == null) return; + const info = toRecord(root.info); + const isValidSchema = VALID_SCHEMAS.includes(info.schema); + if (!isValidSchema || !Array.isArray(root.item)) { + return; + } + const globalAuth = importAuth(root.auth); + const exportResources = { + workspaces: [], + environments: [], + httpRequests: [], + folders: [] + }; + const workspace = { + model: "workspace", + id: generateId("workspace"), + name: info.name || "Postman Import", + description: info.description?.content ?? info.description ?? "", + variables: root.variable?.map((v) => ({ + name: v.key, + value: v.value + })) ?? [] + }; + exportResources.workspaces.push(workspace); + const importItem = (v, folderId = null) => { + if (typeof v.name === "string" && Array.isArray(v.item)) { + const folder = { + model: "folder", + workspaceId: workspace.id, + id: generateId("folder"), + name: v.name, + folderId + }; + exportResources.folders.push(folder); + for (const child of v.item) { + importItem(child, folder.id); + } + } else if (typeof v.name === "string" && "request" in v) { + const r = toRecord(v.request); + const bodyPatch = importBody(r.body); + const requestAuthPath = importAuth(r.auth); + const authPatch = requestAuthPath.authenticationType == null ? globalAuth : requestAuthPath; + const headers = toArray(r.header).map((h) => { + return { + name: h.key, + value: h.value, + enabled: !h.disabled + }; + }); + for (const bodyPatchHeader of bodyPatch.headers) { + const existingHeader = headers.find((h) => h.name.toLowerCase() === bodyPatchHeader.name.toLowerCase()); + if (existingHeader) { + continue; + } + headers.push(bodyPatchHeader); + } + const { url, urlParameters } = convertUrl(r.url); + const request = { + model: "http_request", + id: generateId("http_request"), + workspaceId: workspace.id, + folderId, + name: v.name, + method: r.method || "GET", + url, + urlParameters, + body: bodyPatch.body, + bodyType: bodyPatch.bodyType, + authentication: authPatch.authentication, + authenticationType: authPatch.authenticationType, + headers + }; + exportResources.httpRequests.push(request); + } else { + console.log("Unknown item", v, folderId); + } + }; + for (const item of root.item) { + importItem(item); + } + return { resources: convertTemplateSyntax(exportResources) }; +} +function convertUrl(url) { + if (typeof url === "string") { + return { url, urlParameters: [] }; + } + url = toRecord(url); + let v = ""; + if ("protocol" in url && typeof url.protocol === "string") { + v += `${url.protocol}://`; + } + if ("host" in url) { + v += `${Array.isArray(url.host) ? url.host.join(".") : url.host}`; + } + if ("port" in url && typeof url.port === "string") { + v += `:${url.port}`; + } + if ("path" in url && Array.isArray(url.path) && url.path.length > 0) { + v += `/${Array.isArray(url.path) ? url.path.join("/") : url.path}`; + } + const params = []; + if ("query" in url && Array.isArray(url.query) && url.query.length > 0) { + for (const query of url.query) { + params.push({ + name: query.key ?? "", + value: query.value ?? "", + enabled: !query.disabled + }); + } + } + if ("variable" in url && Array.isArray(url.variable) && url.variable.length > 0) { + for (const v2 of url.variable) { + params.push({ + name: ":" + (v2.key ?? ""), + value: v2.value ?? "", + enabled: !v2.disabled + }); + } + } + if ("hash" in url && typeof url.hash === "string") { + v += `#${url.hash}`; + } + return { url: v, urlParameters: params }; +} +function importAuth(rawAuth) { + const auth = toRecord(rawAuth); + if ("basic" in auth) { + return { + authenticationType: "basic", + authentication: { + username: auth.basic.username || "", + password: auth.basic.password || "" + } + }; + } else if ("bearer" in auth) { + return { + authenticationType: "bearer", + authentication: { + token: auth.bearer.token || "" + } + }; + } else { + return { authenticationType: null, authentication: {} }; + } +} +function importBody(rawBody) { + const body = toRecord(rawBody); + if (body.mode === "graphql") { + return { + headers: [ + { + name: "Content-Type", + value: "application/json", + enabled: true + } + ], + bodyType: "graphql", + body: { + text: JSON.stringify( + { query: body.graphql.query, variables: parseJSONToRecord(body.graphql.variables) }, + null, + 2 + ) + } + }; + } else if (body.mode === "urlencoded") { + return { + headers: [ + { + name: "Content-Type", + value: "application/x-www-form-urlencoded", + enabled: true + } + ], + bodyType: "application/x-www-form-urlencoded", + body: { + form: toArray(body.urlencoded).map((f) => ({ + enabled: !f.disabled, + name: f.key ?? "", + value: f.value ?? "" + })) + } + }; + } else if (body.mode === "formdata") { + return { + headers: [ + { + name: "Content-Type", + value: "multipart/form-data", + enabled: true + } + ], + bodyType: "multipart/form-data", + body: { + form: toArray(body.formdata).map( + (f) => f.src != null ? { + enabled: !f.disabled, + contentType: f.contentType ?? null, + name: f.key ?? "", + file: f.src ?? "" + } : { + enabled: !f.disabled, + name: f.key ?? "", + value: f.value ?? "" + } + ) + } + }; + } else if (body.mode === "raw") { + return { + headers: [ + { + name: "Content-Type", + value: body.options?.raw?.language === "json" ? "application/json" : "", + enabled: true + } + ], + bodyType: body.options?.raw?.language === "json" ? "application/json" : "other", + body: { + text: body.raw ?? "" + } + }; + } else if (body.mode === "file") { + return { + headers: [], + bodyType: "binary", + body: { + filePath: body.file?.src + } + }; + } else { + return { headers: [], bodyType: null, body: {} }; + } +} +function parseJSONToRecord(jsonStr) { + try { + return toRecord(JSON.parse(jsonStr)); + } catch (err) { + } + return null; +} +function toRecord(value) { + if (Object.prototype.toString.call(value) === "[object Object]") return value; + else return {}; +} +function toArray(value) { + if (Object.prototype.toString.call(value) === "[object Array]") return value; + else return []; +} +function convertTemplateSyntax(obj) { + if (typeof obj === "string") { + return obj.replace(/{{\s*(_\.)?([^}]+)\s*}}/g, "${[$2]}"); + } else if (Array.isArray(obj) && obj != null) { + return obj.map(convertTemplateSyntax); + } else if (typeof obj === "object" && obj != null) { + return Object.fromEntries( + Object.entries(obj).map(([k, v]) => [k, convertTemplateSyntax(v)]) + ); + } else { + return obj; + } +} +var idCount = {}; +function generateId(model) { + idCount[model] = (idCount[model] ?? -1) + 1; + return `GENERATE_ID::${model.toUpperCase()}_${idCount[model]}`; +} + +// src/index.ts +async function pluginHookImport2(ctx, contents) { + let postmanCollection; + try { + postmanCollection = await new Promise((resolve, reject) => { + (0, import_openapi_to_postmanv2.convert)({ type: "string", data: contents }, {}, (err, result) => { + if (err != null) reject(err); + if (Array.isArray(result.output) && result.output.length > 0) { + resolve(result.output[0].data); + } + }); + }); + } catch (err) { + return void 0; + } + return pluginHookImport(ctx, JSON.stringify(postmanCollection)); +} +// Annotate the CommonJS export names for ESM import in node: +0 && (module.exports = { + pluginHookImport +}); +/*! Bundled license information: + +lodash/lodash.js: + (** + * @license + * Lodash + * Copyright OpenJS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + *) + +uri-js/dist/es5/uri.all.js: + (** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js *) + +mime-db/index.js: + (*! + * mime-db + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2015-2022 Douglas Christopher Wilson + * MIT Licensed + *) + +mime-types/index.js: + (*! + * mime-types + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2015 Douglas Christopher Wilson + * MIT Licensed + *) + +openapi-to-postmanv2/assets/ajv6faker.js: + (** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js *) + +openapi-to-postmanv2/assets/json-schema-faker.js: + (*! + * json-schema-faker library v0.5.0-rc15 + * http://json-schema-faker.js.org + * + * Copyright (c) 2014-2018 Alvaro Cabrera & Tomasz Ducin + * Released under the MIT license + * + * Date: 2018-04-09 17:23:23.954Z + *) + (*! ***************************************************************************** + Copyright (c) Microsoft Corporation. All rights reserved. + 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 + + THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED + WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, + MERCHANTABLITY OR NON-INFRINGEMENT. + + See the Apache Version 2.0 License for specific language governing permissions + and limitations under the License. + ***************************************************************************** *) + (*! jsonpath 1.0.0 *) + (*! + * JSON Schema $Ref Parser v5.0.0 (March 18th 2018) + * + * https://github.com/BigstickCarpet/json-schema-ref-parser + * + * @author James Messinger (http://bigstickcarpet.com) + * @license MIT + *) + (*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + *) + (*! + * Determine if an object is a Buffer + * + * @author Feross Aboukhadijeh + * @license MIT + *) + (*! https://mths.be/punycode v1.4.1 by @mathias *) +*/ diff --git a/src-tauri/vendored/plugins/importer-openapi/package.json b/src-tauri/vendored/plugins/importer-openapi/package.json new file mode 100644 index 00000000..e2382fa1 --- /dev/null +++ b/src-tauri/vendored/plugins/importer-openapi/package.json @@ -0,0 +1,19 @@ +{ + "name": "importer-openapi", + "private": true, + "version": "0.0.1", + "scripts": { + "build": "yaakcli build ./src/index.js" + }, + "dependencies": { + "@yaakapp/api": "^0.2.9", + "openapi-to-postmanv2": "^4.23.1", + "yaml": "^2.4.2" + }, + "devDependencies": { + "@yaakapp/cli": "^0.0.42", + "@types/node": "^20.14.9", + "@types/openapi-to-postmanv2": "^3.2.4", + "typescript": "^5.5.2" + } +} diff --git a/src-tauri/vendored/plugins/importer-postman/build/index.js b/src-tauri/vendored/plugins/importer-postman/build/index.js new file mode 100644 index 00000000..9543e279 --- /dev/null +++ b/src-tauri/vendored/plugins/importer-postman/build/index.js @@ -0,0 +1,301 @@ +"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); + +// src/index.ts +var src_exports = {}; +__export(src_exports, { + pluginHookImport: () => pluginHookImport +}); +module.exports = __toCommonJS(src_exports); +var POSTMAN_2_1_0_SCHEMA = "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"; +var POSTMAN_2_0_0_SCHEMA = "https://schema.getpostman.com/json/collection/v2.0.0/collection.json"; +var VALID_SCHEMAS = [POSTMAN_2_0_0_SCHEMA, POSTMAN_2_1_0_SCHEMA]; +function pluginHookImport(_ctx, contents) { + const root = parseJSONToRecord(contents); + if (root == null) return; + const info = toRecord(root.info); + const isValidSchema = VALID_SCHEMAS.includes(info.schema); + if (!isValidSchema || !Array.isArray(root.item)) { + return; + } + const globalAuth = importAuth(root.auth); + const exportResources = { + workspaces: [], + environments: [], + httpRequests: [], + folders: [] + }; + const workspace = { + model: "workspace", + id: generateId("workspace"), + name: info.name || "Postman Import", + description: info.description?.content ?? info.description ?? "", + variables: root.variable?.map((v) => ({ + name: v.key, + value: v.value + })) ?? [] + }; + exportResources.workspaces.push(workspace); + const importItem = (v, folderId = null) => { + if (typeof v.name === "string" && Array.isArray(v.item)) { + const folder = { + model: "folder", + workspaceId: workspace.id, + id: generateId("folder"), + name: v.name, + folderId + }; + exportResources.folders.push(folder); + for (const child of v.item) { + importItem(child, folder.id); + } + } else if (typeof v.name === "string" && "request" in v) { + const r = toRecord(v.request); + const bodyPatch = importBody(r.body); + const requestAuthPath = importAuth(r.auth); + const authPatch = requestAuthPath.authenticationType == null ? globalAuth : requestAuthPath; + const headers = toArray(r.header).map((h) => { + return { + name: h.key, + value: h.value, + enabled: !h.disabled + }; + }); + for (const bodyPatchHeader of bodyPatch.headers) { + const existingHeader = headers.find((h) => h.name.toLowerCase() === bodyPatchHeader.name.toLowerCase()); + if (existingHeader) { + continue; + } + headers.push(bodyPatchHeader); + } + const { url, urlParameters } = convertUrl(r.url); + const request = { + model: "http_request", + id: generateId("http_request"), + workspaceId: workspace.id, + folderId, + name: v.name, + method: r.method || "GET", + url, + urlParameters, + body: bodyPatch.body, + bodyType: bodyPatch.bodyType, + authentication: authPatch.authentication, + authenticationType: authPatch.authenticationType, + headers + }; + exportResources.httpRequests.push(request); + } else { + console.log("Unknown item", v, folderId); + } + }; + for (const item of root.item) { + importItem(item); + } + return { resources: convertTemplateSyntax(exportResources) }; +} +function convertUrl(url) { + if (typeof url === "string") { + return { url, urlParameters: [] }; + } + url = toRecord(url); + let v = ""; + if ("protocol" in url && typeof url.protocol === "string") { + v += `${url.protocol}://`; + } + if ("host" in url) { + v += `${Array.isArray(url.host) ? url.host.join(".") : url.host}`; + } + if ("port" in url && typeof url.port === "string") { + v += `:${url.port}`; + } + if ("path" in url && Array.isArray(url.path) && url.path.length > 0) { + v += `/${Array.isArray(url.path) ? url.path.join("/") : url.path}`; + } + const params = []; + if ("query" in url && Array.isArray(url.query) && url.query.length > 0) { + for (const query of url.query) { + params.push({ + name: query.key ?? "", + value: query.value ?? "", + enabled: !query.disabled + }); + } + } + if ("variable" in url && Array.isArray(url.variable) && url.variable.length > 0) { + for (const v2 of url.variable) { + params.push({ + name: ":" + (v2.key ?? ""), + value: v2.value ?? "", + enabled: !v2.disabled + }); + } + } + if ("hash" in url && typeof url.hash === "string") { + v += `#${url.hash}`; + } + return { url: v, urlParameters: params }; +} +function importAuth(rawAuth) { + const auth = toRecord(rawAuth); + if ("basic" in auth) { + return { + authenticationType: "basic", + authentication: { + username: auth.basic.username || "", + password: auth.basic.password || "" + } + }; + } else if ("bearer" in auth) { + return { + authenticationType: "bearer", + authentication: { + token: auth.bearer.token || "" + } + }; + } else { + return { authenticationType: null, authentication: {} }; + } +} +function importBody(rawBody) { + const body = toRecord(rawBody); + if (body.mode === "graphql") { + return { + headers: [ + { + name: "Content-Type", + value: "application/json", + enabled: true + } + ], + bodyType: "graphql", + body: { + text: JSON.stringify( + { query: body.graphql.query, variables: parseJSONToRecord(body.graphql.variables) }, + null, + 2 + ) + } + }; + } else if (body.mode === "urlencoded") { + return { + headers: [ + { + name: "Content-Type", + value: "application/x-www-form-urlencoded", + enabled: true + } + ], + bodyType: "application/x-www-form-urlencoded", + body: { + form: toArray(body.urlencoded).map((f) => ({ + enabled: !f.disabled, + name: f.key ?? "", + value: f.value ?? "" + })) + } + }; + } else if (body.mode === "formdata") { + return { + headers: [ + { + name: "Content-Type", + value: "multipart/form-data", + enabled: true + } + ], + bodyType: "multipart/form-data", + body: { + form: toArray(body.formdata).map( + (f) => f.src != null ? { + enabled: !f.disabled, + contentType: f.contentType ?? null, + name: f.key ?? "", + file: f.src ?? "" + } : { + enabled: !f.disabled, + name: f.key ?? "", + value: f.value ?? "" + } + ) + } + }; + } else if (body.mode === "raw") { + return { + headers: [ + { + name: "Content-Type", + value: body.options?.raw?.language === "json" ? "application/json" : "", + enabled: true + } + ], + bodyType: body.options?.raw?.language === "json" ? "application/json" : "other", + body: { + text: body.raw ?? "" + } + }; + } else if (body.mode === "file") { + return { + headers: [], + bodyType: "binary", + body: { + filePath: body.file?.src + } + }; + } else { + return { headers: [], bodyType: null, body: {} }; + } +} +function parseJSONToRecord(jsonStr) { + try { + return toRecord(JSON.parse(jsonStr)); + } catch (err) { + } + return null; +} +function toRecord(value) { + if (Object.prototype.toString.call(value) === "[object Object]") return value; + else return {}; +} +function toArray(value) { + if (Object.prototype.toString.call(value) === "[object Array]") return value; + else return []; +} +function convertTemplateSyntax(obj) { + if (typeof obj === "string") { + return obj.replace(/{{\s*(_\.)?([^}]+)\s*}}/g, "${[$2]}"); + } else if (Array.isArray(obj) && obj != null) { + return obj.map(convertTemplateSyntax); + } else if (typeof obj === "object" && obj != null) { + return Object.fromEntries( + Object.entries(obj).map(([k, v]) => [k, convertTemplateSyntax(v)]) + ); + } else { + return obj; + } +} +var idCount = {}; +function generateId(model) { + idCount[model] = (idCount[model] ?? -1) + 1; + return `GENERATE_ID::${model.toUpperCase()}_${idCount[model]}`; +} +// Annotate the CommonJS export names for ESM import in node: +0 && (module.exports = { + pluginHookImport +}); diff --git a/src-tauri/vendored/plugins/importer-postman/package.json b/src-tauri/vendored/plugins/importer-postman/package.json new file mode 100644 index 00000000..087b1fa2 --- /dev/null +++ b/src-tauri/vendored/plugins/importer-postman/package.json @@ -0,0 +1,19 @@ +{ + "name": "importer-postman", + "private": true, + "version": "0.0.1", + "main": "./build/index.js", + "scripts": { + "build": "yaakcli build ./src/index.js" + }, + "dependencies": { + "@yaakapp/api": "^0.2.9" + }, + "devDependencies": { + "@yaakapp/cli": "^0.0.42", + "@types/node": "^20.14.9", + "esbuild": "^0.21.5", + "typescript": "^5.5.2", + "vitest": "^1.4.0" + } +} diff --git a/src-tauri/vendored/plugins/importer-yaak/build/index.js b/src-tauri/vendored/plugins/importer-yaak/build/index.js new file mode 100644 index 00000000..a02fa336 --- /dev/null +++ b/src-tauri/vendored/plugins/importer-yaak/build/index.js @@ -0,0 +1,52 @@ +"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); + +// src/index.ts +var src_exports = {}; +__export(src_exports, { + pluginHookImport: () => pluginHookImport +}); +module.exports = __toCommonJS(src_exports); +function pluginHookImport(_ctx, contents) { + let parsed; + try { + parsed = JSON.parse(contents); + } catch (err) { + return void 0; + } + if (!isJSObject(parsed)) { + return void 0; + } + const isYaakExport = "yaakSchema" in parsed; + if (!isYaakExport) { + return; + } + if ("requests" in parsed.resources) { + parsed.resources.httpRequests = parsed.resources.requests; + delete parsed.resources["requests"]; + } + return { resources: parsed.resources }; +} +function isJSObject(obj) { + return Object.prototype.toString.call(obj) === "[object Object]"; +} +// Annotate the CommonJS export names for ESM import in node: +0 && (module.exports = { + pluginHookImport +}); diff --git a/src-tauri/vendored/plugins/importer-yaak/package.json b/src-tauri/vendored/plugins/importer-yaak/package.json new file mode 100644 index 00000000..3fd9d53e --- /dev/null +++ b/src-tauri/vendored/plugins/importer-yaak/package.json @@ -0,0 +1,17 @@ +{ + "name": "importer-yaak", + "private": true, + "version": "0.0.1", + "scripts": { + "build": "yaakcli build ./src/index.js" + }, + "dependencies": { + "@yaakapp/api": "^0.2.9" + }, + "devDependencies": { + "@yaakapp/cli": "^0.0.42", + "@types/node": "^20.14.9", + "esbuild": "^0.21.5", + "typescript": "^5.5.2" + } +} diff --git a/src-tauri/vendored/plugins/template-function-response/build/index.js b/src-tauri/vendored/plugins/template-function-response/build/index.js new file mode 100644 index 00000000..7a1685e7 --- /dev/null +++ b/src-tauri/vendored/plugins/template-function-response/build/index.js @@ -0,0 +1,8913 @@ +"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 __commonJS = (cb, mod) => function __require() { + return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; +}; +var __export = (target, all) => { + for (var name2 in all) + __defProp(target, name2, { get: all[name2], 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); + +// ../../node_modules/@xmldom/xmldom/lib/conventions.js +var require_conventions = __commonJS({ + "../../node_modules/@xmldom/xmldom/lib/conventions.js"(exports2) { + "use strict"; + function find(list, predicate, ac) { + if (ac === void 0) { + ac = Array.prototype; + } + if (list && typeof ac.find === "function") { + return ac.find.call(list, predicate); + } + for (var i = 0; i < list.length; i++) { + if (Object.prototype.hasOwnProperty.call(list, i)) { + var item = list[i]; + if (predicate.call(void 0, item, i, list)) { + return item; + } + } + } + } + function freeze(object, oc) { + if (oc === void 0) { + oc = Object; + } + return oc && typeof oc.freeze === "function" ? oc.freeze(object) : object; + } + function assign(target, source) { + if (target === null || typeof target !== "object") { + throw new TypeError("target is not an object"); + } + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + return target; + } + var MIME_TYPE = freeze({ + /** + * `text/html`, the only mime type that triggers treating an XML document as HTML. + * + * @see DOMParser.SupportedType.isHTML + * @see https://www.iana.org/assignments/media-types/text/html IANA MimeType registration + * @see https://en.wikipedia.org/wiki/HTML Wikipedia + * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMParser/parseFromString MDN + * @see https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-domparser-parsefromstring WHATWG HTML Spec + */ + HTML: "text/html", + /** + * Helper method to check a mime type if it indicates an HTML document + * + * @param {string} [value] + * @returns {boolean} + * + * @see https://www.iana.org/assignments/media-types/text/html IANA MimeType registration + * @see https://en.wikipedia.org/wiki/HTML Wikipedia + * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMParser/parseFromString MDN + * @see https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-domparser-parsefromstring */ + isHTML: function(value) { + return value === MIME_TYPE.HTML; + }, + /** + * `application/xml`, the standard mime type for XML documents. + * + * @see https://www.iana.org/assignments/media-types/application/xml IANA MimeType registration + * @see https://tools.ietf.org/html/rfc7303#section-9.1 RFC 7303 + * @see https://en.wikipedia.org/wiki/XML_and_MIME Wikipedia + */ + XML_APPLICATION: "application/xml", + /** + * `text/html`, an alias for `application/xml`. + * + * @see https://tools.ietf.org/html/rfc7303#section-9.2 RFC 7303 + * @see https://www.iana.org/assignments/media-types/text/xml IANA MimeType registration + * @see https://en.wikipedia.org/wiki/XML_and_MIME Wikipedia + */ + XML_TEXT: "text/xml", + /** + * `application/xhtml+xml`, indicates an XML document that has the default HTML namespace, + * but is parsed as an XML document. + * + * @see https://www.iana.org/assignments/media-types/application/xhtml+xml IANA MimeType registration + * @see https://dom.spec.whatwg.org/#dom-domimplementation-createdocument WHATWG DOM Spec + * @see https://en.wikipedia.org/wiki/XHTML Wikipedia + */ + XML_XHTML_APPLICATION: "application/xhtml+xml", + /** + * `image/svg+xml`, + * + * @see https://www.iana.org/assignments/media-types/image/svg+xml IANA MimeType registration + * @see https://www.w3.org/TR/SVG11/ W3C SVG 1.1 + * @see https://en.wikipedia.org/wiki/Scalable_Vector_Graphics Wikipedia + */ + XML_SVG_IMAGE: "image/svg+xml" + }); + var NAMESPACE = freeze({ + /** + * The XHTML namespace. + * + * @see http://www.w3.org/1999/xhtml + */ + HTML: "http://www.w3.org/1999/xhtml", + /** + * Checks if `uri` equals `NAMESPACE.HTML`. + * + * @param {string} [uri] + * + * @see NAMESPACE.HTML + */ + isHTML: function(uri) { + return uri === NAMESPACE.HTML; + }, + /** + * The SVG namespace. + * + * @see http://www.w3.org/2000/svg + */ + SVG: "http://www.w3.org/2000/svg", + /** + * The `xml:` namespace. + * + * @see http://www.w3.org/XML/1998/namespace + */ + XML: "http://www.w3.org/XML/1998/namespace", + /** + * The `xmlns:` namespace + * + * @see https://www.w3.org/2000/xmlns/ + */ + XMLNS: "http://www.w3.org/2000/xmlns/" + }); + exports2.assign = assign; + exports2.find = find; + exports2.freeze = freeze; + exports2.MIME_TYPE = MIME_TYPE; + exports2.NAMESPACE = NAMESPACE; + } +}); + +// ../../node_modules/@xmldom/xmldom/lib/dom.js +var require_dom = __commonJS({ + "../../node_modules/@xmldom/xmldom/lib/dom.js"(exports2) { + var conventions = require_conventions(); + var find = conventions.find; + var NAMESPACE = conventions.NAMESPACE; + function notEmptyString(input) { + return input !== ""; + } + function splitOnASCIIWhitespace(input) { + return input ? input.split(/[\t\n\f\r ]+/).filter(notEmptyString) : []; + } + function orderedSetReducer(current, element) { + if (!current.hasOwnProperty(element)) { + current[element] = true; + } + return current; + } + function toOrderedSet(input) { + if (!input) return []; + var list = splitOnASCIIWhitespace(input); + return Object.keys(list.reduce(orderedSetReducer, {})); + } + function arrayIncludes(list) { + return function(element) { + return list && list.indexOf(element) !== -1; + }; + } + function copy(src, dest) { + for (var p in src) { + if (Object.prototype.hasOwnProperty.call(src, p)) { + dest[p] = src[p]; + } + } + } + function _extends(Class, Super) { + var pt = Class.prototype; + if (!(pt instanceof Super)) { + let t2 = function() { + }; + var t = t2; + ; + t2.prototype = Super.prototype; + t2 = new t2(); + copy(pt, t2); + Class.prototype = pt = t2; + } + if (pt.constructor != Class) { + if (typeof Class != "function") { + console.error("unknown Class:" + Class); + } + pt.constructor = Class; + } + } + var NodeType = {}; + var ELEMENT_NODE = NodeType.ELEMENT_NODE = 1; + var ATTRIBUTE_NODE = NodeType.ATTRIBUTE_NODE = 2; + var TEXT_NODE = NodeType.TEXT_NODE = 3; + var CDATA_SECTION_NODE = NodeType.CDATA_SECTION_NODE = 4; + var ENTITY_REFERENCE_NODE = NodeType.ENTITY_REFERENCE_NODE = 5; + var ENTITY_NODE = NodeType.ENTITY_NODE = 6; + var PROCESSING_INSTRUCTION_NODE = NodeType.PROCESSING_INSTRUCTION_NODE = 7; + var COMMENT_NODE = NodeType.COMMENT_NODE = 8; + var DOCUMENT_NODE = NodeType.DOCUMENT_NODE = 9; + var DOCUMENT_TYPE_NODE = NodeType.DOCUMENT_TYPE_NODE = 10; + var DOCUMENT_FRAGMENT_NODE = NodeType.DOCUMENT_FRAGMENT_NODE = 11; + var NOTATION_NODE = NodeType.NOTATION_NODE = 12; + var ExceptionCode = {}; + var ExceptionMessage = {}; + var INDEX_SIZE_ERR = ExceptionCode.INDEX_SIZE_ERR = (ExceptionMessage[1] = "Index size error", 1); + var DOMSTRING_SIZE_ERR = ExceptionCode.DOMSTRING_SIZE_ERR = (ExceptionMessage[2] = "DOMString size error", 2); + var HIERARCHY_REQUEST_ERR = ExceptionCode.HIERARCHY_REQUEST_ERR = (ExceptionMessage[3] = "Hierarchy request error", 3); + var WRONG_DOCUMENT_ERR = ExceptionCode.WRONG_DOCUMENT_ERR = (ExceptionMessage[4] = "Wrong document", 4); + var INVALID_CHARACTER_ERR = ExceptionCode.INVALID_CHARACTER_ERR = (ExceptionMessage[5] = "Invalid character", 5); + var NO_DATA_ALLOWED_ERR = ExceptionCode.NO_DATA_ALLOWED_ERR = (ExceptionMessage[6] = "No data allowed", 6); + var NO_MODIFICATION_ALLOWED_ERR = ExceptionCode.NO_MODIFICATION_ALLOWED_ERR = (ExceptionMessage[7] = "No modification allowed", 7); + var NOT_FOUND_ERR = ExceptionCode.NOT_FOUND_ERR = (ExceptionMessage[8] = "Not found", 8); + var NOT_SUPPORTED_ERR = ExceptionCode.NOT_SUPPORTED_ERR = (ExceptionMessage[9] = "Not supported", 9); + var INUSE_ATTRIBUTE_ERR = ExceptionCode.INUSE_ATTRIBUTE_ERR = (ExceptionMessage[10] = "Attribute in use", 10); + var INVALID_STATE_ERR = ExceptionCode.INVALID_STATE_ERR = (ExceptionMessage[11] = "Invalid state", 11); + var SYNTAX_ERR = ExceptionCode.SYNTAX_ERR = (ExceptionMessage[12] = "Syntax error", 12); + var INVALID_MODIFICATION_ERR = ExceptionCode.INVALID_MODIFICATION_ERR = (ExceptionMessage[13] = "Invalid modification", 13); + var NAMESPACE_ERR = ExceptionCode.NAMESPACE_ERR = (ExceptionMessage[14] = "Invalid namespace", 14); + var INVALID_ACCESS_ERR = ExceptionCode.INVALID_ACCESS_ERR = (ExceptionMessage[15] = "Invalid access", 15); + function DOMException(code, message) { + if (message instanceof Error) { + var error = message; + } else { + error = this; + Error.call(this, ExceptionMessage[code]); + this.message = ExceptionMessage[code]; + if (Error.captureStackTrace) Error.captureStackTrace(this, DOMException); + } + error.code = code; + if (message) this.message = this.message + ": " + message; + return error; + } + DOMException.prototype = Error.prototype; + copy(ExceptionCode, DOMException); + function NodeList() { + } + NodeList.prototype = { + /** + * The number of nodes in the list. The range of valid child node indices is 0 to length-1 inclusive. + * @standard level1 + */ + length: 0, + /** + * Returns the indexth item in the collection. If index is greater than or equal to the number of nodes in the list, this returns null. + * @standard level1 + * @param index unsigned long + * Index into the collection. + * @return Node + * The node at the indexth position in the NodeList, or null if that is not a valid index. + */ + item: function(index) { + return index >= 0 && index < this.length ? this[index] : null; + }, + toString: function(isHTML, nodeFilter) { + for (var buf = [], i = 0; i < this.length; i++) { + serializeToString(this[i], buf, isHTML, nodeFilter); + } + return buf.join(""); + }, + /** + * @private + * @param {function (Node):boolean} predicate + * @returns {Node[]} + */ + filter: function(predicate) { + return Array.prototype.filter.call(this, predicate); + }, + /** + * @private + * @param {Node} item + * @returns {number} + */ + indexOf: function(item) { + return Array.prototype.indexOf.call(this, item); + } + }; + function LiveNodeList(node, refresh) { + this._node = node; + this._refresh = refresh; + _updateLiveList(this); + } + function _updateLiveList(list) { + var inc = list._node._inc || list._node.ownerDocument._inc; + if (list._inc !== inc) { + var ls = list._refresh(list._node); + __set__(list, "length", ls.length); + if (!list.$$length || ls.length < list.$$length) { + for (var i = ls.length; i in list; i++) { + if (Object.prototype.hasOwnProperty.call(list, i)) { + delete list[i]; + } + } + } + copy(ls, list); + list._inc = inc; + } + } + LiveNodeList.prototype.item = function(i) { + _updateLiveList(this); + return this[i] || null; + }; + _extends(LiveNodeList, NodeList); + function NamedNodeMap() { + } + function _findNodeIndex(list, node) { + var i = list.length; + while (i--) { + if (list[i] === node) { + return i; + } + } + } + function _addNamedNode(el, list, newAttr, oldAttr) { + if (oldAttr) { + list[_findNodeIndex(list, oldAttr)] = newAttr; + } else { + list[list.length++] = newAttr; + } + if (el) { + newAttr.ownerElement = el; + var doc = el.ownerDocument; + if (doc) { + oldAttr && _onRemoveAttribute(doc, el, oldAttr); + _onAddAttribute(doc, el, newAttr); + } + } + } + function _removeNamedNode(el, list, attr) { + var i = _findNodeIndex(list, attr); + if (i >= 0) { + var lastIndex = list.length - 1; + while (i < lastIndex) { + list[i] = list[++i]; + } + list.length = lastIndex; + if (el) { + var doc = el.ownerDocument; + if (doc) { + _onRemoveAttribute(doc, el, attr); + attr.ownerElement = null; + } + } + } else { + throw new DOMException(NOT_FOUND_ERR, new Error(el.tagName + "@" + attr)); + } + } + NamedNodeMap.prototype = { + length: 0, + item: NodeList.prototype.item, + getNamedItem: function(key) { + var i = this.length; + while (i--) { + var attr = this[i]; + if (attr.nodeName == key) { + return attr; + } + } + }, + setNamedItem: function(attr) { + var el = attr.ownerElement; + if (el && el != this._ownerElement) { + throw new DOMException(INUSE_ATTRIBUTE_ERR); + } + var oldAttr = this.getNamedItem(attr.nodeName); + _addNamedNode(this._ownerElement, this, attr, oldAttr); + return oldAttr; + }, + /* returns Node */ + setNamedItemNS: function(attr) { + var el = attr.ownerElement, oldAttr; + if (el && el != this._ownerElement) { + throw new DOMException(INUSE_ATTRIBUTE_ERR); + } + oldAttr = this.getNamedItemNS(attr.namespaceURI, attr.localName); + _addNamedNode(this._ownerElement, this, attr, oldAttr); + return oldAttr; + }, + /* returns Node */ + removeNamedItem: function(key) { + var attr = this.getNamedItem(key); + _removeNamedNode(this._ownerElement, this, attr); + return attr; + }, + // raises: NOT_FOUND_ERR,NO_MODIFICATION_ALLOWED_ERR + //for level2 + removeNamedItemNS: function(namespaceURI, localName) { + var attr = this.getNamedItemNS(namespaceURI, localName); + _removeNamedNode(this._ownerElement, this, attr); + return attr; + }, + getNamedItemNS: function(namespaceURI, localName) { + var i = this.length; + while (i--) { + var node = this[i]; + if (node.localName == localName && node.namespaceURI == namespaceURI) { + return node; + } + } + return null; + } + }; + function DOMImplementation() { + } + DOMImplementation.prototype = { + /** + * The DOMImplementation.hasFeature() method returns a Boolean flag indicating if a given feature is supported. + * The different implementations fairly diverged in what kind of features were reported. + * The latest version of the spec settled to force this method to always return true, where the functionality was accurate and in use. + * + * @deprecated It is deprecated and modern browsers return true in all cases. + * + * @param {string} feature + * @param {string} [version] + * @returns {boolean} always true + * + * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation/hasFeature MDN + * @see https://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html#ID-5CED94D7 DOM Level 1 Core + * @see https://dom.spec.whatwg.org/#dom-domimplementation-hasfeature DOM Living Standard + */ + hasFeature: function(feature, version) { + return true; + }, + /** + * Creates an XML Document object of the specified type with its document element. + * + * __It behaves slightly different from the description in the living standard__: + * - There is no interface/class `XMLDocument`, it returns a `Document` instance. + * - `contentType`, `encoding`, `mode`, `origin`, `url` fields are currently not declared. + * - this implementation is not validating names or qualified names + * (when parsing XML strings, the SAX parser takes care of that) + * + * @param {string|null} namespaceURI + * @param {string} qualifiedName + * @param {DocumentType=null} doctype + * @returns {Document} + * + * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation/createDocument MDN + * @see https://www.w3.org/TR/DOM-Level-2-Core/core.html#Level-2-Core-DOM-createDocument DOM Level 2 Core (initial) + * @see https://dom.spec.whatwg.org/#dom-domimplementation-createdocument DOM Level 2 Core + * + * @see https://dom.spec.whatwg.org/#validate-and-extract DOM: Validate and extract + * @see https://www.w3.org/TR/xml/#NT-NameStartChar XML Spec: Names + * @see https://www.w3.org/TR/xml-names/#ns-qualnames XML Namespaces: Qualified names + */ + createDocument: function(namespaceURI, qualifiedName, doctype) { + var doc = new Document(); + doc.implementation = this; + doc.childNodes = new NodeList(); + doc.doctype = doctype || null; + if (doctype) { + doc.appendChild(doctype); + } + if (qualifiedName) { + var root = doc.createElementNS(namespaceURI, qualifiedName); + doc.appendChild(root); + } + return doc; + }, + /** + * Returns a doctype, with the given `qualifiedName`, `publicId`, and `systemId`. + * + * __This behavior is slightly different from the in the specs__: + * - this implementation is not validating names or qualified names + * (when parsing XML strings, the SAX parser takes care of that) + * + * @param {string} qualifiedName + * @param {string} [publicId] + * @param {string} [systemId] + * @returns {DocumentType} which can either be used with `DOMImplementation.createDocument` upon document creation + * or can be put into the document via methods like `Node.insertBefore()` or `Node.replaceChild()` + * + * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation/createDocumentType MDN + * @see https://www.w3.org/TR/DOM-Level-2-Core/core.html#Level-2-Core-DOM-createDocType DOM Level 2 Core + * @see https://dom.spec.whatwg.org/#dom-domimplementation-createdocumenttype DOM Living Standard + * + * @see https://dom.spec.whatwg.org/#validate-and-extract DOM: Validate and extract + * @see https://www.w3.org/TR/xml/#NT-NameStartChar XML Spec: Names + * @see https://www.w3.org/TR/xml-names/#ns-qualnames XML Namespaces: Qualified names + */ + createDocumentType: function(qualifiedName, publicId, systemId) { + var node = new DocumentType(); + node.name = qualifiedName; + node.nodeName = qualifiedName; + node.publicId = publicId || ""; + node.systemId = systemId || ""; + return node; + } + }; + function Node() { + } + Node.prototype = { + firstChild: null, + lastChild: null, + previousSibling: null, + nextSibling: null, + attributes: null, + parentNode: null, + childNodes: null, + ownerDocument: null, + nodeValue: null, + namespaceURI: null, + prefix: null, + localName: null, + // Modified in DOM Level 2: + insertBefore: function(newChild, refChild) { + return _insertBefore(this, newChild, refChild); + }, + replaceChild: function(newChild, oldChild) { + _insertBefore(this, newChild, oldChild, assertPreReplacementValidityInDocument); + if (oldChild) { + this.removeChild(oldChild); + } + }, + removeChild: function(oldChild) { + return _removeChild(this, oldChild); + }, + appendChild: function(newChild) { + return this.insertBefore(newChild, null); + }, + hasChildNodes: function() { + return this.firstChild != null; + }, + cloneNode: function(deep) { + return cloneNode(this.ownerDocument || this, this, deep); + }, + // Modified in DOM Level 2: + normalize: function() { + var child = this.firstChild; + while (child) { + var next = child.nextSibling; + if (next && next.nodeType == TEXT_NODE && child.nodeType == TEXT_NODE) { + this.removeChild(next); + child.appendData(next.data); + } else { + child.normalize(); + child = next; + } + } + }, + // Introduced in DOM Level 2: + isSupported: function(feature, version) { + return this.ownerDocument.implementation.hasFeature(feature, version); + }, + // Introduced in DOM Level 2: + hasAttributes: function() { + return this.attributes.length > 0; + }, + /** + * Look up the prefix associated to the given namespace URI, starting from this node. + * **The default namespace declarations are ignored by this method.** + * See Namespace Prefix Lookup for details on the algorithm used by this method. + * + * _Note: The implementation seems to be incomplete when compared to the algorithm described in the specs._ + * + * @param {string | null} namespaceURI + * @returns {string | null} + * @see https://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-lookupNamespacePrefix + * @see https://www.w3.org/TR/DOM-Level-3-Core/namespaces-algorithms.html#lookupNamespacePrefixAlgo + * @see https://dom.spec.whatwg.org/#dom-node-lookupprefix + * @see https://github.com/xmldom/xmldom/issues/322 + */ + lookupPrefix: function(namespaceURI) { + var el = this; + while (el) { + var map = el._nsMap; + if (map) { + for (var n in map) { + if (Object.prototype.hasOwnProperty.call(map, n) && map[n] === namespaceURI) { + return n; + } + } + } + el = el.nodeType == ATTRIBUTE_NODE ? el.ownerDocument : el.parentNode; + } + return null; + }, + // Introduced in DOM Level 3: + lookupNamespaceURI: function(prefix) { + var el = this; + while (el) { + var map = el._nsMap; + if (map) { + if (Object.prototype.hasOwnProperty.call(map, prefix)) { + return map[prefix]; + } + } + el = el.nodeType == ATTRIBUTE_NODE ? el.ownerDocument : el.parentNode; + } + return null; + }, + // Introduced in DOM Level 3: + isDefaultNamespace: function(namespaceURI) { + var prefix = this.lookupPrefix(namespaceURI); + return prefix == null; + } + }; + function _xmlEncoder(c) { + return c == "<" && "<" || c == ">" && ">" || c == "&" && "&" || c == '"' && """ || "&#" + c.charCodeAt() + ";"; + } + copy(NodeType, Node); + copy(NodeType, Node.prototype); + function _visitNode(node, callback) { + if (callback(node)) { + return true; + } + if (node = node.firstChild) { + do { + if (_visitNode(node, callback)) { + return true; + } + } while (node = node.nextSibling); + } + } + function Document() { + this.ownerDocument = this; + } + function _onAddAttribute(doc, el, newAttr) { + doc && doc._inc++; + var ns = newAttr.namespaceURI; + if (ns === NAMESPACE.XMLNS) { + el._nsMap[newAttr.prefix ? newAttr.localName : ""] = newAttr.value; + } + } + function _onRemoveAttribute(doc, el, newAttr, remove) { + doc && doc._inc++; + var ns = newAttr.namespaceURI; + if (ns === NAMESPACE.XMLNS) { + delete el._nsMap[newAttr.prefix ? newAttr.localName : ""]; + } + } + function _onUpdateChild(doc, el, newChild) { + if (doc && doc._inc) { + doc._inc++; + var cs = el.childNodes; + if (newChild) { + cs[cs.length++] = newChild; + } else { + var child = el.firstChild; + var i = 0; + while (child) { + cs[i++] = child; + child = child.nextSibling; + } + cs.length = i; + delete cs[cs.length]; + } + } + } + function _removeChild(parentNode, child) { + var previous = child.previousSibling; + var next = child.nextSibling; + if (previous) { + previous.nextSibling = next; + } else { + parentNode.firstChild = next; + } + if (next) { + next.previousSibling = previous; + } else { + parentNode.lastChild = previous; + } + child.parentNode = null; + child.previousSibling = null; + child.nextSibling = null; + _onUpdateChild(parentNode.ownerDocument, parentNode); + return child; + } + function hasValidParentNodeType(node) { + return node && (node.nodeType === Node.DOCUMENT_NODE || node.nodeType === Node.DOCUMENT_FRAGMENT_NODE || node.nodeType === Node.ELEMENT_NODE); + } + function hasInsertableNodeType(node) { + return node && (isElementNode(node) || isTextNode(node) || isDocTypeNode(node) || node.nodeType === Node.DOCUMENT_FRAGMENT_NODE || node.nodeType === Node.COMMENT_NODE || node.nodeType === Node.PROCESSING_INSTRUCTION_NODE); + } + function isDocTypeNode(node) { + return node && node.nodeType === Node.DOCUMENT_TYPE_NODE; + } + function isElementNode(node) { + return node && node.nodeType === Node.ELEMENT_NODE; + } + function isTextNode(node) { + return node && node.nodeType === Node.TEXT_NODE; + } + function isElementInsertionPossible(doc, child) { + var parentChildNodes = doc.childNodes || []; + if (find(parentChildNodes, isElementNode) || isDocTypeNode(child)) { + return false; + } + var docTypeNode = find(parentChildNodes, isDocTypeNode); + return !(child && docTypeNode && parentChildNodes.indexOf(docTypeNode) > parentChildNodes.indexOf(child)); + } + function isElementReplacementPossible(doc, child) { + var parentChildNodes = doc.childNodes || []; + function hasElementChildThatIsNotChild(node) { + return isElementNode(node) && node !== child; + } + if (find(parentChildNodes, hasElementChildThatIsNotChild)) { + return false; + } + var docTypeNode = find(parentChildNodes, isDocTypeNode); + return !(child && docTypeNode && parentChildNodes.indexOf(docTypeNode) > parentChildNodes.indexOf(child)); + } + function assertPreInsertionValidity1to5(parent, node, child) { + if (!hasValidParentNodeType(parent)) { + throw new DOMException(HIERARCHY_REQUEST_ERR, "Unexpected parent node type " + parent.nodeType); + } + if (child && child.parentNode !== parent) { + throw new DOMException(NOT_FOUND_ERR, "child not in parent"); + } + if ( + // 4. If `node` is not a DocumentFragment, DocumentType, Element, or CharacterData node, then throw a "HierarchyRequestError" DOMException. + !hasInsertableNodeType(node) || // 5. If either `node` is a Text node and `parent` is a document, + // the sax parser currently adds top level text nodes, this will be fixed in 0.9.0 + // || (node.nodeType === Node.TEXT_NODE && parent.nodeType === Node.DOCUMENT_NODE) + // or `node` is a doctype and `parent` is not a document, then throw a "HierarchyRequestError" DOMException. + isDocTypeNode(node) && parent.nodeType !== Node.DOCUMENT_NODE + ) { + throw new DOMException( + HIERARCHY_REQUEST_ERR, + "Unexpected node type " + node.nodeType + " for parent node type " + parent.nodeType + ); + } + } + function assertPreInsertionValidityInDocument(parent, node, child) { + var parentChildNodes = parent.childNodes || []; + var nodeChildNodes = node.childNodes || []; + if (node.nodeType === Node.DOCUMENT_FRAGMENT_NODE) { + var nodeChildElements = nodeChildNodes.filter(isElementNode); + if (nodeChildElements.length > 1 || find(nodeChildNodes, isTextNode)) { + throw new DOMException(HIERARCHY_REQUEST_ERR, "More than one element or text in fragment"); + } + if (nodeChildElements.length === 1 && !isElementInsertionPossible(parent, child)) { + throw new DOMException(HIERARCHY_REQUEST_ERR, "Element in fragment can not be inserted before doctype"); + } + } + if (isElementNode(node)) { + if (!isElementInsertionPossible(parent, child)) { + throw new DOMException(HIERARCHY_REQUEST_ERR, "Only one element can be added and only after doctype"); + } + } + if (isDocTypeNode(node)) { + if (find(parentChildNodes, isDocTypeNode)) { + throw new DOMException(HIERARCHY_REQUEST_ERR, "Only one doctype is allowed"); + } + var parentElementChild = find(parentChildNodes, isElementNode); + if (child && parentChildNodes.indexOf(parentElementChild) < parentChildNodes.indexOf(child)) { + throw new DOMException(HIERARCHY_REQUEST_ERR, "Doctype can only be inserted before an element"); + } + if (!child && parentElementChild) { + throw new DOMException(HIERARCHY_REQUEST_ERR, "Doctype can not be appended since element is present"); + } + } + } + function assertPreReplacementValidityInDocument(parent, node, child) { + var parentChildNodes = parent.childNodes || []; + var nodeChildNodes = node.childNodes || []; + if (node.nodeType === Node.DOCUMENT_FRAGMENT_NODE) { + var nodeChildElements = nodeChildNodes.filter(isElementNode); + if (nodeChildElements.length > 1 || find(nodeChildNodes, isTextNode)) { + throw new DOMException(HIERARCHY_REQUEST_ERR, "More than one element or text in fragment"); + } + if (nodeChildElements.length === 1 && !isElementReplacementPossible(parent, child)) { + throw new DOMException(HIERARCHY_REQUEST_ERR, "Element in fragment can not be inserted before doctype"); + } + } + if (isElementNode(node)) { + if (!isElementReplacementPossible(parent, child)) { + throw new DOMException(HIERARCHY_REQUEST_ERR, "Only one element can be added and only after doctype"); + } + } + if (isDocTypeNode(node)) { + let hasDoctypeChildThatIsNotChild2 = function(node2) { + return isDocTypeNode(node2) && node2 !== child; + }; + var hasDoctypeChildThatIsNotChild = hasDoctypeChildThatIsNotChild2; + if (find(parentChildNodes, hasDoctypeChildThatIsNotChild2)) { + throw new DOMException(HIERARCHY_REQUEST_ERR, "Only one doctype is allowed"); + } + var parentElementChild = find(parentChildNodes, isElementNode); + if (child && parentChildNodes.indexOf(parentElementChild) < parentChildNodes.indexOf(child)) { + throw new DOMException(HIERARCHY_REQUEST_ERR, "Doctype can only be inserted before an element"); + } + } + } + function _insertBefore(parent, node, child, _inDocumentAssertion) { + assertPreInsertionValidity1to5(parent, node, child); + if (parent.nodeType === Node.DOCUMENT_NODE) { + (_inDocumentAssertion || assertPreInsertionValidityInDocument)(parent, node, child); + } + var cp = node.parentNode; + if (cp) { + cp.removeChild(node); + } + if (node.nodeType === DOCUMENT_FRAGMENT_NODE) { + var newFirst = node.firstChild; + if (newFirst == null) { + return node; + } + var newLast = node.lastChild; + } else { + newFirst = newLast = node; + } + var pre = child ? child.previousSibling : parent.lastChild; + newFirst.previousSibling = pre; + newLast.nextSibling = child; + if (pre) { + pre.nextSibling = newFirst; + } else { + parent.firstChild = newFirst; + } + if (child == null) { + parent.lastChild = newLast; + } else { + child.previousSibling = newLast; + } + do { + newFirst.parentNode = parent; + } while (newFirst !== newLast && (newFirst = newFirst.nextSibling)); + _onUpdateChild(parent.ownerDocument || parent, parent); + if (node.nodeType == DOCUMENT_FRAGMENT_NODE) { + node.firstChild = node.lastChild = null; + } + return node; + } + function _appendSingleChild(parentNode, newChild) { + if (newChild.parentNode) { + newChild.parentNode.removeChild(newChild); + } + newChild.parentNode = parentNode; + newChild.previousSibling = parentNode.lastChild; + newChild.nextSibling = null; + if (newChild.previousSibling) { + newChild.previousSibling.nextSibling = newChild; + } else { + parentNode.firstChild = newChild; + } + parentNode.lastChild = newChild; + _onUpdateChild(parentNode.ownerDocument, parentNode, newChild); + return newChild; + } + Document.prototype = { + //implementation : null, + nodeName: "#document", + nodeType: DOCUMENT_NODE, + /** + * The DocumentType node of the document. + * + * @readonly + * @type DocumentType + */ + doctype: null, + documentElement: null, + _inc: 1, + insertBefore: function(newChild, refChild) { + if (newChild.nodeType == DOCUMENT_FRAGMENT_NODE) { + var child = newChild.firstChild; + while (child) { + var next = child.nextSibling; + this.insertBefore(child, refChild); + child = next; + } + return newChild; + } + _insertBefore(this, newChild, refChild); + newChild.ownerDocument = this; + if (this.documentElement === null && newChild.nodeType === ELEMENT_NODE) { + this.documentElement = newChild; + } + return newChild; + }, + removeChild: function(oldChild) { + if (this.documentElement == oldChild) { + this.documentElement = null; + } + return _removeChild(this, oldChild); + }, + replaceChild: function(newChild, oldChild) { + _insertBefore(this, newChild, oldChild, assertPreReplacementValidityInDocument); + newChild.ownerDocument = this; + if (oldChild) { + this.removeChild(oldChild); + } + if (isElementNode(newChild)) { + this.documentElement = newChild; + } + }, + // Introduced in DOM Level 2: + importNode: function(importedNode, deep) { + return importNode(this, importedNode, deep); + }, + // Introduced in DOM Level 2: + getElementById: function(id) { + var rtv = null; + _visitNode(this.documentElement, function(node) { + if (node.nodeType == ELEMENT_NODE) { + if (node.getAttribute("id") == id) { + rtv = node; + return true; + } + } + }); + return rtv; + }, + /** + * The `getElementsByClassName` method of `Document` interface returns an array-like object + * of all child elements which have **all** of the given class name(s). + * + * Returns an empty list if `classeNames` is an empty string or only contains HTML white space characters. + * + * + * Warning: This is a live LiveNodeList. + * Changes in the DOM will reflect in the array as the changes occur. + * If an element selected by this array no longer qualifies for the selector, + * it will automatically be removed. Be aware of this for iteration purposes. + * + * @param {string} classNames is a string representing the class name(s) to match; multiple class names are separated by (ASCII-)whitespace + * + * @see https://developer.mozilla.org/en-US/docs/Web/API/Document/getElementsByClassName + * @see https://dom.spec.whatwg.org/#concept-getelementsbyclassname + */ + getElementsByClassName: function(classNames) { + var classNamesSet = toOrderedSet(classNames); + return new LiveNodeList(this, function(base) { + var ls = []; + if (classNamesSet.length > 0) { + _visitNode(base.documentElement, function(node) { + if (node !== base && node.nodeType === ELEMENT_NODE) { + var nodeClassNames = node.getAttribute("class"); + if (nodeClassNames) { + var matches = classNames === nodeClassNames; + if (!matches) { + var nodeClassNamesSet = toOrderedSet(nodeClassNames); + matches = classNamesSet.every(arrayIncludes(nodeClassNamesSet)); + } + if (matches) { + ls.push(node); + } + } + } + }); + } + return ls; + }); + }, + //document factory method: + createElement: function(tagName) { + var node = new Element(); + node.ownerDocument = this; + node.nodeName = tagName; + node.tagName = tagName; + node.localName = tagName; + node.childNodes = new NodeList(); + var attrs = node.attributes = new NamedNodeMap(); + attrs._ownerElement = node; + return node; + }, + createDocumentFragment: function() { + var node = new DocumentFragment(); + node.ownerDocument = this; + node.childNodes = new NodeList(); + return node; + }, + createTextNode: function(data) { + var node = new Text(); + node.ownerDocument = this; + node.appendData(data); + return node; + }, + createComment: function(data) { + var node = new Comment(); + node.ownerDocument = this; + node.appendData(data); + return node; + }, + createCDATASection: function(data) { + var node = new CDATASection(); + node.ownerDocument = this; + node.appendData(data); + return node; + }, + createProcessingInstruction: function(target, data) { + var node = new ProcessingInstruction(); + node.ownerDocument = this; + node.tagName = node.nodeName = node.target = target; + node.nodeValue = node.data = data; + return node; + }, + createAttribute: function(name2) { + var node = new Attr(); + node.ownerDocument = this; + node.name = name2; + node.nodeName = name2; + node.localName = name2; + node.specified = true; + return node; + }, + createEntityReference: function(name2) { + var node = new EntityReference(); + node.ownerDocument = this; + node.nodeName = name2; + return node; + }, + // Introduced in DOM Level 2: + createElementNS: function(namespaceURI, qualifiedName) { + var node = new Element(); + var pl = qualifiedName.split(":"); + var attrs = node.attributes = new NamedNodeMap(); + node.childNodes = new NodeList(); + node.ownerDocument = this; + node.nodeName = qualifiedName; + node.tagName = qualifiedName; + node.namespaceURI = namespaceURI; + if (pl.length == 2) { + node.prefix = pl[0]; + node.localName = pl[1]; + } else { + node.localName = qualifiedName; + } + attrs._ownerElement = node; + return node; + }, + // Introduced in DOM Level 2: + createAttributeNS: function(namespaceURI, qualifiedName) { + var node = new Attr(); + var pl = qualifiedName.split(":"); + node.ownerDocument = this; + node.nodeName = qualifiedName; + node.name = qualifiedName; + node.namespaceURI = namespaceURI; + node.specified = true; + if (pl.length == 2) { + node.prefix = pl[0]; + node.localName = pl[1]; + } else { + node.localName = qualifiedName; + } + return node; + } + }; + _extends(Document, Node); + function Element() { + this._nsMap = {}; + } + Element.prototype = { + nodeType: ELEMENT_NODE, + hasAttribute: function(name2) { + return this.getAttributeNode(name2) != null; + }, + getAttribute: function(name2) { + var attr = this.getAttributeNode(name2); + return attr && attr.value || ""; + }, + getAttributeNode: function(name2) { + return this.attributes.getNamedItem(name2); + }, + setAttribute: function(name2, value) { + var attr = this.ownerDocument.createAttribute(name2); + attr.value = attr.nodeValue = "" + value; + this.setAttributeNode(attr); + }, + removeAttribute: function(name2) { + var attr = this.getAttributeNode(name2); + attr && this.removeAttributeNode(attr); + }, + //four real opeartion method + appendChild: function(newChild) { + if (newChild.nodeType === DOCUMENT_FRAGMENT_NODE) { + return this.insertBefore(newChild, null); + } else { + return _appendSingleChild(this, newChild); + } + }, + setAttributeNode: function(newAttr) { + return this.attributes.setNamedItem(newAttr); + }, + setAttributeNodeNS: function(newAttr) { + return this.attributes.setNamedItemNS(newAttr); + }, + removeAttributeNode: function(oldAttr) { + return this.attributes.removeNamedItem(oldAttr.nodeName); + }, + //get real attribute name,and remove it by removeAttributeNode + removeAttributeNS: function(namespaceURI, localName) { + var old = this.getAttributeNodeNS(namespaceURI, localName); + old && this.removeAttributeNode(old); + }, + hasAttributeNS: function(namespaceURI, localName) { + return this.getAttributeNodeNS(namespaceURI, localName) != null; + }, + getAttributeNS: function(namespaceURI, localName) { + var attr = this.getAttributeNodeNS(namespaceURI, localName); + return attr && attr.value || ""; + }, + setAttributeNS: function(namespaceURI, qualifiedName, value) { + var attr = this.ownerDocument.createAttributeNS(namespaceURI, qualifiedName); + attr.value = attr.nodeValue = "" + value; + this.setAttributeNode(attr); + }, + getAttributeNodeNS: function(namespaceURI, localName) { + return this.attributes.getNamedItemNS(namespaceURI, localName); + }, + getElementsByTagName: function(tagName) { + return new LiveNodeList(this, function(base) { + var ls = []; + _visitNode(base, function(node) { + if (node !== base && node.nodeType == ELEMENT_NODE && (tagName === "*" || node.tagName == tagName)) { + ls.push(node); + } + }); + return ls; + }); + }, + getElementsByTagNameNS: function(namespaceURI, localName) { + return new LiveNodeList(this, function(base) { + var ls = []; + _visitNode(base, function(node) { + if (node !== base && node.nodeType === ELEMENT_NODE && (namespaceURI === "*" || node.namespaceURI === namespaceURI) && (localName === "*" || node.localName == localName)) { + ls.push(node); + } + }); + return ls; + }); + } + }; + Document.prototype.getElementsByTagName = Element.prototype.getElementsByTagName; + Document.prototype.getElementsByTagNameNS = Element.prototype.getElementsByTagNameNS; + _extends(Element, Node); + function Attr() { + } + Attr.prototype.nodeType = ATTRIBUTE_NODE; + _extends(Attr, Node); + function CharacterData() { + } + CharacterData.prototype = { + data: "", + substringData: function(offset, count) { + return this.data.substring(offset, offset + count); + }, + appendData: function(text) { + text = this.data + text; + this.nodeValue = this.data = text; + this.length = text.length; + }, + insertData: function(offset, text) { + this.replaceData(offset, 0, text); + }, + appendChild: function(newChild) { + throw new Error(ExceptionMessage[HIERARCHY_REQUEST_ERR]); + }, + deleteData: function(offset, count) { + this.replaceData(offset, count, ""); + }, + replaceData: function(offset, count, text) { + var start = this.data.substring(0, offset); + var end = this.data.substring(offset + count); + text = start + text + end; + this.nodeValue = this.data = text; + this.length = text.length; + } + }; + _extends(CharacterData, Node); + function Text() { + } + Text.prototype = { + nodeName: "#text", + nodeType: TEXT_NODE, + splitText: function(offset) { + var text = this.data; + var newText = text.substring(offset); + text = text.substring(0, offset); + this.data = this.nodeValue = text; + this.length = text.length; + var newNode = this.ownerDocument.createTextNode(newText); + if (this.parentNode) { + this.parentNode.insertBefore(newNode, this.nextSibling); + } + return newNode; + } + }; + _extends(Text, CharacterData); + function Comment() { + } + Comment.prototype = { + nodeName: "#comment", + nodeType: COMMENT_NODE + }; + _extends(Comment, CharacterData); + function CDATASection() { + } + CDATASection.prototype = { + nodeName: "#cdata-section", + nodeType: CDATA_SECTION_NODE + }; + _extends(CDATASection, CharacterData); + function DocumentType() { + } + DocumentType.prototype.nodeType = DOCUMENT_TYPE_NODE; + _extends(DocumentType, Node); + function Notation() { + } + Notation.prototype.nodeType = NOTATION_NODE; + _extends(Notation, Node); + function Entity() { + } + Entity.prototype.nodeType = ENTITY_NODE; + _extends(Entity, Node); + function EntityReference() { + } + EntityReference.prototype.nodeType = ENTITY_REFERENCE_NODE; + _extends(EntityReference, Node); + function DocumentFragment() { + } + DocumentFragment.prototype.nodeName = "#document-fragment"; + DocumentFragment.prototype.nodeType = DOCUMENT_FRAGMENT_NODE; + _extends(DocumentFragment, Node); + function ProcessingInstruction() { + } + ProcessingInstruction.prototype.nodeType = PROCESSING_INSTRUCTION_NODE; + _extends(ProcessingInstruction, Node); + function XMLSerializer() { + } + XMLSerializer.prototype.serializeToString = function(node, isHtml, nodeFilter) { + return nodeSerializeToString.call(node, isHtml, nodeFilter); + }; + Node.prototype.toString = nodeSerializeToString; + function nodeSerializeToString(isHtml, nodeFilter) { + var buf = []; + var refNode = this.nodeType == 9 && this.documentElement || this; + var prefix = refNode.prefix; + var uri = refNode.namespaceURI; + if (uri && prefix == null) { + var prefix = refNode.lookupPrefix(uri); + if (prefix == null) { + var visibleNamespaces = [ + { namespace: uri, prefix: null } + //{namespace:uri,prefix:''} + ]; + } + } + serializeToString(this, buf, isHtml, nodeFilter, visibleNamespaces); + return buf.join(""); + } + function needNamespaceDefine(node, isHTML, visibleNamespaces) { + var prefix = node.prefix || ""; + var uri = node.namespaceURI; + if (!uri) { + return false; + } + if (prefix === "xml" && uri === NAMESPACE.XML || uri === NAMESPACE.XMLNS) { + return false; + } + var i = visibleNamespaces.length; + while (i--) { + var ns = visibleNamespaces[i]; + if (ns.prefix === prefix) { + return ns.namespace !== uri; + } + } + return true; + } + function addSerializedAttribute(buf, qualifiedName, value) { + buf.push(" ", qualifiedName, '="', value.replace(/[<>&"\t\n\r]/g, _xmlEncoder), '"'); + } + function serializeToString(node, buf, isHTML, nodeFilter, visibleNamespaces) { + if (!visibleNamespaces) { + visibleNamespaces = []; + } + if (nodeFilter) { + node = nodeFilter(node); + if (node) { + if (typeof node == "string") { + buf.push(node); + return; + } + } else { + return; + } + } + switch (node.nodeType) { + case ELEMENT_NODE: + var attrs = node.attributes; + var len = attrs.length; + var child = node.firstChild; + var nodeName = node.tagName; + isHTML = NAMESPACE.isHTML(node.namespaceURI) || isHTML; + var prefixedNodeName = nodeName; + if (!isHTML && !node.prefix && node.namespaceURI) { + var defaultNS; + for (var ai = 0; ai < attrs.length; ai++) { + if (attrs.item(ai).name === "xmlns") { + defaultNS = attrs.item(ai).value; + break; + } + } + if (!defaultNS) { + for (var nsi = visibleNamespaces.length - 1; nsi >= 0; nsi--) { + var namespace = visibleNamespaces[nsi]; + if (namespace.prefix === "" && namespace.namespace === node.namespaceURI) { + defaultNS = namespace.namespace; + break; + } + } + } + if (defaultNS !== node.namespaceURI) { + for (var nsi = visibleNamespaces.length - 1; nsi >= 0; nsi--) { + var namespace = visibleNamespaces[nsi]; + if (namespace.namespace === node.namespaceURI) { + if (namespace.prefix) { + prefixedNodeName = namespace.prefix + ":" + nodeName; + } + break; + } + } + } + } + buf.push("<", prefixedNodeName); + for (var i = 0; i < len; i++) { + var attr = attrs.item(i); + if (attr.prefix == "xmlns") { + visibleNamespaces.push({ prefix: attr.localName, namespace: attr.value }); + } else if (attr.nodeName == "xmlns") { + visibleNamespaces.push({ prefix: "", namespace: attr.value }); + } + } + for (var i = 0; i < len; i++) { + var attr = attrs.item(i); + if (needNamespaceDefine(attr, isHTML, visibleNamespaces)) { + var prefix = attr.prefix || ""; + var uri = attr.namespaceURI; + addSerializedAttribute(buf, prefix ? "xmlns:" + prefix : "xmlns", uri); + visibleNamespaces.push({ prefix, namespace: uri }); + } + serializeToString(attr, buf, isHTML, nodeFilter, visibleNamespaces); + } + if (nodeName === prefixedNodeName && needNamespaceDefine(node, isHTML, visibleNamespaces)) { + var prefix = node.prefix || ""; + var uri = node.namespaceURI; + addSerializedAttribute(buf, prefix ? "xmlns:" + prefix : "xmlns", uri); + visibleNamespaces.push({ prefix, namespace: uri }); + } + if (child || isHTML && !/^(?:meta|link|img|br|hr|input)$/i.test(nodeName)) { + buf.push(">"); + if (isHTML && /^script$/i.test(nodeName)) { + while (child) { + if (child.data) { + buf.push(child.data); + } else { + serializeToString(child, buf, isHTML, nodeFilter, visibleNamespaces.slice()); + } + child = child.nextSibling; + } + } else { + while (child) { + serializeToString(child, buf, isHTML, nodeFilter, visibleNamespaces.slice()); + child = child.nextSibling; + } + } + buf.push(""); + } else { + buf.push("/>"); + } + return; + case DOCUMENT_NODE: + case DOCUMENT_FRAGMENT_NODE: + var child = node.firstChild; + while (child) { + serializeToString(child, buf, isHTML, nodeFilter, visibleNamespaces.slice()); + child = child.nextSibling; + } + return; + case ATTRIBUTE_NODE: + return addSerializedAttribute(buf, node.name, node.value); + case TEXT_NODE: + return buf.push( + node.data.replace(/[<&>]/g, _xmlEncoder) + ); + case CDATA_SECTION_NODE: + return buf.push(""); + case COMMENT_NODE: + return buf.push(""); + case DOCUMENT_TYPE_NODE: + var pubid = node.publicId; + var sysid = node.systemId; + buf.push(""); + } else if (sysid && sysid != ".") { + buf.push(" SYSTEM ", sysid, ">"); + } else { + var sub = node.internalSubset; + if (sub) { + buf.push(" [", sub, "]"); + } + buf.push(">"); + } + return; + case PROCESSING_INSTRUCTION_NODE: + return buf.push(""); + case ENTITY_REFERENCE_NODE: + return buf.push("&", node.nodeName, ";"); + default: + buf.push("??", node.nodeName); + } + } + function importNode(doc, node, deep) { + var node2; + switch (node.nodeType) { + case ELEMENT_NODE: + node2 = node.cloneNode(false); + node2.ownerDocument = doc; + case DOCUMENT_FRAGMENT_NODE: + break; + case ATTRIBUTE_NODE: + deep = true; + break; + } + if (!node2) { + node2 = node.cloneNode(false); + } + node2.ownerDocument = doc; + node2.parentNode = null; + if (deep) { + var child = node.firstChild; + while (child) { + node2.appendChild(importNode(doc, child, deep)); + child = child.nextSibling; + } + } + return node2; + } + function cloneNode(doc, node, deep) { + var node2 = new node.constructor(); + for (var n in node) { + if (Object.prototype.hasOwnProperty.call(node, n)) { + var v = node[n]; + if (typeof v != "object") { + if (v != node2[n]) { + node2[n] = v; + } + } + } + } + if (node.childNodes) { + node2.childNodes = new NodeList(); + } + node2.ownerDocument = doc; + switch (node2.nodeType) { + case ELEMENT_NODE: + var attrs = node.attributes; + var attrs2 = node2.attributes = new NamedNodeMap(); + var len = attrs.length; + attrs2._ownerElement = node2; + for (var i = 0; i < len; i++) { + node2.setAttributeNode(cloneNode(doc, attrs.item(i), true)); + } + break; + ; + case ATTRIBUTE_NODE: + deep = true; + } + if (deep) { + var child = node.firstChild; + while (child) { + node2.appendChild(cloneNode(doc, child, deep)); + child = child.nextSibling; + } + } + return node2; + } + function __set__(object, key, value) { + object[key] = value; + } + try { + if (Object.defineProperty) { + let getTextContent2 = function(node) { + switch (node.nodeType) { + case ELEMENT_NODE: + case DOCUMENT_FRAGMENT_NODE: + var buf = []; + node = node.firstChild; + while (node) { + if (node.nodeType !== 7 && node.nodeType !== 8) { + buf.push(getTextContent2(node)); + } + node = node.nextSibling; + } + return buf.join(""); + default: + return node.nodeValue; + } + }; + getTextContent = getTextContent2; + Object.defineProperty(LiveNodeList.prototype, "length", { + get: function() { + _updateLiveList(this); + return this.$$length; + } + }); + Object.defineProperty(Node.prototype, "textContent", { + get: function() { + return getTextContent2(this); + }, + set: function(data) { + switch (this.nodeType) { + case ELEMENT_NODE: + case DOCUMENT_FRAGMENT_NODE: + while (this.firstChild) { + this.removeChild(this.firstChild); + } + if (data || String(data)) { + this.appendChild(this.ownerDocument.createTextNode(data)); + } + break; + default: + this.data = data; + this.value = data; + this.nodeValue = data; + } + } + }); + __set__ = function(object, key, value) { + object["$$" + key] = value; + }; + } + } catch (e) { + } + var getTextContent; + exports2.DocumentType = DocumentType; + exports2.DOMException = DOMException; + exports2.DOMImplementation = DOMImplementation; + exports2.Element = Element; + exports2.Node = Node; + exports2.NodeList = NodeList; + exports2.XMLSerializer = XMLSerializer; + } +}); + +// ../../node_modules/@xmldom/xmldom/lib/entities.js +var require_entities = __commonJS({ + "../../node_modules/@xmldom/xmldom/lib/entities.js"(exports2) { + "use strict"; + var freeze = require_conventions().freeze; + exports2.XML_ENTITIES = freeze({ + amp: "&", + apos: "'", + gt: ">", + lt: "<", + quot: '"' + }); + exports2.HTML_ENTITIES = freeze({ + Aacute: "\xC1", + aacute: "\xE1", + Abreve: "\u0102", + abreve: "\u0103", + ac: "\u223E", + acd: "\u223F", + acE: "\u223E\u0333", + Acirc: "\xC2", + acirc: "\xE2", + acute: "\xB4", + Acy: "\u0410", + acy: "\u0430", + AElig: "\xC6", + aelig: "\xE6", + af: "\u2061", + Afr: "\u{1D504}", + afr: "\u{1D51E}", + Agrave: "\xC0", + agrave: "\xE0", + alefsym: "\u2135", + aleph: "\u2135", + Alpha: "\u0391", + alpha: "\u03B1", + Amacr: "\u0100", + amacr: "\u0101", + amalg: "\u2A3F", + AMP: "&", + amp: "&", + And: "\u2A53", + and: "\u2227", + andand: "\u2A55", + andd: "\u2A5C", + andslope: "\u2A58", + andv: "\u2A5A", + ang: "\u2220", + ange: "\u29A4", + angle: "\u2220", + angmsd: "\u2221", + angmsdaa: "\u29A8", + angmsdab: "\u29A9", + angmsdac: "\u29AA", + angmsdad: "\u29AB", + angmsdae: "\u29AC", + angmsdaf: "\u29AD", + angmsdag: "\u29AE", + angmsdah: "\u29AF", + angrt: "\u221F", + angrtvb: "\u22BE", + angrtvbd: "\u299D", + angsph: "\u2222", + angst: "\xC5", + angzarr: "\u237C", + Aogon: "\u0104", + aogon: "\u0105", + Aopf: "\u{1D538}", + aopf: "\u{1D552}", + ap: "\u2248", + apacir: "\u2A6F", + apE: "\u2A70", + ape: "\u224A", + apid: "\u224B", + apos: "'", + ApplyFunction: "\u2061", + approx: "\u2248", + approxeq: "\u224A", + Aring: "\xC5", + aring: "\xE5", + Ascr: "\u{1D49C}", + ascr: "\u{1D4B6}", + Assign: "\u2254", + ast: "*", + asymp: "\u2248", + asympeq: "\u224D", + Atilde: "\xC3", + atilde: "\xE3", + Auml: "\xC4", + auml: "\xE4", + awconint: "\u2233", + awint: "\u2A11", + backcong: "\u224C", + backepsilon: "\u03F6", + backprime: "\u2035", + backsim: "\u223D", + backsimeq: "\u22CD", + Backslash: "\u2216", + Barv: "\u2AE7", + barvee: "\u22BD", + Barwed: "\u2306", + barwed: "\u2305", + barwedge: "\u2305", + bbrk: "\u23B5", + bbrktbrk: "\u23B6", + bcong: "\u224C", + Bcy: "\u0411", + bcy: "\u0431", + bdquo: "\u201E", + becaus: "\u2235", + Because: "\u2235", + because: "\u2235", + bemptyv: "\u29B0", + bepsi: "\u03F6", + bernou: "\u212C", + Bernoullis: "\u212C", + Beta: "\u0392", + beta: "\u03B2", + beth: "\u2136", + between: "\u226C", + Bfr: "\u{1D505}", + bfr: "\u{1D51F}", + bigcap: "\u22C2", + bigcirc: "\u25EF", + bigcup: "\u22C3", + bigodot: "\u2A00", + bigoplus: "\u2A01", + bigotimes: "\u2A02", + bigsqcup: "\u2A06", + bigstar: "\u2605", + bigtriangledown: "\u25BD", + bigtriangleup: "\u25B3", + biguplus: "\u2A04", + bigvee: "\u22C1", + bigwedge: "\u22C0", + bkarow: "\u290D", + blacklozenge: "\u29EB", + blacksquare: "\u25AA", + blacktriangle: "\u25B4", + blacktriangledown: "\u25BE", + blacktriangleleft: "\u25C2", + blacktriangleright: "\u25B8", + blank: "\u2423", + blk12: "\u2592", + blk14: "\u2591", + blk34: "\u2593", + block: "\u2588", + bne: "=\u20E5", + bnequiv: "\u2261\u20E5", + bNot: "\u2AED", + bnot: "\u2310", + Bopf: "\u{1D539}", + bopf: "\u{1D553}", + bot: "\u22A5", + bottom: "\u22A5", + bowtie: "\u22C8", + boxbox: "\u29C9", + boxDL: "\u2557", + boxDl: "\u2556", + boxdL: "\u2555", + boxdl: "\u2510", + boxDR: "\u2554", + boxDr: "\u2553", + boxdR: "\u2552", + boxdr: "\u250C", + boxH: "\u2550", + boxh: "\u2500", + boxHD: "\u2566", + boxHd: "\u2564", + boxhD: "\u2565", + boxhd: "\u252C", + boxHU: "\u2569", + boxHu: "\u2567", + boxhU: "\u2568", + boxhu: "\u2534", + boxminus: "\u229F", + boxplus: "\u229E", + boxtimes: "\u22A0", + boxUL: "\u255D", + boxUl: "\u255C", + boxuL: "\u255B", + boxul: "\u2518", + boxUR: "\u255A", + boxUr: "\u2559", + boxuR: "\u2558", + boxur: "\u2514", + boxV: "\u2551", + boxv: "\u2502", + boxVH: "\u256C", + boxVh: "\u256B", + boxvH: "\u256A", + boxvh: "\u253C", + boxVL: "\u2563", + boxVl: "\u2562", + boxvL: "\u2561", + boxvl: "\u2524", + boxVR: "\u2560", + boxVr: "\u255F", + boxvR: "\u255E", + boxvr: "\u251C", + bprime: "\u2035", + Breve: "\u02D8", + breve: "\u02D8", + brvbar: "\xA6", + Bscr: "\u212C", + bscr: "\u{1D4B7}", + bsemi: "\u204F", + bsim: "\u223D", + bsime: "\u22CD", + bsol: "\\", + bsolb: "\u29C5", + bsolhsub: "\u27C8", + bull: "\u2022", + bullet: "\u2022", + bump: "\u224E", + bumpE: "\u2AAE", + bumpe: "\u224F", + Bumpeq: "\u224E", + bumpeq: "\u224F", + Cacute: "\u0106", + cacute: "\u0107", + Cap: "\u22D2", + cap: "\u2229", + capand: "\u2A44", + capbrcup: "\u2A49", + capcap: "\u2A4B", + capcup: "\u2A47", + capdot: "\u2A40", + CapitalDifferentialD: "\u2145", + caps: "\u2229\uFE00", + caret: "\u2041", + caron: "\u02C7", + Cayleys: "\u212D", + ccaps: "\u2A4D", + Ccaron: "\u010C", + ccaron: "\u010D", + Ccedil: "\xC7", + ccedil: "\xE7", + Ccirc: "\u0108", + ccirc: "\u0109", + Cconint: "\u2230", + ccups: "\u2A4C", + ccupssm: "\u2A50", + Cdot: "\u010A", + cdot: "\u010B", + cedil: "\xB8", + Cedilla: "\xB8", + cemptyv: "\u29B2", + cent: "\xA2", + CenterDot: "\xB7", + centerdot: "\xB7", + Cfr: "\u212D", + cfr: "\u{1D520}", + CHcy: "\u0427", + chcy: "\u0447", + check: "\u2713", + checkmark: "\u2713", + Chi: "\u03A7", + chi: "\u03C7", + cir: "\u25CB", + circ: "\u02C6", + circeq: "\u2257", + circlearrowleft: "\u21BA", + circlearrowright: "\u21BB", + circledast: "\u229B", + circledcirc: "\u229A", + circleddash: "\u229D", + CircleDot: "\u2299", + circledR: "\xAE", + circledS: "\u24C8", + CircleMinus: "\u2296", + CirclePlus: "\u2295", + CircleTimes: "\u2297", + cirE: "\u29C3", + cire: "\u2257", + cirfnint: "\u2A10", + cirmid: "\u2AEF", + cirscir: "\u29C2", + ClockwiseContourIntegral: "\u2232", + CloseCurlyDoubleQuote: "\u201D", + CloseCurlyQuote: "\u2019", + clubs: "\u2663", + clubsuit: "\u2663", + Colon: "\u2237", + colon: ":", + Colone: "\u2A74", + colone: "\u2254", + coloneq: "\u2254", + comma: ",", + commat: "@", + comp: "\u2201", + compfn: "\u2218", + complement: "\u2201", + complexes: "\u2102", + cong: "\u2245", + congdot: "\u2A6D", + Congruent: "\u2261", + Conint: "\u222F", + conint: "\u222E", + ContourIntegral: "\u222E", + Copf: "\u2102", + copf: "\u{1D554}", + coprod: "\u2210", + Coproduct: "\u2210", + COPY: "\xA9", + copy: "\xA9", + copysr: "\u2117", + CounterClockwiseContourIntegral: "\u2233", + crarr: "\u21B5", + Cross: "\u2A2F", + cross: "\u2717", + Cscr: "\u{1D49E}", + cscr: "\u{1D4B8}", + csub: "\u2ACF", + csube: "\u2AD1", + csup: "\u2AD0", + csupe: "\u2AD2", + ctdot: "\u22EF", + cudarrl: "\u2938", + cudarrr: "\u2935", + cuepr: "\u22DE", + cuesc: "\u22DF", + cularr: "\u21B6", + cularrp: "\u293D", + Cup: "\u22D3", + cup: "\u222A", + cupbrcap: "\u2A48", + CupCap: "\u224D", + cupcap: "\u2A46", + cupcup: "\u2A4A", + cupdot: "\u228D", + cupor: "\u2A45", + cups: "\u222A\uFE00", + curarr: "\u21B7", + curarrm: "\u293C", + curlyeqprec: "\u22DE", + curlyeqsucc: "\u22DF", + curlyvee: "\u22CE", + curlywedge: "\u22CF", + curren: "\xA4", + curvearrowleft: "\u21B6", + curvearrowright: "\u21B7", + cuvee: "\u22CE", + cuwed: "\u22CF", + cwconint: "\u2232", + cwint: "\u2231", + cylcty: "\u232D", + Dagger: "\u2021", + dagger: "\u2020", + daleth: "\u2138", + Darr: "\u21A1", + dArr: "\u21D3", + darr: "\u2193", + dash: "\u2010", + Dashv: "\u2AE4", + dashv: "\u22A3", + dbkarow: "\u290F", + dblac: "\u02DD", + Dcaron: "\u010E", + dcaron: "\u010F", + Dcy: "\u0414", + dcy: "\u0434", + DD: "\u2145", + dd: "\u2146", + ddagger: "\u2021", + ddarr: "\u21CA", + DDotrahd: "\u2911", + ddotseq: "\u2A77", + deg: "\xB0", + Del: "\u2207", + Delta: "\u0394", + delta: "\u03B4", + demptyv: "\u29B1", + dfisht: "\u297F", + Dfr: "\u{1D507}", + dfr: "\u{1D521}", + dHar: "\u2965", + dharl: "\u21C3", + dharr: "\u21C2", + DiacriticalAcute: "\xB4", + DiacriticalDot: "\u02D9", + DiacriticalDoubleAcute: "\u02DD", + DiacriticalGrave: "`", + DiacriticalTilde: "\u02DC", + diam: "\u22C4", + Diamond: "\u22C4", + diamond: "\u22C4", + diamondsuit: "\u2666", + diams: "\u2666", + die: "\xA8", + DifferentialD: "\u2146", + digamma: "\u03DD", + disin: "\u22F2", + div: "\xF7", + divide: "\xF7", + divideontimes: "\u22C7", + divonx: "\u22C7", + DJcy: "\u0402", + djcy: "\u0452", + dlcorn: "\u231E", + dlcrop: "\u230D", + dollar: "$", + Dopf: "\u{1D53B}", + dopf: "\u{1D555}", + Dot: "\xA8", + dot: "\u02D9", + DotDot: "\u20DC", + doteq: "\u2250", + doteqdot: "\u2251", + DotEqual: "\u2250", + dotminus: "\u2238", + dotplus: "\u2214", + dotsquare: "\u22A1", + doublebarwedge: "\u2306", + DoubleContourIntegral: "\u222F", + DoubleDot: "\xA8", + DoubleDownArrow: "\u21D3", + DoubleLeftArrow: "\u21D0", + DoubleLeftRightArrow: "\u21D4", + DoubleLeftTee: "\u2AE4", + DoubleLongLeftArrow: "\u27F8", + DoubleLongLeftRightArrow: "\u27FA", + DoubleLongRightArrow: "\u27F9", + DoubleRightArrow: "\u21D2", + DoubleRightTee: "\u22A8", + DoubleUpArrow: "\u21D1", + DoubleUpDownArrow: "\u21D5", + DoubleVerticalBar: "\u2225", + DownArrow: "\u2193", + Downarrow: "\u21D3", + downarrow: "\u2193", + DownArrowBar: "\u2913", + DownArrowUpArrow: "\u21F5", + DownBreve: "\u0311", + downdownarrows: "\u21CA", + downharpoonleft: "\u21C3", + downharpoonright: "\u21C2", + DownLeftRightVector: "\u2950", + DownLeftTeeVector: "\u295E", + DownLeftVector: "\u21BD", + DownLeftVectorBar: "\u2956", + DownRightTeeVector: "\u295F", + DownRightVector: "\u21C1", + DownRightVectorBar: "\u2957", + DownTee: "\u22A4", + DownTeeArrow: "\u21A7", + drbkarow: "\u2910", + drcorn: "\u231F", + drcrop: "\u230C", + Dscr: "\u{1D49F}", + dscr: "\u{1D4B9}", + DScy: "\u0405", + dscy: "\u0455", + dsol: "\u29F6", + Dstrok: "\u0110", + dstrok: "\u0111", + dtdot: "\u22F1", + dtri: "\u25BF", + dtrif: "\u25BE", + duarr: "\u21F5", + duhar: "\u296F", + dwangle: "\u29A6", + DZcy: "\u040F", + dzcy: "\u045F", + dzigrarr: "\u27FF", + Eacute: "\xC9", + eacute: "\xE9", + easter: "\u2A6E", + Ecaron: "\u011A", + ecaron: "\u011B", + ecir: "\u2256", + Ecirc: "\xCA", + ecirc: "\xEA", + ecolon: "\u2255", + Ecy: "\u042D", + ecy: "\u044D", + eDDot: "\u2A77", + Edot: "\u0116", + eDot: "\u2251", + edot: "\u0117", + ee: "\u2147", + efDot: "\u2252", + Efr: "\u{1D508}", + efr: "\u{1D522}", + eg: "\u2A9A", + Egrave: "\xC8", + egrave: "\xE8", + egs: "\u2A96", + egsdot: "\u2A98", + el: "\u2A99", + Element: "\u2208", + elinters: "\u23E7", + ell: "\u2113", + els: "\u2A95", + elsdot: "\u2A97", + Emacr: "\u0112", + emacr: "\u0113", + empty: "\u2205", + emptyset: "\u2205", + EmptySmallSquare: "\u25FB", + emptyv: "\u2205", + EmptyVerySmallSquare: "\u25AB", + emsp: "\u2003", + emsp13: "\u2004", + emsp14: "\u2005", + ENG: "\u014A", + eng: "\u014B", + ensp: "\u2002", + Eogon: "\u0118", + eogon: "\u0119", + Eopf: "\u{1D53C}", + eopf: "\u{1D556}", + epar: "\u22D5", + eparsl: "\u29E3", + eplus: "\u2A71", + epsi: "\u03B5", + Epsilon: "\u0395", + epsilon: "\u03B5", + epsiv: "\u03F5", + eqcirc: "\u2256", + eqcolon: "\u2255", + eqsim: "\u2242", + eqslantgtr: "\u2A96", + eqslantless: "\u2A95", + Equal: "\u2A75", + equals: "=", + EqualTilde: "\u2242", + equest: "\u225F", + Equilibrium: "\u21CC", + equiv: "\u2261", + equivDD: "\u2A78", + eqvparsl: "\u29E5", + erarr: "\u2971", + erDot: "\u2253", + Escr: "\u2130", + escr: "\u212F", + esdot: "\u2250", + Esim: "\u2A73", + esim: "\u2242", + Eta: "\u0397", + eta: "\u03B7", + ETH: "\xD0", + eth: "\xF0", + Euml: "\xCB", + euml: "\xEB", + euro: "\u20AC", + excl: "!", + exist: "\u2203", + Exists: "\u2203", + expectation: "\u2130", + ExponentialE: "\u2147", + exponentiale: "\u2147", + fallingdotseq: "\u2252", + Fcy: "\u0424", + fcy: "\u0444", + female: "\u2640", + ffilig: "\uFB03", + fflig: "\uFB00", + ffllig: "\uFB04", + Ffr: "\u{1D509}", + ffr: "\u{1D523}", + filig: "\uFB01", + FilledSmallSquare: "\u25FC", + FilledVerySmallSquare: "\u25AA", + fjlig: "fj", + flat: "\u266D", + fllig: "\uFB02", + fltns: "\u25B1", + fnof: "\u0192", + Fopf: "\u{1D53D}", + fopf: "\u{1D557}", + ForAll: "\u2200", + forall: "\u2200", + fork: "\u22D4", + forkv: "\u2AD9", + Fouriertrf: "\u2131", + fpartint: "\u2A0D", + frac12: "\xBD", + frac13: "\u2153", + frac14: "\xBC", + frac15: "\u2155", + frac16: "\u2159", + frac18: "\u215B", + frac23: "\u2154", + frac25: "\u2156", + frac34: "\xBE", + frac35: "\u2157", + frac38: "\u215C", + frac45: "\u2158", + frac56: "\u215A", + frac58: "\u215D", + frac78: "\u215E", + frasl: "\u2044", + frown: "\u2322", + Fscr: "\u2131", + fscr: "\u{1D4BB}", + gacute: "\u01F5", + Gamma: "\u0393", + gamma: "\u03B3", + Gammad: "\u03DC", + gammad: "\u03DD", + gap: "\u2A86", + Gbreve: "\u011E", + gbreve: "\u011F", + Gcedil: "\u0122", + Gcirc: "\u011C", + gcirc: "\u011D", + Gcy: "\u0413", + gcy: "\u0433", + Gdot: "\u0120", + gdot: "\u0121", + gE: "\u2267", + ge: "\u2265", + gEl: "\u2A8C", + gel: "\u22DB", + geq: "\u2265", + geqq: "\u2267", + geqslant: "\u2A7E", + ges: "\u2A7E", + gescc: "\u2AA9", + gesdot: "\u2A80", + gesdoto: "\u2A82", + gesdotol: "\u2A84", + gesl: "\u22DB\uFE00", + gesles: "\u2A94", + Gfr: "\u{1D50A}", + gfr: "\u{1D524}", + Gg: "\u22D9", + gg: "\u226B", + ggg: "\u22D9", + gimel: "\u2137", + GJcy: "\u0403", + gjcy: "\u0453", + gl: "\u2277", + gla: "\u2AA5", + glE: "\u2A92", + glj: "\u2AA4", + gnap: "\u2A8A", + gnapprox: "\u2A8A", + gnE: "\u2269", + gne: "\u2A88", + gneq: "\u2A88", + gneqq: "\u2269", + gnsim: "\u22E7", + Gopf: "\u{1D53E}", + gopf: "\u{1D558}", + grave: "`", + GreaterEqual: "\u2265", + GreaterEqualLess: "\u22DB", + GreaterFullEqual: "\u2267", + GreaterGreater: "\u2AA2", + GreaterLess: "\u2277", + GreaterSlantEqual: "\u2A7E", + GreaterTilde: "\u2273", + Gscr: "\u{1D4A2}", + gscr: "\u210A", + gsim: "\u2273", + gsime: "\u2A8E", + gsiml: "\u2A90", + Gt: "\u226B", + GT: ">", + gt: ">", + gtcc: "\u2AA7", + gtcir: "\u2A7A", + gtdot: "\u22D7", + gtlPar: "\u2995", + gtquest: "\u2A7C", + gtrapprox: "\u2A86", + gtrarr: "\u2978", + gtrdot: "\u22D7", + gtreqless: "\u22DB", + gtreqqless: "\u2A8C", + gtrless: "\u2277", + gtrsim: "\u2273", + gvertneqq: "\u2269\uFE00", + gvnE: "\u2269\uFE00", + Hacek: "\u02C7", + hairsp: "\u200A", + half: "\xBD", + hamilt: "\u210B", + HARDcy: "\u042A", + hardcy: "\u044A", + hArr: "\u21D4", + harr: "\u2194", + harrcir: "\u2948", + harrw: "\u21AD", + Hat: "^", + hbar: "\u210F", + Hcirc: "\u0124", + hcirc: "\u0125", + hearts: "\u2665", + heartsuit: "\u2665", + hellip: "\u2026", + hercon: "\u22B9", + Hfr: "\u210C", + hfr: "\u{1D525}", + HilbertSpace: "\u210B", + hksearow: "\u2925", + hkswarow: "\u2926", + hoarr: "\u21FF", + homtht: "\u223B", + hookleftarrow: "\u21A9", + hookrightarrow: "\u21AA", + Hopf: "\u210D", + hopf: "\u{1D559}", + horbar: "\u2015", + HorizontalLine: "\u2500", + Hscr: "\u210B", + hscr: "\u{1D4BD}", + hslash: "\u210F", + Hstrok: "\u0126", + hstrok: "\u0127", + HumpDownHump: "\u224E", + HumpEqual: "\u224F", + hybull: "\u2043", + hyphen: "\u2010", + Iacute: "\xCD", + iacute: "\xED", + ic: "\u2063", + Icirc: "\xCE", + icirc: "\xEE", + Icy: "\u0418", + icy: "\u0438", + Idot: "\u0130", + IEcy: "\u0415", + iecy: "\u0435", + iexcl: "\xA1", + iff: "\u21D4", + Ifr: "\u2111", + ifr: "\u{1D526}", + Igrave: "\xCC", + igrave: "\xEC", + ii: "\u2148", + iiiint: "\u2A0C", + iiint: "\u222D", + iinfin: "\u29DC", + iiota: "\u2129", + IJlig: "\u0132", + ijlig: "\u0133", + Im: "\u2111", + Imacr: "\u012A", + imacr: "\u012B", + image: "\u2111", + ImaginaryI: "\u2148", + imagline: "\u2110", + imagpart: "\u2111", + imath: "\u0131", + imof: "\u22B7", + imped: "\u01B5", + Implies: "\u21D2", + in: "\u2208", + incare: "\u2105", + infin: "\u221E", + infintie: "\u29DD", + inodot: "\u0131", + Int: "\u222C", + int: "\u222B", + intcal: "\u22BA", + integers: "\u2124", + Integral: "\u222B", + intercal: "\u22BA", + Intersection: "\u22C2", + intlarhk: "\u2A17", + intprod: "\u2A3C", + InvisibleComma: "\u2063", + InvisibleTimes: "\u2062", + IOcy: "\u0401", + iocy: "\u0451", + Iogon: "\u012E", + iogon: "\u012F", + Iopf: "\u{1D540}", + iopf: "\u{1D55A}", + Iota: "\u0399", + iota: "\u03B9", + iprod: "\u2A3C", + iquest: "\xBF", + Iscr: "\u2110", + iscr: "\u{1D4BE}", + isin: "\u2208", + isindot: "\u22F5", + isinE: "\u22F9", + isins: "\u22F4", + isinsv: "\u22F3", + isinv: "\u2208", + it: "\u2062", + Itilde: "\u0128", + itilde: "\u0129", + Iukcy: "\u0406", + iukcy: "\u0456", + Iuml: "\xCF", + iuml: "\xEF", + Jcirc: "\u0134", + jcirc: "\u0135", + Jcy: "\u0419", + jcy: "\u0439", + Jfr: "\u{1D50D}", + jfr: "\u{1D527}", + jmath: "\u0237", + Jopf: "\u{1D541}", + jopf: "\u{1D55B}", + Jscr: "\u{1D4A5}", + jscr: "\u{1D4BF}", + Jsercy: "\u0408", + jsercy: "\u0458", + Jukcy: "\u0404", + jukcy: "\u0454", + Kappa: "\u039A", + kappa: "\u03BA", + kappav: "\u03F0", + Kcedil: "\u0136", + kcedil: "\u0137", + Kcy: "\u041A", + kcy: "\u043A", + Kfr: "\u{1D50E}", + kfr: "\u{1D528}", + kgreen: "\u0138", + KHcy: "\u0425", + khcy: "\u0445", + KJcy: "\u040C", + kjcy: "\u045C", + Kopf: "\u{1D542}", + kopf: "\u{1D55C}", + Kscr: "\u{1D4A6}", + kscr: "\u{1D4C0}", + lAarr: "\u21DA", + Lacute: "\u0139", + lacute: "\u013A", + laemptyv: "\u29B4", + lagran: "\u2112", + Lambda: "\u039B", + lambda: "\u03BB", + Lang: "\u27EA", + lang: "\u27E8", + langd: "\u2991", + langle: "\u27E8", + lap: "\u2A85", + Laplacetrf: "\u2112", + laquo: "\xAB", + Larr: "\u219E", + lArr: "\u21D0", + larr: "\u2190", + larrb: "\u21E4", + larrbfs: "\u291F", + larrfs: "\u291D", + larrhk: "\u21A9", + larrlp: "\u21AB", + larrpl: "\u2939", + larrsim: "\u2973", + larrtl: "\u21A2", + lat: "\u2AAB", + lAtail: "\u291B", + latail: "\u2919", + late: "\u2AAD", + lates: "\u2AAD\uFE00", + lBarr: "\u290E", + lbarr: "\u290C", + lbbrk: "\u2772", + lbrace: "{", + lbrack: "[", + lbrke: "\u298B", + lbrksld: "\u298F", + lbrkslu: "\u298D", + Lcaron: "\u013D", + lcaron: "\u013E", + Lcedil: "\u013B", + lcedil: "\u013C", + lceil: "\u2308", + lcub: "{", + Lcy: "\u041B", + lcy: "\u043B", + ldca: "\u2936", + ldquo: "\u201C", + ldquor: "\u201E", + ldrdhar: "\u2967", + ldrushar: "\u294B", + ldsh: "\u21B2", + lE: "\u2266", + le: "\u2264", + LeftAngleBracket: "\u27E8", + LeftArrow: "\u2190", + Leftarrow: "\u21D0", + leftarrow: "\u2190", + LeftArrowBar: "\u21E4", + LeftArrowRightArrow: "\u21C6", + leftarrowtail: "\u21A2", + LeftCeiling: "\u2308", + LeftDoubleBracket: "\u27E6", + LeftDownTeeVector: "\u2961", + LeftDownVector: "\u21C3", + LeftDownVectorBar: "\u2959", + LeftFloor: "\u230A", + leftharpoondown: "\u21BD", + leftharpoonup: "\u21BC", + leftleftarrows: "\u21C7", + LeftRightArrow: "\u2194", + Leftrightarrow: "\u21D4", + leftrightarrow: "\u2194", + leftrightarrows: "\u21C6", + leftrightharpoons: "\u21CB", + leftrightsquigarrow: "\u21AD", + LeftRightVector: "\u294E", + LeftTee: "\u22A3", + LeftTeeArrow: "\u21A4", + LeftTeeVector: "\u295A", + leftthreetimes: "\u22CB", + LeftTriangle: "\u22B2", + LeftTriangleBar: "\u29CF", + LeftTriangleEqual: "\u22B4", + LeftUpDownVector: "\u2951", + LeftUpTeeVector: "\u2960", + LeftUpVector: "\u21BF", + LeftUpVectorBar: "\u2958", + LeftVector: "\u21BC", + LeftVectorBar: "\u2952", + lEg: "\u2A8B", + leg: "\u22DA", + leq: "\u2264", + leqq: "\u2266", + leqslant: "\u2A7D", + les: "\u2A7D", + lescc: "\u2AA8", + lesdot: "\u2A7F", + lesdoto: "\u2A81", + lesdotor: "\u2A83", + lesg: "\u22DA\uFE00", + lesges: "\u2A93", + lessapprox: "\u2A85", + lessdot: "\u22D6", + lesseqgtr: "\u22DA", + lesseqqgtr: "\u2A8B", + LessEqualGreater: "\u22DA", + LessFullEqual: "\u2266", + LessGreater: "\u2276", + lessgtr: "\u2276", + LessLess: "\u2AA1", + lesssim: "\u2272", + LessSlantEqual: "\u2A7D", + LessTilde: "\u2272", + lfisht: "\u297C", + lfloor: "\u230A", + Lfr: "\u{1D50F}", + lfr: "\u{1D529}", + lg: "\u2276", + lgE: "\u2A91", + lHar: "\u2962", + lhard: "\u21BD", + lharu: "\u21BC", + lharul: "\u296A", + lhblk: "\u2584", + LJcy: "\u0409", + ljcy: "\u0459", + Ll: "\u22D8", + ll: "\u226A", + llarr: "\u21C7", + llcorner: "\u231E", + Lleftarrow: "\u21DA", + llhard: "\u296B", + lltri: "\u25FA", + Lmidot: "\u013F", + lmidot: "\u0140", + lmoust: "\u23B0", + lmoustache: "\u23B0", + lnap: "\u2A89", + lnapprox: "\u2A89", + lnE: "\u2268", + lne: "\u2A87", + lneq: "\u2A87", + lneqq: "\u2268", + lnsim: "\u22E6", + loang: "\u27EC", + loarr: "\u21FD", + lobrk: "\u27E6", + LongLeftArrow: "\u27F5", + Longleftarrow: "\u27F8", + longleftarrow: "\u27F5", + LongLeftRightArrow: "\u27F7", + Longleftrightarrow: "\u27FA", + longleftrightarrow: "\u27F7", + longmapsto: "\u27FC", + LongRightArrow: "\u27F6", + Longrightarrow: "\u27F9", + longrightarrow: "\u27F6", + looparrowleft: "\u21AB", + looparrowright: "\u21AC", + lopar: "\u2985", + Lopf: "\u{1D543}", + lopf: "\u{1D55D}", + loplus: "\u2A2D", + lotimes: "\u2A34", + lowast: "\u2217", + lowbar: "_", + LowerLeftArrow: "\u2199", + LowerRightArrow: "\u2198", + loz: "\u25CA", + lozenge: "\u25CA", + lozf: "\u29EB", + lpar: "(", + lparlt: "\u2993", + lrarr: "\u21C6", + lrcorner: "\u231F", + lrhar: "\u21CB", + lrhard: "\u296D", + lrm: "\u200E", + lrtri: "\u22BF", + lsaquo: "\u2039", + Lscr: "\u2112", + lscr: "\u{1D4C1}", + Lsh: "\u21B0", + lsh: "\u21B0", + lsim: "\u2272", + lsime: "\u2A8D", + lsimg: "\u2A8F", + lsqb: "[", + lsquo: "\u2018", + lsquor: "\u201A", + Lstrok: "\u0141", + lstrok: "\u0142", + Lt: "\u226A", + LT: "<", + lt: "<", + ltcc: "\u2AA6", + ltcir: "\u2A79", + ltdot: "\u22D6", + lthree: "\u22CB", + ltimes: "\u22C9", + ltlarr: "\u2976", + ltquest: "\u2A7B", + ltri: "\u25C3", + ltrie: "\u22B4", + ltrif: "\u25C2", + ltrPar: "\u2996", + lurdshar: "\u294A", + luruhar: "\u2966", + lvertneqq: "\u2268\uFE00", + lvnE: "\u2268\uFE00", + macr: "\xAF", + male: "\u2642", + malt: "\u2720", + maltese: "\u2720", + Map: "\u2905", + map: "\u21A6", + mapsto: "\u21A6", + mapstodown: "\u21A7", + mapstoleft: "\u21A4", + mapstoup: "\u21A5", + marker: "\u25AE", + mcomma: "\u2A29", + Mcy: "\u041C", + mcy: "\u043C", + mdash: "\u2014", + mDDot: "\u223A", + measuredangle: "\u2221", + MediumSpace: "\u205F", + Mellintrf: "\u2133", + Mfr: "\u{1D510}", + mfr: "\u{1D52A}", + mho: "\u2127", + micro: "\xB5", + mid: "\u2223", + midast: "*", + midcir: "\u2AF0", + middot: "\xB7", + minus: "\u2212", + minusb: "\u229F", + minusd: "\u2238", + minusdu: "\u2A2A", + MinusPlus: "\u2213", + mlcp: "\u2ADB", + mldr: "\u2026", + mnplus: "\u2213", + models: "\u22A7", + Mopf: "\u{1D544}", + mopf: "\u{1D55E}", + mp: "\u2213", + Mscr: "\u2133", + mscr: "\u{1D4C2}", + mstpos: "\u223E", + Mu: "\u039C", + mu: "\u03BC", + multimap: "\u22B8", + mumap: "\u22B8", + nabla: "\u2207", + Nacute: "\u0143", + nacute: "\u0144", + nang: "\u2220\u20D2", + nap: "\u2249", + napE: "\u2A70\u0338", + napid: "\u224B\u0338", + napos: "\u0149", + napprox: "\u2249", + natur: "\u266E", + natural: "\u266E", + naturals: "\u2115", + nbsp: "\xA0", + nbump: "\u224E\u0338", + nbumpe: "\u224F\u0338", + ncap: "\u2A43", + Ncaron: "\u0147", + ncaron: "\u0148", + Ncedil: "\u0145", + ncedil: "\u0146", + ncong: "\u2247", + ncongdot: "\u2A6D\u0338", + ncup: "\u2A42", + Ncy: "\u041D", + ncy: "\u043D", + ndash: "\u2013", + ne: "\u2260", + nearhk: "\u2924", + neArr: "\u21D7", + nearr: "\u2197", + nearrow: "\u2197", + nedot: "\u2250\u0338", + NegativeMediumSpace: "\u200B", + NegativeThickSpace: "\u200B", + NegativeThinSpace: "\u200B", + NegativeVeryThinSpace: "\u200B", + nequiv: "\u2262", + nesear: "\u2928", + nesim: "\u2242\u0338", + NestedGreaterGreater: "\u226B", + NestedLessLess: "\u226A", + NewLine: "\n", + nexist: "\u2204", + nexists: "\u2204", + Nfr: "\u{1D511}", + nfr: "\u{1D52B}", + ngE: "\u2267\u0338", + nge: "\u2271", + ngeq: "\u2271", + ngeqq: "\u2267\u0338", + ngeqslant: "\u2A7E\u0338", + nges: "\u2A7E\u0338", + nGg: "\u22D9\u0338", + ngsim: "\u2275", + nGt: "\u226B\u20D2", + ngt: "\u226F", + ngtr: "\u226F", + nGtv: "\u226B\u0338", + nhArr: "\u21CE", + nharr: "\u21AE", + nhpar: "\u2AF2", + ni: "\u220B", + nis: "\u22FC", + nisd: "\u22FA", + niv: "\u220B", + NJcy: "\u040A", + njcy: "\u045A", + nlArr: "\u21CD", + nlarr: "\u219A", + nldr: "\u2025", + nlE: "\u2266\u0338", + nle: "\u2270", + nLeftarrow: "\u21CD", + nleftarrow: "\u219A", + nLeftrightarrow: "\u21CE", + nleftrightarrow: "\u21AE", + nleq: "\u2270", + nleqq: "\u2266\u0338", + nleqslant: "\u2A7D\u0338", + nles: "\u2A7D\u0338", + nless: "\u226E", + nLl: "\u22D8\u0338", + nlsim: "\u2274", + nLt: "\u226A\u20D2", + nlt: "\u226E", + nltri: "\u22EA", + nltrie: "\u22EC", + nLtv: "\u226A\u0338", + nmid: "\u2224", + NoBreak: "\u2060", + NonBreakingSpace: "\xA0", + Nopf: "\u2115", + nopf: "\u{1D55F}", + Not: "\u2AEC", + not: "\xAC", + NotCongruent: "\u2262", + NotCupCap: "\u226D", + NotDoubleVerticalBar: "\u2226", + NotElement: "\u2209", + NotEqual: "\u2260", + NotEqualTilde: "\u2242\u0338", + NotExists: "\u2204", + NotGreater: "\u226F", + NotGreaterEqual: "\u2271", + NotGreaterFullEqual: "\u2267\u0338", + NotGreaterGreater: "\u226B\u0338", + NotGreaterLess: "\u2279", + NotGreaterSlantEqual: "\u2A7E\u0338", + NotGreaterTilde: "\u2275", + NotHumpDownHump: "\u224E\u0338", + NotHumpEqual: "\u224F\u0338", + notin: "\u2209", + notindot: "\u22F5\u0338", + notinE: "\u22F9\u0338", + notinva: "\u2209", + notinvb: "\u22F7", + notinvc: "\u22F6", + NotLeftTriangle: "\u22EA", + NotLeftTriangleBar: "\u29CF\u0338", + NotLeftTriangleEqual: "\u22EC", + NotLess: "\u226E", + NotLessEqual: "\u2270", + NotLessGreater: "\u2278", + NotLessLess: "\u226A\u0338", + NotLessSlantEqual: "\u2A7D\u0338", + NotLessTilde: "\u2274", + NotNestedGreaterGreater: "\u2AA2\u0338", + NotNestedLessLess: "\u2AA1\u0338", + notni: "\u220C", + notniva: "\u220C", + notnivb: "\u22FE", + notnivc: "\u22FD", + NotPrecedes: "\u2280", + NotPrecedesEqual: "\u2AAF\u0338", + NotPrecedesSlantEqual: "\u22E0", + NotReverseElement: "\u220C", + NotRightTriangle: "\u22EB", + NotRightTriangleBar: "\u29D0\u0338", + NotRightTriangleEqual: "\u22ED", + NotSquareSubset: "\u228F\u0338", + NotSquareSubsetEqual: "\u22E2", + NotSquareSuperset: "\u2290\u0338", + NotSquareSupersetEqual: "\u22E3", + NotSubset: "\u2282\u20D2", + NotSubsetEqual: "\u2288", + NotSucceeds: "\u2281", + NotSucceedsEqual: "\u2AB0\u0338", + NotSucceedsSlantEqual: "\u22E1", + NotSucceedsTilde: "\u227F\u0338", + NotSuperset: "\u2283\u20D2", + NotSupersetEqual: "\u2289", + NotTilde: "\u2241", + NotTildeEqual: "\u2244", + NotTildeFullEqual: "\u2247", + NotTildeTilde: "\u2249", + NotVerticalBar: "\u2224", + npar: "\u2226", + nparallel: "\u2226", + nparsl: "\u2AFD\u20E5", + npart: "\u2202\u0338", + npolint: "\u2A14", + npr: "\u2280", + nprcue: "\u22E0", + npre: "\u2AAF\u0338", + nprec: "\u2280", + npreceq: "\u2AAF\u0338", + nrArr: "\u21CF", + nrarr: "\u219B", + nrarrc: "\u2933\u0338", + nrarrw: "\u219D\u0338", + nRightarrow: "\u21CF", + nrightarrow: "\u219B", + nrtri: "\u22EB", + nrtrie: "\u22ED", + nsc: "\u2281", + nsccue: "\u22E1", + nsce: "\u2AB0\u0338", + Nscr: "\u{1D4A9}", + nscr: "\u{1D4C3}", + nshortmid: "\u2224", + nshortparallel: "\u2226", + nsim: "\u2241", + nsime: "\u2244", + nsimeq: "\u2244", + nsmid: "\u2224", + nspar: "\u2226", + nsqsube: "\u22E2", + nsqsupe: "\u22E3", + nsub: "\u2284", + nsubE: "\u2AC5\u0338", + nsube: "\u2288", + nsubset: "\u2282\u20D2", + nsubseteq: "\u2288", + nsubseteqq: "\u2AC5\u0338", + nsucc: "\u2281", + nsucceq: "\u2AB0\u0338", + nsup: "\u2285", + nsupE: "\u2AC6\u0338", + nsupe: "\u2289", + nsupset: "\u2283\u20D2", + nsupseteq: "\u2289", + nsupseteqq: "\u2AC6\u0338", + ntgl: "\u2279", + Ntilde: "\xD1", + ntilde: "\xF1", + ntlg: "\u2278", + ntriangleleft: "\u22EA", + ntrianglelefteq: "\u22EC", + ntriangleright: "\u22EB", + ntrianglerighteq: "\u22ED", + Nu: "\u039D", + nu: "\u03BD", + num: "#", + numero: "\u2116", + numsp: "\u2007", + nvap: "\u224D\u20D2", + nVDash: "\u22AF", + nVdash: "\u22AE", + nvDash: "\u22AD", + nvdash: "\u22AC", + nvge: "\u2265\u20D2", + nvgt: ">\u20D2", + nvHarr: "\u2904", + nvinfin: "\u29DE", + nvlArr: "\u2902", + nvle: "\u2264\u20D2", + nvlt: "<\u20D2", + nvltrie: "\u22B4\u20D2", + nvrArr: "\u2903", + nvrtrie: "\u22B5\u20D2", + nvsim: "\u223C\u20D2", + nwarhk: "\u2923", + nwArr: "\u21D6", + nwarr: "\u2196", + nwarrow: "\u2196", + nwnear: "\u2927", + Oacute: "\xD3", + oacute: "\xF3", + oast: "\u229B", + ocir: "\u229A", + Ocirc: "\xD4", + ocirc: "\xF4", + Ocy: "\u041E", + ocy: "\u043E", + odash: "\u229D", + Odblac: "\u0150", + odblac: "\u0151", + odiv: "\u2A38", + odot: "\u2299", + odsold: "\u29BC", + OElig: "\u0152", + oelig: "\u0153", + ofcir: "\u29BF", + Ofr: "\u{1D512}", + ofr: "\u{1D52C}", + ogon: "\u02DB", + Ograve: "\xD2", + ograve: "\xF2", + ogt: "\u29C1", + ohbar: "\u29B5", + ohm: "\u03A9", + oint: "\u222E", + olarr: "\u21BA", + olcir: "\u29BE", + olcross: "\u29BB", + oline: "\u203E", + olt: "\u29C0", + Omacr: "\u014C", + omacr: "\u014D", + Omega: "\u03A9", + omega: "\u03C9", + Omicron: "\u039F", + omicron: "\u03BF", + omid: "\u29B6", + ominus: "\u2296", + Oopf: "\u{1D546}", + oopf: "\u{1D560}", + opar: "\u29B7", + OpenCurlyDoubleQuote: "\u201C", + OpenCurlyQuote: "\u2018", + operp: "\u29B9", + oplus: "\u2295", + Or: "\u2A54", + or: "\u2228", + orarr: "\u21BB", + ord: "\u2A5D", + order: "\u2134", + orderof: "\u2134", + ordf: "\xAA", + ordm: "\xBA", + origof: "\u22B6", + oror: "\u2A56", + orslope: "\u2A57", + orv: "\u2A5B", + oS: "\u24C8", + Oscr: "\u{1D4AA}", + oscr: "\u2134", + Oslash: "\xD8", + oslash: "\xF8", + osol: "\u2298", + Otilde: "\xD5", + otilde: "\xF5", + Otimes: "\u2A37", + otimes: "\u2297", + otimesas: "\u2A36", + Ouml: "\xD6", + ouml: "\xF6", + ovbar: "\u233D", + OverBar: "\u203E", + OverBrace: "\u23DE", + OverBracket: "\u23B4", + OverParenthesis: "\u23DC", + par: "\u2225", + para: "\xB6", + parallel: "\u2225", + parsim: "\u2AF3", + parsl: "\u2AFD", + part: "\u2202", + PartialD: "\u2202", + Pcy: "\u041F", + pcy: "\u043F", + percnt: "%", + period: ".", + permil: "\u2030", + perp: "\u22A5", + pertenk: "\u2031", + Pfr: "\u{1D513}", + pfr: "\u{1D52D}", + Phi: "\u03A6", + phi: "\u03C6", + phiv: "\u03D5", + phmmat: "\u2133", + phone: "\u260E", + Pi: "\u03A0", + pi: "\u03C0", + pitchfork: "\u22D4", + piv: "\u03D6", + planck: "\u210F", + planckh: "\u210E", + plankv: "\u210F", + plus: "+", + plusacir: "\u2A23", + plusb: "\u229E", + pluscir: "\u2A22", + plusdo: "\u2214", + plusdu: "\u2A25", + pluse: "\u2A72", + PlusMinus: "\xB1", + plusmn: "\xB1", + plussim: "\u2A26", + plustwo: "\u2A27", + pm: "\xB1", + Poincareplane: "\u210C", + pointint: "\u2A15", + Popf: "\u2119", + popf: "\u{1D561}", + pound: "\xA3", + Pr: "\u2ABB", + pr: "\u227A", + prap: "\u2AB7", + prcue: "\u227C", + prE: "\u2AB3", + pre: "\u2AAF", + prec: "\u227A", + precapprox: "\u2AB7", + preccurlyeq: "\u227C", + Precedes: "\u227A", + PrecedesEqual: "\u2AAF", + PrecedesSlantEqual: "\u227C", + PrecedesTilde: "\u227E", + preceq: "\u2AAF", + precnapprox: "\u2AB9", + precneqq: "\u2AB5", + precnsim: "\u22E8", + precsim: "\u227E", + Prime: "\u2033", + prime: "\u2032", + primes: "\u2119", + prnap: "\u2AB9", + prnE: "\u2AB5", + prnsim: "\u22E8", + prod: "\u220F", + Product: "\u220F", + profalar: "\u232E", + profline: "\u2312", + profsurf: "\u2313", + prop: "\u221D", + Proportion: "\u2237", + Proportional: "\u221D", + propto: "\u221D", + prsim: "\u227E", + prurel: "\u22B0", + Pscr: "\u{1D4AB}", + pscr: "\u{1D4C5}", + Psi: "\u03A8", + psi: "\u03C8", + puncsp: "\u2008", + Qfr: "\u{1D514}", + qfr: "\u{1D52E}", + qint: "\u2A0C", + Qopf: "\u211A", + qopf: "\u{1D562}", + qprime: "\u2057", + Qscr: "\u{1D4AC}", + qscr: "\u{1D4C6}", + quaternions: "\u210D", + quatint: "\u2A16", + quest: "?", + questeq: "\u225F", + QUOT: '"', + quot: '"', + rAarr: "\u21DB", + race: "\u223D\u0331", + Racute: "\u0154", + racute: "\u0155", + radic: "\u221A", + raemptyv: "\u29B3", + Rang: "\u27EB", + rang: "\u27E9", + rangd: "\u2992", + range: "\u29A5", + rangle: "\u27E9", + raquo: "\xBB", + Rarr: "\u21A0", + rArr: "\u21D2", + rarr: "\u2192", + rarrap: "\u2975", + rarrb: "\u21E5", + rarrbfs: "\u2920", + rarrc: "\u2933", + rarrfs: "\u291E", + rarrhk: "\u21AA", + rarrlp: "\u21AC", + rarrpl: "\u2945", + rarrsim: "\u2974", + Rarrtl: "\u2916", + rarrtl: "\u21A3", + rarrw: "\u219D", + rAtail: "\u291C", + ratail: "\u291A", + ratio: "\u2236", + rationals: "\u211A", + RBarr: "\u2910", + rBarr: "\u290F", + rbarr: "\u290D", + rbbrk: "\u2773", + rbrace: "}", + rbrack: "]", + rbrke: "\u298C", + rbrksld: "\u298E", + rbrkslu: "\u2990", + Rcaron: "\u0158", + rcaron: "\u0159", + Rcedil: "\u0156", + rcedil: "\u0157", + rceil: "\u2309", + rcub: "}", + Rcy: "\u0420", + rcy: "\u0440", + rdca: "\u2937", + rdldhar: "\u2969", + rdquo: "\u201D", + rdquor: "\u201D", + rdsh: "\u21B3", + Re: "\u211C", + real: "\u211C", + realine: "\u211B", + realpart: "\u211C", + reals: "\u211D", + rect: "\u25AD", + REG: "\xAE", + reg: "\xAE", + ReverseElement: "\u220B", + ReverseEquilibrium: "\u21CB", + ReverseUpEquilibrium: "\u296F", + rfisht: "\u297D", + rfloor: "\u230B", + Rfr: "\u211C", + rfr: "\u{1D52F}", + rHar: "\u2964", + rhard: "\u21C1", + rharu: "\u21C0", + rharul: "\u296C", + Rho: "\u03A1", + rho: "\u03C1", + rhov: "\u03F1", + RightAngleBracket: "\u27E9", + RightArrow: "\u2192", + Rightarrow: "\u21D2", + rightarrow: "\u2192", + RightArrowBar: "\u21E5", + RightArrowLeftArrow: "\u21C4", + rightarrowtail: "\u21A3", + RightCeiling: "\u2309", + RightDoubleBracket: "\u27E7", + RightDownTeeVector: "\u295D", + RightDownVector: "\u21C2", + RightDownVectorBar: "\u2955", + RightFloor: "\u230B", + rightharpoondown: "\u21C1", + rightharpoonup: "\u21C0", + rightleftarrows: "\u21C4", + rightleftharpoons: "\u21CC", + rightrightarrows: "\u21C9", + rightsquigarrow: "\u219D", + RightTee: "\u22A2", + RightTeeArrow: "\u21A6", + RightTeeVector: "\u295B", + rightthreetimes: "\u22CC", + RightTriangle: "\u22B3", + RightTriangleBar: "\u29D0", + RightTriangleEqual: "\u22B5", + RightUpDownVector: "\u294F", + RightUpTeeVector: "\u295C", + RightUpVector: "\u21BE", + RightUpVectorBar: "\u2954", + RightVector: "\u21C0", + RightVectorBar: "\u2953", + ring: "\u02DA", + risingdotseq: "\u2253", + rlarr: "\u21C4", + rlhar: "\u21CC", + rlm: "\u200F", + rmoust: "\u23B1", + rmoustache: "\u23B1", + rnmid: "\u2AEE", + roang: "\u27ED", + roarr: "\u21FE", + robrk: "\u27E7", + ropar: "\u2986", + Ropf: "\u211D", + ropf: "\u{1D563}", + roplus: "\u2A2E", + rotimes: "\u2A35", + RoundImplies: "\u2970", + rpar: ")", + rpargt: "\u2994", + rppolint: "\u2A12", + rrarr: "\u21C9", + Rrightarrow: "\u21DB", + rsaquo: "\u203A", + Rscr: "\u211B", + rscr: "\u{1D4C7}", + Rsh: "\u21B1", + rsh: "\u21B1", + rsqb: "]", + rsquo: "\u2019", + rsquor: "\u2019", + rthree: "\u22CC", + rtimes: "\u22CA", + rtri: "\u25B9", + rtrie: "\u22B5", + rtrif: "\u25B8", + rtriltri: "\u29CE", + RuleDelayed: "\u29F4", + ruluhar: "\u2968", + rx: "\u211E", + Sacute: "\u015A", + sacute: "\u015B", + sbquo: "\u201A", + Sc: "\u2ABC", + sc: "\u227B", + scap: "\u2AB8", + Scaron: "\u0160", + scaron: "\u0161", + sccue: "\u227D", + scE: "\u2AB4", + sce: "\u2AB0", + Scedil: "\u015E", + scedil: "\u015F", + Scirc: "\u015C", + scirc: "\u015D", + scnap: "\u2ABA", + scnE: "\u2AB6", + scnsim: "\u22E9", + scpolint: "\u2A13", + scsim: "\u227F", + Scy: "\u0421", + scy: "\u0441", + sdot: "\u22C5", + sdotb: "\u22A1", + sdote: "\u2A66", + searhk: "\u2925", + seArr: "\u21D8", + searr: "\u2198", + searrow: "\u2198", + sect: "\xA7", + semi: ";", + seswar: "\u2929", + setminus: "\u2216", + setmn: "\u2216", + sext: "\u2736", + Sfr: "\u{1D516}", + sfr: "\u{1D530}", + sfrown: "\u2322", + sharp: "\u266F", + SHCHcy: "\u0429", + shchcy: "\u0449", + SHcy: "\u0428", + shcy: "\u0448", + ShortDownArrow: "\u2193", + ShortLeftArrow: "\u2190", + shortmid: "\u2223", + shortparallel: "\u2225", + ShortRightArrow: "\u2192", + ShortUpArrow: "\u2191", + shy: "\xAD", + Sigma: "\u03A3", + sigma: "\u03C3", + sigmaf: "\u03C2", + sigmav: "\u03C2", + sim: "\u223C", + simdot: "\u2A6A", + sime: "\u2243", + simeq: "\u2243", + simg: "\u2A9E", + simgE: "\u2AA0", + siml: "\u2A9D", + simlE: "\u2A9F", + simne: "\u2246", + simplus: "\u2A24", + simrarr: "\u2972", + slarr: "\u2190", + SmallCircle: "\u2218", + smallsetminus: "\u2216", + smashp: "\u2A33", + smeparsl: "\u29E4", + smid: "\u2223", + smile: "\u2323", + smt: "\u2AAA", + smte: "\u2AAC", + smtes: "\u2AAC\uFE00", + SOFTcy: "\u042C", + softcy: "\u044C", + sol: "/", + solb: "\u29C4", + solbar: "\u233F", + Sopf: "\u{1D54A}", + sopf: "\u{1D564}", + spades: "\u2660", + spadesuit: "\u2660", + spar: "\u2225", + sqcap: "\u2293", + sqcaps: "\u2293\uFE00", + sqcup: "\u2294", + sqcups: "\u2294\uFE00", + Sqrt: "\u221A", + sqsub: "\u228F", + sqsube: "\u2291", + sqsubset: "\u228F", + sqsubseteq: "\u2291", + sqsup: "\u2290", + sqsupe: "\u2292", + sqsupset: "\u2290", + sqsupseteq: "\u2292", + squ: "\u25A1", + Square: "\u25A1", + square: "\u25A1", + SquareIntersection: "\u2293", + SquareSubset: "\u228F", + SquareSubsetEqual: "\u2291", + SquareSuperset: "\u2290", + SquareSupersetEqual: "\u2292", + SquareUnion: "\u2294", + squarf: "\u25AA", + squf: "\u25AA", + srarr: "\u2192", + Sscr: "\u{1D4AE}", + sscr: "\u{1D4C8}", + ssetmn: "\u2216", + ssmile: "\u2323", + sstarf: "\u22C6", + Star: "\u22C6", + star: "\u2606", + starf: "\u2605", + straightepsilon: "\u03F5", + straightphi: "\u03D5", + strns: "\xAF", + Sub: "\u22D0", + sub: "\u2282", + subdot: "\u2ABD", + subE: "\u2AC5", + sube: "\u2286", + subedot: "\u2AC3", + submult: "\u2AC1", + subnE: "\u2ACB", + subne: "\u228A", + subplus: "\u2ABF", + subrarr: "\u2979", + Subset: "\u22D0", + subset: "\u2282", + subseteq: "\u2286", + subseteqq: "\u2AC5", + SubsetEqual: "\u2286", + subsetneq: "\u228A", + subsetneqq: "\u2ACB", + subsim: "\u2AC7", + subsub: "\u2AD5", + subsup: "\u2AD3", + succ: "\u227B", + succapprox: "\u2AB8", + succcurlyeq: "\u227D", + Succeeds: "\u227B", + SucceedsEqual: "\u2AB0", + SucceedsSlantEqual: "\u227D", + SucceedsTilde: "\u227F", + succeq: "\u2AB0", + succnapprox: "\u2ABA", + succneqq: "\u2AB6", + succnsim: "\u22E9", + succsim: "\u227F", + SuchThat: "\u220B", + Sum: "\u2211", + sum: "\u2211", + sung: "\u266A", + Sup: "\u22D1", + sup: "\u2283", + sup1: "\xB9", + sup2: "\xB2", + sup3: "\xB3", + supdot: "\u2ABE", + supdsub: "\u2AD8", + supE: "\u2AC6", + supe: "\u2287", + supedot: "\u2AC4", + Superset: "\u2283", + SupersetEqual: "\u2287", + suphsol: "\u27C9", + suphsub: "\u2AD7", + suplarr: "\u297B", + supmult: "\u2AC2", + supnE: "\u2ACC", + supne: "\u228B", + supplus: "\u2AC0", + Supset: "\u22D1", + supset: "\u2283", + supseteq: "\u2287", + supseteqq: "\u2AC6", + supsetneq: "\u228B", + supsetneqq: "\u2ACC", + supsim: "\u2AC8", + supsub: "\u2AD4", + supsup: "\u2AD6", + swarhk: "\u2926", + swArr: "\u21D9", + swarr: "\u2199", + swarrow: "\u2199", + swnwar: "\u292A", + szlig: "\xDF", + Tab: " ", + target: "\u2316", + Tau: "\u03A4", + tau: "\u03C4", + tbrk: "\u23B4", + Tcaron: "\u0164", + tcaron: "\u0165", + Tcedil: "\u0162", + tcedil: "\u0163", + Tcy: "\u0422", + tcy: "\u0442", + tdot: "\u20DB", + telrec: "\u2315", + Tfr: "\u{1D517}", + tfr: "\u{1D531}", + there4: "\u2234", + Therefore: "\u2234", + therefore: "\u2234", + Theta: "\u0398", + theta: "\u03B8", + thetasym: "\u03D1", + thetav: "\u03D1", + thickapprox: "\u2248", + thicksim: "\u223C", + ThickSpace: "\u205F\u200A", + thinsp: "\u2009", + ThinSpace: "\u2009", + thkap: "\u2248", + thksim: "\u223C", + THORN: "\xDE", + thorn: "\xFE", + Tilde: "\u223C", + tilde: "\u02DC", + TildeEqual: "\u2243", + TildeFullEqual: "\u2245", + TildeTilde: "\u2248", + times: "\xD7", + timesb: "\u22A0", + timesbar: "\u2A31", + timesd: "\u2A30", + tint: "\u222D", + toea: "\u2928", + top: "\u22A4", + topbot: "\u2336", + topcir: "\u2AF1", + Topf: "\u{1D54B}", + topf: "\u{1D565}", + topfork: "\u2ADA", + tosa: "\u2929", + tprime: "\u2034", + TRADE: "\u2122", + trade: "\u2122", + triangle: "\u25B5", + triangledown: "\u25BF", + triangleleft: "\u25C3", + trianglelefteq: "\u22B4", + triangleq: "\u225C", + triangleright: "\u25B9", + trianglerighteq: "\u22B5", + tridot: "\u25EC", + trie: "\u225C", + triminus: "\u2A3A", + TripleDot: "\u20DB", + triplus: "\u2A39", + trisb: "\u29CD", + tritime: "\u2A3B", + trpezium: "\u23E2", + Tscr: "\u{1D4AF}", + tscr: "\u{1D4C9}", + TScy: "\u0426", + tscy: "\u0446", + TSHcy: "\u040B", + tshcy: "\u045B", + Tstrok: "\u0166", + tstrok: "\u0167", + twixt: "\u226C", + twoheadleftarrow: "\u219E", + twoheadrightarrow: "\u21A0", + Uacute: "\xDA", + uacute: "\xFA", + Uarr: "\u219F", + uArr: "\u21D1", + uarr: "\u2191", + Uarrocir: "\u2949", + Ubrcy: "\u040E", + ubrcy: "\u045E", + Ubreve: "\u016C", + ubreve: "\u016D", + Ucirc: "\xDB", + ucirc: "\xFB", + Ucy: "\u0423", + ucy: "\u0443", + udarr: "\u21C5", + Udblac: "\u0170", + udblac: "\u0171", + udhar: "\u296E", + ufisht: "\u297E", + Ufr: "\u{1D518}", + ufr: "\u{1D532}", + Ugrave: "\xD9", + ugrave: "\xF9", + uHar: "\u2963", + uharl: "\u21BF", + uharr: "\u21BE", + uhblk: "\u2580", + ulcorn: "\u231C", + ulcorner: "\u231C", + ulcrop: "\u230F", + ultri: "\u25F8", + Umacr: "\u016A", + umacr: "\u016B", + uml: "\xA8", + UnderBar: "_", + UnderBrace: "\u23DF", + UnderBracket: "\u23B5", + UnderParenthesis: "\u23DD", + Union: "\u22C3", + UnionPlus: "\u228E", + Uogon: "\u0172", + uogon: "\u0173", + Uopf: "\u{1D54C}", + uopf: "\u{1D566}", + UpArrow: "\u2191", + Uparrow: "\u21D1", + uparrow: "\u2191", + UpArrowBar: "\u2912", + UpArrowDownArrow: "\u21C5", + UpDownArrow: "\u2195", + Updownarrow: "\u21D5", + updownarrow: "\u2195", + UpEquilibrium: "\u296E", + upharpoonleft: "\u21BF", + upharpoonright: "\u21BE", + uplus: "\u228E", + UpperLeftArrow: "\u2196", + UpperRightArrow: "\u2197", + Upsi: "\u03D2", + upsi: "\u03C5", + upsih: "\u03D2", + Upsilon: "\u03A5", + upsilon: "\u03C5", + UpTee: "\u22A5", + UpTeeArrow: "\u21A5", + upuparrows: "\u21C8", + urcorn: "\u231D", + urcorner: "\u231D", + urcrop: "\u230E", + Uring: "\u016E", + uring: "\u016F", + urtri: "\u25F9", + Uscr: "\u{1D4B0}", + uscr: "\u{1D4CA}", + utdot: "\u22F0", + Utilde: "\u0168", + utilde: "\u0169", + utri: "\u25B5", + utrif: "\u25B4", + uuarr: "\u21C8", + Uuml: "\xDC", + uuml: "\xFC", + uwangle: "\u29A7", + vangrt: "\u299C", + varepsilon: "\u03F5", + varkappa: "\u03F0", + varnothing: "\u2205", + varphi: "\u03D5", + varpi: "\u03D6", + varpropto: "\u221D", + vArr: "\u21D5", + varr: "\u2195", + varrho: "\u03F1", + varsigma: "\u03C2", + varsubsetneq: "\u228A\uFE00", + varsubsetneqq: "\u2ACB\uFE00", + varsupsetneq: "\u228B\uFE00", + varsupsetneqq: "\u2ACC\uFE00", + vartheta: "\u03D1", + vartriangleleft: "\u22B2", + vartriangleright: "\u22B3", + Vbar: "\u2AEB", + vBar: "\u2AE8", + vBarv: "\u2AE9", + Vcy: "\u0412", + vcy: "\u0432", + VDash: "\u22AB", + Vdash: "\u22A9", + vDash: "\u22A8", + vdash: "\u22A2", + Vdashl: "\u2AE6", + Vee: "\u22C1", + vee: "\u2228", + veebar: "\u22BB", + veeeq: "\u225A", + vellip: "\u22EE", + Verbar: "\u2016", + verbar: "|", + Vert: "\u2016", + vert: "|", + VerticalBar: "\u2223", + VerticalLine: "|", + VerticalSeparator: "\u2758", + VerticalTilde: "\u2240", + VeryThinSpace: "\u200A", + Vfr: "\u{1D519}", + vfr: "\u{1D533}", + vltri: "\u22B2", + vnsub: "\u2282\u20D2", + vnsup: "\u2283\u20D2", + Vopf: "\u{1D54D}", + vopf: "\u{1D567}", + vprop: "\u221D", + vrtri: "\u22B3", + Vscr: "\u{1D4B1}", + vscr: "\u{1D4CB}", + vsubnE: "\u2ACB\uFE00", + vsubne: "\u228A\uFE00", + vsupnE: "\u2ACC\uFE00", + vsupne: "\u228B\uFE00", + Vvdash: "\u22AA", + vzigzag: "\u299A", + Wcirc: "\u0174", + wcirc: "\u0175", + wedbar: "\u2A5F", + Wedge: "\u22C0", + wedge: "\u2227", + wedgeq: "\u2259", + weierp: "\u2118", + Wfr: "\u{1D51A}", + wfr: "\u{1D534}", + Wopf: "\u{1D54E}", + wopf: "\u{1D568}", + wp: "\u2118", + wr: "\u2240", + wreath: "\u2240", + Wscr: "\u{1D4B2}", + wscr: "\u{1D4CC}", + xcap: "\u22C2", + xcirc: "\u25EF", + xcup: "\u22C3", + xdtri: "\u25BD", + Xfr: "\u{1D51B}", + xfr: "\u{1D535}", + xhArr: "\u27FA", + xharr: "\u27F7", + Xi: "\u039E", + xi: "\u03BE", + xlArr: "\u27F8", + xlarr: "\u27F5", + xmap: "\u27FC", + xnis: "\u22FB", + xodot: "\u2A00", + Xopf: "\u{1D54F}", + xopf: "\u{1D569}", + xoplus: "\u2A01", + xotime: "\u2A02", + xrArr: "\u27F9", + xrarr: "\u27F6", + Xscr: "\u{1D4B3}", + xscr: "\u{1D4CD}", + xsqcup: "\u2A06", + xuplus: "\u2A04", + xutri: "\u25B3", + xvee: "\u22C1", + xwedge: "\u22C0", + Yacute: "\xDD", + yacute: "\xFD", + YAcy: "\u042F", + yacy: "\u044F", + Ycirc: "\u0176", + ycirc: "\u0177", + Ycy: "\u042B", + ycy: "\u044B", + yen: "\xA5", + Yfr: "\u{1D51C}", + yfr: "\u{1D536}", + YIcy: "\u0407", + yicy: "\u0457", + Yopf: "\u{1D550}", + yopf: "\u{1D56A}", + Yscr: "\u{1D4B4}", + yscr: "\u{1D4CE}", + YUcy: "\u042E", + yucy: "\u044E", + Yuml: "\u0178", + yuml: "\xFF", + Zacute: "\u0179", + zacute: "\u017A", + Zcaron: "\u017D", + zcaron: "\u017E", + Zcy: "\u0417", + zcy: "\u0437", + Zdot: "\u017B", + zdot: "\u017C", + zeetrf: "\u2128", + ZeroWidthSpace: "\u200B", + Zeta: "\u0396", + zeta: "\u03B6", + Zfr: "\u2128", + zfr: "\u{1D537}", + ZHcy: "\u0416", + zhcy: "\u0436", + zigrarr: "\u21DD", + Zopf: "\u2124", + zopf: "\u{1D56B}", + Zscr: "\u{1D4B5}", + zscr: "\u{1D4CF}", + zwj: "\u200D", + zwnj: "\u200C" + }); + exports2.entityMap = exports2.HTML_ENTITIES; + } +}); + +// ../../node_modules/@xmldom/xmldom/lib/sax.js +var require_sax = __commonJS({ + "../../node_modules/@xmldom/xmldom/lib/sax.js"(exports2) { + var NAMESPACE = require_conventions().NAMESPACE; + var nameStartChar = /[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/; + var nameChar = new RegExp("[\\-\\.0-9" + nameStartChar.source.slice(1, -1) + "\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"); + var tagNamePattern = new RegExp("^" + nameStartChar.source + nameChar.source + "*(?::" + nameStartChar.source + nameChar.source + "*)?$"); + var S_TAG = 0; + var S_ATTR = 1; + var S_ATTR_SPACE = 2; + var S_EQ = 3; + var S_ATTR_NOQUOT_VALUE = 4; + var S_ATTR_END = 5; + var S_TAG_SPACE = 6; + var S_TAG_CLOSE = 7; + function ParseError(message, locator) { + this.message = message; + this.locator = locator; + if (Error.captureStackTrace) Error.captureStackTrace(this, ParseError); + } + ParseError.prototype = new Error(); + ParseError.prototype.name = ParseError.name; + function XMLReader() { + } + XMLReader.prototype = { + parse: function(source, defaultNSMap, entityMap) { + var domBuilder = this.domBuilder; + domBuilder.startDocument(); + _copy(defaultNSMap, defaultNSMap = {}); + parse( + source, + defaultNSMap, + entityMap, + domBuilder, + this.errorHandler + ); + domBuilder.endDocument(); + } + }; + function parse(source, defaultNSMapCopy, entityMap, domBuilder, errorHandler) { + function fixedFromCharCode(code) { + if (code > 65535) { + code -= 65536; + var surrogate1 = 55296 + (code >> 10), surrogate2 = 56320 + (code & 1023); + return String.fromCharCode(surrogate1, surrogate2); + } else { + return String.fromCharCode(code); + } + } + function entityReplacer(a2) { + var k = a2.slice(1, -1); + if (Object.hasOwnProperty.call(entityMap, k)) { + return entityMap[k]; + } else if (k.charAt(0) === "#") { + return fixedFromCharCode(parseInt(k.substr(1).replace("x", "0x"))); + } else { + errorHandler.error("entity not found:" + a2); + return a2; + } + } + function appendText(end2) { + if (end2 > start) { + var xt = source.substring(start, end2).replace(/&#?\w+;/g, entityReplacer); + locator && position(start); + domBuilder.characters(xt, 0, end2 - start); + start = end2; + } + } + function position(p, m) { + while (p >= lineEnd && (m = linePattern.exec(source))) { + lineStart = m.index; + lineEnd = lineStart + m[0].length; + locator.lineNumber++; + } + locator.columnNumber = p - lineStart + 1; + } + var lineStart = 0; + var lineEnd = 0; + var linePattern = /.*(?:\r\n?|\n)|.*$/g; + var locator = domBuilder.locator; + var parseStack = [{ currentNSMap: defaultNSMapCopy }]; + var closeMap = {}; + var start = 0; + while (true) { + try { + var tagStart = source.indexOf("<", start); + if (tagStart < 0) { + if (!source.substr(start).match(/^\s*$/)) { + var doc = domBuilder.doc; + var text = doc.createTextNode(source.substr(start)); + doc.appendChild(text); + domBuilder.currentElement = text; + } + return; + } + if (tagStart > start) { + appendText(tagStart); + } + switch (source.charAt(tagStart + 1)) { + case "/": + var end = source.indexOf(">", tagStart + 3); + var tagName = source.substring(tagStart + 2, end).replace(/[ \t\n\r]+$/g, ""); + var config = parseStack.pop(); + if (end < 0) { + tagName = source.substring(tagStart + 2).replace(/[\s<].*/, ""); + errorHandler.error("end tag name: " + tagName + " is not complete:" + config.tagName); + end = tagStart + 1 + tagName.length; + } else if (tagName.match(/\s start) { + start = end; + } else { + appendText(Math.max(tagStart, start) + 1); + } + } + } + function copyLocator(f, t) { + t.lineNumber = f.lineNumber; + t.columnNumber = f.columnNumber; + return t; + } + function parseElementStartPart(source, start, el, currentNSMap, entityReplacer, errorHandler) { + function addAttribute(qname, value2, startIndex) { + if (el.attributeNames.hasOwnProperty(qname)) { + errorHandler.fatalError("Attribute " + qname + " redefined"); + } + el.addValue( + qname, + // @see https://www.w3.org/TR/xml/#AVNormalize + // since the xmldom sax parser does not "interpret" DTD the following is not implemented: + // - recursive replacement of (DTD) entity references + // - trimming and collapsing multiple spaces into a single one for attributes that are not of type CDATA + value2.replace(/[\t\n\r]/g, " ").replace(/&#?\w+;/g, entityReplacer), + startIndex + ); + } + var attrName; + var value; + var p = ++start; + var s = S_TAG; + while (true) { + var c = source.charAt(p); + switch (c) { + case "=": + if (s === S_ATTR) { + attrName = source.slice(start, p); + s = S_EQ; + } else if (s === S_ATTR_SPACE) { + s = S_EQ; + } else { + throw new Error("attribute equal must after attrName"); + } + break; + case "'": + case '"': + if (s === S_EQ || s === S_ATTR) { + if (s === S_ATTR) { + errorHandler.warning('attribute value must after "="'); + attrName = source.slice(start, p); + } + start = p + 1; + p = source.indexOf(c, start); + if (p > 0) { + value = source.slice(start, p); + addAttribute(attrName, value, start - 1); + s = S_ATTR_END; + } else { + throw new Error("attribute value no end '" + c + "' match"); + } + } else if (s == S_ATTR_NOQUOT_VALUE) { + value = source.slice(start, p); + addAttribute(attrName, value, start); + errorHandler.warning('attribute "' + attrName + '" missed start quot(' + c + ")!!"); + start = p + 1; + s = S_ATTR_END; + } else { + throw new Error('attribute value must after "="'); + } + break; + case "/": + switch (s) { + case S_TAG: + el.setTagName(source.slice(start, p)); + case S_ATTR_END: + case S_TAG_SPACE: + case S_TAG_CLOSE: + s = S_TAG_CLOSE; + el.closed = true; + case S_ATTR_NOQUOT_VALUE: + case S_ATTR: + break; + case S_ATTR_SPACE: + el.closed = true; + break; + default: + throw new Error("attribute invalid close char('/')"); + } + break; + case "": + errorHandler.error("unexpected end of input"); + if (s == S_TAG) { + el.setTagName(source.slice(start, p)); + } + return p; + case ">": + switch (s) { + case S_TAG: + el.setTagName(source.slice(start, p)); + case S_ATTR_END: + case S_TAG_SPACE: + case S_TAG_CLOSE: + break; + case S_ATTR_NOQUOT_VALUE: + case S_ATTR: + value = source.slice(start, p); + if (value.slice(-1) === "/") { + el.closed = true; + value = value.slice(0, -1); + } + case S_ATTR_SPACE: + if (s === S_ATTR_SPACE) { + value = attrName; + } + if (s == S_ATTR_NOQUOT_VALUE) { + errorHandler.warning('attribute "' + value + '" missed quot(")!'); + addAttribute(attrName, value, start); + } else { + if (!NAMESPACE.isHTML(currentNSMap[""]) || !value.match(/^(?:disabled|checked|selected)$/i)) { + errorHandler.warning('attribute "' + value + '" missed value!! "' + value + '" instead!!'); + } + addAttribute(value, value, start); + } + break; + case S_EQ: + throw new Error("attribute value missed!!"); + } + return p; + case "\x80": + c = " "; + default: + if (c <= " ") { + switch (s) { + case S_TAG: + el.setTagName(source.slice(start, p)); + s = S_TAG_SPACE; + break; + case S_ATTR: + attrName = source.slice(start, p); + s = S_ATTR_SPACE; + break; + case S_ATTR_NOQUOT_VALUE: + var value = source.slice(start, p); + errorHandler.warning('attribute "' + value + '" missed quot(")!!'); + addAttribute(attrName, value, start); + case S_ATTR_END: + s = S_TAG_SPACE; + break; + } + } else { + switch (s) { + case S_ATTR_SPACE: + var tagName = el.tagName; + if (!NAMESPACE.isHTML(currentNSMap[""]) || !attrName.match(/^(?:disabled|checked|selected)$/i)) { + errorHandler.warning('attribute "' + attrName + '" missed value!! "' + attrName + '" instead2!!'); + } + addAttribute(attrName, attrName, start); + start = p; + s = S_ATTR; + break; + case S_ATTR_END: + errorHandler.warning('attribute space is required"' + attrName + '"!!'); + case S_TAG_SPACE: + s = S_ATTR; + start = p; + break; + case S_EQ: + s = S_ATTR_NOQUOT_VALUE; + start = p; + break; + case S_TAG_CLOSE: + throw new Error("elements closed character '/' and '>' must be connected to"); + } + } + } + p++; + } + } + function appendElement(el, domBuilder, currentNSMap) { + var tagName = el.tagName; + var localNSMap = null; + var i = el.length; + while (i--) { + var a = el[i]; + var qName = a.qName; + var value = a.value; + var nsp = qName.indexOf(":"); + if (nsp > 0) { + var prefix = a.prefix = qName.slice(0, nsp); + var localName = qName.slice(nsp + 1); + var nsPrefix = prefix === "xmlns" && localName; + } else { + localName = qName; + prefix = null; + nsPrefix = qName === "xmlns" && ""; + } + a.localName = localName; + if (nsPrefix !== false) { + if (localNSMap == null) { + localNSMap = {}; + _copy(currentNSMap, currentNSMap = {}); + } + currentNSMap[nsPrefix] = localNSMap[nsPrefix] = value; + a.uri = NAMESPACE.XMLNS; + domBuilder.startPrefixMapping(nsPrefix, value); + } + } + var i = el.length; + while (i--) { + a = el[i]; + var prefix = a.prefix; + if (prefix) { + if (prefix === "xml") { + a.uri = NAMESPACE.XML; + } + if (prefix !== "xmlns") { + a.uri = currentNSMap[prefix || ""]; + } + } + } + var nsp = tagName.indexOf(":"); + if (nsp > 0) { + prefix = el.prefix = tagName.slice(0, nsp); + localName = el.localName = tagName.slice(nsp + 1); + } else { + prefix = null; + localName = el.localName = tagName; + } + var ns = el.uri = currentNSMap[prefix || ""]; + domBuilder.startElement(ns, localName, tagName, el); + if (el.closed) { + domBuilder.endElement(ns, localName, tagName); + if (localNSMap) { + for (prefix in localNSMap) { + if (Object.prototype.hasOwnProperty.call(localNSMap, prefix)) { + domBuilder.endPrefixMapping(prefix); + } + } + } + } else { + el.currentNSMap = currentNSMap; + el.localNSMap = localNSMap; + return true; + } + } + function parseHtmlSpecialContent(source, elStartEnd, tagName, entityReplacer, domBuilder) { + if (/^(?:script|textarea)$/i.test(tagName)) { + var elEndStart = source.indexOf("", elStartEnd); + var text = source.substring(elStartEnd + 1, elEndStart); + if (/[&<]/.test(text)) { + if (/^script$/i.test(tagName)) { + domBuilder.characters(text, 0, text.length); + return elEndStart; + } + text = text.replace(/&#?\w+;/g, entityReplacer); + domBuilder.characters(text, 0, text.length); + return elEndStart; + } + } + return elStartEnd + 1; + } + function fixSelfClosed(source, elStartEnd, tagName, closeMap) { + var pos = closeMap[tagName]; + if (pos == null) { + pos = source.lastIndexOf(""); + if (pos < elStartEnd) { + pos = source.lastIndexOf("", start + 4); + if (end > start) { + domBuilder.comment(source, start + 4, end - start - 4); + return end + 3; + } else { + errorHandler.error("Unclosed comment"); + return -1; + } + } else { + return -1; + } + default: + if (source.substr(start + 3, 6) == "CDATA[") { + var end = source.indexOf("]]>", start + 9); + domBuilder.startCDATA(); + domBuilder.characters(source, start + 9, end - start - 9); + domBuilder.endCDATA(); + return end + 3; + } + var matchs = split(source, start); + var len = matchs.length; + if (len > 1 && /!doctype/i.test(matchs[0][0])) { + var name2 = matchs[1][0]; + var pubid = false; + var sysid = false; + if (len > 3) { + if (/^public$/i.test(matchs[2][0])) { + pubid = matchs[3][0]; + sysid = len > 4 && matchs[4][0]; + } else if (/^system$/i.test(matchs[2][0])) { + sysid = matchs[3][0]; + } + } + var lastMatch = matchs[len - 1]; + domBuilder.startDTD(name2, pubid, sysid); + domBuilder.endDTD(); + return lastMatch.index + lastMatch[0].length; + } + } + return -1; + } + function parseInstruction(source, start, domBuilder) { + var end = source.indexOf("?>", start); + if (end) { + var match = source.substring(start, end).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/); + if (match) { + var len = match[0].length; + domBuilder.processingInstruction(match[1], match[2]); + return end + 2; + } else { + return -1; + } + } + return -1; + } + function ElementAttributes() { + this.attributeNames = {}; + } + ElementAttributes.prototype = { + setTagName: function(tagName) { + if (!tagNamePattern.test(tagName)) { + throw new Error("invalid tagName:" + tagName); + } + this.tagName = tagName; + }, + addValue: function(qName, value, offset) { + if (!tagNamePattern.test(qName)) { + throw new Error("invalid attribute:" + qName); + } + this.attributeNames[qName] = this.length; + this[this.length++] = { qName, value, offset }; + }, + length: 0, + getLocalName: function(i) { + return this[i].localName; + }, + getLocator: function(i) { + return this[i].locator; + }, + getQName: function(i) { + return this[i].qName; + }, + getURI: function(i) { + return this[i].uri; + }, + getValue: function(i) { + return this[i].value; + } + // ,getIndex:function(uri, localName)){ + // if(localName){ + // + // }else{ + // var qName = uri + // } + // }, + // getValue:function(){return this.getValue(this.getIndex.apply(this,arguments))}, + // getType:function(uri,localName){} + // getType:function(i){}, + }; + function split(source, start) { + var match; + var buf = []; + var reg = /'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g; + reg.lastIndex = start; + reg.exec(source); + while (match = reg.exec(source)) { + buf.push(match); + if (match[1]) return buf; + } + } + exports2.XMLReader = XMLReader; + exports2.ParseError = ParseError; + } +}); + +// ../../node_modules/@xmldom/xmldom/lib/dom-parser.js +var require_dom_parser = __commonJS({ + "../../node_modules/@xmldom/xmldom/lib/dom-parser.js"(exports2) { + var conventions = require_conventions(); + var dom = require_dom(); + var entities = require_entities(); + var sax = require_sax(); + var DOMImplementation = dom.DOMImplementation; + var NAMESPACE = conventions.NAMESPACE; + var ParseError = sax.ParseError; + var XMLReader = sax.XMLReader; + function normalizeLineEndings(input) { + return input.replace(/\r[\n\u0085]/g, "\n").replace(/[\r\u0085\u2028]/g, "\n"); + } + function DOMParser2(options) { + this.options = options || { locator: {} }; + } + DOMParser2.prototype.parseFromString = function(source, mimeType) { + var options = this.options; + var sax2 = new XMLReader(); + var domBuilder = options.domBuilder || new DOMHandler(); + var errorHandler = options.errorHandler; + var locator = options.locator; + var defaultNSMap = options.xmlns || {}; + var isHTML = /\/x?html?$/.test(mimeType); + var entityMap = isHTML ? entities.HTML_ENTITIES : entities.XML_ENTITIES; + if (locator) { + domBuilder.setDocumentLocator(locator); + } + sax2.errorHandler = buildErrorHandler(errorHandler, domBuilder, locator); + sax2.domBuilder = options.domBuilder || domBuilder; + if (isHTML) { + defaultNSMap[""] = NAMESPACE.HTML; + } + defaultNSMap.xml = defaultNSMap.xml || NAMESPACE.XML; + var normalize = options.normalizeLineEndings || normalizeLineEndings; + if (source && typeof source === "string") { + sax2.parse( + normalize(source), + defaultNSMap, + entityMap + ); + } else { + sax2.errorHandler.error("invalid doc source"); + } + return domBuilder.doc; + }; + function buildErrorHandler(errorImpl, domBuilder, locator) { + if (!errorImpl) { + if (domBuilder instanceof DOMHandler) { + return domBuilder; + } + errorImpl = domBuilder; + } + var errorHandler = {}; + var isCallback = errorImpl instanceof Function; + locator = locator || {}; + function build(key) { + var fn2 = errorImpl[key]; + if (!fn2 && isCallback) { + fn2 = errorImpl.length == 2 ? function(msg) { + errorImpl(key, msg); + } : errorImpl; + } + errorHandler[key] = fn2 && function(msg) { + fn2("[xmldom " + key + "] " + msg + _locator(locator)); + } || function() { + }; + } + build("warning"); + build("error"); + build("fatalError"); + return errorHandler; + } + function DOMHandler() { + this.cdata = false; + } + function position(locator, node) { + node.lineNumber = locator.lineNumber; + node.columnNumber = locator.columnNumber; + } + DOMHandler.prototype = { + startDocument: function() { + this.doc = new DOMImplementation().createDocument(null, null, null); + if (this.locator) { + this.doc.documentURI = this.locator.systemId; + } + }, + startElement: function(namespaceURI, localName, qName, attrs) { + var doc = this.doc; + var el = doc.createElementNS(namespaceURI, qName || localName); + var len = attrs.length; + appendElement(this, el); + this.currentElement = el; + this.locator && position(this.locator, el); + for (var i = 0; i < len; i++) { + var namespaceURI = attrs.getURI(i); + var value = attrs.getValue(i); + var qName = attrs.getQName(i); + var attr = doc.createAttributeNS(namespaceURI, qName); + this.locator && position(attrs.getLocator(i), attr); + attr.value = attr.nodeValue = value; + el.setAttributeNode(attr); + } + }, + endElement: function(namespaceURI, localName, qName) { + var current = this.currentElement; + var tagName = current.tagName; + this.currentElement = current.parentNode; + }, + startPrefixMapping: function(prefix, uri) { + }, + endPrefixMapping: function(prefix) { + }, + processingInstruction: function(target, data) { + var ins = this.doc.createProcessingInstruction(target, data); + this.locator && position(this.locator, ins); + appendElement(this, ins); + }, + ignorableWhitespace: function(ch, start, length) { + }, + characters: function(chars, start, length) { + chars = _toString.apply(this, arguments); + if (chars) { + if (this.cdata) { + var charNode = this.doc.createCDATASection(chars); + } else { + var charNode = this.doc.createTextNode(chars); + } + if (this.currentElement) { + this.currentElement.appendChild(charNode); + } else if (/^\s*$/.test(chars)) { + this.doc.appendChild(charNode); + } + this.locator && position(this.locator, charNode); + } + }, + skippedEntity: function(name2) { + }, + endDocument: function() { + this.doc.normalize(); + }, + setDocumentLocator: function(locator) { + if (this.locator = locator) { + locator.lineNumber = 0; + } + }, + //LexicalHandler + comment: function(chars, start, length) { + chars = _toString.apply(this, arguments); + var comm = this.doc.createComment(chars); + this.locator && position(this.locator, comm); + appendElement(this, comm); + }, + startCDATA: function() { + this.cdata = true; + }, + endCDATA: function() { + this.cdata = false; + }, + startDTD: function(name2, publicId, systemId) { + var impl = this.doc.implementation; + if (impl && impl.createDocumentType) { + var dt = impl.createDocumentType(name2, publicId, systemId); + this.locator && position(this.locator, dt); + appendElement(this, dt); + this.doc.doctype = dt; + } + }, + /** + * @see org.xml.sax.ErrorHandler + * @link http://www.saxproject.org/apidoc/org/xml/sax/ErrorHandler.html + */ + warning: function(error) { + console.warn("[xmldom warning] " + error, _locator(this.locator)); + }, + error: function(error) { + console.error("[xmldom error] " + error, _locator(this.locator)); + }, + fatalError: function(error) { + throw new ParseError(error, this.locator); + } + }; + function _locator(l) { + if (l) { + return "\n@" + (l.systemId || "") + "#[line:" + l.lineNumber + ",col:" + l.columnNumber + "]"; + } + } + function _toString(chars, start, length) { + if (typeof chars == "string") { + return chars.substr(start, length); + } else { + if (chars.length >= start + length || start) { + return new java.lang.String(chars, start, length) + ""; + } + return chars; + } + } + "endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g, function(key) { + DOMHandler.prototype[key] = function() { + return null; + }; + }); + function appendElement(hander, node) { + if (!hander.currentElement) { + hander.doc.appendChild(node); + } else { + hander.currentElement.appendChild(node); + } + } + exports2.__DOMHandler = DOMHandler; + exports2.normalizeLineEndings = normalizeLineEndings; + exports2.DOMParser = DOMParser2; + } +}); + +// ../../node_modules/@xmldom/xmldom/lib/index.js +var require_lib = __commonJS({ + "../../node_modules/@xmldom/xmldom/lib/index.js"(exports2) { + var dom = require_dom(); + exports2.DOMImplementation = dom.DOMImplementation; + exports2.XMLSerializer = dom.XMLSerializer; + exports2.DOMParser = require_dom_parser().DOMParser; + } +}); + +// ../../node_modules/xpath/xpath.js +var require_xpath = __commonJS({ + "../../node_modules/xpath/xpath.js"(exports2) { + var xpath2 = typeof exports2 === "undefined" ? {} : exports2; + (function(exports3) { + "use strict"; + var NAMESPACE_NODE_NODETYPE = "__namespace"; + var isNil = function(x) { + return x === null || x === void 0; + }; + var isValidNodeType = function(nodeType) { + return nodeType === NAMESPACE_NODE_NODETYPE || Number.isInteger(nodeType) && nodeType >= 1 && nodeType <= 11; + }; + var isNodeLike = function(value) { + return value && isValidNodeType(value.nodeType) && typeof value.nodeName === "string"; + }; + function curry(func) { + var slice = Array.prototype.slice, totalargs = func.length, partial = function(args, fn3) { + return function() { + return fn3.apply(this, args.concat(slice.call(arguments))); + }; + }, fn2 = function() { + var args = slice.call(arguments); + return args.length < totalargs ? partial(args, fn2) : func.apply(this, slice.apply(arguments, [0, totalargs])); + }; + return fn2; + } + var forEach = function(f, xs) { + for (var i = 0; i < xs.length; i += 1) { + f(xs[i], i, xs); + } + }; + var reduce = function(f, seed, xs) { + var acc = seed; + forEach(function(x, i) { + acc = f(acc, x, i); + }, xs); + return acc; + }; + var map = function(f, xs) { + var mapped = new Array(xs.length); + forEach(function(x, i) { + mapped[i] = f(x); + }, xs); + return mapped; + }; + var filter = function(f, xs) { + var filtered = []; + forEach(function(x, i) { + if (f(x, i)) { + filtered.push(x); + } + }, xs); + return filtered; + }; + var includes = function(values, value) { + for (var i = 0; i < values.length; i += 1) { + if (values[i] === value) { + return true; + } + } + return false; + }; + function always(value) { + return function() { + return value; + }; + } + function toString(x) { + return x.toString(); + } + var join = function(s, xs) { + return xs.join(s); + }; + var wrap = function(pref, suf, str) { + return pref + str + suf; + }; + var prototypeConcat = Array.prototype.concat; + var sortNodes = function(nodes, reverse) { + var ns = new XNodeSet(); + ns.addArray(nodes); + var sorted = ns.toArray(); + return reverse ? sorted.reverse() : sorted; + }; + var MAX_ARGUMENT_LENGTH = 32767; + function flatten(arr) { + var result = []; + for (var start = 0; start < arr.length; start += MAX_ARGUMENT_LENGTH) { + var chunk = arr.slice(start, start + MAX_ARGUMENT_LENGTH); + result = prototypeConcat.apply(result, chunk); + } + return result; + } + function assign(target, varArgs) { + var to = Object(target); + for (var index = 1; index < arguments.length; index++) { + var nextSource = arguments[index]; + if (nextSource != null) { + for (var nextKey in nextSource) { + if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) { + to[nextKey] = nextSource[nextKey]; + } + } + } + } + return to; + } + var NodeTypes = { + ELEMENT_NODE: 1, + ATTRIBUTE_NODE: 2, + TEXT_NODE: 3, + CDATA_SECTION_NODE: 4, + PROCESSING_INSTRUCTION_NODE: 7, + COMMENT_NODE: 8, + DOCUMENT_NODE: 9, + DOCUMENT_TYPE_NODE: 10, + DOCUMENT_FRAGMENT_NODE: 11, + NAMESPACE_NODE: NAMESPACE_NODE_NODETYPE + }; + XPathParser.prototype = new Object(); + XPathParser.prototype.constructor = XPathParser; + XPathParser.superclass = Object.prototype; + function XPathParser() { + this.init(); + } + XPathParser.prototype.init = function() { + this.reduceActions = []; + this.reduceActions[3] = function(rhs) { + return new OrOperation(rhs[0], rhs[2]); + }; + this.reduceActions[5] = function(rhs) { + return new AndOperation(rhs[0], rhs[2]); + }; + this.reduceActions[7] = function(rhs) { + return new EqualsOperation(rhs[0], rhs[2]); + }; + this.reduceActions[8] = function(rhs) { + return new NotEqualOperation(rhs[0], rhs[2]); + }; + this.reduceActions[10] = function(rhs) { + return new LessThanOperation(rhs[0], rhs[2]); + }; + this.reduceActions[11] = function(rhs) { + return new GreaterThanOperation(rhs[0], rhs[2]); + }; + this.reduceActions[12] = function(rhs) { + return new LessThanOrEqualOperation(rhs[0], rhs[2]); + }; + this.reduceActions[13] = function(rhs) { + return new GreaterThanOrEqualOperation(rhs[0], rhs[2]); + }; + this.reduceActions[15] = function(rhs) { + return new PlusOperation(rhs[0], rhs[2]); + }; + this.reduceActions[16] = function(rhs) { + return new MinusOperation(rhs[0], rhs[2]); + }; + this.reduceActions[18] = function(rhs) { + return new MultiplyOperation(rhs[0], rhs[2]); + }; + this.reduceActions[19] = function(rhs) { + return new DivOperation(rhs[0], rhs[2]); + }; + this.reduceActions[20] = function(rhs) { + return new ModOperation(rhs[0], rhs[2]); + }; + this.reduceActions[22] = function(rhs) { + return new UnaryMinusOperation(rhs[1]); + }; + this.reduceActions[24] = function(rhs) { + return new BarOperation(rhs[0], rhs[2]); + }; + this.reduceActions[25] = function(rhs) { + return new PathExpr(void 0, void 0, rhs[0]); + }; + this.reduceActions[27] = function(rhs) { + rhs[0].locationPath = rhs[2]; + return rhs[0]; + }; + this.reduceActions[28] = function(rhs) { + rhs[0].locationPath = rhs[2]; + rhs[0].locationPath.steps.unshift(new Step(Step.DESCENDANTORSELF, NodeTest.nodeTest, [])); + return rhs[0]; + }; + this.reduceActions[29] = function(rhs) { + return new PathExpr(rhs[0], [], void 0); + }; + this.reduceActions[30] = function(rhs) { + if (Utilities.instance_of(rhs[0], PathExpr)) { + if (rhs[0].filterPredicates == void 0) { + rhs[0].filterPredicates = []; + } + rhs[0].filterPredicates.push(rhs[1]); + return rhs[0]; + } else { + return new PathExpr(rhs[0], [rhs[1]], void 0); + } + }; + this.reduceActions[32] = function(rhs) { + return rhs[1]; + }; + this.reduceActions[33] = function(rhs) { + return new XString(rhs[0]); + }; + this.reduceActions[34] = function(rhs) { + return new XNumber(rhs[0]); + }; + this.reduceActions[36] = function(rhs) { + return new FunctionCall(rhs[0], []); + }; + this.reduceActions[37] = function(rhs) { + return new FunctionCall(rhs[0], rhs[2]); + }; + this.reduceActions[38] = function(rhs) { + return [rhs[0]]; + }; + this.reduceActions[39] = function(rhs) { + rhs[2].unshift(rhs[0]); + return rhs[2]; + }; + this.reduceActions[43] = function(rhs) { + return new LocationPath(true, []); + }; + this.reduceActions[44] = function(rhs) { + rhs[1].absolute = true; + return rhs[1]; + }; + this.reduceActions[46] = function(rhs) { + return new LocationPath(false, [rhs[0]]); + }; + this.reduceActions[47] = function(rhs) { + rhs[0].steps.push(rhs[2]); + return rhs[0]; + }; + this.reduceActions[49] = function(rhs) { + return new Step(rhs[0], rhs[1], []); + }; + this.reduceActions[50] = function(rhs) { + return new Step(Step.CHILD, rhs[0], []); + }; + this.reduceActions[51] = function(rhs) { + return new Step(rhs[0], rhs[1], rhs[2]); + }; + this.reduceActions[52] = function(rhs) { + return new Step(Step.CHILD, rhs[0], rhs[1]); + }; + this.reduceActions[54] = function(rhs) { + return [rhs[0]]; + }; + this.reduceActions[55] = function(rhs) { + rhs[1].unshift(rhs[0]); + return rhs[1]; + }; + this.reduceActions[56] = function(rhs) { + if (rhs[0] == "ancestor") { + return Step.ANCESTOR; + } else if (rhs[0] == "ancestor-or-self") { + return Step.ANCESTORORSELF; + } else if (rhs[0] == "attribute") { + return Step.ATTRIBUTE; + } else if (rhs[0] == "child") { + return Step.CHILD; + } else if (rhs[0] == "descendant") { + return Step.DESCENDANT; + } else if (rhs[0] == "descendant-or-self") { + return Step.DESCENDANTORSELF; + } else if (rhs[0] == "following") { + return Step.FOLLOWING; + } else if (rhs[0] == "following-sibling") { + return Step.FOLLOWINGSIBLING; + } else if (rhs[0] == "namespace") { + return Step.NAMESPACE; + } else if (rhs[0] == "parent") { + return Step.PARENT; + } else if (rhs[0] == "preceding") { + return Step.PRECEDING; + } else if (rhs[0] == "preceding-sibling") { + return Step.PRECEDINGSIBLING; + } else if (rhs[0] == "self") { + return Step.SELF; + } + return -1; + }; + this.reduceActions[57] = function(rhs) { + return Step.ATTRIBUTE; + }; + this.reduceActions[59] = function(rhs) { + if (rhs[0] == "comment") { + return NodeTest.commentTest; + } else if (rhs[0] == "text") { + return NodeTest.textTest; + } else if (rhs[0] == "processing-instruction") { + return NodeTest.anyPiTest; + } else if (rhs[0] == "node") { + return NodeTest.nodeTest; + } + return new NodeTest(-1, void 0); + }; + this.reduceActions[60] = function(rhs) { + return new NodeTest.PITest(rhs[2]); + }; + this.reduceActions[61] = function(rhs) { + return rhs[1]; + }; + this.reduceActions[63] = function(rhs) { + rhs[1].absolute = true; + rhs[1].steps.unshift(new Step(Step.DESCENDANTORSELF, NodeTest.nodeTest, [])); + return rhs[1]; + }; + this.reduceActions[64] = function(rhs) { + rhs[0].steps.push(new Step(Step.DESCENDANTORSELF, NodeTest.nodeTest, [])); + rhs[0].steps.push(rhs[2]); + return rhs[0]; + }; + this.reduceActions[65] = function(rhs) { + return new Step(Step.SELF, NodeTest.nodeTest, []); + }; + this.reduceActions[66] = function(rhs) { + return new Step(Step.PARENT, NodeTest.nodeTest, []); + }; + this.reduceActions[67] = function(rhs) { + return new VariableReference(rhs[1]); + }; + this.reduceActions[68] = function(rhs) { + return NodeTest.nameTestAny; + }; + this.reduceActions[69] = function(rhs) { + return new NodeTest.NameTestPrefixAny(rhs[0].split(":")[0]); + }; + this.reduceActions[70] = function(rhs) { + return new NodeTest.NameTestQName(rhs[0]); + }; + }; + XPathParser.actionTable = [ + " s s sssssssss s ss s ss", + " s ", + "r rrrrrrrrr rrrrrrr rr r ", + " rrrrr ", + " s s sssssssss s ss s ss", + "rs rrrrrrrr s sssssrrrrrr rrs rs ", + " s s sssssssss s ss s ss", + " s ", + " s ", + "r rrrrrrrrr rrrrrrr rr rr ", + "r rrrrrrrrr rrrrrrr rr rr ", + "r rrrrrrrrr rrrrrrr rr rr ", + "r rrrrrrrrr rrrrrrr rr rr ", + "r rrrrrrrrr rrrrrrr rr rr ", + " s ", + " s ", + " s s sssss s s ", + "r rrrrrrrrr rrrrrrr rr r ", + "a ", + "r s rr r ", + "r sr rr r ", + "r s rr s rr r ", + "r rssrr rss rr r ", + "r rrrrr rrrss rr r ", + "r rrrrrsss rrrrr rr r ", + "r rrrrrrrr rrrrr rr r ", + "r rrrrrrrr rrrrrs rr r ", + "r rrrrrrrr rrrrrr rr r ", + "r rrrrrrrr rrrrrr rr r ", + "r srrrrrrrr rrrrrrs rr sr ", + "r srrrrrrrr rrrrrrs rr r ", + "r rrrrrrrrr rrrrrrr rr rr ", + "r rrrrrrrrr rrrrrrr rr rr ", + "r rrrrrrrrr rrrrrrr rr rr ", + "r rrrrrrrr rrrrrr rr r ", + "r rrrrrrrr rrrrrr rr r ", + "r rrrrrrrrr rrrrrrr rr r ", + "r rrrrrrrrr rrrrrrr rr r ", + " sssss ", + "r rrrrrrrrr rrrrrrr rr sr ", + "r rrrrrrrrr rrrrrrr rr r ", + "r rrrrrrrrr rrrrrrr rr rr ", + "r rrrrrrrrr rrrrrrr rr rr ", + " s ", + "r srrrrrrrr rrrrrrs rr r ", + "r rrrrrrrr rrrrr rr r ", + " s ", + " s ", + " rrrrr ", + " s s sssssssss s sss s ss", + "r srrrrrrrr rrrrrrs rr r ", + " s s sssssssss s ss s ss", + " s s sssssssss s ss s ss", + " s s sssssssss s ss s ss", + " s s sssssssss s ss s ss", + " s s sssssssss s ss s ss", + " s s sssssssss s ss s ss", + " s s sssssssss s ss s ss", + " s s sssssssss s ss s ss", + " s s sssssssss s ss s ss", + " s s sssssssss s ss s ss", + " s s sssssssss s ss s ss", + " s s sssssssss s ss s ss", + " s s sssssssss s ss s ss", + " s s sssssssss ss s ss", + " s s sssssssss s ss s ss", + " s s sssss s s ", + " s s sssss s s ", + "r rrrrrrrrr rrrrrrr rr rr ", + " s s sssss s s ", + " s s sssss s s ", + "r rrrrrrrrr rrrrrrr rr sr ", + "r rrrrrrrrr rrrrrrr rr sr ", + "r rrrrrrrrr rrrrrrr rr r ", + "r rrrrrrrrr rrrrrrr rr rr ", + " s ", + "r rrrrrrrrr rrrrrrr rr rr ", + "r rrrrrrrrr rrrrrrr rr rr ", + " rr ", + " s ", + " rs ", + "r sr rr r ", + "r s rr s rr r ", + "r rssrr rss rr r ", + "r rssrr rss rr r ", + "r rrrrr rrrss rr r ", + "r rrrrr rrrss rr r ", + "r rrrrr rrrss rr r ", + "r rrrrr rrrss rr r ", + "r rrrrrsss rrrrr rr r ", + "r rrrrrsss rrrrr rr r ", + "r rrrrrrrr rrrrr rr r ", + "r rrrrrrrr rrrrr rr r ", + "r rrrrrrrr rrrrr rr r ", + "r rrrrrrrr rrrrrr rr r ", + " r ", + " s ", + "r srrrrrrrr rrrrrrs rr r ", + "r srrrrrrrr rrrrrrs rr r ", + "r rrrrrrrrr rrrrrrr rr r ", + "r rrrrrrrrr rrrrrrr rr r ", + "r rrrrrrrrr rrrrrrr rr r ", + "r rrrrrrrrr rrrrrrr rr r ", + "r rrrrrrrrr rrrrrrr rr rr ", + "r rrrrrrrrr rrrrrrr rr rr ", + " s s sssssssss s ss s ss", + "r rrrrrrrrr rrrrrrr rr rr ", + " r " + ]; + XPathParser.actionTableNumber = [ + ` 1 0 /.-,+*)(' & %$ # "!`, + " J ", + "a aaaaaaaaa aaaaaaa aa a ", + " YYYYY ", + ` 1 0 /.-,+*)(' & %$ # "!`, + `K1 KKKKKKKK . +*)('KKKKKK KK# K" `, + ` 1 0 /.-,+*)(' & %$ # "!`, + " N ", + " O ", + "e eeeeeeeee eeeeeee ee ee ", + "f fffffffff fffffff ff ff ", + "d ddddddddd ddddddd dd dd ", + "B BBBBBBBBB BBBBBBB BB BB ", + "A AAAAAAAAA AAAAAAA AA AA ", + " P ", + " Q ", + ` 1 . +*)(' # " `, + "b bbbbbbbbb bbbbbbb bb b ", + " ", + "! S !! ! ", + '" T" "" " ', + "$ V $$ U $$ $ ", + "& &ZY&& &XW && & ", + ") ))))) )))\\[ )) ) ", + ". ....._^] ..... .. . ", + "1 11111111 11111 11 1 ", + "5 55555555 55555` 55 5 ", + "7 77777777 777777 77 7 ", + "9 99999999 999999 99 9 ", + ": c:::::::: ::::::b :: a: ", + "I fIIIIIIII IIIIIIe II I ", + "= ========= ======= == == ", + "? ????????? ??????? ?? ?? ", + "C CCCCCCCCC CCCCCCC CC CC ", + "J JJJJJJJJ JJJJJJ JJ J ", + "M MMMMMMMM MMMMMM MM M ", + "N NNNNNNNNN NNNNNNN NN N ", + "P PPPPPPPPP PPPPPPP PP P ", + " +*)(' ", + "R RRRRRRRRR RRRRRRR RR aR ", + "U UUUUUUUUU UUUUUUU UU U ", + "Z ZZZZZZZZZ ZZZZZZZ ZZ ZZ ", + "c ccccccccc ccccccc cc cc ", + " j ", + "L fLLLLLLLL LLLLLLe LL L ", + "6 66666666 66666 66 6 ", + " k ", + " l ", + " XXXXX ", + ` 1 0 /.-,+*)(' & %$m # "!`, + "_ f________ ______e __ _ ", + ` 1 0 /.-,+*)(' & %$ # "!`, + ` 1 0 /.-,+*)(' & %$ # "!`, + ` 1 0 /.-,+*)(' & %$ # "!`, + ` 1 0 /.-,+*)(' & %$ # "!`, + ` 1 0 /.-,+*)(' & %$ # "!`, + ` 1 0 /.-,+*)(' & %$ # "!`, + ` 1 0 /.-,+*)(' & %$ # "!`, + ` 1 0 /.-,+*)(' & %$ # "!`, + ` 1 0 /.-,+*)(' & %$ # "!`, + ` 1 0 /.-,+*)(' & %$ # "!`, + ` 1 0 /.-,+*)(' & %$ # "!`, + ` 1 0 /.-,+*)(' & %$ # "!`, + ` 1 0 /.-,+*)(' & %$ # "!`, + ` 1 0 /.-,+*)(' %$ # "!`, + ` 1 0 /.-,+*)(' & %$ # "!`, + ` 1 . +*)(' # " `, + ` 1 . +*)(' # " `, + "> >>>>>>>>> >>>>>>> >> >> ", + ` 1 . +*)(' # " `, + ` 1 . +*)(' # " `, + "Q QQQQQQQQQ QQQQQQQ QQ aQ ", + "V VVVVVVVVV VVVVVVV VV aV ", + "T TTTTTTTTT TTTTTTT TT T ", + "@ @@@@@@@@@ @@@@@@@ @@ @@ ", + " \x87 ", + "[ [[[[[[[[[ [[[[[[[ [[ [[ ", + "D DDDDDDDDD DDDDDDD DD DD ", + " HH ", + " \x88 ", + " F\x89 ", + "# T# ## # ", + "% V %% U %% % ", + "' 'ZY'' 'XW '' ' ", + "( (ZY(( (XW (( ( ", + "+ +++++ +++\\[ ++ + ", + "* ***** ***\\[ ** * ", + "- ----- ---\\[ -- - ", + ", ,,,,, ,,,\\[ ,, , ", + "0 00000_^] 00000 00 0 ", + "/ /////_^] ///// // / ", + "2 22222222 22222 22 2 ", + "3 33333333 33333 33 3 ", + "4 44444444 44444 44 4 ", + "8 88888888 888888 88 8 ", + " ^ ", + " \x8A ", + "; f;;;;;;;; ;;;;;;e ;; ; ", + "< f<<<<<<<< <<<<<?@ AB CDEFGH IJ ", + " ", + " ", + " ", + "L456789:;<=>?@ AB CDEFGH IJ ", + " M EFGH IJ ", + " N;<=>?@ AB CDEFGH IJ ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " S EFGH IJ ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " e ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " h J ", + " i j ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + "o456789:;<=>?@ ABpqCDEFGH IJ ", + " ", + " r6789:;<=>?@ AB CDEFGH IJ ", + " s789:;<=>?@ AB CDEFGH IJ ", + " t89:;<=>?@ AB CDEFGH IJ ", + " u89:;<=>?@ AB CDEFGH IJ ", + " v9:;<=>?@ AB CDEFGH IJ ", + " w9:;<=>?@ AB CDEFGH IJ ", + " x9:;<=>?@ AB CDEFGH IJ ", + " y9:;<=>?@ AB CDEFGH IJ ", + " z:;<=>?@ AB CDEFGH IJ ", + " {:;<=>?@ AB CDEFGH IJ ", + " |;<=>?@ AB CDEFGH IJ ", + " };<=>?@ AB CDEFGH IJ ", + " ~;<=>?@ AB CDEFGH IJ ", + " \x7F=>?@ AB CDEFGH IJ ", + "\x80456789:;<=>?@ AB CDEFGH IJ\x81", + " \x82 EFGH IJ ", + " \x83 EFGH IJ ", + " ", + " \x84 GH IJ ", + " \x85 GH IJ ", + " i \x86 ", + " i \x87 ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + "o456789:;<=>?@ AB\x8CqCDEFGH IJ ", + " ", + " " + ]; + XPathParser.productions = [ + [1, 1, 2], + [2, 1, 3], + [3, 1, 4], + [3, 3, 3, -9, 4], + [4, 1, 5], + [4, 3, 4, -8, 5], + [5, 1, 6], + [5, 3, 5, -22, 6], + [5, 3, 5, -5, 6], + [6, 1, 7], + [6, 3, 6, -23, 7], + [6, 3, 6, -24, 7], + [6, 3, 6, -6, 7], + [6, 3, 6, -7, 7], + [7, 1, 8], + [7, 3, 7, -25, 8], + [7, 3, 7, -26, 8], + [8, 1, 9], + [8, 3, 8, -12, 9], + [8, 3, 8, -11, 9], + [8, 3, 8, -10, 9], + [9, 1, 10], + [9, 2, -26, 9], + [10, 1, 11], + [10, 3, 10, -27, 11], + [11, 1, 12], + [11, 1, 13], + [11, 3, 13, -28, 14], + [11, 3, 13, -4, 14], + [13, 1, 15], + [13, 2, 13, 16], + [15, 1, 17], + [15, 3, -29, 2, -30], + [15, 1, -15], + [15, 1, -16], + [15, 1, 18], + [18, 3, -13, -29, -30], + [18, 4, -13, -29, 19, -30], + [19, 1, 20], + [19, 3, 20, -31, 19], + [20, 1, 2], + [12, 1, 14], + [12, 1, 21], + [21, 1, -28], + [21, 2, -28, 14], + [21, 1, 22], + [14, 1, 23], + [14, 3, 14, -28, 23], + [14, 1, 24], + [23, 2, 25, 26], + [23, 1, 26], + [23, 3, 25, 26, 27], + [23, 2, 26, 27], + [23, 1, 28], + [27, 1, 16], + [27, 2, 16, 27], + [25, 2, -14, -3], + [25, 1, -32], + [26, 1, 29], + [26, 3, -20, -29, -30], + [26, 4, -21, -29, -15, -30], + [16, 3, -33, 30, -34], + [30, 1, 2], + [22, 2, -4, 14], + [24, 3, 14, -4, 23], + [28, 1, -35], + [28, 1, -2], + [17, 2, -36, -18], + [29, 1, -17], + [29, 1, -19], + [29, 1, -18] + ]; + XPathParser.DOUBLEDOT = 2; + XPathParser.DOUBLECOLON = 3; + XPathParser.DOUBLESLASH = 4; + XPathParser.NOTEQUAL = 5; + XPathParser.LESSTHANOREQUAL = 6; + XPathParser.GREATERTHANOREQUAL = 7; + XPathParser.AND = 8; + XPathParser.OR = 9; + XPathParser.MOD = 10; + XPathParser.DIV = 11; + XPathParser.MULTIPLYOPERATOR = 12; + XPathParser.FUNCTIONNAME = 13; + XPathParser.AXISNAME = 14; + XPathParser.LITERAL = 15; + XPathParser.NUMBER = 16; + XPathParser.ASTERISKNAMETEST = 17; + XPathParser.QNAME = 18; + XPathParser.NCNAMECOLONASTERISK = 19; + XPathParser.NODETYPE = 20; + XPathParser.PROCESSINGINSTRUCTIONWITHLITERAL = 21; + XPathParser.EQUALS = 22; + XPathParser.LESSTHAN = 23; + XPathParser.GREATERTHAN = 24; + XPathParser.PLUS = 25; + XPathParser.MINUS = 26; + XPathParser.BAR = 27; + XPathParser.SLASH = 28; + XPathParser.LEFTPARENTHESIS = 29; + XPathParser.RIGHTPARENTHESIS = 30; + XPathParser.COMMA = 31; + XPathParser.AT = 32; + XPathParser.LEFTBRACKET = 33; + XPathParser.RIGHTBRACKET = 34; + XPathParser.DOT = 35; + XPathParser.DOLLAR = 36; + XPathParser.prototype.tokenize = function(s1) { + var types = []; + var values = []; + var s = s1 + "\0"; + var pos = 0; + var c = s.charAt(pos++); + while (1) { + while (c == " " || c == " " || c == "\r" || c == "\n") { + c = s.charAt(pos++); + } + if (c == "\0" || pos >= s.length) { + break; + } + if (c == "(") { + types.push(XPathParser.LEFTPARENTHESIS); + values.push(c); + c = s.charAt(pos++); + continue; + } + if (c == ")") { + types.push(XPathParser.RIGHTPARENTHESIS); + values.push(c); + c = s.charAt(pos++); + continue; + } + if (c == "[") { + types.push(XPathParser.LEFTBRACKET); + values.push(c); + c = s.charAt(pos++); + continue; + } + if (c == "]") { + types.push(XPathParser.RIGHTBRACKET); + values.push(c); + c = s.charAt(pos++); + continue; + } + if (c == "@") { + types.push(XPathParser.AT); + values.push(c); + c = s.charAt(pos++); + continue; + } + if (c == ",") { + types.push(XPathParser.COMMA); + values.push(c); + c = s.charAt(pos++); + continue; + } + if (c == "|") { + types.push(XPathParser.BAR); + values.push(c); + c = s.charAt(pos++); + continue; + } + if (c == "+") { + types.push(XPathParser.PLUS); + values.push(c); + c = s.charAt(pos++); + continue; + } + if (c == "-") { + types.push(XPathParser.MINUS); + values.push(c); + c = s.charAt(pos++); + continue; + } + if (c == "=") { + types.push(XPathParser.EQUALS); + values.push(c); + c = s.charAt(pos++); + continue; + } + if (c == "$") { + types.push(XPathParser.DOLLAR); + values.push(c); + c = s.charAt(pos++); + continue; + } + if (c == ".") { + c = s.charAt(pos++); + if (c == ".") { + types.push(XPathParser.DOUBLEDOT); + values.push(".."); + c = s.charAt(pos++); + continue; + } + if (c >= "0" && c <= "9") { + var number = "." + c; + c = s.charAt(pos++); + while (c >= "0" && c <= "9") { + number += c; + c = s.charAt(pos++); + } + types.push(XPathParser.NUMBER); + values.push(number); + continue; + } + types.push(XPathParser.DOT); + values.push("."); + continue; + } + if (c == "'" || c == '"') { + var delimiter = c; + var literal = ""; + while (pos < s.length && (c = s.charAt(pos)) !== delimiter) { + literal += c; + pos += 1; + } + if (c !== delimiter) { + throw XPathException.fromMessage("Unterminated string literal: " + delimiter + literal); + } + pos += 1; + types.push(XPathParser.LITERAL); + values.push(literal); + c = s.charAt(pos++); + continue; + } + if (c >= "0" && c <= "9") { + var number = c; + c = s.charAt(pos++); + while (c >= "0" && c <= "9") { + number += c; + c = s.charAt(pos++); + } + if (c == ".") { + if (s.charAt(pos) >= "0" && s.charAt(pos) <= "9") { + number += c; + number += s.charAt(pos++); + c = s.charAt(pos++); + while (c >= "0" && c <= "9") { + number += c; + c = s.charAt(pos++); + } + } + } + types.push(XPathParser.NUMBER); + values.push(number); + continue; + } + if (c == "*") { + if (types.length > 0) { + var last = types[types.length - 1]; + if (last != XPathParser.AT && last != XPathParser.DOUBLECOLON && last != XPathParser.LEFTPARENTHESIS && last != XPathParser.LEFTBRACKET && last != XPathParser.AND && last != XPathParser.OR && last != XPathParser.MOD && last != XPathParser.DIV && last != XPathParser.MULTIPLYOPERATOR && last != XPathParser.SLASH && last != XPathParser.DOUBLESLASH && last != XPathParser.BAR && last != XPathParser.PLUS && last != XPathParser.MINUS && last != XPathParser.EQUALS && last != XPathParser.NOTEQUAL && last != XPathParser.LESSTHAN && last != XPathParser.LESSTHANOREQUAL && last != XPathParser.GREATERTHAN && last != XPathParser.GREATERTHANOREQUAL) { + types.push(XPathParser.MULTIPLYOPERATOR); + values.push(c); + c = s.charAt(pos++); + continue; + } + } + types.push(XPathParser.ASTERISKNAMETEST); + values.push(c); + c = s.charAt(pos++); + continue; + } + if (c == ":") { + if (s.charAt(pos) == ":") { + types.push(XPathParser.DOUBLECOLON); + values.push("::"); + pos++; + c = s.charAt(pos++); + continue; + } + } + if (c == "/") { + c = s.charAt(pos++); + if (c == "/") { + types.push(XPathParser.DOUBLESLASH); + values.push("//"); + c = s.charAt(pos++); + continue; + } + types.push(XPathParser.SLASH); + values.push("/"); + continue; + } + if (c == "!") { + if (s.charAt(pos) == "=") { + types.push(XPathParser.NOTEQUAL); + values.push("!="); + pos++; + c = s.charAt(pos++); + continue; + } + } + if (c == "<") { + if (s.charAt(pos) == "=") { + types.push(XPathParser.LESSTHANOREQUAL); + values.push("<="); + pos++; + c = s.charAt(pos++); + continue; + } + types.push(XPathParser.LESSTHAN); + values.push("<"); + c = s.charAt(pos++); + continue; + } + if (c == ">") { + if (s.charAt(pos) == "=") { + types.push(XPathParser.GREATERTHANOREQUAL); + values.push(">="); + pos++; + c = s.charAt(pos++); + continue; + } + types.push(XPathParser.GREATERTHAN); + values.push(">"); + c = s.charAt(pos++); + continue; + } + if (c == "_" || Utilities.isLetter(c.charCodeAt(0))) { + var name2 = c; + c = s.charAt(pos++); + while (Utilities.isNCNameChar(c.charCodeAt(0))) { + name2 += c; + c = s.charAt(pos++); + } + if (types.length > 0) { + var last = types[types.length - 1]; + if (last != XPathParser.AT && last != XPathParser.DOUBLECOLON && last != XPathParser.LEFTPARENTHESIS && last != XPathParser.LEFTBRACKET && last != XPathParser.AND && last != XPathParser.OR && last != XPathParser.MOD && last != XPathParser.DIV && last != XPathParser.MULTIPLYOPERATOR && last != XPathParser.SLASH && last != XPathParser.DOUBLESLASH && last != XPathParser.BAR && last != XPathParser.PLUS && last != XPathParser.MINUS && last != XPathParser.EQUALS && last != XPathParser.NOTEQUAL && last != XPathParser.LESSTHAN && last != XPathParser.LESSTHANOREQUAL && last != XPathParser.GREATERTHAN && last != XPathParser.GREATERTHANOREQUAL) { + if (name2 == "and") { + types.push(XPathParser.AND); + values.push(name2); + continue; + } + if (name2 == "or") { + types.push(XPathParser.OR); + values.push(name2); + continue; + } + if (name2 == "mod") { + types.push(XPathParser.MOD); + values.push(name2); + continue; + } + if (name2 == "div") { + types.push(XPathParser.DIV); + values.push(name2); + continue; + } + } + } + if (c == ":") { + if (s.charAt(pos) == "*") { + types.push(XPathParser.NCNAMECOLONASTERISK); + values.push(name2 + ":*"); + pos++; + c = s.charAt(pos++); + continue; + } + if (s.charAt(pos) == "_" || Utilities.isLetter(s.charCodeAt(pos))) { + name2 += ":"; + c = s.charAt(pos++); + while (Utilities.isNCNameChar(c.charCodeAt(0))) { + name2 += c; + c = s.charAt(pos++); + } + if (c == "(") { + types.push(XPathParser.FUNCTIONNAME); + values.push(name2); + continue; + } + types.push(XPathParser.QNAME); + values.push(name2); + continue; + } + if (s.charAt(pos) == ":") { + types.push(XPathParser.AXISNAME); + values.push(name2); + continue; + } + } + if (c == "(") { + if (name2 == "comment" || name2 == "text" || name2 == "node") { + types.push(XPathParser.NODETYPE); + values.push(name2); + continue; + } + if (name2 == "processing-instruction") { + if (s.charAt(pos) == ")") { + types.push(XPathParser.NODETYPE); + } else { + types.push(XPathParser.PROCESSINGINSTRUCTIONWITHLITERAL); + } + values.push(name2); + continue; + } + types.push(XPathParser.FUNCTIONNAME); + values.push(name2); + continue; + } + types.push(XPathParser.QNAME); + values.push(name2); + continue; + } + throw new Error("Unexpected character " + c); + } + types.push(1); + values.push("[EOF]"); + return [types, values]; + }; + XPathParser.SHIFT = "s"; + XPathParser.REDUCE = "r"; + XPathParser.ACCEPT = "a"; + XPathParser.prototype.parse = function(s) { + if (!s) { + throw new Error("XPath expression unspecified."); + } + if (typeof s !== "string") { + throw new Error("XPath expression must be a string."); + } + var types; + var values; + var res = this.tokenize(s); + if (res == void 0) { + return void 0; + } + types = res[0]; + values = res[1]; + var tokenPos = 0; + var state = []; + var tokenType = []; + var tokenValue = []; + var s; + var a; + var t; + state.push(0); + tokenType.push(1); + tokenValue.push("_S"); + a = types[tokenPos]; + t = values[tokenPos++]; + while (1) { + s = state[state.length - 1]; + switch (XPathParser.actionTable[s].charAt(a - 1)) { + case XPathParser.SHIFT: + tokenType.push(-a); + tokenValue.push(t); + state.push(XPathParser.actionTableNumber[s].charCodeAt(a - 1) - 32); + a = types[tokenPos]; + t = values[tokenPos++]; + break; + case XPathParser.REDUCE: + var num = XPathParser.productions[XPathParser.actionTableNumber[s].charCodeAt(a - 1) - 32][1]; + var rhs = []; + for (var i = 0; i < num; i++) { + tokenType.pop(); + rhs.unshift(tokenValue.pop()); + state.pop(); + } + var s_ = state[state.length - 1]; + tokenType.push(XPathParser.productions[XPathParser.actionTableNumber[s].charCodeAt(a - 1) - 32][0]); + if (this.reduceActions[XPathParser.actionTableNumber[s].charCodeAt(a - 1) - 32] == void 0) { + tokenValue.push(rhs[0]); + } else { + tokenValue.push(this.reduceActions[XPathParser.actionTableNumber[s].charCodeAt(a - 1) - 32](rhs)); + } + state.push(XPathParser.gotoTable[s_].charCodeAt(XPathParser.productions[XPathParser.actionTableNumber[s].charCodeAt(a - 1) - 32][0] - 2) - 33); + break; + case XPathParser.ACCEPT: + return new XPath(tokenValue.pop()); + default: + throw new Error("XPath parse error"); + } + } + }; + XPath.prototype = new Object(); + XPath.prototype.constructor = XPath; + XPath.superclass = Object.prototype; + function XPath(e) { + this.expression = e; + } + XPath.prototype.toString = function() { + return this.expression.toString(); + }; + function setIfUnset(obj, prop, value) { + if (!(prop in obj)) { + obj[prop] = value; + } + } + XPath.prototype.evaluate = function(c) { + var node = c.expressionContextNode; + if (!(isNil(node) || isNodeLike(node))) { + throw new Error("Context node does not appear to be a valid DOM node."); + } + c.contextNode = c.expressionContextNode; + c.contextSize = 1; + c.contextPosition = 1; + if (c.isHtml) { + setIfUnset(c, "caseInsensitive", true); + setIfUnset(c, "allowAnyNamespaceForNoPrefix", true); + } + setIfUnset(c, "caseInsensitive", false); + return this.expression.evaluate(c); + }; + XPath.XML_NAMESPACE_URI = "http://www.w3.org/XML/1998/namespace"; + XPath.XMLNS_NAMESPACE_URI = "http://www.w3.org/2000/xmlns/"; + Expression.prototype = new Object(); + Expression.prototype.constructor = Expression; + Expression.superclass = Object.prototype; + function Expression() { + } + Expression.prototype.init = function() { + }; + Expression.prototype.toString = function() { + return ""; + }; + Expression.prototype.evaluate = function(c) { + throw new Error("Could not evaluate expression."); + }; + UnaryOperation.prototype = new Expression(); + UnaryOperation.prototype.constructor = UnaryOperation; + UnaryOperation.superclass = Expression.prototype; + function UnaryOperation(rhs) { + if (arguments.length > 0) { + this.init(rhs); + } + } + UnaryOperation.prototype.init = function(rhs) { + this.rhs = rhs; + }; + UnaryMinusOperation.prototype = new UnaryOperation(); + UnaryMinusOperation.prototype.constructor = UnaryMinusOperation; + UnaryMinusOperation.superclass = UnaryOperation.prototype; + function UnaryMinusOperation(rhs) { + if (arguments.length > 0) { + this.init(rhs); + } + } + UnaryMinusOperation.prototype.init = function(rhs) { + UnaryMinusOperation.superclass.init.call(this, rhs); + }; + UnaryMinusOperation.prototype.evaluate = function(c) { + return this.rhs.evaluate(c).number().negate(); + }; + UnaryMinusOperation.prototype.toString = function() { + return "-" + this.rhs.toString(); + }; + BinaryOperation.prototype = new Expression(); + BinaryOperation.prototype.constructor = BinaryOperation; + BinaryOperation.superclass = Expression.prototype; + function BinaryOperation(lhs, rhs) { + if (arguments.length > 0) { + this.init(lhs, rhs); + } + } + BinaryOperation.prototype.init = function(lhs, rhs) { + this.lhs = lhs; + this.rhs = rhs; + }; + OrOperation.prototype = new BinaryOperation(); + OrOperation.prototype.constructor = OrOperation; + OrOperation.superclass = BinaryOperation.prototype; + function OrOperation(lhs, rhs) { + if (arguments.length > 0) { + this.init(lhs, rhs); + } + } + OrOperation.prototype.init = function(lhs, rhs) { + OrOperation.superclass.init.call(this, lhs, rhs); + }; + OrOperation.prototype.toString = function() { + return "(" + this.lhs.toString() + " or " + this.rhs.toString() + ")"; + }; + OrOperation.prototype.evaluate = function(c) { + var b = this.lhs.evaluate(c).bool(); + if (b.booleanValue()) { + return b; + } + return this.rhs.evaluate(c).bool(); + }; + AndOperation.prototype = new BinaryOperation(); + AndOperation.prototype.constructor = AndOperation; + AndOperation.superclass = BinaryOperation.prototype; + function AndOperation(lhs, rhs) { + if (arguments.length > 0) { + this.init(lhs, rhs); + } + } + AndOperation.prototype.init = function(lhs, rhs) { + AndOperation.superclass.init.call(this, lhs, rhs); + }; + AndOperation.prototype.toString = function() { + return "(" + this.lhs.toString() + " and " + this.rhs.toString() + ")"; + }; + AndOperation.prototype.evaluate = function(c) { + var b = this.lhs.evaluate(c).bool(); + if (!b.booleanValue()) { + return b; + } + return this.rhs.evaluate(c).bool(); + }; + EqualsOperation.prototype = new BinaryOperation(); + EqualsOperation.prototype.constructor = EqualsOperation; + EqualsOperation.superclass = BinaryOperation.prototype; + function EqualsOperation(lhs, rhs) { + if (arguments.length > 0) { + this.init(lhs, rhs); + } + } + EqualsOperation.prototype.init = function(lhs, rhs) { + EqualsOperation.superclass.init.call(this, lhs, rhs); + }; + EqualsOperation.prototype.toString = function() { + return "(" + this.lhs.toString() + " = " + this.rhs.toString() + ")"; + }; + EqualsOperation.prototype.evaluate = function(c) { + return this.lhs.evaluate(c).equals(this.rhs.evaluate(c)); + }; + NotEqualOperation.prototype = new BinaryOperation(); + NotEqualOperation.prototype.constructor = NotEqualOperation; + NotEqualOperation.superclass = BinaryOperation.prototype; + function NotEqualOperation(lhs, rhs) { + if (arguments.length > 0) { + this.init(lhs, rhs); + } + } + NotEqualOperation.prototype.init = function(lhs, rhs) { + NotEqualOperation.superclass.init.call(this, lhs, rhs); + }; + NotEqualOperation.prototype.toString = function() { + return "(" + this.lhs.toString() + " != " + this.rhs.toString() + ")"; + }; + NotEqualOperation.prototype.evaluate = function(c) { + return this.lhs.evaluate(c).notequal(this.rhs.evaluate(c)); + }; + LessThanOperation.prototype = new BinaryOperation(); + LessThanOperation.prototype.constructor = LessThanOperation; + LessThanOperation.superclass = BinaryOperation.prototype; + function LessThanOperation(lhs, rhs) { + if (arguments.length > 0) { + this.init(lhs, rhs); + } + } + LessThanOperation.prototype.init = function(lhs, rhs) { + LessThanOperation.superclass.init.call(this, lhs, rhs); + }; + LessThanOperation.prototype.evaluate = function(c) { + return this.lhs.evaluate(c).lessthan(this.rhs.evaluate(c)); + }; + LessThanOperation.prototype.toString = function() { + return "(" + this.lhs.toString() + " < " + this.rhs.toString() + ")"; + }; + GreaterThanOperation.prototype = new BinaryOperation(); + GreaterThanOperation.prototype.constructor = GreaterThanOperation; + GreaterThanOperation.superclass = BinaryOperation.prototype; + function GreaterThanOperation(lhs, rhs) { + if (arguments.length > 0) { + this.init(lhs, rhs); + } + } + GreaterThanOperation.prototype.init = function(lhs, rhs) { + GreaterThanOperation.superclass.init.call(this, lhs, rhs); + }; + GreaterThanOperation.prototype.evaluate = function(c) { + return this.lhs.evaluate(c).greaterthan(this.rhs.evaluate(c)); + }; + GreaterThanOperation.prototype.toString = function() { + return "(" + this.lhs.toString() + " > " + this.rhs.toString() + ")"; + }; + LessThanOrEqualOperation.prototype = new BinaryOperation(); + LessThanOrEqualOperation.prototype.constructor = LessThanOrEqualOperation; + LessThanOrEqualOperation.superclass = BinaryOperation.prototype; + function LessThanOrEqualOperation(lhs, rhs) { + if (arguments.length > 0) { + this.init(lhs, rhs); + } + } + LessThanOrEqualOperation.prototype.init = function(lhs, rhs) { + LessThanOrEqualOperation.superclass.init.call(this, lhs, rhs); + }; + LessThanOrEqualOperation.prototype.evaluate = function(c) { + return this.lhs.evaluate(c).lessthanorequal(this.rhs.evaluate(c)); + }; + LessThanOrEqualOperation.prototype.toString = function() { + return "(" + this.lhs.toString() + " <= " + this.rhs.toString() + ")"; + }; + GreaterThanOrEqualOperation.prototype = new BinaryOperation(); + GreaterThanOrEqualOperation.prototype.constructor = GreaterThanOrEqualOperation; + GreaterThanOrEqualOperation.superclass = BinaryOperation.prototype; + function GreaterThanOrEqualOperation(lhs, rhs) { + if (arguments.length > 0) { + this.init(lhs, rhs); + } + } + GreaterThanOrEqualOperation.prototype.init = function(lhs, rhs) { + GreaterThanOrEqualOperation.superclass.init.call(this, lhs, rhs); + }; + GreaterThanOrEqualOperation.prototype.evaluate = function(c) { + return this.lhs.evaluate(c).greaterthanorequal(this.rhs.evaluate(c)); + }; + GreaterThanOrEqualOperation.prototype.toString = function() { + return "(" + this.lhs.toString() + " >= " + this.rhs.toString() + ")"; + }; + PlusOperation.prototype = new BinaryOperation(); + PlusOperation.prototype.constructor = PlusOperation; + PlusOperation.superclass = BinaryOperation.prototype; + function PlusOperation(lhs, rhs) { + if (arguments.length > 0) { + this.init(lhs, rhs); + } + } + PlusOperation.prototype.init = function(lhs, rhs) { + PlusOperation.superclass.init.call(this, lhs, rhs); + }; + PlusOperation.prototype.evaluate = function(c) { + return this.lhs.evaluate(c).number().plus(this.rhs.evaluate(c).number()); + }; + PlusOperation.prototype.toString = function() { + return "(" + this.lhs.toString() + " + " + this.rhs.toString() + ")"; + }; + MinusOperation.prototype = new BinaryOperation(); + MinusOperation.prototype.constructor = MinusOperation; + MinusOperation.superclass = BinaryOperation.prototype; + function MinusOperation(lhs, rhs) { + if (arguments.length > 0) { + this.init(lhs, rhs); + } + } + MinusOperation.prototype.init = function(lhs, rhs) { + MinusOperation.superclass.init.call(this, lhs, rhs); + }; + MinusOperation.prototype.evaluate = function(c) { + return this.lhs.evaluate(c).number().minus(this.rhs.evaluate(c).number()); + }; + MinusOperation.prototype.toString = function() { + return "(" + this.lhs.toString() + " - " + this.rhs.toString() + ")"; + }; + MultiplyOperation.prototype = new BinaryOperation(); + MultiplyOperation.prototype.constructor = MultiplyOperation; + MultiplyOperation.superclass = BinaryOperation.prototype; + function MultiplyOperation(lhs, rhs) { + if (arguments.length > 0) { + this.init(lhs, rhs); + } + } + MultiplyOperation.prototype.init = function(lhs, rhs) { + MultiplyOperation.superclass.init.call(this, lhs, rhs); + }; + MultiplyOperation.prototype.evaluate = function(c) { + return this.lhs.evaluate(c).number().multiply(this.rhs.evaluate(c).number()); + }; + MultiplyOperation.prototype.toString = function() { + return "(" + this.lhs.toString() + " * " + this.rhs.toString() + ")"; + }; + DivOperation.prototype = new BinaryOperation(); + DivOperation.prototype.constructor = DivOperation; + DivOperation.superclass = BinaryOperation.prototype; + function DivOperation(lhs, rhs) { + if (arguments.length > 0) { + this.init(lhs, rhs); + } + } + DivOperation.prototype.init = function(lhs, rhs) { + DivOperation.superclass.init.call(this, lhs, rhs); + }; + DivOperation.prototype.evaluate = function(c) { + return this.lhs.evaluate(c).number().div(this.rhs.evaluate(c).number()); + }; + DivOperation.prototype.toString = function() { + return "(" + this.lhs.toString() + " div " + this.rhs.toString() + ")"; + }; + ModOperation.prototype = new BinaryOperation(); + ModOperation.prototype.constructor = ModOperation; + ModOperation.superclass = BinaryOperation.prototype; + function ModOperation(lhs, rhs) { + if (arguments.length > 0) { + this.init(lhs, rhs); + } + } + ModOperation.prototype.init = function(lhs, rhs) { + ModOperation.superclass.init.call(this, lhs, rhs); + }; + ModOperation.prototype.evaluate = function(c) { + return this.lhs.evaluate(c).number().mod(this.rhs.evaluate(c).number()); + }; + ModOperation.prototype.toString = function() { + return "(" + this.lhs.toString() + " mod " + this.rhs.toString() + ")"; + }; + BarOperation.prototype = new BinaryOperation(); + BarOperation.prototype.constructor = BarOperation; + BarOperation.superclass = BinaryOperation.prototype; + function BarOperation(lhs, rhs) { + if (arguments.length > 0) { + this.init(lhs, rhs); + } + } + BarOperation.prototype.init = function(lhs, rhs) { + BarOperation.superclass.init.call(this, lhs, rhs); + }; + BarOperation.prototype.evaluate = function(c) { + return this.lhs.evaluate(c).nodeset().union(this.rhs.evaluate(c).nodeset()); + }; + BarOperation.prototype.toString = function() { + return map(toString, [this.lhs, this.rhs]).join(" | "); + }; + PathExpr.prototype = new Expression(); + PathExpr.prototype.constructor = PathExpr; + PathExpr.superclass = Expression.prototype; + function PathExpr(filter2, filterPreds, locpath) { + if (arguments.length > 0) { + this.init(filter2, filterPreds, locpath); + } + } + PathExpr.prototype.init = function(filter2, filterPreds, locpath) { + PathExpr.superclass.init.call(this); + this.filter = filter2; + this.filterPredicates = filterPreds; + this.locationPath = locpath; + }; + function findRoot(node) { + while (node && node.parentNode) { + node = node.parentNode; + } + return node; + } + var applyPredicates = function(predicates, c, nodes, reverse) { + if (predicates.length === 0) { + return nodes; + } + var ctx = c.extend({}); + return reduce( + function(inNodes, pred) { + ctx.contextSize = inNodes.length; + return filter( + function(node, i) { + ctx.contextNode = node; + ctx.contextPosition = i + 1; + return PathExpr.predicateMatches(pred, ctx); + }, + inNodes + ); + }, + sortNodes(nodes, reverse), + predicates + ); + }; + PathExpr.getRoot = function(xpc, nodes) { + var firstNode = nodes[0]; + if (firstNode && firstNode.nodeType === NodeTypes.DOCUMENT_NODE) { + return firstNode; + } + if (xpc.virtualRoot) { + return xpc.virtualRoot; + } + if (!firstNode) { + throw new Error("Context node not found when determining document root."); + } + var ownerDoc = firstNode.ownerDocument; + if (ownerDoc) { + return ownerDoc; + } + var n = firstNode; + while (n.parentNode != null) { + n = n.parentNode; + } + return n; + }; + var getPrefixForNamespaceNode = function(attrNode) { + var nm = String(attrNode.name); + if (nm === "xmlns") { + return ""; + } + if (nm.substring(0, 6) === "xmlns:") { + return nm.substring(6, nm.length); + } + return null; + }; + PathExpr.applyStep = function(step, xpc, node) { + if (!node) { + throw new Error("Context node not found when evaluating XPath step: " + step); + } + var newNodes = []; + xpc.contextNode = node; + switch (step.axis) { + case Step.ANCESTOR: + if (xpc.contextNode === xpc.virtualRoot) { + break; + } + var m; + if (xpc.contextNode.nodeType == NodeTypes.ATTRIBUTE_NODE) { + m = PathExpr.getOwnerElement(xpc.contextNode); + } else { + m = xpc.contextNode.parentNode; + } + while (m != null) { + if (step.nodeTest.matches(m, xpc)) { + newNodes.push(m); + } + if (m === xpc.virtualRoot) { + break; + } + m = m.parentNode; + } + break; + case Step.ANCESTORORSELF: + for (var m = xpc.contextNode; m != null; m = m.nodeType == NodeTypes.ATTRIBUTE_NODE ? PathExpr.getOwnerElement(m) : m.parentNode) { + if (step.nodeTest.matches(m, xpc)) { + newNodes.push(m); + } + if (m === xpc.virtualRoot) { + break; + } + } + break; + case Step.ATTRIBUTE: + var nnm = xpc.contextNode.attributes; + if (nnm != null) { + for (var k = 0; k < nnm.length; k++) { + var m = nnm.item(k); + if (step.nodeTest.matches(m, xpc)) { + newNodes.push(m); + } + } + } + break; + case Step.CHILD: + for (var m = xpc.contextNode.firstChild; m != null; m = m.nextSibling) { + if (step.nodeTest.matches(m, xpc)) { + newNodes.push(m); + } + } + break; + case Step.DESCENDANT: + var st = [xpc.contextNode.firstChild]; + while (st.length > 0) { + for (var m = st.pop(); m != null; ) { + if (step.nodeTest.matches(m, xpc)) { + newNodes.push(m); + } + if (m.firstChild != null) { + st.push(m.nextSibling); + m = m.firstChild; + } else { + m = m.nextSibling; + } + } + } + break; + case Step.DESCENDANTORSELF: + if (step.nodeTest.matches(xpc.contextNode, xpc)) { + newNodes.push(xpc.contextNode); + } + var st = [xpc.contextNode.firstChild]; + while (st.length > 0) { + for (var m = st.pop(); m != null; ) { + if (step.nodeTest.matches(m, xpc)) { + newNodes.push(m); + } + if (m.firstChild != null) { + st.push(m.nextSibling); + m = m.firstChild; + } else { + m = m.nextSibling; + } + } + } + break; + case Step.FOLLOWING: + if (xpc.contextNode === xpc.virtualRoot) { + break; + } + var st = []; + if (xpc.contextNode.firstChild != null) { + st.unshift(xpc.contextNode.firstChild); + } else { + st.unshift(xpc.contextNode.nextSibling); + } + for (var m = xpc.contextNode.parentNode; m != null && m.nodeType != NodeTypes.DOCUMENT_NODE && m !== xpc.virtualRoot; m = m.parentNode) { + st.unshift(m.nextSibling); + } + do { + for (var m = st.pop(); m != null; ) { + if (step.nodeTest.matches(m, xpc)) { + newNodes.push(m); + } + if (m.firstChild != null) { + st.push(m.nextSibling); + m = m.firstChild; + } else { + m = m.nextSibling; + } + } + } while (st.length > 0); + break; + case Step.FOLLOWINGSIBLING: + if (xpc.contextNode === xpc.virtualRoot) { + break; + } + for (var m = xpc.contextNode.nextSibling; m != null; m = m.nextSibling) { + if (step.nodeTest.matches(m, xpc)) { + newNodes.push(m); + } + } + break; + case Step.NAMESPACE: + var nodes = {}; + if (xpc.contextNode.nodeType == NodeTypes.ELEMENT_NODE) { + nodes["xml"] = new XPathNamespace("xml", null, XPath.XML_NAMESPACE_URI, xpc.contextNode); + for (var m = xpc.contextNode; m != null && m.nodeType == NodeTypes.ELEMENT_NODE; m = m.parentNode) { + for (var k = 0; k < m.attributes.length; k++) { + var attr = m.attributes.item(k); + var pre = getPrefixForNamespaceNode(attr); + if (pre != null && nodes[pre] == void 0) { + nodes[pre] = new XPathNamespace(pre, attr, attr.value, xpc.contextNode); + } + } + } + for (var pre in nodes) { + var node = nodes[pre]; + if (step.nodeTest.matches(node, xpc)) { + newNodes.push(node); + } + } + } + break; + case Step.PARENT: + m = null; + if (xpc.contextNode !== xpc.virtualRoot) { + if (xpc.contextNode.nodeType == NodeTypes.ATTRIBUTE_NODE) { + m = PathExpr.getOwnerElement(xpc.contextNode); + } else { + m = xpc.contextNode.parentNode; + } + } + if (m != null && step.nodeTest.matches(m, xpc)) { + newNodes.push(m); + } + break; + case Step.PRECEDING: + var st; + if (xpc.virtualRoot != null) { + st = [xpc.virtualRoot]; + } else { + st = [findRoot(xpc.contextNode)]; + } + outer: while (st.length > 0) { + for (var m = st.pop(); m != null; ) { + if (m == xpc.contextNode) { + break outer; + } + if (step.nodeTest.matches(m, xpc)) { + newNodes.unshift(m); + } + if (m.firstChild != null) { + st.push(m.nextSibling); + m = m.firstChild; + } else { + m = m.nextSibling; + } + } + } + break; + case Step.PRECEDINGSIBLING: + if (xpc.contextNode === xpc.virtualRoot) { + break; + } + for (var m = xpc.contextNode.previousSibling; m != null; m = m.previousSibling) { + if (step.nodeTest.matches(m, xpc)) { + newNodes.push(m); + } + } + break; + case Step.SELF: + if (step.nodeTest.matches(xpc.contextNode, xpc)) { + newNodes.push(xpc.contextNode); + } + break; + default: + } + return newNodes; + }; + function applyStepWithPredicates(step, xpc, node) { + return applyPredicates( + step.predicates, + xpc, + PathExpr.applyStep(step, xpc, node), + includes(REVERSE_AXES, step.axis) + ); + } + function applyStepToNodes(context, nodes, step) { + return flatten( + map( + applyStepWithPredicates.bind(null, step, context), + nodes + ) + ); + } + PathExpr.applySteps = function(steps, xpc, nodes) { + return reduce( + applyStepToNodes.bind(null, xpc), + nodes, + steps + ); + }; + PathExpr.prototype.applyFilter = function(c, xpc) { + if (!this.filter) { + return { nodes: [c.contextNode] }; + } + var ns = this.filter.evaluate(c); + if (!Utilities.instance_of(ns, XNodeSet)) { + if (this.filterPredicates != null && this.filterPredicates.length > 0 || this.locationPath != null) { + throw new Error("Path expression filter must evaluate to a nodeset if predicates or location path are used"); + } + return { nonNodes: ns }; + } + return { + nodes: applyPredicates( + this.filterPredicates || [], + xpc, + ns.toUnsortedArray(), + false + // reverse + ) + }; + }; + PathExpr.applyLocationPath = function(locationPath, xpc, nodes) { + if (!locationPath) { + return nodes; + } + var startNodes = locationPath.absolute ? [PathExpr.getRoot(xpc, nodes)] : nodes; + return PathExpr.applySteps(locationPath.steps, xpc, startNodes); + }; + PathExpr.prototype.evaluate = function(c) { + var xpc = assign(new XPathContext(), c); + var filterResult = this.applyFilter(c, xpc); + if ("nonNodes" in filterResult) { + return filterResult.nonNodes; + } + var ns = new XNodeSet(); + ns.addArray(PathExpr.applyLocationPath(this.locationPath, xpc, filterResult.nodes)); + return ns; + }; + PathExpr.predicateMatches = function(pred, c) { + var res = pred.evaluate(c); + return Utilities.instance_of(res, XNumber) ? c.contextPosition === res.numberValue() : res.booleanValue(); + }; + PathExpr.predicateString = function(predicate) { + return wrap("[", "]", predicate.toString()); + }; + PathExpr.predicatesString = function(predicates) { + return join( + "", + map(PathExpr.predicateString, predicates) + ); + }; + PathExpr.prototype.toString = function() { + if (this.filter != void 0) { + var filterStr = toString(this.filter); + if (Utilities.instance_of(this.filter, XString)) { + return wrap("'", "'", filterStr); + } + if (this.filterPredicates != void 0 && this.filterPredicates.length) { + return wrap("(", ")", filterStr) + PathExpr.predicatesString(this.filterPredicates); + } + if (this.locationPath != void 0) { + return filterStr + (this.locationPath.absolute ? "" : "/") + toString(this.locationPath); + } + return filterStr; + } + return toString(this.locationPath); + }; + PathExpr.getOwnerElement = function(n) { + if (n.ownerElement) { + return n.ownerElement; + } + try { + if (n.selectSingleNode) { + return n.selectSingleNode(".."); + } + } catch (e) { + } + var doc = n.nodeType == NodeTypes.DOCUMENT_NODE ? n : n.ownerDocument; + var elts = doc.getElementsByTagName("*"); + for (var i = 0; i < elts.length; i++) { + var elt = elts.item(i); + var nnm = elt.attributes; + for (var j = 0; j < nnm.length; j++) { + var an = nnm.item(j); + if (an === n) { + return elt; + } + } + } + return null; + }; + LocationPath.prototype = new Object(); + LocationPath.prototype.constructor = LocationPath; + LocationPath.superclass = Object.prototype; + function LocationPath(abs, steps) { + if (arguments.length > 0) { + this.init(abs, steps); + } + } + LocationPath.prototype.init = function(abs, steps) { + this.absolute = abs; + this.steps = steps; + }; + LocationPath.prototype.toString = function() { + return (this.absolute ? "/" : "") + map(toString, this.steps).join("/"); + }; + Step.prototype = new Object(); + Step.prototype.constructor = Step; + Step.superclass = Object.prototype; + function Step(axis, nodetest, preds) { + if (arguments.length > 0) { + this.init(axis, nodetest, preds); + } + } + Step.prototype.init = function(axis, nodetest, preds) { + this.axis = axis; + this.nodeTest = nodetest; + this.predicates = preds; + }; + Step.prototype.toString = function() { + return Step.STEPNAMES[this.axis] + "::" + this.nodeTest.toString() + PathExpr.predicatesString(this.predicates); + }; + Step.ANCESTOR = 0; + Step.ANCESTORORSELF = 1; + Step.ATTRIBUTE = 2; + Step.CHILD = 3; + Step.DESCENDANT = 4; + Step.DESCENDANTORSELF = 5; + Step.FOLLOWING = 6; + Step.FOLLOWINGSIBLING = 7; + Step.NAMESPACE = 8; + Step.PARENT = 9; + Step.PRECEDING = 10; + Step.PRECEDINGSIBLING = 11; + Step.SELF = 12; + Step.STEPNAMES = reduce(function(acc, x) { + return acc[x[0]] = x[1], acc; + }, {}, [ + [Step.ANCESTOR, "ancestor"], + [Step.ANCESTORORSELF, "ancestor-or-self"], + [Step.ATTRIBUTE, "attribute"], + [Step.CHILD, "child"], + [Step.DESCENDANT, "descendant"], + [Step.DESCENDANTORSELF, "descendant-or-self"], + [Step.FOLLOWING, "following"], + [Step.FOLLOWINGSIBLING, "following-sibling"], + [Step.NAMESPACE, "namespace"], + [Step.PARENT, "parent"], + [Step.PRECEDING, "preceding"], + [Step.PRECEDINGSIBLING, "preceding-sibling"], + [Step.SELF, "self"] + ]); + var REVERSE_AXES = [ + Step.ANCESTOR, + Step.ANCESTORORSELF, + Step.PARENT, + Step.PRECEDING, + Step.PRECEDINGSIBLING + ]; + NodeTest.prototype = new Object(); + NodeTest.prototype.constructor = NodeTest; + NodeTest.superclass = Object.prototype; + function NodeTest(type, value) { + if (arguments.length > 0) { + this.init(type, value); + } + } + NodeTest.prototype.init = function(type, value) { + this.type = type; + this.value = value; + }; + NodeTest.prototype.toString = function() { + return ""; + }; + NodeTest.prototype.matches = function(n, xpc) { + console.warn("unknown node test type"); + }; + NodeTest.NAMETESTANY = 0; + NodeTest.NAMETESTPREFIXANY = 1; + NodeTest.NAMETESTQNAME = 2; + NodeTest.COMMENT = 3; + NodeTest.TEXT = 4; + NodeTest.PI = 5; + NodeTest.NODE = 6; + NodeTest.isNodeType = function(types) { + return function(node) { + return includes(types, node.nodeType); + }; + }; + NodeTest.makeNodeTestType = function(type, members, ctor) { + var newType = ctor || function() { + }; + newType.prototype = new NodeTest(type); + newType.prototype.constructor = newType; + assign(newType.prototype, members); + return newType; + }; + NodeTest.makeNodeTypeTest = function(type, nodeTypes, stringVal) { + return new (NodeTest.makeNodeTestType(type, { + matches: NodeTest.isNodeType(nodeTypes), + toString: always(stringVal) + }))(); + }; + NodeTest.hasPrefix = function(node) { + return node.prefix || (node.nodeName || node.tagName).indexOf(":") !== -1; + }; + NodeTest.isElementOrAttribute = NodeTest.isNodeType([1, 2]); + NodeTest.nameSpaceMatches = function(prefix, xpc, n) { + var nNamespace = n.namespaceURI || ""; + if (!prefix) { + return !nNamespace || xpc.allowAnyNamespaceForNoPrefix && !NodeTest.hasPrefix(n); + } + var ns = xpc.namespaceResolver.getNamespace(prefix, xpc.expressionContextNode); + if (ns == null) { + throw new Error("Cannot resolve QName " + prefix); + } + return ns === nNamespace; + }; + NodeTest.localNameMatches = function(localName, xpc, n) { + var nLocalName = n.localName || n.nodeName; + return xpc.caseInsensitive ? localName.toLowerCase() === nLocalName.toLowerCase() : localName === nLocalName; + }; + NodeTest.NameTestPrefixAny = NodeTest.makeNodeTestType( + NodeTest.NAMETESTPREFIXANY, + { + matches: function(n, xpc) { + return NodeTest.isElementOrAttribute(n) && NodeTest.nameSpaceMatches(this.prefix, xpc, n); + }, + toString: function() { + return this.prefix + ":*"; + } + }, + function NameTestPrefixAny(prefix) { + this.prefix = prefix; + } + ); + NodeTest.NameTestQName = NodeTest.makeNodeTestType( + NodeTest.NAMETESTQNAME, + { + matches: function(n, xpc) { + return NodeTest.isNodeType( + [ + NodeTypes.ELEMENT_NODE, + NodeTypes.ATTRIBUTE_NODE, + NodeTypes.NAMESPACE_NODE + ] + )(n) && NodeTest.nameSpaceMatches(this.prefix, xpc, n) && NodeTest.localNameMatches(this.localName, xpc, n); + }, + toString: function() { + return this.name; + } + }, + function NameTestQName(name2) { + var nameParts = name2.split(":"); + this.name = name2; + this.prefix = nameParts.length > 1 ? nameParts[0] : null; + this.localName = nameParts[nameParts.length > 1 ? 1 : 0]; + } + ); + NodeTest.PITest = NodeTest.makeNodeTestType(NodeTest.PI, { + matches: function(n, xpc) { + return NodeTest.isNodeType( + [NodeTypes.PROCESSING_INSTRUCTION_NODE] + )(n) && (n.target || n.nodeName) === this.name; + }, + toString: function() { + return wrap('processing-instruction("', '")', this.name); + } + }, function(name2) { + this.name = name2; + }); + NodeTest.nameTestAny = NodeTest.makeNodeTypeTest( + NodeTest.NAMETESTANY, + [ + NodeTypes.ELEMENT_NODE, + NodeTypes.ATTRIBUTE_NODE, + NodeTypes.NAMESPACE_NODE + ], + "*" + ); + NodeTest.textTest = NodeTest.makeNodeTypeTest( + NodeTest.TEXT, + [ + NodeTypes.TEXT_NODE, + NodeTypes.CDATA_SECTION_NODE + ], + "text()" + ); + NodeTest.commentTest = NodeTest.makeNodeTypeTest( + NodeTest.COMMENT, + [NodeTypes.COMMENT_NODE], + "comment()" + ); + NodeTest.nodeTest = NodeTest.makeNodeTypeTest( + NodeTest.NODE, + [ + NodeTypes.ELEMENT_NODE, + NodeTypes.ATTRIBUTE_NODE, + NodeTypes.TEXT_NODE, + NodeTypes.CDATA_SECTION_NODE, + NodeTypes.PROCESSING_INSTRUCTION_NODE, + NodeTypes.COMMENT_NODE, + NodeTypes.DOCUMENT_NODE + ], + "node()" + ); + NodeTest.anyPiTest = NodeTest.makeNodeTypeTest( + NodeTest.PI, + [NodeTypes.PROCESSING_INSTRUCTION_NODE], + "processing-instruction()" + ); + VariableReference.prototype = new Expression(); + VariableReference.prototype.constructor = VariableReference; + VariableReference.superclass = Expression.prototype; + function VariableReference(v) { + if (arguments.length > 0) { + this.init(v); + } + } + VariableReference.prototype.init = function(v) { + this.variable = v; + }; + VariableReference.prototype.toString = function() { + return "$" + this.variable; + }; + VariableReference.prototype.evaluate = function(c) { + var parts = Utilities.resolveQName(this.variable, c.namespaceResolver, c.contextNode, false); + if (parts[0] == null) { + throw new Error("Cannot resolve QName " + fn); + } + var result = c.variableResolver.getVariable(parts[1], parts[0]); + if (!result) { + throw XPathException.fromMessage("Undeclared variable: " + this.toString()); + } + return result; + }; + FunctionCall.prototype = new Expression(); + FunctionCall.prototype.constructor = FunctionCall; + FunctionCall.superclass = Expression.prototype; + function FunctionCall(fn2, args) { + if (arguments.length > 0) { + this.init(fn2, args); + } + } + FunctionCall.prototype.init = function(fn2, args) { + this.functionName = fn2; + this.arguments = args; + }; + FunctionCall.prototype.toString = function() { + var s = this.functionName + "("; + for (var i = 0; i < this.arguments.length; i++) { + if (i > 0) { + s += ", "; + } + s += this.arguments[i].toString(); + } + return s + ")"; + }; + FunctionCall.prototype.evaluate = function(c) { + var f = FunctionResolver.getFunctionFromContext(this.functionName, c); + if (!f) { + throw new Error("Unknown function " + this.functionName); + } + var a = [c].concat(this.arguments); + return f.apply(c.functionResolver.thisArg, a); + }; + var Operators = new Object(); + Operators.equals = function(l, r) { + return l.equals(r); + }; + Operators.notequal = function(l, r) { + return l.notequal(r); + }; + Operators.lessthan = function(l, r) { + return l.lessthan(r); + }; + Operators.greaterthan = function(l, r) { + return l.greaterthan(r); + }; + Operators.lessthanorequal = function(l, r) { + return l.lessthanorequal(r); + }; + Operators.greaterthanorequal = function(l, r) { + return l.greaterthanorequal(r); + }; + XString.prototype = new Expression(); + XString.prototype.constructor = XString; + XString.superclass = Expression.prototype; + function XString(s) { + if (arguments.length > 0) { + this.init(s); + } + } + XString.prototype.init = function(s) { + this.str = String(s); + }; + XString.prototype.toString = function() { + return this.str; + }; + XString.prototype.evaluate = function(c) { + return this; + }; + XString.prototype.string = function() { + return this; + }; + XString.prototype.number = function() { + return new XNumber(this.str); + }; + XString.prototype.bool = function() { + return new XBoolean(this.str); + }; + XString.prototype.nodeset = function() { + throw new Error("Cannot convert string to nodeset"); + }; + XString.prototype.stringValue = function() { + return this.str; + }; + XString.prototype.numberValue = function() { + return this.number().numberValue(); + }; + XString.prototype.booleanValue = function() { + return this.bool().booleanValue(); + }; + XString.prototype.equals = function(r) { + if (Utilities.instance_of(r, XBoolean)) { + return this.bool().equals(r); + } + if (Utilities.instance_of(r, XNumber)) { + return this.number().equals(r); + } + if (Utilities.instance_of(r, XNodeSet)) { + return r.compareWithString(this, Operators.equals); + } + return new XBoolean(this.str == r.str); + }; + XString.prototype.notequal = function(r) { + if (Utilities.instance_of(r, XBoolean)) { + return this.bool().notequal(r); + } + if (Utilities.instance_of(r, XNumber)) { + return this.number().notequal(r); + } + if (Utilities.instance_of(r, XNodeSet)) { + return r.compareWithString(this, Operators.notequal); + } + return new XBoolean(this.str != r.str); + }; + XString.prototype.lessthan = function(r) { + return this.number().lessthan(r); + }; + XString.prototype.greaterthan = function(r) { + return this.number().greaterthan(r); + }; + XString.prototype.lessthanorequal = function(r) { + return this.number().lessthanorequal(r); + }; + XString.prototype.greaterthanorequal = function(r) { + return this.number().greaterthanorequal(r); + }; + XNumber.prototype = new Expression(); + XNumber.prototype.constructor = XNumber; + XNumber.superclass = Expression.prototype; + function XNumber(n) { + if (arguments.length > 0) { + this.init(n); + } + } + XNumber.prototype.init = function(n) { + this.num = typeof n === "string" ? this.parse(n) : Number(n); + }; + XNumber.prototype.numberFormat = /^\s*-?[0-9]*\.?[0-9]+\s*$/; + XNumber.prototype.parse = function(s) { + return this.numberFormat.test(s) ? parseFloat(s) : Number.NaN; + }; + function padSmallNumber(numberStr) { + var parts = numberStr.split("e-"); + var base = parts[0].replace(".", ""); + var exponent = Number(parts[1]); + for (var i = 0; i < exponent - 1; i += 1) { + base = "0" + base; + } + return "0." + base; + } + function padLargeNumber(numberStr) { + var parts = numberStr.split("e"); + var base = parts[0].replace(".", ""); + var exponent = Number(parts[1]); + var zerosToAppend = exponent + 1 - base.length; + for (var i = 0; i < zerosToAppend; i += 1) { + base += "0"; + } + return base; + } + XNumber.prototype.toString = function() { + var strValue = this.num.toString(); + if (strValue.indexOf("e-") !== -1) { + return padSmallNumber(strValue); + } + if (strValue.indexOf("e") !== -1) { + return padLargeNumber(strValue); + } + return strValue; + }; + XNumber.prototype.evaluate = function(c) { + return this; + }; + XNumber.prototype.string = function() { + return new XString(this.toString()); + }; + XNumber.prototype.number = function() { + return this; + }; + XNumber.prototype.bool = function() { + return new XBoolean(this.num); + }; + XNumber.prototype.nodeset = function() { + throw new Error("Cannot convert number to nodeset"); + }; + XNumber.prototype.stringValue = function() { + return this.string().stringValue(); + }; + XNumber.prototype.numberValue = function() { + return this.num; + }; + XNumber.prototype.booleanValue = function() { + return this.bool().booleanValue(); + }; + XNumber.prototype.negate = function() { + return new XNumber(-this.num); + }; + XNumber.prototype.equals = function(r) { + if (Utilities.instance_of(r, XBoolean)) { + return this.bool().equals(r); + } + if (Utilities.instance_of(r, XString)) { + return this.equals(r.number()); + } + if (Utilities.instance_of(r, XNodeSet)) { + return r.compareWithNumber(this, Operators.equals); + } + return new XBoolean(this.num == r.num); + }; + XNumber.prototype.notequal = function(r) { + if (Utilities.instance_of(r, XBoolean)) { + return this.bool().notequal(r); + } + if (Utilities.instance_of(r, XString)) { + return this.notequal(r.number()); + } + if (Utilities.instance_of(r, XNodeSet)) { + return r.compareWithNumber(this, Operators.notequal); + } + return new XBoolean(this.num != r.num); + }; + XNumber.prototype.lessthan = function(r) { + if (Utilities.instance_of(r, XNodeSet)) { + return r.compareWithNumber(this, Operators.greaterthan); + } + if (Utilities.instance_of(r, XBoolean) || Utilities.instance_of(r, XString)) { + return this.lessthan(r.number()); + } + return new XBoolean(this.num < r.num); + }; + XNumber.prototype.greaterthan = function(r) { + if (Utilities.instance_of(r, XNodeSet)) { + return r.compareWithNumber(this, Operators.lessthan); + } + if (Utilities.instance_of(r, XBoolean) || Utilities.instance_of(r, XString)) { + return this.greaterthan(r.number()); + } + return new XBoolean(this.num > r.num); + }; + XNumber.prototype.lessthanorequal = function(r) { + if (Utilities.instance_of(r, XNodeSet)) { + return r.compareWithNumber(this, Operators.greaterthanorequal); + } + if (Utilities.instance_of(r, XBoolean) || Utilities.instance_of(r, XString)) { + return this.lessthanorequal(r.number()); + } + return new XBoolean(this.num <= r.num); + }; + XNumber.prototype.greaterthanorequal = function(r) { + if (Utilities.instance_of(r, XNodeSet)) { + return r.compareWithNumber(this, Operators.lessthanorequal); + } + if (Utilities.instance_of(r, XBoolean) || Utilities.instance_of(r, XString)) { + return this.greaterthanorequal(r.number()); + } + return new XBoolean(this.num >= r.num); + }; + XNumber.prototype.plus = function(r) { + return new XNumber(this.num + r.num); + }; + XNumber.prototype.minus = function(r) { + return new XNumber(this.num - r.num); + }; + XNumber.prototype.multiply = function(r) { + return new XNumber(this.num * r.num); + }; + XNumber.prototype.div = function(r) { + return new XNumber(this.num / r.num); + }; + XNumber.prototype.mod = function(r) { + return new XNumber(this.num % r.num); + }; + XBoolean.prototype = new Expression(); + XBoolean.prototype.constructor = XBoolean; + XBoolean.superclass = Expression.prototype; + function XBoolean(b) { + if (arguments.length > 0) { + this.init(b); + } + } + XBoolean.prototype.init = function(b) { + this.b = Boolean(b); + }; + XBoolean.prototype.toString = function() { + return this.b.toString(); + }; + XBoolean.prototype.evaluate = function(c) { + return this; + }; + XBoolean.prototype.string = function() { + return new XString(this.b); + }; + XBoolean.prototype.number = function() { + return new XNumber(this.b); + }; + XBoolean.prototype.bool = function() { + return this; + }; + XBoolean.prototype.nodeset = function() { + throw new Error("Cannot convert boolean to nodeset"); + }; + XBoolean.prototype.stringValue = function() { + return this.string().stringValue(); + }; + XBoolean.prototype.numberValue = function() { + return this.number().numberValue(); + }; + XBoolean.prototype.booleanValue = function() { + return this.b; + }; + XBoolean.prototype.not = function() { + return new XBoolean(!this.b); + }; + XBoolean.prototype.equals = function(r) { + if (Utilities.instance_of(r, XString) || Utilities.instance_of(r, XNumber)) { + return this.equals(r.bool()); + } + if (Utilities.instance_of(r, XNodeSet)) { + return r.compareWithBoolean(this, Operators.equals); + } + return new XBoolean(this.b == r.b); + }; + XBoolean.prototype.notequal = function(r) { + if (Utilities.instance_of(r, XString) || Utilities.instance_of(r, XNumber)) { + return this.notequal(r.bool()); + } + if (Utilities.instance_of(r, XNodeSet)) { + return r.compareWithBoolean(this, Operators.notequal); + } + return new XBoolean(this.b != r.b); + }; + XBoolean.prototype.lessthan = function(r) { + return this.number().lessthan(r); + }; + XBoolean.prototype.greaterthan = function(r) { + return this.number().greaterthan(r); + }; + XBoolean.prototype.lessthanorequal = function(r) { + return this.number().lessthanorequal(r); + }; + XBoolean.prototype.greaterthanorequal = function(r) { + return this.number().greaterthanorequal(r); + }; + XBoolean.true_ = new XBoolean(true); + XBoolean.false_ = new XBoolean(false); + AVLTree.prototype = new Object(); + AVLTree.prototype.constructor = AVLTree; + AVLTree.superclass = Object.prototype; + function AVLTree(n) { + this.init(n); + } + AVLTree.prototype.init = function(n) { + this.left = null; + this.right = null; + this.node = n; + this.depth = 1; + }; + AVLTree.prototype.balance = function() { + var ldepth = this.left == null ? 0 : this.left.depth; + var rdepth = this.right == null ? 0 : this.right.depth; + if (ldepth > rdepth + 1) { + var lldepth = this.left.left == null ? 0 : this.left.left.depth; + var lrdepth = this.left.right == null ? 0 : this.left.right.depth; + if (lldepth < lrdepth) { + this.left.rotateRR(); + } + this.rotateLL(); + } else if (ldepth + 1 < rdepth) { + var rrdepth = this.right.right == null ? 0 : this.right.right.depth; + var rldepth = this.right.left == null ? 0 : this.right.left.depth; + if (rldepth > rrdepth) { + this.right.rotateLL(); + } + this.rotateRR(); + } + }; + AVLTree.prototype.rotateLL = function() { + var nodeBefore = this.node; + var rightBefore = this.right; + this.node = this.left.node; + this.right = this.left; + this.left = this.left.left; + this.right.left = this.right.right; + this.right.right = rightBefore; + this.right.node = nodeBefore; + this.right.updateInNewLocation(); + this.updateInNewLocation(); + }; + AVLTree.prototype.rotateRR = function() { + var nodeBefore = this.node; + var leftBefore = this.left; + this.node = this.right.node; + this.left = this.right; + this.right = this.right.right; + this.left.right = this.left.left; + this.left.left = leftBefore; + this.left.node = nodeBefore; + this.left.updateInNewLocation(); + this.updateInNewLocation(); + }; + AVLTree.prototype.updateInNewLocation = function() { + this.getDepthFromChildren(); + }; + AVLTree.prototype.getDepthFromChildren = function() { + this.depth = this.node == null ? 0 : 1; + if (this.left != null) { + this.depth = this.left.depth + 1; + } + if (this.right != null && this.depth <= this.right.depth) { + this.depth = this.right.depth + 1; + } + }; + function nodeOrder(n1, n2) { + if (n1 === n2) { + return 0; + } + if (n1.compareDocumentPosition) { + var cpos = n1.compareDocumentPosition(n2); + if (cpos & 1) { + return 1; + } + if (cpos & 10) { + return 1; + } + if (cpos & 20) { + return -1; + } + return 0; + } + var d1 = 0, d2 = 0; + for (var m1 = n1; m1 != null; m1 = m1.parentNode || m1.ownerElement) { + d1++; + } + for (var m2 = n2; m2 != null; m2 = m2.parentNode || m2.ownerElement) { + d2++; + } + if (d1 > d2) { + while (d1 > d2) { + n1 = n1.parentNode || n1.ownerElement; + d1--; + } + if (n1 === n2) { + return 1; + } + } else if (d2 > d1) { + while (d2 > d1) { + n2 = n2.parentNode || n2.ownerElement; + d2--; + } + if (n1 === n2) { + return -1; + } + } + var n1Par = n1.parentNode || n1.ownerElement, n2Par = n2.parentNode || n2.ownerElement; + while (n1Par !== n2Par) { + n1 = n1Par; + n2 = n2Par; + n1Par = n1.parentNode || n1.ownerElement; + n2Par = n2.parentNode || n2.ownerElement; + } + var n1isAttr = isAttributeLike(n1); + var n2isAttr = isAttributeLike(n2); + if (n1isAttr && !n2isAttr) { + return -1; + } + if (!n1isAttr && n2isAttr) { + return 1; + } + if (n1.isXPathNamespace) { + if (n1.nodeValue === XPath.XML_NAMESPACE_URI) { + return -1; + } + if (!n2.isXPathNamespace) { + return -1; + } + if (n2.nodeValue === XPath.XML_NAMESPACE_URI) { + return 1; + } + } else if (n2.isXPathNamespace) { + return 1; + } + if (n1Par) { + var cn = n1isAttr ? n1Par.attributes : n1Par.childNodes; + var len = cn.length; + var n1Compare = n1.baseNode || n1; + var n2Compare = n2.baseNode || n2; + for (var i = 0; i < len; i += 1) { + var n = cn[i]; + if (n === n1Compare) { + return -1; + } + if (n === n2Compare) { + return 1; + } + } + } + throw new Error("Unexpected: could not determine node order"); + } + AVLTree.prototype.add = function(n) { + if (n === this.node) { + return false; + } + var o = nodeOrder(n, this.node); + var ret = false; + if (o == -1) { + if (this.left == null) { + this.left = new AVLTree(n); + ret = true; + } else { + ret = this.left.add(n); + if (ret) { + this.balance(); + } + } + } else if (o == 1) { + if (this.right == null) { + this.right = new AVLTree(n); + ret = true; + } else { + ret = this.right.add(n); + if (ret) { + this.balance(); + } + } + } + if (ret) { + this.getDepthFromChildren(); + } + return ret; + }; + XNodeSet.prototype = new Expression(); + XNodeSet.prototype.constructor = XNodeSet; + XNodeSet.superclass = Expression.prototype; + function XNodeSet() { + this.init(); + } + XNodeSet.prototype.init = function() { + this.tree = null; + this.nodes = []; + this.size = 0; + }; + XNodeSet.prototype.toString = function() { + var p = this.first(); + if (p == null) { + return ""; + } + return this.stringForNode(p); + }; + XNodeSet.prototype.evaluate = function(c) { + return this; + }; + XNodeSet.prototype.string = function() { + return new XString(this.toString()); + }; + XNodeSet.prototype.stringValue = function() { + return this.toString(); + }; + XNodeSet.prototype.number = function() { + return new XNumber(this.string()); + }; + XNodeSet.prototype.numberValue = function() { + return Number(this.string()); + }; + XNodeSet.prototype.bool = function() { + return new XBoolean(this.booleanValue()); + }; + XNodeSet.prototype.booleanValue = function() { + return !!this.size; + }; + XNodeSet.prototype.nodeset = function() { + return this; + }; + XNodeSet.prototype.stringForNode = function(n) { + if (n.nodeType == NodeTypes.DOCUMENT_NODE || n.nodeType == NodeTypes.ELEMENT_NODE || n.nodeType === NodeTypes.DOCUMENT_FRAGMENT_NODE) { + return this.stringForContainerNode(n); + } + if (n.nodeType === NodeTypes.ATTRIBUTE_NODE) { + return n.value || n.nodeValue; + } + if (n.isNamespaceNode) { + return n.namespace; + } + return n.nodeValue; + }; + XNodeSet.prototype.stringForContainerNode = function(n) { + var s = ""; + for (var n2 = n.firstChild; n2 != null; n2 = n2.nextSibling) { + var nt = n2.nodeType; + if (nt === 1 || nt === 3 || nt === 4 || nt === 9 || nt === 11) { + s += this.stringForNode(n2); + } + } + return s; + }; + XNodeSet.prototype.buildTree = function() { + if (!this.tree && this.nodes.length) { + this.tree = new AVLTree(this.nodes[0]); + for (var i = 1; i < this.nodes.length; i += 1) { + this.tree.add(this.nodes[i]); + } + } + return this.tree; + }; + XNodeSet.prototype.first = function() { + var p = this.buildTree(); + if (p == null) { + return null; + } + while (p.left != null) { + p = p.left; + } + return p.node; + }; + XNodeSet.prototype.add = function(n) { + for (var i = 0; i < this.nodes.length; i += 1) { + if (n === this.nodes[i]) { + return; + } + } + this.tree = null; + this.nodes.push(n); + this.size += 1; + }; + XNodeSet.prototype.addArray = function(ns) { + var self = this; + forEach(function(x) { + self.add(x); + }, ns); + }; + XNodeSet.prototype.toArray = function() { + var a = []; + this.toArrayRec(this.buildTree(), a); + return a; + }; + XNodeSet.prototype.toArrayRec = function(t, a) { + if (t != null) { + this.toArrayRec(t.left, a); + a.push(t.node); + this.toArrayRec(t.right, a); + } + }; + XNodeSet.prototype.toUnsortedArray = function() { + return this.nodes.slice(); + }; + XNodeSet.prototype.compareWithString = function(r, o) { + var a = this.toUnsortedArray(); + for (var i = 0; i < a.length; i++) { + var n = a[i]; + var l = new XString(this.stringForNode(n)); + var res = o(l, r); + if (res.booleanValue()) { + return res; + } + } + return new XBoolean(false); + }; + XNodeSet.prototype.compareWithNumber = function(r, o) { + var a = this.toUnsortedArray(); + for (var i = 0; i < a.length; i++) { + var n = a[i]; + var l = new XNumber(this.stringForNode(n)); + var res = o(l, r); + if (res.booleanValue()) { + return res; + } + } + return new XBoolean(false); + }; + XNodeSet.prototype.compareWithBoolean = function(r, o) { + return o(this.bool(), r); + }; + XNodeSet.prototype.compareWithNodeSet = function(r, o) { + var arr = this.toUnsortedArray(); + var oInvert = function(lop, rop) { + return o(rop, lop); + }; + for (var i = 0; i < arr.length; i++) { + var l = new XString(this.stringForNode(arr[i])); + var res = r.compareWithString(l, oInvert); + if (res.booleanValue()) { + return res; + } + } + return new XBoolean(false); + }; + XNodeSet.compareWith = curry(function(o, r) { + if (Utilities.instance_of(r, XString)) { + return this.compareWithString(r, o); + } + if (Utilities.instance_of(r, XNumber)) { + return this.compareWithNumber(r, o); + } + if (Utilities.instance_of(r, XBoolean)) { + return this.compareWithBoolean(r, o); + } + return this.compareWithNodeSet(r, o); + }); + XNodeSet.prototype.equals = XNodeSet.compareWith(Operators.equals); + XNodeSet.prototype.notequal = XNodeSet.compareWith(Operators.notequal); + XNodeSet.prototype.lessthan = XNodeSet.compareWith(Operators.lessthan); + XNodeSet.prototype.greaterthan = XNodeSet.compareWith(Operators.greaterthan); + XNodeSet.prototype.lessthanorequal = XNodeSet.compareWith(Operators.lessthanorequal); + XNodeSet.prototype.greaterthanorequal = XNodeSet.compareWith(Operators.greaterthanorequal); + XNodeSet.prototype.union = function(r) { + var ns = new XNodeSet(); + ns.addArray(this.toUnsortedArray()); + ns.addArray(r.toUnsortedArray()); + return ns; + }; + XPathNamespace.prototype = new Object(); + XPathNamespace.prototype.constructor = XPathNamespace; + XPathNamespace.superclass = Object.prototype; + function XPathNamespace(pre, node, uri, p) { + this.isXPathNamespace = true; + this.baseNode = node; + this.ownerDocument = p.ownerDocument; + this.nodeName = pre; + this.prefix = pre; + this.localName = pre; + this.namespaceURI = null; + this.nodeValue = uri; + this.ownerElement = p; + this.nodeType = NodeTypes.NAMESPACE_NODE; + } + XPathNamespace.prototype.toString = function() { + return '{ "' + this.prefix + '", "' + this.namespaceURI + '" }'; + }; + XPathContext.prototype = new Object(); + XPathContext.prototype.constructor = XPathContext; + XPathContext.superclass = Object.prototype; + function XPathContext(vr, nr, fr) { + this.variableResolver = vr != null ? vr : new VariableResolver(); + this.namespaceResolver = nr != null ? nr : new NamespaceResolver(); + this.functionResolver = fr != null ? fr : new FunctionResolver(); + } + XPathContext.prototype.extend = function(newProps) { + return assign(new XPathContext(), this, newProps); + }; + VariableResolver.prototype = new Object(); + VariableResolver.prototype.constructor = VariableResolver; + VariableResolver.superclass = Object.prototype; + function VariableResolver() { + } + VariableResolver.prototype.getVariable = function(ln, ns) { + return null; + }; + FunctionResolver.prototype = new Object(); + FunctionResolver.prototype.constructor = FunctionResolver; + FunctionResolver.superclass = Object.prototype; + function FunctionResolver(thisArg) { + this.thisArg = thisArg != null ? thisArg : Functions; + this.functions = new Object(); + this.addStandardFunctions(); + } + FunctionResolver.prototype.addStandardFunctions = function() { + this.functions["{}last"] = Functions.last; + this.functions["{}position"] = Functions.position; + this.functions["{}count"] = Functions.count; + this.functions["{}id"] = Functions.id; + this.functions["{}local-name"] = Functions.localName; + this.functions["{}namespace-uri"] = Functions.namespaceURI; + this.functions["{}name"] = Functions.name; + this.functions["{}string"] = Functions.string; + this.functions["{}concat"] = Functions.concat; + this.functions["{}starts-with"] = Functions.startsWith; + this.functions["{}contains"] = Functions.contains; + this.functions["{}substring-before"] = Functions.substringBefore; + this.functions["{}substring-after"] = Functions.substringAfter; + this.functions["{}substring"] = Functions.substring; + this.functions["{}string-length"] = Functions.stringLength; + this.functions["{}normalize-space"] = Functions.normalizeSpace; + this.functions["{}translate"] = Functions.translate; + this.functions["{}boolean"] = Functions.boolean_; + this.functions["{}not"] = Functions.not; + this.functions["{}true"] = Functions.true_; + this.functions["{}false"] = Functions.false_; + this.functions["{}lang"] = Functions.lang; + this.functions["{}number"] = Functions.number; + this.functions["{}sum"] = Functions.sum; + this.functions["{}floor"] = Functions.floor; + this.functions["{}ceiling"] = Functions.ceiling; + this.functions["{}round"] = Functions.round; + }; + FunctionResolver.prototype.addFunction = function(ns, ln, f) { + this.functions["{" + ns + "}" + ln] = f; + }; + FunctionResolver.getFunctionFromContext = function(qName, context) { + var parts = Utilities.resolveQName(qName, context.namespaceResolver, context.contextNode, false); + if (parts[0] === null) { + throw new Error("Cannot resolve QName " + name); + } + return context.functionResolver.getFunction(parts[1], parts[0]); + }; + FunctionResolver.prototype.getFunction = function(localName, namespace) { + return this.functions["{" + namespace + "}" + localName]; + }; + NamespaceResolver.prototype = new Object(); + NamespaceResolver.prototype.constructor = NamespaceResolver; + NamespaceResolver.superclass = Object.prototype; + function NamespaceResolver() { + } + NamespaceResolver.prototype.getNamespace = function(prefix, n) { + if (prefix == "xml") { + return XPath.XML_NAMESPACE_URI; + } else if (prefix == "xmlns") { + return XPath.XMLNS_NAMESPACE_URI; + } + if (n.nodeType == NodeTypes.DOCUMENT_NODE) { + n = n.documentElement; + } else if (n.nodeType == NodeTypes.ATTRIBUTE_NODE) { + n = PathExpr.getOwnerElement(n); + } else if (n.nodeType != NodeTypes.ELEMENT_NODE) { + n = n.parentNode; + } + while (n != null && n.nodeType == NodeTypes.ELEMENT_NODE) { + var nnm = n.attributes; + for (var i = 0; i < nnm.length; i++) { + var a = nnm.item(i); + var aname = a.name || a.nodeName; + if (aname === "xmlns" && prefix === "" || aname === "xmlns:" + prefix) { + return String(a.value || a.nodeValue); + } + } + n = n.parentNode; + } + return null; + }; + var Functions = new Object(); + Functions.last = function(c) { + if (arguments.length != 1) { + throw new Error("Function last expects ()"); + } + return new XNumber(c.contextSize); + }; + Functions.position = function(c) { + if (arguments.length != 1) { + throw new Error("Function position expects ()"); + } + return new XNumber(c.contextPosition); + }; + Functions.count = function() { + var c = arguments[0]; + var ns; + if (arguments.length != 2 || !Utilities.instance_of(ns = arguments[1].evaluate(c), XNodeSet)) { + throw new Error("Function count expects (node-set)"); + } + return new XNumber(ns.size); + }; + Functions.id = function() { + var c = arguments[0]; + var id; + if (arguments.length != 2) { + throw new Error("Function id expects (object)"); + } + id = arguments[1].evaluate(c); + if (Utilities.instance_of(id, XNodeSet)) { + id = id.toArray().join(" "); + } else { + id = id.stringValue(); + } + var ids = id.split(/[\x0d\x0a\x09\x20]+/); + var count = 0; + var ns = new XNodeSet(); + var doc = c.contextNode.nodeType == NodeTypes.DOCUMENT_NODE ? c.contextNode : c.contextNode.ownerDocument; + for (var i = 0; i < ids.length; i++) { + var n; + if (doc.getElementById) { + n = doc.getElementById(ids[i]); + } else { + n = Utilities.getElementById(doc, ids[i]); + } + if (n != null) { + ns.add(n); + count++; + } + } + return ns; + }; + Functions.localName = function(c, eNode) { + var n; + if (arguments.length == 1) { + n = c.contextNode; + } else if (arguments.length == 2) { + n = eNode.evaluate(c).first(); + } else { + throw new Error("Function local-name expects (node-set?)"); + } + if (n == null) { + return new XString(""); + } + return new XString( + n.localName || // standard elements and attributes + n.baseName || // IE + n.target || // processing instructions + n.nodeName || // DOM1 elements + "" + // fallback + ); + }; + Functions.namespaceURI = function() { + var c = arguments[0]; + var n; + if (arguments.length == 1) { + n = c.contextNode; + } else if (arguments.length == 2) { + n = arguments[1].evaluate(c).first(); + } else { + throw new Error("Function namespace-uri expects (node-set?)"); + } + if (n == null) { + return new XString(""); + } + return new XString(n.namespaceURI || ""); + }; + Functions.name = function() { + var c = arguments[0]; + var n; + if (arguments.length == 1) { + n = c.contextNode; + } else if (arguments.length == 2) { + n = arguments[1].evaluate(c).first(); + } else { + throw new Error("Function name expects (node-set?)"); + } + if (n == null) { + return new XString(""); + } + if (n.nodeType == NodeTypes.ELEMENT_NODE) { + return new XString(n.nodeName); + } else if (n.nodeType == NodeTypes.ATTRIBUTE_NODE) { + return new XString(n.name || n.nodeName); + } else if (n.nodeType === NodeTypes.PROCESSING_INSTRUCTION_NODE) { + return new XString(n.target || n.nodeName); + } else if (n.localName == null) { + return new XString(""); + } else { + return new XString(n.localName); + } + }; + Functions.string = function() { + var c = arguments[0]; + if (arguments.length == 1) { + return new XString(XNodeSet.prototype.stringForNode(c.contextNode)); + } else if (arguments.length == 2) { + return arguments[1].evaluate(c).string(); + } + throw new Error("Function string expects (object?)"); + }; + Functions.concat = function(c) { + if (arguments.length < 3) { + throw new Error("Function concat expects (string, string[, string]*)"); + } + var s = ""; + for (var i = 1; i < arguments.length; i++) { + s += arguments[i].evaluate(c).stringValue(); + } + return new XString(s); + }; + Functions.startsWith = function() { + var c = arguments[0]; + if (arguments.length != 3) { + throw new Error("Function startsWith expects (string, string)"); + } + var s1 = arguments[1].evaluate(c).stringValue(); + var s2 = arguments[2].evaluate(c).stringValue(); + return new XBoolean(s1.substring(0, s2.length) == s2); + }; + Functions.contains = function() { + var c = arguments[0]; + if (arguments.length != 3) { + throw new Error("Function contains expects (string, string)"); + } + var s1 = arguments[1].evaluate(c).stringValue(); + var s2 = arguments[2].evaluate(c).stringValue(); + return new XBoolean(s1.indexOf(s2) !== -1); + }; + Functions.substringBefore = function() { + var c = arguments[0]; + if (arguments.length != 3) { + throw new Error("Function substring-before expects (string, string)"); + } + var s1 = arguments[1].evaluate(c).stringValue(); + var s2 = arguments[2].evaluate(c).stringValue(); + return new XString(s1.substring(0, s1.indexOf(s2))); + }; + Functions.substringAfter = function() { + var c = arguments[0]; + if (arguments.length != 3) { + throw new Error("Function substring-after expects (string, string)"); + } + var s1 = arguments[1].evaluate(c).stringValue(); + var s2 = arguments[2].evaluate(c).stringValue(); + if (s2.length == 0) { + return new XString(s1); + } + var i = s1.indexOf(s2); + if (i == -1) { + return new XString(""); + } + return new XString(s1.substring(i + s2.length)); + }; + Functions.substring = function() { + var c = arguments[0]; + if (!(arguments.length == 3 || arguments.length == 4)) { + throw new Error("Function substring expects (string, number, number?)"); + } + var s = arguments[1].evaluate(c).stringValue(); + var n1 = Math.round(arguments[2].evaluate(c).numberValue()) - 1; + var n2 = arguments.length == 4 ? n1 + Math.round(arguments[3].evaluate(c).numberValue()) : void 0; + return new XString(s.substring(n1, n2)); + }; + Functions.stringLength = function() { + var c = arguments[0]; + var s; + if (arguments.length == 1) { + s = XNodeSet.prototype.stringForNode(c.contextNode); + } else if (arguments.length == 2) { + s = arguments[1].evaluate(c).stringValue(); + } else { + throw new Error("Function string-length expects (string?)"); + } + return new XNumber(s.length); + }; + Functions.normalizeSpace = function() { + var c = arguments[0]; + var s; + if (arguments.length == 1) { + s = XNodeSet.prototype.stringForNode(c.contextNode); + } else if (arguments.length == 2) { + s = arguments[1].evaluate(c).stringValue(); + } else { + throw new Error("Function normalize-space expects (string?)"); + } + var i = 0; + var j = s.length - 1; + while (Utilities.isSpace(s.charCodeAt(j))) { + j--; + } + var t = ""; + while (i <= j && Utilities.isSpace(s.charCodeAt(i))) { + i++; + } + while (i <= j) { + if (Utilities.isSpace(s.charCodeAt(i))) { + t += " "; + while (i <= j && Utilities.isSpace(s.charCodeAt(i))) { + i++; + } + } else { + t += s.charAt(i); + i++; + } + } + return new XString(t); + }; + Functions.translate = function(c, eValue, eFrom, eTo) { + if (arguments.length != 4) { + throw new Error("Function translate expects (string, string, string)"); + } + var value = eValue.evaluate(c).stringValue(); + var from = eFrom.evaluate(c).stringValue(); + var to = eTo.evaluate(c).stringValue(); + var cMap = reduce(function(acc, ch, i) { + if (!(ch in acc)) { + acc[ch] = i > to.length ? "" : to[i]; + } + return acc; + }, {}, from); + var t = join( + "", + map(function(ch) { + return ch in cMap ? cMap[ch] : ch; + }, value) + ); + return new XString(t); + }; + Functions.boolean_ = function() { + var c = arguments[0]; + if (arguments.length != 2) { + throw new Error("Function boolean expects (object)"); + } + return arguments[1].evaluate(c).bool(); + }; + Functions.not = function(c, eValue) { + if (arguments.length != 2) { + throw new Error("Function not expects (object)"); + } + return eValue.evaluate(c).bool().not(); + }; + Functions.true_ = function() { + if (arguments.length != 1) { + throw new Error("Function true expects ()"); + } + return XBoolean.true_; + }; + Functions.false_ = function() { + if (arguments.length != 1) { + throw new Error("Function false expects ()"); + } + return XBoolean.false_; + }; + Functions.lang = function() { + var c = arguments[0]; + if (arguments.length != 2) { + throw new Error("Function lang expects (string)"); + } + var lang; + for (var n = c.contextNode; n != null && n.nodeType != NodeTypes.DOCUMENT_NODE; n = n.parentNode) { + var a = n.getAttributeNS(XPath.XML_NAMESPACE_URI, "lang"); + if (a != null) { + lang = String(a); + break; + } + } + if (lang == null) { + return XBoolean.false_; + } + var s = arguments[1].evaluate(c).stringValue(); + return new XBoolean(lang.substring(0, s.length) == s && (lang.length == s.length || lang.charAt(s.length) == "-")); + }; + Functions.number = function() { + var c = arguments[0]; + if (!(arguments.length == 1 || arguments.length == 2)) { + throw new Error("Function number expects (object?)"); + } + if (arguments.length == 1) { + return new XNumber(XNodeSet.prototype.stringForNode(c.contextNode)); + } + return arguments[1].evaluate(c).number(); + }; + Functions.sum = function() { + var c = arguments[0]; + var ns; + if (arguments.length != 2 || !Utilities.instance_of(ns = arguments[1].evaluate(c), XNodeSet)) { + throw new Error("Function sum expects (node-set)"); + } + ns = ns.toUnsortedArray(); + var n = 0; + for (var i = 0; i < ns.length; i++) { + n += new XNumber(XNodeSet.prototype.stringForNode(ns[i])).numberValue(); + } + return new XNumber(n); + }; + Functions.floor = function() { + var c = arguments[0]; + if (arguments.length != 2) { + throw new Error("Function floor expects (number)"); + } + return new XNumber(Math.floor(arguments[1].evaluate(c).numberValue())); + }; + Functions.ceiling = function() { + var c = arguments[0]; + if (arguments.length != 2) { + throw new Error("Function ceiling expects (number)"); + } + return new XNumber(Math.ceil(arguments[1].evaluate(c).numberValue())); + }; + Functions.round = function() { + var c = arguments[0]; + if (arguments.length != 2) { + throw new Error("Function round expects (number)"); + } + return new XNumber(Math.round(arguments[1].evaluate(c).numberValue())); + }; + var Utilities = new Object(); + var isAttributeLike = function(val) { + return val && (val.nodeType === NodeTypes.ATTRIBUTE_NODE || val.ownerElement || val.isXPathNamespace); + }; + Utilities.splitQName = function(qn) { + var i = qn.indexOf(":"); + if (i == -1) { + return [null, qn]; + } + return [qn.substring(0, i), qn.substring(i + 1)]; + }; + Utilities.resolveQName = function(qn, nr, n, useDefault) { + var parts = Utilities.splitQName(qn); + if (parts[0] != null) { + parts[0] = nr.getNamespace(parts[0], n); + } else { + if (useDefault) { + parts[0] = nr.getNamespace("", n); + if (parts[0] == null) { + parts[0] = ""; + } + } else { + parts[0] = ""; + } + } + return parts; + }; + Utilities.isSpace = function(c) { + return c == 9 || c == 13 || c == 10 || c == 32; + }; + Utilities.isLetter = function(c) { + return c >= 65 && c <= 90 || c >= 97 && c <= 122 || c >= 192 && c <= 214 || c >= 216 && c <= 246 || c >= 248 && c <= 255 || c >= 256 && c <= 305 || c >= 308 && c <= 318 || c >= 321 && c <= 328 || c >= 330 && c <= 382 || c >= 384 && c <= 451 || c >= 461 && c <= 496 || c >= 500 && c <= 501 || c >= 506 && c <= 535 || c >= 592 && c <= 680 || c >= 699 && c <= 705 || c == 902 || c >= 904 && c <= 906 || c == 908 || c >= 910 && c <= 929 || c >= 931 && c <= 974 || c >= 976 && c <= 982 || c == 986 || c == 988 || c == 990 || c == 992 || c >= 994 && c <= 1011 || c >= 1025 && c <= 1036 || c >= 1038 && c <= 1103 || c >= 1105 && c <= 1116 || c >= 1118 && c <= 1153 || c >= 1168 && c <= 1220 || c >= 1223 && c <= 1224 || c >= 1227 && c <= 1228 || c >= 1232 && c <= 1259 || c >= 1262 && c <= 1269 || c >= 1272 && c <= 1273 || c >= 1329 && c <= 1366 || c == 1369 || c >= 1377 && c <= 1414 || c >= 1488 && c <= 1514 || c >= 1520 && c <= 1522 || c >= 1569 && c <= 1594 || c >= 1601 && c <= 1610 || c >= 1649 && c <= 1719 || c >= 1722 && c <= 1726 || c >= 1728 && c <= 1742 || c >= 1744 && c <= 1747 || c == 1749 || c >= 1765 && c <= 1766 || c >= 2309 && c <= 2361 || c == 2365 || c >= 2392 && c <= 2401 || c >= 2437 && c <= 2444 || c >= 2447 && c <= 2448 || c >= 2451 && c <= 2472 || c >= 2474 && c <= 2480 || c == 2482 || c >= 2486 && c <= 2489 || c >= 2524 && c <= 2525 || c >= 2527 && c <= 2529 || c >= 2544 && c <= 2545 || c >= 2565 && c <= 2570 || c >= 2575 && c <= 2576 || c >= 2579 && c <= 2600 || c >= 2602 && c <= 2608 || c >= 2610 && c <= 2611 || c >= 2613 && c <= 2614 || c >= 2616 && c <= 2617 || c >= 2649 && c <= 2652 || c == 2654 || c >= 2674 && c <= 2676 || c >= 2693 && c <= 2699 || c == 2701 || c >= 2703 && c <= 2705 || c >= 2707 && c <= 2728 || c >= 2730 && c <= 2736 || c >= 2738 && c <= 2739 || c >= 2741 && c <= 2745 || c == 2749 || c == 2784 || c >= 2821 && c <= 2828 || c >= 2831 && c <= 2832 || c >= 2835 && c <= 2856 || c >= 2858 && c <= 2864 || c >= 2866 && c <= 2867 || c >= 2870 && c <= 2873 || c == 2877 || c >= 2908 && c <= 2909 || c >= 2911 && c <= 2913 || c >= 2949 && c <= 2954 || c >= 2958 && c <= 2960 || c >= 2962 && c <= 2965 || c >= 2969 && c <= 2970 || c == 2972 || c >= 2974 && c <= 2975 || c >= 2979 && c <= 2980 || c >= 2984 && c <= 2986 || c >= 2990 && c <= 2997 || c >= 2999 && c <= 3001 || c >= 3077 && c <= 3084 || c >= 3086 && c <= 3088 || c >= 3090 && c <= 3112 || c >= 3114 && c <= 3123 || c >= 3125 && c <= 3129 || c >= 3168 && c <= 3169 || c >= 3205 && c <= 3212 || c >= 3214 && c <= 3216 || c >= 3218 && c <= 3240 || c >= 3242 && c <= 3251 || c >= 3253 && c <= 3257 || c == 3294 || c >= 3296 && c <= 3297 || c >= 3333 && c <= 3340 || c >= 3342 && c <= 3344 || c >= 3346 && c <= 3368 || c >= 3370 && c <= 3385 || c >= 3424 && c <= 3425 || c >= 3585 && c <= 3630 || c == 3632 || c >= 3634 && c <= 3635 || c >= 3648 && c <= 3653 || c >= 3713 && c <= 3714 || c == 3716 || c >= 3719 && c <= 3720 || c == 3722 || c == 3725 || c >= 3732 && c <= 3735 || c >= 3737 && c <= 3743 || c >= 3745 && c <= 3747 || c == 3749 || c == 3751 || c >= 3754 && c <= 3755 || c >= 3757 && c <= 3758 || c == 3760 || c >= 3762 && c <= 3763 || c == 3773 || c >= 3776 && c <= 3780 || c >= 3904 && c <= 3911 || c >= 3913 && c <= 3945 || c >= 4256 && c <= 4293 || c >= 4304 && c <= 4342 || c == 4352 || c >= 4354 && c <= 4355 || c >= 4357 && c <= 4359 || c == 4361 || c >= 4363 && c <= 4364 || c >= 4366 && c <= 4370 || c == 4412 || c == 4414 || c == 4416 || c == 4428 || c == 4430 || c == 4432 || c >= 4436 && c <= 4437 || c == 4441 || c >= 4447 && c <= 4449 || c == 4451 || c == 4453 || c == 4455 || c == 4457 || c >= 4461 && c <= 4462 || c >= 4466 && c <= 4467 || c == 4469 || c == 4510 || c == 4520 || c == 4523 || c >= 4526 && c <= 4527 || c >= 4535 && c <= 4536 || c == 4538 || c >= 4540 && c <= 4546 || c == 4587 || c == 4592 || c == 4601 || c >= 7680 && c <= 7835 || c >= 7840 && c <= 7929 || c >= 7936 && c <= 7957 || c >= 7960 && c <= 7965 || c >= 7968 && c <= 8005 || c >= 8008 && c <= 8013 || c >= 8016 && c <= 8023 || c == 8025 || c == 8027 || c == 8029 || c >= 8031 && c <= 8061 || c >= 8064 && c <= 8116 || c >= 8118 && c <= 8124 || c == 8126 || c >= 8130 && c <= 8132 || c >= 8134 && c <= 8140 || c >= 8144 && c <= 8147 || c >= 8150 && c <= 8155 || c >= 8160 && c <= 8172 || c >= 8178 && c <= 8180 || c >= 8182 && c <= 8188 || c == 8486 || c >= 8490 && c <= 8491 || c == 8494 || c >= 8576 && c <= 8578 || c >= 12353 && c <= 12436 || c >= 12449 && c <= 12538 || c >= 12549 && c <= 12588 || c >= 44032 && c <= 55203 || c >= 19968 && c <= 40869 || c == 12295 || c >= 12321 && c <= 12329; + }; + Utilities.isNCNameChar = function(c) { + return c >= 48 && c <= 57 || c >= 1632 && c <= 1641 || c >= 1776 && c <= 1785 || c >= 2406 && c <= 2415 || c >= 2534 && c <= 2543 || c >= 2662 && c <= 2671 || c >= 2790 && c <= 2799 || c >= 2918 && c <= 2927 || c >= 3047 && c <= 3055 || c >= 3174 && c <= 3183 || c >= 3302 && c <= 3311 || c >= 3430 && c <= 3439 || c >= 3664 && c <= 3673 || c >= 3792 && c <= 3801 || c >= 3872 && c <= 3881 || c == 46 || c == 45 || c == 95 || Utilities.isLetter(c) || c >= 768 && c <= 837 || c >= 864 && c <= 865 || c >= 1155 && c <= 1158 || c >= 1425 && c <= 1441 || c >= 1443 && c <= 1465 || c >= 1467 && c <= 1469 || c == 1471 || c >= 1473 && c <= 1474 || c == 1476 || c >= 1611 && c <= 1618 || c == 1648 || c >= 1750 && c <= 1756 || c >= 1757 && c <= 1759 || c >= 1760 && c <= 1764 || c >= 1767 && c <= 1768 || c >= 1770 && c <= 1773 || c >= 2305 && c <= 2307 || c == 2364 || c >= 2366 && c <= 2380 || c == 2381 || c >= 2385 && c <= 2388 || c >= 2402 && c <= 2403 || c >= 2433 && c <= 2435 || c == 2492 || c == 2494 || c == 2495 || c >= 2496 && c <= 2500 || c >= 2503 && c <= 2504 || c >= 2507 && c <= 2509 || c == 2519 || c >= 2530 && c <= 2531 || c == 2562 || c == 2620 || c == 2622 || c == 2623 || c >= 2624 && c <= 2626 || c >= 2631 && c <= 2632 || c >= 2635 && c <= 2637 || c >= 2672 && c <= 2673 || c >= 2689 && c <= 2691 || c == 2748 || c >= 2750 && c <= 2757 || c >= 2759 && c <= 2761 || c >= 2763 && c <= 2765 || c >= 2817 && c <= 2819 || c == 2876 || c >= 2878 && c <= 2883 || c >= 2887 && c <= 2888 || c >= 2891 && c <= 2893 || c >= 2902 && c <= 2903 || c >= 2946 && c <= 2947 || c >= 3006 && c <= 3010 || c >= 3014 && c <= 3016 || c >= 3018 && c <= 3021 || c == 3031 || c >= 3073 && c <= 3075 || c >= 3134 && c <= 3140 || c >= 3142 && c <= 3144 || c >= 3146 && c <= 3149 || c >= 3157 && c <= 3158 || c >= 3202 && c <= 3203 || c >= 3262 && c <= 3268 || c >= 3270 && c <= 3272 || c >= 3274 && c <= 3277 || c >= 3285 && c <= 3286 || c >= 3330 && c <= 3331 || c >= 3390 && c <= 3395 || c >= 3398 && c <= 3400 || c >= 3402 && c <= 3405 || c == 3415 || c == 3633 || c >= 3636 && c <= 3642 || c >= 3655 && c <= 3662 || c == 3761 || c >= 3764 && c <= 3769 || c >= 3771 && c <= 3772 || c >= 3784 && c <= 3789 || c >= 3864 && c <= 3865 || c == 3893 || c == 3895 || c == 3897 || c == 3902 || c == 3903 || c >= 3953 && c <= 3972 || c >= 3974 && c <= 3979 || c >= 3984 && c <= 3989 || c == 3991 || c >= 3993 && c <= 4013 || c >= 4017 && c <= 4023 || c == 4025 || c >= 8400 && c <= 8412 || c == 8417 || c >= 12330 && c <= 12335 || c == 12441 || c == 12442 || c == 183 || c == 720 || c == 721 || c == 903 || c == 1600 || c == 3654 || c == 3782 || c == 12293 || c >= 12337 && c <= 12341 || c >= 12445 && c <= 12446 || c >= 12540 && c <= 12542; + }; + Utilities.coalesceText = function(n) { + for (var m = n.firstChild; m != null; m = m.nextSibling) { + if (m.nodeType == NodeTypes.TEXT_NODE || m.nodeType == NodeTypes.CDATA_SECTION_NODE) { + var s = m.nodeValue; + var first = m; + m = m.nextSibling; + while (m != null && (m.nodeType == NodeTypes.TEXT_NODE || m.nodeType == NodeTypes.CDATA_SECTION_NODE)) { + s += m.nodeValue; + var del = m; + m = m.nextSibling; + del.parentNode.removeChild(del); + } + if (first.nodeType == NodeTypes.CDATA_SECTION_NODE) { + var p = first.parentNode; + if (first.nextSibling == null) { + p.removeChild(first); + p.appendChild(p.ownerDocument.createTextNode(s)); + } else { + var next = first.nextSibling; + p.removeChild(first); + p.insertBefore(p.ownerDocument.createTextNode(s), next); + } + } else { + first.nodeValue = s; + } + if (m == null) { + break; + } + } else if (m.nodeType == NodeTypes.ELEMENT_NODE) { + Utilities.coalesceText(m); + } + } + }; + Utilities.instance_of = function(o, c) { + while (o != null) { + if (o.constructor === c) { + return true; + } + if (o === Object) { + return false; + } + o = o.constructor.superclass; + } + return false; + }; + Utilities.getElementById = function(n, id) { + if (n.nodeType == NodeTypes.ELEMENT_NODE) { + if (n.getAttribute("id") == id || n.getAttributeNS(null, "id") == id) { + return n; + } + } + for (var m = n.firstChild; m != null; m = m.nextSibling) { + var res = Utilities.getElementById(m, id); + if (res != null) { + return res; + } + } + return null; + }; + var XPathException = function() { + function getMessage(code, exception) { + var msg = exception ? ": " + exception.toString() : ""; + switch (code) { + case XPathException2.INVALID_EXPRESSION_ERR: + return "Invalid expression" + msg; + case XPathException2.TYPE_ERR: + return "Type error" + msg; + } + return null; + } + function XPathException2(code, error, message) { + var err = Error.call(this, getMessage(code, error) || message); + err.code = code; + err.exception = error; + return err; + } + XPathException2.prototype = Object.create(Error.prototype); + XPathException2.prototype.constructor = XPathException2; + XPathException2.superclass = Error; + XPathException2.prototype.toString = function() { + return this.message; + }; + XPathException2.fromMessage = function(message, error) { + return new XPathException2(null, error, message); + }; + XPathException2.INVALID_EXPRESSION_ERR = 51; + XPathException2.TYPE_ERR = 52; + return XPathException2; + }(); + XPathExpression.prototype = {}; + XPathExpression.prototype.constructor = XPathExpression; + XPathExpression.superclass = Object.prototype; + function XPathExpression(e, r, p) { + this.xpath = p.parse(e); + this.context = new XPathContext(); + this.context.namespaceResolver = new XPathNSResolverWrapper(r); + } + XPathExpression.getOwnerDocument = function(n) { + return n.nodeType === NodeTypes.DOCUMENT_NODE ? n : n.ownerDocument; + }; + XPathExpression.detectHtmlDom = function(n) { + if (!n) { + return false; + } + var doc = XPathExpression.getOwnerDocument(n); + try { + return doc.implementation.hasFeature("HTML", "2.0"); + } catch (e) { + return true; + } + }; + XPathExpression.prototype.evaluate = function(n, t, res) { + this.context.expressionContextNode = n; + this.context.caseInsensitive = XPathExpression.detectHtmlDom(n); + var result = this.xpath.evaluate(this.context); + return new XPathResult(result, t); + }; + XPathNSResolverWrapper.prototype = {}; + XPathNSResolverWrapper.prototype.constructor = XPathNSResolverWrapper; + XPathNSResolverWrapper.superclass = Object.prototype; + function XPathNSResolverWrapper(r) { + this.xpathNSResolver = r; + } + XPathNSResolverWrapper.prototype.getNamespace = function(prefix, n) { + if (this.xpathNSResolver == null) { + return null; + } + return this.xpathNSResolver.lookupNamespaceURI(prefix); + }; + NodeXPathNSResolver.prototype = {}; + NodeXPathNSResolver.prototype.constructor = NodeXPathNSResolver; + NodeXPathNSResolver.superclass = Object.prototype; + function NodeXPathNSResolver(n) { + this.node = n; + this.namespaceResolver = new NamespaceResolver(); + } + NodeXPathNSResolver.prototype.lookupNamespaceURI = function(prefix) { + return this.namespaceResolver.getNamespace(prefix, this.node); + }; + XPathResult.prototype = {}; + XPathResult.prototype.constructor = XPathResult; + XPathResult.superclass = Object.prototype; + function XPathResult(v, t) { + if (t == XPathResult.ANY_TYPE) { + if (v.constructor === XString) { + t = XPathResult.STRING_TYPE; + } else if (v.constructor === XNumber) { + t = XPathResult.NUMBER_TYPE; + } else if (v.constructor === XBoolean) { + t = XPathResult.BOOLEAN_TYPE; + } else if (v.constructor === XNodeSet) { + t = XPathResult.UNORDERED_NODE_ITERATOR_TYPE; + } + } + this.resultType = t; + switch (t) { + case XPathResult.NUMBER_TYPE: + this.numberValue = v.numberValue(); + return; + case XPathResult.STRING_TYPE: + this.stringValue = v.stringValue(); + return; + case XPathResult.BOOLEAN_TYPE: + this.booleanValue = v.booleanValue(); + return; + case XPathResult.ANY_UNORDERED_NODE_TYPE: + case XPathResult.FIRST_ORDERED_NODE_TYPE: + if (v.constructor === XNodeSet) { + this.singleNodeValue = v.first(); + return; + } + break; + case XPathResult.UNORDERED_NODE_ITERATOR_TYPE: + case XPathResult.ORDERED_NODE_ITERATOR_TYPE: + if (v.constructor === XNodeSet) { + this.invalidIteratorState = false; + this.nodes = v.toArray(); + this.iteratorIndex = 0; + return; + } + break; + case XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE: + case XPathResult.ORDERED_NODE_SNAPSHOT_TYPE: + if (v.constructor === XNodeSet) { + this.nodes = v.toArray(); + this.snapshotLength = this.nodes.length; + return; + } + break; + } + throw new XPathException(XPathException.TYPE_ERR); + } + ; + XPathResult.prototype.iterateNext = function() { + if (this.resultType != XPathResult.UNORDERED_NODE_ITERATOR_TYPE && this.resultType != XPathResult.ORDERED_NODE_ITERATOR_TYPE) { + throw new XPathException(XPathException.TYPE_ERR); + } + return this.nodes[this.iteratorIndex++]; + }; + XPathResult.prototype.snapshotItem = function(i) { + if (this.resultType != XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE && this.resultType != XPathResult.ORDERED_NODE_SNAPSHOT_TYPE) { + throw new XPathException(XPathException.TYPE_ERR); + } + return this.nodes[i]; + }; + XPathResult.ANY_TYPE = 0; + XPathResult.NUMBER_TYPE = 1; + XPathResult.STRING_TYPE = 2; + XPathResult.BOOLEAN_TYPE = 3; + XPathResult.UNORDERED_NODE_ITERATOR_TYPE = 4; + XPathResult.ORDERED_NODE_ITERATOR_TYPE = 5; + XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE = 6; + XPathResult.ORDERED_NODE_SNAPSHOT_TYPE = 7; + XPathResult.ANY_UNORDERED_NODE_TYPE = 8; + XPathResult.FIRST_ORDERED_NODE_TYPE = 9; + function installDOM3XPathSupport(doc, p) { + doc.createExpression = function(e, r) { + try { + return new XPathExpression(e, r, p); + } catch (e2) { + throw new XPathException(XPathException.INVALID_EXPRESSION_ERR, e2); + } + }; + doc.createNSResolver = function(n) { + return new NodeXPathNSResolver(n); + }; + doc.evaluate = function(e, cn, r, t, res) { + if (t < 0 || t > 9) { + throw { code: 0, toString: function() { + return "Request type not supported"; + } }; + } + return doc.createExpression(e, r, p).evaluate(cn, t, res); + }; + } + ; + try { + var shouldInstall = true; + try { + if (document.implementation && document.implementation.hasFeature && document.implementation.hasFeature("XPath", null)) { + shouldInstall = false; + } + } catch (e) { + } + if (shouldInstall) { + installDOM3XPathSupport(document, new XPathParser()); + } + } catch (e) { + } + installDOM3XPathSupport(exports3, new XPathParser()); + (function() { + var parser = new XPathParser(); + var defaultNSResolver = new NamespaceResolver(); + var defaultFunctionResolver = new FunctionResolver(); + var defaultVariableResolver = new VariableResolver(); + function makeNSResolverFromFunction(func) { + return { + getNamespace: function(prefix, node) { + var ns = func(prefix, node); + return ns || defaultNSResolver.getNamespace(prefix, node); + } + }; + } + function makeNSResolverFromObject(obj) { + return makeNSResolverFromFunction(obj.getNamespace.bind(obj)); + } + function makeNSResolverFromMap(map2) { + return makeNSResolverFromFunction(function(prefix) { + return map2[prefix]; + }); + } + function makeNSResolver(resolver) { + if (resolver && typeof resolver.getNamespace === "function") { + return makeNSResolverFromObject(resolver); + } + if (typeof resolver === "function") { + return makeNSResolverFromFunction(resolver); + } + if (typeof resolver === "object") { + return makeNSResolverFromMap(resolver); + } + return defaultNSResolver; + } + function convertValue(value) { + if (value === null || typeof value === "undefined" || value instanceof XString || value instanceof XBoolean || value instanceof XNumber || value instanceof XNodeSet) { + return value; + } + switch (typeof value) { + case "string": + return new XString(value); + case "boolean": + return new XBoolean(value); + case "number": + return new XNumber(value); + } + var ns = new XNodeSet(); + ns.addArray([].concat(value)); + return ns; + } + function makeEvaluator(func) { + return function(context) { + var args = Array.prototype.slice.call(arguments, 1).map(function(arg) { + return arg.evaluate(context); + }); + var result = func.apply(this, [].concat(context, args)); + return convertValue(result); + }; + } + function makeFunctionResolverFromFunction(func) { + return { + getFunction: function(name2, namespace) { + var found = func(name2, namespace); + if (found) { + return makeEvaluator(found); + } + return defaultFunctionResolver.getFunction(name2, namespace); + } + }; + } + function makeFunctionResolverFromObject(obj) { + return makeFunctionResolverFromFunction(obj.getFunction.bind(obj)); + } + function makeFunctionResolverFromMap(map2) { + return makeFunctionResolverFromFunction(function(name2) { + return map2[name2]; + }); + } + function makeFunctionResolver(resolver) { + if (resolver && typeof resolver.getFunction === "function") { + return makeFunctionResolverFromObject(resolver); + } + if (typeof resolver === "function") { + return makeFunctionResolverFromFunction(resolver); + } + if (typeof resolver === "object") { + return makeFunctionResolverFromMap(resolver); + } + return defaultFunctionResolver; + } + function makeVariableResolverFromFunction(func) { + return { + getVariable: function(name2, namespace) { + var value = func(name2, namespace); + return convertValue(value); + } + }; + } + function makeVariableResolver(resolver) { + if (resolver) { + if (typeof resolver.getVariable === "function") { + return makeVariableResolverFromFunction(resolver.getVariable.bind(resolver)); + } + if (typeof resolver === "function") { + return makeVariableResolverFromFunction(resolver); + } + if (typeof resolver === "object") { + return makeVariableResolverFromFunction(function(name2) { + return resolver[name2]; + }); + } + } + return defaultVariableResolver; + } + function copyIfPresent(prop, dest, source) { + if (prop in source) { + dest[prop] = source[prop]; + } + } + function makeContext(options) { + var context = new XPathContext(); + if (options) { + context.namespaceResolver = makeNSResolver(options.namespaces); + context.functionResolver = makeFunctionResolver(options.functions); + context.variableResolver = makeVariableResolver(options.variables); + context.expressionContextNode = options.node; + copyIfPresent("allowAnyNamespaceForNoPrefix", context, options); + copyIfPresent("isHtml", context, options); + } else { + context.namespaceResolver = defaultNSResolver; + } + return context; + } + function evaluate(parsedExpression, options) { + var context = makeContext(options); + return parsedExpression.evaluate(context); + } + var evaluatorPrototype = { + evaluate: function(options) { + return evaluate(this.expression, options); + }, + evaluateNumber: function(options) { + return this.evaluate(options).numberValue(); + }, + evaluateString: function(options) { + return this.evaluate(options).stringValue(); + }, + evaluateBoolean: function(options) { + return this.evaluate(options).booleanValue(); + }, + evaluateNodeSet: function(options) { + return this.evaluate(options).nodeset(); + }, + select: function(options) { + return this.evaluateNodeSet(options).toArray(); + }, + select1: function(options) { + return this.select(options)[0]; + } + }; + function parse(xpath3) { + var parsed = parser.parse(xpath3); + return Object.create(evaluatorPrototype, { + expression: { + value: parsed + } + }); + } + exports3.parse = parse; + })(); + assign( + exports3, + { + XPath, + XPathParser, + XPathResult, + Step, + PathExpr, + NodeTest, + LocationPath, + OrOperation, + AndOperation, + BarOperation, + EqualsOperation, + NotEqualOperation, + LessThanOperation, + GreaterThanOperation, + LessThanOrEqualOperation, + GreaterThanOrEqualOperation, + PlusOperation, + MinusOperation, + MultiplyOperation, + DivOperation, + ModOperation, + UnaryMinusOperation, + FunctionCall, + VariableReference, + XPathContext, + XNodeSet, + XBoolean, + XString, + XNumber, + NamespaceResolver, + FunctionResolver, + VariableResolver, + Utilities + } + ); + exports3.select = function(e, doc, single) { + return exports3.selectWithResolver(e, doc, null, single); + }; + exports3.useNamespaces = function(mappings) { + var resolver = { + mappings: mappings || {}, + lookupNamespaceURI: function(prefix) { + return this.mappings[prefix]; + } + }; + return function(e, doc, single) { + return exports3.selectWithResolver(e, doc, resolver, single); + }; + }; + exports3.selectWithResolver = function(e, doc, resolver, single) { + var expression = new XPathExpression(e, resolver, new XPathParser()); + var type = XPathResult.ANY_TYPE; + var result = expression.evaluate(doc, type, null); + if (result.resultType == XPathResult.STRING_TYPE) { + result = result.stringValue; + } else if (result.resultType == XPathResult.NUMBER_TYPE) { + result = result.numberValue; + } else if (result.resultType == XPathResult.BOOLEAN_TYPE) { + result = result.booleanValue; + } else { + result = result.nodes; + if (single) { + result = result[0]; + } + } + return result; + }; + exports3.select1 = function(e, doc) { + return exports3.select(e, doc, true); + }; + var isArrayOfNodes = function(value) { + return Array.isArray(value) && value.every(isNodeLike); + }; + var isNodeOfType = function(type) { + return function(value) { + return isNodeLike(value) && value.nodeType === type; + }; + }; + assign( + exports3, + { + isNodeLike, + isArrayOfNodes, + isElement: isNodeOfType(NodeTypes.ELEMENT_NODE), + isAttribute: isNodeOfType(NodeTypes.ATTRIBUTE_NODE), + isTextNode: isNodeOfType(NodeTypes.TEXT_NODE), + isCDATASection: isNodeOfType(NodeTypes.CDATA_SECTION_NODE), + isProcessingInstruction: isNodeOfType(NodeTypes.PROCESSING_INSTRUCTION_NODE), + isComment: isNodeOfType(NodeTypes.COMMENT_NODE), + isDocumentNode: isNodeOfType(NodeTypes.DOCUMENT_NODE), + isDocumentTypeNode: isNodeOfType(NodeTypes.DOCUMENT_TYPE_NODE), + isDocumentFragment: isNodeOfType(NodeTypes.DOCUMENT_FRAGMENT_NODE) + } + ); + })(xpath2); + } +}); + +// src/index.ts +var src_exports = {}; +__export(src_exports, { + plugin: () => plugin +}); +module.exports = __toCommonJS(src_exports); +var import_xmldom = __toESM(require_lib()); + +// ../../node_modules/jsonpath-plus/dist/index-node-esm.js +var import_vm = __toESM(require("vm"), 1); +var { + hasOwnProperty: hasOwnProp +} = Object.prototype; +function push(arr, item) { + arr = arr.slice(); + arr.push(item); + return arr; +} +function unshift(item, arr) { + arr = arr.slice(); + arr.unshift(item); + return arr; +} +var NewError = class extends Error { + /** + * @param {AnyResult} value The evaluated scalar value + */ + constructor(value) { + super('JSONPath should not be called with "new" (it prevents return of (unwrapped) scalar values)'); + this.avoidNew = true; + this.value = value; + this.name = "NewError"; + } +}; +function JSONPath(opts, expr, obj, callback, otherTypeCallback) { + if (!(this instanceof JSONPath)) { + try { + return new JSONPath(opts, expr, obj, callback, otherTypeCallback); + } catch (e) { + if (!e.avoidNew) { + throw e; + } + return e.value; + } + } + if (typeof opts === "string") { + otherTypeCallback = callback; + callback = obj; + obj = expr; + expr = opts; + opts = null; + } + const optObj = opts && typeof opts === "object"; + opts = opts || {}; + this.json = opts.json || obj; + this.path = opts.path || expr; + this.resultType = opts.resultType || "value"; + this.flatten = opts.flatten || false; + this.wrap = hasOwnProp.call(opts, "wrap") ? opts.wrap : true; + this.sandbox = opts.sandbox || {}; + this.eval = opts.eval === void 0 ? "safe" : opts.eval; + this.ignoreEvalErrors = typeof opts.ignoreEvalErrors === "undefined" ? false : opts.ignoreEvalErrors; + this.parent = opts.parent || null; + this.parentProperty = opts.parentProperty || null; + this.callback = opts.callback || callback || null; + this.otherTypeCallback = opts.otherTypeCallback || otherTypeCallback || function() { + throw new TypeError("You must supply an otherTypeCallback callback option with the @other() operator."); + }; + if (opts.autostart !== false) { + const args = { + path: optObj ? opts.path : expr + }; + if (!optObj) { + args.json = obj; + } else if ("json" in opts) { + args.json = opts.json; + } + const ret = this.evaluate(args); + if (!ret || typeof ret !== "object") { + throw new NewError(ret); + } + return ret; + } +} +JSONPath.prototype.evaluate = function(expr, json, callback, otherTypeCallback) { + let currParent = this.parent, currParentProperty = this.parentProperty; + let { + flatten, + wrap + } = this; + this.currResultType = this.resultType; + this.currEval = this.eval; + this.currSandbox = this.sandbox; + callback = callback || this.callback; + this.currOtherTypeCallback = otherTypeCallback || this.otherTypeCallback; + json = json || this.json; + expr = expr || this.path; + if (expr && typeof expr === "object" && !Array.isArray(expr)) { + if (!expr.path && expr.path !== "") { + throw new TypeError('You must supply a "path" property when providing an object argument to JSONPath.evaluate().'); + } + if (!hasOwnProp.call(expr, "json")) { + throw new TypeError('You must supply a "json" property when providing an object argument to JSONPath.evaluate().'); + } + ({ + json + } = expr); + flatten = hasOwnProp.call(expr, "flatten") ? expr.flatten : flatten; + this.currResultType = hasOwnProp.call(expr, "resultType") ? expr.resultType : this.currResultType; + this.currSandbox = hasOwnProp.call(expr, "sandbox") ? expr.sandbox : this.currSandbox; + wrap = hasOwnProp.call(expr, "wrap") ? expr.wrap : wrap; + this.currEval = hasOwnProp.call(expr, "eval") ? expr.eval : this.currEval; + callback = hasOwnProp.call(expr, "callback") ? expr.callback : callback; + this.currOtherTypeCallback = hasOwnProp.call(expr, "otherTypeCallback") ? expr.otherTypeCallback : this.currOtherTypeCallback; + currParent = hasOwnProp.call(expr, "parent") ? expr.parent : currParent; + currParentProperty = hasOwnProp.call(expr, "parentProperty") ? expr.parentProperty : currParentProperty; + expr = expr.path; + } + currParent = currParent || null; + currParentProperty = currParentProperty || null; + if (Array.isArray(expr)) { + expr = JSONPath.toPathString(expr); + } + if (!expr && expr !== "" || !json) { + return void 0; + } + const exprList = JSONPath.toPathArray(expr); + if (exprList[0] === "$" && exprList.length > 1) { + exprList.shift(); + } + this._hasParentSelector = null; + const result = this._trace(exprList, json, ["$"], currParent, currParentProperty, callback).filter(function(ea) { + return ea && !ea.isParentSelector; + }); + if (!result.length) { + return wrap ? [] : void 0; + } + if (!wrap && result.length === 1 && !result[0].hasArrExpr) { + return this._getPreferredOutput(result[0]); + } + return result.reduce((rslt, ea) => { + const valOrPath = this._getPreferredOutput(ea); + if (flatten && Array.isArray(valOrPath)) { + rslt = rslt.concat(valOrPath); + } else { + rslt.push(valOrPath); + } + return rslt; + }, []); +}; +JSONPath.prototype._getPreferredOutput = function(ea) { + const resultType = this.currResultType; + switch (resultType) { + case "all": { + const path = Array.isArray(ea.path) ? ea.path : JSONPath.toPathArray(ea.path); + ea.pointer = JSONPath.toPointer(path); + ea.path = typeof ea.path === "string" ? ea.path : JSONPath.toPathString(ea.path); + return ea; + } + case "value": + case "parent": + case "parentProperty": + return ea[resultType]; + case "path": + return JSONPath.toPathString(ea[resultType]); + case "pointer": + return JSONPath.toPointer(ea.path); + default: + throw new TypeError("Unknown result type"); + } +}; +JSONPath.prototype._handleCallback = function(fullRetObj, callback, type) { + if (callback) { + const preferredOutput = this._getPreferredOutput(fullRetObj); + fullRetObj.path = typeof fullRetObj.path === "string" ? fullRetObj.path : JSONPath.toPathString(fullRetObj.path); + callback(preferredOutput, type, fullRetObj); + } +}; +JSONPath.prototype._trace = function(expr, val, path, parent, parentPropName, callback, hasArrExpr, literalPriority) { + let retObj; + if (!expr.length) { + retObj = { + path, + value: val, + parent, + parentProperty: parentPropName, + hasArrExpr + }; + this._handleCallback(retObj, callback, "value"); + return retObj; + } + const loc = expr[0], x = expr.slice(1); + const ret = []; + function addRet(elems) { + if (Array.isArray(elems)) { + elems.forEach((t) => { + ret.push(t); + }); + } else { + ret.push(elems); + } + } + if ((typeof loc !== "string" || literalPriority) && val && hasOwnProp.call(val, loc)) { + addRet(this._trace(x, val[loc], push(path, loc), val, loc, callback, hasArrExpr)); + } else if (loc === "*") { + this._walk(val, (m) => { + addRet(this._trace(x, val[m], push(path, m), val, m, callback, true, true)); + }); + } else if (loc === "..") { + addRet(this._trace(x, val, path, parent, parentPropName, callback, hasArrExpr)); + this._walk(val, (m) => { + if (typeof val[m] === "object") { + addRet(this._trace(expr.slice(), val[m], push(path, m), val, m, callback, true)); + } + }); + } else if (loc === "^") { + this._hasParentSelector = true; + return { + path: path.slice(0, -1), + expr: x, + isParentSelector: true + }; + } else if (loc === "~") { + retObj = { + path: push(path, loc), + value: parentPropName, + parent, + parentProperty: null + }; + this._handleCallback(retObj, callback, "property"); + return retObj; + } else if (loc === "$") { + addRet(this._trace(x, val, path, null, null, callback, hasArrExpr)); + } else if (/^(-?\d*):(-?\d*):?(\d*)$/u.test(loc)) { + addRet(this._slice(loc, x, val, path, parent, parentPropName, callback)); + } else if (loc.indexOf("?(") === 0) { + if (this.currEval === false) { + throw new Error("Eval [?(expr)] prevented in JSONPath expression."); + } + const safeLoc = loc.replace(/^\?\((.*?)\)$/u, "$1"); + const nested = /@.?([^?]*)[['](\??\(.*?\))(?!.\)\])[\]']/gu.exec(safeLoc); + if (nested) { + this._walk(val, (m) => { + const npath = [nested[2]]; + const nvalue = nested[1] ? val[m][nested[1]] : val[m]; + const filterResults = this._trace(npath, nvalue, path, parent, parentPropName, callback, true); + if (filterResults.length > 0) { + addRet(this._trace(x, val[m], push(path, m), val, m, callback, true)); + } + }); + } else { + this._walk(val, (m) => { + if (this._eval(safeLoc, val[m], m, path, parent, parentPropName)) { + addRet(this._trace(x, val[m], push(path, m), val, m, callback, true)); + } + }); + } + } else if (loc[0] === "(") { + if (this.currEval === false) { + throw new Error("Eval [(expr)] prevented in JSONPath expression."); + } + addRet(this._trace(unshift(this._eval(loc, val, path[path.length - 1], path.slice(0, -1), parent, parentPropName), x), val, path, parent, parentPropName, callback, hasArrExpr)); + } else if (loc[0] === "@") { + let addType = false; + const valueType = loc.slice(1, -2); + switch (valueType) { + case "scalar": + if (!val || !["object", "function"].includes(typeof val)) { + addType = true; + } + break; + case "boolean": + case "string": + case "undefined": + case "function": + if (typeof val === valueType) { + addType = true; + } + break; + case "integer": + if (Number.isFinite(val) && !(val % 1)) { + addType = true; + } + break; + case "number": + if (Number.isFinite(val)) { + addType = true; + } + break; + case "nonFinite": + if (typeof val === "number" && !Number.isFinite(val)) { + addType = true; + } + break; + case "object": + if (val && typeof val === valueType) { + addType = true; + } + break; + case "array": + if (Array.isArray(val)) { + addType = true; + } + break; + case "other": + addType = this.currOtherTypeCallback(val, path, parent, parentPropName); + break; + case "null": + if (val === null) { + addType = true; + } + break; + default: + throw new TypeError("Unknown value type " + valueType); + } + if (addType) { + retObj = { + path, + value: val, + parent, + parentProperty: parentPropName + }; + this._handleCallback(retObj, callback, "value"); + return retObj; + } + } else if (loc[0] === "`" && val && hasOwnProp.call(val, loc.slice(1))) { + const locProp = loc.slice(1); + addRet(this._trace(x, val[locProp], push(path, locProp), val, locProp, callback, hasArrExpr, true)); + } else if (loc.includes(",")) { + const parts = loc.split(","); + for (const part of parts) { + addRet(this._trace(unshift(part, x), val, path, parent, parentPropName, callback, true)); + } + } else if (!literalPriority && val && hasOwnProp.call(val, loc)) { + addRet(this._trace(x, val[loc], push(path, loc), val, loc, callback, hasArrExpr, true)); + } + if (this._hasParentSelector) { + for (let t = 0; t < ret.length; t++) { + const rett = ret[t]; + if (rett && rett.isParentSelector) { + const tmp = this._trace(rett.expr, val, rett.path, parent, parentPropName, callback, hasArrExpr); + if (Array.isArray(tmp)) { + ret[t] = tmp[0]; + const tl = tmp.length; + for (let tt = 1; tt < tl; tt++) { + t++; + ret.splice(t, 0, tmp[tt]); + } + } else { + ret[t] = tmp; + } + } + } + } + return ret; +}; +JSONPath.prototype._walk = function(val, f) { + if (Array.isArray(val)) { + const n = val.length; + for (let i = 0; i < n; i++) { + f(i); + } + } else if (val && typeof val === "object") { + Object.keys(val).forEach((m) => { + f(m); + }); + } +}; +JSONPath.prototype._slice = function(loc, expr, val, path, parent, parentPropName, callback) { + if (!Array.isArray(val)) { + return void 0; + } + const len = val.length, parts = loc.split(":"), step = parts[2] && Number.parseInt(parts[2]) || 1; + let start = parts[0] && Number.parseInt(parts[0]) || 0, end = parts[1] && Number.parseInt(parts[1]) || len; + start = start < 0 ? Math.max(0, start + len) : Math.min(len, start); + end = end < 0 ? Math.max(0, end + len) : Math.min(len, end); + const ret = []; + for (let i = start; i < end; i += step) { + const tmp = this._trace(unshift(i, expr), val, path, parent, parentPropName, callback, true); + tmp.forEach((t) => { + ret.push(t); + }); + } + return ret; +}; +JSONPath.prototype._eval = function(code, _v, _vname, path, parent, parentPropName) { + this.currSandbox._$_parentProperty = parentPropName; + this.currSandbox._$_parent = parent; + this.currSandbox._$_property = _vname; + this.currSandbox._$_root = this.json; + this.currSandbox._$_v = _v; + const containsPath = code.includes("@path"); + if (containsPath) { + this.currSandbox._$_path = JSONPath.toPathString(path.concat([_vname])); + } + const scriptCacheKey = this.currEval + "Script:" + code; + if (!JSONPath.cache[scriptCacheKey]) { + let script = code.replace(/@parentProperty/gu, "_$_parentProperty").replace(/@parent/gu, "_$_parent").replace(/@property/gu, "_$_property").replace(/@root/gu, "_$_root").replace(/@([.\s)[])/gu, "_$_v$1"); + if (containsPath) { + script = script.replace(/@path/gu, "_$_path"); + } + if (this.currEval === "safe" || this.currEval === true || this.currEval === void 0) { + JSONPath.cache[scriptCacheKey] = new this.safeVm.Script(script); + } else if (this.currEval === "native") { + JSONPath.cache[scriptCacheKey] = new this.vm.Script(script); + } else if (typeof this.currEval === "function" && this.currEval.prototype && hasOwnProp.call(this.currEval.prototype, "runInNewContext")) { + const CurrEval = this.currEval; + JSONPath.cache[scriptCacheKey] = new CurrEval(script); + } else if (typeof this.currEval === "function") { + JSONPath.cache[scriptCacheKey] = { + runInNewContext: (context) => this.currEval(script, context) + }; + } else { + throw new TypeError(`Unknown "eval" property "${this.currEval}"`); + } + } + try { + return JSONPath.cache[scriptCacheKey].runInNewContext(this.currSandbox); + } catch (e) { + if (this.ignoreEvalErrors) { + return false; + } + throw new Error("jsonPath: " + e.message + ": " + code); + } +}; +JSONPath.cache = {}; +JSONPath.toPathString = function(pathArr) { + const x = pathArr, n = x.length; + let p = "$"; + for (let i = 1; i < n; i++) { + if (!/^(~|\^|@.*?\(\))$/u.test(x[i])) { + p += /^[0-9*]+$/u.test(x[i]) ? "[" + x[i] + "]" : "['" + x[i] + "']"; + } + } + return p; +}; +JSONPath.toPointer = function(pointer) { + const x = pointer, n = x.length; + let p = ""; + for (let i = 1; i < n; i++) { + if (!/^(~|\^|@.*?\(\))$/u.test(x[i])) { + p += "/" + x[i].toString().replace(/~/gu, "~0").replace(/\//gu, "~1"); + } + } + return p; +}; +JSONPath.toPathArray = function(expr) { + const { + cache + } = JSONPath; + if (cache[expr]) { + return cache[expr].concat(); + } + const subx = []; + const normalized = expr.replace(/@(?:null|boolean|number|string|integer|undefined|nonFinite|scalar|array|object|function|other)\(\)/gu, ";$&;").replace(/[['](\??\(.*?\))[\]'](?!.\])/gu, function($0, $1) { + return "[#" + (subx.push($1) - 1) + "]"; + }).replace(/\[['"]([^'\]]*)['"]\]/gu, function($0, prop) { + return "['" + prop.replace(/\./gu, "%@%").replace(/~/gu, "%%@@%%") + "']"; + }).replace(/~/gu, ";~;").replace(/['"]?\.['"]?(?![^[]*\])|\[['"]?/gu, ";").replace(/%@%/gu, ".").replace(/%%@@%%/gu, "~").replace(/(?:;)?(\^+)(?:;)?/gu, function($0, ups) { + return ";" + ups.split("").join(";") + ";"; + }).replace(/;;;|;;/gu, ";..;").replace(/;$|'?\]|'$/gu, ""); + const exprList = normalized.split(";").map(function(exp) { + const match = exp.match(/#(\d+)/u); + return !match || !match[1] ? exp : subx[match[1]]; + }); + cache[expr] = exprList; + return cache[expr].concat(); +}; +JSONPath.prototype.vm = import_vm.default; +JSONPath.prototype.safeVm = import_vm.default; +var SafeScript = import_vm.default.Script; + +// src/index.ts +var import_node_fs = require("node:fs"); +var import_xpath = __toESM(require_xpath()); +var plugin = { + templateFunctions: [{ + name: "response", + args: [ + { + type: "http_request", + name: "request", + label: "Request" + }, + { + type: "text", + name: "path", + label: "JSONPath or XPath", + placeholder: "$.books[0].id or /books[0]/id" + }, + { + type: "select", + name: "behavior", + label: "Sending Behavior", + defaultValue: "smart", + options: [ + { name: "When no responses", value: "smart" }, + { name: "Always", value: "always" } + ] + } + ], + async onRender(ctx, args) { + if (!args.values.request || !args.values.path) { + return null; + } + const httpRequest = await ctx.httpRequest.getById({ id: args.values.request ?? "n/a" }); + if (httpRequest == null) { + return null; + } + const responses = await ctx.httpResponse.find({ requestId: httpRequest.id, limit: 1 }); + if (args.values.behavior === "never" && responses.length === 0) { + return null; + } + let response = responses[0] ?? null; + let behavior = args.values.behavior === "always" && args.purpose === "preview" ? "smart" : args.values.behavior; + if (behavior === "smart" && response == null || behavior === "always") { + const renderedHttpRequest = await ctx.httpRequest.render({ httpRequest, purpose: args.purpose }); + response = await ctx.httpRequest.send({ httpRequest: renderedHttpRequest }); + } + if (response == null) { + return null; + } + if (response.bodyPath == null) { + return null; + } + let body; + try { + body = (0, import_node_fs.readFileSync)(response.bodyPath, "utf-8"); + } catch (_) { + return null; + } + try { + return filterJSONPath(body, args.values.path); + } catch (err) { + } + try { + return filterXPath(body, args.values.path); + } catch (err) { + } + return null; + } + }] +}; +function filterJSONPath(body, path) { + const parsed = JSON.parse(body); + const items = JSONPath({ path, json: parsed })[0]; + if (items == null) { + return ""; + } + if (Object.prototype.toString.call(items) === "[object Array]" || Object.prototype.toString.call(items) === "[object Object]") { + return JSON.stringify(items); + } else { + return String(items); + } +} +function filterXPath(body, path) { + const doc = new import_xmldom.DOMParser().parseFromString(body, "text/xml"); + const items = import_xpath.default.select(path, doc, false); + if (Array.isArray(items)) { + return items[0] != null ? String(items[0].firstChild ?? "") : ""; + } else { + return String(items); + } +} +// Annotate the CommonJS export names for ESM import in node: +0 && (module.exports = { + plugin +}); diff --git a/src-tauri/vendored/plugins/template-function-response/package.json b/src-tauri/vendored/plugins/template-function-response/package.json new file mode 100644 index 00000000..4dfc14ee --- /dev/null +++ b/src-tauri/vendored/plugins/template-function-response/package.json @@ -0,0 +1,21 @@ +{ + "name": "template-function-response", + "private": true, + "version": "0.0.1", + "scripts": { + "build": "yaakcli build ./src/index.ts" + }, + "dependencies": { + "@yaakapp/api": "^0.2.9", + "jsonpath-plus": "^9.0.0", + "xpath": "^0.0.34", + "@xmldom/xmldom": "^0.8.10" + }, + "devDependencies": { + "@yaakapp/cli": "^0.0.42", + "@types/jsonpath": "^0.2.4", + "@types/node": "^20.14.9", + "typescript": "^5.5.2", + "vitest": "^1.4.0" + } +} diff --git a/src-tauri/yaak_models/src/plugin.rs b/src-tauri/yaak_models/src/plugin.rs index df8283bd..e95a7d6a 100644 --- a/src-tauri/yaak_models/src/plugin.rs +++ b/src-tauri/yaak_models/src/plugin.rs @@ -39,7 +39,6 @@ impl Builder { create_dir_all(app_path.clone()).expect("Problem creating App directory!"); let db_file_path = app_path.join("db.sqlite"); - info!("Opening SQLite DB at {db_file_path:?}"); { let db_file_path = db_file_path.clone(); @@ -66,7 +65,7 @@ impl Builder { async fn must_migrate_db(app_handle: &AppHandle, path: &PathBuf) { let app_data_dir = app_handle.path().app_data_dir().unwrap(); let sqlite_file_path = app_data_dir.join("db.sqlite"); - + info!("Creating database file at {:?}", sqlite_file_path); File::options() .write(true) @@ -76,7 +75,7 @@ async fn must_migrate_db(app_handle: &AppHandle, path: &PathBuf) let p_string = sqlite_file_path.to_string_lossy().replace(' ', "%20"); let url = format!("sqlite://{}?mode=rwc", p_string); - + info!("Connecting to database at {}", url); let opts = SqliteConnectOptions::from_str(path.to_string_lossy().to_string().as_str()).unwrap(); let pool = SqlitePool::connect_with(opts) @@ -86,11 +85,11 @@ async fn must_migrate_db(app_handle: &AppHandle, path: &PathBuf) .path() .resolve("migrations", BaseDirectory::Resource) .expect("failed to resolve resource"); - + info!("Running database migrations from: {}", p.to_string_lossy()); let mut m = Migrator::new(p).await.expect("Failed to load migrations"); m.set_ignore_missing(true); // So we can roll back versions and not crash m.run(&pool).await.expect("Failed to run migrations"); - + info!("Database migrations complete"); } diff --git a/src-tauri/yaak_plugin_runtime/bindings/events.ts b/src-tauri/yaak_plugin_runtime/bindings/events.ts index 7e5a5fbc..747c9c3f 100644 --- a/src-tauri/yaak_plugin_runtime/bindings/events.ts +++ b/src-tauri/yaak_plugin_runtime/bindings/events.ts @@ -6,7 +6,7 @@ import type { HttpRequest } from "./models"; import type { HttpResponse } from "./models"; import type { Workspace } from "./models"; -export type BootRequest = { dir: string, }; +export type BootRequest = { dir: string, watch: boolean, }; export type BootResponse = { name: string, version: string, capabilities: Array, }; diff --git a/src-tauri/yaak_plugin_runtime/src/events.rs b/src-tauri/yaak_plugin_runtime/src/events.rs index c68c7b0e..0562454e 100644 --- a/src-tauri/yaak_plugin_runtime/src/events.rs +++ b/src-tauri/yaak_plugin_runtime/src/events.rs @@ -74,6 +74,7 @@ pub enum InternalEventPayload { #[ts(export, export_to="events.ts")] pub struct BootRequest { pub dir: String, + pub watch: bool, } #[derive(Debug, Clone, Default, Serialize, Deserialize, TS)] diff --git a/src-tauri/yaak_plugin_runtime/src/manager.rs b/src-tauri/yaak_plugin_runtime/src/manager.rs index 71198dff..4d51f899 100644 --- a/src-tauri/yaak_plugin_runtime/src/manager.rs +++ b/src-tauri/yaak_plugin_runtime/src/manager.rs @@ -12,6 +12,7 @@ use crate::server::plugin_runtime::plugin_runtime_server::PluginRuntimeServer; use crate::server::PluginRuntimeServerImpl; use log::{info, warn}; use std::collections::HashMap; +use std::env; use std::path::PathBuf; use std::sync::Arc; use std::time::Duration; @@ -32,6 +33,12 @@ pub struct PluginManager { server: Arc, } +#[derive(Clone)] +struct PluginCandidate { + dir: String, + watch: bool, +} + impl PluginManager { pub fn new(app_handle: AppHandle) -> PluginManager { let (events_tx, mut events_rx) = mpsc::channel(128); @@ -123,24 +130,45 @@ impl PluginManager { plugin_manager } - pub async fn list_plugin_dirs(&self, app_handle: &AppHandle) -> Vec { - let plugins_dir = app_handle + async fn list_plugin_dirs( + &self, + app_handle: &AppHandle, + ) -> Vec { + let bundled_plugins_dir = &app_handle .path() .resolve("vendored/plugins", BaseDirectory::Resource) .expect("failed to resolve plugin directory resource"); - let bundled_plugin_dirs = read_plugins_dir(&plugins_dir) + let plugins_dir = match env::var("YAAK_PLUGINS_DIR") { + Ok(d) => &PathBuf::from(d), + Err(_) => bundled_plugins_dir, + }; + + info!("Loading bundled plugins from {plugins_dir:?}"); + + let bundled_plugin_dirs: Vec = read_plugins_dir(&plugins_dir) .await - .expect(format!("Failed to read plugins dir: {:?}", plugins_dir).as_str()); + .expect(format!("Failed to read plugins dir: {:?}", plugins_dir).as_str()) + .iter() + .map(|d| { + let is_vendored = plugins_dir.starts_with(bundled_plugins_dir); + PluginCandidate { + dir: d.into(), + watch: !is_vendored, + } + }) + .collect(); let plugins = list_plugins(app_handle).await.unwrap_or_default(); - let installed_plugin_dirs = plugins + let installed_plugin_dirs: Vec = plugins .iter() - .map(|p| p.directory.to_owned()) - .collect::>(); + .map(|p| PluginCandidate { + dir: p.directory.to_owned(), + watch: true, + }) + .collect(); - let plugin_dirs = [bundled_plugin_dirs, installed_plugin_dirs].concat(); - plugin_dirs + [bundled_plugin_dirs, installed_plugin_dirs].concat() } pub async fn uninstall(&self, dir: &str) -> Result<()> { @@ -152,12 +180,11 @@ impl PluginManager { } async fn remove_plugin(&self, plugin: &PluginHandle) -> Result<()> { - let mut plugins = self.plugins.lock().await; - // Terminate the plugin plugin.terminate().await?; // Remove the plugin from the list + let mut plugins = self.plugins.lock().await; let pos = plugins.iter().position(|p| p.ref_id == plugin.ref_id); if let Some(pos) = pos { plugins.remove(pos); @@ -166,26 +193,22 @@ impl PluginManager { Ok(()) } - pub async fn add_plugin_by_dir(&self, dir: &str) -> Result<()> { + pub async fn add_plugin_by_dir(&self, dir: &str, watch: bool) -> Result<()> { info!("Adding plugin by dir {dir}"); let maybe_tx = self.server.app_to_plugin_events_tx.lock().await; let tx = match &*maybe_tx { None => return Err(ClientNotInitializedErr), Some(tx) => tx, }; - let ph = PluginHandle::new(dir, tx.clone()); - self.plugins.lock().await.push(ph.clone()); - let plugin = self - .get_plugin_by_dir(dir) - .await - .ok_or(PluginNotFoundErr(dir.to_string()))?; + let plugin_handle = PluginHandle::new(dir, tx.clone()); // Boot the plugin let event = self .send_to_plugin_and_wait( - &plugin, + &plugin_handle, &InternalEventPayload::BootRequest(BootRequest { dir: dir.to_string(), + watch, }), ) .await?; @@ -195,7 +218,10 @@ impl PluginManager { _ => return Err(UnknownEventErr), }; - plugin.set_boot_response(&resp).await; + plugin_handle.set_boot_response(&resp).await; + + // Add the new plugin after it boots + self.plugins.lock().await.push(plugin_handle.clone()); Ok(()) } @@ -204,18 +230,30 @@ impl PluginManager { &self, app_handle: &AppHandle, ) -> Result<()> { - for dir in self.list_plugin_dirs(app_handle).await { + let dirs = self.list_plugin_dirs(app_handle).await; + for d in dirs.clone() { // First remove the plugin if it exists - if let Some(plugin) = self.get_plugin_by_dir(dir.as_str()).await { + if let Some(plugin) = self.get_plugin_by_dir(d.dir.as_str()).await { if let Err(e) = self.remove_plugin(&plugin).await { - warn!("Failed to remove plugin {dir} {e:?}"); + warn!("Failed to remove plugin {} {e:?}", d.dir); } } - if let Err(e) = self.add_plugin_by_dir(dir.as_str()).await { - warn!("Failed to add plugin {dir} {e:?}"); + if let Err(e) = self.add_plugin_by_dir(d.dir.as_str(), d.watch).await { + warn!("Failed to add plugin {} {e:?}", d.dir); } } + info!( + "Initialized all plugins:\n - {}", + self.plugins + .lock() + .await + .iter() + .map(|p| p.dir.to_string()) + .collect::>() + .join("\n - "), + ); + Ok(()) } @@ -271,7 +309,7 @@ impl PluginManager { pub async fn get_plugin_by_name(&self, name: &str) -> Option { for plugin in self.plugins.lock().await.iter().cloned() { - let info = plugin.info().await?; + let info = plugin.info().await; if info.name == name { return Some(plugin); } @@ -446,8 +484,7 @@ impl PluginManager { .get_plugin_by_ref_id(ref_id.as_str()) .await .ok_or(PluginNotFoundErr(ref_id))?; - let info = plugin.info().await.unwrap(); - Ok((resp, info.name)) + Ok((resp, plugin.info().await.name)) } } } diff --git a/src-tauri/yaak_plugin_runtime/src/plugin_handle.rs b/src-tauri/yaak_plugin_runtime/src/plugin_handle.rs index a4d5937e..a85e4740 100644 --- a/src-tauri/yaak_plugin_runtime/src/plugin_handle.rs +++ b/src-tauri/yaak_plugin_runtime/src/plugin_handle.rs @@ -11,7 +11,7 @@ pub struct PluginHandle { pub ref_id: String, pub dir: String, pub(crate) to_plugin_tx: Arc>>>, - pub(crate) boot_resp: Arc>>, + pub(crate) boot_resp: Arc>, } impl PluginHandle { @@ -22,11 +22,11 @@ impl PluginHandle { ref_id: ref_id.clone(), dir: dir.to_string(), to_plugin_tx: Arc::new(Mutex::new(tx)), - boot_resp: Arc::new(Mutex::new(None)), + boot_resp: Arc::new(Mutex::new(BootResponse::default())), } } - pub async fn info(&self) -> Option { + pub async fn info(&self) -> BootResponse { let resp = &*self.boot_resp.lock().await; resp.clone() } @@ -72,6 +72,6 @@ impl PluginHandle { pub async fn set_boot_response(&self, resp: &BootResponse) { let mut boot_resp = self.boot_resp.lock().await; - *boot_resp = Some(resp.clone()); + *boot_resp = resp.clone(); } } diff --git a/src-web/hooks/useHttpRequestActions.ts b/src-web/hooks/useHttpRequestActions.ts index 1eaa7775..ada41322 100644 --- a/src-web/hooks/useHttpRequestActions.ts +++ b/src-web/hooks/useHttpRequestActions.ts @@ -12,7 +12,6 @@ export function useHttpRequestActions() { const httpRequestActions = useQuery({ queryKey: ['http_request_actions', pluginsKey], - refetchOnWindowFocus: false, queryFn: async () => { const responses = (await invokeCmd( 'cmd_http_request_actions',