diff --git a/.github/actions/generate-mobile-docs/action.yml b/.github/actions/generate-mobile-docs/action.yml index 0bc16edeb..adfa5ef28 100644 --- a/.github/actions/generate-mobile-docs/action.yml +++ b/.github/actions/generate-mobile-docs/action.yml @@ -1,6 +1,11 @@ name: Generate Mobile Docs description: Generate mobile docs from mobile document +inputs: + platform: + description: Mobile platform to generate docs from (android | ios) + required: true + runs: using: 'node24' main: 'dist/index.mjs' diff --git a/.github/actions/generate-mobile-docs/dist/index.mjs b/.github/actions/generate-mobile-docs/dist/index.mjs index f8be0b878..1c3e9875b 100644 --- a/.github/actions/generate-mobile-docs/dist/index.mjs +++ b/.github/actions/generate-mobile-docs/dist/index.mjs @@ -10672,6 +10672,14 @@ glob.glob = glob; // src/modules/base.ts var exec = __toESM(require_exec()); + +// src/helpers.ts +var normalizeFrontmatter = (content) => content.replace( + /^(---\n[\s\S]*?\n---)/, + (frontmatter) => frontmatter.replace(/`/g, "") +); + +// src/modules/base.ts var BaseModule = class { tempFiles = {}; PLATFORM; @@ -10703,11 +10711,7 @@ var BaseModule = class { const designSlug = f.split("/"); return designSlug.at(designSlug.length - 2).replace(/-/g, "") === (customTitle || title); }); - let fileContent = fs.readFileSync(file, "utf8"); - fileContent = fileContent.replace( - /^(---\n[\s\S]*?\n---)/, - (frontmatter) => frontmatter.replace(/`/g, "") - ); + const fileContent = normalizeFrontmatter(fs.readFileSync(file, "utf8")); if (designFile) { this.tempFiles[designFile.replace(/design\.mdx$/, `${this.PLATFORM}.mdx`)] = fileContent; } else { @@ -10759,7 +10763,7 @@ var BaseModule = class { if (!designFile) { continue; } - this.tempFiles[designFile.replace(/design\.mdx$/, `${this.PLATFORM}.mdx`)] = fs.readFileSync(file, "utf8"); + this.tempFiles[designFile.replace(/design\.mdx$/, `${this.PLATFORM}.mdx`)] = normalizeFrontmatter(fs.readFileSync(file, "utf8")); } } getComponentTitle(file) { @@ -10861,9 +10865,17 @@ ${parsedMatter.data.description} }; // src/index.ts +var MODULES = { + android: Android, + ios: IOS +}; var run = async () => { - (await new Android().gitClone()).load().convert().save().cleanup(); - (await new IOS().gitClone()).load().convert().save().cleanup(); + const platform = process.env.INPUT_PLATFORM ?? ""; + const Module = MODULES[platform]; + if (!Module) { + throw new Error(`Unknown platform: ${platform}`); + } + (await new Module().gitClone()).load().convert().save().cleanup(); }; run(); /*! Bundled license information: diff --git a/.github/actions/generate-mobile-docs/src/helpers.ts b/.github/actions/generate-mobile-docs/src/helpers.ts new file mode 100644 index 000000000..889e92bbf --- /dev/null +++ b/.github/actions/generate-mobile-docs/src/helpers.ts @@ -0,0 +1,8 @@ +/** + * 모바일 문서 frontmatter의 백틱은 YAML 파싱을 깨뜨리므로 제거한다 + * .github/actions/validate-docs/src/index.ts에 같은 코드가 있으므로 함께 수정한다 + */ +export const normalizeFrontmatter = (content: string) => + content.replace(/^(---\n[\s\S]*?\n---)/, (frontmatter) => + frontmatter.replace(/`/g, ''), + ); diff --git a/.github/actions/generate-mobile-docs/src/index.ts b/.github/actions/generate-mobile-docs/src/index.ts index f6555a845..bb48ae9fe 100644 --- a/.github/actions/generate-mobile-docs/src/index.ts +++ b/.github/actions/generate-mobile-docs/src/index.ts @@ -1,9 +1,20 @@ import Android from './modules/android'; import IOS from './modules/ios'; +const MODULES: Record = { + android: Android, + ios: IOS, +}; + const run = async () => { - (await new Android().gitClone()).load().convert().save().cleanup(); - (await new IOS().gitClone()).load().convert().save().cleanup(); + const platform = process.env.INPUT_PLATFORM ?? ''; + const Module = MODULES[platform]; + + if (!Module) { + throw new Error(`Unknown platform: ${platform}`); + } + + (await new Module().gitClone()).load().convert().save().cleanup(); }; run(); diff --git a/.github/actions/generate-mobile-docs/src/modules/base.ts b/.github/actions/generate-mobile-docs/src/modules/base.ts index 2b0718698..1327fe756 100644 --- a/.github/actions/generate-mobile-docs/src/modules/base.ts +++ b/.github/actions/generate-mobile-docs/src/modules/base.ts @@ -4,6 +4,8 @@ import fs from 'node:fs'; import { globSync } from 'glob'; import * as exec from '@actions/exec'; +import { normalizeFrontmatter } from '../helpers'; + export type CustomComponentMap = Record; export type CopyComponentMap = Record>; @@ -61,12 +63,7 @@ export default abstract class BaseModule { ); }); - let fileContent = fs.readFileSync(file, 'utf8'); - - fileContent = fileContent.replace( - /^(---\n[\s\S]*?\n---)/, - (frontmatter) => frontmatter.replace(/`/g, ''), - ); + const fileContent = normalizeFrontmatter(fs.readFileSync(file, 'utf8')); if (designFile) { this.tempFiles[ @@ -146,7 +143,7 @@ export default abstract class BaseModule { this.tempFiles[ designFile.replace(/design\.mdx$/, `${this.PLATFORM}.mdx`) - ] = fs.readFileSync(file, 'utf8'); + ] = normalizeFrontmatter(fs.readFileSync(file, 'utf8')); } } diff --git a/.github/actions/validate-docs/.gitignore b/.github/actions/validate-docs/.gitignore new file mode 100644 index 000000000..586e3d7af --- /dev/null +++ b/.github/actions/validate-docs/.gitignore @@ -0,0 +1 @@ +!dist \ No newline at end of file diff --git a/.github/actions/validate-docs/action.yml b/.github/actions/validate-docs/action.yml new file mode 100644 index 000000000..133bf3179 --- /dev/null +++ b/.github/actions/validate-docs/action.yml @@ -0,0 +1,16 @@ +name: Validate Docs +description: Compile md/mdx files the same way the docs build does and fail on errors + +inputs: + files: + description: Glob patterns of md/mdx files to validate (newline separated) + required: false + default: '**/*.{md,mdx}' + mobile-source: + description: Validate original docs from a mobile repository (applies the same transform as generate-mobile-docs) + required: false + default: 'false' + +runs: + using: 'node24' + main: 'dist/index.mjs' diff --git a/.github/actions/validate-docs/dist/index.mjs b/.github/actions/validate-docs/dist/index.mjs new file mode 100644 index 000000000..2e361e2fb --- /dev/null +++ b/.github/actions/validate-docs/dist/index.mjs @@ -0,0 +1,44409 @@ +import{createRequire}from'module';const require=createRequire(import.meta.url); +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, { + get: (a, b) => (typeof require !== "undefined" ? require : a)[b] +}) : x)(function(x) { + if (typeof require !== "undefined") return require.apply(this, arguments); + throw Error('Dynamic require of "' + x + '" is not supported'); +}); +var __commonJS = (cb, mod) => function __require2() { + return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; +}; +var __export = (target, all4) => { + for (var name2 in all4) + __defProp(target, name2, { get: all4[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 +)); + +// ../../../node_modules/.pnpm/acorn-jsx@5.3.2_acorn@8.18.0/node_modules/acorn-jsx/xhtml.js +var require_xhtml = __commonJS({ + "../../../node_modules/.pnpm/acorn-jsx@5.3.2_acorn@8.18.0/node_modules/acorn-jsx/xhtml.js"(exports2, module2) { + module2.exports = { + quot: '"', + amp: "&", + apos: "'", + lt: "<", + gt: ">", + nbsp: "\xA0", + iexcl: "\xA1", + cent: "\xA2", + pound: "\xA3", + curren: "\xA4", + yen: "\xA5", + brvbar: "\xA6", + sect: "\xA7", + uml: "\xA8", + copy: "\xA9", + ordf: "\xAA", + laquo: "\xAB", + not: "\xAC", + shy: "\xAD", + reg: "\xAE", + macr: "\xAF", + deg: "\xB0", + plusmn: "\xB1", + sup2: "\xB2", + sup3: "\xB3", + acute: "\xB4", + micro: "\xB5", + para: "\xB6", + middot: "\xB7", + cedil: "\xB8", + sup1: "\xB9", + ordm: "\xBA", + raquo: "\xBB", + frac14: "\xBC", + frac12: "\xBD", + frac34: "\xBE", + iquest: "\xBF", + Agrave: "\xC0", + Aacute: "\xC1", + Acirc: "\xC2", + Atilde: "\xC3", + Auml: "\xC4", + Aring: "\xC5", + AElig: "\xC6", + Ccedil: "\xC7", + Egrave: "\xC8", + Eacute: "\xC9", + Ecirc: "\xCA", + Euml: "\xCB", + Igrave: "\xCC", + Iacute: "\xCD", + Icirc: "\xCE", + Iuml: "\xCF", + ETH: "\xD0", + Ntilde: "\xD1", + Ograve: "\xD2", + Oacute: "\xD3", + Ocirc: "\xD4", + Otilde: "\xD5", + Ouml: "\xD6", + times: "\xD7", + Oslash: "\xD8", + Ugrave: "\xD9", + Uacute: "\xDA", + Ucirc: "\xDB", + Uuml: "\xDC", + Yacute: "\xDD", + THORN: "\xDE", + szlig: "\xDF", + agrave: "\xE0", + aacute: "\xE1", + acirc: "\xE2", + atilde: "\xE3", + auml: "\xE4", + aring: "\xE5", + aelig: "\xE6", + ccedil: "\xE7", + egrave: "\xE8", + eacute: "\xE9", + ecirc: "\xEA", + euml: "\xEB", + igrave: "\xEC", + iacute: "\xED", + icirc: "\xEE", + iuml: "\xEF", + eth: "\xF0", + ntilde: "\xF1", + ograve: "\xF2", + oacute: "\xF3", + ocirc: "\xF4", + otilde: "\xF5", + ouml: "\xF6", + divide: "\xF7", + oslash: "\xF8", + ugrave: "\xF9", + uacute: "\xFA", + ucirc: "\xFB", + uuml: "\xFC", + yacute: "\xFD", + thorn: "\xFE", + yuml: "\xFF", + OElig: "\u0152", + oelig: "\u0153", + Scaron: "\u0160", + scaron: "\u0161", + Yuml: "\u0178", + fnof: "\u0192", + circ: "\u02C6", + tilde: "\u02DC", + Alpha: "\u0391", + Beta: "\u0392", + Gamma: "\u0393", + Delta: "\u0394", + Epsilon: "\u0395", + Zeta: "\u0396", + Eta: "\u0397", + Theta: "\u0398", + Iota: "\u0399", + Kappa: "\u039A", + Lambda: "\u039B", + Mu: "\u039C", + Nu: "\u039D", + Xi: "\u039E", + Omicron: "\u039F", + Pi: "\u03A0", + Rho: "\u03A1", + Sigma: "\u03A3", + Tau: "\u03A4", + Upsilon: "\u03A5", + Phi: "\u03A6", + Chi: "\u03A7", + Psi: "\u03A8", + Omega: "\u03A9", + alpha: "\u03B1", + beta: "\u03B2", + gamma: "\u03B3", + delta: "\u03B4", + epsilon: "\u03B5", + zeta: "\u03B6", + eta: "\u03B7", + theta: "\u03B8", + iota: "\u03B9", + kappa: "\u03BA", + lambda: "\u03BB", + mu: "\u03BC", + nu: "\u03BD", + xi: "\u03BE", + omicron: "\u03BF", + pi: "\u03C0", + rho: "\u03C1", + sigmaf: "\u03C2", + sigma: "\u03C3", + tau: "\u03C4", + upsilon: "\u03C5", + phi: "\u03C6", + chi: "\u03C7", + psi: "\u03C8", + omega: "\u03C9", + thetasym: "\u03D1", + upsih: "\u03D2", + piv: "\u03D6", + ensp: "\u2002", + emsp: "\u2003", + thinsp: "\u2009", + zwnj: "\u200C", + zwj: "\u200D", + lrm: "\u200E", + rlm: "\u200F", + ndash: "\u2013", + mdash: "\u2014", + lsquo: "\u2018", + rsquo: "\u2019", + sbquo: "\u201A", + ldquo: "\u201C", + rdquo: "\u201D", + bdquo: "\u201E", + dagger: "\u2020", + Dagger: "\u2021", + bull: "\u2022", + hellip: "\u2026", + permil: "\u2030", + prime: "\u2032", + Prime: "\u2033", + lsaquo: "\u2039", + rsaquo: "\u203A", + oline: "\u203E", + frasl: "\u2044", + euro: "\u20AC", + image: "\u2111", + weierp: "\u2118", + real: "\u211C", + trade: "\u2122", + alefsym: "\u2135", + larr: "\u2190", + uarr: "\u2191", + rarr: "\u2192", + darr: "\u2193", + harr: "\u2194", + crarr: "\u21B5", + lArr: "\u21D0", + uArr: "\u21D1", + rArr: "\u21D2", + dArr: "\u21D3", + hArr: "\u21D4", + forall: "\u2200", + part: "\u2202", + exist: "\u2203", + empty: "\u2205", + nabla: "\u2207", + isin: "\u2208", + notin: "\u2209", + ni: "\u220B", + prod: "\u220F", + sum: "\u2211", + minus: "\u2212", + lowast: "\u2217", + radic: "\u221A", + prop: "\u221D", + infin: "\u221E", + ang: "\u2220", + and: "\u2227", + or: "\u2228", + cap: "\u2229", + cup: "\u222A", + "int": "\u222B", + there4: "\u2234", + sim: "\u223C", + cong: "\u2245", + asymp: "\u2248", + ne: "\u2260", + equiv: "\u2261", + le: "\u2264", + ge: "\u2265", + sub: "\u2282", + sup: "\u2283", + nsub: "\u2284", + sube: "\u2286", + supe: "\u2287", + oplus: "\u2295", + otimes: "\u2297", + perp: "\u22A5", + sdot: "\u22C5", + lceil: "\u2308", + rceil: "\u2309", + lfloor: "\u230A", + rfloor: "\u230B", + lang: "\u2329", + rang: "\u232A", + loz: "\u25CA", + spades: "\u2660", + clubs: "\u2663", + hearts: "\u2665", + diams: "\u2666" + }; + } +}); + +// ../../../node_modules/.pnpm/acorn@8.18.0/node_modules/acorn/dist/acorn.js +var require_acorn = __commonJS({ + "../../../node_modules/.pnpm/acorn@8.18.0/node_modules/acorn/dist/acorn.js"(exports2, module2) { + (function(global, factory) { + typeof exports2 === "object" && typeof module2 !== "undefined" ? factory(exports2) : typeof define === "function" && define.amd ? define(["exports"], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, factory(global.acorn = {})); + })(exports2, (function(exports3) { + "use strict"; + var astralIdentifierCodes2 = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 7, 9, 32, 4, 318, 1, 78, 5, 71, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 3, 0, 158, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 68, 8, 2, 0, 3, 0, 2, 3, 2, 4, 2, 0, 15, 1, 83, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 7, 19, 58, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 199, 7, 137, 9, 54, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 55, 9, 266, 3, 10, 1, 2, 0, 49, 6, 4, 4, 14, 10, 5350, 0, 7, 14, 11465, 27, 2343, 9, 87, 9, 39, 4, 60, 6, 26, 9, 535, 9, 470, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4178, 9, 519, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 101, 0, 161, 6, 10, 9, 357, 0, 62, 13, 499, 13, 245, 1, 2, 9, 233, 0, 3, 0, 8, 1, 6, 0, 475, 6, 110, 6, 6, 9, 4759, 9, 787719, 239]; + var astralIdentifierStartCodes2 = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 4, 51, 13, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 7, 25, 39, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 39, 27, 10, 22, 251, 41, 7, 1, 17, 5, 57, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 20, 1, 64, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 31, 9, 2, 0, 3, 0, 2, 37, 2, 0, 26, 0, 2, 0, 45, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 38, 6, 186, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 19, 72, 200, 32, 32, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 24, 43, 261, 18, 16, 0, 2, 12, 2, 33, 125, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1071, 18, 5, 26, 3994, 6, 582, 6842, 29, 1763, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 433, 44, 212, 63, 33, 24, 3, 24, 45, 74, 6, 0, 67, 12, 65, 1, 2, 0, 15, 4, 10, 7381, 42, 31, 98, 114, 8702, 3, 2, 6, 2, 1, 2, 290, 16, 0, 30, 2, 3, 0, 15, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 1845, 30, 7, 5, 262, 61, 147, 44, 11, 6, 17, 0, 322, 29, 19, 43, 485, 27, 229, 29, 3, 0, 208, 30, 2, 2, 2, 1, 2, 6, 3, 4, 10, 1, 225, 6, 2, 3, 2, 1, 2, 14, 2, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42719, 33, 4381, 3, 5773, 3, 7472, 16, 621, 2467, 541, 1507, 4938, 6, 8489]; + var nonASCIIidentifierChars2 = "\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ADD\u1AE0-\u1AEB\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F\uFF65"; + var nonASCIIidentifierStartChars2 = "\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088F\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5C\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDC-\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7DC\uA7F1-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC"; + var reservedWords2 = { + 3: "abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile", + 5: "class enum extends super const export import", + 6: "enum", + strict: "implements interface let package private protected public static yield", + strictBind: "eval arguments" + }; + var ecma5AndLessKeywords2 = "break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this"; + var keywords$12 = { + 5: ecma5AndLessKeywords2, + "5module": ecma5AndLessKeywords2 + " export import", + 6: ecma5AndLessKeywords2 + " const class extends export import super" + }; + var keywordRelationalOperator2 = /^in(stanceof)?$/; + var nonASCIIidentifierStart2 = new RegExp("[" + nonASCIIidentifierStartChars2 + "]"); + var nonASCIIidentifier2 = new RegExp("[" + nonASCIIidentifierStartChars2 + nonASCIIidentifierChars2 + "]"); + function isInAstralSet2(code4, set) { + var pos = 65536; + for (var i2 = 0; i2 < set.length; i2 += 2) { + pos += set[i2]; + if (pos > code4) { + return false; + } + pos += set[i2 + 1]; + if (pos >= code4) { + return true; + } + } + return false; + } + function isIdentifierStart2(code4, astral) { + if (code4 < 65) { + return code4 === 36; + } + if (code4 < 91) { + return true; + } + if (code4 < 97) { + return code4 === 95; + } + if (code4 < 123) { + return true; + } + if (code4 <= 65535) { + return code4 >= 170 && nonASCIIidentifierStart2.test(String.fromCharCode(code4)); + } + if (astral === false) { + return false; + } + return isInAstralSet2(code4, astralIdentifierStartCodes2); + } + function isIdentifierChar2(code4, astral) { + if (code4 < 48) { + return code4 === 36; + } + if (code4 < 58) { + return true; + } + if (code4 < 65) { + return false; + } + if (code4 < 91) { + return true; + } + if (code4 < 97) { + return code4 === 95; + } + if (code4 < 123) { + return true; + } + if (code4 <= 65535) { + return code4 >= 170 && nonASCIIidentifier2.test(String.fromCharCode(code4)); + } + if (astral === false) { + return false; + } + return isInAstralSet2(code4, astralIdentifierStartCodes2) || isInAstralSet2(code4, astralIdentifierCodes2); + } + var TokenType3 = function TokenType4(label, conf) { + if (conf === void 0) conf = {}; + this.label = label; + this.keyword = conf.keyword; + this.beforeExpr = !!conf.beforeExpr; + this.startsExpr = !!conf.startsExpr; + this.isLoop = !!conf.isLoop; + this.isAssign = !!conf.isAssign; + this.prefix = !!conf.prefix; + this.postfix = !!conf.postfix; + this.binop = conf.binop || null; + this.updateContext = null; + }; + function binop2(name2, prec) { + return new TokenType3(name2, { beforeExpr: true, binop: prec }); + } + var beforeExpr2 = { beforeExpr: true }, startsExpr2 = { startsExpr: true }; + var keywords2 = {}; + function kw2(name2, options2) { + if (options2 === void 0) options2 = {}; + options2.keyword = name2; + return keywords2[name2] = new TokenType3(name2, options2); + } + var types$12 = { + num: new TokenType3("num", startsExpr2), + regexp: new TokenType3("regexp", startsExpr2), + string: new TokenType3("string", startsExpr2), + name: new TokenType3("name", startsExpr2), + privateId: new TokenType3("privateId", startsExpr2), + eof: new TokenType3("eof"), + // Punctuation token types. + bracketL: new TokenType3("[", { beforeExpr: true, startsExpr: true }), + bracketR: new TokenType3("]"), + braceL: new TokenType3("{", { beforeExpr: true, startsExpr: true }), + braceR: new TokenType3("}"), + parenL: new TokenType3("(", { beforeExpr: true, startsExpr: true }), + parenR: new TokenType3(")"), + comma: new TokenType3(",", beforeExpr2), + semi: new TokenType3(";", beforeExpr2), + colon: new TokenType3(":", beforeExpr2), + dot: new TokenType3("."), + question: new TokenType3("?", beforeExpr2), + questionDot: new TokenType3("?."), + arrow: new TokenType3("=>", beforeExpr2), + template: new TokenType3("template"), + invalidTemplate: new TokenType3("invalidTemplate"), + ellipsis: new TokenType3("...", beforeExpr2), + backQuote: new TokenType3("`", startsExpr2), + dollarBraceL: new TokenType3("${", { beforeExpr: true, startsExpr: true }), + // Operators. These carry several kinds of properties to help the + // parser use them properly (the presence of these properties is + // what categorizes them as operators). + // + // `binop`, when present, specifies that this operator is a binary + // operator, and will refer to its precedence. + // + // `prefix` and `postfix` mark the operator as a prefix or postfix + // unary operator. + // + // `isAssign` marks all of `=`, `+=`, `-=` etcetera, which act as + // binary operators with a very low precedence, that should result + // in AssignmentExpression nodes. + eq: new TokenType3("=", { beforeExpr: true, isAssign: true }), + assign: new TokenType3("_=", { beforeExpr: true, isAssign: true }), + incDec: new TokenType3("++/--", { prefix: true, postfix: true, startsExpr: true }), + prefix: new TokenType3("!/~", { beforeExpr: true, prefix: true, startsExpr: true }), + logicalOR: binop2("||", 1), + logicalAND: binop2("&&", 2), + bitwiseOR: binop2("|", 3), + bitwiseXOR: binop2("^", 4), + bitwiseAND: binop2("&", 5), + equality: binop2("==/!=/===/!==", 6), + relational: binop2("/<=/>=", 7), + bitShift: binop2("<>/>>>", 8), + plusMin: new TokenType3("+/-", { beforeExpr: true, binop: 9, prefix: true, startsExpr: true }), + modulo: binop2("%", 10), + star: binop2("*", 10), + slash: binop2("/", 10), + starstar: new TokenType3("**", { beforeExpr: true }), + coalesce: binop2("??", 1), + // Keyword token types. + _break: kw2("break"), + _case: kw2("case", beforeExpr2), + _catch: kw2("catch"), + _continue: kw2("continue"), + _debugger: kw2("debugger"), + _default: kw2("default", beforeExpr2), + _do: kw2("do", { isLoop: true, beforeExpr: true }), + _else: kw2("else", beforeExpr2), + _finally: kw2("finally"), + _for: kw2("for", { isLoop: true }), + _function: kw2("function", startsExpr2), + _if: kw2("if"), + _return: kw2("return", beforeExpr2), + _switch: kw2("switch"), + _throw: kw2("throw", beforeExpr2), + _try: kw2("try"), + _var: kw2("var"), + _const: kw2("const"), + _while: kw2("while", { isLoop: true }), + _with: kw2("with"), + _new: kw2("new", { beforeExpr: true, startsExpr: true }), + _this: kw2("this", startsExpr2), + _super: kw2("super", startsExpr2), + _class: kw2("class", startsExpr2), + _extends: kw2("extends", beforeExpr2), + _export: kw2("export"), + _import: kw2("import", startsExpr2), + _null: kw2("null", startsExpr2), + _true: kw2("true", startsExpr2), + _false: kw2("false", startsExpr2), + _in: kw2("in", { beforeExpr: true, binop: 7 }), + _instanceof: kw2("instanceof", { beforeExpr: true, binop: 7 }), + _typeof: kw2("typeof", { beforeExpr: true, prefix: true, startsExpr: true }), + _void: kw2("void", { beforeExpr: true, prefix: true, startsExpr: true }), + _delete: kw2("delete", { beforeExpr: true, prefix: true, startsExpr: true }) + }; + var lineBreak2 = /\r\n?|\n|\u2028|\u2029/; + var lineBreakG2 = new RegExp(lineBreak2.source, "g"); + function isNewLine2(code4) { + return code4 === 10 || code4 === 13 || code4 === 8232 || code4 === 8233; + } + function nextLineBreak2(code4, from, end) { + if (end === void 0) end = code4.length; + for (var i2 = from; i2 < end; i2++) { + var next = code4.charCodeAt(i2); + if (isNewLine2(next)) { + return i2 < end - 1 && next === 13 && code4.charCodeAt(i2 + 1) === 10 ? i2 + 2 : i2 + 1; + } + } + return -1; + } + var nonASCIIwhitespace2 = /[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/; + var skipWhiteSpace2 = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g; + var ref2 = Object.prototype; + var hasOwnProperty3 = ref2.hasOwnProperty; + var toString5 = ref2.toString; + var hasOwn2 = Object.hasOwn || (function(obj, propName) { + return hasOwnProperty3.call(obj, propName); + }); + var isArray2 = Array.isArray || (function(obj) { + return toString5.call(obj) === "[object Array]"; + }); + var regexpCache2 = /* @__PURE__ */ Object.create(null); + function wordsRegexp2(words) { + return regexpCache2[words] || (regexpCache2[words] = new RegExp("^(?:" + words.replace(/ /g, "|") + ")$")); + } + function codePointToString2(code4) { + if (code4 <= 65535) { + return String.fromCharCode(code4); + } + code4 -= 65536; + return String.fromCharCode((code4 >> 10) + 55296, (code4 & 1023) + 56320); + } + var loneSurrogate2 = /(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/; + var Position3 = function Position4(line, col) { + this.line = line; + this.column = col; + }; + Position3.prototype.offset = function offset2(n) { + return new Position3(this.line, this.column + n); + }; + var SourceLocation3 = function SourceLocation4(p, start2, end) { + this.start = start2; + this.end = end; + if (p.sourceFile !== null) { + this.source = p.sourceFile; + } + }; + function getLineInfo2(input, offset2) { + for (var line = 1, cur = 0; ; ) { + var nextBreak = nextLineBreak2(input, cur, offset2); + if (nextBreak < 0) { + return new Position3(line, offset2 - cur); + } + ++line; + cur = nextBreak; + } + } + var defaultOptions2 = { + // `ecmaVersion` indicates the ECMAScript version to parse. Must be + // either 3, 5, 6 (or 2015), 7 (2016), 8 (2017), 9 (2018), 10 + // (2019), 11 (2020), 12 (2021), 13 (2022), 14 (2023), or `"latest"` + // (the latest version the library supports). This influences + // support for strict mode, the set of reserved words, and support + // for new syntax features. + ecmaVersion: null, + // `sourceType` indicates the mode the code should be parsed in. + // Can be either `"script"`, `"module"` or `"commonjs"`. This influences global + // strict mode and parsing of `import` and `export` declarations. + sourceType: "script", + // When set to true, enable strict parsing mode even if `sourceType` + // is `"script"`. + strict: false, + // `onInsertedSemicolon` can be a callback that will be called when + // a semicolon is automatically inserted. It will be passed the + // position of the inserted semicolon as an offset, and if + // `locations` is enabled, it is given the location as a `{line, + // column}` object as second argument. + onInsertedSemicolon: null, + // `onTrailingComma` is similar to `onInsertedSemicolon`, but for + // trailing commas. + onTrailingComma: null, + // By default, reserved words are only enforced if ecmaVersion >= 5. + // Set `allowReserved` to a boolean value to explicitly turn this on + // an off. When this option has the value "never", reserved words + // and keywords can also not be used as property names. + allowReserved: null, + // When enabled, a return at the top level is not considered an + // error. + allowReturnOutsideFunction: false, + // When enabled, import/export statements are not constrained to + // appearing at the top of the program, and an import.meta expression + // in a script isn't considered an error. + allowImportExportEverywhere: false, + // By default, await identifiers are allowed to appear at the top-level scope only if ecmaVersion >= 2022. + // When enabled, await identifiers are allowed to appear at the top-level scope, + // but they are still not allowed in non-async functions. + allowAwaitOutsideFunction: null, + // When enabled, super identifiers are not constrained to + // appearing in methods and do not raise an error when they appear elsewhere. + allowSuperOutsideMethod: null, + // When enabled, hashbang directive in the beginning of file is + // allowed and treated as a line comment. Enabled by default when + // `ecmaVersion` >= 2023. + allowHashBang: false, + // By default, the parser will verify that private properties are + // only used in places where they are valid and have been declared. + // Set this to false to turn such checks off. + checkPrivateFields: true, + // When `locations` is on, `loc` properties holding objects with + // `start` and `end` properties in `{line, column}` form (with + // line being 1-based and column 0-based) will be attached to the + // nodes. + locations: false, + // Pass an optional `{line, column}` object to use for the start of + // the parse. This is mostly useful when using `parseExpressionAt` + // with `locations: true`, to prevent the parser from having to + // determine the line position at the start position. + startLocation: null, + // A function can be passed as `onToken` option, which will + // cause Acorn to call that function with object in the same + // format as tokens returned from `tokenizer().getToken()`. Note + // that you are not allowed to call the parser from the + // callback—that will corrupt its internal state. + onToken: null, + // A function can be passed as `onComment` option, which will + // cause Acorn to call that function with `(block, text, start, + // end)` parameters whenever a comment is skipped. `block` is a + // boolean indicating whether this is a block (`/* */`) comment, + // `text` is the content of the comment, and `start` and `end` are + // character offsets that denote the start and end of the comment. + // When the `locations` option is on, two more parameters are + // passed, the full `{line, column}` locations of the start and + // end of the comments. Note that you are not allowed to call the + // parser from the callback—that will corrupt its internal state. + // When this option has an array as value, objects representing the + // comments are pushed to it. + onComment: null, + // Nodes have their start and end characters offsets recorded in + // `start` and `end` properties (directly on the node, rather than + // the `loc` object, which holds line/column data. To also add a + // [semi-standardized][range] `range` property holding a `[start, + // end]` array with the same numbers, set the `ranges` option to + // `true`. + // + // [range]: https://bugzilla.mozilla.org/show_bug.cgi?id=745678 + ranges: false, + // It is possible to parse multiple files into a single AST by + // passing the tree produced by parsing the first file as + // `program` option in subsequent parses. This will add the + // toplevel forms of the parsed file to the `Program` (top) node + // of an existing parse tree. + program: null, + // When `locations` is on, you can pass this to record the source + // file in every node's `loc` object. + sourceFile: null, + // This value, if given, is stored in every node, whether + // `locations` is on or off. + directSourceFile: null, + // When enabled, parenthesized expressions are represented by + // (non-standard) ParenthesizedExpression nodes + preserveParens: false + }; + var warnedAboutEcmaVersion2 = false; + function getOptions2(opts) { + var options2 = {}; + for (var opt in defaultOptions2) { + options2[opt] = opts && hasOwn2(opts, opt) ? opts[opt] : defaultOptions2[opt]; + } + if (options2.ecmaVersion === "latest") { + options2.ecmaVersion = 1e8; + } else if (options2.ecmaVersion == null) { + if (!warnedAboutEcmaVersion2 && typeof console === "object" && console.warn) { + warnedAboutEcmaVersion2 = true; + console.warn("Since Acorn 8.0.0, options.ecmaVersion is required.\nDefaulting to 2020, but this will stop working in the future."); + } + options2.ecmaVersion = 11; + } else if (options2.ecmaVersion >= 2015) { + options2.ecmaVersion -= 2009; + } + if (options2.allowReserved == null) { + options2.allowReserved = options2.ecmaVersion < 5; + } + if (!opts || opts.allowHashBang == null) { + options2.allowHashBang = options2.ecmaVersion >= 14; + } + if (isArray2(options2.onToken)) { + var tokens = options2.onToken; + options2.onToken = function(token) { + return tokens.push(token); + }; + } + if (isArray2(options2.onComment)) { + options2.onComment = pushComment2(options2, options2.onComment); + } + if (options2.sourceType === "commonjs" && options2.allowAwaitOutsideFunction) { + throw new Error("Cannot use allowAwaitOutsideFunction with sourceType: commonjs"); + } + return options2; + } + function pushComment2(options2, array) { + return function(block, text7, start2, end, startLoc, endLoc) { + var comment2 = { + type: block ? "Block" : "Line", + value: text7, + start: start2, + end + }; + if (options2.locations) { + comment2.loc = new SourceLocation3(this, startLoc, endLoc); + } + if (options2.ranges) { + comment2.range = [start2, end]; + } + array.push(comment2); + }; + } + var SCOPE_TOP2 = 1, SCOPE_FUNCTION2 = 2, SCOPE_ASYNC2 = 4, SCOPE_GENERATOR2 = 8, SCOPE_ARROW2 = 16, SCOPE_SIMPLE_CATCH2 = 32, SCOPE_SUPER2 = 64, SCOPE_DIRECT_SUPER2 = 128, SCOPE_CLASS_STATIC_BLOCK2 = 256, SCOPE_CLASS_FIELD_INIT2 = 512, SCOPE_SWITCH2 = 1024, SCOPE_VAR2 = SCOPE_TOP2 | SCOPE_FUNCTION2 | SCOPE_CLASS_STATIC_BLOCK2; + function functionFlags2(async, generator) { + return SCOPE_FUNCTION2 | (async ? SCOPE_ASYNC2 : 0) | (generator ? SCOPE_GENERATOR2 : 0); + } + var BIND_NONE2 = 0, BIND_VAR2 = 1, BIND_LEXICAL2 = 2, BIND_FUNCTION2 = 3, BIND_SIMPLE_CATCH2 = 4, BIND_OUTSIDE2 = 5; + var Parser3 = function Parser4(options2, input, startPos) { + this.options = options2 = getOptions2(options2); + this.sourceFile = options2.sourceFile; + this.keywords = wordsRegexp2(keywords$12[options2.ecmaVersion >= 6 ? 6 : options2.sourceType === "module" ? "5module" : 5]); + var reserved = ""; + if (options2.allowReserved !== true) { + reserved = reservedWords2[options2.ecmaVersion >= 6 ? 6 : options2.ecmaVersion === 5 ? 5 : 3]; + if (options2.sourceType === "module") { + reserved += " await"; + } + } + this.reservedWords = wordsRegexp2(reserved); + var reservedStrict = (reserved ? reserved + " " : "") + reservedWords2.strict; + this.reservedWordsStrict = wordsRegexp2(reservedStrict); + this.reservedWordsStrictBind = wordsRegexp2(reservedStrict + " " + reservedWords2.strictBind); + this.input = String(input); + this.containsEsc = false; + this.pos = startPos || 0; + this.curLine = 1; + if (options2.startLocation) { + this.lineStart = this.pos - options2.startLocation.column; + this.curLine = options2.startLocation.line; + } else if (startPos) { + this.lineStart = this.input.lastIndexOf("\n", startPos - 1) + 1; + if (this.options.locations) { + this.curLine = this.input.slice(0, this.lineStart).split(lineBreak2).length; + } + } else { + this.lineStart = 0; + } + this.type = types$12.eof; + this.value = null; + this.start = this.end = this.pos; + this.startLoc = this.endLoc = this.curPosition(); + this.lastTokEndLoc = this.lastTokStartLoc = null; + this.lastTokStart = this.lastTokEnd = this.pos; + this.context = this.initialContext(); + this.exprAllowed = true; + this.inModule = options2.sourceType === "module"; + this.strict = this.inModule || options2.strict === true || this.strictDirective(this.pos); + this.potentialArrowAt = -1; + this.potentialArrowInForAwait = false; + this.yieldPos = this.awaitPos = this.awaitIdentPos = 0; + this.labels = []; + this.undefinedExports = /* @__PURE__ */ Object.create(null); + if (this.pos === 0 && options2.allowHashBang && this.input.slice(0, 2) === "#!") { + this.skipLineComment(2); + } + this.scopeStack = []; + this.enterScope( + this.options.sourceType === "commonjs" ? SCOPE_FUNCTION2 : SCOPE_TOP2 + ); + this.regexpState = null; + this.privateNameStack = []; + }; + var prototypeAccessors2 = { inFunction: { configurable: true }, inGenerator: { configurable: true }, inAsync: { configurable: true }, canAwait: { configurable: true }, allowReturn: { configurable: true }, allowSuper: { configurable: true }, allowDirectSuper: { configurable: true }, treatFunctionsAsVar: { configurable: true }, allowNewDotTarget: { configurable: true }, allowUsing: { configurable: true }, inClassStaticBlock: { configurable: true } }; + Parser3.prototype.parse = function parse6() { + var this$1$1 = this; + var node2 = this.options.program || this.startNode(); + this.nextToken(); + return this.catchStackOverflow(function() { + return this$1$1.parseTopLevel(node2); + }); + }; + prototypeAccessors2.inFunction.get = function() { + return (this.currentVarScope().flags & SCOPE_FUNCTION2) > 0; + }; + prototypeAccessors2.inGenerator.get = function() { + return (this.currentVarScope().flags & SCOPE_GENERATOR2) > 0; + }; + prototypeAccessors2.inAsync.get = function() { + return (this.currentVarScope().flags & SCOPE_ASYNC2) > 0; + }; + prototypeAccessors2.canAwait.get = function() { + for (var i2 = this.scopeStack.length - 1; i2 >= 0; i2--) { + var ref3 = this.scopeStack[i2]; + var flags = ref3.flags; + if (flags & (SCOPE_CLASS_STATIC_BLOCK2 | SCOPE_CLASS_FIELD_INIT2)) { + return false; + } + if (flags & SCOPE_FUNCTION2) { + return (flags & SCOPE_ASYNC2) > 0; + } + } + return this.inModule && this.options.ecmaVersion >= 13 || this.options.allowAwaitOutsideFunction; + }; + prototypeAccessors2.allowReturn.get = function() { + if (this.inFunction) { + return true; + } + if (this.options.allowReturnOutsideFunction && this.currentVarScope().flags & SCOPE_TOP2) { + return true; + } + return false; + }; + prototypeAccessors2.allowSuper.get = function() { + var ref3 = this.currentThisScope(); + var flags = ref3.flags; + return (flags & SCOPE_SUPER2) > 0 || this.options.allowSuperOutsideMethod; + }; + prototypeAccessors2.allowDirectSuper.get = function() { + return (this.currentThisScope().flags & SCOPE_DIRECT_SUPER2) > 0; + }; + prototypeAccessors2.treatFunctionsAsVar.get = function() { + return this.treatFunctionsAsVarInScope(this.currentScope()); + }; + prototypeAccessors2.allowNewDotTarget.get = function() { + for (var i2 = this.scopeStack.length - 1; i2 >= 0; i2--) { + var ref3 = this.scopeStack[i2]; + var flags = ref3.flags; + if (flags & (SCOPE_CLASS_STATIC_BLOCK2 | SCOPE_CLASS_FIELD_INIT2) || flags & SCOPE_FUNCTION2 && !(flags & SCOPE_ARROW2)) { + return true; + } + } + return false; + }; + prototypeAccessors2.allowUsing.get = function() { + var ref3 = this.currentScope(); + var flags = ref3.flags; + if (flags & SCOPE_SWITCH2) { + return false; + } + if (!this.inModule && flags & SCOPE_TOP2) { + return false; + } + return true; + }; + prototypeAccessors2.inClassStaticBlock.get = function() { + return (this.currentVarScope().flags & SCOPE_CLASS_STATIC_BLOCK2) > 0; + }; + Parser3.extend = function extend3() { + var plugins = [], len = arguments.length; + while (len--) plugins[len] = arguments[len]; + var cls = this; + for (var i2 = 0; i2 < plugins.length; i2++) { + cls = plugins[i2](cls); + } + return cls; + }; + Parser3.parse = function parse6(input, options2) { + return new this(options2, input).parse(); + }; + Parser3.parseExpressionAt = function parseExpressionAt3(input, pos, options2) { + var parser = new this(options2, input, pos); + parser.nextToken(); + return parser.parseExpression(); + }; + Parser3.tokenizer = function tokenizer3(input, options2) { + return new this(options2, input); + }; + Object.defineProperties(Parser3.prototype, prototypeAccessors2); + var pp$92 = Parser3.prototype; + var literal2 = /^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/; + pp$92.strictDirective = function(start2) { + if (this.options.ecmaVersion < 5) { + return false; + } + for (; ; ) { + skipWhiteSpace2.lastIndex = start2; + start2 += skipWhiteSpace2.exec(this.input)[0].length; + var match = literal2.exec(this.input.slice(start2)); + if (!match) { + return false; + } + if ((match[1] || match[2]) === "use strict") { + skipWhiteSpace2.lastIndex = start2 + match[0].length; + var spaceAfter = skipWhiteSpace2.exec(this.input), end = spaceAfter.index + spaceAfter[0].length; + var next = this.input.charAt(end); + return next === ";" || next === "}" || lineBreak2.test(spaceAfter[0]) && !(/[(`.[+\-/*%<>=,?^&]/.test(next) || next === "!" && this.input.charAt(end + 1) === "="); + } + start2 += match[0].length; + skipWhiteSpace2.lastIndex = start2; + start2 += skipWhiteSpace2.exec(this.input)[0].length; + if (this.input[start2] === ";") { + start2++; + } + } + }; + pp$92.eat = function(type) { + if (this.type === type) { + this.next(); + return true; + } else { + return false; + } + }; + pp$92.isContextual = function(name2) { + return this.type === types$12.name && this.value === name2 && !this.containsEsc; + }; + pp$92.eatContextual = function(name2) { + if (!this.isContextual(name2)) { + return false; + } + this.next(); + return true; + }; + pp$92.catchStackOverflow = function(f) { + try { + return f(); + } catch (e) { + if (e instanceof Error && (/\bstack\b.*\b(exceeded|overflow)\b/i.test(e.message) || /\btoo much recursion\b/i.test(e.message))) { + this.raise(this.start, "Not enough stack space to parse input"); + } else { + throw e; + } + } + }; + pp$92.expectContextual = function(name2) { + if (!this.eatContextual(name2)) { + this.unexpected(); + } + }; + pp$92.canInsertSemicolon = function() { + return this.type === types$12.eof || this.type === types$12.braceR || lineBreak2.test(this.input.slice(this.lastTokEnd, this.start)); + }; + pp$92.insertSemicolon = function() { + if (this.canInsertSemicolon()) { + if (this.options.onInsertedSemicolon) { + this.options.onInsertedSemicolon(this.lastTokEnd, this.lastTokEndLoc); + } + return true; + } + }; + pp$92.semicolon = function() { + if (!this.eat(types$12.semi) && !this.insertSemicolon()) { + this.unexpected(); + } + }; + pp$92.afterTrailingComma = function(tokType, notNext) { + if (this.type === tokType) { + if (this.options.onTrailingComma) { + this.options.onTrailingComma(this.lastTokStart, this.lastTokStartLoc); + } + if (!notNext) { + this.next(); + } + return true; + } + }; + pp$92.expect = function(type) { + this.eat(type) || this.unexpected(); + }; + pp$92.unexpected = function(pos) { + this.raise(pos != null ? pos : this.start, "Unexpected token"); + }; + var DestructuringErrors3 = function DestructuringErrors4() { + this.shorthandAssign = this.trailingComma = this.parenthesizedAssign = this.parenthesizedBind = this.doubleProto = -1; + }; + pp$92.checkPatternErrors = function(refDestructuringErrors, isAssign) { + if (!refDestructuringErrors) { + return; + } + if (refDestructuringErrors.trailingComma > -1) { + this.raiseRecoverable(refDestructuringErrors.trailingComma, "Comma is not permitted after the rest element"); + } + var parens = isAssign ? refDestructuringErrors.parenthesizedAssign : refDestructuringErrors.parenthesizedBind; + if (parens > -1) { + this.raiseRecoverable(parens, isAssign ? "Assigning to rvalue" : "Parenthesized pattern"); + } + }; + pp$92.checkExpressionErrors = function(refDestructuringErrors, andThrow) { + if (!refDestructuringErrors) { + return false; + } + var shorthandAssign = refDestructuringErrors.shorthandAssign; + var doubleProto = refDestructuringErrors.doubleProto; + if (!andThrow) { + return shorthandAssign >= 0 || doubleProto >= 0; + } + if (shorthandAssign >= 0) { + this.raise(shorthandAssign, "Shorthand property assignments are valid only in destructuring patterns"); + } + if (doubleProto >= 0) { + this.raiseRecoverable(doubleProto, "Redefinition of __proto__ property"); + } + }; + pp$92.checkYieldAwaitInDefaultParams = function() { + if (this.yieldPos && (!this.awaitPos || this.yieldPos < this.awaitPos)) { + this.raise(this.yieldPos, "Yield expression cannot be a default value"); + } + if (this.awaitPos) { + this.raise(this.awaitPos, "Await expression cannot be a default value"); + } + }; + pp$92.isSimpleAssignTarget = function(expr) { + if (expr.type === "ParenthesizedExpression") { + return this.isSimpleAssignTarget(expr.expression); + } + return expr.type === "Identifier" || expr.type === "MemberExpression"; + }; + var pp$82 = Parser3.prototype; + pp$82.parseTopLevel = function(node2) { + var exports$1 = /* @__PURE__ */ Object.create(null); + if (!node2.body) { + node2.body = []; + } + while (this.type !== types$12.eof) { + var stmt = this.parseStatement(null, true, exports$1); + node2.body.push(stmt); + } + if (this.inModule) { + for (var i2 = 0, list5 = Object.keys(this.undefinedExports); i2 < list5.length; i2 += 1) { + var name2 = list5[i2]; + this.raiseRecoverable(this.undefinedExports[name2].start, "Export '" + name2 + "' is not defined"); + } + } + this.adaptDirectivePrologue(node2.body); + this.next(); + node2.sourceType = this.options.sourceType === "commonjs" ? "script" : this.options.sourceType; + return this.finishNode(node2, "Program"); + }; + var loopLabel2 = { kind: "loop" }, switchLabel2 = { kind: "switch" }; + pp$82.isLet = function(context) { + if (this.options.ecmaVersion < 6 || !this.isContextual("let")) { + return false; + } + skipWhiteSpace2.lastIndex = this.pos; + var skip = skipWhiteSpace2.exec(this.input); + var next = this.pos + skip[0].length, nextCh = this.fullCharCodeAt(next); + if (nextCh === 91 || nextCh === 92) { + return true; + } + if (context) { + return false; + } + if (nextCh === 123) { + return true; + } + if (isIdentifierStart2(nextCh)) { + var start2 = next; + do { + next += nextCh <= 65535 ? 1 : 2; + } while (isIdentifierChar2(nextCh = this.fullCharCodeAt(next))); + if (nextCh === 92) { + return true; + } + var ident = this.input.slice(start2, next); + if (!keywordRelationalOperator2.test(ident)) { + return true; + } + } + return false; + }; + pp$82.isAsyncFunction = function() { + if (this.options.ecmaVersion < 8 || !this.isContextual("async")) { + return false; + } + skipWhiteSpace2.lastIndex = this.pos; + var skip = skipWhiteSpace2.exec(this.input); + var next = this.pos + skip[0].length, after; + return !lineBreak2.test(this.input.slice(this.pos, next)) && this.input.slice(next, next + 8) === "function" && (next + 8 === this.input.length || !(isIdentifierChar2(after = this.fullCharCodeAt(next + 8)) || after === 92)); + }; + pp$82.isUsingKeyword = function(isAwaitUsing, isFor) { + if (this.options.ecmaVersion < 17 || !this.isContextual(isAwaitUsing ? "await" : "using")) { + return false; + } + skipWhiteSpace2.lastIndex = this.pos; + var skip = skipWhiteSpace2.exec(this.input); + var next = this.pos + skip[0].length; + if (lineBreak2.test(this.input.slice(this.pos, next))) { + return false; + } + if (isAwaitUsing) { + var usingEndPos = next + 5, after; + if (this.input.slice(next, usingEndPos) !== "using" || usingEndPos === this.input.length || isIdentifierChar2(after = this.fullCharCodeAt(usingEndPos)) || after === 92) { + return false; + } + skipWhiteSpace2.lastIndex = usingEndPos; + var skipAfterUsing = skipWhiteSpace2.exec(this.input); + next = usingEndPos + skipAfterUsing[0].length; + if (skipAfterUsing && lineBreak2.test(this.input.slice(usingEndPos, next))) { + return false; + } + } + var ch = this.fullCharCodeAt(next); + if (!isIdentifierStart2(ch) && ch !== 92) { + return false; + } + var idStart = next; + do { + next += ch <= 65535 ? 1 : 2; + } while (isIdentifierChar2(ch = this.fullCharCodeAt(next))); + if (ch === 92) { + return true; + } + var id = this.input.slice(idStart, next); + if (keywordRelationalOperator2.test(id)) { + return false; + } + if (isFor && !isAwaitUsing && id === "of") { + skipWhiteSpace2.lastIndex = next; + var skipAfterOf = skipWhiteSpace2.exec(this.input); + next = next + skipAfterOf[0].length; + if (this.input.charCodeAt(next) !== 61 || // Check for ==, === and => operators + (ch = this.input.charCodeAt(next + 1)) === 61 || ch === 62) { + return false; + } + } + return true; + }; + pp$82.isAwaitUsing = function(isFor) { + return this.isUsingKeyword(true, isFor); + }; + pp$82.isUsing = function(isFor) { + return this.isUsingKeyword(false, isFor); + }; + pp$82.parseStatement = function(context, topLevel, exports$1) { + var starttype = this.type, node2 = this.startNode(), kind; + if (this.isLet(context)) { + starttype = types$12._var; + kind = "let"; + } + switch (starttype) { + case types$12._break: + case types$12._continue: + return this.parseBreakContinueStatement(node2, starttype.keyword); + case types$12._debugger: + return this.parseDebuggerStatement(node2); + case types$12._do: + return this.parseDoStatement(node2); + case types$12._for: + return this.parseForStatement(node2); + case types$12._function: + if (context && (this.strict || context !== "if" && context !== "label") && this.options.ecmaVersion >= 6) { + this.unexpected(); + } + return this.parseFunctionStatement(node2, false, !context); + case types$12._class: + if (context) { + this.unexpected(); + } + return this.parseClass(node2, true); + case types$12._if: + return this.parseIfStatement(node2); + case types$12._return: + return this.parseReturnStatement(node2); + case types$12._switch: + return this.parseSwitchStatement(node2); + case types$12._throw: + return this.parseThrowStatement(node2); + case types$12._try: + return this.parseTryStatement(node2); + case types$12._const: + case types$12._var: + kind = kind || this.value; + if (context && kind !== "var") { + this.unexpected(); + } + return this.parseVarStatement(node2, kind); + case types$12._while: + return this.parseWhileStatement(node2); + case types$12._with: + return this.parseWithStatement(node2); + case types$12.braceL: + return this.parseBlock(true, node2); + case types$12.semi: + return this.parseEmptyStatement(node2); + case types$12._export: + case types$12._import: + if (this.options.ecmaVersion > 10 && starttype === types$12._import) { + skipWhiteSpace2.lastIndex = this.pos; + var skip = skipWhiteSpace2.exec(this.input); + var next = this.pos + skip[0].length, nextCh = this.input.charCodeAt(next); + if (nextCh === 40 || nextCh === 46) { + return this.parseExpressionStatement(node2, this.parseExpression()); + } + } + if (!this.options.allowImportExportEverywhere) { + if (!topLevel) { + this.raise(this.start, "'import' and 'export' may only appear at the top level"); + } + if (!this.inModule) { + this.raise(this.start, "'import' and 'export' may appear only with 'sourceType: module'"); + } + } + return starttype === types$12._import ? this.parseImport(node2) : this.parseExport(node2, exports$1); + // If the statement does not start with a statement keyword or a + // brace, it's an ExpressionStatement or LabeledStatement. We + // simply start parsing an expression, and afterwards, if the + // next token is a colon and the expression was a simple + // Identifier node, we switch to interpreting it as a label. + default: + if (this.isAsyncFunction()) { + if (context) { + this.unexpected(); + } + this.next(); + return this.parseFunctionStatement(node2, true, !context); + } + var usingKind = this.isAwaitUsing(false) ? "await using" : this.isUsing(false) ? "using" : null; + if (usingKind) { + if (!this.allowUsing) { + this.raise(this.start, "Using declaration cannot appear in the top level when source type is `script` or in the bare case statement"); + } + if (context) { + this.raise(this.start, "Using declaration is not allowed in single-statement positions"); + } + if (usingKind === "await using") { + if (!this.canAwait) { + this.raise(this.start, "Await using cannot appear outside of async function"); + } + this.next(); + } + this.next(); + this.parseVar(node2, false, usingKind); + this.semicolon(); + return this.finishNode(node2, "VariableDeclaration"); + } + var maybeName = this.value, expr = this.parseExpression(); + if (starttype === types$12.name && expr.type === "Identifier" && this.eat(types$12.colon)) { + return this.parseLabeledStatement(node2, maybeName, expr, context); + } else { + return this.parseExpressionStatement(node2, expr); + } + } + }; + pp$82.parseBreakContinueStatement = function(node2, keyword) { + var isBreak = keyword === "break"; + this.next(); + if (this.eat(types$12.semi) || this.insertSemicolon()) { + node2.label = null; + } else if (this.type !== types$12.name) { + this.unexpected(); + } else { + node2.label = this.parseIdent(); + this.semicolon(); + } + var i2 = 0; + for (; i2 < this.labels.length; ++i2) { + var lab = this.labels[i2]; + if (node2.label == null || lab.name === node2.label.name) { + if (lab.kind != null && (isBreak || lab.kind === "loop")) { + break; + } + if (node2.label && isBreak) { + break; + } + } + } + if (i2 === this.labels.length) { + this.raise(node2.start, "Unsyntactic " + keyword); + } + return this.finishNode(node2, isBreak ? "BreakStatement" : "ContinueStatement"); + }; + pp$82.parseDebuggerStatement = function(node2) { + this.next(); + this.semicolon(); + return this.finishNode(node2, "DebuggerStatement"); + }; + pp$82.parseDoStatement = function(node2) { + this.next(); + this.labels.push(loopLabel2); + node2.body = this.parseStatement("do"); + this.labels.pop(); + this.expect(types$12._while); + node2.test = this.parseParenExpression(); + if (this.options.ecmaVersion >= 6) { + this.eat(types$12.semi); + } else { + this.semicolon(); + } + return this.finishNode(node2, "DoWhileStatement"); + }; + pp$82.parseForStatement = function(node2) { + this.next(); + var awaitAt = this.options.ecmaVersion >= 9 && this.canAwait && this.eatContextual("await") ? this.lastTokStart : -1; + this.labels.push(loopLabel2); + this.enterScope(0); + this.expect(types$12.parenL); + if (this.type === types$12.semi) { + if (awaitAt > -1) { + this.unexpected(awaitAt); + } + return this.parseFor(node2, null); + } + var isLet = this.isLet(); + if (this.type === types$12._var || this.type === types$12._const || isLet) { + var init$1 = this.startNode(), kind = isLet ? "let" : this.value; + this.next(); + this.parseVar(init$1, true, kind); + this.finishNode(init$1, "VariableDeclaration"); + return this.parseForAfterInit(node2, init$1, awaitAt); + } + var startsWithLet = this.isContextual("let"), isForOf = false; + var usingKind = this.isUsing(true) ? "using" : this.isAwaitUsing(true) ? "await using" : null; + if (usingKind) { + var init$2 = this.startNode(); + this.next(); + if (usingKind === "await using") { + if (!this.canAwait) { + this.raise(this.start, "Await using cannot appear outside of async function"); + } + this.next(); + } + this.parseVar(init$2, true, usingKind); + this.finishNode(init$2, "VariableDeclaration"); + return this.parseForAfterInit(node2, init$2, awaitAt); + } + var containsEsc = this.containsEsc; + var refDestructuringErrors = new DestructuringErrors3(); + var initPos = this.start; + var init = awaitAt > -1 ? this.parseExprSubscripts(refDestructuringErrors, "await") : this.parseExpression(true, refDestructuringErrors); + if (this.type === types$12._in || (isForOf = this.options.ecmaVersion >= 6 && this.isContextual("of"))) { + if (awaitAt > -1) { + if (this.type === types$12._in) { + this.unexpected(awaitAt); + } + node2.await = true; + } else if (isForOf && this.options.ecmaVersion >= 8) { + if (init.start === initPos && !containsEsc && init.type === "Identifier" && init.name === "async") { + this.unexpected(); + } else if (this.options.ecmaVersion >= 9) { + node2.await = false; + } + } + if (startsWithLet && isForOf) { + this.raise(init.start, "The left-hand side of a for-of loop may not start with 'let'."); + } + this.toAssignable(init, false, refDestructuringErrors); + this.checkLValPattern(init); + return this.parseForIn(node2, init); + } else { + this.checkExpressionErrors(refDestructuringErrors, true); + } + if (awaitAt > -1) { + this.unexpected(awaitAt); + } + return this.parseFor(node2, init); + }; + pp$82.parseForAfterInit = function(node2, init, awaitAt) { + if ((this.type === types$12._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) && init.declarations.length === 1) { + if (this.type === types$12._in) { + if ((init.kind === "using" || init.kind === "await using") && !init.declarations[0].init) { + this.raise(this.start, "Using declaration is not allowed in for-in loops"); + } + if (this.options.ecmaVersion >= 9 && awaitAt > -1) { + this.unexpected(awaitAt); + } + } else if (this.options.ecmaVersion >= 9) { + node2.await = awaitAt > -1; + } + return this.parseForIn(node2, init); + } + if (awaitAt > -1) { + this.unexpected(awaitAt); + } + return this.parseFor(node2, init); + }; + pp$82.parseFunctionStatement = function(node2, isAsync, declarationPosition) { + this.next(); + return this.parseFunction(node2, FUNC_STATEMENT2 | (declarationPosition ? 0 : FUNC_HANGING_STATEMENT2), false, isAsync); + }; + pp$82.parseIfStatement = function(node2) { + this.next(); + node2.test = this.parseParenExpression(); + node2.consequent = this.parseStatement("if"); + node2.alternate = this.eat(types$12._else) ? this.parseStatement("if") : null; + return this.finishNode(node2, "IfStatement"); + }; + pp$82.parseReturnStatement = function(node2) { + if (!this.allowReturn) { + this.raise(this.start, "'return' outside of function"); + } + this.next(); + if (this.eat(types$12.semi) || this.insertSemicolon()) { + node2.argument = null; + } else { + node2.argument = this.parseExpression(); + this.semicolon(); + } + return this.finishNode(node2, "ReturnStatement"); + }; + pp$82.parseSwitchStatement = function(node2) { + this.next(); + node2.discriminant = this.parseParenExpression(); + node2.cases = []; + this.expect(types$12.braceL); + this.labels.push(switchLabel2); + this.enterScope(SCOPE_SWITCH2); + var cur; + for (var sawDefault = false; this.type !== types$12.braceR; ) { + if (this.type === types$12._case || this.type === types$12._default) { + var isCase = this.type === types$12._case; + if (cur) { + this.finishNode(cur, "SwitchCase"); + } + node2.cases.push(cur = this.startNode()); + cur.consequent = []; + this.next(); + if (isCase) { + cur.test = this.parseExpression(); + } else { + if (sawDefault) { + this.raiseRecoverable(this.lastTokStart, "Multiple default clauses"); + } + sawDefault = true; + cur.test = null; + } + this.expect(types$12.colon); + } else { + if (!cur) { + this.unexpected(); + } + cur.consequent.push(this.parseStatement(null)); + } + } + this.exitScope(); + if (cur) { + this.finishNode(cur, "SwitchCase"); + } + this.next(); + this.labels.pop(); + return this.finishNode(node2, "SwitchStatement"); + }; + pp$82.parseThrowStatement = function(node2) { + this.next(); + if (lineBreak2.test(this.input.slice(this.lastTokEnd, this.start))) { + this.raise(this.lastTokEnd, "Illegal newline after throw"); + } + node2.argument = this.parseExpression(); + this.semicolon(); + return this.finishNode(node2, "ThrowStatement"); + }; + var empty$12 = []; + pp$82.parseCatchClauseParam = function() { + var param = this.parseBindingAtom(); + var simple = param.type === "Identifier"; + this.enterScope(simple ? SCOPE_SIMPLE_CATCH2 : 0); + this.checkLValPattern(param, simple ? BIND_SIMPLE_CATCH2 : BIND_LEXICAL2); + this.expect(types$12.parenR); + return param; + }; + pp$82.parseTryStatement = function(node2) { + this.next(); + node2.block = this.parseBlock(); + node2.handler = null; + if (this.type === types$12._catch) { + var clause = this.startNode(); + this.next(); + if (this.eat(types$12.parenL)) { + clause.param = this.parseCatchClauseParam(); + } else { + if (this.options.ecmaVersion < 10) { + this.unexpected(); + } + clause.param = null; + this.enterScope(0); + } + clause.body = this.parseBlock(false); + this.exitScope(); + node2.handler = this.finishNode(clause, "CatchClause"); + } + node2.finalizer = this.eat(types$12._finally) ? this.parseBlock() : null; + if (!node2.handler && !node2.finalizer) { + this.raise(node2.start, "Missing catch or finally clause"); + } + return this.finishNode(node2, "TryStatement"); + }; + pp$82.parseVarStatement = function(node2, kind, allowMissingInitializer) { + this.next(); + this.parseVar(node2, false, kind, allowMissingInitializer); + this.semicolon(); + return this.finishNode(node2, "VariableDeclaration"); + }; + pp$82.parseWhileStatement = function(node2) { + this.next(); + node2.test = this.parseParenExpression(); + this.labels.push(loopLabel2); + node2.body = this.parseStatement("while"); + this.labels.pop(); + return this.finishNode(node2, "WhileStatement"); + }; + pp$82.parseWithStatement = function(node2) { + if (this.strict) { + this.raise(this.start, "'with' in strict mode"); + } + this.next(); + node2.object = this.parseParenExpression(); + node2.body = this.parseStatement("with"); + return this.finishNode(node2, "WithStatement"); + }; + pp$82.parseEmptyStatement = function(node2) { + this.next(); + return this.finishNode(node2, "EmptyStatement"); + }; + pp$82.parseLabeledStatement = function(node2, maybeName, expr, context) { + for (var i$1 = 0, list5 = this.labels; i$1 < list5.length; i$1 += 1) { + var label = list5[i$1]; + if (label.name === maybeName) { + this.raise(expr.start, "Label '" + maybeName + "' is already declared"); + } + } + var kind = this.type.isLoop ? "loop" : this.type === types$12._switch ? "switch" : null; + for (var i2 = this.labels.length - 1; i2 >= 0; i2--) { + var label$1 = this.labels[i2]; + if (label$1.statementStart === node2.start) { + label$1.statementStart = this.start; + label$1.kind = kind; + } else { + break; + } + } + this.labels.push({ name: maybeName, kind, statementStart: this.start }); + node2.body = this.parseStatement(context ? context.indexOf("label") === -1 ? context + "label" : context : "label"); + this.labels.pop(); + node2.label = expr; + return this.finishNode(node2, "LabeledStatement"); + }; + pp$82.parseExpressionStatement = function(node2, expr) { + node2.expression = expr; + this.semicolon(); + return this.finishNode(node2, "ExpressionStatement"); + }; + pp$82.parseBlock = function(createNewLexicalScope, node2, exitStrict) { + if (createNewLexicalScope === void 0) createNewLexicalScope = true; + if (node2 === void 0) node2 = this.startNode(); + node2.body = []; + this.expect(types$12.braceL); + if (createNewLexicalScope) { + this.enterScope(0); + } + while (this.type !== types$12.braceR) { + var stmt = this.parseStatement(null); + node2.body.push(stmt); + } + if (exitStrict) { + this.strict = false; + } + this.next(); + if (createNewLexicalScope) { + this.exitScope(); + } + return this.finishNode(node2, "BlockStatement"); + }; + pp$82.parseFor = function(node2, init) { + node2.init = init; + this.expect(types$12.semi); + node2.test = this.type === types$12.semi ? null : this.parseExpression(); + this.expect(types$12.semi); + node2.update = this.type === types$12.parenR ? null : this.parseExpression(); + this.expect(types$12.parenR); + node2.body = this.parseStatement("for"); + this.exitScope(); + this.labels.pop(); + return this.finishNode(node2, "ForStatement"); + }; + pp$82.parseForIn = function(node2, init) { + var isForIn = this.type === types$12._in; + this.next(); + if (init.type === "VariableDeclaration" && init.declarations[0].init != null && (!isForIn || this.options.ecmaVersion < 8 || this.strict || init.kind !== "var" || init.declarations[0].id.type !== "Identifier")) { + this.raise( + init.start, + (isForIn ? "for-in" : "for-of") + " loop variable declaration may not have an initializer" + ); + } + node2.left = init; + node2.right = isForIn ? this.parseExpression() : this.parseMaybeAssign(); + this.expect(types$12.parenR); + node2.body = this.parseStatement("for"); + this.exitScope(); + this.labels.pop(); + return this.finishNode(node2, isForIn ? "ForInStatement" : "ForOfStatement"); + }; + pp$82.parseVar = function(node2, isFor, kind, allowMissingInitializer) { + node2.declarations = []; + node2.kind = kind; + for (; ; ) { + var decl = this.startNode(); + this.parseVarId(decl, kind); + if (this.eat(types$12.eq)) { + decl.init = this.parseMaybeAssign(isFor); + } else if (!allowMissingInitializer && kind === "const" && !(this.type === types$12._in || this.options.ecmaVersion >= 6 && this.isContextual("of"))) { + this.unexpected(); + } else if (!allowMissingInitializer && (kind === "using" || kind === "await using") && this.options.ecmaVersion >= 17 && this.type !== types$12._in && !this.isContextual("of")) { + this.raise(this.lastTokEnd, "Missing initializer in " + kind + " declaration"); + } else if (!allowMissingInitializer && decl.id.type !== "Identifier" && !(isFor && (this.type === types$12._in || this.isContextual("of")))) { + this.raise(this.lastTokEnd, "Complex binding patterns require an initialization value"); + } else { + decl.init = null; + } + node2.declarations.push(this.finishNode(decl, "VariableDeclarator")); + if (!this.eat(types$12.comma)) { + break; + } + } + return node2; + }; + pp$82.parseVarId = function(decl, kind) { + decl.id = kind === "using" || kind === "await using" ? this.parseIdent() : this.parseBindingAtom(); + this.checkLValPattern(decl.id, kind === "var" ? BIND_VAR2 : BIND_LEXICAL2, false); + }; + var FUNC_STATEMENT2 = 1, FUNC_HANGING_STATEMENT2 = 2, FUNC_NULLABLE_ID2 = 4; + pp$82.parseFunction = function(node2, statement, allowExpressionBody, isAsync, forInit) { + this.initFunction(node2); + if (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !isAsync) { + if (this.type === types$12.star && statement & FUNC_HANGING_STATEMENT2) { + this.unexpected(); + } + node2.generator = this.eat(types$12.star); + } + if (this.options.ecmaVersion >= 8) { + node2.async = !!isAsync; + } + if (statement & FUNC_STATEMENT2) { + node2.id = statement & FUNC_NULLABLE_ID2 && this.type !== types$12.name ? null : this.parseIdent(); + if (node2.id && !(statement & FUNC_HANGING_STATEMENT2)) { + this.checkLValSimple(node2.id, this.strict || node2.generator || node2.async ? this.treatFunctionsAsVar ? BIND_VAR2 : BIND_LEXICAL2 : BIND_FUNCTION2); + } + } + var oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos; + this.yieldPos = 0; + this.awaitPos = 0; + this.awaitIdentPos = 0; + this.enterScope(functionFlags2(node2.async, node2.generator)); + if (!(statement & FUNC_STATEMENT2)) { + node2.id = this.type === types$12.name ? this.parseIdent() : null; + } + this.parseFunctionParams(node2); + this.parseFunctionBody(node2, allowExpressionBody, false, forInit); + this.yieldPos = oldYieldPos; + this.awaitPos = oldAwaitPos; + this.awaitIdentPos = oldAwaitIdentPos; + return this.finishNode(node2, statement & FUNC_STATEMENT2 ? "FunctionDeclaration" : "FunctionExpression"); + }; + pp$82.parseFunctionParams = function(node2) { + this.expect(types$12.parenL); + node2.params = this.parseBindingList(types$12.parenR, false, this.options.ecmaVersion >= 8); + this.checkYieldAwaitInDefaultParams(); + }; + pp$82.parseClass = function(node2, isStatement) { + this.next(); + var oldStrict = this.strict; + this.strict = true; + this.parseClassId(node2, isStatement); + this.parseClassSuper(node2); + var privateNameMap = this.enterClassBody(); + var classBody = this.startNode(); + var hadConstructor = false; + classBody.body = []; + this.expect(types$12.braceL); + while (this.type !== types$12.braceR) { + var element2 = this.parseClassElement(node2.superClass !== null); + if (element2) { + classBody.body.push(element2); + if (element2.type === "MethodDefinition" && element2.kind === "constructor") { + if (hadConstructor) { + this.raiseRecoverable(element2.start, "Duplicate constructor in the same class"); + } + hadConstructor = true; + } else if (element2.key && element2.key.type === "PrivateIdentifier" && isPrivateNameConflicted2(privateNameMap, element2)) { + this.raiseRecoverable(element2.key.start, "Identifier '#" + element2.key.name + "' has already been declared"); + } + } + } + this.strict = oldStrict; + this.next(); + node2.body = this.finishNode(classBody, "ClassBody"); + this.exitClassBody(); + return this.finishNode(node2, isStatement ? "ClassDeclaration" : "ClassExpression"); + }; + pp$82.parseClassElement = function(constructorAllowsSuper) { + if (this.eat(types$12.semi)) { + return null; + } + var ecmaVersion2 = this.options.ecmaVersion; + var node2 = this.startNode(); + var keyName = ""; + var isGenerator = false; + var isAsync = false; + var kind = "method"; + var isStatic = false; + if (this.eatContextual("static")) { + if (ecmaVersion2 >= 13 && this.eat(types$12.braceL)) { + this.parseClassStaticBlock(node2); + return node2; + } + if (this.isClassElementNameStart() || this.type === types$12.star) { + isStatic = true; + } else { + keyName = "static"; + } + } + node2.static = isStatic; + if (!keyName && ecmaVersion2 >= 8 && this.eatContextual("async")) { + if ((this.isClassElementNameStart() || this.type === types$12.star) && !this.canInsertSemicolon()) { + isAsync = true; + } else { + keyName = "async"; + } + } + if (!keyName && (ecmaVersion2 >= 9 || !isAsync) && this.eat(types$12.star)) { + isGenerator = true; + } + if (!keyName && !isAsync && !isGenerator) { + var lastValue = this.value; + if (this.eatContextual("get") || this.eatContextual("set")) { + if (this.isClassElementNameStart()) { + kind = lastValue; + } else { + keyName = lastValue; + } + } + } + if (keyName) { + node2.computed = false; + node2.key = this.startNodeAt(this.lastTokStart, this.lastTokStartLoc); + node2.key.name = keyName; + this.finishNode(node2.key, "Identifier"); + } else { + this.parseClassElementName(node2); + } + if (ecmaVersion2 < 13 || this.type === types$12.parenL || kind !== "method" || isGenerator || isAsync) { + var isConstructor = !node2.static && checkKeyName2(node2, "constructor"); + var allowsDirectSuper = isConstructor && constructorAllowsSuper; + if (isConstructor && kind !== "method") { + this.raise(node2.key.start, "Constructor can't have get/set modifier"); + } + node2.kind = isConstructor ? "constructor" : kind; + this.parseClassMethod(node2, isGenerator, isAsync, allowsDirectSuper); + } else { + this.parseClassField(node2); + } + return node2; + }; + pp$82.isClassElementNameStart = function() { + return this.type === types$12.name || this.type === types$12.privateId || this.type === types$12.num || this.type === types$12.string || this.type === types$12.bracketL || this.type.keyword; + }; + pp$82.parseClassElementName = function(element2) { + if (this.type === types$12.privateId) { + if (this.value === "constructor") { + this.raise(this.start, "Classes can't have an element named '#constructor'"); + } + element2.computed = false; + element2.key = this.parsePrivateIdent(); + } else { + this.parsePropertyName(element2); + } + }; + pp$82.parseClassMethod = function(method, isGenerator, isAsync, allowsDirectSuper) { + var key = method.key; + if (method.kind === "constructor") { + if (isGenerator) { + this.raise(key.start, "Constructor can't be a generator"); + } + if (isAsync) { + this.raise(key.start, "Constructor can't be an async method"); + } + } else if (method.static && checkKeyName2(method, "prototype")) { + this.raise(key.start, "Classes may not have a static property named prototype"); + } + var value = method.value = this.parseMethod(isGenerator, isAsync, allowsDirectSuper); + if (method.kind === "get" && value.params.length !== 0) { + this.raiseRecoverable(value.start, "getter should have no params"); + } + if (method.kind === "set" && value.params.length !== 1) { + this.raiseRecoverable(value.start, "setter should have exactly one param"); + } + if (method.kind === "set" && value.params[0].type === "RestElement") { + this.raiseRecoverable(value.params[0].start, "Setter cannot use rest params"); + } + return this.finishNode(method, "MethodDefinition"); + }; + pp$82.parseClassField = function(field) { + if (checkKeyName2(field, "constructor")) { + this.raise(field.key.start, "Classes can't have a field named 'constructor'"); + } else if (field.static && checkKeyName2(field, "prototype")) { + this.raise(field.key.start, "Classes can't have a static field named 'prototype'"); + } + if (this.eat(types$12.eq)) { + this.enterScope(SCOPE_CLASS_FIELD_INIT2 | SCOPE_SUPER2); + field.value = this.parseMaybeAssign(); + this.exitScope(); + } else { + field.value = null; + } + this.semicolon(); + return this.finishNode(field, "PropertyDefinition"); + }; + pp$82.parseClassStaticBlock = function(node2) { + node2.body = []; + var oldLabels = this.labels; + this.labels = []; + this.enterScope(SCOPE_CLASS_STATIC_BLOCK2 | SCOPE_SUPER2); + while (this.type !== types$12.braceR) { + var stmt = this.parseStatement(null); + node2.body.push(stmt); + } + this.next(); + this.exitScope(); + this.labels = oldLabels; + return this.finishNode(node2, "StaticBlock"); + }; + pp$82.parseClassId = function(node2, isStatement) { + if (this.type === types$12.name) { + node2.id = this.parseIdent(); + if (isStatement) { + this.checkLValSimple(node2.id, BIND_LEXICAL2, false); + } + } else { + if (isStatement === true) { + this.unexpected(); + } + node2.id = null; + } + }; + pp$82.parseClassSuper = function(node2) { + node2.superClass = this.eat(types$12._extends) ? this.parseExprSubscripts(null, false) : null; + }; + pp$82.enterClassBody = function() { + var element2 = { declared: /* @__PURE__ */ Object.create(null), used: [] }; + this.privateNameStack.push(element2); + return element2.declared; + }; + pp$82.exitClassBody = function() { + var ref3 = this.privateNameStack.pop(); + var declared = ref3.declared; + var used = ref3.used; + if (!this.options.checkPrivateFields) { + return; + } + var len = this.privateNameStack.length; + var parent = len === 0 ? null : this.privateNameStack[len - 1]; + for (var i2 = 0; i2 < used.length; ++i2) { + var id = used[i2]; + if (!hasOwn2(declared, id.name)) { + if (parent) { + parent.used.push(id); + } else { + this.raiseRecoverable(id.start, "Private field '#" + id.name + "' must be declared in an enclosing class"); + } + } + } + }; + function isPrivateNameConflicted2(privateNameMap, element2) { + var name2 = element2.key.name; + var curr = privateNameMap[name2]; + var next = "true"; + if (element2.type === "MethodDefinition" && (element2.kind === "get" || element2.kind === "set")) { + next = (element2.static ? "s" : "i") + element2.kind; + } + if (curr === "iget" && next === "iset" || curr === "iset" && next === "iget" || curr === "sget" && next === "sset" || curr === "sset" && next === "sget") { + privateNameMap[name2] = "true"; + return false; + } else if (!curr) { + privateNameMap[name2] = next; + return false; + } else { + return true; + } + } + function checkKeyName2(node2, name2) { + var computed = node2.computed; + var key = node2.key; + return !computed && (key.type === "Identifier" && key.name === name2 || key.type === "Literal" && key.value === name2); + } + pp$82.parseExportAllDeclaration = function(node2, exports$1) { + if (this.options.ecmaVersion >= 11) { + if (this.eatContextual("as")) { + node2.exported = this.parseModuleExportName(); + this.checkExport(exports$1, node2.exported, this.lastTokStart); + } else { + node2.exported = null; + } + } + this.expectContextual("from"); + if (this.type !== types$12.string) { + this.unexpected(); + } + node2.source = this.parseExprAtom(); + if (this.options.ecmaVersion >= 16) { + node2.attributes = this.parseWithClause(); + } + this.semicolon(); + return this.finishNode(node2, "ExportAllDeclaration"); + }; + pp$82.parseExport = function(node2, exports$1) { + this.next(); + if (this.eat(types$12.star)) { + return this.parseExportAllDeclaration(node2, exports$1); + } + if (this.eat(types$12._default)) { + this.checkExport(exports$1, "default", this.lastTokStart); + node2.declaration = this.parseExportDefaultDeclaration(); + return this.finishNode(node2, "ExportDefaultDeclaration"); + } + if (this.shouldParseExportStatement()) { + node2.declaration = this.parseExportDeclaration(node2); + if (node2.declaration.type === "VariableDeclaration") { + this.checkVariableExport(exports$1, node2.declaration.declarations); + } else { + this.checkExport(exports$1, node2.declaration.id, node2.declaration.id.start); + } + node2.specifiers = []; + node2.source = null; + if (this.options.ecmaVersion >= 16) { + node2.attributes = []; + } + } else { + node2.declaration = null; + node2.specifiers = this.parseExportSpecifiers(exports$1); + if (this.eatContextual("from")) { + if (this.type !== types$12.string) { + this.unexpected(); + } + node2.source = this.parseExprAtom(); + if (this.options.ecmaVersion >= 16) { + node2.attributes = this.parseWithClause(); + } + } else { + for (var i2 = 0, list5 = node2.specifiers; i2 < list5.length; i2 += 1) { + var spec = list5[i2]; + this.checkUnreserved(spec.local); + this.checkLocalExport(spec.local); + if (spec.local.type === "Literal") { + this.raise(spec.local.start, "A string literal cannot be used as an exported binding without `from`."); + } + } + node2.source = null; + if (this.options.ecmaVersion >= 16) { + node2.attributes = []; + } + } + this.semicolon(); + } + return this.finishNode(node2, "ExportNamedDeclaration"); + }; + pp$82.parseExportDeclaration = function(node2) { + return this.parseStatement(null); + }; + pp$82.parseExportDefaultDeclaration = function() { + var isAsync; + if (this.type === types$12._function || (isAsync = this.isAsyncFunction())) { + var fNode = this.startNode(); + this.next(); + if (isAsync) { + this.next(); + } + return this.parseFunction(fNode, FUNC_STATEMENT2 | FUNC_NULLABLE_ID2, false, isAsync); + } else if (this.type === types$12._class) { + var cNode = this.startNode(); + return this.parseClass(cNode, "nullableID"); + } else { + var declaration = this.parseMaybeAssign(); + this.semicolon(); + return declaration; + } + }; + pp$82.checkExport = function(exports$1, name2, pos) { + if (!exports$1) { + return; + } + if (typeof name2 !== "string") { + name2 = name2.type === "Identifier" ? name2.name : name2.value; + } + if (hasOwn2(exports$1, name2)) { + this.raiseRecoverable(pos, "Duplicate export '" + name2 + "'"); + } + exports$1[name2] = true; + }; + pp$82.checkPatternExport = function(exports$1, pat) { + var type = pat.type; + if (type === "Identifier") { + this.checkExport(exports$1, pat, pat.start); + } else if (type === "ObjectPattern") { + for (var i2 = 0, list5 = pat.properties; i2 < list5.length; i2 += 1) { + var prop = list5[i2]; + this.checkPatternExport(exports$1, prop); + } + } else if (type === "ArrayPattern") { + for (var i$1 = 0, list$1 = pat.elements; i$1 < list$1.length; i$1 += 1) { + var elt = list$1[i$1]; + if (elt) { + this.checkPatternExport(exports$1, elt); + } + } + } else if (type === "Property") { + this.checkPatternExport(exports$1, pat.value); + } else if (type === "AssignmentPattern") { + this.checkPatternExport(exports$1, pat.left); + } else if (type === "RestElement") { + this.checkPatternExport(exports$1, pat.argument); + } + }; + pp$82.checkVariableExport = function(exports$1, decls) { + if (!exports$1) { + return; + } + for (var i2 = 0, list5 = decls; i2 < list5.length; i2 += 1) { + var decl = list5[i2]; + this.checkPatternExport(exports$1, decl.id); + } + }; + pp$82.shouldParseExportStatement = function() { + return this.type.keyword === "var" || this.type.keyword === "const" || this.type.keyword === "class" || this.type.keyword === "function" || this.isLet() || this.isAsyncFunction(); + }; + pp$82.parseExportSpecifier = function(exports$1) { + var node2 = this.startNode(); + node2.local = this.parseModuleExportName(); + node2.exported = this.eatContextual("as") ? this.parseModuleExportName() : node2.local; + this.checkExport( + exports$1, + node2.exported, + node2.exported.start + ); + return this.finishNode(node2, "ExportSpecifier"); + }; + pp$82.parseExportSpecifiers = function(exports$1) { + var nodes = [], first = true; + this.expect(types$12.braceL); + while (!this.eat(types$12.braceR)) { + if (!first) { + this.expect(types$12.comma); + if (this.afterTrailingComma(types$12.braceR)) { + break; + } + } else { + first = false; + } + nodes.push(this.parseExportSpecifier(exports$1)); + } + return nodes; + }; + pp$82.parseImport = function(node2) { + this.next(); + if (this.type === types$12.string) { + node2.specifiers = empty$12; + node2.source = this.parseExprAtom(); + } else { + node2.specifiers = this.parseImportSpecifiers(); + this.expectContextual("from"); + node2.source = this.type === types$12.string ? this.parseExprAtom() : this.unexpected(); + } + if (this.options.ecmaVersion >= 16) { + node2.attributes = this.parseWithClause(); + } + this.semicolon(); + return this.finishNode(node2, "ImportDeclaration"); + }; + pp$82.parseImportSpecifier = function() { + var node2 = this.startNode(); + node2.imported = this.parseModuleExportName(); + if (this.eatContextual("as")) { + node2.local = this.parseIdent(); + } else { + this.checkUnreserved(node2.imported); + node2.local = node2.imported; + } + this.checkLValSimple(node2.local, BIND_LEXICAL2); + return this.finishNode(node2, "ImportSpecifier"); + }; + pp$82.parseImportDefaultSpecifier = function() { + var node2 = this.startNode(); + node2.local = this.parseIdent(); + this.checkLValSimple(node2.local, BIND_LEXICAL2); + return this.finishNode(node2, "ImportDefaultSpecifier"); + }; + pp$82.parseImportNamespaceSpecifier = function() { + var node2 = this.startNode(); + this.next(); + this.expectContextual("as"); + node2.local = this.parseIdent(); + this.checkLValSimple(node2.local, BIND_LEXICAL2); + return this.finishNode(node2, "ImportNamespaceSpecifier"); + }; + pp$82.parseImportSpecifiers = function() { + var nodes = [], first = true; + if (this.type === types$12.name) { + nodes.push(this.parseImportDefaultSpecifier()); + if (!this.eat(types$12.comma)) { + return nodes; + } + } + if (this.type === types$12.star) { + nodes.push(this.parseImportNamespaceSpecifier()); + return nodes; + } + this.expect(types$12.braceL); + while (!this.eat(types$12.braceR)) { + if (!first) { + this.expect(types$12.comma); + if (this.afterTrailingComma(types$12.braceR)) { + break; + } + } else { + first = false; + } + nodes.push(this.parseImportSpecifier()); + } + return nodes; + }; + pp$82.parseWithClause = function() { + var nodes = []; + if (!this.eat(types$12._with)) { + return nodes; + } + this.expect(types$12.braceL); + var attributeKeys = {}; + var first = true; + while (!this.eat(types$12.braceR)) { + if (!first) { + this.expect(types$12.comma); + if (this.afterTrailingComma(types$12.braceR)) { + break; + } + } else { + first = false; + } + var attr = this.parseImportAttribute(); + var keyName = attr.key.type === "Identifier" ? attr.key.name : attr.key.value; + if (hasOwn2(attributeKeys, keyName)) { + this.raiseRecoverable(attr.key.start, "Duplicate attribute key '" + keyName + "'"); + } + attributeKeys[keyName] = true; + nodes.push(attr); + } + return nodes; + }; + pp$82.parseImportAttribute = function() { + var node2 = this.startNode(); + node2.key = this.type === types$12.string ? this.parseExprAtom() : this.parseIdent(this.options.allowReserved !== "never"); + this.expect(types$12.colon); + if (this.type !== types$12.string) { + this.unexpected(); + } + node2.value = this.parseExprAtom(); + return this.finishNode(node2, "ImportAttribute"); + }; + pp$82.parseModuleExportName = function() { + if (this.options.ecmaVersion >= 13 && this.type === types$12.string) { + var stringLiteral = this.parseLiteral(this.value); + if (loneSurrogate2.test(stringLiteral.value)) { + this.raise(stringLiteral.start, "An export name cannot include a lone surrogate."); + } + return stringLiteral; + } + return this.parseIdent(true); + }; + pp$82.adaptDirectivePrologue = function(statements) { + for (var i2 = 0; i2 < statements.length && this.isDirectiveCandidate(statements[i2]); ++i2) { + statements[i2].directive = statements[i2].expression.raw.slice(1, -1); + } + }; + pp$82.isDirectiveCandidate = function(statement) { + return this.options.ecmaVersion >= 5 && statement.type === "ExpressionStatement" && statement.expression.type === "Literal" && typeof statement.expression.value === "string" && // Reject parenthesized strings. + (this.input[statement.start] === '"' || this.input[statement.start] === "'"); + }; + var pp$72 = Parser3.prototype; + pp$72.toAssignable = function(node2, isBinding, refDestructuringErrors) { + if (this.options.ecmaVersion >= 6 && node2) { + switch (node2.type) { + case "Identifier": + if (this.inAsync && node2.name === "await") { + this.raise(node2.start, "Cannot use 'await' as identifier inside an async function"); + } + break; + case "ObjectPattern": + case "ArrayPattern": + case "AssignmentPattern": + case "RestElement": + break; + case "ObjectExpression": + node2.type = "ObjectPattern"; + if (refDestructuringErrors) { + this.checkPatternErrors(refDestructuringErrors, true); + } + for (var i2 = 0, list5 = node2.properties; i2 < list5.length; i2 += 1) { + var prop = list5[i2]; + this.toAssignable(prop, isBinding); + if (prop.type === "RestElement" && (prop.argument.type === "ArrayPattern" || prop.argument.type === "ObjectPattern")) { + this.raise(prop.argument.start, "Unexpected token"); + } + } + break; + case "Property": + if (node2.kind !== "init") { + this.raise(node2.key.start, "Object pattern can't contain getter or setter"); + } + this.toAssignable(node2.value, isBinding); + break; + case "ArrayExpression": + node2.type = "ArrayPattern"; + if (refDestructuringErrors) { + this.checkPatternErrors(refDestructuringErrors, true); + } + this.toAssignableList(node2.elements, isBinding); + break; + case "SpreadElement": + node2.type = "RestElement"; + this.toAssignable(node2.argument, isBinding); + if (node2.argument.type === "AssignmentPattern") { + this.raise(node2.argument.start, "Rest elements cannot have a default value"); + } + break; + case "AssignmentExpression": + if (node2.operator !== "=") { + this.raise(node2.left.end, "Only '=' operator can be used for specifying default value."); + } + node2.type = "AssignmentPattern"; + delete node2.operator; + this.toAssignable(node2.left, isBinding); + break; + case "ParenthesizedExpression": + this.toAssignable(node2.expression, isBinding, refDestructuringErrors); + break; + case "ChainExpression": + this.raiseRecoverable(node2.start, "Optional chaining cannot appear in left-hand side"); + break; + case "MemberExpression": + if (!isBinding) { + break; + } + default: + this.raise(node2.start, "Assigning to rvalue"); + } + } else if (refDestructuringErrors) { + this.checkPatternErrors(refDestructuringErrors, true); + } + return node2; + }; + pp$72.toAssignableList = function(exprList, isBinding) { + var end = exprList.length; + for (var i2 = 0; i2 < end; i2++) { + var elt = exprList[i2]; + if (elt) { + this.toAssignable(elt, isBinding); + } + } + if (end) { + var last = exprList[end - 1]; + if (this.options.ecmaVersion === 6 && isBinding && last && last.type === "RestElement" && last.argument.type !== "Identifier") { + this.unexpected(last.argument.start); + } + } + return exprList; + }; + pp$72.parseSpread = function(refDestructuringErrors) { + var node2 = this.startNode(); + this.next(); + node2.argument = this.parseMaybeAssign(false, refDestructuringErrors); + return this.finishNode(node2, "SpreadElement"); + }; + pp$72.parseRestBinding = function() { + var node2 = this.startNode(); + this.next(); + if (this.options.ecmaVersion === 6 && this.type !== types$12.name) { + this.unexpected(); + } + node2.argument = this.parseBindingAtom(); + return this.finishNode(node2, "RestElement"); + }; + pp$72.parseBindingAtom = function() { + if (this.options.ecmaVersion >= 6) { + switch (this.type) { + case types$12.bracketL: + var node2 = this.startNode(); + this.next(); + node2.elements = this.parseBindingList(types$12.bracketR, true, true); + return this.finishNode(node2, "ArrayPattern"); + case types$12.braceL: + return this.parseObj(true); + } + } + return this.parseIdent(); + }; + pp$72.parseBindingList = function(close, allowEmpty, allowTrailingComma, allowModifiers) { + var elts = [], first = true; + while (!this.eat(close)) { + if (first) { + first = false; + } else { + this.expect(types$12.comma); + } + if (allowEmpty && this.type === types$12.comma) { + elts.push(null); + } else if (allowTrailingComma && this.afterTrailingComma(close)) { + break; + } else if (this.type === types$12.ellipsis) { + var rest = this.parseRestBinding(); + this.parseBindingListItem(rest); + elts.push(rest); + if (this.type === types$12.comma) { + this.raiseRecoverable(this.start, "Comma is not permitted after the rest element"); + } + this.expect(close); + break; + } else { + elts.push(this.parseAssignableListItem(allowModifiers)); + } + } + return elts; + }; + pp$72.parseAssignableListItem = function(allowModifiers) { + var elem = this.parseMaybeDefault(this.start, this.startLoc); + this.parseBindingListItem(elem); + return elem; + }; + pp$72.parseBindingListItem = function(param) { + return param; + }; + pp$72.parseMaybeDefault = function(startPos, startLoc, left) { + left = left || this.parseBindingAtom(); + if (this.options.ecmaVersion < 6 || !this.eat(types$12.eq)) { + return left; + } + var node2 = this.startNodeAt(startPos, startLoc); + node2.left = left; + node2.right = this.parseMaybeAssign(); + return this.finishNode(node2, "AssignmentPattern"); + }; + pp$72.checkLValSimple = function(expr, bindingType, checkClashes) { + if (bindingType === void 0) bindingType = BIND_NONE2; + var isBind = bindingType !== BIND_NONE2; + switch (expr.type) { + case "Identifier": + if (this.strict && this.reservedWordsStrictBind.test(expr.name)) { + this.raiseRecoverable(expr.start, (isBind ? "Binding " : "Assigning to ") + expr.name + " in strict mode"); + } + if (isBind) { + if (bindingType === BIND_LEXICAL2 && expr.name === "let") { + this.raiseRecoverable(expr.start, "let is disallowed as a lexically bound name"); + } + if (checkClashes) { + if (hasOwn2(checkClashes, expr.name)) { + this.raiseRecoverable(expr.start, "Argument name clash"); + } + checkClashes[expr.name] = true; + } + if (bindingType !== BIND_OUTSIDE2) { + this.declareName(expr.name, bindingType, expr.start); + } + } + break; + case "ChainExpression": + this.raiseRecoverable(expr.start, "Optional chaining cannot appear in left-hand side"); + break; + case "MemberExpression": + if (isBind) { + this.raiseRecoverable(expr.start, "Binding member expression"); + } + break; + case "ParenthesizedExpression": + if (isBind) { + this.raiseRecoverable(expr.start, "Binding parenthesized expression"); + } + return this.checkLValSimple(expr.expression, bindingType, checkClashes); + default: + this.raise(expr.start, (isBind ? "Binding" : "Assigning to") + " rvalue"); + } + }; + pp$72.checkLValPattern = function(expr, bindingType, checkClashes) { + if (bindingType === void 0) bindingType = BIND_NONE2; + switch (expr.type) { + case "ObjectPattern": + for (var i2 = 0, list5 = expr.properties; i2 < list5.length; i2 += 1) { + var prop = list5[i2]; + this.checkLValInnerPattern(prop, bindingType, checkClashes); + } + break; + case "ArrayPattern": + for (var i$1 = 0, list$1 = expr.elements; i$1 < list$1.length; i$1 += 1) { + var elem = list$1[i$1]; + if (elem) { + this.checkLValInnerPattern(elem, bindingType, checkClashes); + } + } + break; + default: + this.checkLValSimple(expr, bindingType, checkClashes); + } + }; + pp$72.checkLValInnerPattern = function(expr, bindingType, checkClashes) { + if (bindingType === void 0) bindingType = BIND_NONE2; + switch (expr.type) { + case "Property": + this.checkLValInnerPattern(expr.value, bindingType, checkClashes); + break; + case "AssignmentPattern": + this.checkLValPattern(expr.left, bindingType, checkClashes); + break; + case "RestElement": + this.checkLValPattern(expr.argument, bindingType, checkClashes); + break; + default: + this.checkLValPattern(expr, bindingType, checkClashes); + } + }; + var TokContext3 = function TokContext4(token, isExpr, preserveSpace, override, generator) { + this.token = token; + this.isExpr = !!isExpr; + this.preserveSpace = !!preserveSpace; + this.override = override; + this.generator = !!generator; + }; + var types2 = { + b_stat: new TokContext3("{", false), + b_expr: new TokContext3("{", true), + b_tmpl: new TokContext3("${", false), + p_stat: new TokContext3("(", false), + p_expr: new TokContext3("(", true), + q_tmpl: new TokContext3("`", true, true, function(p) { + return p.tryReadTemplateToken(); + }), + f_stat: new TokContext3("function", false), + f_expr: new TokContext3("function", true), + f_expr_gen: new TokContext3("function", true, false, null, true), + f_gen: new TokContext3("function", false, false, null, true) + }; + var pp$62 = Parser3.prototype; + pp$62.initialContext = function() { + return [types2.b_stat]; + }; + pp$62.curContext = function() { + return this.context[this.context.length - 1]; + }; + pp$62.braceIsBlock = function(prevType) { + var parent = this.curContext(); + if (parent === types2.f_expr || parent === types2.f_stat) { + return true; + } + if (prevType === types$12.colon && (parent === types2.b_stat || parent === types2.b_expr)) { + return !parent.isExpr; + } + if (prevType === types$12._return || prevType === types$12.name && this.exprAllowed) { + return lineBreak2.test(this.input.slice(this.lastTokEnd, this.start)); + } + if (prevType === types$12._else || prevType === types$12.semi || prevType === types$12.eof || prevType === types$12.parenR || prevType === types$12.arrow) { + return true; + } + if (prevType === types$12.braceL) { + return parent === types2.b_stat; + } + if (prevType === types$12._var || prevType === types$12._const || prevType === types$12.name) { + return false; + } + return !this.exprAllowed; + }; + pp$62.inGeneratorContext = function() { + for (var i2 = this.context.length - 1; i2 >= 1; i2--) { + var context = this.context[i2]; + if (context.token === "function") { + return context.generator; + } + } + return false; + }; + pp$62.updateContext = function(prevType) { + var update, type = this.type; + if (type.keyword && prevType === types$12.dot) { + this.exprAllowed = false; + } else if (update = type.updateContext) { + update.call(this, prevType); + } else { + this.exprAllowed = type.beforeExpr; + } + }; + pp$62.overrideContext = function(tokenCtx) { + if (this.curContext() !== tokenCtx) { + this.context[this.context.length - 1] = tokenCtx; + } + }; + types$12.parenR.updateContext = types$12.braceR.updateContext = function() { + if (this.context.length === 1) { + this.exprAllowed = true; + return; + } + var out = this.context.pop(); + if (out === types2.b_stat && this.curContext().token === "function") { + out = this.context.pop(); + } + this.exprAllowed = !out.isExpr; + }; + types$12.braceL.updateContext = function(prevType) { + this.context.push(this.braceIsBlock(prevType) ? types2.b_stat : types2.b_expr); + this.exprAllowed = true; + }; + types$12.dollarBraceL.updateContext = function() { + this.context.push(types2.b_tmpl); + this.exprAllowed = true; + }; + types$12.parenL.updateContext = function(prevType) { + var statementParens = prevType === types$12._if || prevType === types$12._for || prevType === types$12._with || prevType === types$12._while; + this.context.push(statementParens ? types2.p_stat : types2.p_expr); + this.exprAllowed = true; + }; + types$12.incDec.updateContext = function() { + }; + types$12._function.updateContext = types$12._class.updateContext = function(prevType) { + if (prevType.beforeExpr && prevType !== types$12._else && !(prevType === types$12.semi && this.curContext() !== types2.p_stat) && !(prevType === types$12._return && lineBreak2.test(this.input.slice(this.lastTokEnd, this.start))) && !((prevType === types$12.colon || prevType === types$12.braceL) && this.curContext() === types2.b_stat)) { + this.context.push(types2.f_expr); + } else { + this.context.push(types2.f_stat); + } + this.exprAllowed = false; + }; + types$12.colon.updateContext = function() { + if (this.curContext().token === "function") { + this.context.pop(); + } + this.exprAllowed = true; + }; + types$12.backQuote.updateContext = function() { + if (this.curContext() === types2.q_tmpl) { + this.context.pop(); + } else { + this.context.push(types2.q_tmpl); + } + this.exprAllowed = false; + }; + types$12.star.updateContext = function(prevType) { + if (prevType === types$12._function) { + var index2 = this.context.length - 1; + if (this.context[index2] === types2.f_expr) { + this.context[index2] = types2.f_expr_gen; + } else { + this.context[index2] = types2.f_gen; + } + } + this.exprAllowed = true; + }; + types$12.name.updateContext = function(prevType) { + var allowed = false; + if (this.options.ecmaVersion >= 6 && prevType !== types$12.dot) { + if (this.value === "of" && !this.exprAllowed || this.value === "yield" && this.inGeneratorContext()) { + allowed = true; + } + } + this.exprAllowed = allowed; + }; + var pp$52 = Parser3.prototype; + pp$52.checkPropClash = function(prop, propHash, refDestructuringErrors) { + if (this.options.ecmaVersion >= 9 && prop.type === "SpreadElement") { + return; + } + if (this.options.ecmaVersion >= 6 && (prop.computed || prop.method || prop.shorthand)) { + return; + } + var key = prop.key; + var name2; + switch (key.type) { + case "Identifier": + name2 = key.name; + break; + case "Literal": + name2 = String(key.value); + break; + default: + return; + } + var kind = prop.kind; + if (this.options.ecmaVersion >= 6) { + if (name2 === "__proto__" && kind === "init") { + if (propHash.proto) { + if (refDestructuringErrors) { + if (refDestructuringErrors.doubleProto < 0) { + refDestructuringErrors.doubleProto = key.start; + } + } else { + this.raiseRecoverable(key.start, "Redefinition of __proto__ property"); + } + } + propHash.proto = true; + } + return; + } + name2 = "$" + name2; + var other = propHash[name2]; + if (other) { + var redefinition; + if (kind === "init") { + redefinition = this.strict && other.init || other.get || other.set; + } else { + redefinition = other.init || other[kind]; + } + if (redefinition) { + this.raiseRecoverable(key.start, "Redefinition of property"); + } + } else { + other = propHash[name2] = { + init: false, + get: false, + set: false + }; + } + other[kind] = true; + }; + pp$52.parseExpression = function(forInit, refDestructuringErrors) { + var this$1$1 = this; + return this.catchStackOverflow(function() { + var startPos = this$1$1.start, startLoc = this$1$1.startLoc; + var expr = this$1$1.parseMaybeAssign(forInit, refDestructuringErrors); + if (this$1$1.type === types$12.comma) { + var node2 = this$1$1.startNodeAt(startPos, startLoc); + node2.expressions = [expr]; + while (this$1$1.eat(types$12.comma)) { + node2.expressions.push(this$1$1.parseMaybeAssign(forInit, refDestructuringErrors)); + } + return this$1$1.finishNode(node2, "SequenceExpression"); + } + return expr; + }); + }; + pp$52.parseMaybeAssign = function(forInit, refDestructuringErrors, afterLeftParse) { + if (this.isContextual("yield")) { + if (this.inGenerator) { + return this.parseYield(forInit); + } else { + this.exprAllowed = false; + } + } + var ownDestructuringErrors = false, oldParenAssign = -1, oldTrailingComma = -1, oldDoubleProto = -1; + if (refDestructuringErrors) { + oldParenAssign = refDestructuringErrors.parenthesizedAssign; + oldTrailingComma = refDestructuringErrors.trailingComma; + oldDoubleProto = refDestructuringErrors.doubleProto; + refDestructuringErrors.parenthesizedAssign = refDestructuringErrors.trailingComma = -1; + } else { + refDestructuringErrors = new DestructuringErrors3(); + ownDestructuringErrors = true; + } + var startPos = this.start, startLoc = this.startLoc; + if (this.type === types$12.parenL || this.type === types$12.name) { + this.potentialArrowAt = this.start; + this.potentialArrowInForAwait = forInit === "await"; + } + var left = this.parseMaybeConditional(forInit, refDestructuringErrors); + if (afterLeftParse) { + left = afterLeftParse.call(this, left, startPos, startLoc); + } + if (this.type.isAssign) { + var node2 = this.startNodeAt(startPos, startLoc); + node2.operator = this.value; + if (this.type === types$12.eq) { + left = this.toAssignable(left, false, refDestructuringErrors); + } + if (!ownDestructuringErrors) { + refDestructuringErrors.parenthesizedAssign = refDestructuringErrors.trailingComma = refDestructuringErrors.doubleProto = -1; + } + if (refDestructuringErrors.shorthandAssign >= left.start) { + refDestructuringErrors.shorthandAssign = -1; + } + if (this.type === types$12.eq) { + this.checkLValPattern(left); + } else { + this.checkLValSimple(left); + } + node2.left = left; + this.next(); + node2.right = this.parseMaybeAssign(forInit); + if (oldDoubleProto > -1) { + refDestructuringErrors.doubleProto = oldDoubleProto; + } + return this.finishNode(node2, "AssignmentExpression"); + } else { + if (ownDestructuringErrors) { + this.checkExpressionErrors(refDestructuringErrors, true); + } + } + if (oldParenAssign > -1) { + refDestructuringErrors.parenthesizedAssign = oldParenAssign; + } + if (oldTrailingComma > -1) { + refDestructuringErrors.trailingComma = oldTrailingComma; + } + return left; + }; + pp$52.parseMaybeConditional = function(forInit, refDestructuringErrors) { + var startPos = this.start, startLoc = this.startLoc; + var expr = this.parseExprOps(forInit, refDestructuringErrors); + if (this.checkExpressionErrors(refDestructuringErrors)) { + return expr; + } + if (!(expr.type === "ArrowFunctionExpression" && expr.start === startPos) && this.eat(types$12.question)) { + var node2 = this.startNodeAt(startPos, startLoc); + node2.test = expr; + node2.consequent = this.parseMaybeAssign(); + this.expect(types$12.colon); + node2.alternate = this.parseMaybeAssign(forInit); + return this.finishNode(node2, "ConditionalExpression"); + } + return expr; + }; + pp$52.parseExprOps = function(forInit, refDestructuringErrors) { + var startPos = this.start, startLoc = this.startLoc; + var expr = this.parseMaybeUnary(refDestructuringErrors, false, false, forInit); + if (this.checkExpressionErrors(refDestructuringErrors)) { + return expr; + } + return expr.start === startPos && expr.type === "ArrowFunctionExpression" ? expr : this.parseExprOp(expr, startPos, startLoc, -1, forInit); + }; + pp$52.parseExprOp = function(left, leftStartPos, leftStartLoc, minPrec, forInit) { + var prec = this.type.binop; + if (prec != null && (!forInit || this.type !== types$12._in)) { + if (prec > minPrec) { + var logical = this.type === types$12.logicalOR || this.type === types$12.logicalAND; + var coalesce = this.type === types$12.coalesce; + if (coalesce) { + prec = types$12.logicalAND.binop; + } + var op = this.value; + this.next(); + var startPos = this.start, startLoc = this.startLoc; + var right = this.parseExprOp(this.parseMaybeUnary(null, false, false, forInit), startPos, startLoc, prec, forInit); + var node2 = this.buildBinary(leftStartPos, leftStartLoc, left, right, op, logical || coalesce); + if (logical && this.type === types$12.coalesce || coalesce && (this.type === types$12.logicalOR || this.type === types$12.logicalAND)) { + this.raiseRecoverable(this.start, "Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"); + } + return this.parseExprOp(node2, leftStartPos, leftStartLoc, minPrec, forInit); + } + } + return left; + }; + pp$52.buildBinary = function(startPos, startLoc, left, right, op, logical) { + if (right.type === "PrivateIdentifier") { + this.raise(right.start, "Private identifier can only be left side of binary expression"); + } + var node2 = this.startNodeAt(startPos, startLoc); + node2.left = left; + node2.operator = op; + node2.right = right; + return this.finishNode(node2, logical ? "LogicalExpression" : "BinaryExpression"); + }; + pp$52.parseMaybeUnary = function(refDestructuringErrors, sawUnary, incDec, forInit) { + var startPos = this.start, startLoc = this.startLoc, expr; + if (this.isContextual("await") && this.canAwait) { + expr = this.parseAwait(forInit); + sawUnary = true; + } else if (this.type.prefix) { + var node2 = this.startNode(), update = this.type === types$12.incDec; + node2.operator = this.value; + node2.prefix = true; + this.next(); + node2.argument = this.parseMaybeUnary(null, true, update, forInit); + this.checkExpressionErrors(refDestructuringErrors, true); + if (update) { + this.checkLValSimple(node2.argument); + } else if (this.strict && node2.operator === "delete" && isLocalVariableAccess2(node2.argument)) { + this.raiseRecoverable(node2.start, "Deleting local variable in strict mode"); + } else if (node2.operator === "delete" && isPrivateFieldAccess2(node2.argument)) { + this.raiseRecoverable(node2.start, "Private fields can not be deleted"); + } else { + sawUnary = true; + } + expr = this.finishNode(node2, update ? "UpdateExpression" : "UnaryExpression"); + } else if (!sawUnary && this.type === types$12.privateId) { + if ((forInit || this.privateNameStack.length === 0) && this.options.checkPrivateFields) { + this.unexpected(); + } + expr = this.parsePrivateIdent(); + if (this.type !== types$12._in) { + this.unexpected(); + } + } else { + expr = this.parseExprSubscripts(refDestructuringErrors, forInit); + if (this.checkExpressionErrors(refDestructuringErrors)) { + return expr; + } + while (this.type.postfix && !this.canInsertSemicolon()) { + var node$1 = this.startNodeAt(startPos, startLoc); + node$1.operator = this.value; + node$1.prefix = false; + node$1.argument = expr; + this.checkLValSimple(expr); + this.next(); + expr = this.finishNode(node$1, "UpdateExpression"); + } + } + if (!incDec && !(expr.type === "ArrowFunctionExpression" && expr.start === startPos) && this.eat(types$12.starstar)) { + if (sawUnary) { + this.unexpected(this.lastTokStart); + } else { + return this.buildBinary(startPos, startLoc, expr, this.parseMaybeUnary(null, false, false, forInit), "**", false); + } + } else { + return expr; + } + }; + function isLocalVariableAccess2(node2) { + return node2.type === "Identifier" || node2.type === "ParenthesizedExpression" && isLocalVariableAccess2(node2.expression); + } + function isPrivateFieldAccess2(node2) { + return node2.type === "MemberExpression" && node2.property.type === "PrivateIdentifier" || node2.type === "ChainExpression" && isPrivateFieldAccess2(node2.expression) || node2.type === "ParenthesizedExpression" && isPrivateFieldAccess2(node2.expression); + } + pp$52.parseExprSubscripts = function(refDestructuringErrors, forInit) { + var startPos = this.start, startLoc = this.startLoc; + var expr = this.parseExprAtom(refDestructuringErrors, forInit); + if (expr.type === "ArrowFunctionExpression" && this.input.slice(this.lastTokStart, this.lastTokEnd) !== ")") { + return expr; + } + var result = this.parseSubscripts(expr, startPos, startLoc, false, forInit); + if (refDestructuringErrors && result.type === "MemberExpression") { + if (refDestructuringErrors.parenthesizedAssign >= result.start) { + refDestructuringErrors.parenthesizedAssign = -1; + } + if (refDestructuringErrors.parenthesizedBind >= result.start) { + refDestructuringErrors.parenthesizedBind = -1; + } + if (refDestructuringErrors.trailingComma >= result.start) { + refDestructuringErrors.trailingComma = -1; + } + } + return result; + }; + pp$52.parseSubscripts = function(base, startPos, startLoc, noCalls, forInit) { + var maybeAsyncArrow = this.options.ecmaVersion >= 8 && base.type === "Identifier" && base.name === "async" && this.lastTokEnd === base.end && !this.canInsertSemicolon() && base.end - base.start === 5 && this.potentialArrowAt === base.start; + var optionalChained = false; + while (true) { + var element2 = this.parseSubscript(base, startPos, startLoc, noCalls, maybeAsyncArrow, optionalChained, forInit); + if (element2.optional) { + optionalChained = true; + } + if (element2 === base || element2.type === "ArrowFunctionExpression") { + if (optionalChained) { + var chainNode = this.startNodeAt(startPos, startLoc); + chainNode.expression = element2; + element2 = this.finishNode(chainNode, "ChainExpression"); + } + return element2; + } + base = element2; + } + }; + pp$52.shouldParseAsyncArrow = function() { + return !this.canInsertSemicolon() && this.eat(types$12.arrow); + }; + pp$52.parseSubscriptAsyncArrow = function(startPos, startLoc, exprList, forInit) { + return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList, true, forInit); + }; + pp$52.parseSubscript = function(base, startPos, startLoc, noCalls, maybeAsyncArrow, optionalChained, forInit) { + var optionalSupported = this.options.ecmaVersion >= 11; + var optional = optionalSupported && this.eat(types$12.questionDot); + if (noCalls && optional) { + this.raise(this.lastTokStart, "Optional chaining cannot appear in the callee of new expressions"); + } + var computed = this.eat(types$12.bracketL); + if (computed || optional && this.type !== types$12.parenL && this.type !== types$12.backQuote || this.eat(types$12.dot)) { + var node2 = this.startNodeAt(startPos, startLoc); + node2.object = base; + if (computed) { + node2.property = this.parseExpression(); + this.expect(types$12.bracketR); + } else if (this.type === types$12.privateId && base.type !== "Super") { + node2.property = this.parsePrivateIdent(); + } else { + node2.property = this.parseIdent(this.options.allowReserved !== "never"); + } + node2.computed = !!computed; + if (optionalSupported) { + node2.optional = optional; + } + base = this.finishNode(node2, "MemberExpression"); + } else if (!noCalls && this.eat(types$12.parenL)) { + var refDestructuringErrors = new DestructuringErrors3(), oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos; + this.yieldPos = 0; + this.awaitPos = 0; + this.awaitIdentPos = 0; + var exprList = this.parseExprList(types$12.parenR, this.options.ecmaVersion >= 8, false, refDestructuringErrors); + if (maybeAsyncArrow && !optional && this.shouldParseAsyncArrow()) { + this.checkPatternErrors(refDestructuringErrors, false); + this.checkYieldAwaitInDefaultParams(); + if (this.awaitIdentPos > 0) { + this.raise(this.awaitIdentPos, "Cannot use 'await' as identifier inside an async function"); + } + this.yieldPos = oldYieldPos; + this.awaitPos = oldAwaitPos; + this.awaitIdentPos = oldAwaitIdentPos; + return this.parseSubscriptAsyncArrow(startPos, startLoc, exprList, forInit); + } + this.checkExpressionErrors(refDestructuringErrors, true); + this.yieldPos = oldYieldPos || this.yieldPos; + this.awaitPos = oldAwaitPos || this.awaitPos; + this.awaitIdentPos = oldAwaitIdentPos || this.awaitIdentPos; + var node$1 = this.startNodeAt(startPos, startLoc); + node$1.callee = base; + node$1.arguments = exprList; + if (optionalSupported) { + node$1.optional = optional; + } + base = this.finishNode(node$1, "CallExpression"); + } else if (this.type === types$12.backQuote) { + if (optional || optionalChained) { + this.raise(this.start, "Optional chaining cannot appear in the tag of tagged template expressions"); + } + var node$2 = this.startNodeAt(startPos, startLoc); + node$2.tag = base; + node$2.quasi = this.parseTemplate({ isTagged: true }); + base = this.finishNode(node$2, "TaggedTemplateExpression"); + } + return base; + }; + pp$52.parseExprAtom = function(refDestructuringErrors, forInit, forNew) { + if (this.type === types$12.slash) { + this.readRegexp(); + } + var node2, canBeArrow = this.potentialArrowAt === this.start; + switch (this.type) { + case types$12._super: + if (!this.allowSuper) { + this.raise(this.start, "'super' keyword outside a method"); + } + node2 = this.startNode(); + this.next(); + if (this.type === types$12.parenL && !this.allowDirectSuper) { + this.raise(node2.start, "super() call outside constructor of a subclass"); + } + if (this.type !== types$12.dot && this.type !== types$12.bracketL && this.type !== types$12.parenL) { + this.unexpected(); + } + return this.finishNode(node2, "Super"); + case types$12._this: + node2 = this.startNode(); + this.next(); + return this.finishNode(node2, "ThisExpression"); + case types$12.name: + var startPos = this.start, startLoc = this.startLoc, containsEsc = this.containsEsc; + var id = this.parseIdent(false); + if (this.options.ecmaVersion >= 8 && !containsEsc && id.name === "async" && !this.canInsertSemicolon() && this.eat(types$12._function)) { + this.overrideContext(types2.f_expr); + return this.parseFunction(this.startNodeAt(startPos, startLoc), 0, false, true, forInit); + } + if (canBeArrow && !this.canInsertSemicolon()) { + if (this.eat(types$12.arrow)) { + return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id], false, forInit); + } + if (this.options.ecmaVersion >= 8 && id.name === "async" && this.type === types$12.name && !containsEsc && (!this.potentialArrowInForAwait || this.value !== "of" || this.containsEsc)) { + id = this.parseIdent(false); + if (this.canInsertSemicolon() || !this.eat(types$12.arrow)) { + this.unexpected(); + } + return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id], true, forInit); + } + } + return id; + case types$12.regexp: + var value = this.value; + node2 = this.parseLiteral(value.value); + node2.regex = { pattern: value.pattern, flags: value.flags }; + return node2; + case types$12.num: + case types$12.string: + return this.parseLiteral(this.value); + case types$12._null: + case types$12._true: + case types$12._false: + node2 = this.startNode(); + node2.value = this.type === types$12._null ? null : this.type === types$12._true; + node2.raw = this.type.keyword; + this.next(); + return this.finishNode(node2, "Literal"); + case types$12.parenL: + var start2 = this.start, expr = this.parseParenAndDistinguishExpression(canBeArrow, forInit); + if (refDestructuringErrors) { + if (refDestructuringErrors.parenthesizedAssign < 0 && !this.isSimpleAssignTarget(expr)) { + refDestructuringErrors.parenthesizedAssign = start2; + } + if (refDestructuringErrors.parenthesizedBind < 0) { + refDestructuringErrors.parenthesizedBind = start2; + } + } + return expr; + case types$12.bracketL: + node2 = this.startNode(); + this.next(); + node2.elements = this.parseExprList(types$12.bracketR, true, true, refDestructuringErrors); + return this.finishNode(node2, "ArrayExpression"); + case types$12.braceL: + this.overrideContext(types2.b_expr); + return this.parseObj(false, refDestructuringErrors); + case types$12._function: + node2 = this.startNode(); + this.next(); + return this.parseFunction(node2, 0); + case types$12._class: + return this.parseClass(this.startNode(), false); + case types$12._new: + return this.parseNew(); + case types$12.backQuote: + return this.parseTemplate(); + case types$12._import: + if (this.options.ecmaVersion >= 11) { + return this.parseExprImport(forNew); + } else { + return this.unexpected(); + } + default: + return this.parseExprAtomDefault(); + } + }; + pp$52.parseExprAtomDefault = function() { + this.unexpected(); + }; + pp$52.parseExprImport = function(forNew) { + var node2 = this.startNode(); + if (this.containsEsc) { + this.raiseRecoverable(this.start, "Escape sequence in keyword import"); + } + this.next(); + if (this.type === types$12.parenL && !forNew) { + return this.parseDynamicImport(node2); + } else if (this.type === types$12.dot) { + var meta = this.startNodeAt(node2.start, node2.loc && node2.loc.start); + meta.name = "import"; + node2.meta = this.finishNode(meta, "Identifier"); + return this.parseImportMeta(node2); + } else { + this.unexpected(); + } + }; + pp$52.parseDynamicImport = function(node2) { + this.next(); + node2.source = this.parseMaybeAssign(); + if (this.options.ecmaVersion >= 16) { + if (!this.eat(types$12.parenR)) { + this.expect(types$12.comma); + if (!this.afterTrailingComma(types$12.parenR)) { + node2.options = this.parseMaybeAssign(); + if (!this.eat(types$12.parenR)) { + this.expect(types$12.comma); + if (!this.afterTrailingComma(types$12.parenR)) { + this.unexpected(); + } + } + } else { + node2.options = null; + } + } else { + node2.options = null; + } + } else { + if (!this.eat(types$12.parenR)) { + var errorPos = this.start; + if (this.eat(types$12.comma) && this.eat(types$12.parenR)) { + this.raiseRecoverable(errorPos, "Trailing comma is not allowed in import()"); + } else { + this.unexpected(errorPos); + } + } + } + return this.finishNode(node2, "ImportExpression"); + }; + pp$52.parseImportMeta = function(node2) { + this.next(); + var containsEsc = this.containsEsc; + node2.property = this.parseIdent(true); + if (node2.property.name !== "meta") { + this.raiseRecoverable(node2.property.start, "The only valid meta property for import is 'import.meta'"); + } + if (containsEsc) { + this.raiseRecoverable(node2.start, "'import.meta' must not contain escaped characters"); + } + if (this.options.sourceType !== "module" && !this.options.allowImportExportEverywhere) { + this.raiseRecoverable(node2.start, "Cannot use 'import.meta' outside a module"); + } + return this.finishNode(node2, "MetaProperty"); + }; + pp$52.parseLiteral = function(value) { + var node2 = this.startNode(); + node2.value = value; + node2.raw = this.input.slice(this.start, this.end); + if (node2.raw.charCodeAt(node2.raw.length - 1) === 110) { + node2.bigint = node2.value != null ? node2.value.toString() : node2.raw.slice(0, -1).replace(/_/g, ""); + } + this.next(); + return this.finishNode(node2, "Literal"); + }; + pp$52.parseParenExpression = function() { + this.expect(types$12.parenL); + var val = this.parseExpression(); + this.expect(types$12.parenR); + return val; + }; + pp$52.shouldParseArrow = function(exprList) { + return !this.canInsertSemicolon(); + }; + pp$52.parseParenAndDistinguishExpression = function(canBeArrow, forInit) { + var startPos = this.start, startLoc = this.startLoc, val, allowTrailingComma = this.options.ecmaVersion >= 8; + if (this.options.ecmaVersion >= 6) { + this.next(); + var innerStartPos = this.start, innerStartLoc = this.startLoc; + var exprList = [], first = true, lastIsComma = false; + var refDestructuringErrors = new DestructuringErrors3(), oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, spreadStart; + this.yieldPos = 0; + this.awaitPos = 0; + while (this.type !== types$12.parenR) { + first ? first = false : this.expect(types$12.comma); + if (allowTrailingComma && this.afterTrailingComma(types$12.parenR, true)) { + lastIsComma = true; + break; + } else if (this.type === types$12.ellipsis) { + spreadStart = this.start; + exprList.push(this.parseParenItem(this.parseRestBinding())); + if (this.type === types$12.comma) { + this.raiseRecoverable( + this.start, + "Comma is not permitted after the rest element" + ); + } + break; + } else { + exprList.push(this.parseMaybeAssign(false, refDestructuringErrors, this.parseParenItem)); + } + } + var innerEndPos = this.lastTokEnd, innerEndLoc = this.lastTokEndLoc; + this.expect(types$12.parenR); + if (canBeArrow && this.shouldParseArrow(exprList) && this.eat(types$12.arrow)) { + this.checkPatternErrors(refDestructuringErrors, false); + this.checkYieldAwaitInDefaultParams(); + this.yieldPos = oldYieldPos; + this.awaitPos = oldAwaitPos; + return this.parseParenArrowList(startPos, startLoc, exprList, forInit); + } + if (!exprList.length || lastIsComma) { + this.unexpected(this.lastTokStart); + } + if (spreadStart) { + this.unexpected(spreadStart); + } + this.checkExpressionErrors(refDestructuringErrors, true); + this.yieldPos = oldYieldPos || this.yieldPos; + this.awaitPos = oldAwaitPos || this.awaitPos; + if (exprList.length > 1) { + val = this.startNodeAt(innerStartPos, innerStartLoc); + val.expressions = exprList; + this.finishNodeAt(val, "SequenceExpression", innerEndPos, innerEndLoc); + } else { + val = exprList[0]; + } + } else { + val = this.parseParenExpression(); + } + if (this.options.preserveParens) { + var par = this.startNodeAt(startPos, startLoc); + par.expression = val; + return this.finishNode(par, "ParenthesizedExpression"); + } else { + return val; + } + }; + pp$52.parseParenItem = function(item) { + return item; + }; + pp$52.parseParenArrowList = function(startPos, startLoc, exprList, forInit) { + return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList, false, forInit); + }; + var empty5 = []; + pp$52.parseNew = function() { + if (this.containsEsc) { + this.raiseRecoverable(this.start, "Escape sequence in keyword new"); + } + var node2 = this.startNode(); + this.next(); + if (this.options.ecmaVersion >= 6 && this.type === types$12.dot) { + var meta = this.startNodeAt(node2.start, node2.loc && node2.loc.start); + meta.name = "new"; + node2.meta = this.finishNode(meta, "Identifier"); + this.next(); + var containsEsc = this.containsEsc; + node2.property = this.parseIdent(true); + if (node2.property.name !== "target") { + this.raiseRecoverable(node2.property.start, "The only valid meta property for new is 'new.target'"); + } + if (containsEsc) { + this.raiseRecoverable(node2.start, "'new.target' must not contain escaped characters"); + } + if (!this.allowNewDotTarget) { + this.raiseRecoverable(node2.start, "'new.target' can only be used in functions and class static block"); + } + return this.finishNode(node2, "MetaProperty"); + } + var startPos = this.start, startLoc = this.startLoc; + node2.callee = this.parseSubscripts(this.parseExprAtom(null, false, true), startPos, startLoc, true, false); + if (node2.callee.type === "Super") { + this.raiseRecoverable(startPos, "Invalid use of 'super'"); + } + if (this.eat(types$12.parenL)) { + node2.arguments = this.parseExprList(types$12.parenR, this.options.ecmaVersion >= 8, false); + } else { + node2.arguments = empty5; + } + return this.finishNode(node2, "NewExpression"); + }; + pp$52.parseTemplateElement = function(ref3) { + var isTagged = ref3.isTagged; + var elem = this.startNode(); + if (this.type === types$12.invalidTemplate) { + if (!isTagged) { + this.raiseRecoverable(this.start, "Bad escape sequence in untagged template literal"); + } + elem.value = { + raw: this.value.replace(/\r\n?/g, "\n"), + cooked: null + }; + } else { + elem.value = { + raw: this.input.slice(this.start, this.end).replace(/\r\n?/g, "\n"), + cooked: this.value + }; + } + this.next(); + elem.tail = this.type === types$12.backQuote; + return this.finishNode(elem, "TemplateElement"); + }; + pp$52.parseTemplate = function(ref3) { + if (ref3 === void 0) ref3 = {}; + var isTagged = ref3.isTagged; + if (isTagged === void 0) isTagged = false; + var node2 = this.startNode(); + this.next(); + node2.expressions = []; + var curElt = this.parseTemplateElement({ isTagged }); + node2.quasis = [curElt]; + while (!curElt.tail) { + if (this.type === types$12.eof) { + this.raise(this.pos, "Unterminated template literal"); + } + this.expect(types$12.dollarBraceL); + node2.expressions.push(this.parseExpression()); + this.expect(types$12.braceR); + node2.quasis.push(curElt = this.parseTemplateElement({ isTagged })); + } + this.next(); + return this.finishNode(node2, "TemplateLiteral"); + }; + pp$52.isAsyncProp = function(prop) { + return !prop.computed && prop.key.type === "Identifier" && prop.key.name === "async" && (this.type === types$12.name || this.type === types$12.num || this.type === types$12.string || this.type === types$12.bracketL || this.type.keyword || this.options.ecmaVersion >= 9 && this.type === types$12.star) && !lineBreak2.test(this.input.slice(this.lastTokEnd, this.start)); + }; + pp$52.parseObj = function(isPattern, refDestructuringErrors) { + var node2 = this.startNode(), first = true, propHash = {}; + node2.properties = []; + this.next(); + while (!this.eat(types$12.braceR)) { + if (!first) { + this.expect(types$12.comma); + if (this.options.ecmaVersion >= 5 && this.afterTrailingComma(types$12.braceR)) { + break; + } + } else { + first = false; + } + var prop = this.parseProperty(isPattern, refDestructuringErrors); + if (!isPattern) { + this.checkPropClash(prop, propHash, refDestructuringErrors); + } + node2.properties.push(prop); + } + return this.finishNode(node2, isPattern ? "ObjectPattern" : "ObjectExpression"); + }; + pp$52.parseProperty = function(isPattern, refDestructuringErrors) { + var prop = this.startNode(), isGenerator, isAsync, startPos, startLoc; + if (this.options.ecmaVersion >= 9 && this.eat(types$12.ellipsis)) { + if (isPattern) { + prop.argument = this.parseIdent(false); + if (this.type === types$12.comma) { + this.raiseRecoverable(this.start, "Comma is not permitted after the rest element"); + } + return this.finishNode(prop, "RestElement"); + } + prop.argument = this.parseMaybeAssign(false, refDestructuringErrors); + if (this.type === types$12.comma && refDestructuringErrors && refDestructuringErrors.trailingComma < 0) { + refDestructuringErrors.trailingComma = this.start; + } + return this.finishNode(prop, "SpreadElement"); + } + if (this.options.ecmaVersion >= 6) { + prop.method = false; + prop.shorthand = false; + if (isPattern || refDestructuringErrors) { + startPos = this.start; + startLoc = this.startLoc; + } + if (!isPattern) { + isGenerator = this.eat(types$12.star); + } + } + var containsEsc = this.containsEsc; + this.parsePropertyName(prop); + if (!isPattern && !containsEsc && this.options.ecmaVersion >= 8 && !isGenerator && this.isAsyncProp(prop)) { + isAsync = true; + isGenerator = this.options.ecmaVersion >= 9 && this.eat(types$12.star); + this.parsePropertyName(prop); + } else { + isAsync = false; + } + this.parsePropertyValue(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors, containsEsc); + return this.finishNode(prop, "Property"); + }; + pp$52.parseGetterSetter = function(prop) { + var kind = prop.key.name; + this.parsePropertyName(prop); + prop.value = this.parseMethod(false); + prop.kind = kind; + var paramCount = prop.kind === "get" ? 0 : 1; + if (prop.value.params.length !== paramCount) { + var start2 = prop.value.start; + if (prop.kind === "get") { + this.raiseRecoverable(start2, "getter should have no params"); + } else { + this.raiseRecoverable(start2, "setter should have exactly one param"); + } + } else { + if (prop.kind === "set" && prop.value.params[0].type === "RestElement") { + this.raiseRecoverable(prop.value.params[0].start, "Setter cannot use rest params"); + } + } + }; + pp$52.parsePropertyValue = function(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors, containsEsc) { + if ((isGenerator || isAsync) && this.type === types$12.colon) { + this.unexpected(); + } + if (this.eat(types$12.colon)) { + prop.value = isPattern ? this.parseMaybeDefault(this.start, this.startLoc) : this.parseMaybeAssign(false, refDestructuringErrors); + prop.kind = "init"; + } else if (this.options.ecmaVersion >= 6 && this.type === types$12.parenL) { + if (isPattern) { + this.unexpected(); + } + prop.method = true; + prop.value = this.parseMethod(isGenerator, isAsync); + prop.kind = "init"; + } else if (!isPattern && !containsEsc && this.options.ecmaVersion >= 5 && !prop.computed && prop.key.type === "Identifier" && (prop.key.name === "get" || prop.key.name === "set") && (this.type !== types$12.comma && this.type !== types$12.braceR && this.type !== types$12.eq)) { + if (isGenerator || isAsync) { + this.unexpected(); + } + this.parseGetterSetter(prop); + } else if (this.options.ecmaVersion >= 6 && !prop.computed && prop.key.type === "Identifier") { + if (isGenerator || isAsync) { + this.unexpected(); + } + this.checkUnreserved(prop.key); + if (prop.key.name === "await" && !this.awaitIdentPos) { + this.awaitIdentPos = startPos; + } + if (isPattern) { + prop.value = this.parseMaybeDefault(startPos, startLoc, this.copyNode(prop.key)); + } else if (this.type === types$12.eq && refDestructuringErrors) { + if (refDestructuringErrors.shorthandAssign < 0) { + refDestructuringErrors.shorthandAssign = this.start; + } + prop.value = this.parseMaybeDefault(startPos, startLoc, this.copyNode(prop.key)); + } else { + prop.value = this.copyNode(prop.key); + } + prop.kind = "init"; + prop.shorthand = true; + } else { + this.unexpected(); + } + }; + pp$52.parsePropertyName = function(prop) { + if (this.options.ecmaVersion >= 6) { + if (this.eat(types$12.bracketL)) { + prop.computed = true; + prop.key = this.parseMaybeAssign(); + this.expect(types$12.bracketR); + return prop.key; + } else { + prop.computed = false; + } + } + return prop.key = this.type === types$12.num || this.type === types$12.string ? this.parseExprAtom() : this.parseIdent(this.options.allowReserved !== "never"); + }; + pp$52.initFunction = function(node2) { + node2.id = null; + if (this.options.ecmaVersion >= 6) { + node2.generator = node2.expression = false; + } + if (this.options.ecmaVersion >= 8) { + node2.async = false; + } + }; + pp$52.parseMethod = function(isGenerator, isAsync, allowDirectSuper) { + var node2 = this.startNode(), oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos; + this.initFunction(node2); + if (this.options.ecmaVersion >= 6) { + node2.generator = isGenerator; + } + if (this.options.ecmaVersion >= 8) { + node2.async = !!isAsync; + } + this.yieldPos = 0; + this.awaitPos = 0; + this.awaitIdentPos = 0; + this.enterScope(functionFlags2(isAsync, node2.generator) | SCOPE_SUPER2 | (allowDirectSuper ? SCOPE_DIRECT_SUPER2 : 0)); + this.expect(types$12.parenL); + node2.params = this.parseBindingList(types$12.parenR, false, this.options.ecmaVersion >= 8); + this.checkYieldAwaitInDefaultParams(); + this.parseFunctionBody(node2, false, true, false); + this.yieldPos = oldYieldPos; + this.awaitPos = oldAwaitPos; + this.awaitIdentPos = oldAwaitIdentPos; + return this.finishNode(node2, "FunctionExpression"); + }; + pp$52.parseArrowExpression = function(node2, params, isAsync, forInit) { + var oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos; + this.enterScope(functionFlags2(isAsync, false) | SCOPE_ARROW2); + this.initFunction(node2); + if (this.options.ecmaVersion >= 8) { + node2.async = !!isAsync; + } + this.yieldPos = 0; + this.awaitPos = 0; + this.awaitIdentPos = 0; + node2.params = this.toAssignableList(params, true); + this.parseFunctionBody(node2, true, false, forInit); + this.yieldPos = oldYieldPos; + this.awaitPos = oldAwaitPos; + this.awaitIdentPos = oldAwaitIdentPos; + return this.finishNode(node2, "ArrowFunctionExpression"); + }; + pp$52.parseFunctionBody = function(node2, isArrowFunction, isMethod, forInit) { + var isExpression = isArrowFunction && this.type !== types$12.braceL; + var oldStrict = this.strict, useStrict = false; + if (isExpression) { + node2.body = this.parseMaybeAssign(forInit); + node2.expression = true; + this.checkParams(node2, false); + } else { + var nonSimple = this.options.ecmaVersion >= 7 && !this.isSimpleParamList(node2.params); + if (!oldStrict || nonSimple) { + useStrict = this.strictDirective(this.end); + if (useStrict && nonSimple) { + this.raiseRecoverable(node2.start, "Illegal 'use strict' directive in function with non-simple parameter list"); + } + } + var oldLabels = this.labels; + this.labels = []; + if (useStrict) { + this.strict = true; + } + this.checkParams(node2, !oldStrict && !useStrict && !isArrowFunction && !isMethod && this.isSimpleParamList(node2.params)); + if (this.strict && node2.id) { + this.checkLValSimple(node2.id, BIND_OUTSIDE2); + } + node2.body = this.parseBlock(false, void 0, useStrict && !oldStrict); + node2.expression = false; + this.adaptDirectivePrologue(node2.body.body); + this.labels = oldLabels; + } + this.exitScope(); + }; + pp$52.isSimpleParamList = function(params) { + for (var i2 = 0, list5 = params; i2 < list5.length; i2 += 1) { + var param = list5[i2]; + if (param.type !== "Identifier") { + return false; + } + } + return true; + }; + pp$52.checkParams = function(node2, allowDuplicates) { + var nameHash = /* @__PURE__ */ Object.create(null); + for (var i2 = 0, list5 = node2.params; i2 < list5.length; i2 += 1) { + var param = list5[i2]; + this.checkLValInnerPattern(param, BIND_VAR2, allowDuplicates ? null : nameHash); + } + }; + pp$52.parseExprList = function(close, allowTrailingComma, allowEmpty, refDestructuringErrors) { + var elts = [], first = true; + while (!this.eat(close)) { + if (!first) { + this.expect(types$12.comma); + if (allowTrailingComma && this.afterTrailingComma(close)) { + break; + } + } else { + first = false; + } + var elt = void 0; + if (allowEmpty && this.type === types$12.comma) { + elt = null; + } else if (this.type === types$12.ellipsis) { + elt = this.parseSpread(refDestructuringErrors); + if (refDestructuringErrors && this.type === types$12.comma && refDestructuringErrors.trailingComma < 0) { + refDestructuringErrors.trailingComma = this.start; + } + } else { + elt = this.parseMaybeAssign(false, refDestructuringErrors); + } + elts.push(elt); + } + return elts; + }; + pp$52.checkUnreserved = function(ref3) { + var start2 = ref3.start; + var end = ref3.end; + var name2 = ref3.name; + if (this.inGenerator && name2 === "yield") { + this.raiseRecoverable(start2, "Cannot use 'yield' as identifier inside a generator"); + } + if (this.inAsync && name2 === "await") { + this.raiseRecoverable(start2, "Cannot use 'await' as identifier inside an async function"); + } + if (!(this.currentThisScope().flags & SCOPE_VAR2) && name2 === "arguments") { + this.raiseRecoverable(start2, "Cannot use 'arguments' in class field initializer"); + } + if (this.inClassStaticBlock && (name2 === "arguments" || name2 === "await")) { + this.raise(start2, "Cannot use " + name2 + " in class static initialization block"); + } + if (this.keywords.test(name2)) { + this.raise(start2, "Unexpected keyword '" + name2 + "'"); + } + if (this.options.ecmaVersion < 6 && this.input.slice(start2, end).indexOf("\\") !== -1) { + return; + } + var re2 = this.strict ? this.reservedWordsStrict : this.reservedWords; + if (re2.test(name2)) { + if (!this.inAsync && name2 === "await") { + this.raiseRecoverable(start2, "Cannot use keyword 'await' outside an async function"); + } + this.raiseRecoverable(start2, "The keyword '" + name2 + "' is reserved"); + } + }; + pp$52.parseIdent = function(liberal) { + var node2 = this.parseIdentNode(); + this.next(!!liberal); + this.finishNode(node2, "Identifier"); + if (!liberal) { + this.checkUnreserved(node2); + if (node2.name === "await" && !this.awaitIdentPos) { + this.awaitIdentPos = node2.start; + } + } + return node2; + }; + pp$52.parseIdentNode = function() { + var node2 = this.startNode(); + if (this.type === types$12.name) { + node2.name = this.value; + } else if (this.type.keyword) { + node2.name = this.type.keyword; + if ((node2.name === "class" || node2.name === "function") && (this.lastTokEnd !== this.lastTokStart + 1 || this.input.charCodeAt(this.lastTokStart) !== 46)) { + this.context.pop(); + } + this.type = types$12.name; + } else { + this.unexpected(); + } + return node2; + }; + pp$52.parsePrivateIdent = function() { + var node2 = this.startNode(); + if (this.type === types$12.privateId) { + node2.name = this.value; + } else { + this.unexpected(); + } + this.next(); + this.finishNode(node2, "PrivateIdentifier"); + if (this.options.checkPrivateFields) { + if (this.privateNameStack.length === 0) { + this.raise(node2.start, "Private field '#" + node2.name + "' must be declared in an enclosing class"); + } else { + this.privateNameStack[this.privateNameStack.length - 1].used.push(node2); + } + } + return node2; + }; + pp$52.parseYield = function(forInit) { + if (!this.yieldPos) { + this.yieldPos = this.start; + } + var node2 = this.startNode(); + this.next(); + if (this.type === types$12.semi || this.canInsertSemicolon() || this.type !== types$12.star && !this.type.startsExpr) { + node2.delegate = false; + node2.argument = null; + } else { + node2.delegate = this.eat(types$12.star); + node2.argument = this.parseMaybeAssign(forInit); + } + return this.finishNode(node2, "YieldExpression"); + }; + pp$52.parseAwait = function(forInit) { + if (!this.awaitPos) { + this.awaitPos = this.start; + } + var node2 = this.startNode(); + this.next(); + node2.argument = this.parseMaybeUnary(null, true, false, forInit); + return this.finishNode(node2, "AwaitExpression"); + }; + var pp$42 = Parser3.prototype; + pp$42.raise = function(pos, message) { + var loc = getLineInfo2(this.input, pos); + message += " (" + loc.line + ":" + loc.column + ")"; + if (this.sourceFile) { + message += " in " + this.sourceFile; + } + var err = new SyntaxError(message); + err.pos = pos; + err.loc = loc; + err.raisedAt = this.pos; + throw err; + }; + pp$42.raiseRecoverable = pp$42.raise; + pp$42.curPosition = function() { + if (this.options.locations) { + return new Position3(this.curLine, this.pos - this.lineStart); + } + }; + var pp$32 = Parser3.prototype; + var Scope3 = function Scope4(flags) { + this.flags = flags; + this.var = []; + this.lexical = []; + this.functions = []; + }; + pp$32.enterScope = function(flags) { + this.scopeStack.push(new Scope3(flags)); + }; + pp$32.exitScope = function() { + this.scopeStack.pop(); + }; + pp$32.treatFunctionsAsVarInScope = function(scope) { + return scope.flags & SCOPE_FUNCTION2 || !this.inModule && scope.flags & SCOPE_TOP2; + }; + pp$32.declareName = function(name2, bindingType, pos) { + var redeclared = false; + if (bindingType === BIND_LEXICAL2) { + var scope = this.currentScope(); + redeclared = scope.lexical.indexOf(name2) > -1 || scope.functions.indexOf(name2) > -1 || scope.var.indexOf(name2) > -1; + scope.lexical.push(name2); + if (this.inModule && scope.flags & SCOPE_TOP2) { + delete this.undefinedExports[name2]; + } + } else if (bindingType === BIND_SIMPLE_CATCH2) { + var scope$1 = this.currentScope(); + scope$1.lexical.push(name2); + } else if (bindingType === BIND_FUNCTION2) { + var scope$2 = this.currentScope(); + if (this.treatFunctionsAsVar) { + redeclared = scope$2.lexical.indexOf(name2) > -1; + } else { + redeclared = scope$2.lexical.indexOf(name2) > -1 || scope$2.var.indexOf(name2) > -1; + } + scope$2.functions.push(name2); + } else { + for (var i2 = this.scopeStack.length - 1; i2 >= 0; --i2) { + var scope$3 = this.scopeStack[i2]; + if (scope$3.lexical.indexOf(name2) > -1 && !(scope$3.flags & SCOPE_SIMPLE_CATCH2 && scope$3.lexical[0] === name2) || !this.treatFunctionsAsVarInScope(scope$3) && scope$3.functions.indexOf(name2) > -1) { + redeclared = true; + break; + } + scope$3.var.push(name2); + if (this.inModule && scope$3.flags & SCOPE_TOP2) { + delete this.undefinedExports[name2]; + } + if (scope$3.flags & SCOPE_VAR2) { + break; + } + } + } + if (redeclared) { + this.raiseRecoverable(pos, "Identifier '" + name2 + "' has already been declared"); + } + }; + pp$32.checkLocalExport = function(id) { + if (this.scopeStack[0].lexical.indexOf(id.name) === -1 && this.scopeStack[0].var.indexOf(id.name) === -1) { + this.undefinedExports[id.name] = id; + } + }; + pp$32.currentScope = function() { + return this.scopeStack[this.scopeStack.length - 1]; + }; + pp$32.currentVarScope = function() { + for (var i2 = this.scopeStack.length - 1; ; i2--) { + var scope = this.scopeStack[i2]; + if (scope.flags & (SCOPE_VAR2 | SCOPE_CLASS_FIELD_INIT2 | SCOPE_CLASS_STATIC_BLOCK2)) { + return scope; + } + } + }; + pp$32.currentThisScope = function() { + for (var i2 = this.scopeStack.length - 1; ; i2--) { + var scope = this.scopeStack[i2]; + if (scope.flags & (SCOPE_VAR2 | SCOPE_CLASS_FIELD_INIT2 | SCOPE_CLASS_STATIC_BLOCK2) && !(scope.flags & SCOPE_ARROW2)) { + return scope; + } + } + }; + var Node3 = function Node4(parser, pos, loc) { + this.type = ""; + this.start = pos; + this.end = 0; + if (parser.options.locations) { + this.loc = new SourceLocation3(parser, loc); + } + if (parser.options.directSourceFile) { + this.sourceFile = parser.options.directSourceFile; + } + if (parser.options.ranges) { + this.range = [pos, 0]; + } + }; + var pp$22 = Parser3.prototype; + pp$22.startNode = function() { + return new Node3(this, this.start, this.startLoc); + }; + pp$22.startNodeAt = function(pos, loc) { + return new Node3(this, pos, loc); + }; + function finishNodeAt2(node2, type, pos, loc) { + node2.type = type; + node2.end = pos; + if (this.options.locations) { + node2.loc.end = loc; + } + if (this.options.ranges) { + node2.range[1] = pos; + } + return node2; + } + pp$22.finishNode = function(node2, type) { + return finishNodeAt2.call(this, node2, type, this.lastTokEnd, this.lastTokEndLoc); + }; + pp$22.finishNodeAt = function(node2, type, pos, loc) { + return finishNodeAt2.call(this, node2, type, pos, loc); + }; + pp$22.copyNode = function(node2) { + var newNode = new Node3(this, node2.start, this.startLoc); + for (var prop in node2) { + newNode[prop] = node2[prop]; + } + return newNode; + }; + var scriptValuesAddedInUnicode2 = "Berf Beria_Erfe Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sidetic Sidt Sunu Sunuwar Tai_Yo Tayo Todhri Todr Tolong_Siki Tols Tulu_Tigalari Tutg Unknown Zzzz"; + var ecma9BinaryProperties2 = "ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS"; + var ecma10BinaryProperties2 = ecma9BinaryProperties2 + " Extended_Pictographic"; + var ecma11BinaryProperties2 = ecma10BinaryProperties2; + var ecma12BinaryProperties2 = ecma11BinaryProperties2 + " EBase EComp EMod EPres ExtPict"; + var ecma13BinaryProperties2 = ecma12BinaryProperties2; + var ecma14BinaryProperties2 = ecma13BinaryProperties2; + var unicodeBinaryProperties2 = { + 9: ecma9BinaryProperties2, + 10: ecma10BinaryProperties2, + 11: ecma11BinaryProperties2, + 12: ecma12BinaryProperties2, + 13: ecma13BinaryProperties2, + 14: ecma14BinaryProperties2 + }; + var ecma14BinaryPropertiesOfStrings2 = "Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji"; + var unicodeBinaryPropertiesOfStrings2 = { + 9: "", + 10: "", + 11: "", + 12: "", + 13: "", + 14: ecma14BinaryPropertiesOfStrings2 + }; + var unicodeGeneralCategoryValues2 = "Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu"; + var ecma9ScriptValues2 = "Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb"; + var ecma10ScriptValues2 = ecma9ScriptValues2 + " Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd"; + var ecma11ScriptValues2 = ecma10ScriptValues2 + " Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho"; + var ecma12ScriptValues2 = ecma11ScriptValues2 + " Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi"; + var ecma13ScriptValues2 = ecma12ScriptValues2 + " Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith"; + var ecma14ScriptValues2 = ecma13ScriptValues2 + " " + scriptValuesAddedInUnicode2; + var unicodeScriptValues2 = { + 9: ecma9ScriptValues2, + 10: ecma10ScriptValues2, + 11: ecma11ScriptValues2, + 12: ecma12ScriptValues2, + 13: ecma13ScriptValues2, + 14: ecma14ScriptValues2 + }; + var data2 = {}; + function buildUnicodeData2(ecmaVersion2) { + var d = data2[ecmaVersion2] = { + binary: wordsRegexp2(unicodeBinaryProperties2[ecmaVersion2] + " " + unicodeGeneralCategoryValues2), + binaryOfStrings: wordsRegexp2(unicodeBinaryPropertiesOfStrings2[ecmaVersion2]), + nonBinary: { + General_Category: wordsRegexp2(unicodeGeneralCategoryValues2), + Script: wordsRegexp2(unicodeScriptValues2[ecmaVersion2]) + } + }; + d.nonBinary.Script_Extensions = d.nonBinary.Script; + d.nonBinary.gc = d.nonBinary.General_Category; + d.nonBinary.sc = d.nonBinary.Script; + d.nonBinary.scx = d.nonBinary.Script_Extensions; + } + for (var i = 0, list4 = [9, 10, 11, 12, 13, 14]; i < list4.length; i += 1) { + var ecmaVersion = list4[i]; + buildUnicodeData2(ecmaVersion); + } + var pp$12 = Parser3.prototype; + var BranchID3 = function BranchID4(parent, base) { + this.parent = parent; + this.base = base || this; + }; + BranchID3.prototype.separatedFrom = function separatedFrom2(alt) { + for (var self2 = this; self2; self2 = self2.parent) { + for (var other = alt; other; other = other.parent) { + if (self2.base === other.base && self2 !== other) { + return true; + } + } + } + return false; + }; + BranchID3.prototype.sibling = function sibling2() { + return new BranchID3(this.parent, this.base); + }; + var RegExpValidationState3 = function RegExpValidationState4(parser) { + this.parser = parser; + this.validFlags = "gim" + (parser.options.ecmaVersion >= 6 ? "uy" : "") + (parser.options.ecmaVersion >= 9 ? "s" : "") + (parser.options.ecmaVersion >= 13 ? "d" : "") + (parser.options.ecmaVersion >= 15 ? "v" : ""); + this.unicodeProperties = data2[parser.options.ecmaVersion >= 14 ? 14 : parser.options.ecmaVersion]; + this.source = ""; + this.flags = ""; + this.start = 0; + this.switchU = false; + this.switchV = false; + this.switchN = false; + this.pos = 0; + this.lastIntValue = 0; + this.lastStringValue = ""; + this.lastAssertionIsQuantifiable = false; + this.numCapturingParens = 0; + this.maxBackReference = 0; + this.groupNames = /* @__PURE__ */ Object.create(null); + this.backReferenceNames = []; + this.branchID = null; + }; + RegExpValidationState3.prototype.reset = function reset2(start2, pattern, flags) { + var unicodeSets = flags.indexOf("v") !== -1; + var unicode = flags.indexOf("u") !== -1; + this.start = start2 | 0; + this.source = pattern + ""; + this.flags = flags; + if (unicodeSets && this.parser.options.ecmaVersion >= 15) { + this.switchU = true; + this.switchV = true; + this.switchN = true; + } else { + this.switchU = unicode && this.parser.options.ecmaVersion >= 6; + this.switchV = false; + this.switchN = unicode && this.parser.options.ecmaVersion >= 9; + } + }; + RegExpValidationState3.prototype.raise = function raise2(message) { + this.parser.raiseRecoverable(this.start, "Invalid regular expression: /" + this.source + "/: " + message); + }; + RegExpValidationState3.prototype.at = function at2(i2, forceU) { + if (forceU === void 0) forceU = false; + var s = this.source; + var l = s.length; + if (i2 >= l) { + return -1; + } + var c = s.charCodeAt(i2); + if (!(forceU || this.switchU) || c <= 55295 || c >= 57344 || i2 + 1 >= l) { + return c; + } + var next = s.charCodeAt(i2 + 1); + return next >= 56320 && next <= 57343 ? (c << 10) + next - 56613888 : c; + }; + RegExpValidationState3.prototype.nextIndex = function nextIndex2(i2, forceU) { + if (forceU === void 0) forceU = false; + var s = this.source; + var l = s.length; + if (i2 >= l) { + return l; + } + var c = s.charCodeAt(i2), next; + if (!(forceU || this.switchU) || c <= 55295 || c >= 57344 || i2 + 1 >= l || (next = s.charCodeAt(i2 + 1)) < 56320 || next > 57343) { + return i2 + 1; + } + return i2 + 2; + }; + RegExpValidationState3.prototype.current = function current2(forceU) { + if (forceU === void 0) forceU = false; + return this.at(this.pos, forceU); + }; + RegExpValidationState3.prototype.lookahead = function lookahead2(forceU) { + if (forceU === void 0) forceU = false; + return this.at(this.nextIndex(this.pos, forceU), forceU); + }; + RegExpValidationState3.prototype.advance = function advance2(forceU) { + if (forceU === void 0) forceU = false; + this.pos = this.nextIndex(this.pos, forceU); + }; + RegExpValidationState3.prototype.eat = function eat2(ch, forceU) { + if (forceU === void 0) forceU = false; + if (this.current(forceU) === ch) { + this.advance(forceU); + return true; + } + return false; + }; + RegExpValidationState3.prototype.eatChars = function eatChars2(chs, forceU) { + if (forceU === void 0) forceU = false; + var pos = this.pos; + for (var i2 = 0, list5 = chs; i2 < list5.length; i2 += 1) { + var ch = list5[i2]; + var current2 = this.at(pos, forceU); + if (current2 === -1 || current2 !== ch) { + return false; + } + pos = this.nextIndex(pos, forceU); + } + this.pos = pos; + return true; + }; + pp$12.validateRegExpFlags = function(state) { + var validFlags = state.validFlags; + var flags = state.flags; + var u = false; + var v = false; + for (var i2 = 0; i2 < flags.length; i2++) { + var flag = flags.charAt(i2); + if (validFlags.indexOf(flag) === -1) { + this.raise(state.start, "Invalid regular expression flag"); + } + if (flags.indexOf(flag, i2 + 1) > -1) { + this.raise(state.start, "Duplicate regular expression flag"); + } + if (flag === "u") { + u = true; + } + if (flag === "v") { + v = true; + } + } + if (this.options.ecmaVersion >= 15 && u && v) { + this.raise(state.start, "Invalid regular expression flag"); + } + }; + function hasProp2(obj) { + for (var _ in obj) { + return true; + } + return false; + } + pp$12.validateRegExpPattern = function(state) { + this.regexp_pattern(state); + if (!state.switchN && this.options.ecmaVersion >= 9 && hasProp2(state.groupNames)) { + state.switchN = true; + this.regexp_pattern(state); + } + }; + pp$12.regexp_pattern = function(state) { + state.pos = 0; + state.lastIntValue = 0; + state.lastStringValue = ""; + state.lastAssertionIsQuantifiable = false; + state.numCapturingParens = 0; + state.maxBackReference = 0; + state.groupNames = /* @__PURE__ */ Object.create(null); + state.backReferenceNames.length = 0; + state.branchID = null; + this.regexp_disjunction(state); + if (state.pos !== state.source.length) { + if (state.eat( + 41 + /* ) */ + )) { + state.raise("Unmatched ')'"); + } + if (state.eat( + 93 + /* ] */ + ) || state.eat( + 125 + /* } */ + )) { + state.raise("Lone quantifier brackets"); + } + } + if (state.maxBackReference > state.numCapturingParens) { + state.raise("Invalid escape"); + } + for (var i2 = 0, list5 = state.backReferenceNames; i2 < list5.length; i2 += 1) { + var name2 = list5[i2]; + if (!state.groupNames[name2]) { + state.raise("Invalid named capture referenced"); + } + } + }; + pp$12.regexp_disjunction = function(state) { + var trackDisjunction = this.options.ecmaVersion >= 16; + if (trackDisjunction) { + state.branchID = new BranchID3(state.branchID, null); + } + this.regexp_alternative(state); + while (state.eat( + 124 + /* | */ + )) { + if (trackDisjunction) { + state.branchID = state.branchID.sibling(); + } + this.regexp_alternative(state); + } + if (trackDisjunction) { + state.branchID = state.branchID.parent; + } + if (this.regexp_eatQuantifier(state, true)) { + state.raise("Nothing to repeat"); + } + if (state.eat( + 123 + /* { */ + )) { + state.raise("Lone quantifier brackets"); + } + }; + pp$12.regexp_alternative = function(state) { + while (state.pos < state.source.length && this.regexp_eatTerm(state)) { + } + }; + pp$12.regexp_eatTerm = function(state) { + if (this.regexp_eatAssertion(state)) { + if (state.lastAssertionIsQuantifiable && this.regexp_eatQuantifier(state)) { + if (state.switchU) { + state.raise("Invalid quantifier"); + } + } + return true; + } + if (state.switchU ? this.regexp_eatAtom(state) : this.regexp_eatExtendedAtom(state)) { + this.regexp_eatQuantifier(state); + return true; + } + return false; + }; + pp$12.regexp_eatAssertion = function(state) { + var start2 = state.pos; + state.lastAssertionIsQuantifiable = false; + if (state.eat( + 94 + /* ^ */ + ) || state.eat( + 36 + /* $ */ + )) { + return true; + } + if (state.eat( + 92 + /* \ */ + )) { + if (state.eat( + 66 + /* B */ + ) || state.eat( + 98 + /* b */ + )) { + return true; + } + state.pos = start2; + } + if (state.eat( + 40 + /* ( */ + ) && state.eat( + 63 + /* ? */ + )) { + var lookbehind = false; + if (this.options.ecmaVersion >= 9) { + lookbehind = state.eat( + 60 + /* < */ + ); + } + if (state.eat( + 61 + /* = */ + ) || state.eat( + 33 + /* ! */ + )) { + this.regexp_disjunction(state); + if (!state.eat( + 41 + /* ) */ + )) { + state.raise("Unterminated group"); + } + state.lastAssertionIsQuantifiable = !lookbehind; + return true; + } + } + state.pos = start2; + return false; + }; + pp$12.regexp_eatQuantifier = function(state, noError) { + if (noError === void 0) noError = false; + if (this.regexp_eatQuantifierPrefix(state, noError)) { + state.eat( + 63 + /* ? */ + ); + return true; + } + return false; + }; + pp$12.regexp_eatQuantifierPrefix = function(state, noError) { + return state.eat( + 42 + /* * */ + ) || state.eat( + 43 + /* + */ + ) || state.eat( + 63 + /* ? */ + ) || this.regexp_eatBracedQuantifier(state, noError); + }; + pp$12.regexp_eatBracedQuantifier = function(state, noError) { + var start2 = state.pos; + if (state.eat( + 123 + /* { */ + )) { + var min = 0, max = -1; + if (this.regexp_eatDecimalDigits(state)) { + min = state.lastIntValue; + if (state.eat( + 44 + /* , */ + ) && this.regexp_eatDecimalDigits(state)) { + max = state.lastIntValue; + } + if (state.eat( + 125 + /* } */ + )) { + if (max !== -1 && max < min && !noError) { + state.raise("numbers out of order in {} quantifier"); + } + return true; + } + } + if (state.switchU && !noError) { + state.raise("Incomplete quantifier"); + } + state.pos = start2; + } + return false; + }; + pp$12.regexp_eatAtom = function(state) { + return this.regexp_eatPatternCharacters(state) || state.eat( + 46 + /* . */ + ) || this.regexp_eatReverseSolidusAtomEscape(state) || this.regexp_eatCharacterClass(state) || this.regexp_eatUncapturingGroup(state) || this.regexp_eatCapturingGroup(state); + }; + pp$12.regexp_eatReverseSolidusAtomEscape = function(state) { + var start2 = state.pos; + if (state.eat( + 92 + /* \ */ + )) { + if (this.regexp_eatAtomEscape(state)) { + return true; + } + state.pos = start2; + } + return false; + }; + pp$12.regexp_eatUncapturingGroup = function(state) { + var start2 = state.pos; + if (state.eat( + 40 + /* ( */ + )) { + if (state.eat( + 63 + /* ? */ + )) { + if (this.options.ecmaVersion >= 16) { + var addModifiers = this.regexp_eatModifiers(state); + var hasHyphen = state.eat( + 45 + /* - */ + ); + if (addModifiers || hasHyphen) { + for (var i2 = 0; i2 < addModifiers.length; i2++) { + var modifier = addModifiers.charAt(i2); + if (addModifiers.indexOf(modifier, i2 + 1) > -1) { + state.raise("Duplicate regular expression modifiers"); + } + } + if (hasHyphen) { + var removeModifiers = this.regexp_eatModifiers(state); + if (!addModifiers && !removeModifiers && state.current() === 58) { + state.raise("Invalid regular expression modifiers"); + } + for (var i$1 = 0; i$1 < removeModifiers.length; i$1++) { + var modifier$1 = removeModifiers.charAt(i$1); + if (removeModifiers.indexOf(modifier$1, i$1 + 1) > -1 || addModifiers.indexOf(modifier$1) > -1) { + state.raise("Duplicate regular expression modifiers"); + } + } + } + } + } + if (state.eat( + 58 + /* : */ + )) { + this.regexp_disjunction(state); + if (state.eat( + 41 + /* ) */ + )) { + return true; + } + state.raise("Unterminated group"); + } + } + state.pos = start2; + } + return false; + }; + pp$12.regexp_eatCapturingGroup = function(state) { + if (state.eat( + 40 + /* ( */ + )) { + if (this.options.ecmaVersion >= 9) { + this.regexp_groupSpecifier(state); + } else if (state.current() === 63) { + state.raise("Invalid group"); + } + this.regexp_disjunction(state); + if (state.eat( + 41 + /* ) */ + )) { + state.numCapturingParens += 1; + return true; + } + state.raise("Unterminated group"); + } + return false; + }; + pp$12.regexp_eatModifiers = function(state) { + var modifiers = ""; + var ch = 0; + while ((ch = state.current()) !== -1 && isRegularExpressionModifier2(ch)) { + modifiers += codePointToString2(ch); + state.advance(); + } + return modifiers; + }; + function isRegularExpressionModifier2(ch) { + return ch === 105 || ch === 109 || ch === 115; + } + pp$12.regexp_eatExtendedAtom = function(state) { + return state.eat( + 46 + /* . */ + ) || this.regexp_eatReverseSolidusAtomEscape(state) || this.regexp_eatCharacterClass(state) || this.regexp_eatUncapturingGroup(state) || this.regexp_eatCapturingGroup(state) || this.regexp_eatInvalidBracedQuantifier(state) || this.regexp_eatExtendedPatternCharacter(state); + }; + pp$12.regexp_eatInvalidBracedQuantifier = function(state) { + if (this.regexp_eatBracedQuantifier(state, true)) { + state.raise("Nothing to repeat"); + } + return false; + }; + pp$12.regexp_eatSyntaxCharacter = function(state) { + var ch = state.current(); + if (isSyntaxCharacter2(ch)) { + state.lastIntValue = ch; + state.advance(); + return true; + } + return false; + }; + function isSyntaxCharacter2(ch) { + return ch === 36 || ch >= 40 && ch <= 43 || ch === 46 || ch === 63 || ch >= 91 && ch <= 94 || ch >= 123 && ch <= 125; + } + pp$12.regexp_eatPatternCharacters = function(state) { + var start2 = state.pos; + var ch = 0; + while ((ch = state.current()) !== -1 && !isSyntaxCharacter2(ch)) { + state.advance(); + } + return state.pos !== start2; + }; + pp$12.regexp_eatExtendedPatternCharacter = function(state) { + var ch = state.current(); + if (ch !== -1 && ch !== 36 && !(ch >= 40 && ch <= 43) && ch !== 46 && ch !== 63 && ch !== 91 && ch !== 94 && ch !== 124) { + state.advance(); + return true; + } + return false; + }; + pp$12.regexp_groupSpecifier = function(state) { + if (state.eat( + 63 + /* ? */ + )) { + if (!this.regexp_eatGroupName(state)) { + state.raise("Invalid group"); + } + var trackDisjunction = this.options.ecmaVersion >= 16; + var known = state.groupNames[state.lastStringValue]; + if (known) { + if (trackDisjunction) { + for (var i2 = 0, list5 = known; i2 < list5.length; i2 += 1) { + var altID = list5[i2]; + if (!altID.separatedFrom(state.branchID)) { + state.raise("Duplicate capture group name"); + } + } + } else { + state.raise("Duplicate capture group name"); + } + } + if (trackDisjunction) { + (known || (state.groupNames[state.lastStringValue] = [])).push(state.branchID); + } else { + state.groupNames[state.lastStringValue] = true; + } + } + }; + pp$12.regexp_eatGroupName = function(state) { + state.lastStringValue = ""; + if (state.eat( + 60 + /* < */ + )) { + if (this.regexp_eatRegExpIdentifierName(state) && state.eat( + 62 + /* > */ + )) { + return true; + } + state.raise("Invalid capture group name"); + } + return false; + }; + pp$12.regexp_eatRegExpIdentifierName = function(state) { + state.lastStringValue = ""; + if (this.regexp_eatRegExpIdentifierStart(state)) { + state.lastStringValue += codePointToString2(state.lastIntValue); + while (this.regexp_eatRegExpIdentifierPart(state)) { + state.lastStringValue += codePointToString2(state.lastIntValue); + } + return true; + } + return false; + }; + pp$12.regexp_eatRegExpIdentifierStart = function(state) { + var start2 = state.pos; + var forceU = this.options.ecmaVersion >= 11; + var ch = state.current(forceU); + state.advance(forceU); + if (ch === 92 && this.regexp_eatRegExpUnicodeEscapeSequence(state, forceU)) { + ch = state.lastIntValue; + } + if (isRegExpIdentifierStart2(ch)) { + state.lastIntValue = ch; + return true; + } + state.pos = start2; + return false; + }; + function isRegExpIdentifierStart2(ch) { + return isIdentifierStart2(ch, true) || ch === 36 || ch === 95; + } + pp$12.regexp_eatRegExpIdentifierPart = function(state) { + var start2 = state.pos; + var forceU = this.options.ecmaVersion >= 11; + var ch = state.current(forceU); + state.advance(forceU); + if (ch === 92 && this.regexp_eatRegExpUnicodeEscapeSequence(state, forceU)) { + ch = state.lastIntValue; + } + if (isRegExpIdentifierPart2(ch)) { + state.lastIntValue = ch; + return true; + } + state.pos = start2; + return false; + }; + function isRegExpIdentifierPart2(ch) { + return isIdentifierChar2(ch, true) || ch === 36 || ch === 95 || ch === 8204 || ch === 8205; + } + pp$12.regexp_eatAtomEscape = function(state) { + if (this.regexp_eatBackReference(state) || this.regexp_eatCharacterClassEscape(state) || this.regexp_eatCharacterEscape(state) || state.switchN && this.regexp_eatKGroupName(state)) { + return true; + } + if (state.switchU) { + if (state.current() === 99) { + state.raise("Invalid unicode escape"); + } + state.raise("Invalid escape"); + } + return false; + }; + pp$12.regexp_eatBackReference = function(state) { + var start2 = state.pos; + if (this.regexp_eatDecimalEscape(state)) { + var n = state.lastIntValue; + if (state.switchU) { + if (n > state.maxBackReference) { + state.maxBackReference = n; + } + return true; + } + if (n <= state.numCapturingParens) { + return true; + } + state.pos = start2; + } + return false; + }; + pp$12.regexp_eatKGroupName = function(state) { + if (state.eat( + 107 + /* k */ + )) { + if (this.regexp_eatGroupName(state)) { + state.backReferenceNames.push(state.lastStringValue); + return true; + } + state.raise("Invalid named reference"); + } + return false; + }; + pp$12.regexp_eatCharacterEscape = function(state) { + return this.regexp_eatControlEscape(state) || this.regexp_eatCControlLetter(state) || this.regexp_eatZero(state) || this.regexp_eatHexEscapeSequence(state) || this.regexp_eatRegExpUnicodeEscapeSequence(state, false) || !state.switchU && this.regexp_eatLegacyOctalEscapeSequence(state) || this.regexp_eatIdentityEscape(state); + }; + pp$12.regexp_eatCControlLetter = function(state) { + var start2 = state.pos; + if (state.eat( + 99 + /* c */ + )) { + if (this.regexp_eatControlLetter(state)) { + return true; + } + state.pos = start2; + } + return false; + }; + pp$12.regexp_eatZero = function(state) { + if (state.current() === 48 && !isDecimalDigit2(state.lookahead())) { + state.lastIntValue = 0; + state.advance(); + return true; + } + return false; + }; + pp$12.regexp_eatControlEscape = function(state) { + var ch = state.current(); + if (ch === 116) { + state.lastIntValue = 9; + state.advance(); + return true; + } + if (ch === 110) { + state.lastIntValue = 10; + state.advance(); + return true; + } + if (ch === 118) { + state.lastIntValue = 11; + state.advance(); + return true; + } + if (ch === 102) { + state.lastIntValue = 12; + state.advance(); + return true; + } + if (ch === 114) { + state.lastIntValue = 13; + state.advance(); + return true; + } + return false; + }; + pp$12.regexp_eatControlLetter = function(state) { + var ch = state.current(); + if (isControlLetter2(ch)) { + state.lastIntValue = ch % 32; + state.advance(); + return true; + } + return false; + }; + function isControlLetter2(ch) { + return ch >= 65 && ch <= 90 || ch >= 97 && ch <= 122; + } + pp$12.regexp_eatRegExpUnicodeEscapeSequence = function(state, forceU) { + if (forceU === void 0) forceU = false; + var start2 = state.pos; + var switchU = forceU || state.switchU; + if (state.eat( + 117 + /* u */ + )) { + if (this.regexp_eatFixedHexDigits(state, 4)) { + var lead = state.lastIntValue; + if (switchU && lead >= 55296 && lead <= 56319) { + var leadSurrogateEnd = state.pos; + if (state.eat( + 92 + /* \ */ + ) && state.eat( + 117 + /* u */ + ) && this.regexp_eatFixedHexDigits(state, 4)) { + var trail2 = state.lastIntValue; + if (trail2 >= 56320 && trail2 <= 57343) { + state.lastIntValue = (lead - 55296) * 1024 + (trail2 - 56320) + 65536; + return true; + } + } + state.pos = leadSurrogateEnd; + state.lastIntValue = lead; + } + return true; + } + if (switchU && state.eat( + 123 + /* { */ + ) && this.regexp_eatHexDigits(state) && state.eat( + 125 + /* } */ + ) && isValidUnicode2(state.lastIntValue)) { + return true; + } + if (switchU) { + state.raise("Invalid unicode escape"); + } + state.pos = start2; + } + return false; + }; + function isValidUnicode2(ch) { + return ch >= 0 && ch <= 1114111; + } + pp$12.regexp_eatIdentityEscape = function(state) { + if (state.switchU) { + if (this.regexp_eatSyntaxCharacter(state)) { + return true; + } + if (state.eat( + 47 + /* / */ + )) { + state.lastIntValue = 47; + return true; + } + return false; + } + var ch = state.current(); + if (ch !== 99 && (!state.switchN || ch !== 107)) { + state.lastIntValue = ch; + state.advance(); + return true; + } + return false; + }; + pp$12.regexp_eatDecimalEscape = function(state) { + state.lastIntValue = 0; + var ch = state.current(); + if (ch >= 49 && ch <= 57) { + do { + state.lastIntValue = 10 * state.lastIntValue + (ch - 48); + state.advance(); + } while ((ch = state.current()) >= 48 && ch <= 57); + return true; + } + return false; + }; + var CharSetNone2 = 0; + var CharSetOk2 = 1; + var CharSetString2 = 2; + pp$12.regexp_eatCharacterClassEscape = function(state) { + var ch = state.current(); + if (isCharacterClassEscape2(ch)) { + state.lastIntValue = -1; + state.advance(); + return CharSetOk2; + } + var negate = false; + if (state.switchU && this.options.ecmaVersion >= 9 && ((negate = ch === 80) || ch === 112)) { + state.lastIntValue = -1; + state.advance(); + var result; + if (state.eat( + 123 + /* { */ + ) && (result = this.regexp_eatUnicodePropertyValueExpression(state)) && state.eat( + 125 + /* } */ + )) { + if (negate && result === CharSetString2) { + state.raise("Invalid property name"); + } + return result; + } + state.raise("Invalid property name"); + } + return CharSetNone2; + }; + function isCharacterClassEscape2(ch) { + return ch === 100 || ch === 68 || ch === 115 || ch === 83 || ch === 119 || ch === 87; + } + pp$12.regexp_eatUnicodePropertyValueExpression = function(state) { + var start2 = state.pos; + if (this.regexp_eatUnicodePropertyName(state) && state.eat( + 61 + /* = */ + )) { + var name2 = state.lastStringValue; + if (this.regexp_eatUnicodePropertyValue(state)) { + var value = state.lastStringValue; + this.regexp_validateUnicodePropertyNameAndValue(state, name2, value); + return CharSetOk2; + } + } + state.pos = start2; + if (this.regexp_eatLoneUnicodePropertyNameOrValue(state)) { + var nameOrValue = state.lastStringValue; + return this.regexp_validateUnicodePropertyNameOrValue(state, nameOrValue); + } + return CharSetNone2; + }; + pp$12.regexp_validateUnicodePropertyNameAndValue = function(state, name2, value) { + if (!hasOwn2(state.unicodeProperties.nonBinary, name2)) { + state.raise("Invalid property name"); + } + if (!state.unicodeProperties.nonBinary[name2].test(value)) { + state.raise("Invalid property value"); + } + }; + pp$12.regexp_validateUnicodePropertyNameOrValue = function(state, nameOrValue) { + if (state.unicodeProperties.binary.test(nameOrValue)) { + return CharSetOk2; + } + if (state.switchV && state.unicodeProperties.binaryOfStrings.test(nameOrValue)) { + return CharSetString2; + } + state.raise("Invalid property name"); + }; + pp$12.regexp_eatUnicodePropertyName = function(state) { + var ch = 0; + state.lastStringValue = ""; + while (isUnicodePropertyNameCharacter2(ch = state.current())) { + state.lastStringValue += codePointToString2(ch); + state.advance(); + } + return state.lastStringValue !== ""; + }; + function isUnicodePropertyNameCharacter2(ch) { + return isControlLetter2(ch) || ch === 95; + } + pp$12.regexp_eatUnicodePropertyValue = function(state) { + var ch = 0; + state.lastStringValue = ""; + while (isUnicodePropertyValueCharacter2(ch = state.current())) { + state.lastStringValue += codePointToString2(ch); + state.advance(); + } + return state.lastStringValue !== ""; + }; + function isUnicodePropertyValueCharacter2(ch) { + return isUnicodePropertyNameCharacter2(ch) || isDecimalDigit2(ch); + } + pp$12.regexp_eatLoneUnicodePropertyNameOrValue = function(state) { + return this.regexp_eatUnicodePropertyValue(state); + }; + pp$12.regexp_eatCharacterClass = function(state) { + if (state.eat( + 91 + /* [ */ + )) { + var negate = state.eat( + 94 + /* ^ */ + ); + var result = this.regexp_classContents(state); + if (!state.eat( + 93 + /* ] */ + )) { + state.raise("Unterminated character class"); + } + if (negate && result === CharSetString2) { + state.raise("Negated character class may contain strings"); + } + return true; + } + return false; + }; + pp$12.regexp_classContents = function(state) { + if (state.current() === 93) { + return CharSetOk2; + } + if (state.switchV) { + return this.regexp_classSetExpression(state); + } + this.regexp_nonEmptyClassRanges(state); + return CharSetOk2; + }; + pp$12.regexp_nonEmptyClassRanges = function(state) { + while (this.regexp_eatClassAtom(state)) { + var left = state.lastIntValue; + if (state.eat( + 45 + /* - */ + ) && this.regexp_eatClassAtom(state)) { + var right = state.lastIntValue; + if (state.switchU && (left === -1 || right === -1)) { + state.raise("Invalid character class"); + } + if (left !== -1 && right !== -1 && left > right) { + state.raise("Range out of order in character class"); + } + } + } + }; + pp$12.regexp_eatClassAtom = function(state) { + var start2 = state.pos; + if (state.eat( + 92 + /* \ */ + )) { + if (this.regexp_eatClassEscape(state)) { + return true; + } + if (state.switchU) { + var ch$1 = state.current(); + if (ch$1 === 99 || isOctalDigit2(ch$1)) { + state.raise("Invalid class escape"); + } + state.raise("Invalid escape"); + } + state.pos = start2; + } + var ch = state.current(); + if (ch !== 93) { + state.lastIntValue = ch; + state.advance(); + return true; + } + return false; + }; + pp$12.regexp_eatClassEscape = function(state) { + var start2 = state.pos; + if (state.eat( + 98 + /* b */ + )) { + state.lastIntValue = 8; + return true; + } + if (state.switchU && state.eat( + 45 + /* - */ + )) { + state.lastIntValue = 45; + return true; + } + if (!state.switchU && state.eat( + 99 + /* c */ + )) { + if (this.regexp_eatClassControlLetter(state)) { + return true; + } + state.pos = start2; + } + return this.regexp_eatCharacterClassEscape(state) || this.regexp_eatCharacterEscape(state); + }; + pp$12.regexp_classSetExpression = function(state) { + var result = CharSetOk2, subResult; + if (this.regexp_eatClassSetRange(state)) ; + else if (subResult = this.regexp_eatClassSetOperand(state)) { + if (subResult === CharSetString2) { + result = CharSetString2; + } + var start2 = state.pos; + while (state.eatChars( + [38, 38] + /* && */ + )) { + if (state.current() !== 38 && (subResult = this.regexp_eatClassSetOperand(state))) { + if (subResult !== CharSetString2) { + result = CharSetOk2; + } + continue; + } + state.raise("Invalid character in character class"); + } + if (start2 !== state.pos) { + return result; + } + while (state.eatChars( + [45, 45] + /* -- */ + )) { + if (this.regexp_eatClassSetOperand(state)) { + continue; + } + state.raise("Invalid character in character class"); + } + if (start2 !== state.pos) { + return result; + } + } else { + state.raise("Invalid character in character class"); + } + for (; ; ) { + if (this.regexp_eatClassSetRange(state)) { + continue; + } + subResult = this.regexp_eatClassSetOperand(state); + if (!subResult) { + return result; + } + if (subResult === CharSetString2) { + result = CharSetString2; + } + } + }; + pp$12.regexp_eatClassSetRange = function(state) { + var start2 = state.pos; + if (this.regexp_eatClassSetCharacter(state)) { + var left = state.lastIntValue; + if (state.eat( + 45 + /* - */ + ) && this.regexp_eatClassSetCharacter(state)) { + var right = state.lastIntValue; + if (left !== -1 && right !== -1 && left > right) { + state.raise("Range out of order in character class"); + } + return true; + } + state.pos = start2; + } + return false; + }; + pp$12.regexp_eatClassSetOperand = function(state) { + if (this.regexp_eatClassSetCharacter(state)) { + return CharSetOk2; + } + return this.regexp_eatClassStringDisjunction(state) || this.regexp_eatNestedClass(state); + }; + pp$12.regexp_eatNestedClass = function(state) { + var start2 = state.pos; + if (state.eat( + 91 + /* [ */ + )) { + var negate = state.eat( + 94 + /* ^ */ + ); + var result = this.regexp_classContents(state); + if (state.eat( + 93 + /* ] */ + )) { + if (negate && result === CharSetString2) { + state.raise("Negated character class may contain strings"); + } + return result; + } + state.pos = start2; + } + if (state.eat( + 92 + /* \ */ + )) { + var result$1 = this.regexp_eatCharacterClassEscape(state); + if (result$1) { + return result$1; + } + state.pos = start2; + } + return null; + }; + pp$12.regexp_eatClassStringDisjunction = function(state) { + var start2 = state.pos; + if (state.eatChars( + [92, 113] + /* \q */ + )) { + if (state.eat( + 123 + /* { */ + )) { + var result = this.regexp_classStringDisjunctionContents(state); + if (state.eat( + 125 + /* } */ + )) { + return result; + } + } else { + state.raise("Invalid escape"); + } + state.pos = start2; + } + return null; + }; + pp$12.regexp_classStringDisjunctionContents = function(state) { + var result = this.regexp_classString(state); + while (state.eat( + 124 + /* | */ + )) { + if (this.regexp_classString(state) === CharSetString2) { + result = CharSetString2; + } + } + return result; + }; + pp$12.regexp_classString = function(state) { + var count = 0; + while (this.regexp_eatClassSetCharacter(state)) { + count++; + } + return count === 1 ? CharSetOk2 : CharSetString2; + }; + pp$12.regexp_eatClassSetCharacter = function(state) { + var start2 = state.pos; + if (state.eat( + 92 + /* \ */ + )) { + if (this.regexp_eatCharacterEscape(state) || this.regexp_eatClassSetReservedPunctuator(state)) { + return true; + } + if (state.eat( + 98 + /* b */ + )) { + state.lastIntValue = 8; + return true; + } + state.pos = start2; + return false; + } + var ch = state.current(); + if (ch < 0 || ch === state.lookahead() && isClassSetReservedDoublePunctuatorCharacter2(ch)) { + return false; + } + if (isClassSetSyntaxCharacter2(ch)) { + return false; + } + state.advance(); + state.lastIntValue = ch; + return true; + }; + function isClassSetReservedDoublePunctuatorCharacter2(ch) { + return ch === 33 || ch >= 35 && ch <= 38 || ch >= 42 && ch <= 44 || ch === 46 || ch >= 58 && ch <= 64 || ch === 94 || ch === 96 || ch === 126; + } + function isClassSetSyntaxCharacter2(ch) { + return ch === 40 || ch === 41 || ch === 45 || ch === 47 || ch >= 91 && ch <= 93 || ch >= 123 && ch <= 125; + } + pp$12.regexp_eatClassSetReservedPunctuator = function(state) { + var ch = state.current(); + if (isClassSetReservedPunctuator2(ch)) { + state.lastIntValue = ch; + state.advance(); + return true; + } + return false; + }; + function isClassSetReservedPunctuator2(ch) { + return ch === 33 || ch === 35 || ch === 37 || ch === 38 || ch === 44 || ch === 45 || ch >= 58 && ch <= 62 || ch === 64 || ch === 96 || ch === 126; + } + pp$12.regexp_eatClassControlLetter = function(state) { + var ch = state.current(); + if (isDecimalDigit2(ch) || ch === 95) { + state.lastIntValue = ch % 32; + state.advance(); + return true; + } + return false; + }; + pp$12.regexp_eatHexEscapeSequence = function(state) { + var start2 = state.pos; + if (state.eat( + 120 + /* x */ + )) { + if (this.regexp_eatFixedHexDigits(state, 2)) { + return true; + } + if (state.switchU) { + state.raise("Invalid escape"); + } + state.pos = start2; + } + return false; + }; + pp$12.regexp_eatDecimalDigits = function(state) { + var start2 = state.pos; + var ch = 0; + state.lastIntValue = 0; + while (isDecimalDigit2(ch = state.current())) { + state.lastIntValue = 10 * state.lastIntValue + (ch - 48); + state.advance(); + } + return state.pos !== start2; + }; + function isDecimalDigit2(ch) { + return ch >= 48 && ch <= 57; + } + pp$12.regexp_eatHexDigits = function(state) { + var start2 = state.pos; + var ch = 0; + state.lastIntValue = 0; + while (isHexDigit2(ch = state.current())) { + state.lastIntValue = 16 * state.lastIntValue + hexToInt2(ch); + state.advance(); + } + return state.pos !== start2; + }; + function isHexDigit2(ch) { + return ch >= 48 && ch <= 57 || ch >= 65 && ch <= 70 || ch >= 97 && ch <= 102; + } + function hexToInt2(ch) { + if (ch >= 65 && ch <= 70) { + return 10 + (ch - 65); + } + if (ch >= 97 && ch <= 102) { + return 10 + (ch - 97); + } + return ch - 48; + } + pp$12.regexp_eatLegacyOctalEscapeSequence = function(state) { + if (this.regexp_eatOctalDigit(state)) { + var n1 = state.lastIntValue; + if (this.regexp_eatOctalDigit(state)) { + var n2 = state.lastIntValue; + if (n1 <= 3 && this.regexp_eatOctalDigit(state)) { + state.lastIntValue = n1 * 64 + n2 * 8 + state.lastIntValue; + } else { + state.lastIntValue = n1 * 8 + n2; + } + } else { + state.lastIntValue = n1; + } + return true; + } + return false; + }; + pp$12.regexp_eatOctalDigit = function(state) { + var ch = state.current(); + if (isOctalDigit2(ch)) { + state.lastIntValue = ch - 48; + state.advance(); + return true; + } + state.lastIntValue = 0; + return false; + }; + function isOctalDigit2(ch) { + return ch >= 48 && ch <= 55; + } + pp$12.regexp_eatFixedHexDigits = function(state, length) { + var start2 = state.pos; + state.lastIntValue = 0; + for (var i2 = 0; i2 < length; ++i2) { + var ch = state.current(); + if (!isHexDigit2(ch)) { + state.pos = start2; + return false; + } + state.lastIntValue = 16 * state.lastIntValue + hexToInt2(ch); + state.advance(); + } + return true; + }; + var Token3 = function Token4(p) { + this.type = p.type; + this.value = p.value; + this.start = p.start; + this.end = p.end; + if (p.options.locations) { + this.loc = new SourceLocation3(p, p.startLoc, p.endLoc); + } + if (p.options.ranges) { + this.range = [p.start, p.end]; + } + }; + var pp2 = Parser3.prototype; + pp2.next = function(ignoreEscapeSequenceInKeyword) { + if (!ignoreEscapeSequenceInKeyword && this.type.keyword && this.containsEsc) { + this.raiseRecoverable(this.start, "Escape sequence in keyword " + this.type.keyword); + } + if (this.options.onToken) { + this.options.onToken(new Token3(this)); + } + this.lastTokEnd = this.end; + this.lastTokStart = this.start; + this.lastTokEndLoc = this.endLoc; + this.lastTokStartLoc = this.startLoc; + this.nextToken(); + }; + pp2.getToken = function() { + this.next(); + return new Token3(this); + }; + if (typeof Symbol !== "undefined") { + pp2[Symbol.iterator] = function() { + var this$1$1 = this; + return { + next: function() { + var token = this$1$1.getToken(); + return { + done: token.type === types$12.eof, + value: token + }; + } + }; + }; + } + pp2.nextToken = function() { + var curContext = this.curContext(); + if (!curContext || !curContext.preserveSpace) { + this.skipSpace(); + } + this.start = this.pos; + if (this.options.locations) { + this.startLoc = this.curPosition(); + } + if (this.pos >= this.input.length) { + return this.finishToken(types$12.eof); + } + if (curContext.override) { + return curContext.override(this); + } else { + this.readToken(this.fullCharCodeAtPos()); + } + }; + pp2.readToken = function(code4) { + if (isIdentifierStart2(code4, this.options.ecmaVersion >= 6) || code4 === 92) { + return this.readWord(); + } + return this.getTokenFromCode(code4); + }; + pp2.fullCharCodeAt = function(pos) { + var code4 = this.input.charCodeAt(pos); + if (code4 <= 55295 || code4 >= 56320) { + return code4; + } + var next = this.input.charCodeAt(pos + 1); + return next <= 56319 || next >= 57344 ? code4 : (code4 << 10) + next - 56613888; + }; + pp2.fullCharCodeAtPos = function() { + return this.fullCharCodeAt(this.pos); + }; + pp2.skipBlockComment = function() { + var startLoc = this.options.onComment && this.curPosition(); + var start2 = this.pos, end = this.input.indexOf("*/", this.pos += 2); + if (end === -1) { + this.raise(this.pos - 2, "Unterminated comment"); + } + this.pos = end + 2; + if (this.options.locations) { + for (var nextBreak = void 0, pos = start2; (nextBreak = nextLineBreak2(this.input, pos, this.pos)) > -1; ) { + ++this.curLine; + pos = this.lineStart = nextBreak; + } + } + if (this.options.onComment) { + this.options.onComment( + true, + this.input.slice(start2 + 2, end), + start2, + this.pos, + startLoc, + this.curPosition() + ); + } + }; + pp2.skipLineComment = function(startSkip) { + var start2 = this.pos; + var startLoc = this.options.onComment && this.curPosition(); + var ch = this.input.charCodeAt(this.pos += startSkip); + while (this.pos < this.input.length && !isNewLine2(ch)) { + ch = this.input.charCodeAt(++this.pos); + } + if (this.options.onComment) { + this.options.onComment( + false, + this.input.slice(start2 + startSkip, this.pos), + start2, + this.pos, + startLoc, + this.curPosition() + ); + } + }; + pp2.skipSpace = function() { + loop: while (this.pos < this.input.length) { + var ch = this.input.charCodeAt(this.pos); + switch (ch) { + case 32: + case 160: + ++this.pos; + break; + case 13: + if (this.input.charCodeAt(this.pos + 1) === 10) { + ++this.pos; + } + case 10: + case 8232: + case 8233: + ++this.pos; + if (this.options.locations) { + ++this.curLine; + this.lineStart = this.pos; + } + break; + case 47: + switch (this.input.charCodeAt(this.pos + 1)) { + case 42: + this.skipBlockComment(); + break; + case 47: + this.skipLineComment(2); + break; + default: + break loop; + } + break; + default: + if (ch > 8 && ch < 14 || ch >= 5760 && nonASCIIwhitespace2.test(String.fromCharCode(ch))) { + ++this.pos; + } else { + break loop; + } + } + } + }; + pp2.finishToken = function(type, val) { + this.end = this.pos; + if (this.options.locations) { + this.endLoc = this.curPosition(); + } + var prevType = this.type; + this.type = type; + this.value = val; + this.updateContext(prevType); + }; + pp2.readToken_dot = function() { + var next = this.input.charCodeAt(this.pos + 1); + if (next >= 48 && next <= 57) { + return this.readNumber(true); + } + var next2 = this.input.charCodeAt(this.pos + 2); + if (this.options.ecmaVersion >= 6 && next === 46 && next2 === 46) { + this.pos += 3; + return this.finishToken(types$12.ellipsis); + } else { + ++this.pos; + return this.finishToken(types$12.dot); + } + }; + pp2.readToken_slash = function() { + var next = this.input.charCodeAt(this.pos + 1); + if (this.exprAllowed) { + ++this.pos; + return this.readRegexp(); + } + if (next === 61) { + return this.finishOp(types$12.assign, 2); + } + return this.finishOp(types$12.slash, 1); + }; + pp2.readToken_mult_modulo_exp = function(code4) { + var next = this.input.charCodeAt(this.pos + 1); + var size = 1; + var tokentype = code4 === 42 ? types$12.star : types$12.modulo; + if (this.options.ecmaVersion >= 7 && code4 === 42 && next === 42) { + ++size; + tokentype = types$12.starstar; + next = this.input.charCodeAt(this.pos + 2); + } + if (next === 61) { + return this.finishOp(types$12.assign, size + 1); + } + return this.finishOp(tokentype, size); + }; + pp2.readToken_pipe_amp = function(code4) { + var next = this.input.charCodeAt(this.pos + 1); + if (next === code4) { + if (this.options.ecmaVersion >= 12) { + var next2 = this.input.charCodeAt(this.pos + 2); + if (next2 === 61) { + return this.finishOp(types$12.assign, 3); + } + } + return this.finishOp(code4 === 124 ? types$12.logicalOR : types$12.logicalAND, 2); + } + if (next === 61) { + return this.finishOp(types$12.assign, 2); + } + return this.finishOp(code4 === 124 ? types$12.bitwiseOR : types$12.bitwiseAND, 1); + }; + pp2.readToken_caret = function() { + var next = this.input.charCodeAt(this.pos + 1); + if (next === 61) { + return this.finishOp(types$12.assign, 2); + } + return this.finishOp(types$12.bitwiseXOR, 1); + }; + pp2.readToken_plus_min = function(code4) { + var next = this.input.charCodeAt(this.pos + 1); + if (next === code4) { + if (next === 45 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 62 && (this.lastTokEnd === 0 || lineBreak2.test(this.input.slice(this.lastTokEnd, this.pos)))) { + this.skipLineComment(3); + this.skipSpace(); + return this.nextToken(); + } + return this.finishOp(types$12.incDec, 2); + } + if (next === 61) { + return this.finishOp(types$12.assign, 2); + } + return this.finishOp(types$12.plusMin, 1); + }; + pp2.readToken_lt_gt = function(code4) { + var next = this.input.charCodeAt(this.pos + 1); + var size = 1; + if (next === code4) { + size = code4 === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2; + if (this.input.charCodeAt(this.pos + size) === 61) { + return this.finishOp(types$12.assign, size + 1); + } + return this.finishOp(types$12.bitShift, size); + } + if (next === 33 && code4 === 60 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 45 && this.input.charCodeAt(this.pos + 3) === 45) { + this.skipLineComment(4); + this.skipSpace(); + return this.nextToken(); + } + if (next === 61) { + size = 2; + } + return this.finishOp(types$12.relational, size); + }; + pp2.readToken_eq_excl = function(code4) { + var next = this.input.charCodeAt(this.pos + 1); + if (next === 61) { + return this.finishOp(types$12.equality, this.input.charCodeAt(this.pos + 2) === 61 ? 3 : 2); + } + if (code4 === 61 && next === 62 && this.options.ecmaVersion >= 6) { + this.pos += 2; + return this.finishToken(types$12.arrow); + } + return this.finishOp(code4 === 61 ? types$12.eq : types$12.prefix, 1); + }; + pp2.readToken_question = function() { + var ecmaVersion2 = this.options.ecmaVersion; + if (ecmaVersion2 >= 11) { + var next = this.input.charCodeAt(this.pos + 1); + if (next === 46) { + var next2 = this.input.charCodeAt(this.pos + 2); + if (next2 < 48 || next2 > 57) { + return this.finishOp(types$12.questionDot, 2); + } + } + if (next === 63) { + if (ecmaVersion2 >= 12) { + var next2$1 = this.input.charCodeAt(this.pos + 2); + if (next2$1 === 61) { + return this.finishOp(types$12.assign, 3); + } + } + return this.finishOp(types$12.coalesce, 2); + } + } + return this.finishOp(types$12.question, 1); + }; + pp2.readToken_numberSign = function() { + var ecmaVersion2 = this.options.ecmaVersion; + var code4 = 35; + if (ecmaVersion2 >= 13) { + ++this.pos; + code4 = this.fullCharCodeAtPos(); + if (isIdentifierStart2(code4, true) || code4 === 92) { + return this.finishToken(types$12.privateId, this.readWord1()); + } + } + this.raise(this.pos, "Unexpected character '" + codePointToString2(code4) + "'"); + }; + pp2.getTokenFromCode = function(code4) { + switch (code4) { + // The interpretation of a dot depends on whether it is followed + // by a digit or another two dots. + case 46: + return this.readToken_dot(); + // Punctuation tokens. + case 40: + ++this.pos; + return this.finishToken(types$12.parenL); + case 41: + ++this.pos; + return this.finishToken(types$12.parenR); + case 59: + ++this.pos; + return this.finishToken(types$12.semi); + case 44: + ++this.pos; + return this.finishToken(types$12.comma); + case 91: + ++this.pos; + return this.finishToken(types$12.bracketL); + case 93: + ++this.pos; + return this.finishToken(types$12.bracketR); + case 123: + ++this.pos; + return this.finishToken(types$12.braceL); + case 125: + ++this.pos; + return this.finishToken(types$12.braceR); + case 58: + ++this.pos; + return this.finishToken(types$12.colon); + case 96: + if (this.options.ecmaVersion < 6) { + break; + } + ++this.pos; + return this.finishToken(types$12.backQuote); + case 48: + var next = this.input.charCodeAt(this.pos + 1); + if (next === 120 || next === 88) { + return this.readRadixNumber(16); + } + if (this.options.ecmaVersion >= 6) { + if (next === 111 || next === 79) { + return this.readRadixNumber(8); + } + if (next === 98 || next === 66) { + return this.readRadixNumber(2); + } + } + // Anything else beginning with a digit is an integer, octal + // number, or float. + case 49: + case 50: + case 51: + case 52: + case 53: + case 54: + case 55: + case 56: + case 57: + return this.readNumber(false); + // Quotes produce strings. + case 34: + case 39: + return this.readString(code4); + // Operators are parsed inline in tiny state machines. '=' (61) is + // often referred to. `finishOp` simply skips the amount of + // characters it is given as second argument, and returns a token + // of the type given by its first argument. + case 47: + return this.readToken_slash(); + case 37: + case 42: + return this.readToken_mult_modulo_exp(code4); + case 124: + case 38: + return this.readToken_pipe_amp(code4); + case 94: + return this.readToken_caret(); + case 43: + case 45: + return this.readToken_plus_min(code4); + case 60: + case 62: + return this.readToken_lt_gt(code4); + case 61: + case 33: + return this.readToken_eq_excl(code4); + case 63: + return this.readToken_question(); + case 126: + return this.finishOp(types$12.prefix, 1); + case 35: + return this.readToken_numberSign(); + } + this.raise(this.pos, "Unexpected character '" + codePointToString2(code4) + "'"); + }; + pp2.finishOp = function(type, size) { + var str2 = this.input.slice(this.pos, this.pos + size); + this.pos += size; + return this.finishToken(type, str2); + }; + pp2.readRegexp = function() { + var escaped, inClass, start2 = this.pos; + for (; ; ) { + if (this.pos >= this.input.length) { + this.raise(start2, "Unterminated regular expression"); + } + var ch = this.input.charAt(this.pos); + if (lineBreak2.test(ch)) { + this.raise(start2, "Unterminated regular expression"); + } + if (!escaped) { + if (ch === "[") { + inClass = true; + } else if (ch === "]" && inClass) { + inClass = false; + } else if (ch === "/" && !inClass) { + break; + } + escaped = ch === "\\"; + } else { + escaped = false; + } + ++this.pos; + } + var pattern = this.input.slice(start2, this.pos); + ++this.pos; + var flagsStart = this.pos; + var flags = this.readWord1(); + if (this.containsEsc) { + this.unexpected(flagsStart); + } + var state = this.regexpState || (this.regexpState = new RegExpValidationState3(this)); + state.reset(start2, pattern, flags); + this.validateRegExpFlags(state); + this.validateRegExpPattern(state); + var value = null; + try { + value = new RegExp(pattern, flags); + } catch (e) { + } + return this.finishToken(types$12.regexp, { pattern, flags, value }); + }; + pp2.readInt = function(radix, len, maybeLegacyOctalNumericLiteral) { + var allowSeparators = this.options.ecmaVersion >= 12 && len === void 0; + var isLegacyOctalNumericLiteral = maybeLegacyOctalNumericLiteral && this.input.charCodeAt(this.pos) === 48; + var start2 = this.pos, total = 0, lastCode = 0; + for (var i2 = 0, e = len == null ? Infinity : len; i2 < e; ++i2, ++this.pos) { + var code4 = this.input.charCodeAt(this.pos), val = void 0; + if (allowSeparators && code4 === 95) { + if (isLegacyOctalNumericLiteral) { + this.raiseRecoverable(this.pos, "Numeric separator is not allowed in legacy octal numeric literals"); + } + if (lastCode === 95) { + this.raiseRecoverable(this.pos, "Numeric separator must be exactly one underscore"); + } + if (i2 === 0) { + this.raiseRecoverable(this.pos, "Numeric separator is not allowed at the first of digits"); + } + lastCode = code4; + continue; + } + if (code4 >= 97) { + val = code4 - 97 + 10; + } else if (code4 >= 65) { + val = code4 - 65 + 10; + } else if (code4 >= 48 && code4 <= 57) { + val = code4 - 48; + } else { + val = Infinity; + } + if (val >= radix) { + break; + } + lastCode = code4; + total = total * radix + val; + } + if (allowSeparators && lastCode === 95) { + this.raiseRecoverable(this.pos - 1, "Numeric separator is not allowed at the last of digits"); + } + if (this.pos === start2 || len != null && this.pos - start2 !== len) { + return null; + } + return total; + }; + function stringToNumber2(str2, isLegacyOctalNumericLiteral) { + if (isLegacyOctalNumericLiteral) { + return parseInt(str2, 8); + } + return parseFloat(str2.replace(/_/g, "")); + } + function stringToBigInt2(str2) { + if (typeof BigInt !== "function") { + return null; + } + return BigInt(str2.replace(/_/g, "")); + } + pp2.readRadixNumber = function(radix) { + var start2 = this.pos; + this.pos += 2; + var val = this.readInt(radix); + if (val == null) { + this.raise(this.start + 2, "Expected number in radix " + radix); + } + if (this.options.ecmaVersion >= 11 && this.input.charCodeAt(this.pos) === 110) { + val = stringToBigInt2(this.input.slice(start2, this.pos)); + ++this.pos; + } else if (isIdentifierStart2(this.fullCharCodeAtPos())) { + this.raise(this.pos, "Identifier directly after number"); + } + return this.finishToken(types$12.num, val); + }; + pp2.readNumber = function(startsWithDot) { + var start2 = this.pos; + if (!startsWithDot && this.readInt(10, void 0, true) === null) { + this.raise(start2, "Invalid number"); + } + var octal = this.pos - start2 >= 2 && this.input.charCodeAt(start2) === 48; + if (octal && this.strict) { + this.raise(start2, "Invalid number"); + } + var next = this.input.charCodeAt(this.pos); + if (!octal && !startsWithDot && this.options.ecmaVersion >= 11 && next === 110) { + var val$1 = stringToBigInt2(this.input.slice(start2, this.pos)); + ++this.pos; + if (isIdentifierStart2(this.fullCharCodeAtPos())) { + this.raise(this.pos, "Identifier directly after number"); + } + return this.finishToken(types$12.num, val$1); + } + if (octal && /[89]/.test(this.input.slice(start2, this.pos))) { + octal = false; + } + if (next === 46 && !octal) { + ++this.pos; + this.readInt(10); + next = this.input.charCodeAt(this.pos); + } + if ((next === 69 || next === 101) && !octal) { + next = this.input.charCodeAt(++this.pos); + if (next === 43 || next === 45) { + ++this.pos; + } + if (this.readInt(10) === null) { + this.raise(start2, "Invalid number"); + } + } + if (isIdentifierStart2(this.fullCharCodeAtPos())) { + this.raise(this.pos, "Identifier directly after number"); + } + var val = stringToNumber2(this.input.slice(start2, this.pos), octal); + return this.finishToken(types$12.num, val); + }; + pp2.readCodePoint = function() { + var ch = this.input.charCodeAt(this.pos), code4; + if (ch === 123) { + if (this.options.ecmaVersion < 6) { + this.unexpected(); + } + var codePos = ++this.pos; + code4 = this.readHexChar(this.input.indexOf("}", this.pos) - this.pos); + ++this.pos; + if (code4 > 1114111) { + this.invalidStringToken(codePos, "Code point out of bounds"); + } + } else { + code4 = this.readHexChar(4); + } + return code4; + }; + pp2.readString = function(quote) { + var out = "", chunkStart = ++this.pos; + for (; ; ) { + if (this.pos >= this.input.length) { + this.raise(this.start, "Unterminated string constant"); + } + var ch = this.input.charCodeAt(this.pos); + if (ch === quote) { + break; + } + if (ch === 92) { + out += this.input.slice(chunkStart, this.pos); + out += this.readEscapedChar(false); + chunkStart = this.pos; + } else if (ch === 8232 || ch === 8233) { + if (this.options.ecmaVersion < 10) { + this.raise(this.start, "Unterminated string constant"); + } + ++this.pos; + if (this.options.locations) { + this.curLine++; + this.lineStart = this.pos; + } + } else { + if (isNewLine2(ch)) { + this.raise(this.start, "Unterminated string constant"); + } + ++this.pos; + } + } + out += this.input.slice(chunkStart, this.pos++); + return this.finishToken(types$12.string, out); + }; + var INVALID_TEMPLATE_ESCAPE_ERROR2 = {}; + pp2.tryReadTemplateToken = function() { + this.inTemplateElement = true; + try { + this.readTmplToken(); + } catch (err) { + if (err === INVALID_TEMPLATE_ESCAPE_ERROR2) { + this.readInvalidTemplateToken(); + } else { + throw err; + } + } + this.inTemplateElement = false; + }; + pp2.invalidStringToken = function(position3, message) { + if (this.inTemplateElement && this.options.ecmaVersion >= 9) { + throw INVALID_TEMPLATE_ESCAPE_ERROR2; + } else { + this.raise(position3, message); + } + }; + pp2.readTmplToken = function() { + var out = "", chunkStart = this.pos; + for (; ; ) { + if (this.pos >= this.input.length) { + this.raise(this.start, "Unterminated template"); + } + var ch = this.input.charCodeAt(this.pos); + if (ch === 96 || ch === 36 && this.input.charCodeAt(this.pos + 1) === 123) { + if (this.pos === this.start && (this.type === types$12.template || this.type === types$12.invalidTemplate)) { + if (ch === 36) { + this.pos += 2; + return this.finishToken(types$12.dollarBraceL); + } else { + ++this.pos; + return this.finishToken(types$12.backQuote); + } + } + out += this.input.slice(chunkStart, this.pos); + return this.finishToken(types$12.template, out); + } + if (ch === 92) { + out += this.input.slice(chunkStart, this.pos); + out += this.readEscapedChar(true); + chunkStart = this.pos; + } else if (isNewLine2(ch)) { + out += this.input.slice(chunkStart, this.pos); + ++this.pos; + switch (ch) { + case 13: + if (this.input.charCodeAt(this.pos) === 10) { + ++this.pos; + } + case 10: + out += "\n"; + break; + default: + out += String.fromCharCode(ch); + break; + } + if (this.options.locations) { + ++this.curLine; + this.lineStart = this.pos; + } + chunkStart = this.pos; + } else { + ++this.pos; + } + } + }; + pp2.readInvalidTemplateToken = function() { + for (; this.pos < this.input.length; this.pos++) { + switch (this.input[this.pos]) { + case "\\": + ++this.pos; + break; + case "$": + if (this.input[this.pos + 1] !== "{") { + break; + } + // fall through + case "`": + return this.finishToken(types$12.invalidTemplate, this.input.slice(this.start, this.pos)); + case "\r": + if (this.input[this.pos + 1] === "\n") { + ++this.pos; + } + // fall through + case "\n": + case "\u2028": + case "\u2029": + ++this.curLine; + this.lineStart = this.pos + 1; + break; + } + } + this.raise(this.start, "Unterminated template"); + }; + pp2.readEscapedChar = function(inTemplate) { + var ch = this.input.charCodeAt(++this.pos); + ++this.pos; + switch (ch) { + case 110: + return "\n"; + // 'n' -> '\n' + case 114: + return "\r"; + // 'r' -> '\r' + case 120: + return String.fromCharCode(this.readHexChar(2)); + // 'x' + case 117: + return codePointToString2(this.readCodePoint()); + // 'u' + case 116: + return " "; + // 't' -> '\t' + case 98: + return "\b"; + // 'b' -> '\b' + case 118: + return "\v"; + // 'v' -> '\u000b' + case 102: + return "\f"; + // 'f' -> '\f' + case 13: + if (this.input.charCodeAt(this.pos) === 10) { + ++this.pos; + } + // '\r\n' + case 10: + if (this.options.locations) { + this.lineStart = this.pos; + ++this.curLine; + } + return ""; + case 56: + case 57: + if (this.strict) { + this.invalidStringToken( + this.pos - 1, + "Invalid escape sequence" + ); + } + if (inTemplate) { + var codePos = this.pos - 1; + this.invalidStringToken( + codePos, + "Invalid escape sequence in template string" + ); + } + default: + if (ch >= 48 && ch <= 55) { + var octalStr = this.input.substr(this.pos - 1, 3).match(/^[0-7]+/)[0]; + var octal = parseInt(octalStr, 8); + if (octal > 255) { + octalStr = octalStr.slice(0, -1); + octal = parseInt(octalStr, 8); + } + this.pos += octalStr.length - 1; + ch = this.input.charCodeAt(this.pos); + if ((octalStr !== "0" || ch === 56 || ch === 57) && (this.strict || inTemplate)) { + this.invalidStringToken( + this.pos - 1 - octalStr.length, + inTemplate ? "Octal literal in template string" : "Octal literal in strict mode" + ); + } + return String.fromCharCode(octal); + } + if (isNewLine2(ch)) { + if (this.options.locations) { + this.lineStart = this.pos; + ++this.curLine; + } + return ""; + } + return String.fromCharCode(ch); + } + }; + pp2.readHexChar = function(len) { + var codePos = this.pos; + var n = this.readInt(16, len); + if (n === null) { + this.invalidStringToken(codePos, "Bad character escape sequence"); + } + return n; + }; + pp2.readWord1 = function() { + this.containsEsc = false; + var word = "", first = true, chunkStart = this.pos; + var astral = this.options.ecmaVersion >= 6; + while (this.pos < this.input.length) { + var ch = this.fullCharCodeAtPos(); + if (isIdentifierChar2(ch, astral)) { + this.pos += ch <= 65535 ? 1 : 2; + } else if (ch === 92) { + this.containsEsc = true; + word += this.input.slice(chunkStart, this.pos); + var escStart = this.pos; + if (this.input.charCodeAt(++this.pos) !== 117) { + this.invalidStringToken(this.pos, "Expecting Unicode escape sequence \\uXXXX"); + } + ++this.pos; + var esc = this.readCodePoint(); + if (!(first ? isIdentifierStart2 : isIdentifierChar2)(esc, astral)) { + this.invalidStringToken(escStart, "Invalid Unicode escape"); + } + word += codePointToString2(esc); + chunkStart = this.pos; + } else { + break; + } + first = false; + } + return word + this.input.slice(chunkStart, this.pos); + }; + pp2.readWord = function() { + var word = this.readWord1(); + var type = types$12.name; + if (this.keywords.test(word)) { + type = keywords2[word]; + } + return this.finishToken(type, word); + }; + var version2 = "8.18.0"; + Parser3.acorn = { + Parser: Parser3, + version: version2, + defaultOptions: defaultOptions2, + Position: Position3, + SourceLocation: SourceLocation3, + getLineInfo: getLineInfo2, + Node: Node3, + TokenType: TokenType3, + tokTypes: types$12, + keywordTypes: keywords2, + TokContext: TokContext3, + tokContexts: types2, + isIdentifierChar: isIdentifierChar2, + isIdentifierStart: isIdentifierStart2, + Token: Token3, + isNewLine: isNewLine2, + lineBreak: lineBreak2, + lineBreakG: lineBreakG2, + nonASCIIwhitespace: nonASCIIwhitespace2 + }; + function parse5(input, options2) { + return Parser3.parse(input, options2); + } + function parseExpressionAt2(input, pos, options2) { + return Parser3.parseExpressionAt(input, pos, options2); + } + function tokenizer2(input, options2) { + return Parser3.tokenizer(input, options2); + } + exports3.Node = Node3; + exports3.Parser = Parser3; + exports3.Position = Position3; + exports3.SourceLocation = SourceLocation3; + exports3.TokContext = TokContext3; + exports3.Token = Token3; + exports3.TokenType = TokenType3; + exports3.defaultOptions = defaultOptions2; + exports3.getLineInfo = getLineInfo2; + exports3.isIdentifierChar = isIdentifierChar2; + exports3.isIdentifierStart = isIdentifierStart2; + exports3.isNewLine = isNewLine2; + exports3.keywordTypes = keywords2; + exports3.lineBreak = lineBreak2; + exports3.lineBreakG = lineBreakG2; + exports3.nonASCIIwhitespace = nonASCIIwhitespace2; + exports3.parse = parse5; + exports3.parseExpressionAt = parseExpressionAt2; + exports3.tokContexts = types2; + exports3.tokTypes = types$12; + exports3.tokenizer = tokenizer2; + exports3.version = version2; + })); + } +}); + +// ../../../node_modules/.pnpm/acorn-jsx@5.3.2_acorn@8.18.0/node_modules/acorn-jsx/index.js +var require_acorn_jsx = __commonJS({ + "../../../node_modules/.pnpm/acorn-jsx@5.3.2_acorn@8.18.0/node_modules/acorn-jsx/index.js"(exports2, module2) { + "use strict"; + var XHTMLEntities = require_xhtml(); + var hexNumber = /^[\da-fA-F]+$/; + var decimalNumber = /^\d+$/; + var acornJsxMap = /* @__PURE__ */ new WeakMap(); + function getJsxTokens(acorn) { + acorn = acorn.Parser.acorn || acorn; + let acornJsx2 = acornJsxMap.get(acorn); + if (!acornJsx2) { + const tt = acorn.tokTypes; + const TokContext3 = acorn.TokContext; + const TokenType3 = acorn.TokenType; + const tc_oTag = new TokContext3("...", true, true); + const tokContexts = { + tc_oTag, + tc_cTag, + tc_expr + }; + const tokTypes = { + jsxName: new TokenType3("jsxName"), + jsxText: new TokenType3("jsxText", { beforeExpr: true }), + jsxTagStart: new TokenType3("jsxTagStart", { startsExpr: true }), + jsxTagEnd: new TokenType3("jsxTagEnd") + }; + tokTypes.jsxTagStart.updateContext = function() { + this.context.push(tc_expr); + this.context.push(tc_oTag); + this.exprAllowed = false; + }; + tokTypes.jsxTagEnd.updateContext = function(prevType) { + let out = this.context.pop(); + if (out === tc_oTag && prevType === tt.slash || out === tc_cTag) { + this.context.pop(); + this.exprAllowed = this.curContext() === tc_expr; + } else { + this.exprAllowed = true; + } + }; + acornJsx2 = { tokContexts, tokTypes }; + acornJsxMap.set(acorn, acornJsx2); + } + return acornJsx2; + } + function getQualifiedJSXName(object) { + if (!object) + return object; + if (object.type === "JSXIdentifier") + return object.name; + if (object.type === "JSXNamespacedName") + return object.namespace.name + ":" + object.name.name; + if (object.type === "JSXMemberExpression") + return getQualifiedJSXName(object.object) + "." + getQualifiedJSXName(object.property); + } + module2.exports = function(options2) { + options2 = options2 || {}; + return function(Parser3) { + return plugin({ + allowNamespaces: options2.allowNamespaces !== false, + allowNamespacedObjects: !!options2.allowNamespacedObjects + }, Parser3); + }; + }; + Object.defineProperty(module2.exports, "tokTypes", { + get: function get_tokTypes() { + return getJsxTokens(require_acorn()).tokTypes; + }, + configurable: true, + enumerable: true + }); + function plugin(options2, Parser3) { + const acorn = Parser3.acorn || require_acorn(); + const acornJsx2 = getJsxTokens(acorn); + const tt = acorn.tokTypes; + const tok = acornJsx2.tokTypes; + const tokContexts = acorn.tokContexts; + const tc_oTag = acornJsx2.tokContexts.tc_oTag; + const tc_cTag = acornJsx2.tokContexts.tc_cTag; + const tc_expr = acornJsx2.tokContexts.tc_expr; + const isNewLine2 = acorn.isNewLine; + const isIdentifierStart2 = acorn.isIdentifierStart; + const isIdentifierChar2 = acorn.isIdentifierChar; + return class extends Parser3 { + // Expose actual `tokTypes` and `tokContexts` to other plugins. + static get acornJsx() { + return acornJsx2; + } + // Reads inline JSX contents token. + jsx_readToken() { + let out = "", chunkStart = this.pos; + for (; ; ) { + if (this.pos >= this.input.length) + this.raise(this.start, "Unterminated JSX contents"); + let ch = this.input.charCodeAt(this.pos); + switch (ch) { + case 60: + // '<' + case 123: + if (this.pos === this.start) { + if (ch === 60 && this.exprAllowed) { + ++this.pos; + return this.finishToken(tok.jsxTagStart); + } + return this.getTokenFromCode(ch); + } + out += this.input.slice(chunkStart, this.pos); + return this.finishToken(tok.jsxText, out); + case 38: + out += this.input.slice(chunkStart, this.pos); + out += this.jsx_readEntity(); + chunkStart = this.pos; + break; + case 62: + // '>' + case 125: + this.raise( + this.pos, + "Unexpected token `" + this.input[this.pos] + "`. Did you mean `" + (ch === 62 ? ">" : "}") + '` or `{"' + this.input[this.pos] + '"}`?' + ); + default: + if (isNewLine2(ch)) { + out += this.input.slice(chunkStart, this.pos); + out += this.jsx_readNewLine(true); + chunkStart = this.pos; + } else { + ++this.pos; + } + } + } + } + jsx_readNewLine(normalizeCRLF) { + let ch = this.input.charCodeAt(this.pos); + let out; + ++this.pos; + if (ch === 13 && this.input.charCodeAt(this.pos) === 10) { + ++this.pos; + out = normalizeCRLF ? "\n" : "\r\n"; + } else { + out = String.fromCharCode(ch); + } + if (this.options.locations) { + ++this.curLine; + this.lineStart = this.pos; + } + return out; + } + jsx_readString(quote) { + let out = "", chunkStart = ++this.pos; + for (; ; ) { + if (this.pos >= this.input.length) + this.raise(this.start, "Unterminated string constant"); + let ch = this.input.charCodeAt(this.pos); + if (ch === quote) break; + if (ch === 38) { + out += this.input.slice(chunkStart, this.pos); + out += this.jsx_readEntity(); + chunkStart = this.pos; + } else if (isNewLine2(ch)) { + out += this.input.slice(chunkStart, this.pos); + out += this.jsx_readNewLine(false); + chunkStart = this.pos; + } else { + ++this.pos; + } + } + out += this.input.slice(chunkStart, this.pos++); + return this.finishToken(tt.string, out); + } + jsx_readEntity() { + let str2 = "", count = 0, entity; + let ch = this.input[this.pos]; + if (ch !== "&") + this.raise(this.pos, "Entity must start with an ampersand"); + let startPos = ++this.pos; + while (this.pos < this.input.length && count++ < 10) { + ch = this.input[this.pos++]; + if (ch === ";") { + if (str2[0] === "#") { + if (str2[1] === "x") { + str2 = str2.substr(2); + if (hexNumber.test(str2)) + entity = String.fromCharCode(parseInt(str2, 16)); + } else { + str2 = str2.substr(1); + if (decimalNumber.test(str2)) + entity = String.fromCharCode(parseInt(str2, 10)); + } + } else { + entity = XHTMLEntities[str2]; + } + break; + } + str2 += ch; + } + if (!entity) { + this.pos = startPos; + return "&"; + } + return entity; + } + // Read a JSX identifier (valid tag or attribute name). + // + // Optimized version since JSX identifiers can't contain + // escape characters and so can be read as single slice. + // Also assumes that first character was already checked + // by isIdentifierStart in readToken. + jsx_readWord() { + let ch, start2 = this.pos; + do { + ch = this.input.charCodeAt(++this.pos); + } while (isIdentifierChar2(ch) || ch === 45); + return this.finishToken(tok.jsxName, this.input.slice(start2, this.pos)); + } + // Parse next token as JSX identifier + jsx_parseIdentifier() { + let node2 = this.startNode(); + if (this.type === tok.jsxName) + node2.name = this.value; + else if (this.type.keyword) + node2.name = this.type.keyword; + else + this.unexpected(); + this.next(); + return this.finishNode(node2, "JSXIdentifier"); + } + // Parse namespaced identifier. + jsx_parseNamespacedName() { + let startPos = this.start, startLoc = this.startLoc; + let name2 = this.jsx_parseIdentifier(); + if (!options2.allowNamespaces || !this.eat(tt.colon)) return name2; + var node2 = this.startNodeAt(startPos, startLoc); + node2.namespace = name2; + node2.name = this.jsx_parseIdentifier(); + return this.finishNode(node2, "JSXNamespacedName"); + } + // Parses element name in any form - namespaced, member + // or single identifier. + jsx_parseElementName() { + if (this.type === tok.jsxTagEnd) return ""; + let startPos = this.start, startLoc = this.startLoc; + let node2 = this.jsx_parseNamespacedName(); + if (this.type === tt.dot && node2.type === "JSXNamespacedName" && !options2.allowNamespacedObjects) { + this.unexpected(); + } + while (this.eat(tt.dot)) { + let newNode = this.startNodeAt(startPos, startLoc); + newNode.object = node2; + newNode.property = this.jsx_parseIdentifier(); + node2 = this.finishNode(newNode, "JSXMemberExpression"); + } + return node2; + } + // Parses any type of JSX attribute value. + jsx_parseAttributeValue() { + switch (this.type) { + case tt.braceL: + let node2 = this.jsx_parseExpressionContainer(); + if (node2.expression.type === "JSXEmptyExpression") + this.raise(node2.start, "JSX attributes must only be assigned a non-empty expression"); + return node2; + case tok.jsxTagStart: + case tt.string: + return this.parseExprAtom(); + default: + this.raise(this.start, "JSX value should be either an expression or a quoted JSX text"); + } + } + // JSXEmptyExpression is unique type since it doesn't actually parse anything, + // and so it should start at the end of last read token (left brace) and finish + // at the beginning of the next one (right brace). + jsx_parseEmptyExpression() { + let node2 = this.startNodeAt(this.lastTokEnd, this.lastTokEndLoc); + return this.finishNodeAt(node2, "JSXEmptyExpression", this.start, this.startLoc); + } + // Parses JSX expression enclosed into curly brackets. + jsx_parseExpressionContainer() { + let node2 = this.startNode(); + this.next(); + node2.expression = this.type === tt.braceR ? this.jsx_parseEmptyExpression() : this.parseExpression(); + this.expect(tt.braceR); + return this.finishNode(node2, "JSXExpressionContainer"); + } + // Parses following JSX attribute name-value pair. + jsx_parseAttribute() { + let node2 = this.startNode(); + if (this.eat(tt.braceL)) { + this.expect(tt.ellipsis); + node2.argument = this.parseMaybeAssign(); + this.expect(tt.braceR); + return this.finishNode(node2, "JSXSpreadAttribute"); + } + node2.name = this.jsx_parseNamespacedName(); + node2.value = this.eat(tt.eq) ? this.jsx_parseAttributeValue() : null; + return this.finishNode(node2, "JSXAttribute"); + } + // Parses JSX opening tag starting after '<'. + jsx_parseOpeningElementAt(startPos, startLoc) { + let node2 = this.startNodeAt(startPos, startLoc); + node2.attributes = []; + let nodeName = this.jsx_parseElementName(); + if (nodeName) node2.name = nodeName; + while (this.type !== tt.slash && this.type !== tok.jsxTagEnd) + node2.attributes.push(this.jsx_parseAttribute()); + node2.selfClosing = this.eat(tt.slash); + this.expect(tok.jsxTagEnd); + return this.finishNode(node2, nodeName ? "JSXOpeningElement" : "JSXOpeningFragment"); + } + // Parses JSX closing tag starting after '" + ); + } + } + let fragmentOrElement = openingElement.name ? "Element" : "Fragment"; + node2["opening" + fragmentOrElement] = openingElement; + node2["closing" + fragmentOrElement] = closingElement; + node2.children = children; + if (this.type === tt.relational && this.value === "<") { + this.raise(this.start, "Adjacent JSX elements must be wrapped in an enclosing tag"); + } + return this.finishNode(node2, "JSX" + fragmentOrElement); + } + // Parse JSX text + jsx_parseText() { + let node2 = this.parseLiteral(this.value); + node2.type = "JSXText"; + return node2; + } + // Parses entire JSX element from current position. + jsx_parseElement() { + let startPos = this.start, startLoc = this.startLoc; + this.next(); + return this.jsx_parseElementAt(startPos, startLoc); + } + parseExprAtom(refShortHandDefaultPos) { + if (this.type === tok.jsxText) + return this.jsx_parseText(); + else if (this.type === tok.jsxTagStart) + return this.jsx_parseElement(); + else + return super.parseExprAtom(refShortHandDefaultPos); + } + readToken(code4) { + let context = this.curContext(); + if (context === tc_expr) return this.jsx_readToken(); + if (context === tc_oTag || context === tc_cTag) { + if (isIdentifierStart2(code4)) return this.jsx_readWord(); + if (code4 == 62) { + ++this.pos; + return this.finishToken(tok.jsxTagEnd); + } + if ((code4 === 34 || code4 === 39) && context == tc_oTag) + return this.jsx_readString(code4); + } + if (code4 === 60 && this.exprAllowed && this.input.charCodeAt(this.pos + 1) !== 33) { + ++this.pos; + return this.finishToken(tok.jsxTagStart); + } + return super.readToken(code4); + } + updateContext(prevType) { + if (this.type == tt.braceL) { + var curContext = this.curContext(); + if (curContext == tc_oTag) this.context.push(tokContexts.b_expr); + else if (curContext == tc_expr) this.context.push(tokContexts.b_tmpl); + else super.updateContext(prevType); + this.exprAllowed = true; + } else if (this.type === tt.slash && prevType === tok.jsxTagStart) { + this.context.length -= 2; + this.context.push(tc_cTag); + this.exprAllowed = false; + } else { + return super.updateContext(prevType); + } + } + }; + } + } +}); + +// ../../../node_modules/.pnpm/inline-style-parser@0.2.7/node_modules/inline-style-parser/cjs/index.js +var require_cjs = __commonJS({ + "../../../node_modules/.pnpm/inline-style-parser@0.2.7/node_modules/inline-style-parser/cjs/index.js"(exports2, module2) { + "use strict"; + var COMMENT_REGEX = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//g; + var NEWLINE_REGEX = /\n/g; + var WHITESPACE_REGEX = /^\s*/; + var PROPERTY_REGEX = /^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/; + var COLON_REGEX = /^:\s*/; + var VALUE_REGEX = /^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/; + var SEMICOLON_REGEX = /^[;\s]*/; + var TRIM_REGEX = /^\s+|\s+$/g; + var NEWLINE = "\n"; + var FORWARD_SLASH = "/"; + var ASTERISK = "*"; + var EMPTY_STRING = ""; + var TYPE_COMMENT = "comment"; + var TYPE_DECLARATION = "declaration"; + function index2(style, options2) { + if (typeof style !== "string") { + throw new TypeError("First argument must be a string"); + } + if (!style) return []; + options2 = options2 || {}; + var lineno = 1; + var column = 1; + function updatePosition(str2) { + var lines = str2.match(NEWLINE_REGEX); + if (lines) lineno += lines.length; + var i = str2.lastIndexOf(NEWLINE); + column = ~i ? str2.length - i : column + str2.length; + } + function position3() { + var start2 = { line: lineno, column }; + return function(node2) { + node2.position = new Position3(start2); + whitespace2(); + return node2; + }; + } + function Position3(start2) { + this.start = start2; + this.end = { line: lineno, column }; + this.source = options2.source; + } + Position3.prototype.content = style; + function error(msg) { + var err = new Error( + options2.source + ":" + lineno + ":" + column + ": " + msg + ); + err.reason = msg; + err.filename = options2.source; + err.line = lineno; + err.column = column; + err.source = style; + if (options2.silent) ; + else { + throw err; + } + } + function match(re2) { + var m = re2.exec(style); + if (!m) return; + var str2 = m[0]; + updatePosition(str2); + style = style.slice(str2.length); + return m; + } + function whitespace2() { + match(WHITESPACE_REGEX); + } + function comments(rules) { + var c; + rules = rules || []; + while (c = comment2()) { + if (c !== false) { + rules.push(c); + } + } + return rules; + } + function comment2() { + var pos = position3(); + if (FORWARD_SLASH != style.charAt(0) || ASTERISK != style.charAt(1)) return; + var i = 2; + while (EMPTY_STRING != style.charAt(i) && (ASTERISK != style.charAt(i) || FORWARD_SLASH != style.charAt(i + 1))) { + ++i; + } + i += 2; + if (EMPTY_STRING === style.charAt(i - 1)) { + return error("End of comment missing"); + } + var str2 = style.slice(2, i - 2); + column += 2; + updatePosition(str2); + style = style.slice(i); + column += 2; + return pos({ + type: TYPE_COMMENT, + comment: str2 + }); + } + function declaration() { + var pos = position3(); + var prop = match(PROPERTY_REGEX); + if (!prop) return; + comment2(); + if (!match(COLON_REGEX)) return error("property missing ':'"); + var val = match(VALUE_REGEX); + var ret = pos({ + type: TYPE_DECLARATION, + property: trim(prop[0].replace(COMMENT_REGEX, EMPTY_STRING)), + value: val ? trim(val[0].replace(COMMENT_REGEX, EMPTY_STRING)) : EMPTY_STRING + }); + match(SEMICOLON_REGEX); + return ret; + } + function declarations() { + var decls = []; + comments(decls); + var decl; + while (decl = declaration()) { + if (decl !== false) { + decls.push(decl); + comments(decls); + } + } + return decls; + } + whitespace2(); + return declarations(); + } + function trim(str2) { + return str2 ? str2.replace(TRIM_REGEX, EMPTY_STRING) : EMPTY_STRING; + } + module2.exports = index2; + } +}); + +// ../../../node_modules/.pnpm/style-to-object@1.0.14/node_modules/style-to-object/cjs/index.js +var require_cjs2 = __commonJS({ + "../../../node_modules/.pnpm/style-to-object@1.0.14/node_modules/style-to-object/cjs/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.default = StyleToObject; + var inline_style_parser_1 = __importDefault(require_cjs()); + function StyleToObject(style, iterator) { + let styleObject = null; + if (!style || typeof style !== "string") { + return styleObject; + } + const declarations = (0, inline_style_parser_1.default)(style); + const hasIterator = typeof iterator === "function"; + declarations.forEach((declaration) => { + if (declaration.type !== "declaration") { + return; + } + const { property, value } = declaration; + if (hasIterator) { + iterator(property, value, declaration); + } else if (value) { + styleObject = styleObject || {}; + styleObject[property] = value; + } + }); + return styleObject; + } + } +}); + +// ../../../node_modules/.pnpm/style-to-js@1.1.21/node_modules/style-to-js/cjs/utilities.js +var require_utilities = __commonJS({ + "../../../node_modules/.pnpm/style-to-js@1.1.21/node_modules/style-to-js/cjs/utilities.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.camelCase = void 0; + var CUSTOM_PROPERTY_REGEX = /^--[a-zA-Z0-9_-]+$/; + var HYPHEN_REGEX = /-([a-z])/g; + var NO_HYPHEN_REGEX = /^[^-]+$/; + var VENDOR_PREFIX_REGEX = /^-(webkit|moz|ms|o|khtml)-/; + var MS_VENDOR_PREFIX_REGEX = /^-(ms)-/; + var skipCamelCase = function(property) { + return !property || NO_HYPHEN_REGEX.test(property) || CUSTOM_PROPERTY_REGEX.test(property); + }; + var capitalize = function(match, character) { + return character.toUpperCase(); + }; + var trimHyphen = function(match, prefix) { + return "".concat(prefix, "-"); + }; + var camelCase = function(property, options2) { + if (options2 === void 0) { + options2 = {}; + } + if (skipCamelCase(property)) { + return property; + } + property = property.toLowerCase(); + if (options2.reactCompat) { + property = property.replace(MS_VENDOR_PREFIX_REGEX, trimHyphen); + } else { + property = property.replace(VENDOR_PREFIX_REGEX, trimHyphen); + } + return property.replace(HYPHEN_REGEX, capitalize); + }; + exports2.camelCase = camelCase; + } +}); + +// ../../../node_modules/.pnpm/style-to-js@1.1.21/node_modules/style-to-js/cjs/index.js +var require_cjs3 = __commonJS({ + "../../../node_modules/.pnpm/style-to-js@1.1.21/node_modules/style-to-js/cjs/index.js"(exports2, module2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + var style_to_object_1 = __importDefault(require_cjs2()); + var utilities_1 = require_utilities(); + function StyleToJS(style, options2) { + var output = {}; + if (!style || typeof style !== "string") { + return output; + } + (0, style_to_object_1.default)(style, function(property, value) { + if (property && value) { + output[(0, utilities_1.camelCase)(property, options2)] = value; + } + }); + return output; + } + StyleToJS.default = StyleToJS; + module2.exports = StyleToJS; + } +}); + +// ../../../node_modules/.pnpm/extend@3.0.2/node_modules/extend/index.js +var require_extend = __commonJS({ + "../../../node_modules/.pnpm/extend@3.0.2/node_modules/extend/index.js"(exports2, module2) { + "use strict"; + var hasOwn2 = Object.prototype.hasOwnProperty; + var toStr = Object.prototype.toString; + var defineProperty = Object.defineProperty; + var gOPD = Object.getOwnPropertyDescriptor; + var isArray2 = function isArray3(arr) { + if (typeof Array.isArray === "function") { + return Array.isArray(arr); + } + return toStr.call(arr) === "[object Array]"; + }; + var isPlainObject2 = function isPlainObject3(obj) { + if (!obj || toStr.call(obj) !== "[object Object]") { + return false; + } + var hasOwnConstructor = hasOwn2.call(obj, "constructor"); + var hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn2.call(obj.constructor.prototype, "isPrototypeOf"); + if (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) { + return false; + } + var key; + for (key in obj) { + } + return typeof key === "undefined" || hasOwn2.call(obj, key); + }; + var setProperty = function setProperty2(target, options2) { + if (defineProperty && options2.name === "__proto__") { + defineProperty(target, options2.name, { + enumerable: true, + configurable: true, + value: options2.newValue, + writable: true + }); + } else { + target[options2.name] = options2.newValue; + } + }; + var getProperty = function getProperty2(obj, name2) { + if (name2 === "__proto__") { + if (!hasOwn2.call(obj, name2)) { + return void 0; + } else if (gOPD) { + return gOPD(obj, name2).value; + } + } + return obj[name2]; + }; + module2.exports = function extend3() { + var options2, name2, src, copy, copyIsArray, clone; + var target = arguments[0]; + var i = 1; + var length = arguments.length; + var deep = false; + if (typeof target === "boolean") { + deep = target; + target = arguments[1] || {}; + i = 2; + } + if (target == null || typeof target !== "object" && typeof target !== "function") { + target = {}; + } + for (; i < length; ++i) { + options2 = arguments[i]; + if (options2 != null) { + for (name2 in options2) { + src = getProperty(target, name2); + copy = getProperty(options2, name2); + if (target !== copy) { + if (deep && copy && (isPlainObject2(copy) || (copyIsArray = isArray2(copy)))) { + if (copyIsArray) { + copyIsArray = false; + clone = src && isArray2(src) ? src : []; + } else { + clone = src && isPlainObject2(src) ? src : {}; + } + setProperty(target, { name: name2, newValue: extend3(deep, clone, copy) }); + } else if (typeof copy !== "undefined") { + setProperty(target, { name: name2, newValue: copy }); + } + } + } + } + } + return target; + }; + } +}); + +// ../../../node_modules/.pnpm/kind-of@6.0.3/node_modules/kind-of/index.js +var require_kind_of = __commonJS({ + "../../../node_modules/.pnpm/kind-of@6.0.3/node_modules/kind-of/index.js"(exports2, module2) { + var toString5 = Object.prototype.toString; + module2.exports = function kindOf(val) { + if (val === void 0) return "undefined"; + if (val === null) return "null"; + var type = typeof val; + if (type === "boolean") return "boolean"; + if (type === "string") return "string"; + if (type === "number") return "number"; + if (type === "symbol") return "symbol"; + if (type === "function") { + return isGeneratorFn(val) ? "generatorfunction" : "function"; + } + if (isArray2(val)) return "array"; + if (isBuffer(val)) return "buffer"; + if (isArguments(val)) return "arguments"; + if (isDate(val)) return "date"; + if (isError(val)) return "error"; + if (isRegexp(val)) return "regexp"; + switch (ctorName(val)) { + case "Symbol": + return "symbol"; + case "Promise": + return "promise"; + // Set, Map, WeakSet, WeakMap + case "WeakMap": + return "weakmap"; + case "WeakSet": + return "weakset"; + case "Map": + return "map"; + case "Set": + return "set"; + // 8-bit typed arrays + case "Int8Array": + return "int8array"; + case "Uint8Array": + return "uint8array"; + case "Uint8ClampedArray": + return "uint8clampedarray"; + // 16-bit typed arrays + case "Int16Array": + return "int16array"; + case "Uint16Array": + return "uint16array"; + // 32-bit typed arrays + case "Int32Array": + return "int32array"; + case "Uint32Array": + return "uint32array"; + case "Float32Array": + return "float32array"; + case "Float64Array": + return "float64array"; + } + if (isGeneratorObj(val)) { + return "generator"; + } + type = toString5.call(val); + switch (type) { + case "[object Object]": + return "object"; + // iterators + case "[object Map Iterator]": + return "mapiterator"; + case "[object Set Iterator]": + return "setiterator"; + case "[object String Iterator]": + return "stringiterator"; + case "[object Array Iterator]": + return "arrayiterator"; + } + return type.slice(8, -1).toLowerCase().replace(/\s/g, ""); + }; + function ctorName(val) { + return typeof val.constructor === "function" ? val.constructor.name : null; + } + function isArray2(val) { + if (Array.isArray) return Array.isArray(val); + return val instanceof Array; + } + function isError(val) { + return val instanceof Error || typeof val.message === "string" && val.constructor && typeof val.constructor.stackTraceLimit === "number"; + } + function isDate(val) { + if (val instanceof Date) return true; + return typeof val.toDateString === "function" && typeof val.getDate === "function" && typeof val.setDate === "function"; + } + function isRegexp(val) { + if (val instanceof RegExp) return true; + return typeof val.flags === "string" && typeof val.ignoreCase === "boolean" && typeof val.multiline === "boolean" && typeof val.global === "boolean"; + } + function isGeneratorFn(name2, val) { + return ctorName(name2) === "GeneratorFunction"; + } + function isGeneratorObj(val) { + return typeof val.throw === "function" && typeof val.return === "function" && typeof val.next === "function"; + } + function isArguments(val) { + try { + if (typeof val.length === "number" && typeof val.callee === "function") { + return true; + } + } catch (err) { + if (err.message.indexOf("callee") !== -1) { + return true; + } + } + return false; + } + function isBuffer(val) { + if (val.constructor && typeof val.constructor.isBuffer === "function") { + return val.constructor.isBuffer(val); + } + return false; + } + } +}); + +// ../../../node_modules/.pnpm/is-extendable@0.1.1/node_modules/is-extendable/index.js +var require_is_extendable = __commonJS({ + "../../../node_modules/.pnpm/is-extendable@0.1.1/node_modules/is-extendable/index.js"(exports2, module2) { + "use strict"; + module2.exports = function isExtendable(val) { + return typeof val !== "undefined" && val !== null && (typeof val === "object" || typeof val === "function"); + }; + } +}); + +// ../../../node_modules/.pnpm/extend-shallow@2.0.1/node_modules/extend-shallow/index.js +var require_extend_shallow = __commonJS({ + "../../../node_modules/.pnpm/extend-shallow@2.0.1/node_modules/extend-shallow/index.js"(exports2, module2) { + "use strict"; + var isObject = require_is_extendable(); + module2.exports = function extend3(o) { + if (!isObject(o)) { + o = {}; + } + var len = arguments.length; + for (var i = 1; i < len; i++) { + var obj = arguments[i]; + if (isObject(obj)) { + assign(o, obj); + } + } + return o; + }; + function assign(a, b) { + for (var key in b) { + if (hasOwn2(b, key)) { + a[key] = b[key]; + } + } + } + function hasOwn2(obj, key) { + return Object.prototype.hasOwnProperty.call(obj, key); + } + } +}); + +// ../../../node_modules/.pnpm/section-matter@1.0.0/node_modules/section-matter/index.js +var require_section_matter = __commonJS({ + "../../../node_modules/.pnpm/section-matter@1.0.0/node_modules/section-matter/index.js"(exports2, module2) { + "use strict"; + var typeOf2 = require_kind_of(); + var extend3 = require_extend_shallow(); + module2.exports = function(input, options2) { + if (typeof options2 === "function") { + options2 = { parse: options2 }; + } + var file = toObject(input); + var defaults = { section_delimiter: "---", parse: identity }; + var opts = extend3({}, defaults, options2); + var delim = opts.section_delimiter; + var lines = file.content.split(/\r?\n/); + var sections = null; + var section = createSection(); + var content3 = []; + var stack = []; + function initSections(val) { + file.content = val; + sections = []; + content3 = []; + } + function closeSection(val) { + if (stack.length) { + section.key = getKey(stack[0], delim); + section.content = val; + opts.parse(section, sections); + sections.push(section); + section = createSection(); + content3 = []; + stack = []; + } + } + for (var i = 0; i < lines.length; i++) { + var line = lines[i]; + var len = stack.length; + var ln = line.trim(); + if (isDelimiter(ln, delim)) { + if (ln.length === 3 && i !== 0) { + if (len === 0 || len === 2) { + content3.push(line); + continue; + } + stack.push(ln); + section.data = content3.join("\n"); + content3 = []; + continue; + } + if (sections === null) { + initSections(content3.join("\n")); + } + if (len === 2) { + closeSection(content3.join("\n")); + } + stack.push(ln); + continue; + } + content3.push(line); + } + if (sections === null) { + initSections(content3.join("\n")); + } else { + closeSection(content3.join("\n")); + } + file.sections = sections; + return file; + }; + function isDelimiter(line, delim) { + if (line.slice(0, delim.length) !== delim) { + return false; + } + if (line.charAt(delim.length + 1) === delim.slice(-1)) { + return false; + } + return true; + } + function toObject(input) { + if (typeOf2(input) !== "object") { + input = { content: input }; + } + if (typeof input.content !== "string" && !isBuffer(input.content)) { + throw new TypeError("expected a buffer or string"); + } + input.content = input.content.toString(); + input.sections = []; + return input; + } + function getKey(val, delim) { + return val ? val.slice(delim.length).trim() : ""; + } + function createSection() { + return { key: "", data: "", content: "" }; + } + function identity(val) { + return val; + } + function isBuffer(val) { + if (val && val.constructor && typeof val.constructor.isBuffer === "function") { + return val.constructor.isBuffer(val); + } + return false; + } + } +}); + +// ../../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/common.js +var require_common = __commonJS({ + "../../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/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 toArray(sequence) { + if (Array.isArray(sequence)) return sequence; + else if (isNothing(sequence)) return []; + return [sequence]; + } + function extend3(target, source) { + var index2, length, key, sourceKeys; + if (source) { + sourceKeys = Object.keys(source); + for (index2 = 0, length = sourceKeys.length; index2 < length; index2 += 1) { + key = sourceKeys[index2]; + target[key] = source[key]; + } + } + return target; + } + function repeat(string3, count) { + var result = "", cycle; + for (cycle = 0; cycle < count; cycle += 1) { + result += string3; + } + return result; + } + function isNegativeZero(number2) { + return number2 === 0 && Number.NEGATIVE_INFINITY === 1 / number2; + } + module2.exports.isNothing = isNothing; + module2.exports.isObject = isObject; + module2.exports.toArray = toArray; + module2.exports.repeat = repeat; + module2.exports.isNegativeZero = isNegativeZero; + module2.exports.extend = extend3; + } +}); + +// ../../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/exception.js +var require_exception = __commonJS({ + "../../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/exception.js"(exports2, module2) { + "use strict"; + function YAMLException(reason, mark2) { + Error.call(this); + this.name = "YAMLException"; + this.reason = reason; + this.mark = mark2; + 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 toString5(compact) { + var result = this.name + ": "; + result += this.reason || "(unknown reason)"; + if (!compact && this.mark) { + result += " " + this.mark.toString(); + } + return result; + }; + module2.exports = YAMLException; + } +}); + +// ../../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/mark.js +var require_mark = __commonJS({ + "../../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/mark.js"(exports2, module2) { + "use strict"; + var common = require_common(); + function Mark(name2, buffer, position3, line, column) { + this.name = name2; + this.buffer = buffer; + this.position = position3; + this.line = line; + this.column = column; + } + Mark.prototype.getSnippet = function getSnippet(indent3, maxLength) { + var head, start2, tail, end, snippet; + if (!this.buffer) return null; + indent3 = indent3 || 4; + maxLength = maxLength || 75; + head = ""; + start2 = this.position; + while (start2 > 0 && "\0\r\n\x85\u2028\u2029".indexOf(this.buffer.charAt(start2 - 1)) === -1) { + start2 -= 1; + if (this.position - start2 > maxLength / 2 - 1) { + head = " ... "; + start2 += 5; + break; + } + } + tail = ""; + end = this.position; + while (end < this.buffer.length && "\0\r\n\x85\u2028\u2029".indexOf(this.buffer.charAt(end)) === -1) { + end += 1; + if (end - this.position > maxLength / 2 - 1) { + tail = " ... "; + end -= 5; + break; + } + } + snippet = this.buffer.slice(start2, end); + return common.repeat(" ", indent3) + head + snippet + tail + "\n" + common.repeat(" ", indent3 + this.position - start2 + head.length) + "^"; + }; + Mark.prototype.toString = function toString5(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; + }; + module2.exports = Mark; + } +}); + +// ../../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/type.js +var require_type = __commonJS({ + "../../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/type.js"(exports2, module2) { + "use strict"; + var YAMLException = require_exception(); + var TYPE_CONSTRUCTOR_OPTIONS = [ + "kind", + "resolve", + "construct", + "instanceOf", + "predicate", + "represent", + "defaultStyle", + "styleAliases" + ]; + var YAML_NODE_KINDS = [ + "scalar", + "sequence", + "mapping" + ]; + function compileStyleAliases(map3) { + var result = {}; + if (map3 !== null) { + Object.keys(map3).forEach(function(style) { + map3[style].forEach(function(alias) { + result[String(alias)] = style; + }); + }); + } + return result; + } + function Type(tag, options2) { + options2 = options2 || {}; + Object.keys(options2).forEach(function(name2) { + if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name2) === -1) { + throw new YAMLException('Unknown option "' + name2 + '" is met in definition of "' + tag + '" YAML type.'); + } + }); + this.tag = tag; + this.kind = options2["kind"] || null; + this.resolve = options2["resolve"] || function() { + return true; + }; + this.construct = options2["construct"] || function(data2) { + return data2; + }; + this.instanceOf = options2["instanceOf"] || null; + this.predicate = options2["predicate"] || null; + this.represent = options2["represent"] || null; + this.defaultStyle = options2["defaultStyle"] || null; + this.styleAliases = compileStyleAliases(options2["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/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/schema.js +var require_schema = __commonJS({ + "../../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/schema.js"(exports2, module2) { + "use strict"; + var common = require_common(); + var YAMLException = require_exception(); + var Type = require_type(); + function compileList(schema, name2, result) { + var exclude = []; + schema.include.forEach(function(includedSchema) { + result = compileList(includedSchema, name2, result); + }); + schema[name2].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, index2) { + return exclude.indexOf(index2) === -1; + }); + } + function compileMap() { + var result = { + scalar: {}, + sequence: {}, + mapping: {}, + fallback: {} + }, index2, length; + function collectType(type) { + result[type.kind][type.tag] = result["fallback"][type.tag] = type; + } + for (index2 = 0, length = arguments.length; index2 < length; index2 += 1) { + arguments[index2].forEach(collectType); + } + return result; + } + function Schema2(definition3) { + this.include = definition3.include || []; + this.implicit = definition3.implicit || []; + this.explicit = definition3.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); + } + Schema2.DEFAULT = null; + Schema2.create = function createSchema() { + var schemas, types2; + switch (arguments.length) { + case 1: + schemas = Schema2.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(schema) { + return schema instanceof Schema2; + })) { + 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 Schema2({ + include: schemas, + explicit: types2 + }); + }; + module2.exports = Schema2; + } +}); + +// ../../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/type/str.js +var require_str = __commonJS({ + "../../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/type/str.js"(exports2, module2) { + "use strict"; + var Type = require_type(); + module2.exports = new Type("tag:yaml.org,2002:str", { + kind: "scalar", + construct: function(data2) { + return data2 !== null ? data2 : ""; + } + }); + } +}); + +// ../../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/type/seq.js +var require_seq = __commonJS({ + "../../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/type/seq.js"(exports2, module2) { + "use strict"; + var Type = require_type(); + module2.exports = new Type("tag:yaml.org,2002:seq", { + kind: "sequence", + construct: function(data2) { + return data2 !== null ? data2 : []; + } + }); + } +}); + +// ../../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/type/map.js +var require_map = __commonJS({ + "../../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/type/map.js"(exports2, module2) { + "use strict"; + var Type = require_type(); + module2.exports = new Type("tag:yaml.org,2002:map", { + kind: "mapping", + construct: function(data2) { + return data2 !== null ? data2 : {}; + } + }); + } +}); + +// ../../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/schema/failsafe.js +var require_failsafe = __commonJS({ + "../../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/schema/failsafe.js"(exports2, module2) { + "use strict"; + var Schema2 = require_schema(); + module2.exports = new Schema2({ + explicit: [ + require_str(), + require_seq(), + require_map() + ] + }); + } +}); + +// ../../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/type/null.js +var require_null = __commonJS({ + "../../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/type/null.js"(exports2, module2) { + "use strict"; + var Type = require_type(); + function resolveYamlNull(data2) { + if (data2 === null) return true; + var max = data2.length; + return max === 1 && data2 === "~" || max === 4 && (data2 === "null" || data2 === "Null" || data2 === "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"; + } + }, + defaultStyle: "lowercase" + }); + } +}); + +// ../../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/type/bool.js +var require_bool = __commonJS({ + "../../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/type/bool.js"(exports2, module2) { + "use strict"; + var Type = require_type(); + function resolveYamlBoolean(data2) { + if (data2 === null) return false; + var max = data2.length; + return max === 4 && (data2 === "true" || data2 === "True" || data2 === "TRUE") || max === 5 && (data2 === "false" || data2 === "False" || data2 === "FALSE"); + } + function constructYamlBoolean(data2) { + return data2 === "true" || data2 === "True" || data2 === "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/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/type/int.js +var require_int = __commonJS({ + "../../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/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(data2) { + if (data2 === null) return false; + var max = data2.length, index2 = 0, hasDigits = false, ch; + if (!max) return false; + ch = data2[index2]; + if (ch === "-" || ch === "+") { + ch = data2[++index2]; + } + if (ch === "0") { + if (index2 + 1 === max) return true; + ch = data2[++index2]; + if (ch === "b") { + index2++; + for (; index2 < max; index2++) { + ch = data2[index2]; + if (ch === "_") continue; + if (ch !== "0" && ch !== "1") return false; + hasDigits = true; + } + return hasDigits && ch !== "_"; + } + if (ch === "x") { + index2++; + for (; index2 < max; index2++) { + ch = data2[index2]; + if (ch === "_") continue; + if (!isHexCode(data2.charCodeAt(index2))) return false; + hasDigits = true; + } + return hasDigits && ch !== "_"; + } + for (; index2 < max; index2++) { + ch = data2[index2]; + if (ch === "_") continue; + if (!isOctCode(data2.charCodeAt(index2))) return false; + hasDigits = true; + } + return hasDigits && ch !== "_"; + } + if (ch === "_") return false; + for (; index2 < max; index2++) { + ch = data2[index2]; + if (ch === "_") continue; + if (ch === ":") break; + if (!isDecCode(data2.charCodeAt(index2))) { + return false; + } + hasDigits = true; + } + if (!hasDigits || ch === "_") return false; + if (ch !== ":") return true; + return /^(:[0-5]?[0-9])+$/.test(data2.slice(index2)); + } + function constructYamlInteger(data2) { + var value = data2, 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)); + } + 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 ? "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"] + } + }); + } +}); + +// ../../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/type/float.js +var require_float = __commonJS({ + "../../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/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|[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(data2) { + if (data2 === null) return false; + if (!YAML_FLOAT_PATTERN.test(data2) || // Quick hack to not allow integers end with `_` + // Probably should update regexp & check speed + data2[data2.length - 1] === "_") { + return false; + } + return true; + } + function constructYamlFloat(data2) { + var value, sign, base, digits; + value = data2.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)); + } + module2.exports = new Type("tag:yaml.org,2002:float", { + kind: "scalar", + resolve: resolveYamlFloat, + construct: constructYamlFloat, + predicate: isFloat, + represent: representYamlFloat, + defaultStyle: "lowercase" + }); + } +}); + +// ../../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/schema/json.js +var require_json = __commonJS({ + "../../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/schema/json.js"(exports2, module2) { + "use strict"; + var Schema2 = require_schema(); + module2.exports = new Schema2({ + include: [ + require_failsafe() + ], + implicit: [ + require_null(), + require_bool(), + require_int(), + require_float() + ] + }); + } +}); + +// ../../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/schema/core.js +var require_core = __commonJS({ + "../../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/schema/core.js"(exports2, module2) { + "use strict"; + var Schema2 = require_schema(); + module2.exports = new Schema2({ + include: [ + require_json() + ] + }); + } +}); + +// ../../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/type/timestamp.js +var require_timestamp = __commonJS({ + "../../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/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(data2) { + if (data2 === null) return false; + if (YAML_DATE_REGEXP.exec(data2) !== null) return true; + if (YAML_TIMESTAMP_REGEXP.exec(data2) !== null) return true; + return false; + } + function constructYamlTimestamp(data2) { + var match, year, month, day, hour, minute, second, fraction = 0, delta = null, tz_hour, tz_minute, date; + match = YAML_DATE_REGEXP.exec(data2); + if (match === null) match = YAML_TIMESTAMP_REGEXP.exec(data2); + 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/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/type/merge.js +var require_merge = __commonJS({ + "../../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/type/merge.js"(exports2, module2) { + "use strict"; + var Type = require_type(); + function resolveYamlMerge(data2) { + return data2 === "<<" || data2 === null; + } + module2.exports = new Type("tag:yaml.org,2002:merge", { + kind: "scalar", + resolve: resolveYamlMerge + }); + } +}); + +// ../../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/type/binary.js +var require_binary = __commonJS({ + "../../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/type/binary.js"(exports2, module2) { + "use strict"; + var NodeBuffer; + try { + _require = __require; + NodeBuffer = _require("buffer").Buffer; + } catch (__) { + } + var _require; + var Type = require_type(); + var BASE64_MAP = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r"; + function resolveYamlBinary(data2) { + if (data2 === null) return false; + var code4, idx, bitlen = 0, max = data2.length, map3 = BASE64_MAP; + for (idx = 0; idx < max; idx++) { + code4 = map3.indexOf(data2.charAt(idx)); + if (code4 > 64) continue; + if (code4 < 0) return false; + bitlen += 6; + } + return bitlen % 8 === 0; + } + function constructYamlBinary(data2) { + var idx, tailbits, input = data2.replace(/[\r\n=]/g, ""), max = input.length, map3 = 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 | map3.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, map3 = BASE64_MAP; + for (idx = 0; idx < max; idx++) { + if (idx % 3 === 0 && idx) { + result += map3[bits >> 18 & 63]; + result += map3[bits >> 12 & 63]; + result += map3[bits >> 6 & 63]; + result += map3[bits & 63]; + } + bits = (bits << 8) + object[idx]; + } + tail = max % 3; + if (tail === 0) { + result += map3[bits >> 18 & 63]; + result += map3[bits >> 12 & 63]; + result += map3[bits >> 6 & 63]; + result += map3[bits & 63]; + } else if (tail === 2) { + result += map3[bits >> 10 & 63]; + result += map3[bits >> 4 & 63]; + result += map3[bits << 2 & 63]; + result += map3[64]; + } else if (tail === 1) { + result += map3[bits >> 2 & 63]; + result += map3[bits << 4 & 63]; + result += map3[64]; + result += map3[64]; + } + return result; + } + function isBinary(object) { + return NodeBuffer && NodeBuffer.isBuffer(object); + } + module2.exports = new Type("tag:yaml.org,2002:binary", { + kind: "scalar", + resolve: resolveYamlBinary, + construct: constructYamlBinary, + predicate: isBinary, + represent: representYamlBinary + }); + } +}); + +// ../../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/type/omap.js +var require_omap = __commonJS({ + "../../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/type/omap.js"(exports2, module2) { + "use strict"; + var Type = require_type(); + var _hasOwnProperty = Object.prototype.hasOwnProperty; + var _toString = Object.prototype.toString; + function resolveYamlOmap(data2) { + if (data2 === null) return true; + var objectKeys = {}, index2, length, pair, pairKey, pairHasKey, object = data2; + for (index2 = 0, length = object.length; index2 < length; index2 += 1) { + pair = object[index2]; + 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 (_hasOwnProperty.call(objectKeys, pairKey)) return false; + Object.defineProperty(objectKeys, pairKey, { value: true }); + } + return true; + } + function constructYamlOmap(data2) { + return data2 !== null ? data2 : []; + } + module2.exports = new Type("tag:yaml.org,2002:omap", { + kind: "sequence", + resolve: resolveYamlOmap, + construct: constructYamlOmap + }); + } +}); + +// ../../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/type/pairs.js +var require_pairs = __commonJS({ + "../../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/type/pairs.js"(exports2, module2) { + "use strict"; + var Type = require_type(); + var _toString = Object.prototype.toString; + function resolveYamlPairs(data2) { + if (data2 === null) return true; + var index2, length, pair, keys2, result, object = data2; + result = new Array(object.length); + for (index2 = 0, length = object.length; index2 < length; index2 += 1) { + pair = object[index2]; + if (_toString.call(pair) !== "[object Object]") return false; + keys2 = Object.keys(pair); + if (keys2.length !== 1) return false; + result[index2] = [keys2[0], pair[keys2[0]]]; + } + return true; + } + function constructYamlPairs(data2) { + if (data2 === null) return []; + var index2, length, pair, keys2, result, object = data2; + result = new Array(object.length); + for (index2 = 0, length = object.length; index2 < length; index2 += 1) { + pair = object[index2]; + keys2 = Object.keys(pair); + result[index2] = [keys2[0], pair[keys2[0]]]; + } + return result; + } + module2.exports = new Type("tag:yaml.org,2002:pairs", { + kind: "sequence", + resolve: resolveYamlPairs, + construct: constructYamlPairs + }); + } +}); + +// ../../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/type/set.js +var require_set = __commonJS({ + "../../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/type/set.js"(exports2, module2) { + "use strict"; + var Type = require_type(); + var _hasOwnProperty = Object.prototype.hasOwnProperty; + function resolveYamlSet(data2) { + if (data2 === null) return true; + var key, object = data2; + for (key in object) { + if (_hasOwnProperty.call(object, key)) { + if (object[key] !== null) return false; + } + } + return true; + } + function constructYamlSet(data2) { + return data2 !== null ? data2 : {}; + } + module2.exports = new Type("tag:yaml.org,2002:set", { + kind: "mapping", + resolve: resolveYamlSet, + construct: constructYamlSet + }); + } +}); + +// ../../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/schema/default_safe.js +var require_default_safe = __commonJS({ + "../../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/schema/default_safe.js"(exports2, module2) { + "use strict"; + var Schema2 = require_schema(); + module2.exports = new Schema2({ + include: [ + require_core() + ], + implicit: [ + require_timestamp(), + require_merge() + ], + explicit: [ + require_binary(), + require_omap(), + require_pairs(), + require_set() + ] + }); + } +}); + +// ../../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/type/js/undefined.js +var require_undefined = __commonJS({ + "../../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/type/js/undefined.js"(exports2, module2) { + "use strict"; + var Type = require_type(); + function resolveJavascriptUndefined() { + return true; + } + function constructJavascriptUndefined() { + return void 0; + } + function representJavascriptUndefined() { + return ""; + } + function isUndefined(object) { + return typeof object === "undefined"; + } + module2.exports = new Type("tag:yaml.org,2002:js/undefined", { + kind: "scalar", + resolve: resolveJavascriptUndefined, + construct: constructJavascriptUndefined, + predicate: isUndefined, + represent: representJavascriptUndefined + }); + } +}); + +// ../../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/type/js/regexp.js +var require_regexp = __commonJS({ + "../../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/type/js/regexp.js"(exports2, module2) { + "use strict"; + var Type = require_type(); + function resolveJavascriptRegExp(data2) { + if (data2 === null) return false; + if (data2.length === 0) return false; + var regexp = data2, tail = /\/([gim]*)$/.exec(data2), 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(data2) { + var regexp = data2, tail = /\/([gim]*)$/.exec(data2), 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]"; + } + module2.exports = new Type("tag:yaml.org,2002:js/regexp", { + kind: "scalar", + resolve: resolveJavascriptRegExp, + construct: constructJavascriptRegExp, + predicate: isRegExp, + represent: representJavascriptRegExp + }); + } +}); + +// ../../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/type/js/function.js +var require_function = __commonJS({ + "../../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/type/js/function.js"(exports2, module2) { + "use strict"; + var esprima; + try { + _require = __require; + esprima = _require("esprima"); + } catch (_) { + if (typeof window !== "undefined") esprima = window.esprima; + } + var _require; + var Type = require_type(); + function resolveJavascriptFunction(data2) { + if (data2 === null) return false; + try { + var source = "(" + data2 + ")", 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(data2) { + var source = "(" + data2 + ")", ast = esprima.parse(source, { range: true }), params = [], body; + if (ast.type !== "Program" || ast.body.length !== 1 || ast.body[0].type !== "ExpressionStatement" || ast.body[0].expression.type !== "ArrowFunctionExpression" && ast.body[0].expression.type !== "FunctionExpression") { + throw new Error("Failed to resolve function"); + } + ast.body[0].expression.params.forEach(function(param) { + params.push(param.name); + }); + body = ast.body[0].expression.body.range; + if (ast.body[0].expression.body.type === "BlockStatement") { + return new Function(params, source.slice(body[0] + 1, body[1] - 1)); + } + return new Function(params, "return " + source.slice(body[0], body[1])); + } + function representJavascriptFunction(object) { + return object.toString(); + } + function isFunction(object) { + return Object.prototype.toString.call(object) === "[object Function]"; + } + module2.exports = new Type("tag:yaml.org,2002:js/function", { + kind: "scalar", + resolve: resolveJavascriptFunction, + construct: constructJavascriptFunction, + predicate: isFunction, + represent: representJavascriptFunction + }); + } +}); + +// ../../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/schema/default_full.js +var require_default_full = __commonJS({ + "../../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/schema/default_full.js"(exports2, module2) { + "use strict"; + var Schema2 = require_schema(); + module2.exports = Schema2.DEFAULT = new Schema2({ + include: [ + require_default_safe() + ], + explicit: [ + require_undefined(), + require_regexp(), + require_function() + ] + }); + } +}); + +// ../../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/loader.js +var require_loader = __commonJS({ + "../../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/loader.js"(exports2, module2) { + "use strict"; + var common = require_common(); + var YAMLException = require_exception(); + var Mark = require_mark(); + var DEFAULT_SAFE_SCHEMA = require_default_safe(); + var DEFAULT_FULL_SCHEMA = require_default_full(); + var _hasOwnProperty = Object.prototype.hasOwnProperty; + var CONTEXT_FLOW_IN = 1; + var CONTEXT_FLOW_OUT = 2; + var CONTEXT_BLOCK_IN = 3; + var CONTEXT_BLOCK_OUT = 4; + var CHOMPING_CLIP = 1; + var CHOMPING_STRIP = 2; + var CHOMPING_KEEP = 3; + var PATTERN_NON_PRINTABLE = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/; + var PATTERN_NON_ASCII_LINE_BREAKS = /[\x85\u2028\u2029]/; + var PATTERN_FLOW_INDICATORS = /[,\[\]\{\}]/; + var PATTERN_TAG_HANDLE = /^(?:!|!!|![a-z\-]+!)$/i; + var PATTERN_TAG_URI = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i; + function _class(obj) { + return Object.prototype.toString.call(obj); + } + function is_EOL(c) { + return c === 10 || c === 13; + } + function is_WHITE_SPACE(c) { + return c === 9 || c === 32; + } + function is_WS_OR_EOL(c) { + return c === 9 || c === 32 || c === 10 || c === 13; + } + function is_FLOW_INDICATOR(c) { + return c === 44 || c === 91 || c === 93 || c === 123 || c === 125; + } + function fromHexCode(c) { + var lc; + if (48 <= c && c <= 57) { + return c - 48; + } + lc = c | 32; + if (97 <= lc && lc <= 102) { + return lc - 97 + 10; + } + return -1; + } + function escapedHexLen(c) { + if (c === 120) { + return 2; + } + if (c === 117) { + return 4; + } + if (c === 85) { + return 8; + } + return 0; + } + function fromDecimalCode(c) { + if (48 <= c && c <= 57) { + return c - 48; + } + return -1; + } + function simpleEscapeSequence(c) { + return c === 48 ? "\0" : c === 97 ? "\x07" : c === 98 ? "\b" : c === 116 ? " " : c === 9 ? " " : c === 110 ? "\n" : c === 118 ? "\v" : c === 102 ? "\f" : c === 114 ? "\r" : c === 101 ? "\x1B" : c === 32 ? " " : c === 34 ? '"' : c === 47 ? "/" : c === 92 ? "\\" : c === 78 ? "\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 + ); + } + function setProperty(object, key, value) { + if (key === "__proto__") { + Object.defineProperty(object, key, { + configurable: true, + enumerable: true, + writable: true, + value + }); + } else { + object[key] = value; + } + } + var simpleEscapeCheck = new Array(256); + var simpleEscapeMap = new Array(256); + for (i = 0; i < 256; i++) { + simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0; + simpleEscapeMap[i] = simpleEscapeSequence(i); + } + var i; + function State2(input, options2) { + this.input = input; + this.filename = options2["filename"] || null; + this.schema = options2["schema"] || DEFAULT_FULL_SCHEMA; + this.onWarning = options2["onWarning"] || null; + this.legacy = options2["legacy"] || false; + this.json = options2["json"] || false; + this.listener = options2["listener"] || null; + this.maxTotalMergeKeys = typeof options2["maxTotalMergeKeys"] === "number" ? options2["maxTotalMergeKeys"] : 1e4; + 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.totalMergeKeys = 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, name2, 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, name2, args) { + var handle2, prefix; + if (args.length !== 2) { + throwError(state, "TAG directive accepts exactly two arguments"); + } + handle2 = args[0]; + prefix = args[1]; + if (!PATTERN_TAG_HANDLE.test(handle2)) { + throwError(state, "ill-formed tag handle (first argument) of the TAG directive"); + } + if (_hasOwnProperty.call(state.tagMap, handle2)) { + throwError(state, 'there is a previously declared suffix for "' + handle2 + '" tag handle'); + } + if (!PATTERN_TAG_URI.test(prefix)) { + throwError(state, "ill-formed tag prefix (second argument) of the TAG directive"); + } + state.tagMap[handle2] = prefix; + } + }; + function captureSegment(state, start2, end, checkJson) { + var _position, _length, _character, _result; + if (start2 < end) { + _result = state.input.slice(start2, 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 chargeMergeWork(state) { + state.totalMergeKeys += 1; + if (state.maxTotalMergeKeys !== -1 && state.totalMergeKeys > state.maxTotalMergeKeys) { + throwError(state, "merge keys exceeded maxTotalMergeKeys (" + state.maxTotalMergeKeys + ")"); + } + } + function mergeMappings(state, destination, source, overridableKeys) { + var sourceKeys, key, index2, quantity; + if (!common.isObject(source)) { + throwError(state, "cannot merge mappings; the provided source object is unacceptable"); + } + chargeMergeWork(state); + sourceKeys = Object.keys(source); + for (index2 = 0, quantity = sourceKeys.length; index2 < quantity; index2 += 1) { + key = sourceKeys[index2]; + chargeMergeWork(state); + if (!_hasOwnProperty.call(destination, key)) { + setProperty(destination, key, source[key]); + overridableKeys[key] = true; + } + } + } + function storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, startLine, startPos) { + var index2, quantity; + if (Array.isArray(keyNode)) { + keyNode = Array.prototype.slice.call(keyNode); + for (index2 = 0, quantity = keyNode.length; index2 < quantity; index2 += 1) { + if (Array.isArray(keyNode[index2])) { + throwError(state, "nested arrays are not supported inside keys"); + } + if (typeof keyNode === "object" && _class(keyNode[index2]) === "[object Object]") { + keyNode[index2] = "[object Object]"; + } + } + } + if (typeof keyNode === "object" && _class(keyNode) === "[object Object]") { + keyNode = "[object Object]"; + } + keyNode = String(keyNode); + if (_result === null) { + _result = {}; + } + if (keyTag === "tag:yaml.org,2002:merge") { + if (Array.isArray(valueNode)) { + if (valueNode.length > 100) { + throwError(state, "abnormal merge sequence size"); + } + for (index2 = 0, quantity = valueNode.length; index2 < quantity; index2 += 1) { + mergeMappings(state, _result, valueNode[index2], overridableKeys); + } + } else { + mergeMappings(state, _result, valueNode, overridableKeys); + } + } else { + if (!state.json && !_hasOwnProperty.call(overridableKeys, keyNode) && _hasOwnProperty.call(_result, keyNode)) { + state.line = startLine || state.line; + state.position = startPos || state.position; + throwError(state, "duplicated mapping key"); + } + setProperty(_result, keyNode, valueNode); + delete overridableKeys[keyNode]; + } + return _result; + } + function readLineBreak(state) { + var ch; + ch = state.input.charCodeAt(state.position); + if (ch === 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 (!_hasOwnProperty.call(state.anchorMap, alias)) { + throwError(state, 'unidentified alias "' + alias + '"'); + } + state.result = state.anchorMap[alias]; + skipSeparationSpace(state, true, -1); + return true; + } + function composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact) { + var allowBlockStyles, allowBlockScalars, allowBlockCollections, indentStatus = 1, atNewLine = false, hasContent = false, typeIndex, typeQuantity, type, flowIndent, blockIndent; + if (state.listener !== null) { + state.listener("open", state); + } + state.tag = null; + state.anchor = null; + state.kind = null; + state.result = null; + allowBlockStyles = allowBlockScalars = allowBlockCollections = CONTEXT_BLOCK_OUT === nodeContext || CONTEXT_BLOCK_IN === nodeContext; + if (allowToSeek) { + if (skipSeparationSpace(state, true, -1)) { + atNewLine = true; + if (state.lineIndent > parentIndent) { + indentStatus = 1; + } else if (state.lineIndent === parentIndent) { + indentStatus = 0; + } else if (state.lineIndent < parentIndent) { + indentStatus = -1; + } + } + } + if (indentStatus === 1) { + while (readTagProperty(state) || readAnchorProperty(state)) { + if (skipSeparationSpace(state, true, -1)) { + atNewLine = true; + allowBlockCollections = allowBlockStyles; + if (state.lineIndent > parentIndent) { + indentStatus = 1; + } else if (state.lineIndent === parentIndent) { + indentStatus = 0; + } else if (state.lineIndent < parentIndent) { + indentStatus = -1; + } + } else { + allowBlockCollections = false; + } + } + } + if (allowBlockCollections) { + allowBlockCollections = atNewLine || allowCompact; + } + if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) { + if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) { + flowIndent = parentIndent; + } else { + flowIndent = parentIndent + 1; + } + blockIndent = state.position - state.lineStart; + if (indentStatus === 1) { + if (allowBlockCollections && (readBlockSequence(state, blockIndent) || readBlockMapping(state, blockIndent, flowIndent)) || readFlowCollection(state, flowIndent)) { + hasContent = true; + } else { + if (allowBlockScalars && readBlockScalar(state, flowIndent) || readSingleQuotedScalar(state, flowIndent) || readDoubleQuotedScalar(state, flowIndent)) { + hasContent = true; + } else if (readAlias(state)) { + hasContent = true; + if (state.tag !== null || state.anchor !== null) { + throwError(state, "alias node should not have any properties"); + } + } else if (readPlainScalar(state, flowIndent, CONTEXT_FLOW_IN === nodeContext)) { + hasContent = true; + if (state.tag === null) { + state.tag = "?"; + } + } + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; + } + } + } else if (indentStatus === 0) { + hasContent = allowBlockCollections && readBlockSequence(state, blockIndent); + } + } + if (state.tag !== null && state.tag !== "!") { + if (state.tag === "?") { + if (state.result !== null && state.kind !== "scalar") { + throwError(state, 'unacceptable node kind for ! tag; it should be "scalar", not "' + state.kind + '"'); + } + for (typeIndex = 0, typeQuantity = state.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) { + type = state.implicitTypes[typeIndex]; + if (type.resolve(state.result)) { + state.result = type.construct(state.result); + state.tag = type.tag; + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; + } + break; + } + } + } else if (_hasOwnProperty.call(state.typeMap[state.kind || "fallback"], state.tag)) { + type = state.typeMap[state.kind || "fallback"][state.tag]; + if (state.result !== null && type.kind !== state.kind) { + throwError(state, "unacceptable node kind for !<" + state.tag + '> tag; it should be "' + type.kind + '", not "' + state.kind + '"'); + } + if (!type.resolve(state.result)) { + throwError(state, "cannot resolve a node with !<" + state.tag + "> explicit tag"); + } else { + state.result = type.construct(state.result); + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; + } + } + } else { + throwError(state, "unknown tag !<" + state.tag + ">"); + } + } + if (state.listener !== null) { + state.listener("close", state); + } + return state.tag !== null || state.anchor !== null || hasContent; + } + function readDocument(state) { + var documentStart = state.position, _position, directiveName, directiveArgs, hasDirectives = false, ch; + state.version = null; + state.checkLineBreaks = state.legacy; + state.tagMap = {}; + state.anchorMap = {}; + while ((ch = state.input.charCodeAt(state.position)) !== 0) { + skipSeparationSpace(state, true, -1); + ch = state.input.charCodeAt(state.position); + if (state.lineIndent > 0 || ch !== 37) { + break; + } + hasDirectives = true; + ch = state.input.charCodeAt(++state.position); + _position = state.position; + while (ch !== 0 && !is_WS_OR_EOL(ch)) { + ch = state.input.charCodeAt(++state.position); + } + directiveName = state.input.slice(_position, state.position); + directiveArgs = []; + if (directiveName.length < 1) { + throwError(state, "directive name must not be less than one character in length"); + } + while (ch !== 0) { + while (is_WHITE_SPACE(ch)) { + ch = state.input.charCodeAt(++state.position); + } + if (ch === 35) { + do { + ch = state.input.charCodeAt(++state.position); + } while (ch !== 0 && !is_EOL(ch)); + break; + } + if (is_EOL(ch)) break; + _position = state.position; + while (ch !== 0 && !is_WS_OR_EOL(ch)) { + ch = state.input.charCodeAt(++state.position); + } + directiveArgs.push(state.input.slice(_position, state.position)); + } + if (ch !== 0) readLineBreak(state); + if (_hasOwnProperty.call(directiveHandlers, directiveName)) { + directiveHandlers[directiveName](state, directiveName, directiveArgs); + } else { + throwWarning(state, 'unknown document directive "' + directiveName + '"'); + } + } + skipSeparationSpace(state, true, -1); + if (state.lineIndent === 0 && state.input.charCodeAt(state.position) === 45 && state.input.charCodeAt(state.position + 1) === 45 && state.input.charCodeAt(state.position + 2) === 45) { + state.position += 3; + skipSeparationSpace(state, true, -1); + } else if (hasDirectives) { + throwError(state, "directives end mark is expected"); + } + composeNode(state, state.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true); + skipSeparationSpace(state, true, -1); + if (state.checkLineBreaks && PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart, state.position))) { + throwWarning(state, "non-ASCII line breaks are interpreted as content"); + } + state.documents.push(state.result); + if (state.position === state.lineStart && testDocumentSeparator(state)) { + if (state.input.charCodeAt(state.position) === 46) { + state.position += 3; + skipSeparationSpace(state, true, -1); + } + return; + } + if (state.position < state.length - 1) { + throwError(state, "end of the stream or a document separator is expected"); + } else { + return; + } + } + function loadDocuments(input, options2) { + input = String(input); + options2 = options2 || {}; + if (input.length !== 0) { + if (input.charCodeAt(input.length - 1) !== 10 && input.charCodeAt(input.length - 1) !== 13) { + input += "\n"; + } + if (input.charCodeAt(0) === 65279) { + input = input.slice(1); + } + } + var state = new State2(input, options2); + 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, options2) { + if (iterator !== null && typeof iterator === "object" && typeof options2 === "undefined") { + options2 = iterator; + iterator = null; + } + var documents = loadDocuments(input, options2); + if (typeof iterator !== "function") { + return documents; + } + for (var index2 = 0, length = documents.length; index2 < length; index2 += 1) { + iterator(documents[index2]); + } + } + function load(input, options2) { + var documents = loadDocuments(input, options2); + 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, iterator, options2) { + if (typeof iterator === "object" && iterator !== null && typeof options2 === "undefined") { + options2 = iterator; + iterator = null; + } + return loadAll(input, iterator, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options2)); + } + function safeLoad(input, options2) { + return load(input, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options2)); + } + module2.exports.loadAll = loadAll; + module2.exports.load = load; + module2.exports.safeLoadAll = safeLoadAll; + module2.exports.safeLoad = safeLoad; + } +}); + +// ../../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/dumper.js +var require_dumper = __commonJS({ + "../../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml/dumper.js"(exports2, module2) { + "use strict"; + var common = require_common(); + var YAMLException = require_exception(); + var DEFAULT_FULL_SCHEMA = require_default_full(); + var DEFAULT_SAFE_SCHEMA = require_default_safe(); + var _toString = Object.prototype.toString; + var _hasOwnProperty = Object.prototype.hasOwnProperty; + var CHAR_TAB = 9; + var CHAR_LINE_FEED = 10; + var CHAR_CARRIAGE_RETURN = 13; + var CHAR_SPACE = 32; + var CHAR_EXCLAMATION = 33; + var CHAR_DOUBLE_QUOTE = 34; + var CHAR_SHARP = 35; + var CHAR_PERCENT = 37; + var CHAR_AMPERSAND = 38; + var CHAR_SINGLE_QUOTE = 39; + var CHAR_ASTERISK = 42; + var CHAR_COMMA = 44; + var CHAR_MINUS = 45; + var CHAR_COLON = 58; + var CHAR_EQUALS = 61; + var CHAR_GREATER_THAN = 62; + var CHAR_QUESTION = 63; + var CHAR_COMMERCIAL_AT = 64; + var CHAR_LEFT_SQUARE_BRACKET = 91; + var CHAR_RIGHT_SQUARE_BRACKET = 93; + var CHAR_GRAVE_ACCENT = 96; + var CHAR_LEFT_CURLY_BRACKET = 123; + var CHAR_VERTICAL_LINE = 124; + var CHAR_RIGHT_CURLY_BRACKET = 125; + var ESCAPE_SEQUENCES = {}; + ESCAPE_SEQUENCES[0] = "\\0"; + ESCAPE_SEQUENCES[7] = "\\a"; + ESCAPE_SEQUENCES[8] = "\\b"; + ESCAPE_SEQUENCES[9] = "\\t"; + ESCAPE_SEQUENCES[10] = "\\n"; + ESCAPE_SEQUENCES[11] = "\\v"; + ESCAPE_SEQUENCES[12] = "\\f"; + ESCAPE_SEQUENCES[13] = "\\r"; + ESCAPE_SEQUENCES[27] = "\\e"; + ESCAPE_SEQUENCES[34] = '\\"'; + ESCAPE_SEQUENCES[92] = "\\\\"; + ESCAPE_SEQUENCES[133] = "\\N"; + ESCAPE_SEQUENCES[160] = "\\_"; + ESCAPE_SEQUENCES[8232] = "\\L"; + ESCAPE_SEQUENCES[8233] = "\\P"; + var DEPRECATED_BOOLEANS_SYNTAX = [ + "y", + "Y", + "yes", + "Yes", + "YES", + "on", + "On", + "ON", + "n", + "N", + "no", + "No", + "NO", + "off", + "Off", + "OFF" + ]; + function compileStyleMap(schema, map3) { + var result, keys2, index2, length, tag, style, type; + if (map3 === null) return {}; + result = {}; + keys2 = Object.keys(map3); + for (index2 = 0, length = keys2.length; index2 < length; index2 += 1) { + tag = keys2[index2]; + style = String(map3[tag]); + if (tag.slice(0, 2) === "!!") { + tag = "tag:yaml.org,2002:" + tag.slice(2); + } + type = schema.compiledTypeMap["fallback"][tag]; + if (type && _hasOwnProperty.call(type.styleAliases, style)) { + style = type.styleAliases[style]; + } + result[tag] = style; + } + return result; + } + function encodeHex(character) { + var string3, handle2, length; + string3 = character.toString(16).toUpperCase(); + if (character <= 255) { + handle2 = "x"; + length = 2; + } else if (character <= 65535) { + handle2 = "u"; + length = 4; + } else if (character <= 4294967295) { + handle2 = "U"; + length = 8; + } else { + throw new YAMLException("code point within a string may not be greater than 0xFFFFFFFF"); + } + return "\\" + handle2 + common.repeat("0", length - string3.length) + string3; + } + function State2(options2) { + this.schema = options2["schema"] || DEFAULT_FULL_SCHEMA; + this.indent = Math.max(1, options2["indent"] || 2); + this.noArrayIndent = options2["noArrayIndent"] || false; + this.skipInvalid = options2["skipInvalid"] || false; + this.flowLevel = common.isNothing(options2["flowLevel"]) ? -1 : options2["flowLevel"]; + this.styleMap = compileStyleMap(this.schema, options2["styles"] || null); + this.sortKeys = options2["sortKeys"] || false; + this.lineWidth = options2["lineWidth"] || 80; + this.noRefs = options2["noRefs"] || false; + this.noCompatMode = options2["noCompatMode"] || false; + this.condenseFlow = options2["condenseFlow"] || false; + this.implicitTypes = this.schema.compiledImplicit; + this.explicitTypes = this.schema.compiledExplicit; + this.tag = null; + this.result = ""; + this.duplicates = []; + this.usedDuplicates = null; + } + function indentString(string3, spaces) { + var ind = common.repeat(" ", spaces), position3 = 0, next = -1, result = "", line, length = string3.length; + while (position3 < length) { + next = string3.indexOf("\n", position3); + if (next === -1) { + line = string3.slice(position3); + position3 = length; + } else { + line = string3.slice(position3, next + 1); + position3 = 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, str2) { + var index2, length, type; + for (index2 = 0, length = state.implicitTypes.length; index2 < length; index2 += 1) { + type = state.implicitTypes[index2]; + if (type.resolve(str2)) { + return true; + } + } + return false; + } + function isWhitespace(c) { + return c === CHAR_SPACE || c === CHAR_TAB; + } + function isPrintable(c) { + return 32 <= c && c <= 126 || 161 <= c && c <= 55295 && c !== 8232 && c !== 8233 || 57344 <= c && c <= 65533 && c !== 65279 || 65536 <= c && c <= 1114111; + } + function isNsChar(c) { + return isPrintable(c) && !isWhitespace(c) && c !== 65279 && c !== CHAR_CARRIAGE_RETURN && c !== CHAR_LINE_FEED; + } + function isPlainSafe(c, prev) { + return isPrintable(c) && c !== 65279 && c !== CHAR_COMMA && c !== CHAR_LEFT_SQUARE_BRACKET && c !== CHAR_RIGHT_SQUARE_BRACKET && c !== CHAR_LEFT_CURLY_BRACKET && c !== CHAR_RIGHT_CURLY_BRACKET && c !== CHAR_COLON && (c !== CHAR_SHARP || prev && isNsChar(prev)); + } + function isPlainSafeFirst(c) { + return isPrintable(c) && c !== 65279 && !isWhitespace(c) && c !== CHAR_MINUS && c !== CHAR_QUESTION && c !== CHAR_COLON && c !== CHAR_COMMA && c !== CHAR_LEFT_SQUARE_BRACKET && c !== CHAR_RIGHT_SQUARE_BRACKET && c !== CHAR_LEFT_CURLY_BRACKET && c !== CHAR_RIGHT_CURLY_BRACKET && c !== CHAR_SHARP && c !== CHAR_AMPERSAND && c !== CHAR_ASTERISK && c !== CHAR_EXCLAMATION && c !== CHAR_VERTICAL_LINE && c !== CHAR_EQUALS && c !== CHAR_GREATER_THAN && c !== CHAR_SINGLE_QUOTE && c !== CHAR_DOUBLE_QUOTE && c !== CHAR_PERCENT && c !== CHAR_COMMERCIAL_AT && c !== CHAR_GRAVE_ACCENT; + } + function needIndentIndicator(string3) { + var leadingSpaceRe = /^\n* /; + return leadingSpaceRe.test(string3); + } + var STYLE_PLAIN = 1; + var STYLE_SINGLE = 2; + var STYLE_LITERAL = 3; + var STYLE_FOLDED = 4; + var STYLE_DOUBLE = 5; + function chooseScalarStyle(string3, singleLineOnly, indentPerLevel, lineWidth, testAmbiguousType) { + var i; + var char, prev_char; + var hasLineBreak = false; + var hasFoldableLine = false; + var shouldTrackWidth = lineWidth !== -1; + var previousLineBreak = -1; + var plain = isPlainSafeFirst(string3.charCodeAt(0)) && !isWhitespace(string3.charCodeAt(string3.length - 1)); + if (singleLineOnly) { + for (i = 0; i < string3.length; i++) { + char = string3.charCodeAt(i); + if (!isPrintable(char)) { + return STYLE_DOUBLE; + } + prev_char = i > 0 ? string3.charCodeAt(i - 1) : null; + plain = plain && isPlainSafe(char, prev_char); + } + } else { + for (i = 0; i < string3.length; i++) { + char = string3.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 && string3[previousLineBreak + 1] !== " "; + previousLineBreak = i; + } + } else if (!isPrintable(char)) { + return STYLE_DOUBLE; + } + prev_char = i > 0 ? string3.charCodeAt(i - 1) : null; + plain = plain && isPlainSafe(char, prev_char); + } + hasFoldableLine = hasFoldableLine || shouldTrackWidth && (i - previousLineBreak - 1 > lineWidth && string3[previousLineBreak + 1] !== " "); + } + if (!hasLineBreak && !hasFoldableLine) { + return plain && !testAmbiguousType(string3) ? STYLE_PLAIN : STYLE_SINGLE; + } + if (indentPerLevel > 9 && needIndentIndicator(string3)) { + return STYLE_DOUBLE; + } + return hasFoldableLine ? STYLE_FOLDED : STYLE_LITERAL; + } + function writeScalar(state, string3, level, iskey) { + state.dump = (function() { + if (string3.length === 0) { + return "''"; + } + if (!state.noCompatMode && DEPRECATED_BOOLEANS_SYNTAX.indexOf(string3) !== -1) { + return "'" + string3 + "'"; + } + var indent3 = state.indent * Math.max(1, level); + var lineWidth = state.lineWidth === -1 ? -1 : Math.max(Math.min(state.lineWidth, 40), state.lineWidth - indent3); + var singleLineOnly = iskey || state.flowLevel > -1 && level >= state.flowLevel; + function testAmbiguity(string4) { + return testImplicitResolving(state, string4); + } + switch (chooseScalarStyle(string3, singleLineOnly, state.indent, lineWidth, testAmbiguity)) { + case STYLE_PLAIN: + return string3; + case STYLE_SINGLE: + return "'" + string3.replace(/'/g, "''") + "'"; + case STYLE_LITERAL: + return "|" + blockHeader(string3, state.indent) + dropEndingNewline(indentString(string3, indent3)); + case STYLE_FOLDED: + return ">" + blockHeader(string3, state.indent) + dropEndingNewline(indentString(foldString(string3, lineWidth), indent3)); + case STYLE_DOUBLE: + return '"' + escapeString(string3, lineWidth) + '"'; + default: + throw new YAMLException("impossible error: invalid scalar style"); + } + })(); + } + function blockHeader(string3, indentPerLevel) { + var indentIndicator = needIndentIndicator(string3) ? String(indentPerLevel) : ""; + var clip = string3[string3.length - 1] === "\n"; + var keep = clip && (string3[string3.length - 2] === "\n" || string3 === "\n"); + var chomp = keep ? "+" : clip ? "" : "-"; + return indentIndicator + chomp + "\n"; + } + function dropEndingNewline(string3) { + return string3[string3.length - 1] === "\n" ? string3.slice(0, -1) : string3; + } + function foldString(string3, width) { + var lineRe = /(\n+)([^\n]*)/g; + var result = (function() { + var nextLF = string3.indexOf("\n"); + nextLF = nextLF !== -1 ? nextLF : string3.length; + lineRe.lastIndex = nextLF; + return foldLine(string3.slice(0, nextLF), width); + })(); + var prevMoreIndented = string3[0] === "\n" || string3[0] === " "; + var moreIndented; + var match; + while (match = lineRe.exec(string3)) { + 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 start2 = 0, end, curr = 0, next = 0; + var result = ""; + while (match = breakRe.exec(line)) { + next = match.index; + if (next - start2 > width) { + end = curr > start2 ? curr : next; + result += "\n" + line.slice(start2, end); + start2 = end + 1; + } + curr = next; + } + result += "\n"; + if (line.length - start2 > width && curr > start2) { + result += line.slice(start2, curr) + "\n" + line.slice(curr + 1); + } else { + result += line.slice(start2); + } + return result.slice(1); + } + function escapeString(string3) { + var result = ""; + var char, nextChar; + var escapeSeq; + for (var i = 0; i < string3.length; i++) { + char = string3.charCodeAt(i); + if (char >= 55296 && char <= 56319) { + nextChar = string3.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) ? string3[i] : escapeSeq || encodeHex(char); + } + return result; + } + function writeFlowSequence(state, level, object) { + var _result = "", _tag = state.tag, index2, length; + for (index2 = 0, length = object.length; index2 < length; index2 += 1) { + if (writeNode(state, level, object[index2], false, false)) { + if (index2 !== 0) _result += "," + (!state.condenseFlow ? " " : ""); + _result += state.dump; + } + } + state.tag = _tag; + state.dump = "[" + _result + "]"; + } + function writeBlockSequence(state, level, object, compact) { + var _result = "", _tag = state.tag, index2, length; + for (index2 = 0, length = object.length; index2 < length; index2 += 1) { + if (writeNode(state, level + 1, object[index2], true, true)) { + if (!compact || index2 !== 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), index2, length, objectKey, objectValue, pairBuffer; + for (index2 = 0, length = objectKeyList.length; index2 < length; index2 += 1) { + pairBuffer = ""; + if (index2 !== 0) pairBuffer += ", "; + if (state.condenseFlow) pairBuffer += '"'; + objectKey = objectKeyList[index2]; + 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), index2, 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 (index2 = 0, length = objectKeyList.length; index2 < length; index2 += 1) { + pairBuffer = ""; + if (!compact || index2 !== 0) { + pairBuffer += generateNextLine(state, level); + } + objectKey = objectKeyList[index2]; + 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, index2, length, type, style; + typeList = explicit ? state.explicitTypes : state.implicitTypes; + for (index2 = 0, length = typeList.length; index2 < length; index2 += 1) { + type = typeList[index2]; + if ((type.instanceOf || type.predicate) && (!type.instanceOf || typeof object === "object" && object instanceof type.instanceOf) && (!type.predicate || type.predicate(object))) { + state.tag = explicit ? type.tag : "?"; + if (type.represent) { + style = state.styleMap[type.tag] || type.defaultStyle; + if (_toString.call(type.represent) === "[object Function]") { + _result = type.represent(object, style); + } else if (_hasOwnProperty.call(type.represent, style)) { + _result = type.represent[style](object, style); + } else { + throw new YAMLException("!<" + type.tag + '> tag resolver accepts not "' + style + '" style'); + } + state.dump = _result; + } + return true; + } + } + return false; + } + function writeNode(state, level, object, block, compact, iskey) { + state.tag = null; + state.dump = object; + if (!detectType(state, object, false)) { + detectType(state, object, true); + } + var type = _toString.call(state.dump); + if (block) { + block = state.flowLevel < 0 || state.flowLevel > level; + } + var objectOrArray = type === "[object Object]" || type === "[object Array]", duplicateIndex, duplicate; + if (objectOrArray) { + duplicateIndex = state.duplicates.indexOf(object); + duplicate = duplicateIndex !== -1; + } + if (state.tag !== null && state.tag !== "?" || duplicate || state.indent !== 2 && level > 0) { + compact = false; + } + if (duplicate && state.usedDuplicates[duplicateIndex]) { + state.dump = "*ref_" + duplicateIndex; + } else { + if (objectOrArray && duplicate && !state.usedDuplicates[duplicateIndex]) { + state.usedDuplicates[duplicateIndex] = true; + } + if (type === "[object Object]") { + if (block && Object.keys(state.dump).length !== 0) { + writeBlockMapping(state, level, state.dump, compact); + if (duplicate) { + state.dump = "&ref_" + duplicateIndex + state.dump; + } + } else { + writeFlowMapping(state, level, state.dump); + if (duplicate) { + state.dump = "&ref_" + duplicateIndex + " " + state.dump; + } + } + } else if (type === "[object Array]") { + var arrayLevel = state.noArrayIndent && level > 0 ? level - 1 : level; + if (block && state.dump.length !== 0) { + writeBlockSequence(state, arrayLevel, state.dump, compact); + if (duplicate) { + state.dump = "&ref_" + duplicateIndex + state.dump; + } + } else { + writeFlowSequence(state, arrayLevel, state.dump); + if (duplicate) { + state.dump = "&ref_" + duplicateIndex + " " + state.dump; + } + } + } else if (type === "[object String]") { + if (state.tag !== "?") { + writeScalar(state, state.dump, level, iskey); + } + } else { + if (state.skipInvalid) return false; + throw new YAMLException("unacceptable kind of an object to dump " + type); + } + if (state.tag !== null && state.tag !== "?") { + state.dump = "!<" + state.tag + "> " + state.dump; + } + } + return true; + } + function getDuplicateReferences(object, state) { + var objects = [], duplicatesIndexes = [], index2, length; + inspectNode(object, objects, duplicatesIndexes); + for (index2 = 0, length = duplicatesIndexes.length; index2 < length; index2 += 1) { + state.duplicates.push(objects[duplicatesIndexes[index2]]); + } + state.usedDuplicates = new Array(length); + } + function inspectNode(object, objects, duplicatesIndexes) { + var objectKeyList, index2, length; + if (object !== null && typeof object === "object") { + index2 = objects.indexOf(object); + if (index2 !== -1) { + if (duplicatesIndexes.indexOf(index2) === -1) { + duplicatesIndexes.push(index2); + } + } else { + objects.push(object); + if (Array.isArray(object)) { + for (index2 = 0, length = object.length; index2 < length; index2 += 1) { + inspectNode(object[index2], objects, duplicatesIndexes); + } + } else { + objectKeyList = Object.keys(object); + for (index2 = 0, length = objectKeyList.length; index2 < length; index2 += 1) { + inspectNode(object[objectKeyList[index2]], objects, duplicatesIndexes); + } + } + } + } + } + function dump(input, options2) { + options2 = options2 || {}; + var state = new State2(options2); + if (!state.noRefs) getDuplicateReferences(input, state); + if (writeNode(state, 0, input, true, true)) return state.dump + "\n"; + return ""; + } + function safeDump(input, options2) { + return dump(input, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options2)); + } + module2.exports.dump = dump; + module2.exports.safeDump = safeDump; + } +}); + +// ../../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml.js +var require_js_yaml = __commonJS({ + "../../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/lib/js-yaml.js"(exports2, module2) { + "use strict"; + var loader = require_loader(); + var dumper = require_dumper(); + function deprecated(name2) { + return function() { + throw new Error("Function " + name2 + " is deprecated and cannot be used."); + }; + } + 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_SAFE_SCHEMA = require_default_safe(); + module2.exports.DEFAULT_FULL_SCHEMA = require_default_full(); + module2.exports.load = loader.load; + module2.exports.loadAll = loader.loadAll; + module2.exports.safeLoad = loader.safeLoad; + module2.exports.safeLoadAll = loader.safeLoadAll; + module2.exports.dump = dumper.dump; + module2.exports.safeDump = dumper.safeDump; + module2.exports.YAMLException = require_exception(); + module2.exports.MINIMAL_SCHEMA = require_failsafe(); + module2.exports.SAFE_SCHEMA = require_default_safe(); + module2.exports.DEFAULT_SCHEMA = require_default_full(); + module2.exports.scan = deprecated("scan"); + module2.exports.parse = deprecated("parse"); + module2.exports.compose = deprecated("compose"); + module2.exports.addConstructor = deprecated("addConstructor"); + } +}); + +// ../../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/index.js +var require_js_yaml2 = __commonJS({ + "../../../node_modules/.pnpm/js-yaml@3.15.2/node_modules/js-yaml/index.js"(exports2, module2) { + "use strict"; + var yaml3 = require_js_yaml(); + module2.exports = yaml3; + } +}); + +// ../../../node_modules/.pnpm/gray-matter@4.0.3/node_modules/gray-matter/lib/engines.js +var require_engines = __commonJS({ + "../../../node_modules/.pnpm/gray-matter@4.0.3/node_modules/gray-matter/lib/engines.js"(exports, module) { + "use strict"; + var yaml = require_js_yaml2(); + var engines = exports = module.exports; + engines.yaml = { + parse: yaml.safeLoad.bind(yaml), + stringify: yaml.safeDump.bind(yaml) + }; + engines.json = { + parse: JSON.parse.bind(JSON), + stringify: function(obj, options2) { + const opts = Object.assign({ replacer: null, space: 2 }, options2); + return JSON.stringify(obj, opts.replacer, opts.space); + } + }; + engines.javascript = { + parse: function parse(str, options, wrap) { + try { + if (wrap !== false) { + str = "(function() {\nreturn " + str.trim() + ";\n}());"; + } + return eval(str) || {}; + } catch (err) { + if (wrap !== false && /(unexpected|identifier)/i.test(err.message)) { + return parse(str, options, false); + } + throw new SyntaxError(err); + } + }, + stringify: function() { + throw new Error("stringifying JavaScript is not supported"); + } + }; + } +}); + +// ../../../node_modules/.pnpm/strip-bom-string@1.0.0/node_modules/strip-bom-string/index.js +var require_strip_bom_string = __commonJS({ + "../../../node_modules/.pnpm/strip-bom-string@1.0.0/node_modules/strip-bom-string/index.js"(exports2, module2) { + "use strict"; + module2.exports = function(str2) { + if (typeof str2 === "string" && str2.charAt(0) === "\uFEFF") { + return str2.slice(1); + } + return str2; + }; + } +}); + +// ../../../node_modules/.pnpm/gray-matter@4.0.3/node_modules/gray-matter/lib/utils.js +var require_utils = __commonJS({ + "../../../node_modules/.pnpm/gray-matter@4.0.3/node_modules/gray-matter/lib/utils.js"(exports2) { + "use strict"; + var stripBom = require_strip_bom_string(); + var typeOf2 = require_kind_of(); + exports2.define = function(obj, key, val) { + Reflect.defineProperty(obj, key, { + enumerable: false, + configurable: true, + writable: true, + value: val + }); + }; + exports2.isBuffer = function(val) { + return typeOf2(val) === "buffer"; + }; + exports2.isObject = function(val) { + return typeOf2(val) === "object"; + }; + exports2.toBuffer = function(input) { + return typeof input === "string" ? Buffer.from(input) : input; + }; + exports2.toString = function(input) { + if (exports2.isBuffer(input)) return stripBom(String(input)); + if (typeof input !== "string") { + throw new TypeError("expected input to be a string or buffer"); + } + return stripBom(input); + }; + exports2.arrayify = function(val) { + return val ? Array.isArray(val) ? val : [val] : []; + }; + exports2.startsWith = function(str2, substr, len) { + if (typeof len !== "number") len = substr.length; + return str2.slice(0, len) === substr; + }; + } +}); + +// ../../../node_modules/.pnpm/gray-matter@4.0.3/node_modules/gray-matter/lib/defaults.js +var require_defaults = __commonJS({ + "../../../node_modules/.pnpm/gray-matter@4.0.3/node_modules/gray-matter/lib/defaults.js"(exports2, module2) { + "use strict"; + var engines2 = require_engines(); + var utils = require_utils(); + module2.exports = function(options2) { + const opts = Object.assign({}, options2); + opts.delimiters = utils.arrayify(opts.delims || opts.delimiters || "---"); + if (opts.delimiters.length === 1) { + opts.delimiters.push(opts.delimiters[0]); + } + opts.language = (opts.language || opts.lang || "yaml").toLowerCase(); + opts.engines = Object.assign({}, engines2, opts.parsers, opts.engines); + return opts; + }; + } +}); + +// ../../../node_modules/.pnpm/gray-matter@4.0.3/node_modules/gray-matter/lib/engine.js +var require_engine = __commonJS({ + "../../../node_modules/.pnpm/gray-matter@4.0.3/node_modules/gray-matter/lib/engine.js"(exports2, module2) { + "use strict"; + module2.exports = function(name2, options2) { + let engine = options2.engines[name2] || options2.engines[aliase(name2)]; + if (typeof engine === "undefined") { + throw new Error('gray-matter engine "' + name2 + '" is not registered'); + } + if (typeof engine === "function") { + engine = { parse: engine }; + } + return engine; + }; + function aliase(name2) { + switch (name2.toLowerCase()) { + case "js": + case "javascript": + return "javascript"; + case "coffee": + case "coffeescript": + case "cson": + return "coffee"; + case "yaml": + case "yml": + return "yaml"; + default: { + return name2; + } + } + } + } +}); + +// ../../../node_modules/.pnpm/gray-matter@4.0.3/node_modules/gray-matter/lib/stringify.js +var require_stringify = __commonJS({ + "../../../node_modules/.pnpm/gray-matter@4.0.3/node_modules/gray-matter/lib/stringify.js"(exports2, module2) { + "use strict"; + var typeOf2 = require_kind_of(); + var getEngine = require_engine(); + var defaults = require_defaults(); + module2.exports = function(file, data2, options2) { + if (data2 == null && options2 == null) { + switch (typeOf2(file)) { + case "object": + data2 = file.data; + options2 = {}; + break; + case "string": + return file; + default: { + throw new TypeError("expected file to be a string or object"); + } + } + } + const str2 = file.content; + const opts = defaults(options2); + if (data2 == null) { + if (!opts.data) return file; + data2 = opts.data; + } + const language = file.language || opts.language; + const engine = getEngine(language, opts); + if (typeof engine.stringify !== "function") { + throw new TypeError('expected "' + language + '.stringify" to be a function'); + } + data2 = Object.assign({}, file.data, data2); + const open = opts.delimiters[0]; + const close = opts.delimiters[1]; + const matter3 = engine.stringify(data2, options2).trim(); + let buf = ""; + if (matter3 !== "{}") { + buf = newline(open) + newline(matter3) + newline(close); + } + if (typeof file.excerpt === "string" && file.excerpt !== "") { + if (str2.indexOf(file.excerpt.trim()) === -1) { + buf += newline(file.excerpt) + newline(close); + } + } + return buf + newline(str2); + }; + function newline(str2) { + return str2.slice(-1) !== "\n" ? str2 + "\n" : str2; + } + } +}); + +// ../../../node_modules/.pnpm/gray-matter@4.0.3/node_modules/gray-matter/lib/excerpt.js +var require_excerpt = __commonJS({ + "../../../node_modules/.pnpm/gray-matter@4.0.3/node_modules/gray-matter/lib/excerpt.js"(exports2, module2) { + "use strict"; + var defaults = require_defaults(); + module2.exports = function(file, options2) { + const opts = defaults(options2); + if (file.data == null) { + file.data = {}; + } + if (typeof opts.excerpt === "function") { + return opts.excerpt(file, opts); + } + const sep = file.data.excerpt_separator || opts.excerpt_separator; + if (sep == null && (opts.excerpt === false || opts.excerpt == null)) { + return file; + } + const delimiter = typeof opts.excerpt === "string" ? opts.excerpt : sep || opts.delimiters[0]; + const idx = file.content.indexOf(delimiter); + if (idx !== -1) { + file.excerpt = file.content.slice(0, idx); + } + return file; + }; + } +}); + +// ../../../node_modules/.pnpm/gray-matter@4.0.3/node_modules/gray-matter/lib/to-file.js +var require_to_file = __commonJS({ + "../../../node_modules/.pnpm/gray-matter@4.0.3/node_modules/gray-matter/lib/to-file.js"(exports2, module2) { + "use strict"; + var typeOf2 = require_kind_of(); + var stringify4 = require_stringify(); + var utils = require_utils(); + module2.exports = function(file) { + if (typeOf2(file) !== "object") { + file = { content: file }; + } + if (typeOf2(file.data) !== "object") { + file.data = {}; + } + if (file.contents && file.content == null) { + file.content = file.contents; + } + utils.define(file, "orig", utils.toBuffer(file.content)); + utils.define(file, "language", file.language || ""); + utils.define(file, "matter", file.matter || ""); + utils.define(file, "stringify", function(data2, options2) { + if (options2 && options2.language) { + file.language = options2.language; + } + return stringify4(file, data2, options2); + }); + file.content = utils.toString(file.content); + file.isEmpty = false; + file.excerpt = ""; + return file; + }; + } +}); + +// ../../../node_modules/.pnpm/gray-matter@4.0.3/node_modules/gray-matter/lib/parse.js +var require_parse = __commonJS({ + "../../../node_modules/.pnpm/gray-matter@4.0.3/node_modules/gray-matter/lib/parse.js"(exports2, module2) { + "use strict"; + var getEngine = require_engine(); + var defaults = require_defaults(); + module2.exports = function(language, str2, options2) { + const opts = defaults(options2); + const engine = getEngine(language, opts); + if (typeof engine.parse !== "function") { + throw new TypeError('expected "' + language + '.parse" to be a function'); + } + return engine.parse(str2, opts); + }; + } +}); + +// ../../../node_modules/.pnpm/gray-matter@4.0.3/node_modules/gray-matter/index.js +var require_gray_matter = __commonJS({ + "../../../node_modules/.pnpm/gray-matter@4.0.3/node_modules/gray-matter/index.js"(exports2, module2) { + "use strict"; + var fs2 = __require("fs"); + var sections = require_section_matter(); + var defaults = require_defaults(); + var stringify4 = require_stringify(); + var excerpt = require_excerpt(); + var engines2 = require_engines(); + var toFile = require_to_file(); + var parse5 = require_parse(); + var utils = require_utils(); + function matter3(input, options2) { + if (input === "") { + return { data: {}, content: input, excerpt: "", orig: input }; + } + let file = toFile(input); + const cached = matter3.cache[file.content]; + if (!options2) { + if (cached) { + file = Object.assign({}, cached); + file.orig = cached.orig; + return file; + } + matter3.cache[file.content] = file; + } + return parseMatter(file, options2); + } + function parseMatter(file, options2) { + const opts = defaults(options2); + const open = opts.delimiters[0]; + const close = "\n" + opts.delimiters[1]; + let str2 = file.content; + if (opts.language) { + file.language = opts.language; + } + const openLen = open.length; + if (!utils.startsWith(str2, open, openLen)) { + excerpt(file, opts); + return file; + } + if (str2.charAt(openLen) === open.slice(-1)) { + return file; + } + str2 = str2.slice(openLen); + const len = str2.length; + const language = matter3.language(str2, opts); + if (language.name) { + file.language = language.name; + str2 = str2.slice(language.raw.length); + } + let closeIndex = str2.indexOf(close); + if (closeIndex === -1) { + closeIndex = len; + } + file.matter = str2.slice(0, closeIndex); + const block = file.matter.replace(/^\s*#[^\n]+/gm, "").trim(); + if (block === "") { + file.isEmpty = true; + file.empty = file.content; + file.data = {}; + } else { + file.data = parse5(file.language, file.matter, opts); + } + if (closeIndex === len) { + file.content = ""; + } else { + file.content = str2.slice(closeIndex + close.length); + if (file.content[0] === "\r") { + file.content = file.content.slice(1); + } + if (file.content[0] === "\n") { + file.content = file.content.slice(1); + } + } + excerpt(file, opts); + if (opts.sections === true || typeof opts.section === "function") { + sections(file, opts.section); + } + return file; + } + matter3.engines = engines2; + matter3.stringify = function(file, data2, options2) { + if (typeof file === "string") file = matter3(file, options2); + return stringify4(file, data2, options2); + }; + matter3.read = function(filepath, options2) { + const str2 = fs2.readFileSync(filepath, "utf8"); + const file = matter3(str2, options2); + file.path = filepath; + return file; + }; + matter3.test = function(str2, options2) { + return utils.startsWith(str2, defaults(options2).delimiters[0]); + }; + matter3.language = function(str2, options2) { + const opts = defaults(options2); + const open = opts.delimiters[0]; + if (matter3.test(str2)) { + str2 = str2.slice(open.length); + } + const language = str2.slice(0, str2.search(/\r?\n/)); + return { + raw: language, + name: language ? language.trim() : "" + }; + }; + matter3.cache = {}; + matter3.clearCache = function() { + matter3.cache = {}; + }; + module2.exports = matter3; + } +}); + +// ../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/nodes/identity.js +var require_identity = __commonJS({ + "../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/nodes/identity.js"(exports2) { + "use strict"; + var ALIAS = Symbol.for("yaml.alias"); + var DOC = Symbol.for("yaml.document"); + var MAP2 = 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 = (node2) => !!node2 && typeof node2 === "object" && node2[NODE_TYPE] === ALIAS; + var isDocument = (node2) => !!node2 && typeof node2 === "object" && node2[NODE_TYPE] === DOC; + var isMap = (node2) => !!node2 && typeof node2 === "object" && node2[NODE_TYPE] === MAP2; + var isPair = (node2) => !!node2 && typeof node2 === "object" && node2[NODE_TYPE] === PAIR; + var isScalar = (node2) => !!node2 && typeof node2 === "object" && node2[NODE_TYPE] === SCALAR; + var isSeq = (node2) => !!node2 && typeof node2 === "object" && node2[NODE_TYPE] === SEQ; + function isCollection(node2) { + if (node2 && typeof node2 === "object") + switch (node2[NODE_TYPE]) { + case MAP2: + case SEQ: + return true; + } + return false; + } + function isNode2(node2) { + if (node2 && typeof node2 === "object") + switch (node2[NODE_TYPE]) { + case ALIAS: + case MAP2: + case SCALAR: + case SEQ: + return true; + } + return false; + } + var hasAnchor = (node2) => (isScalar(node2) || isCollection(node2)) && !!node2.anchor; + exports2.ALIAS = ALIAS; + exports2.DOC = DOC; + exports2.MAP = MAP2; + 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 = isNode2; + exports2.isPair = isPair; + exports2.isScalar = isScalar; + exports2.isSeq = isSeq; + } +}); + +// ../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/visit.js +var require_visit = __commonJS({ + "../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/visit.js"(exports2) { + "use strict"; + var identity = require_identity(); + var BREAK = Symbol("break visit"); + var SKIP3 = Symbol("skip children"); + var REMOVE = Symbol("remove node"); + function visit3(node2, visitor) { + const visitor_ = initVisitor(visitor); + if (identity.isDocument(node2)) { + const cd = visit_(null, node2.contents, visitor_, Object.freeze([node2])); + if (cd === REMOVE) + node2.contents = null; + } else + visit_(null, node2, visitor_, Object.freeze([])); + } + visit3.BREAK = BREAK; + visit3.SKIP = SKIP3; + visit3.REMOVE = REMOVE; + function visit_(key, node2, visitor, path2) { + const ctrl = callVisitor(key, node2, visitor, path2); + if (identity.isNode(ctrl) || identity.isPair(ctrl)) { + replaceNode(key, path2, ctrl); + return visit_(key, ctrl, visitor, path2); + } + if (typeof ctrl !== "symbol") { + if (identity.isCollection(node2)) { + path2 = Object.freeze(path2.concat(node2)); + for (let i = 0; i < node2.items.length; ++i) { + const ci = visit_(i, node2.items[i], visitor, path2); + if (typeof ci === "number") + i = ci - 1; + else if (ci === BREAK) + return BREAK; + else if (ci === REMOVE) { + node2.items.splice(i, 1); + i -= 1; + } + } + } else if (identity.isPair(node2)) { + path2 = Object.freeze(path2.concat(node2)); + const ck = visit_("key", node2.key, visitor, path2); + if (ck === BREAK) + return BREAK; + else if (ck === REMOVE) + node2.key = null; + const cv = visit_("value", node2.value, visitor, path2); + if (cv === BREAK) + return BREAK; + else if (cv === REMOVE) + node2.value = null; + } + } + return ctrl; + } + async function visitAsync(node2, visitor) { + const visitor_ = initVisitor(visitor); + if (identity.isDocument(node2)) { + const cd = await visitAsync_(null, node2.contents, visitor_, Object.freeze([node2])); + if (cd === REMOVE) + node2.contents = null; + } else + await visitAsync_(null, node2, visitor_, Object.freeze([])); + } + visitAsync.BREAK = BREAK; + visitAsync.SKIP = SKIP3; + visitAsync.REMOVE = REMOVE; + async function visitAsync_(key, node2, visitor, path2) { + const ctrl = await callVisitor(key, node2, visitor, path2); + if (identity.isNode(ctrl) || identity.isPair(ctrl)) { + replaceNode(key, path2, ctrl); + return visitAsync_(key, ctrl, visitor, path2); + } + if (typeof ctrl !== "symbol") { + if (identity.isCollection(node2)) { + path2 = Object.freeze(path2.concat(node2)); + for (let i = 0; i < node2.items.length; ++i) { + const ci = await visitAsync_(i, node2.items[i], visitor, path2); + if (typeof ci === "number") + i = ci - 1; + else if (ci === BREAK) + return BREAK; + else if (ci === REMOVE) { + node2.items.splice(i, 1); + i -= 1; + } + } + } else if (identity.isPair(node2)) { + path2 = Object.freeze(path2.concat(node2)); + const ck = await visitAsync_("key", node2.key, visitor, path2); + if (ck === BREAK) + return BREAK; + else if (ck === REMOVE) + node2.key = null; + const cv = await visitAsync_("value", node2.value, visitor, path2); + if (cv === BREAK) + return BREAK; + else if (cv === REMOVE) + node2.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, node2, visitor, path2) { + if (typeof visitor === "function") + return visitor(key, node2, path2); + if (identity.isMap(node2)) + return visitor.Map?.(key, node2, path2); + if (identity.isSeq(node2)) + return visitor.Seq?.(key, node2, path2); + if (identity.isPair(node2)) + return visitor.Pair?.(key, node2, path2); + if (identity.isScalar(node2)) + return visitor.Scalar?.(key, node2, path2); + if (identity.isAlias(node2)) + return visitor.Alias?.(key, node2, path2); + return void 0; + } + function replaceNode(key, path2, node2) { + const parent = path2[path2.length - 1]; + if (identity.isCollection(parent)) { + parent.items[key] = node2; + } else if (identity.isPair(parent)) { + if (key === "key") + parent.key = node2; + else + parent.value = node2; + } else if (identity.isDocument(parent)) { + parent.contents = node2; + } else { + const pt = identity.isAlias(parent) ? "alias" : "scalar"; + throw new Error(`Cannot replace node with ${pt} parent`); + } + } + exports2.visit = visit3; + exports2.visitAsync = visitAsync; + } +}); + +// ../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/doc/directives.js +var require_directives = __commonJS({ + "../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/doc/directives.js"(exports2) { + "use strict"; + var identity = require_identity(); + var visit3 = require_visit(); + var escapeChars = { + "!": "%21", + ",": "%2C", + "[": "%5B", + "]": "%5D", + "{": "%7B", + "}": "%7D" + }; + var escapeTagName = (tn) => tn.replace(/[!,[\]{}]/g, (ch) => escapeChars[ch]); + var Directives = class _Directives { + constructor(yaml3, tags) { + this.docStart = null; + this.docEnd = false; + this.yaml = Object.assign({}, _Directives.defaultYaml, yaml3); + 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 name2 = parts.shift(); + switch (name2) { + case "%TAG": { + if (parts.length !== 2) { + onError(0, "%TAG directive should contain exactly two parts"); + if (parts.length < 2) + return false; + } + const [handle2, prefix] = parts; + this.tags[handle2] = 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 [version2] = parts; + if (version2 === "1.1" || version2 === "1.2") { + this.yaml.version = version2; + return true; + } else { + const isValid = /^\d+\.\d+$/.test(version2); + onError(6, `Unsupported YAML version ${version2}`, isValid); + return false; + } + } + default: + onError(0, `Unknown directive ${name2}`, 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 [, handle2, suffix] = source.match(/^(.*!)([^!]*)$/s); + if (!suffix) + onError(`The ${source} tag has no suffix`); + const prefix = this.tags[handle2]; + if (prefix) { + try { + return prefix + decodeURIComponent(suffix); + } catch (error) { + onError(String(error)); + return null; + } + } + if (handle2 === "!") + 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 [handle2, prefix] of Object.entries(this.tags)) { + if (tag.startsWith(prefix)) + return handle2 + 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 = {}; + visit3.visit(doc.contents, (_key, node2) => { + if (identity.isNode(node2) && node2.tag) + tags[node2.tag] = true; + }); + tagNames = Object.keys(tags); + } else + tagNames = []; + for (const [handle2, prefix] of tagEntries) { + if (handle2 === "!!" && prefix === "tag:yaml.org,2002:") + continue; + if (!doc || tagNames.some((tn) => tn.startsWith(prefix))) + lines.push(`%TAG ${handle2} ${prefix}`); + } + return lines.join("\n"); + } + }; + Directives.defaultYaml = { explicit: false, version: "1.2" }; + Directives.defaultTags = { "!!": "tag:yaml.org,2002:" }; + exports2.Directives = Directives; + } +}); + +// ../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/doc/anchors.js +var require_anchors = __commonJS({ + "../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/doc/anchors.js"(exports2) { + "use strict"; + var identity = require_identity(); + var visit3 = 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(root4) { + const anchors = /* @__PURE__ */ new Set(); + visit3.visit(root4, { + Value(_key, node2) { + if (node2.anchor) + anchors.add(node2.anchor); + } + }); + return anchors; + } + function findNewAnchor(prefix, exclude) { + for (let i = 1; true; ++i) { + const name2 = `${prefix}${i}`; + if (!exclude.has(name2)) + return name2; + } + } + function createNodeAnchors(doc, prefix) { + const aliasObjects = []; + const sourceObjects = /* @__PURE__ */ new Map(); + let prevAnchors = null; + return { + onAnchor: (source) => { + aliasObjects.push(source); + 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 ref2 = sourceObjects.get(source); + if (typeof ref2 === "object" && ref2.anchor && (identity.isScalar(ref2.node) || identity.isCollection(ref2.node))) { + ref2.node.anchor = ref2.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/.pnpm/yaml@2.9.0/node_modules/yaml/dist/doc/applyReviver.js +var require_applyReviver = __commonJS({ + "../../../node_modules/.pnpm/yaml@2.9.0/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/.pnpm/yaml@2.9.0/node_modules/yaml/dist/nodes/toJS.js +var require_toJS = __commonJS({ + "../../../node_modules/.pnpm/yaml@2.9.0/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 data2 = { aliasCount: 0, count: 1, res: void 0 }; + ctx.anchors.set(value, data2); + ctx.onCreate = (res2) => { + data2.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/.pnpm/yaml@2.9.0/node_modules/yaml/dist/nodes/Node.js +var require_Node = __commonJS({ + "../../../node_modules/.pnpm/yaml@2.9.0/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/.pnpm/yaml@2.9.0/node_modules/yaml/dist/nodes/Alias.js +var require_Alias = __commonJS({ + "../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/nodes/Alias.js"(exports2) { + "use strict"; + var anchors = require_anchors(); + var visit3 = require_visit(); + var identity = require_identity(); + var Node3 = require_Node(); + var toJS = require_toJS(); + var Alias = class extends Node3.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, ctx) { + if (ctx?.maxAliasCount === 0) + throw new ReferenceError("Alias resolution is disabled"); + let nodes; + if (ctx?.aliasResolveCache) { + nodes = ctx.aliasResolveCache; + } else { + nodes = []; + visit3.visit(doc, { + Node: (_key, node2) => { + if (identity.isAlias(node2) || identity.hasAnchor(node2)) + nodes.push(node2); + } + }); + if (ctx) + ctx.aliasResolveCache = nodes; + } + let found = void 0; + for (const node2 of nodes) { + if (node2 === this) + break; + if (node2.anchor === this.source) + found = node2; + } + return found; + } + toJSON(_arg, ctx) { + if (!ctx) + return { source: this.source }; + const { anchors: anchors2, doc, maxAliasCount } = ctx; + const source = this.resolve(doc, ctx); + if (!source) { + const msg = `Unresolved alias (the anchor must be set before the alias): ${this.source}`; + throw new ReferenceError(msg); + } + let data2 = anchors2.get(source); + if (!data2) { + toJS.toJS(source, null, ctx); + data2 = anchors2.get(source); + } + if (data2?.res === void 0) { + const msg = "This should not happen: Alias anchor was not resolved?"; + throw new ReferenceError(msg); + } + if (maxAliasCount >= 0) { + data2.count += 1; + if (data2.aliasCount === 0) + data2.aliasCount = getAliasCount(doc, source, anchors2); + if (data2.count * data2.aliasCount > maxAliasCount) { + const msg = "Excessive alias count indicates a resource exhaustion attack"; + throw new ReferenceError(msg); + } + } + return data2.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, node2, anchors2) { + if (identity.isAlias(node2)) { + const source = node2.resolve(doc); + const anchor = anchors2 && source && anchors2.get(source); + return anchor ? anchor.count * anchor.aliasCount : 0; + } else if (identity.isCollection(node2)) { + let count = 0; + for (const item of node2.items) { + const c = getAliasCount(doc, item, anchors2); + if (c > count) + count = c; + } + return count; + } else if (identity.isPair(node2)) { + const kc = getAliasCount(doc, node2.key, anchors2); + const vc = getAliasCount(doc, node2.value, anchors2); + return Math.max(kc, vc); + } + return 1; + } + exports2.Alias = Alias; + } +}); + +// ../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/nodes/Scalar.js +var require_Scalar = __commonJS({ + "../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/nodes/Scalar.js"(exports2) { + "use strict"; + var identity = require_identity(); + var Node3 = require_Node(); + var toJS = require_toJS(); + var isScalarValue = (value) => !value || typeof value !== "function" && typeof value !== "object"; + var Scalar = class extends Node3.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/.pnpm/yaml@2.9.0/node_modules/yaml/dist/doc/createNode.js +var require_createNode = __commonJS({ + "../../../node_modules/.pnpm/yaml@2.9.0/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 map3 = ctx.schema[identity.MAP].createNode?.(ctx.schema, null, ctx); + map3.items.push(value); + return map3; + } + 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 ref2 = void 0; + if (aliasDuplicateObjects && value && typeof value === "object") { + ref2 = sourceObjects.get(value); + if (ref2) { + ref2.anchor ?? (ref2.anchor = onAnchor(value)); + return new Alias.Alias(ref2.anchor); + } else { + ref2 = { anchor: null, node: null }; + sourceObjects.set(value, ref2); + } + } + 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 node3 = new Scalar.Scalar(value); + if (ref2) + ref2.node = node3; + return node3; + } + 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 node2 = 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) + node2.tag = tagName; + else if (!tagObj.default) + node2.tag = tagObj.tag; + if (ref2) + ref2.node = node2; + return node2; + } + exports2.createNode = createNode; + } +}); + +// ../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/nodes/Collection.js +var require_Collection = __commonJS({ + "../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/nodes/Collection.js"(exports2) { + "use strict"; + var createNode = require_createNode(); + var identity = require_identity(); + var Node3 = require_Node(); + function collectionFromPath(schema, path2, value) { + let v = value; + for (let i = path2.length - 1; i >= 0; --i) { + const k = path2[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 = (path2) => path2 == null || typeof path2 === "object" && !!path2[Symbol.iterator]().next().done; + var Collection = class extends Node3.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(path2, value) { + if (isEmptyPath(path2)) + this.add(value); + else { + const [key, ...rest] = path2; + const node2 = this.get(key, true); + if (identity.isCollection(node2)) + node2.addIn(rest, value); + else if (node2 === 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(path2) { + const [key, ...rest] = path2; + if (rest.length === 0) + return this.delete(key); + const node2 = this.get(key, true); + if (identity.isCollection(node2)) + return node2.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(path2, keepScalar) { + const [key, ...rest] = path2; + const node2 = this.get(key, true); + if (rest.length === 0) + return !keepScalar && identity.isScalar(node2) ? node2.value : node2; + else + return identity.isCollection(node2) ? node2.getIn(rest, keepScalar) : void 0; + } + hasAllNullValues(allowScalar) { + return this.items.every((node2) => { + if (!identity.isPair(node2)) + return false; + const n = node2.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(path2) { + const [key, ...rest] = path2; + if (rest.length === 0) + return this.has(key); + const node2 = this.get(key, true); + return identity.isCollection(node2) ? node2.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(path2, value) { + const [key, ...rest] = path2; + if (rest.length === 0) { + this.set(key, value); + } else { + const node2 = this.get(key, true); + if (identity.isCollection(node2)) + node2.setIn(rest, value); + else if (node2 === 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/.pnpm/yaml@2.9.0/node_modules/yaml/dist/stringify/stringifyComment.js +var require_stringifyComment = __commonJS({ + "../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/stringify/stringifyComment.js"(exports2) { + "use strict"; + var stringifyComment = (str2) => str2.replace(/^(?!$)(?: $)?/gm, "#"); + function indentComment(comment2, indent3) { + if (/^\n+$/.test(comment2)) + return comment2.substring(1); + return indent3 ? comment2.replace(/^(?! *$)/gm, indent3) : comment2; + } + var lineComment = (str2, indent3, comment2) => str2.endsWith("\n") ? indentComment(comment2, indent3) : comment2.includes("\n") ? "\n" + indentComment(comment2, indent3) : (str2.endsWith(" ") ? "" : " ") + comment2; + exports2.indentComment = indentComment; + exports2.lineComment = lineComment; + exports2.stringifyComment = stringifyComment; + } +}); + +// ../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/stringify/foldFlowLines.js +var require_foldFlowLines = __commonJS({ + "../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/stringify/foldFlowLines.js"(exports2) { + "use strict"; + var FOLD_FLOW = "flow"; + var FOLD_BLOCK = "block"; + var FOLD_QUOTED = "quoted"; + function foldFlowLines(text7, indent3, mode = "flow", { indentAtStart, lineWidth = 80, minContentWidth = 20, onFold, onOverflow } = {}) { + if (!lineWidth || lineWidth < 0) + return text7; + if (lineWidth < minContentWidth) + minContentWidth = 0; + const endStep = Math.max(1 + minContentWidth, 1 + lineWidth - indent3.length); + if (text7.length <= endStep) + return text7; + const folds = []; + const escapedFolds = {}; + let end = lineWidth - indent3.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(text7, i, indent3.length); + if (i !== -1) + end = i + endStep; + } + for (let ch; ch = text7[i += 1]; ) { + if (mode === FOLD_QUOTED && ch === "\\") { + escStart = i; + switch (text7[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(text7, i, indent3.length); + end = i + indent3.length + endStep; + split = void 0; + } else { + if (ch === " " && prev && prev !== " " && prev !== "\n" && prev !== " ") { + const next = text7[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 = text7[i += 1]; + overflow = true; + } + const j = i > escEnd + 1 ? i - 2 : escStart - 1; + if (escapedFolds[j]) + return text7; + 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 text7; + if (onFold) + onFold(); + let res = text7.slice(0, folds[0]); + for (let i2 = 0; i2 < folds.length; ++i2) { + const fold = folds[i2]; + const end2 = folds[i2 + 1] || text7.length; + if (fold === 0) + res = ` +${indent3}${text7.slice(0, end2)}`; + else { + if (mode === FOLD_QUOTED && escapedFolds[fold]) + res += `${text7[fold]}\\`; + res += ` +${indent3}${text7.slice(fold + 1, end2)}`; + } + } + return res; + } + function consumeMoreIndentedLines(text7, i, indent3) { + let end = i; + let start2 = i + 1; + let ch = text7[start2]; + while (ch === " " || ch === " ") { + if (i < start2 + indent3) { + ch = text7[++i]; + } else { + do { + ch = text7[++i]; + } while (ch && ch !== "\n"); + end = i; + start2 = i + 1; + ch = text7[start2]; + } + } + return end; + } + exports2.FOLD_BLOCK = FOLD_BLOCK; + exports2.FOLD_FLOW = FOLD_FLOW; + exports2.FOLD_QUOTED = FOLD_QUOTED; + exports2.foldFlowLines = foldFlowLines; + } +}); + +// ../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/stringify/stringifyString.js +var require_stringifyString = __commonJS({ + "../../../node_modules/.pnpm/yaml@2.9.0/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 = (str2) => /^(%|---|\.\.\.)/m.test(str2); + function lineLengthOverLimit(str2, lineWidth, indentLength) { + if (!lineWidth || lineWidth < 0) + return false; + const limit = lineWidth - indentLength; + const strLen = str2.length; + if (strLen <= limit) + return false; + for (let i = 0, start2 = 0; i < strLen; ++i) { + if (str2[i] === "\n") { + if (i - start2 > limit) + return true; + start2 = i + 1; + if (strLen - start2 <= 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 indent3 = ctx.indent || (containsDocumentMarker(value) ? " " : ""); + let str2 = ""; + let start2 = 0; + for (let i = 0, ch = json[i]; ch; ch = json[++i]) { + if (ch === " " && json[i + 1] === "\\" && json[i + 2] === "n") { + str2 += json.slice(start2, i) + "\\ "; + i += 1; + start2 = i; + ch = "\\"; + } + if (ch === "\\") + switch (json[i + 1]) { + case "u": + { + str2 += json.slice(start2, i); + const code4 = json.substr(i + 2, 4); + switch (code4) { + case "0000": + str2 += "\\0"; + break; + case "0007": + str2 += "\\a"; + break; + case "000b": + str2 += "\\v"; + break; + case "001b": + str2 += "\\e"; + break; + case "0085": + str2 += "\\N"; + break; + case "00a0": + str2 += "\\_"; + break; + case "2028": + str2 += "\\L"; + break; + case "2029": + str2 += "\\P"; + break; + default: + if (code4.substr(0, 2) === "00") + str2 += "\\x" + code4.substr(2); + else + str2 += json.substr(i, 6); + } + i += 5; + start2 = i + 1; + } + break; + case "n": + if (implicitKey || json[i + 2] === '"' || json.length < minMultiLineLength) { + i += 1; + } else { + str2 += json.slice(start2, i) + "\n\n"; + while (json[i + 2] === "\\" && json[i + 3] === "n" && json[i + 4] !== '"') { + str2 += "\n"; + i += 2; + } + str2 += indent3; + if (json[i + 2] === " ") + str2 += "\\"; + i += 1; + start2 = i + 1; + } + break; + default: + i += 1; + } + } + str2 = start2 ? str2 + json.slice(start2) : json; + return implicitKey ? str2 : foldFlowLines.foldFlowLines(str2, indent3, 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 indent3 = ctx.indent || (containsDocumentMarker(value) ? " " : ""); + const res = "'" + value.replace(/'/g, "''").replace(/\n+/g, `$& +${indent3}`) + "'"; + return ctx.implicitKey ? res : foldFlowLines.foldFlowLines(res, indent3, 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, `$&${indent3}`); + } + 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 start2 = value.substring(0, startNlPos < startEnd ? startNlPos + 1 : startEnd); + if (start2) { + value = value.substring(start2.length); + start2 = start2.replace(/\n+/g, `$&${indent3}`); + } + const indentSize2 = indent3 ? "2" : "1"; + let header = (startWithSpace ? indentSize2 : "") + chomp; + if (comment2) { + header += " " + commentString(comment2.replace(/ ?[\r\n]+/g, " ")); + if (onComment) + onComment(); + } + if (!literal2) { + const foldedValue = value.replace(/\n+/g, "\n$&").replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g, "$1$2").replace(/\n+/g, `$&${indent3}`); + let literalFallback = false; + const foldOptions = getFoldOptions(ctx, true); + if (blockQuote2 !== "folded" && type !== Scalar.Scalar.BLOCK_FOLDED) { + foldOptions.onOverflow = () => { + literalFallback = true; + }; + } + const body = foldFlowLines.foldFlowLines(`${start2}${foldedValue}${end}`, indent3, foldFlowLines.FOLD_BLOCK, foldOptions); + if (!literalFallback) + return `>${header} +${indent3}${body}`; + } + value = value.replace(/\n+/g, `$&${indent3}`); + return `|${header} +${indent3}${start2}${value}${end}`; + } + function plainString(item, ctx, onComment, onChompKeep) { + const { type, value } = item; + const { actualString, implicitKey, indent: indent3, indentStep, inFlow } = ctx; + if (implicitKey && value.includes("\n") || inFlow && /[[\]{},]/.test(value)) { + return quotedString(value, ctx); + } + if (/^[\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 (indent3 === "") { + ctx.forceBlockIndent = true; + return blockString(item, ctx, onComment, onChompKeep); + } else if (implicitKey && indent3 === indentStep) { + return quotedString(value, ctx); + } + } + const str2 = value.replace(/\n+/g, `$& +${indent3}`); + if (actualString) { + const test = (tag) => tag.default && tag.tag !== "tag:yaml.org,2002:str" && tag.test?.test(str2); + const { compat, tags } = ctx.doc.schema; + if (tags.some(test) || compat?.some(test)) + return quotedString(value, ctx); + } + return implicitKey ? str2 : foldFlowLines.foldFlowLines(str2, indent3, 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/.pnpm/yaml@2.9.0/node_modules/yaml/dist/stringify/stringify.js +var require_stringify2 = __commonJS({ + "../../../node_modules/.pnpm/yaml@2.9.0/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, options2) { + 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, + trailingComma: false, + trueStr: "true", + verifyAliasOrder: true + }, doc.schema.toStringOptions, options2); + 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; + let match = tags.filter((t) => t.identify?.(obj)); + if (match.length > 1) { + const testMatch = match.filter((t) => t.test); + if (testMatch.length > 0) + match = testMatch; + } + 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 name2 = obj?.constructor?.name ?? (obj === null ? "null" : typeof obj); + throw new Error(`Tag not resolved for ${name2} value`); + } + return tagObj; + } + function stringifyProps(node2, tagObj, { anchors: anchors$1, doc }) { + if (!doc.directives) + return ""; + const props = []; + const anchor = (identity.isScalar(node2) || identity.isCollection(node2)) && node2.anchor; + if (anchor && anchors.anchorIsValid(anchor)) { + anchors$1.add(anchor); + props.push(`&${anchor}`); + } + const tag = node2.tag ?? (tagObj.default ? null : tagObj.tag); + if (tag) + props.push(doc.directives.tagString(tag)); + return props.join(" "); + } + function stringify4(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 node2 = identity.isNode(item) ? item : ctx.doc.createNode(item, { onTagObj: (o) => tagObj = o }); + tagObj ?? (tagObj = getTagObject(ctx.doc.schema.tags, node2)); + const props = stringifyProps(node2, tagObj, ctx); + if (props.length > 0) + ctx.indentAtStart = (ctx.indentAtStart ?? 0) + props.length + 1; + const str2 = typeof tagObj.stringify === "function" ? tagObj.stringify(node2, ctx, onComment, onChompKeep) : identity.isScalar(node2) ? stringifyString.stringifyString(node2, ctx, onComment, onChompKeep) : node2.toString(ctx, onComment, onChompKeep); + if (!props) + return str2; + return identity.isScalar(node2) || str2[0] === "{" || str2[0] === "[" ? `${props} ${str2}` : `${props} +${ctx.indent}${str2}`; + } + exports2.createStringifyContext = createStringifyContext; + exports2.stringify = stringify4; + } +}); + +// ../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/stringify/stringifyPair.js +var require_stringifyPair = __commonJS({ + "../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/stringify/stringifyPair.js"(exports2) { + "use strict"; + var identity = require_identity(); + var Scalar = require_Scalar(); + var stringify4 = require_stringify2(); + var stringifyComment = require_stringifyComment(); + function stringifyPair({ key, value }, ctx, onComment, onChompKeep) { + const { allNullValues, doc, indent: indent3, 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: indent3 + indentStep + }); + let keyCommentDone = false; + let chompKeep = false; + let str2 = stringify4.stringify(key, ctx, () => keyCommentDone = true, () => chompKeep = true); + if (!explicitKey && !ctx.inFlow && str2.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 str2 === "" ? "?" : explicitKey ? `? ${str2}` : str2; + } + } else if (allNullValues && !simpleKeys || value == null && explicitKey) { + str2 = `? ${str2}`; + if (keyComment && !keyCommentDone) { + str2 += stringifyComment.lineComment(str2, ctx.indent, commentString(keyComment)); + } else if (chompKeep && onChompKeep) + onChompKeep(); + return str2; + } + if (keyCommentDone) + keyComment = null; + if (explicitKey) { + if (keyComment) + str2 += stringifyComment.lineComment(str2, ctx.indent, commentString(keyComment)); + str2 = `? ${str2} +${indent3}:`; + } else { + str2 = `${str2}:`; + if (keyComment) + str2 += stringifyComment.lineComment(str2, 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 = str2.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 = stringify4.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" && valueComment) + 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 flow3 = ctx.inFlow ?? value.flow ?? value.items.length === 0; + if (hasNewline || !flow3) { + 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 = ""; + } + str2 += ws + valueStr; + if (ctx.inFlow) { + if (valueCommentDone && onComment) + onComment(); + } else if (valueComment && !valueCommentDone) { + str2 += stringifyComment.lineComment(str2, ctx.indent, commentString(valueComment)); + } else if (chompKeep && onChompKeep) { + onChompKeep(); + } + return str2; + } + exports2.stringifyPair = stringifyPair; + } +}); + +// ../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/log.js +var require_log = __commonJS({ + "../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/log.js"(exports2) { + "use strict"; + var node_process = __require("process"); + function debug(logLevel, ...messages2) { + if (logLevel === "debug") + console.log(...messages2); + } + function warn(logLevel, warning) { + if (logLevel === "debug" || logLevel === "warn") { + if (typeof node_process.emitWarning === "function") + node_process.emitWarning(warning); + else + console.warn(warning); + } + } + exports2.debug = debug; + exports2.warn = warn; + } +}); + +// ../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/schema/yaml-1.1/merge.js +var require_merge2 = __commonJS({ + "../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/schema/yaml-1.1/merge.js"(exports2) { + "use strict"; + var identity = require_identity(); + var Scalar = require_Scalar(); + var MERGE_KEY = "<<"; + var merge2 = { + identify: (value) => value === MERGE_KEY || typeof value === "symbol" && value.description === MERGE_KEY, + default: "key", + tag: "tag:yaml.org,2002:merge", + test: /^<<$/, + resolve: () => Object.assign(new Scalar.Scalar(Symbol(MERGE_KEY)), { + addToJSMap: addMergeToJSMap + }), + stringify: () => MERGE_KEY + }; + var isMergeKey = (ctx, key) => (merge2.identify(key) || identity.isScalar(key) && (!key.type || key.type === Scalar.Scalar.PLAIN) && merge2.identify(key.value)) && ctx?.doc.schema.tags.some((tag) => tag.tag === merge2.tag && tag.default); + function addMergeToJSMap(ctx, map3, value) { + const source = resolveAliasValue(ctx, value); + if (identity.isSeq(source)) + for (const it of source.items) + mergeValue(ctx, map3, it); + else if (Array.isArray(source)) + for (const it of source) + mergeValue(ctx, map3, it); + else + mergeValue(ctx, map3, source); + } + function mergeValue(ctx, map3, value) { + const source = resolveAliasValue(ctx, 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 (map3 instanceof Map) { + if (!map3.has(key)) + map3.set(key, value2); + } else if (map3 instanceof Set) { + map3.add(key); + } else if (!Object.prototype.hasOwnProperty.call(map3, key)) { + Object.defineProperty(map3, key, { + value: value2, + writable: true, + enumerable: true, + configurable: true + }); + } + } + return map3; + } + function resolveAliasValue(ctx, value) { + return ctx && identity.isAlias(value) ? value.resolve(ctx.doc, ctx) : value; + } + exports2.addMergeToJSMap = addMergeToJSMap; + exports2.isMergeKey = isMergeKey; + exports2.merge = merge2; + } +}); + +// ../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/nodes/addPairToJSMap.js +var require_addPairToJSMap = __commonJS({ + "../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/nodes/addPairToJSMap.js"(exports2) { + "use strict"; + var log = require_log(); + var merge2 = require_merge2(); + var stringify4 = require_stringify2(); + var identity = require_identity(); + var toJS = require_toJS(); + function addPairToJSMap(ctx, map3, { key, value }) { + if (identity.isNode(key) && key.addToJSMap) + key.addToJSMap(ctx, map3, value); + else if (merge2.isMergeKey(ctx, key)) + merge2.addMergeToJSMap(ctx, map3, value); + else { + const jsKey = toJS.toJS(key, "", ctx); + if (map3 instanceof Map) { + map3.set(jsKey, toJS.toJS(value, jsKey, ctx)); + } else if (map3 instanceof Set) { + map3.add(jsKey); + } else { + const stringKey = stringifyKey(key, jsKey, ctx); + const jsValue = toJS.toJS(value, stringKey, ctx); + if (stringKey in map3) + Object.defineProperty(map3, stringKey, { + value: jsValue, + writable: true, + enumerable: true, + configurable: true + }); + else + map3[stringKey] = jsValue; + } + } + return map3; + } + function stringifyKey(key, jsKey, ctx) { + if (jsKey === null) + return ""; + if (typeof jsKey !== "object") + return String(jsKey); + if (identity.isNode(key) && ctx?.doc) { + const strCtx = stringify4.createStringifyContext(ctx.doc, {}); + strCtx.anchors = /* @__PURE__ */ new Set(); + for (const node2 of ctx.anchors.keys()) + strCtx.anchors.add(node2.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/.pnpm/yaml@2.9.0/node_modules/yaml/dist/nodes/Pair.js +var require_Pair = __commonJS({ + "../../../node_modules/.pnpm/yaml@2.9.0/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/.pnpm/yaml@2.9.0/node_modules/yaml/dist/stringify/stringifyCollection.js +var require_stringifyCollection = __commonJS({ + "../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/stringify/stringifyCollection.js"(exports2) { + "use strict"; + var identity = require_identity(); + var stringify4 = require_stringify2(); + var stringifyComment = require_stringifyComment(); + function stringifyCollection(collection, ctx, options2) { + const flow3 = ctx.inFlow ?? collection.flow; + const stringify5 = flow3 ? stringifyFlowCollection : stringifyBlockCollection; + return stringify5(collection, ctx, options2); + } + function stringifyBlockCollection({ comment: comment2, items }, ctx, { blockItemPrefix, flowChars, itemIndent, onChompKeep, onComment }) { + const { indent: indent3, 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 comment3 = null; + if (identity.isNode(item)) { + if (!chompKeep && item.spaceBefore) + lines.push(""); + addCommentBefore(ctx, lines, item.commentBefore, chompKeep); + if (item.comment) + comment3 = 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 str3 = stringify4.stringify(item, itemCtx, () => comment3 = null, () => chompKeep = true); + if (comment3) + str3 += stringifyComment.lineComment(str3, itemIndent, commentString(comment3)); + if (chompKeep && comment3) + chompKeep = false; + lines.push(blockItemPrefix + str3); + } + let str2; + if (lines.length === 0) { + str2 = flowChars.start + flowChars.end; + } else { + str2 = lines[0]; + for (let i = 1; i < lines.length; ++i) { + const line = lines[i]; + str2 += line ? ` +${indent3}${line}` : "\n"; + } + } + if (comment2) { + str2 += "\n" + stringifyComment.indentComment(commentString(comment2), indent3); + if (onComment) + onComment(); + } else if (chompKeep && onChompKeep) + onChompKeep(); + return str2; + } + function stringifyFlowCollection({ items }, ctx, { flowChars, itemIndent }) { + const { indent: indent3, 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 comment2 = null; + if (identity.isNode(item)) { + if (item.spaceBefore) + lines.push(""); + addCommentBefore(ctx, lines, item.commentBefore, false); + if (item.comment) + comment2 = 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) + comment2 = iv.comment; + if (iv.commentBefore) + reqNewline = true; + } else if (item.value == null && ik?.comment) { + comment2 = ik.comment; + } + } + if (comment2) + reqNewline = true; + let str2 = stringify4.stringify(item, itemCtx, () => comment2 = null); + reqNewline || (reqNewline = lines.length > linesAtValue || str2.includes("\n")); + if (i < items.length - 1) { + str2 += ","; + } else if (ctx.options.trailingComma) { + if (ctx.options.lineWidth > 0) { + reqNewline || (reqNewline = lines.reduce((sum, line) => sum + line.length + 2, 2) + (str2.length + 2) > ctx.options.lineWidth); + } + if (reqNewline) { + str2 += ","; + } + } + if (comment2) + str2 += stringifyComment.lineComment(str2, itemIndent, commentString(comment2)); + lines.push(str2); + linesAtValue = lines.length; + } + const { start: start2, end } = flowChars; + if (lines.length === 0) { + return start2 + 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 str2 = start2; + for (const line of lines) + str2 += line ? ` +${indentStep}${indent3}${line}` : "\n"; + return `${str2} +${indent3}${end}`; + } else { + return `${start2}${fcPadding}${lines.join(" ")}${fcPadding}${end}`; + } + } + } + function addCommentBefore({ indent: indent3, options: { commentString } }, lines, comment2, chompKeep) { + if (comment2 && chompKeep) + comment2 = comment2.replace(/^\n+/, ""); + if (comment2) { + const ic = stringifyComment.indentComment(commentString(comment2), indent3); + lines.push(ic.trimStart()); + } + } + exports2.stringifyCollection = stringifyCollection; + } +}); + +// ../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/nodes/YAMLMap.js +var require_YAMLMap = __commonJS({ + "../../../node_modules/.pnpm/yaml@2.9.0/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 map3 = 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) + map3.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") { + map3.items.sort(schema.sortMapEntries); + } + return map3; + } + /** + * 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 node2 = it?.value; + return (!keepScalar && identity.isScalar(node2) ? node2.value : node2) ?? 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 map3 = Type ? new Type() : ctx?.mapAsMap ? /* @__PURE__ */ new Map() : {}; + if (ctx?.onCreate) + ctx.onCreate(map3); + for (const item of this.items) + addPairToJSMap.addPairToJSMap(ctx, map3, item); + return map3; + } + 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/.pnpm/yaml@2.9.0/node_modules/yaml/dist/schema/common/map.js +var require_map2 = __commonJS({ + "../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/schema/common/map.js"(exports2) { + "use strict"; + var identity = require_identity(); + var YAMLMap = require_YAMLMap(); + var map3 = { + collection: "map", + default: true, + nodeClass: YAMLMap.YAMLMap, + tag: "tag:yaml.org,2002:map", + resolve(map4, onError) { + if (!identity.isMap(map4)) + onError("Expected a mapping for this tag"); + return map4; + }, + createNode: (schema, obj, ctx) => YAMLMap.YAMLMap.from(schema, obj, ctx) + }; + exports2.map = map3; + } +}); + +// ../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/nodes/YAMLSeq.js +var require_YAMLSeq = __commonJS({ + "../../../node_modules/.pnpm/yaml@2.9.0/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/.pnpm/yaml@2.9.0/node_modules/yaml/dist/schema/common/seq.js +var require_seq2 = __commonJS({ + "../../../node_modules/.pnpm/yaml@2.9.0/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/.pnpm/yaml@2.9.0/node_modules/yaml/dist/schema/common/string.js +var require_string = __commonJS({ + "../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/schema/common/string.js"(exports2) { + "use strict"; + var stringifyString = require_stringifyString(); + var string3 = { + identify: (value) => typeof value === "string", + default: true, + tag: "tag:yaml.org,2002:str", + resolve: (str2) => str2, + stringify(item, ctx, onComment, onChompKeep) { + ctx = Object.assign({ actualString: true }, ctx); + return stringifyString.stringifyString(item, ctx, onComment, onChompKeep); + } + }; + exports2.string = string3; + } +}); + +// ../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/schema/common/null.js +var require_null2 = __commonJS({ + "../../../node_modules/.pnpm/yaml@2.9.0/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/.pnpm/yaml@2.9.0/node_modules/yaml/dist/schema/core/bool.js +var require_bool2 = __commonJS({ + "../../../node_modules/.pnpm/yaml@2.9.0/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: (str2) => new Scalar.Scalar(str2[0] === "t" || str2[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/.pnpm/yaml@2.9.0/node_modules/yaml/dist/stringify/stringifyNumber.js +var require_stringifyNumber = __commonJS({ + "../../../node_modules/.pnpm/yaml@2.9.0/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 = Object.is(value, -0) ? "-0" : JSON.stringify(value); + if (!format && minFractionDigits && (!tag || tag === "tag:yaml.org,2002:float") && /^-?\d/.test(n) && !n.includes("e")) { + 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/.pnpm/yaml@2.9.0/node_modules/yaml/dist/schema/core/float.js +var require_float2 = __commonJS({ + "../../../node_modules/.pnpm/yaml@2.9.0/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: (str2) => str2.slice(-3).toLowerCase() === "nan" ? NaN : str2[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: (str2) => parseFloat(str2), + stringify(node2) { + const num = Number(node2.value); + return isFinite(num) ? num.toExponential() : stringifyNumber.stringifyNumber(node2); + } + }; + var float = { + identify: (value) => typeof value === "number", + default: true, + tag: "tag:yaml.org,2002:float", + test: /^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/, + resolve(str2) { + const node2 = new Scalar.Scalar(parseFloat(str2)); + const dot = str2.indexOf("."); + if (dot !== -1 && str2[str2.length - 1] === "0") + node2.minFractionDigits = str2.length - dot - 1; + return node2; + }, + stringify: stringifyNumber.stringifyNumber + }; + exports2.float = float; + exports2.floatExp = floatExp; + exports2.floatNaN = floatNaN; + } +}); + +// ../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/schema/core/int.js +var require_int2 = __commonJS({ + "../../../node_modules/.pnpm/yaml@2.9.0/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 = (str2, offset2, radix, { intAsBigInt }) => intAsBigInt ? BigInt(str2) : parseInt(str2.substring(offset2), radix); + function intStringify(node2, radix, prefix) { + const { value } = node2; + if (intIdentify(value) && value >= 0) + return prefix + value.toString(radix); + return stringifyNumber.stringifyNumber(node2); + } + var intOct = { + identify: (value) => intIdentify(value) && value >= 0, + default: true, + tag: "tag:yaml.org,2002:int", + format: "OCT", + test: /^0o[0-7]+$/, + resolve: (str2, _onError, opt) => intResolve(str2, 2, 8, opt), + stringify: (node2) => intStringify(node2, 8, "0o") + }; + var int = { + identify: intIdentify, + default: true, + tag: "tag:yaml.org,2002:int", + test: /^[-+]?[0-9]+$/, + resolve: (str2, _onError, opt) => intResolve(str2, 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: (str2, _onError, opt) => intResolve(str2, 2, 16, opt), + stringify: (node2) => intStringify(node2, 16, "0x") + }; + exports2.int = int; + exports2.intHex = intHex; + exports2.intOct = intOct; + } +}); + +// ../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/schema/core/schema.js +var require_schema2 = __commonJS({ + "../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/schema/core/schema.js"(exports2) { + "use strict"; + var map3 = require_map2(); + var _null = require_null2(); + var seq = require_seq2(); + var string3 = require_string(); + var bool = require_bool2(); + var float = require_float2(); + var int = require_int2(); + var schema = [ + map3.map, + seq.seq, + string3.string, + _null.nullTag, + bool.boolTag, + int.intOct, + int.int, + int.intHex, + float.floatNaN, + float.floatExp, + float.float + ]; + exports2.schema = schema; + } +}); + +// ../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/schema/json/schema.js +var require_schema3 = __commonJS({ + "../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/schema/json/schema.js"(exports2) { + "use strict"; + var Scalar = require_Scalar(); + var map3 = require_map2(); + var seq = require_seq2(); + 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: (str2) => str2, + 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: (str2) => str2 === "true", + stringify: stringifyJSON + }, + { + identify: intIdentify, + default: true, + tag: "tag:yaml.org,2002:int", + test: /^-?(?:0|[1-9][0-9]*)$/, + resolve: (str2, _onError, { intAsBigInt }) => intAsBigInt ? BigInt(str2) : parseInt(str2, 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: (str2) => parseFloat(str2), + stringify: stringifyJSON + } + ]; + var jsonError = { + default: true, + tag: "", + test: /^/, + resolve(str2, onError) { + onError(`Unresolved plain scalar ${JSON.stringify(str2)}`); + return str2; + } + }; + var schema = [map3.map, seq.seq].concat(jsonScalars, jsonError); + exports2.schema = schema; + } +}); + +// ../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/schema/yaml-1.1/binary.js +var require_binary2 = __commonJS({ + "../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/schema/yaml-1.1/binary.js"(exports2) { + "use strict"; + var node_buffer = __require("buffer"); + 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 node_buffer.Buffer === "function") { + return node_buffer.Buffer.from(src, "base64"); + } else if (typeof atob === "function") { + const str2 = atob(src.replace(/[\n\r]/g, "")); + const buffer = new Uint8Array(str2.length); + for (let i = 0; i < str2.length; ++i) + buffer[i] = str2.charCodeAt(i); + return buffer; + } else { + onError("This environment does not support reading binary tags; either Buffer or atob is required"); + return src; + } + }, + stringify({ comment: comment2, type, value }, ctx, onComment, onChompKeep) { + if (!value) + return ""; + const buf = value; + let str2; + if (typeof node_buffer.Buffer === "function") { + str2 = buf instanceof node_buffer.Buffer ? buf.toString("base64") : node_buffer.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]); + str2 = btoa(s); + } else { + throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required"); + } + 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(str2.length / lineWidth); + const lines = new Array(n); + for (let i = 0, o = 0; i < n; ++i, o += lineWidth) { + lines[i] = str2.substr(o, lineWidth); + } + str2 = lines.join(type === Scalar.Scalar.BLOCK_LITERAL ? "\n" : " "); + } + return stringifyString.stringifyString({ comment: comment2, type, value: str2 }, ctx, onComment, onChompKeep); + } + }; + exports2.binary = binary; + } +}); + +// ../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/schema/yaml-1.1/pairs.js +var require_pairs2 = __commonJS({ + "../../../node_modules/.pnpm/yaml@2.9.0/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 keys2 = Object.keys(it); + if (keys2.length === 1) { + key = keys2[0]; + value = it[key]; + } else { + throw new TypeError(`Expected tuple with one key, not ${keys2.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/.pnpm/yaml@2.9.0/node_modules/yaml/dist/schema/yaml-1.1/omap.js +var require_omap2 = __commonJS({ + "../../../node_modules/.pnpm/yaml@2.9.0/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_pairs2(); + 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 map3 = /* @__PURE__ */ new Map(); + if (ctx?.onCreate) + ctx.onCreate(map3); + 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 (map3.has(key)) + throw new Error("Ordered maps must not include duplicate keys"); + map3.set(key, value); + } + return map3; + } + 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/.pnpm/yaml@2.9.0/node_modules/yaml/dist/schema/yaml-1.1/bool.js +var require_bool3 = __commonJS({ + "../../../node_modules/.pnpm/yaml@2.9.0/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/.pnpm/yaml@2.9.0/node_modules/yaml/dist/schema/yaml-1.1/float.js +var require_float3 = __commonJS({ + "../../../node_modules/.pnpm/yaml@2.9.0/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: (str2) => str2.slice(-3).toLowerCase() === "nan" ? NaN : str2[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: (str2) => parseFloat(str2.replace(/_/g, "")), + stringify(node2) { + const num = Number(node2.value); + return isFinite(num) ? num.toExponential() : stringifyNumber.stringifyNumber(node2); + } + }; + var float = { + identify: (value) => typeof value === "number", + default: true, + tag: "tag:yaml.org,2002:float", + test: /^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/, + resolve(str2) { + const node2 = new Scalar.Scalar(parseFloat(str2.replace(/_/g, ""))); + const dot = str2.indexOf("."); + if (dot !== -1) { + const f = str2.substring(dot + 1).replace(/_/g, ""); + if (f[f.length - 1] === "0") + node2.minFractionDigits = f.length; + } + return node2; + }, + stringify: stringifyNumber.stringifyNumber + }; + exports2.float = float; + exports2.floatExp = floatExp; + exports2.floatNaN = floatNaN; + } +}); + +// ../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/schema/yaml-1.1/int.js +var require_int3 = __commonJS({ + "../../../node_modules/.pnpm/yaml@2.9.0/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(str2, offset2, radix, { intAsBigInt }) { + const sign = str2[0]; + if (sign === "-" || sign === "+") + offset2 += 1; + str2 = str2.substring(offset2).replace(/_/g, ""); + if (intAsBigInt) { + switch (radix) { + case 2: + str2 = `0b${str2}`; + break; + case 8: + str2 = `0o${str2}`; + break; + case 16: + str2 = `0x${str2}`; + break; + } + const n2 = BigInt(str2); + return sign === "-" ? BigInt(-1) * n2 : n2; + } + const n = parseInt(str2, radix); + return sign === "-" ? -1 * n : n; + } + function intStringify(node2, radix, prefix) { + const { value } = node2; + if (intIdentify(value)) { + const str2 = value.toString(radix); + return value < 0 ? "-" + prefix + str2.substr(1) : prefix + str2; + } + return stringifyNumber.stringifyNumber(node2); + } + var intBin = { + identify: intIdentify, + default: true, + tag: "tag:yaml.org,2002:int", + format: "BIN", + test: /^[-+]?0b[0-1_]+$/, + resolve: (str2, _onError, opt) => intResolve(str2, 2, 2, opt), + stringify: (node2) => intStringify(node2, 2, "0b") + }; + var intOct = { + identify: intIdentify, + default: true, + tag: "tag:yaml.org,2002:int", + format: "OCT", + test: /^[-+]?0[0-7_]+$/, + resolve: (str2, _onError, opt) => intResolve(str2, 1, 8, opt), + stringify: (node2) => intStringify(node2, 8, "0") + }; + var int = { + identify: intIdentify, + default: true, + tag: "tag:yaml.org,2002:int", + test: /^[-+]?[0-9][0-9_]*$/, + resolve: (str2, _onError, opt) => intResolve(str2, 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: (str2, _onError, opt) => intResolve(str2, 2, 16, opt), + stringify: (node2) => intStringify(node2, 16, "0x") + }; + exports2.int = int; + exports2.intBin = intBin; + exports2.intHex = intHex; + exports2.intOct = intOct; + } +}); + +// ../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/schema/yaml-1.1/set.js +var require_set2 = __commonJS({ + "../../../node_modules/.pnpm/yaml@2.9.0/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(map3, onError) { + if (identity.isMap(map3)) { + if (map3.hasAllNullValues(true)) + return Object.assign(new YAMLSet(), map3); + else + onError("Set items must all have null values"); + } else + onError("Expected a mapping for this tag"); + return map3; + } + }; + exports2.YAMLSet = YAMLSet; + exports2.set = set; + } +}); + +// ../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/schema/yaml-1.1/timestamp.js +var require_timestamp2 = __commonJS({ + "../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/schema/yaml-1.1/timestamp.js"(exports2) { + "use strict"; + var stringifyNumber = require_stringifyNumber(); + function parseSexagesimal(str2, asBigInt) { + const sign = str2[0]; + const parts = sign === "-" || sign === "+" ? str2.substring(1) : str2; + 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(node2) { + let { value } = node2; + let num = (n) => n; + if (typeof value === "bigint") + num = (n) => BigInt(n); + else if (isNaN(value) || !isFinite(value)) + return stringifyNumber.stringifyNumber(node2); + 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: (str2, _onError, { intAsBigInt }) => parseSexagesimal(str2, 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: (str2) => parseSexagesimal(str2, 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(str2) { + const match = str2.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/.pnpm/yaml@2.9.0/node_modules/yaml/dist/schema/yaml-1.1/schema.js +var require_schema4 = __commonJS({ + "../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/schema/yaml-1.1/schema.js"(exports2) { + "use strict"; + var map3 = require_map2(); + var _null = require_null2(); + var seq = require_seq2(); + var string3 = require_string(); + var binary = require_binary2(); + var bool = require_bool3(); + var float = require_float3(); + var int = require_int3(); + var merge2 = require_merge2(); + var omap = require_omap2(); + var pairs = require_pairs2(); + var set = require_set2(); + var timestamp = require_timestamp2(); + var schema = [ + map3.map, + seq.seq, + string3.string, + _null.nullTag, + bool.trueTag, + bool.falseTag, + int.intBin, + int.intOct, + int.int, + int.intHex, + float.floatNaN, + float.floatExp, + float.float, + binary.binary, + merge2.merge, + omap.omap, + pairs.pairs, + set.set, + timestamp.intTime, + timestamp.floatTime, + timestamp.timestamp + ]; + exports2.schema = schema; + } +}); + +// ../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/schema/tags.js +var require_tags = __commonJS({ + "../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/schema/tags.js"(exports2) { + "use strict"; + var map3 = require_map2(); + var _null = require_null2(); + var seq = require_seq2(); + var string3 = require_string(); + var bool = require_bool2(); + var float = require_float2(); + var int = require_int2(); + var schema = require_schema2(); + var schema$1 = require_schema3(); + var binary = require_binary2(); + var merge2 = require_merge2(); + var omap = require_omap2(); + var pairs = require_pairs2(); + var schema$2 = require_schema4(); + var set = require_set2(); + var timestamp = require_timestamp2(); + var schemas = /* @__PURE__ */ new Map([ + ["core", schema.schema], + ["failsafe", [map3.map, seq.seq, string3.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: map3.map, + merge: merge2.merge, + 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:merge": merge2.merge, + "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, addMergeTag) { + const schemaTags = schemas.get(schemaName); + if (schemaTags && !customTags) { + return addMergeTag && !schemaTags.includes(merge2.merge) ? schemaTags.concat(merge2.merge) : schemaTags.slice(); + } + let tags = schemaTags; + if (!tags) { + if (Array.isArray(customTags)) + tags = []; + else { + const keys2 = Array.from(schemas.keys()).filter((key) => key !== "yaml11").map((key) => JSON.stringify(key)).join(", "); + throw new Error(`Unknown schema "${schemaName}"; use one of ${keys2} 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()); + } + if (addMergeTag) + tags = tags.concat(merge2.merge); + return tags.reduce((tags2, tag) => { + const tagObj = typeof tag === "string" ? tagsByName[tag] : tag; + if (!tagObj) { + const tagName = JSON.stringify(tag); + const keys2 = Object.keys(tagsByName).map((key) => JSON.stringify(key)).join(", "); + throw new Error(`Unknown custom tag ${tagName}; use one of ${keys2}`); + } + if (!tags2.includes(tagObj)) + tags2.push(tagObj); + return tags2; + }, []); + } + exports2.coreKnownTags = coreKnownTags; + exports2.getTags = getTags; + } +}); + +// ../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/schema/Schema.js +var require_Schema = __commonJS({ + "../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/schema/Schema.js"(exports2) { + "use strict"; + var identity = require_identity(); + var map3 = require_map2(); + var seq = require_seq2(); + var string3 = require_string(); + var tags = require_tags(); + var sortMapEntriesByKey = (a, b) => a.key < b.key ? -1 : a.key > b.key ? 1 : 0; + var Schema2 = class _Schema { + constructor({ compat, customTags, merge: merge2, resolveKnownTags, schema, sortMapEntries, toStringDefaults }) { + this.compat = Array.isArray(compat) ? tags.getTags(compat, "compat") : compat ? tags.getTags(null, compat) : null; + this.name = typeof schema === "string" && schema || "core"; + this.knownTags = resolveKnownTags ? tags.coreKnownTags : {}; + this.tags = tags.getTags(customTags, this.name, merge2); + this.toStringOptions = toStringDefaults ?? null; + Object.defineProperty(this, identity.MAP, { value: map3.map }); + Object.defineProperty(this, identity.SCALAR, { value: string3.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 = Schema2; + } +}); + +// ../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/stringify/stringifyDocument.js +var require_stringifyDocument = __commonJS({ + "../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/stringify/stringifyDocument.js"(exports2) { + "use strict"; + var identity = require_identity(); + var stringify4 = require_stringify2(); + var stringifyComment = require_stringifyComment(); + function stringifyDocument(doc, options2) { + const lines = []; + let hasDirectives = options2.directives === true; + if (options2.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 = stringify4.createStringifyContext(doc, options2); + 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 = stringify4.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(stringify4.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/.pnpm/yaml@2.9.0/node_modules/yaml/dist/doc/Document.js +var require_Document = __commonJS({ + "../../../node_modules/.pnpm/yaml@2.9.0/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 Schema2 = 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, options2) { + 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 (options2 === void 0 && replacer) { + options2 = replacer; + replacer = void 0; + } + const opt = Object.assign({ + intAsBigInt: false, + keepSourceTokens: false, + logLevel: "warn", + prettyErrors: true, + strict: true, + stringKeys: false, + uniqueKeys: true, + version: "1.2" + }, options2); + this.options = opt; + let { version: version2 } = opt; + if (options2?._directives) { + this.directives = options2._directives.atDocument(); + if (this.directives.yaml.explicit) + version2 = this.directives.yaml.version; + } else + this.directives = new directives.Directives({ version: version2 }); + this.setSchema(version2, options2); + this.contents = value === void 0 ? null : this.createNode(value, _replacer, options2); + } + /** + * 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(path2, value) { + if (assertCollection(this.contents)) + this.contents.addIn(path2, 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(node2, name2) { + if (!node2.anchor) { + const prev = anchors.anchorNames(this); + node2.anchor = // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing + !name2 || prev.has(name2) ? anchors.findNewAnchor(name2 || "a", prev) : name2; + } + return new Alias.Alias(node2.anchor); + } + createNode(value, replacer, options2) { + 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 (options2 === void 0 && replacer) { + options2 = replacer; + replacer = void 0; + } + const { aliasDuplicateObjects, anchorPrefix, flow: flow3, keepUndefined, onTagObj, tag } = options2 ?? {}; + 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 node2 = createNode.createNode(value, tag, ctx); + if (flow3 && identity.isCollection(node2)) + node2.flow = true; + setAnchors(); + return node2; + } + /** + * 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, options2 = {}) { + const k = this.createNode(key, null, options2); + const v = this.createNode(value, null, options2); + 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(path2) { + if (Collection.isEmptyPath(path2)) { + if (this.contents == null) + return false; + this.contents = null; + return true; + } + return assertCollection(this.contents) ? this.contents.deleteIn(path2) : 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(path2, keepScalar) { + if (Collection.isEmptyPath(path2)) + return !keepScalar && identity.isScalar(this.contents) ? this.contents.value : this.contents; + return identity.isCollection(this.contents) ? this.contents.getIn(path2, 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(path2) { + if (Collection.isEmptyPath(path2)) + return this.contents !== void 0; + return identity.isCollection(this.contents) ? this.contents.hasIn(path2) : 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(path2, value) { + if (Collection.isEmptyPath(path2)) { + this.contents = value; + } else if (this.contents == null) { + this.contents = Collection.collectionFromPath(this.schema, Array.from(path2), value); + } else if (assertCollection(this.contents)) { + this.contents.setIn(path2, 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(version2, options2 = {}) { + if (typeof version2 === "number") + version2 = String(version2); + let opt; + switch (version2) { + case "1.1": + if (this.directives) + this.directives.yaml.version = "1.1"; + else + this.directives = new directives.Directives({ version: "1.1" }); + opt = { resolveKnownTags: false, schema: "yaml-1.1" }; + break; + case "1.2": + case "next": + if (this.directives) + this.directives.yaml.version = version2; + else + this.directives = new directives.Directives({ version: version2 }); + opt = { resolveKnownTags: true, schema: "core" }; + break; + case null: + if (this.directives) + delete this.directives; + opt = null; + break; + default: { + const sv = JSON.stringify(version2); + throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${sv}`); + } + } + if (options2.schema instanceof Object) + this.schema = options2.schema; + else if (opt) + this.schema = new Schema2.Schema(Object.assign(opt, options2)); + 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(options2 = {}) { + if (this.errors.length > 0) + throw new Error("Document with errors cannot be stringified"); + if ("indent" in options2 && (!Number.isInteger(options2.indent) || Number(options2.indent) <= 0)) { + const s = JSON.stringify(options2.indent); + throw new Error(`"indent" option must be a positive integer, not ${s}`); + } + return stringifyDocument.stringifyDocument(this, options2); + } + }; + function assertCollection(contents) { + if (identity.isCollection(contents)) + return true; + throw new Error("Expected a YAML collection as document contents"); + } + exports2.Document = Document; + } +}); + +// ../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/errors.js +var require_errors = __commonJS({ + "../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/errors.js"(exports2) { + "use strict"; + var YAMLError = class extends Error { + constructor(name2, pos, code4, message) { + super(); + this.name = name2; + this.code = code4; + this.message = message; + this.pos = pos; + } + }; + var YAMLParseError = class extends YAMLError { + constructor(pos, code4, message) { + super("YAMLParseError", pos, code4, message); + } + }; + var YAMLWarning = class extends YAMLError { + constructor(pos, code4, message) { + super("YAMLWarning", pos, code4, 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?.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/.pnpm/yaml@2.9.0/node_modules/yaml/dist/compose/resolve-props.js +var require_resolve_props = __commonJS({ + "../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/compose/resolve-props.js"(exports2) { + "use strict"; + function resolveProps(tokens, { flow: flow3, indicator, next, offset: offset2, onError, parentIndent, startOnNewline }) { + let spaceBefore = false; + let atNewline = startOnNewline; + let hasSpace = startOnNewline; + let comment2 = ""; + let commentSep = ""; + let hasNewline = false; + let reqSpace = false; + let tab2 = null; + let anchor = null; + let tag = null; + let newlineAfterProp = null; + let comma = null; + let found = null; + let start2 = 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 (tab2) { + if (atNewline && token.type !== "comment" && token.type !== "newline") { + onError(tab2, "TAB_AS_INDENT", "Tabs are not allowed as indentation"); + } + tab2 = null; + } + switch (token.type) { + case "space": + if (!flow3 && (indicator !== "doc-start" || next?.type !== "flow-collection") && token.source.includes(" ")) { + tab2 = 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 (!comment2) + comment2 = cb; + else + comment2 += commentSep + cb; + commentSep = ""; + atNewline = false; + break; + } + case "newline": + if (atNewline) { + if (comment2) + comment2 += token.source; + else if (!found || indicator !== "seq-item-ind") + 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; + start2 ?? (start2 = 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; + start2 ?? (start2 = 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 ${flow3 ?? "collection"}`); + found = token; + atNewline = indicator === "seq-item-ind" || indicator === "explicit-key-ind"; + hasSpace = false; + break; + case "comma": + if (flow3) { + if (comma) + onError(token, "UNEXPECTED_TOKEN", `Unexpected , in ${flow3}`); + comma = token; + atNewline = false; + hasSpace = false; + break; + } + // else fallthrough + 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 : offset2; + 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 (tab2 && (atNewline && tab2.indent <= parentIndent || next?.type === "block-map" || next?.type === "block-seq")) + onError(tab2, "TAB_AS_INDENT", "Tabs are not allowed as indentation"); + return { + comma, + found, + spaceBefore, + comment: comment2, + hasNewline, + anchor, + tag, + newlineAfterProp, + end, + start: start2 ?? end + }; + } + exports2.resolveProps = resolveProps; + } +}); + +// ../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/compose/util-contains-newline.js +var require_util_contains_newline = __commonJS({ + "../../../node_modules/.pnpm/yaml@2.9.0/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/.pnpm/yaml@2.9.0/node_modules/yaml/dist/compose/util-flow-indent-check.js +var require_util_flow_indent_check = __commonJS({ + "../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/compose/util-flow-indent-check.js"(exports2) { + "use strict"; + var utilContainsNewline = require_util_contains_newline(); + function flowIndentCheck(indent3, fc, onError) { + if (fc?.type === "flow-collection") { + const end = fc.end[0]; + if (end.indent === indent3 && (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/.pnpm/yaml@2.9.0/node_modules/yaml/dist/compose/util-map-includes.js +var require_util_map_includes = __commonJS({ + "../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/compose/util-map-includes.js"(exports2) { + "use strict"; + var identity = require_identity(); + function mapIncludes(ctx, items, search2) { + 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; + return items.some((pair) => isEqual(pair.key, search2)); + } + exports2.mapIncludes = mapIncludes; + } +}); + +// ../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/compose/resolve-block-map.js +var require_resolve_block_map = __commonJS({ + "../../../node_modules/.pnpm/yaml@2.9.0/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 map3 = new NodeClass(ctx.schema); + if (ctx.atRoot) + ctx.atRoot = false; + let offset2 = bm.offset; + let commentEnd = null; + for (const collItem of bm.items) { + const { start: start2, key, sep, value } = collItem; + const keyProps = resolveProps.resolveProps(start2, { + indicator: "explicit-key-ind", + next: key ?? sep?.[0], + offset: offset2, + onError, + parentIndent: bm.indent, + startOnNewline: true + }); + const implicitKey = !keyProps.found; + if (implicitKey) { + if (key) { + if (key.type === "block-seq") + onError(offset2, "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(offset2, "BAD_INDENT", startColMsg); + } + if (!keyProps.anchor && !keyProps.tag && !sep) { + commentEnd = keyProps.end; + if (keyProps.comment) { + if (map3.comment) + map3.comment += "\n" + keyProps.comment; + else + map3.comment = keyProps.comment; + } + continue; + } + if (keyProps.newlineAfterProp || utilContainsNewline.containsNewline(key)) { + onError(key ?? start2[start2.length - 1], "MULTILINE_IMPLICIT_KEY", "Implicit keys need to be on a single line"); + } + } else if (keyProps.found?.indent !== bm.indent) { + onError(offset2, "BAD_INDENT", startColMsg); + } + ctx.atKey = true; + const keyStart = keyProps.end; + const keyNode = key ? composeNode(ctx, key, keyProps, onError) : composeEmptyNode(ctx, keyStart, start2, null, keyProps, onError); + if (ctx.schema.compat) + utilFlowIndentCheck.flowIndentCheck(bm.indent, key, onError); + ctx.atKey = false; + if (utilMapIncludes.mapIncludes(ctx, map3.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" + }); + offset2 = valueProps.end; + if (valueProps.found) { + if (implicitKey) { + if (value?.type === "block-map" && !valueProps.hasNewline) + onError(offset2, "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, offset2, sep, null, valueProps, onError); + if (ctx.schema.compat) + utilFlowIndentCheck.flowIndentCheck(bm.indent, value, onError); + offset2 = valueNode.range[2]; + const pair = new Pair.Pair(keyNode, valueNode); + if (ctx.options.keepSourceTokens) + pair.srcToken = collItem; + map3.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; + map3.items.push(pair); + } + } + if (commentEnd && commentEnd < offset2) + onError(commentEnd, "IMPOSSIBLE", "Map comment with trailing content"); + map3.range = [bm.offset, offset2, commentEnd ?? offset2]; + return map3; + } + exports2.resolveBlockMap = resolveBlockMap; + } +}); + +// ../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/compose/resolve-block-seq.js +var require_resolve_block_seq = __commonJS({ + "../../../node_modules/.pnpm/yaml@2.9.0/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; + if (ctx.atKey) + ctx.atKey = false; + let offset2 = bs.offset; + let commentEnd = null; + for (const { start: start2, value } of bs.items) { + const props = resolveProps.resolveProps(start2, { + indicator: "seq-item-ind", + next: value, + offset: offset2, + onError, + parentIndent: bs.indent, + startOnNewline: true + }); + if (!props.found) { + if (props.anchor || props.tag || value) { + if (value?.type === "block-seq") + onError(props.end, "BAD_INDENT", "All sequence items must start at the same column"); + else + onError(offset2, "MISSING_CHAR", "Sequence item without - indicator"); + } else { + commentEnd = props.end; + if (props.comment) + seq.comment = props.comment; + continue; + } + } + const node2 = value ? composeNode(ctx, value, props, onError) : composeEmptyNode(ctx, props.end, start2, null, props, onError); + if (ctx.schema.compat) + utilFlowIndentCheck.flowIndentCheck(bs.indent, value, onError); + offset2 = node2.range[2]; + seq.items.push(node2); + } + seq.range = [bs.offset, offset2, commentEnd ?? offset2]; + return seq; + } + exports2.resolveBlockSeq = resolveBlockSeq; + } +}); + +// ../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/compose/resolve-end.js +var require_resolve_end = __commonJS({ + "../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/compose/resolve-end.js"(exports2) { + "use strict"; + function resolveEnd(end, offset2, reqSpace, onError) { + let comment2 = ""; + 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 (!comment2) + comment2 = cb; + else + comment2 += sep + cb; + sep = ""; + break; + } + case "newline": + if (comment2) + sep += source; + hasSpace = true; + break; + default: + onError(token, "UNEXPECTED_TOKEN", `Unexpected ${type} at node end`); + } + offset2 += source.length; + } + } + return { comment: comment2, offset: offset2 }; + } + exports2.resolveEnd = resolveEnd; + } +}); + +// ../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/compose/resolve-flow-collection.js +var require_resolve_flow_collection = __commonJS({ + "../../../node_modules/.pnpm/yaml@2.9.0/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; + if (ctx.atKey) + ctx.atKey = false; + let offset2 = fc.offset + fc.start.source.length; + for (let i = 0; i < fc.items.length; ++i) { + const collItem = fc.items[i]; + const { start: start2, key, sep, value } = collItem; + const props = resolveProps.resolveProps(start2, { + flow: fcName, + indicator: "explicit-key-ind", + next: key ?? sep?.[0], + offset: offset2, + 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; + } + offset2 = 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 start2) { + 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); + offset2 = valueNode.range[2]; + if (isBlock(value)) + onError(valueNode.range, "BLOCK_IN_FLOW", blockMsg); + } else { + ctx.atKey = true; + const keyStart = props.end; + const keyNode = key ? composeNode(ctx, key, props, onError) : composeEmptyNode(ctx, keyStart, start2, null, props, onError); + if (isBlock(key)) + onError(keyNode.range, "BLOCK_IN_FLOW", blockMsg); + ctx.atKey = false; + 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?.[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 map3 = coll; + if (utilMapIncludes.mapIncludes(ctx, map3.items, keyNode)) + onError(keyStart, "DUPLICATE_KEY", "Map keys must be unique"); + map3.items.push(pair); + } else { + const map3 = new YAMLMap.YAMLMap(ctx.schema); + map3.flow = true; + map3.items.push(pair); + const endRange = (valueNode ?? keyNode).range; + map3.range = [keyNode.range[0], endRange[1], endRange[2]]; + coll.items.push(map3); + } + offset2 = valueNode ? valueNode.range[2] : valueProps.end; + } + } + const expectedEnd = isMap ? "}" : "]"; + const [ce, ...ee] = fc.end; + let cePos = offset2; + if (ce?.source === expectedEnd) + cePos = ce.offset + ce.source.length; + else { + const name2 = fcName[0].toUpperCase() + fcName.substring(1); + const msg = atRoot ? `${name2} must end with a ${expectedEnd}` : `${name2} in block collection must be sufficiently indented and end with a ${expectedEnd}`; + onError(offset2, 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/.pnpm/yaml@2.9.0/node_modules/yaml/dist/compose/compose-collection.js +var require_compose_collection = __commonJS({ + "../../../node_modules/.pnpm/yaml@2.9.0/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?.collection === expType) { + ctx.schema.tags.push(Object.assign({}, kt, { default: false })); + tag = kt; + } else { + if (kt) { + onError(tagToken, "BAD_COLLECTION_TYPE", `${kt.tag} used for ${expType} collection, but expects ${kt.collection ?? "scalar"}`, 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 node2 = identity.isNode(res) ? res : new Scalar.Scalar(res); + node2.range = coll.range; + node2.tag = tagName; + if (tag?.format) + node2.format = tag.format; + return node2; + } + exports2.composeCollection = composeCollection; + } +}); + +// ../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/compose/resolve-block-scalar.js +var require_resolve_block_scalar = __commonJS({ + "../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/compose/resolve-block-scalar.js"(exports2) { + "use strict"; + var Scalar = require_Scalar(); + function resolveBlockScalar(ctx, scalar, onError) { + const start2 = scalar.offset; + const header = parseBlockScalarHeader(scalar, ctx.options.strict, onError); + if (!header) + return { value: "", type: null, comment: "", range: [start2, start2, start2] }; + 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 content3 = lines[i][1]; + if (content3 === "" || content3 === "\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 = start2 + header.length; + if (scalar.source) + end2 += scalar.source.length; + return { value: value2, type, comment: header.comment, range: [start2, end2, end2] }; + } + let trimIndent = scalar.indent + header.indent; + let offset2 = scalar.offset + header.length; + let contentStart = 0; + for (let i = 0; i < chompStart; ++i) { + const [indent3, content3] = lines[i]; + if (content3 === "" || content3 === "\r") { + if (header.indent === 0 && indent3.length > trimIndent) + trimIndent = indent3.length; + } else { + if (indent3.length < trimIndent) { + const message = "Block scalars with more-indented leading empty lines must use an explicit indentation indicator"; + onError(offset2 + indent3.length, "MISSING_CHAR", message); + } + if (header.indent === 0) + trimIndent = indent3.length; + contentStart = i; + if (trimIndent === 0 && !ctx.atRoot) { + const message = "Block scalar values in collections must be indented"; + onError(offset2, "BAD_INDENT", message); + } + break; + } + offset2 += indent3.length + content3.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 [indent3, content3] = lines[i]; + offset2 += indent3.length + content3.length + 1; + const crlf = content3[content3.length - 1] === "\r"; + if (crlf) + content3 = content3.slice(0, -1); + if (content3 && indent3.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(offset2 - content3.length - (crlf ? 2 : 1), "BAD_INDENT", message); + indent3 = ""; + } + if (type === Scalar.Scalar.BLOCK_LITERAL) { + value += sep + indent3.slice(trimIndent) + content3; + sep = "\n"; + } else if (indent3.length > trimIndent || content3[0] === " ") { + if (sep === " ") + sep = "\n"; + else if (!prevMoreIndented && sep === "\n") + sep = "\n\n"; + value += sep + indent3.slice(trimIndent) + content3; + sep = "\n"; + prevMoreIndented = true; + } else if (content3 === "") { + if (sep === "\n") + value += "\n"; + else + sep = "\n"; + } else { + value += sep + content3; + 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 = start2 + header.length + scalar.source.length; + return { value, type, comment: header.comment, range: [start2, end, end] }; + } + function parseBlockScalarHeader({ offset: offset2, 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 indent3 = 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 (!indent3 && n) + indent3 = n; + else if (error === -1) + error = offset2 + i; + } + } + if (error !== -1) + onError(error, "UNEXPECTED_TOKEN", `Block scalar header includes extra characters: ${source}`); + let hasSpace = false; + let comment2 = ""; + let length = source.length; + for (let i = 1; i < props.length; ++i) { + const token = props[i]; + switch (token.type) { + case "space": + hasSpace = true; + // fallthrough + 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; + comment2 = token.source.substring(1); + break; + case "error": + onError(token, "UNEXPECTED_TOKEN", token.message); + length += token.source.length; + break; + /* istanbul ignore next should not happen */ + 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: indent3, chomp, comment: comment2, 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/.pnpm/yaml@2.9.0/node_modules/yaml/dist/compose/resolve-flow-scalar.js +var require_resolve_flow_scalar = __commonJS({ + "../../../node_modules/.pnpm/yaml@2.9.0/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: offset2, type, source, end } = scalar; + let _type; + let value; + const _onError = (rel, code4, msg) => onError(offset2 + rel, code4, 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; + /* istanbul ignore next should not happen */ + default: + onError(scalar, "UNEXPECTED_TOKEN", `Expected a flow scalar value, but found: ${type}`); + return { + value: "", + type: null, + comment: "", + range: [offset2, offset2 + source.length, offset2 + source.length] + }; + } + const valueEnd = offset2 + source.length; + const re2 = resolveEnd.resolveEnd(end, valueEnd, strict, onError); + return { + value, + type: _type, + comment: re2.comment, + range: [offset2, valueEnd, re2.offset] + }; + } + function plainValue(source, onError) { + let badChar = ""; + switch (source[0]) { + /* istanbul ignore next should not happen */ + 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, offset2) { + let fold = ""; + let ch = source[offset2 + 1]; + while (ch === " " || ch === " " || ch === "\n" || ch === "\r") { + if (ch === "\r" && source[offset2 + 2] !== "\n") + break; + if (ch === "\n") + fold += "\n"; + offset2 += 1; + ch = source[offset2 + 1]; + } + if (!fold) + fold = " "; + return { fold, offset: offset2 }; + } + 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, offset2, length, onError) { + const cc = source.substr(offset2, length); + const ok3 = cc.length === length && /^[0-9a-fA-F]+$/.test(cc); + const code4 = ok3 ? parseInt(cc, 16) : NaN; + try { + return String.fromCodePoint(code4); + } catch { + const raw = source.substr(offset2 - 2, length + 2); + onError(offset2 - 2, "BAD_DQ_ESCAPE", `Invalid escape sequence ${raw}`); + return raw; + } + } + exports2.resolveFlowScalar = resolveFlowScalar; + } +}); + +// ../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/compose/compose-scalar.js +var require_compose_scalar = __commonJS({ + "../../../node_modules/.pnpm/yaml@2.9.0/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: comment2, 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; + let tag; + if (ctx.options.stringKeys && ctx.atKey) { + tag = ctx.schema[identity.SCALAR]; + } else if (tagName) + tag = findScalarTagByName(ctx.schema, value, tagName, tagToken, onError); + else if (token.type === "scalar") + tag = findScalarTagByTest(ctx, value, token, onError); + else + tag = 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 (comment2) + scalar.comment = comment2; + 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({ atKey, directives, schema }, value, token, onError) { + const tag = schema.tags.find((tag2) => (tag2.default === true || atKey && tag2.default === "key") && 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/.pnpm/yaml@2.9.0/node_modules/yaml/dist/compose/util-empty-scalar-position.js +var require_util_empty_scalar_position = __commonJS({ + "../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/compose/util-empty-scalar-position.js"(exports2) { + "use strict"; + function emptyScalarPosition(offset2, before, pos) { + if (before) { + pos ?? (pos = before.length); + for (let i = pos - 1; i >= 0; --i) { + let st = before[i]; + switch (st.type) { + case "space": + case "comment": + case "newline": + offset2 -= st.source.length; + continue; + } + st = before[++i]; + while (st?.type === "space") { + offset2 += st.source.length; + st = before[++i]; + } + break; + } + } + return offset2; + } + exports2.emptyScalarPosition = emptyScalarPosition; + } +}); + +// ../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/compose/compose-node.js +var require_compose_node = __commonJS({ + "../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/compose/compose-node.js"(exports2) { + "use strict"; + var Alias = require_Alias(); + var identity = require_identity(); + 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 atKey = ctx.atKey; + const { spaceBefore, comment: comment2, anchor, tag } = props; + let node2; + let isSrcToken = true; + switch (token.type) { + case "alias": + node2 = 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": + node2 = composeScalar.composeScalar(ctx, token, tag, onError); + if (anchor) + node2.anchor = anchor.source.substring(1); + break; + case "block-map": + case "block-seq": + case "flow-collection": + try { + node2 = composeCollection.composeCollection(CN, ctx, token, props, onError); + if (anchor) + node2.anchor = anchor.source.substring(1); + } catch (error) { + const message = error instanceof Error ? error.message : String(error); + onError(token, "RESOURCE_EXHAUSTION", message); + } + break; + default: { + const message = token.type === "error" ? token.message : `Unsupported token (type: ${token.type})`; + onError(token, "UNEXPECTED_TOKEN", message); + isSrcToken = false; + } + } + node2 ?? (node2 = composeEmptyNode(ctx, token.offset, void 0, null, props, onError)); + if (anchor && node2.anchor === "") + onError(anchor, "BAD_ALIAS", "Anchor cannot be an empty string"); + if (atKey && ctx.options.stringKeys && (!identity.isScalar(node2) || typeof node2.value !== "string" || node2.tag && node2.tag !== "tag:yaml.org,2002:str")) { + const msg = "With stringKeys, all keys must be strings"; + onError(tag ?? token, "NON_STRING_KEY", msg); + } + if (spaceBefore) + node2.spaceBefore = true; + if (comment2) { + if (token.type === "scalar" && token.source === "") + node2.comment = comment2; + else + node2.commentBefore = comment2; + } + if (ctx.options.keepSourceTokens && isSrcToken) + node2.srcToken = token; + return node2; + } + function composeEmptyNode(ctx, offset2, before, pos, { spaceBefore, comment: comment2, anchor, tag, end }, onError) { + const token = { + type: "scalar", + offset: utilEmptyScalarPosition.emptyScalarPosition(offset2, before, pos), + indent: -1, + source: "" + }; + const node2 = composeScalar.composeScalar(ctx, token, tag, onError); + if (anchor) { + node2.anchor = anchor.source.substring(1); + if (node2.anchor === "") + onError(anchor, "BAD_ALIAS", "Anchor cannot be an empty string"); + } + if (spaceBefore) + node2.spaceBefore = true; + if (comment2) { + node2.comment = comment2; + node2.range[2] = end; + } + return node2; + } + function composeAlias({ options: options2 }, { offset: offset2, source, end }, onError) { + const alias = new Alias.Alias(source.substring(1)); + if (alias.source === "") + onError(offset2, "BAD_ALIAS", "Alias cannot be an empty string"); + if (alias.source.endsWith(":")) + onError(offset2 + source.length - 1, "BAD_ALIAS", "Alias ending in : is ambiguous", true); + const valueEnd = offset2 + source.length; + const re2 = resolveEnd.resolveEnd(end, valueEnd, options2.strict, onError); + alias.range = [offset2, valueEnd, re2.offset]; + if (re2.comment) + alias.comment = re2.comment; + return alias; + } + exports2.composeEmptyNode = composeEmptyNode; + exports2.composeNode = composeNode; + } +}); + +// ../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/compose/compose-doc.js +var require_compose_doc = __commonJS({ + "../../../node_modules/.pnpm/yaml@2.9.0/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(options2, directives, { offset: offset2, start: start2, value, end }, onError) { + const opts = Object.assign({ _directives: directives }, options2); + const doc = new Document.Document(void 0, opts); + const ctx = { + atKey: false, + atRoot: true, + directives: doc.directives, + options: doc.options, + schema: doc.schema + }; + const props = resolveProps.resolveProps(start2, { + indicator: "doc-start", + next: value ?? end?.[0], + offset: offset2, + 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, start2, null, props, onError); + const contentEnd = doc.contents.range[2]; + const re2 = resolveEnd.resolveEnd(end, contentEnd, false, onError); + if (re2.comment) + doc.comment = re2.comment; + doc.range = [offset2, contentEnd, re2.offset]; + return doc; + } + exports2.composeDoc = composeDoc; + } +}); + +// ../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/compose/composer.js +var require_composer = __commonJS({ + "../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/compose/composer.js"(exports2) { + "use strict"; + var node_process = __require("process"); + 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: offset2, source } = src; + return [offset2, offset2 + (typeof source === "string" ? source.length : 1)]; + } + function parsePrelude(prelude) { + let comment2 = ""; + let atComment = false; + let afterEmptyLine = false; + for (let i = 0; i < prelude.length; ++i) { + const source = prelude[i]; + switch (source[0]) { + case "#": + comment2 += (comment2 === "" ? "" : 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: comment2, afterEmptyLine }; + } + var Composer = class { + constructor(options2 = {}) { + this.doc = null; + this.atDirectives = false; + this.prelude = []; + this.errors = []; + this.warnings = []; + this.onError = (source, code4, message, warning) => { + const pos = getErrorPos(source); + if (warning) + this.warnings.push(new errors.YAMLWarning(pos, code4, message)); + else + this.errors.push(new errors.YAMLParseError(pos, code4, message)); + }; + this.directives = new directives.Directives({ version: options2.version || "1.2" }); + this.options = options2; + } + decorate(doc, afterDoc) { + const { comment: comment2, afterEmptyLine } = parsePrelude(this.prelude); + if (comment2) { + const dc = doc.contents; + if (afterDoc) { + doc.comment = doc.comment ? `${doc.comment} +${comment2}` : comment2; + } else if (afterEmptyLine || doc.directives.docStart || !dc) { + doc.commentBefore = comment2; + } 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 ? `${comment2} +${cb}` : comment2; + } else { + const cb = dc.commentBefore; + dc.commentBefore = cb ? `${comment2} +${cb}` : comment2; + } + } + if (afterDoc) { + for (let i = 0; i < this.errors.length; ++i) + doc.errors.push(this.errors[i]); + for (let i = 0; i < this.warnings.length; ++i) + doc.warnings.push(this.warnings[i]); + } 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 (node_process.env.LOG_STREAM) + console.dir(token, { depth: null }); + switch (token.type) { + case "directive": + this.directives.add(token.source, (offset2, message, warning) => { + const pos = getErrorPos(token); + pos[0] += offset2; + 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/.pnpm/yaml@2.9.0/node_modules/yaml/dist/parse/cst-scalar.js +var require_cst_scalar = __commonJS({ + "../../../node_modules/.pnpm/yaml@2.9.0/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, code4, message) => { + const offset2 = typeof pos === "number" ? pos : Array.isArray(pos) ? pos[0] : pos.offset; + if (onError) + onError(offset2, code4, message); + else + throw new errors.YAMLParseError([offset2, offset2 + 1], code4, 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: indent3, inFlow = false, offset: offset2 = -1, type = "PLAIN" } = context; + const source = stringifyString.stringifyString({ type, value }, { + implicitKey, + indent: indent3 > 0 ? " ".repeat(indent3) : "", + inFlow, + options: { blockQuote: true, lineWidth: -1 } + }); + const end = context.end ?? [ + { type: "newline", offset: -1, indent: indent3, 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: offset2, indent: indent3, source: head } + ]; + if (!addEndtoBlockProps(props, end)) + props.push({ type: "newline", offset: -1, indent: indent3, source: "\n" }); + return { type: "block-scalar", offset: offset2, indent: indent3, props, source: body }; + } + case '"': + return { type: "double-quoted-scalar", offset: offset2, indent: indent3, source, end }; + case "'": + return { type: "single-quoted-scalar", offset: offset2, indent: indent3, source, end }; + default: + return { type: "scalar", offset: offset2, indent: indent3, source, end }; + } + } + function setScalarValue(token, value, context = {}) { + let { afterKey = false, implicitKey = false, inFlow = false, type } = context; + let indent3 = "indent" in token ? token.indent : null; + if (afterKey && typeof indent3 === "number") + indent3 += 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 || indent3 === null, + indent: indent3 !== null && indent3 > 0 ? " ".repeat(indent3) : "", + 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: offset2 } = token; + const indent3 = "indent" in token ? token.indent : -1; + const props = [ + { type: "block-scalar-header", offset: offset2, indent: indent3, source: head } + ]; + if (!addEndtoBlockProps(props, "end" in token ? token.end : void 0)) + props.push({ type: "newline", offset: -1, indent: indent3, source: "\n" }); + for (const key of Object.keys(token)) + if (key !== "type" && key !== "offset") + delete token[key]; + Object.assign(token, { type: "block-scalar", indent: indent3, 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 offset2 = token.offset + source.length; + const nl = { type: "newline", offset: offset2, indent: token.indent, source: "\n" }; + delete token.items; + Object.assign(token, { type, source, end: [nl] }); + break; + } + default: { + const indent3 = "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: indent3, source, end }); + } + } + } + exports2.createScalarToken = createScalarToken; + exports2.resolveAsScalar = resolveAsScalar; + exports2.setScalarValue = setScalarValue; + } +}); + +// ../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/parse/cst-stringify.js +var require_cst_stringify = __commonJS({ + "../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/parse/cst-stringify.js"(exports2) { + "use strict"; + var stringify4 = (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: start2, key, sep, value }) { + let res = ""; + for (const st of start2) + 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 = stringify4; + } +}); + +// ../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/parse/cst-visit.js +var require_cst_visit = __commonJS({ + "../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/parse/cst-visit.js"(exports2) { + "use strict"; + var BREAK = Symbol("break visit"); + var SKIP3 = Symbol("skip children"); + var REMOVE = Symbol("remove item"); + function visit3(cst, visitor) { + if ("type" in cst && cst.type === "document") + cst = { start: cst.start, value: cst.value }; + _visit(Object.freeze([]), cst, visitor); + } + visit3.BREAK = BREAK; + visit3.SKIP = SKIP3; + visit3.REMOVE = REMOVE; + visit3.itemAtPath = (cst, path2) => { + let item = cst; + for (const [field, index2] of path2) { + const tok = item?.[field]; + if (tok && "items" in tok) { + item = tok.items[index2]; + } else + return void 0; + } + return item; + }; + visit3.parentCollection = (cst, path2) => { + const parent = visit3.itemAtPath(cst, path2.slice(0, -1)); + const field = path2[path2.length - 1][0]; + const coll = parent?.[field]; + if (coll && "items" in coll) + return coll; + throw new Error("Parent collection not found"); + }; + function _visit(path2, item, visitor) { + let ctrl = visitor(item, path2); + 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(path2.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, path2); + } + } + return typeof ctrl === "function" ? ctrl(item, path2) : ctrl; + } + exports2.visit = visit3; + } +}); + +// ../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/parse/cst.js +var require_cst = __commonJS({ + "../../../node_modules/.pnpm/yaml@2.9.0/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/.pnpm/yaml@2.9.0/node_modules/yaml/dist/parse/lexer.js +var require_lexer = __commonJS({ + "../../../node_modules/.pnpm/yaml@2.9.0/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(offset2) { + let ch = this.buffer[offset2]; + if (this.indentNext > 0) { + let indent3 = 0; + while (ch === " ") + ch = this.buffer[++indent3 + offset2]; + if (ch === "\r") { + const next = this.buffer[indent3 + offset2 + 1]; + if (next === "\n" || !next && !this.atEnd) + return offset2 + indent3 + 1; + } + return ch === "\n" || indent3 >= this.indentNext || !ch && !this.atEnd ? offset2 + indent3 : -1; + } + if (ch === "-" || ch === ".") { + const dt = this.buffer.substr(offset2, 3); + if ((dt === "---" || dt === "...") && isEmpty(this.buffer[offset2 + 3])) + return -1; + } + return offset2; + } + 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 "block-start"; + } + 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); + // fallthrough + 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 indent3 = -1; + do { + nl = yield* this.pushNewline(); + if (nl > 0) { + sp = yield* this.pushSpaces(false); + this.indentValue = indent3 = 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 (indent3 !== -1 && indent3 < this.indentNext && line[0] !== "#" || indent3 === 0 && (line.startsWith("---") || line.startsWith("...")) && isEmpty(line[3])) { + const atFlowEndMarker = indent3 === 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"; + } + } + // fallthrough + 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 indent3 = 0; + let ch; + loop: for (let i2 = this.pos; ch = this.buffer[i2]; ++i2) { + switch (ch) { + case " ": + indent3 += 1; + break; + case "\n": + nl = i2; + indent3 = 0; + break; + case "\r": { + const next = this.buffer[i2 + 1]; + if (!next && !this.atEnd) + return this.setNext("block-scalar"); + if (next === "\n") + break; + } + // fallthrough + default: + break loop; + } + } + if (!ch && !this.atEnd) + return this.setNext("block-scalar"); + if (indent3 >= this.indentNext) { + if (this.blockScalarIndent === -1) + this.indentNext = indent3; + 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 + indent3 > 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() { + let n = 0; + loop: while (true) { + switch (this.charAt(0)) { + case "!": + n += yield* this.pushTag(); + n += yield* this.pushSpaces(true); + continue loop; + case "&": + n += yield* this.pushUntil(isNotAnchorChar); + n += yield* this.pushSpaces(true); + continue loop; + case "-": + // this is an error + case "?": + // this is an error outside flow collections + 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; + n += yield* this.pushCount(1); + n += yield* this.pushSpaces(true); + continue loop; + } + } + } + break loop; + } + return n; + } + *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/.pnpm/yaml@2.9.0/node_modules/yaml/dist/parse/line-counter.js +var require_line_counter = __commonJS({ + "../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/parse/line-counter.js"(exports2) { + "use strict"; + var LineCounter = class { + constructor() { + this.lineStarts = []; + this.addNewLine = (offset2) => this.lineStarts.push(offset2); + this.linePos = (offset2) => { + let low = 0; + let high = this.lineStarts.length; + while (low < high) { + const mid = low + high >> 1; + if (this.lineStarts[mid] < offset2) + low = mid + 1; + else + high = mid; + } + if (this.lineStarts[low] === offset2) + return { line: low + 1, col: 1 }; + if (low === 0) + return { line: 0, col: offset2 }; + const start2 = this.lineStarts[low - 1]; + return { line: low, col: offset2 - start2 + 1 }; + }; + } + }; + exports2.LineCounter = LineCounter; + } +}); + +// ../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/parse/parser.js +var require_parser = __commonJS({ + "../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/parse/parser.js"(exports2) { + "use strict"; + var node_process = __require("process"); + var cst = require_cst(); + var lexer = require_lexer(); + function includesToken(list4, type) { + for (let i = 0; i < list4.length; ++i) + if (list4[i].type === type) + return true; + return false; + } + function findNonEmptyIndex(list4) { + for (let i = 0; i < list4.length; ++i) { + switch (list4[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; + /* istanbul ignore next should not happen */ + 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 arrayPushArray(target, source) { + if (source.length < 1e5) + Array.prototype.push.apply(target, source); + else + for (let i = 0; i < source.length; ++i) + target.push(source[i]); + } + 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) + arrayPushArray(it.value.end, it.sep); + else + it.value.end = it.sep; + } else + arrayPushArray(it.start, it.sep); + delete it.sep; + } + } + } + } + var Parser3 = 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 (node_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?.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; + } + /* istanbul ignore next should not happen */ + 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 start2 = getFirstKeyStartProps(prev); + let sep; + if (scalar.end) { + sep = scalar.end; + sep.push(this.sourceToken); + delete scalar.end; + } else + sep = [this.sourceToken]; + const map3 = { + type: "block-map", + offset: scalar.offset, + indent: scalar.indent, + items: [{ start: start2, key: scalar, sep }] + }; + this.onKeyLine = true; + this.stack[this.stack.length - 1] = map3; + } 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; + /* istanbul ignore next should not happen */ + default: + yield* this.pop(); + yield* this.step(); + } + } + *blockMap(map3) { + const it = map3.items[map3.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 + map3.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) { + map3.items.push({ start: [this.sourceToken] }); + } else if (it.sep) { + it.sep.push(this.sourceToken); + } else { + if (this.atIndentedComment(it.start, map3.indent)) { + const prev = map3.items[map3.items.length - 2]; + const end = prev?.value?.end; + if (Array.isArray(end)) { + arrayPushArray(end, it.start); + end.push(this.sourceToken); + map3.items.pop(); + return; + } + } + it.start.push(this.sourceToken); + } + return; + } + if (this.indent >= map3.indent) { + const atMapIndent = !this.onKeyLine && this.indent === map3.indent; + const atNextItem = atMapIndent && (it.sep || it.explicitKey) && this.type !== "seq-item-ind"; + let start2 = []; + 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 > map3.indent) + nl.length = 0; + break; + default: + nl.length = 0; + } + } + if (nl.length >= 2) + start2 = it.sep.splice(nl[1]); + } + switch (this.type) { + case "anchor": + case "tag": + if (atNextItem || it.value) { + start2.push(this.sourceToken); + map3.items.push({ start: start2 }); + 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) { + start2.push(this.sourceToken); + map3.items.push({ start: start2, 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 start3 = getFirstKeyStartProps(it.start); + this.stack.push({ + type: "block-map", + offset: this.offset, + indent: this.indent, + items: [{ start: start3, key: null, sep: [this.sourceToken] }] + }); + } + } else if (it.value) { + map3.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: start2, key: null, sep: [this.sourceToken] }] + }); + } else if (isFlowToken(it.key) && !includesToken(it.sep, "newline")) { + const start3 = 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: start3, key, sep }] + }); + } else if (start2.length > 0) { + it.sep = it.sep.concat(start2, 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) { + map3.items.push({ start: start2, 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 fs2 = this.flowScalar(this.type); + if (atNextItem || it.value) { + map3.items.push({ start: start2, key: fs2, sep: [] }); + this.onKeyLine = true; + } else if (it.sep) { + this.stack.push(fs2); + } else { + Object.assign(it, { key: fs2, sep: [] }); + this.onKeyLine = true; + } + return; + } + default: { + const bv = this.startBlockValue(map3); + if (bv) { + if (bv.type === "block-seq") { + if (!it.explicitKey && it.sep && !includesToken(it.sep, "newline")) { + yield* this.pop({ + type: "error", + offset: this.offset, + message: "Unexpected block-seq-ind on same line with key", + source: this.source + }); + return; + } + } else if (atMapIndent) { + map3.items.push({ start: start2 }); + } + 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)) { + arrayPushArray(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?.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 fs2 = this.flowScalar(this.type); + if (!it || it.value) + fc.items.push({ start: [], key: fs2, sep: [] }); + else if (it.sep) + this.stack.push(fs2); + else + Object.assign(it, { key: fs2, 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 start2 = getFirstKeyStartProps(prev); + fixFlowSeqItems(fc); + const sep = fc.end.splice(1, fc.end.length); + sep.push(this.sourceToken); + const map3 = { + type: "block-map", + offset: fc.offset, + indent: fc.indent, + items: [{ start: start2, key: fc, sep }] + }; + this.onKeyLine = true; + this.stack[this.stack.length - 1] = map3; + } 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 start2 = getFirstKeyStartProps(prev); + start2.push(this.sourceToken); + return { + type: "block-map", + offset: this.offset, + indent: this.indent, + items: [{ start: start2, explicitKey: true }] + }; + } + case "map-value-ind": { + this.onKeyLine = true; + const prev = getPrevProps(parent); + const start2 = getFirstKeyStartProps(prev); + return { + type: "block-map", + offset: this.offset, + indent: this.indent, + items: [{ start: start2, key: null, sep: [this.sourceToken] }] + }; + } + } + return null; + } + atIndentedComment(start2, indent3) { + if (this.type !== "comment") + return false; + if (this.indent <= indent3) + return false; + return start2.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; + // fallthrough + 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 = Parser3; + } +}); + +// ../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/public-api.js +var require_public_api = __commonJS({ + "../../../node_modules/.pnpm/yaml@2.9.0/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 identity = require_identity(); + var lineCounter = require_line_counter(); + var parser = require_parser(); + function parseOptions(options2) { + const prettyErrors = options2.prettyErrors !== false; + const lineCounter$1 = options2.lineCounter || prettyErrors && new lineCounter.LineCounter() || null; + return { lineCounter: lineCounter$1, prettyErrors }; + } + function parseAllDocuments(source, options2 = {}) { + const { lineCounter: lineCounter2, prettyErrors } = parseOptions(options2); + const parser$1 = new parser.Parser(lineCounter2?.addNewLine); + const composer$1 = new composer.Composer(options2); + 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, options2 = {}) { + const { lineCounter: lineCounter2, prettyErrors } = parseOptions(options2); + const parser$1 = new parser.Parser(lineCounter2?.addNewLine); + const composer$1 = new composer.Composer(options2); + 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 parse5(src, reviver, options2) { + let _reviver = void 0; + if (typeof reviver === "function") { + _reviver = reviver; + } else if (options2 === void 0 && reviver && typeof reviver === "object") { + options2 = reviver; + } + const doc = parseDocument(src, options2); + 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 }, options2)); + } + function stringify4(value, replacer, options2) { + let _replacer = null; + if (typeof replacer === "function" || Array.isArray(replacer)) { + _replacer = replacer; + } else if (options2 === void 0 && replacer) { + options2 = replacer; + } + if (typeof options2 === "string") + options2 = options2.length; + if (typeof options2 === "number") { + const indent3 = Math.round(options2); + options2 = indent3 < 1 ? void 0 : indent3 > 8 ? { indent: 8 } : { indent: indent3 }; + } + if (value === void 0) { + const { keepUndefined } = options2 ?? replacer ?? {}; + if (!keepUndefined) + return void 0; + } + if (identity.isDocument(value) && !_replacer) + return value.toString(options2); + return new Document.Document(value, _replacer, options2).toString(options2); + } + exports2.parse = parse5; + exports2.parseAllDocuments = parseAllDocuments; + exports2.parseDocument = parseDocument; + exports2.stringify = stringify4; + } +}); + +// ../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/index.js +var require_dist = __commonJS({ + "../../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/index.js"(exports2) { + "use strict"; + var composer = require_composer(); + var Document = require_Document(); + var Schema2 = 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 visit3 = require_visit(); + exports2.Composer = composer.Composer; + exports2.Document = Document.Document; + exports2.Schema = Schema2.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 = visit3.visit; + exports2.visitAsync = visit3.visitAsync; + } +}); + +// ../../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js +var require_picocolors = __commonJS({ + "../../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js"(exports2, module2) { + var p = process || {}; + var argv = p.argv || []; + var env2 = p.env || {}; + var isColorSupported = !(!!env2.NO_COLOR || argv.includes("--no-color")) && (!!env2.FORCE_COLOR || argv.includes("--color") || p.platform === "win32" || (p.stdout || {}).isTTY && env2.TERM !== "dumb" || !!env2.CI); + var formatter = (open, close, replace2 = open) => (input) => { + let string3 = "" + input, index2 = string3.indexOf(close, open.length); + return ~index2 ? open + replaceClose(string3, close, replace2, index2) + close : open + string3 + close; + }; + var replaceClose = (string3, close, replace2, index2) => { + let result = "", cursor = 0; + do { + result += string3.substring(cursor, index2) + replace2; + cursor = index2 + close.length; + index2 = string3.indexOf(close, cursor); + } while (~index2); + return result + string3.substring(cursor); + }; + var createColors = (enabled = isColorSupported) => { + let f = enabled ? formatter : () => String; + return { + isColorSupported: enabled, + reset: f("\x1B[0m", "\x1B[0m"), + bold: f("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"), + dim: f("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"), + italic: f("\x1B[3m", "\x1B[23m"), + underline: f("\x1B[4m", "\x1B[24m"), + inverse: f("\x1B[7m", "\x1B[27m"), + hidden: f("\x1B[8m", "\x1B[28m"), + strikethrough: f("\x1B[9m", "\x1B[29m"), + black: f("\x1B[30m", "\x1B[39m"), + red: f("\x1B[31m", "\x1B[39m"), + green: f("\x1B[32m", "\x1B[39m"), + yellow: f("\x1B[33m", "\x1B[39m"), + blue: f("\x1B[34m", "\x1B[39m"), + magenta: f("\x1B[35m", "\x1B[39m"), + cyan: f("\x1B[36m", "\x1B[39m"), + white: f("\x1B[37m", "\x1B[39m"), + gray: f("\x1B[90m", "\x1B[39m"), + bgBlack: f("\x1B[40m", "\x1B[49m"), + bgRed: f("\x1B[41m", "\x1B[49m"), + bgGreen: f("\x1B[42m", "\x1B[49m"), + bgYellow: f("\x1B[43m", "\x1B[49m"), + bgBlue: f("\x1B[44m", "\x1B[49m"), + bgMagenta: f("\x1B[45m", "\x1B[49m"), + bgCyan: f("\x1B[46m", "\x1B[49m"), + bgWhite: f("\x1B[47m", "\x1B[49m"), + blackBright: f("\x1B[90m", "\x1B[39m"), + redBright: f("\x1B[91m", "\x1B[39m"), + greenBright: f("\x1B[92m", "\x1B[39m"), + yellowBright: f("\x1B[93m", "\x1B[39m"), + blueBright: f("\x1B[94m", "\x1B[39m"), + magentaBright: f("\x1B[95m", "\x1B[39m"), + cyanBright: f("\x1B[96m", "\x1B[39m"), + whiteBright: f("\x1B[97m", "\x1B[39m"), + bgBlackBright: f("\x1B[100m", "\x1B[49m"), + bgRedBright: f("\x1B[101m", "\x1B[49m"), + bgGreenBright: f("\x1B[102m", "\x1B[49m"), + bgYellowBright: f("\x1B[103m", "\x1B[49m"), + bgBlueBright: f("\x1B[104m", "\x1B[49m"), + bgMagentaBright: f("\x1B[105m", "\x1B[49m"), + bgCyanBright: f("\x1B[106m", "\x1B[49m"), + bgWhiteBright: f("\x1B[107m", "\x1B[49m") + }; + }; + module2.exports = createColors(); + module2.exports.createColors = createColors; + } +}); + +// ../../../node_modules/.pnpm/js-tokens@4.0.0/node_modules/js-tokens/index.js +var require_js_tokens = __commonJS({ + "../../../node_modules/.pnpm/js-tokens@4.0.0/node_modules/js-tokens/index.js"(exports2) { + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.default = /((['"])(?:(?!\2|\\).|\\(?:\r\n|[\s\S]))*(\2)?|`(?:[^`\\$]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{[^}]*\}?)*\}?)*(`)?)|(\/\/.*)|(\/\*(?:[^*]|\*(?!\/))*(\*\/)?)|(\/(?!\*)(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\]\\]).|\\.)+\/(?:(?!\s*(?:\b|[\u0080-\uFFFF$\\'"~({]|[+\-!](?!=)|\.?\d))|[gmiyus]{1,6}\b(?![\u0080-\uFFFF$\\]|\s*(?:[+\-*%&|^<>!=?({]|\/(?![\/*])))))|(0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?)|((?!\d)(?:(?!\s)[$\w\u0080-\uFFFF]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+)|(--|\+\+|&&|\|\||=>|\.{3}|(?:[+\-\/%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2})=?|[?~.,:;[\](){}])|(\s+)|(^$|[\s\S])/g; + exports2.matchToToken = function(match) { + var token = { type: "invalid", value: match[0], closed: void 0 }; + if (match[1]) token.type = "string", token.closed = !!(match[3] || match[4]); + else if (match[5]) token.type = "comment"; + else if (match[6]) token.type = "comment", token.closed = !!match[7]; + else if (match[8]) token.type = "regex"; + else if (match[9]) token.type = "number"; + else if (match[10]) token.type = "name"; + else if (match[11]) token.type = "punctuator"; + else if (match[12]) token.type = "whitespace"; + return token; + }; + } +}); + +// ../../../node_modules/.pnpm/@babel+helper-validator-identifier@7.29.7/node_modules/@babel/helper-validator-identifier/lib/identifier.js +var require_identifier = __commonJS({ + "../../../node_modules/.pnpm/@babel+helper-validator-identifier@7.29.7/node_modules/@babel/helper-validator-identifier/lib/identifier.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.isIdentifierChar = isIdentifierChar2; + exports2.isIdentifierName = isIdentifierName; + exports2.isIdentifierStart = isIdentifierStart2; + var nonASCIIidentifierStartChars2 = "\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088F\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5C\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDC-\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7DC\uA7F1-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC"; + var nonASCIIidentifierChars2 = "\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ADD\u1AE0-\u1AEB\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F\uFF65"; + var nonASCIIidentifierStart2 = new RegExp("[" + nonASCIIidentifierStartChars2 + "]"); + var nonASCIIidentifier2 = new RegExp("[" + nonASCIIidentifierStartChars2 + nonASCIIidentifierChars2 + "]"); + nonASCIIidentifierStartChars2 = nonASCIIidentifierChars2 = null; + var astralIdentifierStartCodes2 = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 4, 51, 13, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 7, 25, 39, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 39, 27, 10, 22, 251, 41, 7, 1, 17, 5, 57, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 20, 1, 64, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 31, 9, 2, 0, 3, 0, 2, 37, 2, 0, 26, 0, 2, 0, 45, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 38, 6, 186, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 19, 72, 200, 32, 32, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 24, 43, 261, 18, 16, 0, 2, 12, 2, 33, 125, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1071, 18, 5, 26, 3994, 6, 582, 6842, 29, 1763, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 433, 44, 212, 63, 33, 24, 3, 24, 45, 74, 6, 0, 67, 12, 65, 1, 2, 0, 15, 4, 10, 7381, 42, 31, 98, 114, 8702, 3, 2, 6, 2, 1, 2, 290, 16, 0, 30, 2, 3, 0, 15, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 1845, 30, 7, 5, 262, 61, 147, 44, 11, 6, 17, 0, 322, 29, 19, 43, 485, 27, 229, 29, 3, 0, 208, 30, 2, 2, 2, 1, 2, 6, 3, 4, 10, 1, 225, 6, 2, 3, 2, 1, 2, 14, 2, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42719, 33, 4381, 3, 5773, 3, 7472, 16, 621, 2467, 541, 1507, 4938, 6, 8489]; + var astralIdentifierCodes2 = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 7, 9, 32, 4, 318, 1, 78, 5, 71, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 3, 0, 158, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 68, 8, 2, 0, 3, 0, 2, 3, 2, 4, 2, 0, 15, 1, 83, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 7, 19, 58, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 199, 7, 137, 9, 54, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 55, 9, 266, 3, 10, 1, 2, 0, 49, 6, 4, 4, 14, 10, 5350, 0, 7, 14, 11465, 27, 2343, 9, 87, 9, 39, 4, 60, 6, 26, 9, 535, 9, 470, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4178, 9, 519, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 101, 0, 161, 6, 10, 9, 357, 0, 62, 13, 499, 13, 245, 1, 2, 9, 233, 0, 3, 0, 8, 1, 6, 0, 475, 6, 110, 6, 6, 9, 4759, 9, 787719, 239]; + function isInAstralSet2(code4, set) { + let pos = 65536; + for (let i = 0, length = set.length; i < length; i += 2) { + pos += set[i]; + if (pos > code4) return false; + pos += set[i + 1]; + if (pos >= code4) return true; + } + return false; + } + function isIdentifierStart2(code4) { + if (code4 < 65) return code4 === 36; + if (code4 <= 90) return true; + if (code4 < 97) return code4 === 95; + if (code4 <= 122) return true; + if (code4 <= 65535) { + return code4 >= 170 && nonASCIIidentifierStart2.test(String.fromCharCode(code4)); + } + return isInAstralSet2(code4, astralIdentifierStartCodes2); + } + function isIdentifierChar2(code4) { + if (code4 < 48) return code4 === 36; + if (code4 < 58) return true; + if (code4 < 65) return false; + if (code4 <= 90) return true; + if (code4 < 97) return code4 === 95; + if (code4 <= 122) return true; + if (code4 <= 65535) { + return code4 >= 170 && nonASCIIidentifier2.test(String.fromCharCode(code4)); + } + return isInAstralSet2(code4, astralIdentifierStartCodes2) || isInAstralSet2(code4, astralIdentifierCodes2); + } + function isIdentifierName(name2) { + let isFirst = true; + for (let i = 0; i < name2.length; i++) { + let cp = name2.charCodeAt(i); + if ((cp & 64512) === 55296 && i + 1 < name2.length) { + const trail2 = name2.charCodeAt(++i); + if ((trail2 & 64512) === 56320) { + cp = 65536 + ((cp & 1023) << 10) + (trail2 & 1023); + } + } + if (isFirst) { + isFirst = false; + if (!isIdentifierStart2(cp)) { + return false; + } + } else if (!isIdentifierChar2(cp)) { + return false; + } + } + return !isFirst; + } + } +}); + +// ../../../node_modules/.pnpm/@babel+helper-validator-identifier@7.29.7/node_modules/@babel/helper-validator-identifier/lib/keyword.js +var require_keyword = __commonJS({ + "../../../node_modules/.pnpm/@babel+helper-validator-identifier@7.29.7/node_modules/@babel/helper-validator-identifier/lib/keyword.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + exports2.isKeyword = isKeyword; + exports2.isReservedWord = isReservedWord; + exports2.isStrictBindOnlyReservedWord = isStrictBindOnlyReservedWord; + exports2.isStrictBindReservedWord = isStrictBindReservedWord; + exports2.isStrictReservedWord = isStrictReservedWord; + var reservedWords2 = { + keyword: ["break", "case", "catch", "continue", "debugger", "default", "do", "else", "finally", "for", "function", "if", "return", "switch", "throw", "try", "var", "const", "while", "with", "new", "this", "super", "class", "extends", "export", "import", "null", "true", "false", "in", "instanceof", "typeof", "void", "delete"], + strict: ["implements", "interface", "let", "package", "private", "protected", "public", "static", "yield"], + strictBind: ["eval", "arguments"] + }; + var keywords2 = new Set(reservedWords2.keyword); + var reservedWordsStrictSet = new Set(reservedWords2.strict); + var reservedWordsStrictBindSet = new Set(reservedWords2.strictBind); + function isReservedWord(word, inModule) { + return inModule && word === "await" || word === "enum"; + } + function isStrictReservedWord(word, inModule) { + return isReservedWord(word, inModule) || reservedWordsStrictSet.has(word); + } + function isStrictBindOnlyReservedWord(word) { + return reservedWordsStrictBindSet.has(word); + } + function isStrictBindReservedWord(word, inModule) { + return isStrictReservedWord(word, inModule) || isStrictBindOnlyReservedWord(word); + } + function isKeyword(word) { + return keywords2.has(word); + } + } +}); + +// ../../../node_modules/.pnpm/@babel+helper-validator-identifier@7.29.7/node_modules/@babel/helper-validator-identifier/lib/index.js +var require_lib = __commonJS({ + "../../../node_modules/.pnpm/@babel+helper-validator-identifier@7.29.7/node_modules/@babel/helper-validator-identifier/lib/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { + value: true + }); + Object.defineProperty(exports2, "isIdentifierChar", { + enumerable: true, + get: function() { + return _identifier.isIdentifierChar; + } + }); + Object.defineProperty(exports2, "isIdentifierName", { + enumerable: true, + get: function() { + return _identifier.isIdentifierName; + } + }); + Object.defineProperty(exports2, "isIdentifierStart", { + enumerable: true, + get: function() { + return _identifier.isIdentifierStart; + } + }); + Object.defineProperty(exports2, "isKeyword", { + enumerable: true, + get: function() { + return _keyword.isKeyword; + } + }); + Object.defineProperty(exports2, "isReservedWord", { + enumerable: true, + get: function() { + return _keyword.isReservedWord; + } + }); + Object.defineProperty(exports2, "isStrictBindOnlyReservedWord", { + enumerable: true, + get: function() { + return _keyword.isStrictBindOnlyReservedWord; + } + }); + Object.defineProperty(exports2, "isStrictBindReservedWord", { + enumerable: true, + get: function() { + return _keyword.isStrictBindReservedWord; + } + }); + Object.defineProperty(exports2, "isStrictReservedWord", { + enumerable: true, + get: function() { + return _keyword.isStrictReservedWord; + } + }); + var _identifier = require_identifier(); + var _keyword = require_keyword(); + } +}); + +// ../../../node_modules/.pnpm/@babel+code-frame@7.29.7/node_modules/@babel/code-frame/lib/index.js +var require_lib2 = __commonJS({ + "../../../node_modules/.pnpm/@babel+code-frame@7.29.7/node_modules/@babel/code-frame/lib/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var picocolors = require_picocolors(); + var jsTokens = require_js_tokens(); + var helperValidatorIdentifier = require_lib(); + function isColorSupported() { + return typeof process === "object" && (process.env.FORCE_COLOR === "0" || process.env.FORCE_COLOR === "false") ? false : picocolors.isColorSupported; + } + var compose = (f, g) => (v) => f(g(v)); + function buildDefs(colors) { + return { + keyword: colors.cyan, + capitalized: colors.yellow, + jsxIdentifier: colors.yellow, + punctuator: colors.yellow, + number: colors.magenta, + string: colors.green, + regex: colors.magenta, + comment: colors.gray, + invalid: compose(compose(colors.white, colors.bgRed), colors.bold), + gutter: colors.gray, + marker: compose(colors.red, colors.bold), + message: compose(colors.red, colors.bold), + reset: colors.reset + }; + } + var defsOn = buildDefs(picocolors.createColors(true)); + var defsOff = buildDefs(picocolors.createColors(false)); + function getDefs(enabled) { + return enabled ? defsOn : defsOff; + } + var sometimesKeywords = /* @__PURE__ */ new Set(["as", "async", "from", "get", "of", "set"]); + var NEWLINE$1 = /\r\n|[\n\r\u2028\u2029]/; + var BRACKET = /^[()[\]{}]$/; + var tokenize; + var JSX_TAG = /^[a-z][\w-]*$/i; + var getTokenType = function(token, offset2, text7) { + if (token.type === "name") { + const tokenValue = token.value; + if (helperValidatorIdentifier.isKeyword(tokenValue) || helperValidatorIdentifier.isStrictReservedWord(tokenValue, true) || sometimesKeywords.has(tokenValue)) { + return "keyword"; + } + if (JSX_TAG.test(tokenValue) && (text7[offset2 - 1] === "<" || text7.slice(offset2 - 2, offset2) === " defs[type](str2)).join("\n"); + } else { + highlighted += value; + } + } + return highlighted; + } + var deprecationWarningShown = false; + var NEWLINE = /\r\n|[\n\r\u2028\u2029]/; + function getMarkerLines(loc, source, opts, startLineBaseZero) { + const startLoc = Object.assign({ + column: 0, + line: -1 + }, loc.start); + const endLoc = Object.assign({}, startLoc, loc.end); + const { + linesAbove = 2, + linesBelow = 3 + } = opts || {}; + const startLine = startLoc.line - startLineBaseZero; + const startColumn = startLoc.column; + const endLine = endLoc.line - startLineBaseZero; + const endColumn = endLoc.column; + let start2 = Math.max(startLine - (linesAbove + 1), 0); + let end = Math.min(source.length, endLine + linesBelow); + if (startLine === -1) { + start2 = 0; + } + if (endLine === -1) { + end = source.length; + } + const lineDiff = endLine - startLine; + const markerLines = {}; + if (lineDiff) { + for (let i = 0; i <= lineDiff; i++) { + const lineNumber = i + startLine; + if (!startColumn) { + markerLines[lineNumber] = true; + } else if (i === 0) { + const sourceLength = source[lineNumber - 1].length; + markerLines[lineNumber] = [startColumn, sourceLength - startColumn + 1]; + } else if (i === lineDiff) { + markerLines[lineNumber] = [0, endColumn]; + } else { + const sourceLength = source[lineNumber - i].length; + markerLines[lineNumber] = [0, sourceLength]; + } + } + } else { + if (startColumn === endColumn) { + if (startColumn) { + markerLines[startLine] = [startColumn, 0]; + } else { + markerLines[startLine] = true; + } + } else { + markerLines[startLine] = [startColumn, endColumn - startColumn]; + } + } + return { + start: start2, + end, + markerLines + }; + } + function codeFrameColumns2(rawLines, loc, opts = {}) { + const shouldHighlight = opts.forceColor || isColorSupported() && opts.highlightCode; + const startLineBaseZero = (opts.startLine || 1) - 1; + const defs = getDefs(shouldHighlight); + const lines = rawLines.split(NEWLINE); + const { + start: start2, + end, + markerLines + } = getMarkerLines(loc, lines, opts, startLineBaseZero); + const hasColumns = loc.start && typeof loc.start.column === "number"; + const numberMaxWidth = String(end + startLineBaseZero).length; + const highlightedLines = shouldHighlight ? highlight(rawLines) : rawLines; + let frame = highlightedLines.split(NEWLINE, end).slice(start2, end).map((line, index3) => { + const number2 = start2 + 1 + index3; + const paddedNumber = ` ${number2 + startLineBaseZero}`.slice(-numberMaxWidth); + const gutter = ` ${paddedNumber} |`; + const hasMarker = markerLines[number2]; + const lastMarkerLine = !markerLines[number2 + 1]; + if (hasMarker) { + let markerLine = ""; + if (Array.isArray(hasMarker)) { + const markerSpacing = line.slice(0, Math.max(hasMarker[0] - 1, 0)).replace(/[^\t]/g, " "); + const numberOfMarkers = hasMarker[1] || 1; + markerLine = ["\n ", defs.gutter(gutter.replace(/\d/g, " ")), " ", markerSpacing, defs.marker("^").repeat(numberOfMarkers)].join(""); + if (lastMarkerLine && opts.message) { + markerLine += " " + defs.message(opts.message); + } + } + return [defs.marker(">"), defs.gutter(gutter), line.length > 0 ? ` ${line}` : "", markerLine].join(""); + } else { + return ` ${defs.gutter(gutter)}${line.length > 0 ? ` ${line}` : ""}`; + } + }).join("\n"); + if (opts.message && !hasColumns) { + frame = `${" ".repeat(numberMaxWidth + 1)}${opts.message} +${frame}`; + } + if (shouldHighlight) { + return defs.reset(frame); + } else { + return frame; + } + } + function index2(rawLines, lineNumber, colNumber, opts = {}) { + if (!deprecationWarningShown) { + deprecationWarningShown = true; + const message = "Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`."; + if (process.emitWarning) { + process.emitWarning(message, "DeprecationWarning"); + } else { + const deprecationError = new Error(message); + deprecationError.name = "DeprecationWarning"; + console.warn(new Error(message)); + } + } + colNumber = Math.max(colNumber, 0); + const location = { + start: { + column: colNumber, + line: lineNumber + } + }; + return codeFrameColumns2(rawLines, location, opts); + } + exports2.codeFrameColumns = codeFrameColumns2; + exports2.default = index2; + exports2.highlight = highlight; + } +}); + +// src/index.ts +import fs from "node:fs"; + +// ../../../node_modules/.pnpm/unist-util-stringify-position@4.0.0/node_modules/unist-util-stringify-position/lib/index.js +function stringifyPosition(value) { + if (!value || typeof value !== "object") { + return ""; + } + if ("position" in value || "type" in value) { + return position(value.position); + } + if ("start" in value || "end" in value) { + return position(value); + } + if ("line" in value || "column" in value) { + return point(value); + } + return ""; +} +function point(point4) { + return index(point4 && point4.line) + ":" + index(point4 && point4.column); +} +function position(pos) { + return point(pos && pos.start) + "-" + point(pos && pos.end); +} +function index(value) { + return value && typeof value === "number" ? value : 1; +} + +// ../../../node_modules/.pnpm/vfile-message@4.0.3/node_modules/vfile-message/lib/index.js +var VFileMessage = class extends Error { + /** + * Create a message for `reason`. + * + * > 🪦 **Note**: also has obsolete signatures. + * + * @overload + * @param {string} reason + * @param {Options | null | undefined} [options] + * @returns + * + * @overload + * @param {string} reason + * @param {Node | NodeLike | null | undefined} parent + * @param {string | null | undefined} [origin] + * @returns + * + * @overload + * @param {string} reason + * @param {Point | Position | null | undefined} place + * @param {string | null | undefined} [origin] + * @returns + * + * @overload + * @param {string} reason + * @param {string | null | undefined} [origin] + * @returns + * + * @overload + * @param {Error | VFileMessage} cause + * @param {Node | NodeLike | null | undefined} parent + * @param {string | null | undefined} [origin] + * @returns + * + * @overload + * @param {Error | VFileMessage} cause + * @param {Point | Position | null | undefined} place + * @param {string | null | undefined} [origin] + * @returns + * + * @overload + * @param {Error | VFileMessage} cause + * @param {string | null | undefined} [origin] + * @returns + * + * @param {Error | VFileMessage | string} causeOrReason + * Reason for message, should use markdown. + * @param {Node | NodeLike | Options | Point | Position | string | null | undefined} [optionsOrParentOrPlace] + * Configuration (optional). + * @param {string | null | undefined} [origin] + * Place in code where the message originates (example: + * `'my-package:my-rule'` or `'my-rule'`). + * @returns + * Instance of `VFileMessage`. + */ + // eslint-disable-next-line complexity + constructor(causeOrReason, optionsOrParentOrPlace, origin) { + super(); + if (typeof optionsOrParentOrPlace === "string") { + origin = optionsOrParentOrPlace; + optionsOrParentOrPlace = void 0; + } + let reason = ""; + let options2 = {}; + let legacyCause = false; + if (optionsOrParentOrPlace) { + if ("line" in optionsOrParentOrPlace && "column" in optionsOrParentOrPlace) { + options2 = { place: optionsOrParentOrPlace }; + } else if ("start" in optionsOrParentOrPlace && "end" in optionsOrParentOrPlace) { + options2 = { place: optionsOrParentOrPlace }; + } else if ("type" in optionsOrParentOrPlace) { + options2 = { + ancestors: [optionsOrParentOrPlace], + place: optionsOrParentOrPlace.position + }; + } else { + options2 = { ...optionsOrParentOrPlace }; + } + } + if (typeof causeOrReason === "string") { + reason = causeOrReason; + } else if (!options2.cause && causeOrReason) { + legacyCause = true; + reason = causeOrReason.message; + options2.cause = causeOrReason; + } + if (!options2.ruleId && !options2.source && typeof origin === "string") { + const index2 = origin.indexOf(":"); + if (index2 === -1) { + options2.ruleId = origin; + } else { + options2.source = origin.slice(0, index2); + options2.ruleId = origin.slice(index2 + 1); + } + } + if (!options2.place && options2.ancestors && options2.ancestors) { + const parent = options2.ancestors[options2.ancestors.length - 1]; + if (parent) { + options2.place = parent.position; + } + } + const start2 = options2.place && "start" in options2.place ? options2.place.start : options2.place; + this.ancestors = options2.ancestors || void 0; + this.cause = options2.cause || void 0; + this.column = start2 ? start2.column : void 0; + this.fatal = void 0; + this.file = ""; + this.message = reason; + this.line = start2 ? start2.line : void 0; + this.name = stringifyPosition(options2.place) || "1:1"; + this.place = options2.place || void 0; + this.reason = this.message; + this.ruleId = options2.ruleId || void 0; + this.source = options2.source || void 0; + this.stack = legacyCause && options2.cause && typeof options2.cause.stack === "string" ? options2.cause.stack : ""; + this.actual = void 0; + this.expected = void 0; + this.note = void 0; + this.url = void 0; + } +}; +VFileMessage.prototype.file = ""; +VFileMessage.prototype.name = ""; +VFileMessage.prototype.reason = ""; +VFileMessage.prototype.message = ""; +VFileMessage.prototype.stack = ""; +VFileMessage.prototype.column = void 0; +VFileMessage.prototype.line = void 0; +VFileMessage.prototype.ancestors = void 0; +VFileMessage.prototype.cause = void 0; +VFileMessage.prototype.fatal = void 0; +VFileMessage.prototype.place = void 0; +VFileMessage.prototype.ruleId = void 0; +VFileMessage.prototype.source = void 0; + +// ../../../node_modules/.pnpm/vfile@6.0.3/node_modules/vfile/lib/minpath.js +import { default as default2 } from "node:path"; + +// ../../../node_modules/.pnpm/vfile@6.0.3/node_modules/vfile/lib/minproc.js +import { default as default3 } from "node:process"; + +// ../../../node_modules/.pnpm/vfile@6.0.3/node_modules/vfile/lib/minurl.js +import { fileURLToPath } from "node:url"; + +// ../../../node_modules/.pnpm/vfile@6.0.3/node_modules/vfile/lib/minurl.shared.js +function isUrl(fileUrlOrPath) { + return Boolean( + fileUrlOrPath !== null && typeof fileUrlOrPath === "object" && "href" in fileUrlOrPath && fileUrlOrPath.href && "protocol" in fileUrlOrPath && fileUrlOrPath.protocol && // @ts-expect-error: indexing is fine. + fileUrlOrPath.auth === void 0 + ); +} + +// ../../../node_modules/.pnpm/vfile@6.0.3/node_modules/vfile/lib/index.js +var order = ( + /** @type {const} */ + [ + "history", + "path", + "basename", + "stem", + "extname", + "dirname" + ] +); +var VFile = class { + /** + * Create a new virtual file. + * + * `options` is treated as: + * + * * `string` or `Uint8Array` — `{value: options}` + * * `URL` — `{path: options}` + * * `VFile` — shallow copies its data over to the new file + * * `object` — all fields are shallow copied over to the new file + * + * Path related fields are set in the following order (least specific to + * most specific): `history`, `path`, `basename`, `stem`, `extname`, + * `dirname`. + * + * You cannot set `dirname` or `extname` without setting either `history`, + * `path`, `basename`, or `stem` too. + * + * @param {Compatible | null | undefined} [value] + * File value. + * @returns + * New instance. + */ + constructor(value) { + let options2; + if (!value) { + options2 = {}; + } else if (isUrl(value)) { + options2 = { path: value }; + } else if (typeof value === "string" || isUint8Array(value)) { + options2 = { value }; + } else { + options2 = value; + } + this.cwd = "cwd" in options2 ? "" : default3.cwd(); + this.data = {}; + this.history = []; + this.messages = []; + this.value; + this.map; + this.result; + this.stored; + let index2 = -1; + while (++index2 < order.length) { + const field2 = order[index2]; + if (field2 in options2 && options2[field2] !== void 0 && options2[field2] !== null) { + this[field2] = field2 === "history" ? [...options2[field2]] : options2[field2]; + } + } + let field; + for (field in options2) { + if (!order.includes(field)) { + this[field] = options2[field]; + } + } + } + /** + * Get the basename (including extname) (example: `'index.min.js'`). + * + * @returns {string | undefined} + * Basename. + */ + get basename() { + return typeof this.path === "string" ? default2.basename(this.path) : void 0; + } + /** + * Set basename (including extname) (`'index.min.js'`). + * + * Cannot contain path separators (`'/'` on unix, macOS, and browsers, `'\'` + * on windows). + * Cannot be nullified (use `file.path = file.dirname` instead). + * + * @param {string} basename + * Basename. + * @returns {undefined} + * Nothing. + */ + set basename(basename) { + assertNonEmpty(basename, "basename"); + assertPart(basename, "basename"); + this.path = default2.join(this.dirname || "", basename); + } + /** + * Get the parent path (example: `'~'`). + * + * @returns {string | undefined} + * Dirname. + */ + get dirname() { + return typeof this.path === "string" ? default2.dirname(this.path) : void 0; + } + /** + * Set the parent path (example: `'~'`). + * + * Cannot be set if there’s no `path` yet. + * + * @param {string | undefined} dirname + * Dirname. + * @returns {undefined} + * Nothing. + */ + set dirname(dirname) { + assertPath(this.basename, "dirname"); + this.path = default2.join(dirname || "", this.basename); + } + /** + * Get the extname (including dot) (example: `'.js'`). + * + * @returns {string | undefined} + * Extname. + */ + get extname() { + return typeof this.path === "string" ? default2.extname(this.path) : void 0; + } + /** + * Set the extname (including dot) (example: `'.js'`). + * + * Cannot contain path separators (`'/'` on unix, macOS, and browsers, `'\'` + * on windows). + * Cannot be set if there’s no `path` yet. + * + * @param {string | undefined} extname + * Extname. + * @returns {undefined} + * Nothing. + */ + set extname(extname) { + assertPart(extname, "extname"); + assertPath(this.dirname, "extname"); + if (extname) { + if (extname.codePointAt(0) !== 46) { + throw new Error("`extname` must start with `.`"); + } + if (extname.includes(".", 1)) { + throw new Error("`extname` cannot contain multiple dots"); + } + } + this.path = default2.join(this.dirname, this.stem + (extname || "")); + } + /** + * Get the full path (example: `'~/index.min.js'`). + * + * @returns {string} + * Path. + */ + get path() { + return this.history[this.history.length - 1]; + } + /** + * Set the full path (example: `'~/index.min.js'`). + * + * Cannot be nullified. + * You can set a file URL (a `URL` object with a `file:` protocol) which will + * be turned into a path with `url.fileURLToPath`. + * + * @param {URL | string} path + * Path. + * @returns {undefined} + * Nothing. + */ + set path(path2) { + if (isUrl(path2)) { + path2 = fileURLToPath(path2); + } + assertNonEmpty(path2, "path"); + if (this.path !== path2) { + this.history.push(path2); + } + } + /** + * Get the stem (basename w/o extname) (example: `'index.min'`). + * + * @returns {string | undefined} + * Stem. + */ + get stem() { + return typeof this.path === "string" ? default2.basename(this.path, this.extname) : void 0; + } + /** + * Set the stem (basename w/o extname) (example: `'index.min'`). + * + * Cannot contain path separators (`'/'` on unix, macOS, and browsers, `'\'` + * on windows). + * Cannot be nullified (use `file.path = file.dirname` instead). + * + * @param {string} stem + * Stem. + * @returns {undefined} + * Nothing. + */ + set stem(stem) { + assertNonEmpty(stem, "stem"); + assertPart(stem, "stem"); + this.path = default2.join(this.dirname || "", stem + (this.extname || "")); + } + // Normal prototypal methods. + /** + * Create a fatal message for `reason` associated with the file. + * + * The `fatal` field of the message is set to `true` (error; file not usable) + * and the `file` field is set to the current file path. + * The message is added to the `messages` field on `file`. + * + * > 🪦 **Note**: also has obsolete signatures. + * + * @overload + * @param {string} reason + * @param {MessageOptions | null | undefined} [options] + * @returns {never} + * + * @overload + * @param {string} reason + * @param {Node | NodeLike | null | undefined} parent + * @param {string | null | undefined} [origin] + * @returns {never} + * + * @overload + * @param {string} reason + * @param {Point | Position | null | undefined} place + * @param {string | null | undefined} [origin] + * @returns {never} + * + * @overload + * @param {string} reason + * @param {string | null | undefined} [origin] + * @returns {never} + * + * @overload + * @param {Error | VFileMessage} cause + * @param {Node | NodeLike | null | undefined} parent + * @param {string | null | undefined} [origin] + * @returns {never} + * + * @overload + * @param {Error | VFileMessage} cause + * @param {Point | Position | null | undefined} place + * @param {string | null | undefined} [origin] + * @returns {never} + * + * @overload + * @param {Error | VFileMessage} cause + * @param {string | null | undefined} [origin] + * @returns {never} + * + * @param {Error | VFileMessage | string} causeOrReason + * Reason for message, should use markdown. + * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace] + * Configuration (optional). + * @param {string | null | undefined} [origin] + * Place in code where the message originates (example: + * `'my-package:my-rule'` or `'my-rule'`). + * @returns {never} + * Never. + * @throws {VFileMessage} + * Message. + */ + fail(causeOrReason, optionsOrParentOrPlace, origin) { + const message = this.message(causeOrReason, optionsOrParentOrPlace, origin); + message.fatal = true; + throw message; + } + /** + * Create an info message for `reason` associated with the file. + * + * The `fatal` field of the message is set to `undefined` (info; change + * likely not needed) and the `file` field is set to the current file path. + * The message is added to the `messages` field on `file`. + * + * > 🪦 **Note**: also has obsolete signatures. + * + * @overload + * @param {string} reason + * @param {MessageOptions | null | undefined} [options] + * @returns {VFileMessage} + * + * @overload + * @param {string} reason + * @param {Node | NodeLike | null | undefined} parent + * @param {string | null | undefined} [origin] + * @returns {VFileMessage} + * + * @overload + * @param {string} reason + * @param {Point | Position | null | undefined} place + * @param {string | null | undefined} [origin] + * @returns {VFileMessage} + * + * @overload + * @param {string} reason + * @param {string | null | undefined} [origin] + * @returns {VFileMessage} + * + * @overload + * @param {Error | VFileMessage} cause + * @param {Node | NodeLike | null | undefined} parent + * @param {string | null | undefined} [origin] + * @returns {VFileMessage} + * + * @overload + * @param {Error | VFileMessage} cause + * @param {Point | Position | null | undefined} place + * @param {string | null | undefined} [origin] + * @returns {VFileMessage} + * + * @overload + * @param {Error | VFileMessage} cause + * @param {string | null | undefined} [origin] + * @returns {VFileMessage} + * + * @param {Error | VFileMessage | string} causeOrReason + * Reason for message, should use markdown. + * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace] + * Configuration (optional). + * @param {string | null | undefined} [origin] + * Place in code where the message originates (example: + * `'my-package:my-rule'` or `'my-rule'`). + * @returns {VFileMessage} + * Message. + */ + info(causeOrReason, optionsOrParentOrPlace, origin) { + const message = this.message(causeOrReason, optionsOrParentOrPlace, origin); + message.fatal = void 0; + return message; + } + /** + * Create a message for `reason` associated with the file. + * + * The `fatal` field of the message is set to `false` (warning; change may be + * needed) and the `file` field is set to the current file path. + * The message is added to the `messages` field on `file`. + * + * > 🪦 **Note**: also has obsolete signatures. + * + * @overload + * @param {string} reason + * @param {MessageOptions | null | undefined} [options] + * @returns {VFileMessage} + * + * @overload + * @param {string} reason + * @param {Node | NodeLike | null | undefined} parent + * @param {string | null | undefined} [origin] + * @returns {VFileMessage} + * + * @overload + * @param {string} reason + * @param {Point | Position | null | undefined} place + * @param {string | null | undefined} [origin] + * @returns {VFileMessage} + * + * @overload + * @param {string} reason + * @param {string | null | undefined} [origin] + * @returns {VFileMessage} + * + * @overload + * @param {Error | VFileMessage} cause + * @param {Node | NodeLike | null | undefined} parent + * @param {string | null | undefined} [origin] + * @returns {VFileMessage} + * + * @overload + * @param {Error | VFileMessage} cause + * @param {Point | Position | null | undefined} place + * @param {string | null | undefined} [origin] + * @returns {VFileMessage} + * + * @overload + * @param {Error | VFileMessage} cause + * @param {string | null | undefined} [origin] + * @returns {VFileMessage} + * + * @param {Error | VFileMessage | string} causeOrReason + * Reason for message, should use markdown. + * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace] + * Configuration (optional). + * @param {string | null | undefined} [origin] + * Place in code where the message originates (example: + * `'my-package:my-rule'` or `'my-rule'`). + * @returns {VFileMessage} + * Message. + */ + message(causeOrReason, optionsOrParentOrPlace, origin) { + const message = new VFileMessage( + // @ts-expect-error: the overloads are fine. + causeOrReason, + optionsOrParentOrPlace, + origin + ); + if (this.path) { + message.name = this.path + ":" + message.name; + message.file = this.path; + } + message.fatal = false; + this.messages.push(message); + return message; + } + /** + * Serialize the file. + * + * > **Note**: which encodings are supported depends on the engine. + * > For info on Node.js, see: + * > . + * + * @param {string | null | undefined} [encoding='utf8'] + * Character encoding to understand `value` as when it’s a `Uint8Array` + * (default: `'utf-8'`). + * @returns {string} + * Serialized file. + */ + toString(encoding) { + if (this.value === void 0) { + return ""; + } + if (typeof this.value === "string") { + return this.value; + } + const decoder = new TextDecoder(encoding || void 0); + return decoder.decode(this.value); + } +}; +function assertPart(part, name2) { + if (part && part.includes(default2.sep)) { + throw new Error( + "`" + name2 + "` cannot be a path: did not expect `" + default2.sep + "`" + ); + } +} +function assertNonEmpty(part, name2) { + if (!part) { + throw new Error("`" + name2 + "` cannot be empty"); + } +} +function assertPath(path2, name2) { + if (!path2) { + throw new Error("Setting `" + name2 + "` requires `path` to be set too"); + } +} +function isUint8Array(value) { + return Boolean( + value && typeof value === "object" && "byteLength" in value && "byteOffset" in value + ); +} + +// ../../../node_modules/.pnpm/markdown-extensions@2.0.0/node_modules/markdown-extensions/index.js +var markdownExtension = [ + "md", + "markdown", + "mdown", + "mkdn", + "mkd", + "mdwn", + "mkdown", + "ron" +]; +var markdown_extensions_default = markdownExtension; + +// ../../../node_modules/.pnpm/@mdx-js+mdx@3.1.1_supports-color@7.2.0/node_modules/@mdx-js/mdx/lib/util/extnames.js +var md = markdown_extensions_default.map(function(d) { + return "." + d; +}); + +// ../../../node_modules/.pnpm/@mdx-js+mdx@3.1.1_supports-color@7.2.0/node_modules/@mdx-js/mdx/lib/util/resolve-file-and-options.js +function resolveFileAndOptions(vfileCompatible, options2) { + const file = looksLikeAVFile(vfileCompatible) ? vfileCompatible : new VFile(vfileCompatible); + const { format, ...rest } = options2 || {}; + return { + file, + options: { + format: format === "md" || format === "mdx" ? format : file.extname && (rest.mdExtensions || md).includes(file.extname) ? "md" : "mdx", + ...rest + } + }; +} +function looksLikeAVFile(value) { + return Boolean( + value && typeof value === "object" && "message" in value && "messages" in value + ); +} + +// ../../../node_modules/.pnpm/devlop@1.1.0/node_modules/devlop/lib/default.js +function ok() { +} +function unreachable() { +} + +// ../../../node_modules/.pnpm/estree-util-is-identifier-name@3.0.0/node_modules/estree-util-is-identifier-name/lib/index.js +var startRe = /[$_\p{ID_Start}]/u; +var contRe = /[$_\u{200C}\u{200D}\p{ID_Continue}]/u; +var contReJsx = /[-$_\u{200C}\u{200D}\p{ID_Continue}]/u; +var nameRe = /^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u; +var nameReJsx = /^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u; +var emptyOptions = {}; +function start(code4) { + return code4 ? startRe.test(String.fromCodePoint(code4)) : false; +} +function cont(code4, options2) { + const settings = options2 || emptyOptions; + const re2 = settings.jsx ? contReJsx : contRe; + return code4 ? re2.test(String.fromCodePoint(code4)) : false; +} +function name(name2, options2) { + const settings = options2 || emptyOptions; + const re2 = settings.jsx ? nameReJsx : nameRe; + return re2.test(name2); +} + +// ../../../node_modules/.pnpm/estree-walker@3.0.3/node_modules/estree-walker/src/walker.js +var WalkerBase = class { + constructor() { + this.should_skip = false; + this.should_remove = false; + this.replacement = null; + this.context = { + skip: () => this.should_skip = true, + remove: () => this.should_remove = true, + replace: (node2) => this.replacement = node2 + }; + } + /** + * @template {Node} Parent + * @param {Parent | null | undefined} parent + * @param {keyof Parent | null | undefined} prop + * @param {number | null | undefined} index + * @param {Node} node + */ + replace(parent, prop, index2, node2) { + if (parent && prop) { + if (index2 != null) { + parent[prop][index2] = node2; + } else { + parent[prop] = node2; + } + } + } + /** + * @template {Node} Parent + * @param {Parent | null | undefined} parent + * @param {keyof Parent | null | undefined} prop + * @param {number | null | undefined} index + */ + remove(parent, prop, index2) { + if (parent && prop) { + if (index2 !== null && index2 !== void 0) { + parent[prop].splice(index2, 1); + } else { + delete parent[prop]; + } + } + } +}; + +// ../../../node_modules/.pnpm/estree-walker@3.0.3/node_modules/estree-walker/src/sync.js +var SyncWalker = class extends WalkerBase { + /** + * + * @param {SyncHandler} [enter] + * @param {SyncHandler} [leave] + */ + constructor(enter, leave) { + super(); + this.should_skip = false; + this.should_remove = false; + this.replacement = null; + this.context = { + skip: () => this.should_skip = true, + remove: () => this.should_remove = true, + replace: (node2) => this.replacement = node2 + }; + this.enter = enter; + this.leave = leave; + } + /** + * @template {Node} Parent + * @param {Node} node + * @param {Parent | null} parent + * @param {keyof Parent} [prop] + * @param {number | null} [index] + * @returns {Node | null} + */ + visit(node2, parent, prop, index2) { + if (node2) { + if (this.enter) { + const _should_skip = this.should_skip; + const _should_remove = this.should_remove; + const _replacement = this.replacement; + this.should_skip = false; + this.should_remove = false; + this.replacement = null; + this.enter.call(this.context, node2, parent, prop, index2); + if (this.replacement) { + node2 = this.replacement; + this.replace(parent, prop, index2, node2); + } + if (this.should_remove) { + this.remove(parent, prop, index2); + } + const skipped = this.should_skip; + const removed = this.should_remove; + this.should_skip = _should_skip; + this.should_remove = _should_remove; + this.replacement = _replacement; + if (skipped) return node2; + if (removed) return null; + } + let key; + for (key in node2) { + const value = node2[key]; + if (value && typeof value === "object") { + if (Array.isArray(value)) { + const nodes = ( + /** @type {Array} */ + value + ); + for (let i = 0; i < nodes.length; i += 1) { + const item = nodes[i]; + if (isNode(item)) { + if (!this.visit(item, node2, key, i)) { + i--; + } + } + } + } else if (isNode(value)) { + this.visit(value, node2, key, null); + } + } + } + if (this.leave) { + const _replacement = this.replacement; + const _should_remove = this.should_remove; + this.replacement = null; + this.should_remove = false; + this.leave.call(this.context, node2, parent, prop, index2); + if (this.replacement) { + node2 = this.replacement; + this.replace(parent, prop, index2, node2); + } + if (this.should_remove) { + this.remove(parent, prop, index2); + } + const removed = this.should_remove; + this.replacement = _replacement; + this.should_remove = _should_remove; + if (removed) return null; + } + } + return node2; + } +}; +function isNode(value) { + return value !== null && typeof value === "object" && "type" in value && typeof value.type === "string"; +} + +// ../../../node_modules/.pnpm/estree-walker@3.0.3/node_modules/estree-walker/src/index.js +function walk(ast, { enter, leave }) { + const instance = new SyncWalker(enter, leave); + return instance.visit(ast, null); +} + +// ../../../node_modules/.pnpm/estree-util-build-jsx@3.0.1/node_modules/estree-util-build-jsx/lib/index.js +var regex = /@(jsx|jsxFrag|jsxImportSource|jsxRuntime)\s+(\S+)/g; +function buildJsx(tree, options2) { + const config = options2 || {}; + let automatic = config.runtime === "automatic"; + const annotations = {}; + const imports = {}; + walk(tree, { + enter(node2) { + if (node2.type === "Program") { + const comments = node2.comments || []; + let index2 = -1; + while (++index2 < comments.length) { + regex.lastIndex = 0; + let match = regex.exec(comments[index2].value); + while (match) { + annotations[match[1]] = match[2]; + match = regex.exec(comments[index2].value); + } + } + if (annotations.jsxRuntime) { + if (annotations.jsxRuntime === "automatic") { + automatic = true; + if (annotations.jsx) { + throw new Error("Unexpected `@jsx` pragma w/ automatic runtime"); + } + if (annotations.jsxFrag) { + throw new Error( + "Unexpected `@jsxFrag` pragma w/ automatic runtime" + ); + } + } else if (annotations.jsxRuntime === "classic") { + automatic = false; + if (annotations.jsxImportSource) { + throw new Error( + "Unexpected `@jsxImportSource` w/ classic runtime" + ); + } + } else { + throw new Error( + "Unexpected `jsxRuntime` `" + annotations.jsxRuntime + "`, expected `automatic` or `classic`" + ); + } + } + } + }, + // eslint-disable-next-line complexity + leave(node2) { + if (node2.type === "Program") { + const specifiers = []; + if (imports.fragment) { + specifiers.push({ + type: "ImportSpecifier", + imported: { type: "Identifier", name: "Fragment" }, + local: { type: "Identifier", name: "_Fragment" } + }); + } + if (imports.jsx) { + specifiers.push({ + type: "ImportSpecifier", + imported: { type: "Identifier", name: "jsx" }, + local: { type: "Identifier", name: "_jsx" } + }); + } + if (imports.jsxs) { + specifiers.push({ + type: "ImportSpecifier", + imported: { type: "Identifier", name: "jsxs" }, + local: { type: "Identifier", name: "_jsxs" } + }); + } + if (imports.jsxDEV) { + specifiers.push({ + type: "ImportSpecifier", + imported: { type: "Identifier", name: "jsxDEV" }, + local: { type: "Identifier", name: "_jsxDEV" } + }); + } + if (specifiers.length > 0) { + let injectIndex = 0; + while (injectIndex < node2.body.length) { + const child = node2.body[injectIndex]; + if ("directive" in child && child.directive) { + injectIndex++; + } else { + break; + } + } + node2.body.splice(injectIndex, 0, { + type: "ImportDeclaration", + specifiers, + source: { + type: "Literal", + value: (annotations.jsxImportSource || config.importSource || "react") + (config.development ? "/jsx-dev-runtime" : "/jsx-runtime") + } + }); + } + } + if (node2.type !== "JSXElement" && node2.type !== "JSXFragment") { + return; + } + const children = []; + let index2 = -1; + while (++index2 < node2.children.length) { + const child = node2.children[index2]; + if (child.type === "JSXExpressionContainer") { + if (child.expression.type !== "JSXEmptyExpression") { + children.push(child.expression); + } + } else if (child.type === "JSXText") { + const value = child.value.replace(/\t/g, " ").replace(/ *(\r?\n|\r) */g, "\n").replace(/\n+/g, "\n").replace(/\n+$/, "").replace(/^\n+/, "").replace(/\n/g, " "); + if (value) { + const text7 = { type: "Literal", value }; + create(child, text7); + children.push(text7); + } + } else { + ok( + child.type !== "JSXElement" && child.type !== "JSXFragment" && child.type !== "JSXSpreadChild" + ); + children.push(child); + } + } + let name2; + const fields = []; + let parameters = []; + let key; + if (node2.type === "JSXElement") { + name2 = toIdentifier(node2.openingElement.name); + if (name2.type === "Identifier" && /^[a-z]/.test(name2.name)) { + const next = { type: "Literal", value: name2.name }; + create(name2, next); + name2 = next; + } + let spread; + const attributes = node2.openingElement.attributes; + let index3 = -1; + while (++index3 < attributes.length) { + const attribute = attributes[index3]; + if (attribute.type === "JSXSpreadAttribute") { + if (attribute.argument.type === "ObjectExpression") { + fields.push(...attribute.argument.properties); + } else { + fields.push({ type: "SpreadElement", argument: attribute.argument }); + } + spread = true; + } else { + const prop = toProperty(attribute); + if (automatic && prop.key.type === "Identifier" && prop.key.name === "key") { + if (spread) { + throw new Error( + "Expected `key` to come before any spread expressions" + ); + } + const value = prop.value; + ok( + value.type !== "AssignmentPattern" && value.type !== "ArrayPattern" && value.type !== "ObjectPattern" && value.type !== "RestElement" + ); + key = value; + } else { + fields.push(prop); + } + } + } + } else if (automatic) { + imports.fragment = true; + name2 = { type: "Identifier", name: "_Fragment" }; + } else { + name2 = toMemberExpression( + annotations.jsxFrag || config.pragmaFrag || "React.Fragment" + ); + } + if (automatic) { + if (children.length > 0) { + fields.push({ + type: "Property", + key: { type: "Identifier", name: "children" }, + value: children.length > 1 ? { type: "ArrayExpression", elements: children } : children[0], + kind: "init", + method: false, + shorthand: false, + computed: false + }); + } + } else { + parameters = children; + } + let callee; + if (automatic) { + parameters.push({ type: "ObjectExpression", properties: fields }); + if (key) { + parameters.push(key); + } else if (config.development) { + parameters.push({ type: "Identifier", name: "undefined" }); + } + const isStaticChildren = children.length > 1; + if (config.development) { + imports.jsxDEV = true; + callee = { + type: "Identifier", + name: "_jsxDEV" + }; + parameters.push({ type: "Literal", value: isStaticChildren }); + const source = { + type: "ObjectExpression", + properties: [ + { + type: "Property", + method: false, + shorthand: false, + computed: false, + kind: "init", + key: { type: "Identifier", name: "fileName" }, + value: { + type: "Literal", + value: config.filePath || "" + } + } + ] + }; + if (node2.loc) { + source.properties.push( + { + type: "Property", + method: false, + shorthand: false, + computed: false, + kind: "init", + key: { type: "Identifier", name: "lineNumber" }, + value: { type: "Literal", value: node2.loc.start.line } + }, + { + type: "Property", + method: false, + shorthand: false, + computed: false, + kind: "init", + key: { type: "Identifier", name: "columnNumber" }, + value: { type: "Literal", value: node2.loc.start.column + 1 } + } + ); + } + parameters.push(source, { type: "ThisExpression" }); + } else if (isStaticChildren) { + imports.jsxs = true; + callee = { type: "Identifier", name: "_jsxs" }; + } else { + imports.jsx = true; + callee = { type: "Identifier", name: "_jsx" }; + } + } else { + if (fields.length > 0) { + parameters.unshift({ type: "ObjectExpression", properties: fields }); + } else if (parameters.length > 0) { + parameters.unshift({ type: "Literal", value: null }); + } + callee = toMemberExpression( + annotations.jsx || config.pragma || "React.createElement" + ); + } + parameters.unshift(name2); + const call = { + type: "CallExpression", + callee, + arguments: parameters, + optional: false + }; + create(node2, call); + this.replace(call); + } + }); +} +function toProperty(node2) { + let value; + if (node2.value) { + if (node2.value.type === "JSXExpressionContainer") { + const valueExpression = node2.value.expression; + ok( + valueExpression.type !== "JSXEmptyExpression", + "`JSXEmptyExpression` is not allowed in props." + ); + value = valueExpression; + } else { + const nodeValue = node2.value; + ok( + nodeValue.type !== "JSXElement" && nodeValue.type !== "JSXFragment", + "JSX{Element,Fragment} are already compiled to `CallExpression`" + ); + value = nodeValue; + delete value.raw; + } + } else { + value = { type: "Literal", value: true }; + } + const replacement = { + type: "Property", + key: toIdentifier(node2.name), + value, + kind: "init", + method: false, + shorthand: false, + computed: false + }; + create(node2, replacement); + return replacement; +} +function toIdentifier(node2) { + let replace2; + if (node2.type === "JSXMemberExpression") { + const id = toIdentifier(node2.property); + replace2 = { + type: "MemberExpression", + object: toIdentifier(node2.object), + property: id, + computed: id.type === "Literal", + optional: false + }; + } else if (node2.type === "JSXNamespacedName") { + replace2 = { + type: "Literal", + value: node2.namespace.name + ":" + node2.name.name + }; + } else { + replace2 = name(node2.name) ? { type: "Identifier", name: node2.name } : { type: "Literal", value: node2.name }; + } + create(node2, replace2); + return replace2; +} +function toMemberExpression(id) { + const identifiers = id.split("."); + let index2 = -1; + let result; + while (++index2 < identifiers.length) { + const prop = name(identifiers[index2]) ? { type: "Identifier", name: identifiers[index2] } : { type: "Literal", value: identifiers[index2] }; + result = result ? { + type: "MemberExpression", + object: result, + property: prop, + computed: Boolean(index2 && prop.type === "Literal"), + optional: false + } : prop; + } + ok(result, "always a result"); + return result; +} +function create(from, to) { + const fields = ["start", "end", "loc", "range", "comments"]; + let index2 = -1; + while (++index2 < fields.length) { + const field = fields[index2]; + if (field in from) { + to[field] = from[field]; + } + } +} + +// ../../../node_modules/.pnpm/recma-build-jsx@1.0.0/node_modules/recma-build-jsx/lib/index.js +function recmaJsx(options2) { + return function(tree, file) { + buildJsx(tree, { filePath: file.history[0], ...options2 }); + }; +} + +// ../../../node_modules/.pnpm/recma-jsx@1.0.1_acorn@8.18.0/node_modules/recma-jsx/lib/index.js +var import_acorn_jsx = __toESM(require_acorn_jsx(), 1); + +// ../../../node_modules/.pnpm/astring@1.9.0/node_modules/astring/dist/astring.mjs +var { stringify } = JSON; +if (!String.prototype.repeat) { + throw new Error( + "String.prototype.repeat is undefined, see https://github.com/davidbonnet/astring#installation" + ); +} +if (!String.prototype.endsWith) { + throw new Error( + "String.prototype.endsWith is undefined, see https://github.com/davidbonnet/astring#installation" + ); +} +var OPERATOR_PRECEDENCE = { + "||": 2, + "??": 3, + "&&": 4, + "|": 5, + "^": 6, + "&": 7, + "==": 8, + "!=": 8, + "===": 8, + "!==": 8, + "<": 9, + ">": 9, + "<=": 9, + ">=": 9, + in: 9, + instanceof: 9, + "<<": 10, + ">>": 10, + ">>>": 10, + "+": 11, + "-": 11, + "*": 12, + "%": 12, + "/": 12, + "**": 13 +}; +var NEEDS_PARENTHESES = 17; +var EXPRESSIONS_PRECEDENCE = { + // Definitions + ArrayExpression: 20, + TaggedTemplateExpression: 20, + ThisExpression: 20, + Identifier: 20, + PrivateIdentifier: 20, + Literal: 18, + TemplateLiteral: 20, + Super: 20, + SequenceExpression: 20, + // Operations + MemberExpression: 19, + ChainExpression: 19, + CallExpression: 19, + NewExpression: 19, + // Other definitions + ArrowFunctionExpression: NEEDS_PARENTHESES, + ClassExpression: NEEDS_PARENTHESES, + FunctionExpression: NEEDS_PARENTHESES, + ObjectExpression: NEEDS_PARENTHESES, + // Other operations + UpdateExpression: 16, + UnaryExpression: 15, + AwaitExpression: 15, + BinaryExpression: 14, + LogicalExpression: 13, + ConditionalExpression: 4, + AssignmentExpression: 3, + YieldExpression: 2, + RestElement: 1 +}; +function formatSequence(state, nodes) { + const { generator } = state; + state.write("("); + if (nodes != null && nodes.length > 0) { + generator[nodes[0].type](nodes[0], state); + const { length } = nodes; + for (let i = 1; i < length; i++) { + const param = nodes[i]; + state.write(", "); + generator[param.type](param, state); + } + } + state.write(")"); +} +function expressionNeedsParenthesis(state, node2, parentNode, isRightHand) { + const nodePrecedence = state.expressionsPrecedence[node2.type]; + if (nodePrecedence === NEEDS_PARENTHESES) { + return true; + } + const parentNodePrecedence = state.expressionsPrecedence[parentNode.type]; + if (nodePrecedence !== parentNodePrecedence) { + return !isRightHand && nodePrecedence === 15 && parentNodePrecedence === 14 && parentNode.operator === "**" || nodePrecedence < parentNodePrecedence; + } + if (nodePrecedence !== 13 && nodePrecedence !== 14) { + return false; + } + if (node2.operator === "**" && parentNode.operator === "**") { + return !isRightHand; + } + if (nodePrecedence === 13 && parentNodePrecedence === 13 && (node2.operator === "??" || parentNode.operator === "??")) { + return true; + } + if (isRightHand) { + return OPERATOR_PRECEDENCE[node2.operator] <= OPERATOR_PRECEDENCE[parentNode.operator]; + } + return OPERATOR_PRECEDENCE[node2.operator] < OPERATOR_PRECEDENCE[parentNode.operator]; +} +function formatExpression(state, node2, parentNode, isRightHand) { + const { generator } = state; + if (expressionNeedsParenthesis(state, node2, parentNode, isRightHand)) { + state.write("("); + generator[node2.type](node2, state); + state.write(")"); + } else { + generator[node2.type](node2, state); + } +} +function reindent(state, text7, indent3, lineEnd) { + const lines = text7.split("\n"); + const end = lines.length - 1; + state.write(lines[0].trim()); + if (end > 0) { + state.write(lineEnd); + for (let i = 1; i < end; i++) { + state.write(indent3 + lines[i].trim() + lineEnd); + } + state.write(indent3 + lines[end].trim()); + } +} +function formatComments(state, comments, indent3, lineEnd) { + const { length } = comments; + for (let i = 0; i < length; i++) { + const comment2 = comments[i]; + state.write(indent3); + if (comment2.type[0] === "L") { + state.write("// " + comment2.value.trim() + "\n", comment2); + } else { + state.write("/*"); + reindent(state, comment2.value, indent3, lineEnd); + state.write("*/" + lineEnd); + } + } +} +function hasCallExpression(node2) { + let currentNode = node2; + while (currentNode != null) { + const { type } = currentNode; + if (type[0] === "C" && type[1] === "a") { + return true; + } else if (type[0] === "M" && type[1] === "e" && type[2] === "m") { + currentNode = currentNode.object; + } else { + return false; + } + } +} +function formatVariableDeclaration(state, node2) { + const { generator } = state; + const { declarations } = node2; + state.write(node2.kind + " "); + const { length } = declarations; + if (length > 0) { + generator.VariableDeclarator(declarations[0], state); + for (let i = 1; i < length; i++) { + state.write(", "); + generator.VariableDeclarator(declarations[i], state); + } + } +} +var ForInStatement; +var FunctionDeclaration; +var RestElement; +var BinaryExpression; +var ArrayExpression; +var BlockStatement; +var GENERATOR = { + /* + Default generator. + */ + Program(node2, state) { + const indent3 = state.indent.repeat(state.indentLevel); + const { lineEnd, writeComments } = state; + if (writeComments && node2.comments != null) { + formatComments(state, node2.comments, indent3, lineEnd); + } + const statements = node2.body; + const { length } = statements; + for (let i = 0; i < length; i++) { + const statement = statements[i]; + if (writeComments && statement.comments != null) { + formatComments(state, statement.comments, indent3, lineEnd); + } + state.write(indent3); + this[statement.type](statement, state); + state.write(lineEnd); + } + if (writeComments && node2.trailingComments != null) { + formatComments(state, node2.trailingComments, indent3, lineEnd); + } + }, + BlockStatement: BlockStatement = function(node2, state) { + const indent3 = state.indent.repeat(state.indentLevel++); + const { lineEnd, writeComments } = state; + const statementIndent = indent3 + state.indent; + state.write("{"); + const statements = node2.body; + if (statements != null && statements.length > 0) { + state.write(lineEnd); + if (writeComments && node2.comments != null) { + formatComments(state, node2.comments, statementIndent, lineEnd); + } + const { length } = statements; + for (let i = 0; i < length; i++) { + const statement = statements[i]; + if (writeComments && statement.comments != null) { + formatComments(state, statement.comments, statementIndent, lineEnd); + } + state.write(statementIndent); + this[statement.type](statement, state); + state.write(lineEnd); + } + state.write(indent3); + } else { + if (writeComments && node2.comments != null) { + state.write(lineEnd); + formatComments(state, node2.comments, statementIndent, lineEnd); + state.write(indent3); + } + } + if (writeComments && node2.trailingComments != null) { + formatComments(state, node2.trailingComments, statementIndent, lineEnd); + } + state.write("}"); + state.indentLevel--; + }, + ClassBody: BlockStatement, + StaticBlock(node2, state) { + state.write("static "); + this.BlockStatement(node2, state); + }, + EmptyStatement(node2, state) { + state.write(";"); + }, + ExpressionStatement(node2, state) { + const precedence = state.expressionsPrecedence[node2.expression.type]; + if (precedence === NEEDS_PARENTHESES || precedence === 3 && node2.expression.left.type[0] === "O") { + state.write("("); + this[node2.expression.type](node2.expression, state); + state.write(")"); + } else { + this[node2.expression.type](node2.expression, state); + } + state.write(";"); + }, + IfStatement(node2, state) { + state.write("if ("); + this[node2.test.type](node2.test, state); + state.write(") "); + this[node2.consequent.type](node2.consequent, state); + if (node2.alternate != null) { + state.write(" else "); + this[node2.alternate.type](node2.alternate, state); + } + }, + LabeledStatement(node2, state) { + this[node2.label.type](node2.label, state); + state.write(": "); + this[node2.body.type](node2.body, state); + }, + BreakStatement(node2, state) { + state.write("break"); + if (node2.label != null) { + state.write(" "); + this[node2.label.type](node2.label, state); + } + state.write(";"); + }, + ContinueStatement(node2, state) { + state.write("continue"); + if (node2.label != null) { + state.write(" "); + this[node2.label.type](node2.label, state); + } + state.write(";"); + }, + WithStatement(node2, state) { + state.write("with ("); + this[node2.object.type](node2.object, state); + state.write(") "); + this[node2.body.type](node2.body, state); + }, + SwitchStatement(node2, state) { + const indent3 = state.indent.repeat(state.indentLevel++); + const { lineEnd, writeComments } = state; + state.indentLevel++; + const caseIndent = indent3 + state.indent; + const statementIndent = caseIndent + state.indent; + state.write("switch ("); + this[node2.discriminant.type](node2.discriminant, state); + state.write(") {" + lineEnd); + const { cases: occurences } = node2; + const { length: occurencesCount } = occurences; + for (let i = 0; i < occurencesCount; i++) { + const occurence = occurences[i]; + if (writeComments && occurence.comments != null) { + formatComments(state, occurence.comments, caseIndent, lineEnd); + } + if (occurence.test) { + state.write(caseIndent + "case "); + this[occurence.test.type](occurence.test, state); + state.write(":" + lineEnd); + } else { + state.write(caseIndent + "default:" + lineEnd); + } + const { consequent } = occurence; + const { length: consequentCount } = consequent; + for (let i2 = 0; i2 < consequentCount; i2++) { + const statement = consequent[i2]; + if (writeComments && statement.comments != null) { + formatComments(state, statement.comments, statementIndent, lineEnd); + } + state.write(statementIndent); + this[statement.type](statement, state); + state.write(lineEnd); + } + } + state.indentLevel -= 2; + state.write(indent3 + "}"); + }, + ReturnStatement(node2, state) { + state.write("return"); + if (node2.argument) { + state.write(" "); + this[node2.argument.type](node2.argument, state); + } + state.write(";"); + }, + ThrowStatement(node2, state) { + state.write("throw "); + this[node2.argument.type](node2.argument, state); + state.write(";"); + }, + TryStatement(node2, state) { + state.write("try "); + this[node2.block.type](node2.block, state); + if (node2.handler) { + const { handler } = node2; + if (handler.param == null) { + state.write(" catch "); + } else { + state.write(" catch ("); + this[handler.param.type](handler.param, state); + state.write(") "); + } + this[handler.body.type](handler.body, state); + } + if (node2.finalizer) { + state.write(" finally "); + this[node2.finalizer.type](node2.finalizer, state); + } + }, + WhileStatement(node2, state) { + state.write("while ("); + this[node2.test.type](node2.test, state); + state.write(") "); + this[node2.body.type](node2.body, state); + }, + DoWhileStatement(node2, state) { + state.write("do "); + this[node2.body.type](node2.body, state); + state.write(" while ("); + this[node2.test.type](node2.test, state); + state.write(");"); + }, + ForStatement(node2, state) { + state.write("for ("); + if (node2.init != null) { + const { init } = node2; + if (init.type[0] === "V") { + formatVariableDeclaration(state, init); + } else { + this[init.type](init, state); + } + } + state.write("; "); + if (node2.test) { + this[node2.test.type](node2.test, state); + } + state.write("; "); + if (node2.update) { + this[node2.update.type](node2.update, state); + } + state.write(") "); + this[node2.body.type](node2.body, state); + }, + ForInStatement: ForInStatement = function(node2, state) { + state.write(`for ${node2.await ? "await " : ""}(`); + const { left } = node2; + if (left.type[0] === "V") { + formatVariableDeclaration(state, left); + } else { + this[left.type](left, state); + } + state.write(node2.type[3] === "I" ? " in " : " of "); + this[node2.right.type](node2.right, state); + state.write(") "); + this[node2.body.type](node2.body, state); + }, + ForOfStatement: ForInStatement, + DebuggerStatement(node2, state) { + state.write("debugger;", node2); + }, + FunctionDeclaration: FunctionDeclaration = function(node2, state) { + state.write( + (node2.async ? "async " : "") + (node2.generator ? "function* " : "function ") + (node2.id ? node2.id.name : ""), + node2 + ); + formatSequence(state, node2.params); + state.write(" "); + this[node2.body.type](node2.body, state); + }, + FunctionExpression: FunctionDeclaration, + VariableDeclaration(node2, state) { + formatVariableDeclaration(state, node2); + state.write(";"); + }, + VariableDeclarator(node2, state) { + this[node2.id.type](node2.id, state); + if (node2.init != null) { + state.write(" = "); + this[node2.init.type](node2.init, state); + } + }, + ClassDeclaration(node2, state) { + state.write("class " + (node2.id ? `${node2.id.name} ` : ""), node2); + if (node2.superClass) { + state.write("extends "); + const { superClass } = node2; + const { type } = superClass; + const precedence = state.expressionsPrecedence[type]; + if ((type[0] !== "C" || type[1] !== "l" || type[5] !== "E") && (precedence === NEEDS_PARENTHESES || precedence < state.expressionsPrecedence.ClassExpression)) { + state.write("("); + this[node2.superClass.type](superClass, state); + state.write(")"); + } else { + this[superClass.type](superClass, state); + } + state.write(" "); + } + this.ClassBody(node2.body, state); + }, + ImportDeclaration(node2, state) { + state.write("import "); + const { specifiers, attributes } = node2; + const { length } = specifiers; + let i = 0; + if (length > 0) { + for (; i < length; ) { + if (i > 0) { + state.write(", "); + } + const specifier = specifiers[i]; + const type = specifier.type[6]; + if (type === "D") { + state.write(specifier.local.name, specifier); + i++; + } else if (type === "N") { + state.write("* as " + specifier.local.name, specifier); + i++; + } else { + break; + } + } + if (i < length) { + state.write("{"); + for (; ; ) { + const specifier = specifiers[i]; + const { name: name2 } = specifier.imported; + state.write(name2, specifier); + if (name2 !== specifier.local.name) { + state.write(" as " + specifier.local.name); + } + if (++i < length) { + state.write(", "); + } else { + break; + } + } + state.write("}"); + } + state.write(" from "); + } + this.Literal(node2.source, state); + if (attributes && attributes.length > 0) { + state.write(" with { "); + for (let i2 = 0; i2 < attributes.length; i2++) { + this.ImportAttribute(attributes[i2], state); + if (i2 < attributes.length - 1) state.write(", "); + } + state.write(" }"); + } + state.write(";"); + }, + ImportAttribute(node2, state) { + this.Identifier(node2.key, state); + state.write(": "); + this.Literal(node2.value, state); + }, + ImportExpression(node2, state) { + state.write("import("); + this[node2.source.type](node2.source, state); + state.write(")"); + }, + ExportDefaultDeclaration(node2, state) { + state.write("export default "); + this[node2.declaration.type](node2.declaration, state); + if (state.expressionsPrecedence[node2.declaration.type] != null && node2.declaration.type[0] !== "F") { + state.write(";"); + } + }, + ExportNamedDeclaration(node2, state) { + state.write("export "); + if (node2.declaration) { + this[node2.declaration.type](node2.declaration, state); + } else { + state.write("{"); + const { specifiers } = node2, { length } = specifiers; + if (length > 0) { + for (let i = 0; ; ) { + const specifier = specifiers[i]; + const { name: name2 } = specifier.local; + state.write(name2, specifier); + if (name2 !== specifier.exported.name) { + state.write(" as " + specifier.exported.name); + } + if (++i < length) { + state.write(", "); + } else { + break; + } + } + } + state.write("}"); + if (node2.source) { + state.write(" from "); + this.Literal(node2.source, state); + } + if (node2.attributes && node2.attributes.length > 0) { + state.write(" with { "); + for (let i = 0; i < node2.attributes.length; i++) { + this.ImportAttribute(node2.attributes[i], state); + if (i < node2.attributes.length - 1) state.write(", "); + } + state.write(" }"); + } + state.write(";"); + } + }, + ExportAllDeclaration(node2, state) { + if (node2.exported != null) { + state.write("export * as " + node2.exported.name + " from "); + } else { + state.write("export * from "); + } + this.Literal(node2.source, state); + if (node2.attributes && node2.attributes.length > 0) { + state.write(" with { "); + for (let i = 0; i < node2.attributes.length; i++) { + this.ImportAttribute(node2.attributes[i], state); + if (i < node2.attributes.length - 1) state.write(", "); + } + state.write(" }"); + } + state.write(";"); + }, + MethodDefinition(node2, state) { + if (node2.static) { + state.write("static "); + } + const kind = node2.kind[0]; + if (kind === "g" || kind === "s") { + state.write(node2.kind + " "); + } + if (node2.value.async) { + state.write("async "); + } + if (node2.value.generator) { + state.write("*"); + } + if (node2.computed) { + state.write("["); + this[node2.key.type](node2.key, state); + state.write("]"); + } else { + this[node2.key.type](node2.key, state); + } + formatSequence(state, node2.value.params); + state.write(" "); + this[node2.value.body.type](node2.value.body, state); + }, + ClassExpression(node2, state) { + this.ClassDeclaration(node2, state); + }, + ArrowFunctionExpression(node2, state) { + state.write(node2.async ? "async " : "", node2); + const { params } = node2; + if (params != null) { + if (params.length === 1 && params[0].type[0] === "I") { + state.write(params[0].name, params[0]); + } else { + formatSequence(state, node2.params); + } + } + state.write(" => "); + if (node2.body.type[0] === "O") { + state.write("("); + this.ObjectExpression(node2.body, state); + state.write(")"); + } else { + this[node2.body.type](node2.body, state); + } + }, + ThisExpression(node2, state) { + state.write("this", node2); + }, + Super(node2, state) { + state.write("super", node2); + }, + RestElement: RestElement = function(node2, state) { + state.write("..."); + this[node2.argument.type](node2.argument, state); + }, + SpreadElement: RestElement, + YieldExpression(node2, state) { + state.write(node2.delegate ? "yield*" : "yield"); + if (node2.argument) { + state.write(" "); + this[node2.argument.type](node2.argument, state); + } + }, + AwaitExpression(node2, state) { + state.write("await ", node2); + formatExpression(state, node2.argument, node2); + }, + TemplateLiteral(node2, state) { + const { quasis, expressions } = node2; + state.write("`"); + const { length } = expressions; + for (let i = 0; i < length; i++) { + const expression = expressions[i]; + const quasi2 = quasis[i]; + state.write(quasi2.value.raw, quasi2); + state.write("${"); + this[expression.type](expression, state); + state.write("}"); + } + const quasi = quasis[quasis.length - 1]; + state.write(quasi.value.raw, quasi); + state.write("`"); + }, + TemplateElement(node2, state) { + state.write(node2.value.raw, node2); + }, + TaggedTemplateExpression(node2, state) { + formatExpression(state, node2.tag, node2); + this[node2.quasi.type](node2.quasi, state); + }, + ArrayExpression: ArrayExpression = function(node2, state) { + state.write("["); + if (node2.elements.length > 0) { + const { elements } = node2, { length } = elements; + for (let i = 0; ; ) { + const element2 = elements[i]; + if (element2 != null) { + this[element2.type](element2, state); + } + if (++i < length) { + state.write(", "); + } else { + if (element2 == null) { + state.write(", "); + } + break; + } + } + } + state.write("]"); + }, + ArrayPattern: ArrayExpression, + ObjectExpression(node2, state) { + const indent3 = state.indent.repeat(state.indentLevel++); + const { lineEnd, writeComments } = state; + const propertyIndent = indent3 + state.indent; + state.write("{"); + if (node2.properties.length > 0) { + state.write(lineEnd); + if (writeComments && node2.comments != null) { + formatComments(state, node2.comments, propertyIndent, lineEnd); + } + const comma = "," + lineEnd; + const { properties } = node2, { length } = properties; + for (let i = 0; ; ) { + const property = properties[i]; + if (writeComments && property.comments != null) { + formatComments(state, property.comments, propertyIndent, lineEnd); + } + state.write(propertyIndent); + this[property.type](property, state); + if (++i < length) { + state.write(comma); + } else { + break; + } + } + state.write(lineEnd); + if (writeComments && node2.trailingComments != null) { + formatComments(state, node2.trailingComments, propertyIndent, lineEnd); + } + state.write(indent3 + "}"); + } else if (writeComments) { + if (node2.comments != null) { + state.write(lineEnd); + formatComments(state, node2.comments, propertyIndent, lineEnd); + if (node2.trailingComments != null) { + formatComments(state, node2.trailingComments, propertyIndent, lineEnd); + } + state.write(indent3 + "}"); + } else if (node2.trailingComments != null) { + state.write(lineEnd); + formatComments(state, node2.trailingComments, propertyIndent, lineEnd); + state.write(indent3 + "}"); + } else { + state.write("}"); + } + } else { + state.write("}"); + } + state.indentLevel--; + }, + Property(node2, state) { + if (node2.method || node2.kind[0] !== "i") { + this.MethodDefinition(node2, state); + } else { + if (!node2.shorthand) { + if (node2.computed) { + state.write("["); + this[node2.key.type](node2.key, state); + state.write("]"); + } else { + this[node2.key.type](node2.key, state); + } + state.write(": "); + } + this[node2.value.type](node2.value, state); + } + }, + PropertyDefinition(node2, state) { + if (node2.static) { + state.write("static "); + } + if (node2.computed) { + state.write("["); + } + this[node2.key.type](node2.key, state); + if (node2.computed) { + state.write("]"); + } + if (node2.value == null) { + if (node2.key.type[0] !== "F") { + state.write(";"); + } + return; + } + state.write(" = "); + this[node2.value.type](node2.value, state); + state.write(";"); + }, + ObjectPattern(node2, state) { + state.write("{"); + if (node2.properties.length > 0) { + const { properties } = node2, { length } = properties; + for (let i = 0; ; ) { + this[properties[i].type](properties[i], state); + if (++i < length) { + state.write(", "); + } else { + break; + } + } + } + state.write("}"); + }, + SequenceExpression(node2, state) { + formatSequence(state, node2.expressions); + }, + UnaryExpression(node2, state) { + if (node2.prefix) { + const { + operator, + argument, + argument: { type } + } = node2; + state.write(operator); + const needsParentheses = expressionNeedsParenthesis(state, argument, node2); + if (!needsParentheses && (operator.length > 1 || type[0] === "U" && (type[1] === "n" || type[1] === "p") && argument.prefix && argument.operator[0] === operator && (operator === "+" || operator === "-"))) { + state.write(" "); + } + if (needsParentheses) { + state.write(operator.length > 1 ? " (" : "("); + this[type](argument, state); + state.write(")"); + } else { + this[type](argument, state); + } + } else { + this[node2.argument.type](node2.argument, state); + state.write(node2.operator); + } + }, + UpdateExpression(node2, state) { + if (node2.prefix) { + state.write(node2.operator); + this[node2.argument.type](node2.argument, state); + } else { + this[node2.argument.type](node2.argument, state); + state.write(node2.operator); + } + }, + AssignmentExpression(node2, state) { + this[node2.left.type](node2.left, state); + state.write(" " + node2.operator + " "); + this[node2.right.type](node2.right, state); + }, + AssignmentPattern(node2, state) { + this[node2.left.type](node2.left, state); + state.write(" = "); + this[node2.right.type](node2.right, state); + }, + BinaryExpression: BinaryExpression = function(node2, state) { + const isIn = node2.operator === "in"; + if (isIn) { + state.write("("); + } + formatExpression(state, node2.left, node2, false); + state.write(" " + node2.operator + " "); + formatExpression(state, node2.right, node2, true); + if (isIn) { + state.write(")"); + } + }, + LogicalExpression: BinaryExpression, + ConditionalExpression(node2, state) { + const { test } = node2; + const precedence = state.expressionsPrecedence[test.type]; + if (precedence === NEEDS_PARENTHESES || precedence <= state.expressionsPrecedence.ConditionalExpression) { + state.write("("); + this[test.type](test, state); + state.write(")"); + } else { + this[test.type](test, state); + } + state.write(" ? "); + this[node2.consequent.type](node2.consequent, state); + state.write(" : "); + this[node2.alternate.type](node2.alternate, state); + }, + NewExpression(node2, state) { + state.write("new "); + const precedence = state.expressionsPrecedence[node2.callee.type]; + if (precedence === NEEDS_PARENTHESES || precedence < state.expressionsPrecedence.CallExpression || hasCallExpression(node2.callee)) { + state.write("("); + this[node2.callee.type](node2.callee, state); + state.write(")"); + } else { + this[node2.callee.type](node2.callee, state); + } + formatSequence(state, node2["arguments"]); + }, + CallExpression(node2, state) { + const precedence = state.expressionsPrecedence[node2.callee.type]; + if (precedence === NEEDS_PARENTHESES || precedence < state.expressionsPrecedence.CallExpression) { + state.write("("); + this[node2.callee.type](node2.callee, state); + state.write(")"); + } else { + this[node2.callee.type](node2.callee, state); + } + if (node2.optional) { + state.write("?."); + } + formatSequence(state, node2["arguments"]); + }, + ChainExpression(node2, state) { + this[node2.expression.type](node2.expression, state); + }, + MemberExpression(node2, state) { + const precedence = state.expressionsPrecedence[node2.object.type]; + if (precedence === NEEDS_PARENTHESES || precedence < state.expressionsPrecedence.MemberExpression) { + state.write("("); + this[node2.object.type](node2.object, state); + state.write(")"); + } else { + this[node2.object.type](node2.object, state); + } + if (node2.computed) { + if (node2.optional) { + state.write("?."); + } + state.write("["); + this[node2.property.type](node2.property, state); + state.write("]"); + } else { + if (node2.optional) { + state.write("?."); + } else { + state.write("."); + } + this[node2.property.type](node2.property, state); + } + }, + MetaProperty(node2, state) { + state.write(node2.meta.name + "." + node2.property.name, node2); + }, + Identifier(node2, state) { + state.write(node2.name, node2); + }, + PrivateIdentifier(node2, state) { + state.write(`#${node2.name}`, node2); + }, + Literal(node2, state) { + if (node2.raw != null) { + state.write(node2.raw, node2); + } else if (node2.regex != null) { + this.RegExpLiteral(node2, state); + } else if (node2.bigint != null) { + state.write(node2.bigint + "n", node2); + } else { + state.write(stringify(node2.value), node2); + } + }, + RegExpLiteral(node2, state) { + const { regex: regex4 } = node2; + state.write(`/${regex4.pattern}/${regex4.flags}`, node2); + } +}; +var EMPTY_OBJECT = {}; +var State = class { + constructor(options2) { + const setup = options2 == null ? EMPTY_OBJECT : options2; + this.output = ""; + if (setup.output != null) { + this.output = setup.output; + this.write = this.writeToStream; + } else { + this.output = ""; + } + this.generator = setup.generator != null ? setup.generator : GENERATOR; + this.expressionsPrecedence = setup.expressionsPrecedence != null ? setup.expressionsPrecedence : EXPRESSIONS_PRECEDENCE; + this.indent = setup.indent != null ? setup.indent : " "; + this.lineEnd = setup.lineEnd != null ? setup.lineEnd : "\n"; + this.indentLevel = setup.startingIndentLevel != null ? setup.startingIndentLevel : 0; + this.writeComments = setup.comments ? setup.comments : false; + if (setup.sourceMap != null) { + this.write = setup.output == null ? this.writeAndMap : this.writeToStreamAndMap; + this.sourceMap = setup.sourceMap; + this.line = 1; + this.column = 0; + this.lineEndSize = this.lineEnd.split("\n").length - 1; + this.mapping = { + original: null, + // Uses the entire state to avoid generating ephemeral objects + generated: this, + name: void 0, + source: setup.sourceMap.file || setup.sourceMap._file + }; + } + } + write(code4) { + this.output += code4; + } + writeToStream(code4) { + this.output.write(code4); + } + writeAndMap(code4, node2) { + this.output += code4; + this.map(code4, node2); + } + writeToStreamAndMap(code4, node2) { + this.output.write(code4); + this.map(code4, node2); + } + map(code4, node2) { + if (node2 != null) { + const { type } = node2; + if (type[0] === "L" && type[2] === "n") { + this.column = 0; + this.line++; + return; + } + if (node2.loc != null) { + const { mapping } = this; + mapping.original = node2.loc.start; + mapping.name = node2.name; + this.sourceMap.addMapping(mapping); + } + if (type[0] === "T" && type[8] === "E" || type[0] === "L" && type[1] === "i" && typeof node2.value === "string") { + const { length: length2 } = code4; + let { column, line } = this; + for (let i = 0; i < length2; i++) { + if (code4[i] === "\n") { + column = 0; + line++; + } else { + column++; + } + } + this.column = column; + this.line = line; + return; + } + } + const { length } = code4; + const { lineEnd } = this; + if (length > 0) { + if (this.lineEndSize > 0 && (lineEnd.length === 1 ? code4[length - 1] === lineEnd : code4.endsWith(lineEnd))) { + this.line += this.lineEndSize; + this.column = 0; + } else { + this.column += length; + } + } + } + toString() { + return this.output; + } +}; +function generate(node2, options2) { + const state = new State(options2); + state.generator[node2.type](node2, state); + return state.output; +} + +// ../../../node_modules/.pnpm/estree-util-to-js@2.0.0/node_modules/estree-util-to-js/lib/index.js +var emptyOptions2 = {}; +function toJs(tree, options2) { + const { SourceMapGenerator, filePath, handlers: handlers3 } = options2 || emptyOptions2; + const sourceMap = SourceMapGenerator ? new SourceMapGenerator({ file: filePath || ".js" }) : void 0; + const value = generate( + tree, + // @ts-expect-error: `sourceMap` can be undefined, `astring` types are buggy. + { + comments: true, + generator: { ...GENERATOR, ...handlers3 }, + sourceMap: sourceMap || void 0 + } + ); + const map3 = sourceMap ? sourceMap.toJSON() : void 0; + return { value, map: map3 }; +} + +// ../../../node_modules/.pnpm/estree-util-to-js@2.0.0/node_modules/estree-util-to-js/lib/jsx.js +var jsx = { + JSXAttribute: jsxAttribute, + JSXClosingElement: jsxClosingElement, + JSXClosingFragment: jsxClosingFragment, + JSXElement: jsxElement, + JSXEmptyExpression: jsxEmptyExpression, + JSXExpressionContainer: jsxExpressionContainer, + JSXFragment: jsxFragment, + JSXIdentifier: jsxIdentifier, + JSXMemberExpression: jsxMemberExpression, + JSXNamespacedName: jsxNamespacedName, + JSXOpeningElement: jsxOpeningElement, + JSXOpeningFragment: jsxOpeningFragment, + JSXSpreadAttribute: jsxSpreadAttribute, + JSXText: jsxText +}; +function jsxAttribute(node2, state) { + this[node2.name.type](node2.name, state); + if (node2.value !== null && node2.value !== void 0) { + state.write("="); + if (node2.value.type === "Literal") { + state.write( + '"' + encodeJsx(String(node2.value.value)).replace(/"/g, """) + '"', + node2 + ); + } else { + this[node2.value.type](node2.value, state); + } + } +} +function jsxClosingElement(node2, state) { + state.write(""); +} +function jsxClosingFragment(node2, state) { + state.write("", node2); +} +function jsxElement(node2, state) { + let index2 = -1; + this[node2.openingElement.type](node2.openingElement, state); + if (node2.children) { + while (++index2 < node2.children.length) { + const child = node2.children[index2]; + if (child.type === "JSXSpreadChild") { + throw new Error("JSX spread children are not supported"); + } + this[child.type](child, state); + } + } + if (node2.closingElement) { + this[node2.closingElement.type](node2.closingElement, state); + } +} +function jsxEmptyExpression() { +} +function jsxExpressionContainer(node2, state) { + state.write("{"); + this[node2.expression.type](node2.expression, state); + state.write("}"); +} +function jsxFragment(node2, state) { + let index2 = -1; + this[node2.openingFragment.type](node2.openingFragment, state); + if (node2.children) { + while (++index2 < node2.children.length) { + const child = node2.children[index2]; + if (child.type === "JSXSpreadChild") { + throw new Error("JSX spread children are not supported"); + } + this[child.type](child, state); + } + } + this[node2.closingFragment.type](node2.closingFragment, state); +} +function jsxIdentifier(node2, state) { + state.write(node2.name, node2); +} +function jsxMemberExpression(node2, state) { + this[node2.object.type](node2.object, state); + state.write("."); + this[node2.property.type](node2.property, state); +} +function jsxNamespacedName(node2, state) { + this[node2.namespace.type](node2.namespace, state); + state.write(":"); + this[node2.name.type](node2.name, state); +} +function jsxOpeningElement(node2, state) { + let index2 = -1; + state.write("<"); + this[node2.name.type](node2.name, state); + if (node2.attributes) { + while (++index2 < node2.attributes.length) { + state.write(" "); + this[node2.attributes[index2].type](node2.attributes[index2], state); + } + } + state.write(node2.selfClosing ? " />" : ">"); +} +function jsxOpeningFragment(node2, state) { + state.write("<>", node2); +} +function jsxSpreadAttribute(node2, state) { + state.write("{"); + this.SpreadElement(node2, state); + state.write("}"); +} +function jsxText(node2, state) { + state.write(encodeJsx(node2.value).replace(/[<>{}]/g, replaceJsxChar), node2); +} +function encodeJsx(value) { + return value.replace(/&(?=[#a-z])/gi, "&"); +} +function replaceJsxChar($0) { + return $0 === "<" ? "<" : $0 === ">" ? ">" : $0 === "{" ? "{" : "}"; +} + +// ../../../node_modules/.pnpm/recma-jsx@1.0.1_acorn@8.18.0/node_modules/recma-jsx/lib/index.js +function recmaJsx2() { + const data2 = this.data(); + const settings = data2.settings || (data2.settings = {}); + const handlers3 = settings.handlers || (settings.handlers = {}); + const plugins = settings.plugins || (settings.plugins = []); + plugins.push((0, import_acorn_jsx.default)()); + Object.assign(handlers3, jsx); +} + +// ../../../node_modules/.pnpm/recma-stringify@1.0.0/node_modules/recma-stringify/lib/index.js +function recmaStringify(options2) { + const self2 = this; + this.compiler = compiler2; + function compiler2(tree, file) { + const settings = { ...self2.data("settings"), ...options2 }; + const result = toJs(tree, { + SourceMapGenerator: settings.SourceMapGenerator, + filePath: file.path || "unknown.js", + handlers: settings.handlers + }); + file.map = result.map; + return result.value; + } +} + +// ../../../node_modules/.pnpm/hast-util-to-estree@3.1.3_supports-color@7.2.0/node_modules/hast-util-to-estree/lib/handlers/comment.js +function comment(node2, state) { + const result = { type: "Block", value: node2.value }; + state.inherit(node2, result); + state.comments.push(result); + const expression = { + type: "JSXEmptyExpression", + // @ts-expect-error: `comments` is custom. + comments: [Object.assign({}, result, { leading: false, trailing: true })] + }; + state.patch(node2, expression); + const container = { type: "JSXExpressionContainer", expression }; + state.patch(node2, container); + return container; +} + +// ../../../node_modules/.pnpm/comma-separated-tokens@2.0.3/node_modules/comma-separated-tokens/index.js +function stringify2(values, options2) { + const settings = options2 || {}; + const input = values[values.length - 1] === "" ? [...values, ""] : values; + return input.join( + (settings.padRight ? " " : "") + "," + (settings.padLeft === false ? "" : " ") + ).trim(); +} + +// ../../../node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/schema.js +var Schema = class { + /** + * @param {SchemaType['property']} property + * Property. + * @param {SchemaType['normal']} normal + * Normal. + * @param {Space | undefined} [space] + * Space. + * @returns + * Schema. + */ + constructor(property, normal, space2) { + this.normal = normal; + this.property = property; + if (space2) { + this.space = space2; + } + } +}; +Schema.prototype.normal = {}; +Schema.prototype.property = {}; +Schema.prototype.space = void 0; + +// ../../../node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/merge.js +function merge(definitions, space2) { + const property = {}; + const normal = {}; + for (const definition3 of definitions) { + Object.assign(property, definition3.property); + Object.assign(normal, definition3.normal); + } + return new Schema(property, normal, space2); +} + +// ../../../node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/normalize.js +function normalize(value) { + return value.toLowerCase(); +} + +// ../../../node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/info.js +var Info = class { + /** + * @param {string} property + * Property. + * @param {string} attribute + * Attribute. + * @returns + * Info. + */ + constructor(property, attribute) { + this.attribute = attribute; + this.property = property; + } +}; +Info.prototype.attribute = ""; +Info.prototype.booleanish = false; +Info.prototype.boolean = false; +Info.prototype.commaOrSpaceSeparated = false; +Info.prototype.commaSeparated = false; +Info.prototype.defined = false; +Info.prototype.mustUseProperty = false; +Info.prototype.number = false; +Info.prototype.overloadedBoolean = false; +Info.prototype.property = ""; +Info.prototype.spaceSeparated = false; +Info.prototype.space = void 0; + +// ../../../node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/types.js +var types_exports = {}; +__export(types_exports, { + boolean: () => boolean, + booleanish: () => booleanish, + commaOrSpaceSeparated: () => commaOrSpaceSeparated, + commaSeparated: () => commaSeparated, + number: () => number, + overloadedBoolean: () => overloadedBoolean, + spaceSeparated: () => spaceSeparated +}); +var powers = 0; +var boolean = increment(); +var booleanish = increment(); +var overloadedBoolean = increment(); +var number = increment(); +var spaceSeparated = increment(); +var commaSeparated = increment(); +var commaOrSpaceSeparated = increment(); +function increment() { + return 2 ** ++powers; +} + +// ../../../node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/defined-info.js +var checks = ( + /** @type {ReadonlyArray} */ + Object.keys(types_exports) +); +var DefinedInfo = class extends Info { + /** + * @constructor + * @param {string} property + * Property. + * @param {string} attribute + * Attribute. + * @param {number | null | undefined} [mask] + * Mask. + * @param {Space | undefined} [space] + * Space. + * @returns + * Info. + */ + constructor(property, attribute, mask, space2) { + let index2 = -1; + super(property, attribute); + mark(this, "space", space2); + if (typeof mask === "number") { + while (++index2 < checks.length) { + const check = checks[index2]; + mark(this, checks[index2], (mask & types_exports[check]) === types_exports[check]); + } + } + } +}; +DefinedInfo.prototype.defined = true; +function mark(values, key, value) { + if (value) { + values[key] = value; + } +} + +// ../../../node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/create.js +function create2(definition3) { + const properties = {}; + const normals = {}; + for (const [property, value] of Object.entries(definition3.properties)) { + const info = new DefinedInfo( + property, + definition3.transform(definition3.attributes || {}, property), + value, + definition3.space + ); + if (definition3.mustUseProperty && definition3.mustUseProperty.includes(property)) { + info.mustUseProperty = true; + } + properties[property] = info; + normals[normalize(property)] = property; + normals[normalize(info.attribute)] = property; + } + return new Schema(properties, normals, definition3.space); +} + +// ../../../node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/aria.js +var aria = create2({ + properties: { + ariaActiveDescendant: null, + ariaAtomic: booleanish, + ariaAutoComplete: null, + ariaBusy: booleanish, + ariaChecked: booleanish, + ariaColCount: number, + ariaColIndex: number, + ariaColSpan: number, + ariaControls: spaceSeparated, + ariaCurrent: null, + ariaDescribedBy: spaceSeparated, + ariaDetails: null, + ariaDisabled: booleanish, + ariaDropEffect: spaceSeparated, + ariaErrorMessage: null, + ariaExpanded: booleanish, + ariaFlowTo: spaceSeparated, + ariaGrabbed: booleanish, + ariaHasPopup: null, + ariaHidden: booleanish, + ariaInvalid: null, + ariaKeyShortcuts: null, + ariaLabel: null, + ariaLabelledBy: spaceSeparated, + ariaLevel: number, + ariaLive: null, + ariaModal: booleanish, + ariaMultiLine: booleanish, + ariaMultiSelectable: booleanish, + ariaOrientation: null, + ariaOwns: spaceSeparated, + ariaPlaceholder: null, + ariaPosInSet: number, + ariaPressed: booleanish, + ariaReadOnly: booleanish, + ariaRelevant: null, + ariaRequired: booleanish, + ariaRoleDescription: spaceSeparated, + ariaRowCount: number, + ariaRowIndex: number, + ariaRowSpan: number, + ariaSelected: booleanish, + ariaSetSize: number, + ariaSort: null, + ariaValueMax: number, + ariaValueMin: number, + ariaValueNow: number, + ariaValueText: null, + role: null + }, + transform(_, property) { + return property === "role" ? property : "aria-" + property.slice(4).toLowerCase(); + } +}); + +// ../../../node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/case-sensitive-transform.js +function caseSensitiveTransform(attributes, attribute) { + return attribute in attributes ? attributes[attribute] : attribute; +} + +// ../../../node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/case-insensitive-transform.js +function caseInsensitiveTransform(attributes, property) { + return caseSensitiveTransform(attributes, property.toLowerCase()); +} + +// ../../../node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/html.js +var html = create2({ + attributes: { + acceptcharset: "accept-charset", + classname: "class", + htmlfor: "for", + httpequiv: "http-equiv" + }, + mustUseProperty: ["checked", "multiple", "muted", "selected"], + properties: { + // Standard Properties. + abbr: null, + accept: commaSeparated, + acceptCharset: spaceSeparated, + accessKey: spaceSeparated, + action: null, + allow: null, + allowFullScreen: boolean, + allowPaymentRequest: boolean, + allowUserMedia: boolean, + alt: null, + as: null, + async: boolean, + autoCapitalize: null, + autoComplete: spaceSeparated, + autoFocus: boolean, + autoPlay: boolean, + blocking: spaceSeparated, + capture: null, + charSet: null, + checked: boolean, + cite: null, + className: spaceSeparated, + cols: number, + colSpan: null, + content: null, + contentEditable: booleanish, + controls: boolean, + controlsList: spaceSeparated, + coords: number | commaSeparated, + crossOrigin: null, + data: null, + dateTime: null, + decoding: null, + default: boolean, + defer: boolean, + dir: null, + dirName: null, + disabled: boolean, + download: overloadedBoolean, + draggable: booleanish, + encType: null, + enterKeyHint: null, + fetchPriority: null, + form: null, + formAction: null, + formEncType: null, + formMethod: null, + formNoValidate: boolean, + formTarget: null, + headers: spaceSeparated, + height: number, + hidden: overloadedBoolean, + high: number, + href: null, + hrefLang: null, + htmlFor: spaceSeparated, + httpEquiv: spaceSeparated, + id: null, + imageSizes: null, + imageSrcSet: null, + inert: boolean, + inputMode: null, + integrity: null, + is: null, + isMap: boolean, + itemId: null, + itemProp: spaceSeparated, + itemRef: spaceSeparated, + itemScope: boolean, + itemType: spaceSeparated, + kind: null, + label: null, + lang: null, + language: null, + list: null, + loading: null, + loop: boolean, + low: number, + manifest: null, + max: null, + maxLength: number, + media: null, + method: null, + min: null, + minLength: number, + multiple: boolean, + muted: boolean, + name: null, + nonce: null, + noModule: boolean, + noValidate: boolean, + onAbort: null, + onAfterPrint: null, + onAuxClick: null, + onBeforeMatch: null, + onBeforePrint: null, + onBeforeToggle: null, + onBeforeUnload: null, + onBlur: null, + onCancel: null, + onCanPlay: null, + onCanPlayThrough: null, + onChange: null, + onClick: null, + onClose: null, + onContextLost: null, + onContextMenu: null, + onContextRestored: null, + onCopy: null, + onCueChange: null, + onCut: null, + onDblClick: null, + onDrag: null, + onDragEnd: null, + onDragEnter: null, + onDragExit: null, + onDragLeave: null, + onDragOver: null, + onDragStart: null, + onDrop: null, + onDurationChange: null, + onEmptied: null, + onEnded: null, + onError: null, + onFocus: null, + onFormData: null, + onHashChange: null, + onInput: null, + onInvalid: null, + onKeyDown: null, + onKeyPress: null, + onKeyUp: null, + onLanguageChange: null, + onLoad: null, + onLoadedData: null, + onLoadedMetadata: null, + onLoadEnd: null, + onLoadStart: null, + onMessage: null, + onMessageError: null, + onMouseDown: null, + onMouseEnter: null, + onMouseLeave: null, + onMouseMove: null, + onMouseOut: null, + onMouseOver: null, + onMouseUp: null, + onOffline: null, + onOnline: null, + onPageHide: null, + onPageShow: null, + onPaste: null, + onPause: null, + onPlay: null, + onPlaying: null, + onPopState: null, + onProgress: null, + onRateChange: null, + onRejectionHandled: null, + onReset: null, + onResize: null, + onScroll: null, + onScrollEnd: null, + onSecurityPolicyViolation: null, + onSeeked: null, + onSeeking: null, + onSelect: null, + onSlotChange: null, + onStalled: null, + onStorage: null, + onSubmit: null, + onSuspend: null, + onTimeUpdate: null, + onToggle: null, + onUnhandledRejection: null, + onUnload: null, + onVolumeChange: null, + onWaiting: null, + onWheel: null, + open: boolean, + optimum: number, + pattern: null, + ping: spaceSeparated, + placeholder: null, + playsInline: boolean, + popover: null, + popoverTarget: null, + popoverTargetAction: null, + poster: null, + preload: null, + readOnly: boolean, + referrerPolicy: null, + rel: spaceSeparated, + required: boolean, + reversed: boolean, + rows: number, + rowSpan: number, + sandbox: spaceSeparated, + scope: null, + scoped: boolean, + seamless: boolean, + selected: boolean, + shadowRootClonable: boolean, + shadowRootDelegatesFocus: boolean, + shadowRootMode: null, + shape: null, + size: number, + sizes: null, + slot: null, + span: number, + spellCheck: booleanish, + src: null, + srcDoc: null, + srcLang: null, + srcSet: null, + start: number, + step: null, + style: null, + tabIndex: number, + target: null, + title: null, + translate: null, + type: null, + typeMustMatch: boolean, + useMap: null, + value: booleanish, + width: number, + wrap: null, + writingSuggestions: null, + // Legacy. + // See: https://html.spec.whatwg.org/#other-elements,-attributes-and-apis + align: null, + // Several. Use CSS `text-align` instead, + aLink: null, + // ``. Use CSS `a:active {color}` instead + archive: spaceSeparated, + // ``. List of URIs to archives + axis: null, + // `` and ``. Use `scope` on `` + background: null, + // ``. Use CSS `background-image` instead + bgColor: null, + // `` and table elements. Use CSS `background-color` instead + border: number, + // ``. Use CSS `border-width` instead, + borderColor: null, + // `
`. Use CSS `border-color` instead, + bottomMargin: number, + // `` + cellPadding: null, + // `
` + cellSpacing: null, + // `
` + char: null, + // Several table elements. When `align=char`, sets the character to align on + charOff: null, + // Several table elements. When `char`, offsets the alignment + classId: null, + // `` + clear: null, + // `
`. Use CSS `clear` instead + code: null, + // `` + codeBase: null, + // `` + codeType: null, + // `` + color: null, + // `` and `
`. Use CSS instead + compact: boolean, + // Lists. Use CSS to reduce space between items instead + declare: boolean, + // `` + event: null, + // `