vitepress-openapi
Version:
Generate VitePress API Documentation from OpenAPI Specification.
1,071 lines (1,070 loc) • 3.31 MB
JavaScript
var _I = Object.defineProperty;
var wI = Object.getPrototypeOf;
var xI = Reflect.get;
var rj = (t) => {
throw TypeError(t);
};
var kI = (t, e, n) => e in t ? _I(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
var Ie = (t, e, n) => kI(t, typeof e != "symbol" ? e + "" : e, n), F1 = (t, e, n) => e.has(t) || rj("Cannot " + n);
var Sr = (t, e, n) => (F1(t, e, "read from private field"), n ? n.call(t) : e.get(t)), Ji = (t, e, n) => e.has(t) ? rj("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, n), $a = (t, e, n, r) => (F1(t, e, "write to private field"), r ? r.call(t, n) : e.set(t, n), n), $f = (t, e, n) => (F1(t, e, "access private method"), n);
var P1 = (t, e, n) => xI(wI(t), n, e);
import * as To from "vue";
import { ref as tt, computed as qe, inject as Zd, openBlock as I, createElementBlock as ye, createStaticVNode as CI, provide as ey, renderSlot as Ke, defineComponent as lt, withAsyncContext as aj, createBlock as Ne, unref as N, withCtx as de, Suspense as AI, createVNode as Ee, createElementVNode as Te, useSlots as Ds, resolveDynamicComponent as c2, normalizeClass as Ir, createTextVNode as Cn, toDisplayString as Ze, createCommentVNode as De, Fragment as Vt, renderList as An, shallowRef as FO, watch as Nr, getCurrentScope as PO, onScopeDispose as RO, shallowReadonly as xp, getCurrentInstance as Qc, toRef as jI, camelize as MO, Comment as $I, mergeProps as yr, cloneVNode as SI, h as to, toRefs as Hl, reactive as IO, withKeys as kd, withModifiers as Ru, watchEffect as ji, markRaw as EI, onMounted as zi, normalizeProps as xr, guardReactiveProps as kr, Teleport as u2, onBeforeUnmount as ty, onBeforeMount as NI, effectScope as DO, nextTick as ei, toHandlerKey as OI, onUnmounted as ny, withDirectives as LO, isRef as p2, vModelSelect as TI, normalizeStyle as ry, customRef as FI, onBeforeUpdate as PI, onUpdated as RI, mergeDefaults as MI, watchPostEffect as II, readonly as DI, vModelDynamic as LI, resolveComponent as zI, createSlots as Wl } from "vue";
import { u as Yr, O as Wb, p as Pw, g as qI, a as BI, b as ih, r as ij, c as zO, d as Gb, e as Rw, f as UI } from "./OpenApi-CJg3ai1M.js";
import { D as MAe, i as IAe, h as DAe, l as LAe } from "./OpenApi-CJg3ai1M.js";
function Mw({
chain: t,
messages: e,
params: n,
initialChain: r
}) {
const a = t[0];
if (r ?? (r = [...t]), a.includes("[")) {
const [s, o] = a.split("["), l = Number.parseInt(o.replace("]", ""), 10);
if (l < 0)
throw new Error(`Invalid array index "${l}" for message "${r.join(".")}"`);
const c = e[s];
if (!Array.isArray(c) || c.length <= l)
throw new Error(`Message "${r.join(".")}" not found`);
const u = c[l];
return t.length === 1 ? typeof u == "string" ? u : "" : Mw({
chain: t.slice(1),
messages: u,
params: n,
initialChain: r
});
}
const i = e[a];
if (i == null)
throw new Error(`Message "${r.join(".")}" not found`);
return t.length === 1 ? typeof i != "string" ? "" : n ? i.replace(/\{(\w*)\}/g, (s, o) => {
if (!(o in n))
throw new Error(`Parameter "${o}" not found`);
if (Array.isArray(n)) {
if (Number.isNaN(Number(o)))
throw new Error(`Parameter "${o}" not found`);
return String(n[o]);
}
return String(n[o]);
}) : i : Mw({
chain: t.slice(1),
messages: i,
params: n,
initialChain: r
});
}
const Jm = "[vue-i18n]", qO = Symbol("@byjohann/vue-i18n");
function VI(t) {
const {
defaultLocale: e = "en",
logLevel: n = "warn"
} = t, r = { ...t.messages ?? {} }, a = tt(e), i = t.locales ?? (Object.keys(r).length ? Object.keys(r) : [a.value]), s = (c, u) => {
if (typeof c != "string")
return n === "warn" && console.warn(Jm, `Message "${c}" must be a string`), "";
if (!c)
return n === "warn" && console.warn(Jm, "Message key is empty"), "";
try {
return Mw({
chain: c.split("."),
messages: r[a.value],
params: u
});
} catch (p) {
return n === "warn" && console.warn(Jm, p.message), c;
}
}, o = (c) => {
if (!i.includes(c)) {
n === "warn" && console.warn(
Jm,
`Locale "${c}" is not defined in the locales list. Available locales: ${i.join(", ")}`
);
return;
}
a.value = c;
}, l = () => a.value;
return {
defaultLocale: e,
locale: qe(() => a.value),
locales: Object.freeze(i),
messages: r,
t: s,
setLocale: o,
getLocale: l,
install(c) {
c.provide(qO, this), c.config.globalProperties.$t = this.t, c.config.globalProperties.$i18n = this;
}
};
}
function HI() {
return Zd(qO);
}
function BO(t) {
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
}
const UO = Symbol("openapiLocal");
let Qm = null;
function WI({
spec: t,
config: e
} = {}) {
e && Yr(e), t && r({ spec: t });
function n({
spec: i
}) {
Qm = Wb({
spec: i
});
}
function r({
spec: i
} = {}) {
var s, o;
if (i)
n(
Wb({
spec: Pw().parseSync({
spec: i,
defaultTag: (s = e == null ? void 0 : e.spec) == null ? void 0 : s.defaultTag,
defaultTagDescription: (o = e == null ? void 0 : e.spec) == null ? void 0 : o.defaultTagDescription
})
})
);
else
throw new Error("No spec provided");
return Qm;
}
async function a({
spec: i
} = {}) {
var s, o;
if (i)
n(
Wb({
spec: await Pw().parseAsync({
spec: i,
defaultTag: (s = e == null ? void 0 : e.spec) == null ? void 0 : s.defaultTag,
defaultTagDescription: (o = e == null ? void 0 : e.spec) == null ? void 0 : o.defaultTagDescription
})
})
);
else
throw new Error("No spec provided");
return Qm;
}
return {
...Qm,
async: a
};
}
const ay = (t, e) => {
const n = t.__vccOpts || t;
for (const [r, a] of e)
n[r] = a;
return n;
}, GI = {}, KI = { class: "animate-pulse flex flex-col gap-6 p-4" };
function ZI(t, e) {
return I(), ye("div", KI, e[0] || (e[0] = [
CI('<div class="flex flex-col gap-4"><div class="w-1/3 h-10 bg-muted rounded"></div><div class="w-1/4 h-4 bg-muted rounded"></div><div class="w-1/2 h-4 bg-muted rounded"></div></div><hr><div class="flex flex-col gap-4"><div class="w-1/3 h-10 bg-muted rounded"></div><div class="w-full h-20 bg-muted rounded"></div></div><hr><div class="flex flex-col gap-4"><div class="w-1/3 h-10 bg-muted rounded"></div><div class="w-1/2 h-4 bg-muted rounded"></div></div>', 5)
]));
}
const VO = /* @__PURE__ */ ay(GI, [["render", ZI]]), HO = {
__name: "OAContext",
props: {
openapi: {
type: Object,
required: !0
}
},
setup(t) {
const e = t;
return ey(UO, e.openapi), (n, r) => Ke(n.$slots, "default", {
openapi: e.openapi
});
}
}, YI = Symbol.for("__confbox_fmt__"), XI = /^(\s+)/, JI = /(\s+)$/;
function QI(t, e = {}) {
var a, i;
const n = e.indent === void 0 && e.preserveIndentation !== !1 && t.slice(0, (e == null ? void 0 : e.sampleSize) || 1024), r = e.preserveWhitespace === !1 ? void 0 : { start: ((a = XI.exec(t)) == null ? void 0 : a[0]) || "", end: ((i = JI.exec(t)) == null ? void 0 : i[0]) || "" };
return { sample: n, whiteSpace: r };
}
function eD(t, e, n) {
!e || typeof e != "object" || Object.defineProperty(e, YI, { enumerable: !1, configurable: !0, writable: !0, value: QI(t, n) });
}
/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */
function WO(t) {
return typeof t > "u" || t === null;
}
function tD(t) {
return typeof t == "object" && t !== null;
}
function nD(t) {
return Array.isArray(t) ? t : WO(t) ? [] : [t];
}
function rD(t, e) {
var n, r, a, i;
if (e) for (i = Object.keys(e), n = 0, r = i.length; n < r; n += 1) a = i[n], t[a] = e[a];
return t;
}
function aD(t, e) {
var n = "", r;
for (r = 0; r < e; r += 1) n += t;
return n;
}
function iD(t) {
return t === 0 && Number.NEGATIVE_INFINITY === 1 / t;
}
var sD = WO, oD = tD, lD = nD, cD = aD, uD = iD, pD = rD, Fi = { isNothing: sD, isObject: oD, toArray: lD, repeat: cD, isNegativeZero: uD, extend: pD };
function GO(t, e) {
var n = "", r = t.reason || "(unknown reason)";
return t.mark ? (t.mark.name && (n += 'in "' + t.mark.name + '" '), n += "(" + (t.mark.line + 1) + ":" + (t.mark.column + 1) + ")", !e && t.mark.snippet && (n += `
` + t.mark.snippet), r + " " + n) : r;
}
function Kf(t, e) {
Error.call(this), this.name = "YAMLException", this.reason = t, this.mark = e, this.message = GO(this, !1), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack || "";
}
Kf.prototype = Object.create(Error.prototype), Kf.prototype.constructor = Kf, Kf.prototype.toString = function(t) {
return this.name + ": " + GO(this, t);
};
var wl = Kf;
function R1(t, e, n, r, a) {
var i = "", s = "", o = Math.floor(a / 2) - 1;
return r - e > o && (i = " ... ", e = r - o + i.length), n - r > o && (s = " ...", n = r + o - s.length), { str: i + t.slice(e, n).replace(/\t/g, "→") + s, pos: r - e + i.length };
}
function M1(t, e) {
return Fi.repeat(" ", e - t.length) + t;
}
function dD(t, e) {
if (e = Object.create(e || null), !t.buffer) return null;
e.maxLength || (e.maxLength = 79), typeof e.indent != "number" && (e.indent = 1), typeof e.linesBefore != "number" && (e.linesBefore = 3), typeof e.linesAfter != "number" && (e.linesAfter = 2);
for (var n = /\r?\n|\r|\0/g, r = [0], a = [], i, s = -1; i = n.exec(t.buffer); ) a.push(i.index), r.push(i.index + i[0].length), t.position <= i.index && s < 0 && (s = r.length - 2);
s < 0 && (s = r.length - 1);
var o = "", l, c, u = Math.min(t.line + e.linesAfter, a.length).toString().length, p = e.maxLength - (e.indent + u + 3);
for (l = 1; l <= e.linesBefore && !(s - l < 0); l++) c = R1(t.buffer, r[s - l], a[s - l], t.position - (r[s] - r[s - l]), p), o = Fi.repeat(" ", e.indent) + M1((t.line - l + 1).toString(), u) + " | " + c.str + `
` + o;
for (c = R1(t.buffer, r[s], a[s], t.position, p), o += Fi.repeat(" ", e.indent) + M1((t.line + 1).toString(), u) + " | " + c.str + `
`, o += Fi.repeat("-", e.indent + u + 3 + c.pos) + `^
`, l = 1; l <= e.linesAfter && !(s + l >= a.length); l++) c = R1(t.buffer, r[s + l], a[s + l], t.position - (r[s] - r[s + l]), p), o += Fi.repeat(" ", e.indent) + M1((t.line + l + 1).toString(), u) + " | " + c.str + `
`;
return o.replace(/\n$/, "");
}
var fD = dD, hD = ["kind", "multi", "resolve", "construct", "instanceOf", "predicate", "represent", "representName", "defaultStyle", "styleAliases"], mD = ["scalar", "sequence", "mapping"];
function gD(t) {
var e = {};
return t !== null && Object.keys(t).forEach(function(n) {
t[n].forEach(function(r) {
e[String(r)] = n;
});
}), e;
}
function bD(t, e) {
if (e = e || {}, Object.keys(e).forEach(function(n) {
if (hD.indexOf(n) === -1) throw new wl('Unknown option "' + n + '" is met in definition of "' + t + '" YAML type.');
}), this.options = e, this.tag = t, this.kind = e.kind || null, this.resolve = e.resolve || function() {
return !0;
}, this.construct = e.construct || function(n) {
return n;
}, this.instanceOf = e.instanceOf || null, this.predicate = e.predicate || null, this.represent = e.represent || null, this.representName = e.representName || null, this.defaultStyle = e.defaultStyle || null, this.multi = e.multi || !1, this.styleAliases = gD(e.styleAliases || null), mD.indexOf(this.kind) === -1) throw new wl('Unknown kind "' + this.kind + '" is specified for "' + t + '" YAML type.');
}
var Ci = bD;
function sj(t, e) {
var n = [];
return t[e].forEach(function(r) {
var a = n.length;
n.forEach(function(i, s) {
i.tag === r.tag && i.kind === r.kind && i.multi === r.multi && (a = s);
}), n[a] = r;
}), n;
}
function vD() {
var t = { scalar: {}, sequence: {}, mapping: {}, fallback: {}, multi: { scalar: [], sequence: [], mapping: [], fallback: [] } }, e, n;
function r(a) {
a.multi ? (t.multi[a.kind].push(a), t.multi.fallback.push(a)) : t[a.kind][a.tag] = t.fallback[a.tag] = a;
}
for (e = 0, n = arguments.length; e < n; e += 1) arguments[e].forEach(r);
return t;
}
function Iw(t) {
return this.extend(t);
}
Iw.prototype.extend = function(t) {
var e = [], n = [];
if (t instanceof Ci) n.push(t);
else if (Array.isArray(t)) n = n.concat(t);
else if (t && (Array.isArray(t.implicit) || Array.isArray(t.explicit))) t.implicit && (e = e.concat(t.implicit)), t.explicit && (n = n.concat(t.explicit));
else throw new wl("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");
e.forEach(function(a) {
if (!(a instanceof Ci)) throw new wl("Specified list of YAML types (or a single Type object) contains a non-Type object.");
if (a.loadKind && a.loadKind !== "scalar") throw new wl("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");
if (a.multi) throw new wl("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.");
}), n.forEach(function(a) {
if (!(a instanceof Ci)) throw new wl("Specified list of YAML types (or a single Type object) contains a non-Type object.");
});
var r = Object.create(Iw.prototype);
return r.implicit = (this.implicit || []).concat(e), r.explicit = (this.explicit || []).concat(n), r.compiledImplicit = sj(r, "implicit"), r.compiledExplicit = sj(r, "explicit"), r.compiledTypeMap = vD(r.compiledImplicit, r.compiledExplicit), r;
};
var yD = Iw, _D = new Ci("tag:yaml.org,2002:str", { kind: "scalar", construct: function(t) {
return t !== null ? t : "";
} }), wD = new Ci("tag:yaml.org,2002:seq", { kind: "sequence", construct: function(t) {
return t !== null ? t : [];
} }), xD = new Ci("tag:yaml.org,2002:map", { kind: "mapping", construct: function(t) {
return t !== null ? t : {};
} }), kD = new yD({ explicit: [_D, wD, xD] });
function CD(t) {
if (t === null) return !0;
var e = t.length;
return e === 1 && t === "~" || e === 4 && (t === "null" || t === "Null" || t === "NULL");
}
function AD() {
return null;
}
function jD(t) {
return t === null;
}
var $D = new Ci("tag:yaml.org,2002:null", { kind: "scalar", resolve: CD, construct: AD, predicate: jD, represent: { canonical: function() {
return "~";
}, lowercase: function() {
return "null";
}, uppercase: function() {
return "NULL";
}, camelcase: function() {
return "Null";
}, empty: function() {
return "";
} }, defaultStyle: "lowercase" });
function SD(t) {
if (t === null) return !1;
var e = t.length;
return e === 4 && (t === "true" || t === "True" || t === "TRUE") || e === 5 && (t === "false" || t === "False" || t === "FALSE");
}
function ED(t) {
return t === "true" || t === "True" || t === "TRUE";
}
function ND(t) {
return Object.prototype.toString.call(t) === "[object Boolean]";
}
var OD = new Ci("tag:yaml.org,2002:bool", { kind: "scalar", resolve: SD, construct: ED, predicate: ND, represent: { lowercase: function(t) {
return t ? "true" : "false";
}, uppercase: function(t) {
return t ? "TRUE" : "FALSE";
}, camelcase: function(t) {
return t ? "True" : "False";
} }, defaultStyle: "lowercase" });
function TD(t) {
return 48 <= t && t <= 57 || 65 <= t && t <= 70 || 97 <= t && t <= 102;
}
function FD(t) {
return 48 <= t && t <= 55;
}
function PD(t) {
return 48 <= t && t <= 57;
}
function RD(t) {
if (t === null) return !1;
var e = t.length, n = 0, r = !1, a;
if (!e) return !1;
if (a = t[n], (a === "-" || a === "+") && (a = t[++n]), a === "0") {
if (n + 1 === e) return !0;
if (a = t[++n], a === "b") {
for (n++; n < e; n++) if (a = t[n], a !== "_") {
if (a !== "0" && a !== "1") return !1;
r = !0;
}
return r && a !== "_";
}
if (a === "x") {
for (n++; n < e; n++) if (a = t[n], a !== "_") {
if (!TD(t.charCodeAt(n))) return !1;
r = !0;
}
return r && a !== "_";
}
if (a === "o") {
for (n++; n < e; n++) if (a = t[n], a !== "_") {
if (!FD(t.charCodeAt(n))) return !1;
r = !0;
}
return r && a !== "_";
}
}
if (a === "_") return !1;
for (; n < e; n++) if (a = t[n], a !== "_") {
if (!PD(t.charCodeAt(n))) return !1;
r = !0;
}
return !(!r || a === "_");
}
function MD(t) {
var e = t, n = 1, r;
if (e.indexOf("_") !== -1 && (e = e.replace(/_/g, "")), r = e[0], (r === "-" || r === "+") && (r === "-" && (n = -1), e = e.slice(1), r = e[0]), e === "0") return 0;
if (r === "0") {
if (e[1] === "b") return n * parseInt(e.slice(2), 2);
if (e[1] === "x") return n * parseInt(e.slice(2), 16);
if (e[1] === "o") return n * parseInt(e.slice(2), 8);
}
return n * parseInt(e, 10);
}
function ID(t) {
return Object.prototype.toString.call(t) === "[object Number]" && t % 1 === 0 && !Fi.isNegativeZero(t);
}
var DD = new Ci("tag:yaml.org,2002:int", { kind: "scalar", resolve: RD, construct: MD, predicate: ID, represent: { binary: function(t) {
return t >= 0 ? "0b" + t.toString(2) : "-0b" + t.toString(2).slice(1);
}, octal: function(t) {
return t >= 0 ? "0o" + t.toString(8) : "-0o" + t.toString(8).slice(1);
}, decimal: function(t) {
return t.toString(10);
}, hexadecimal: function(t) {
return t >= 0 ? "0x" + t.toString(16).toUpperCase() : "-0x" + t.toString(16).toUpperCase().slice(1);
} }, defaultStyle: "decimal", styleAliases: { binary: [2, "bin"], octal: [8, "oct"], decimal: [10, "dec"], hexadecimal: [16, "hex"] } }), LD = new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");
function zD(t) {
return !(t === null || !LD.test(t) || t[t.length - 1] === "_");
}
function qD(t) {
var e, n;
return e = t.replace(/_/g, "").toLowerCase(), n = e[0] === "-" ? -1 : 1, "+-".indexOf(e[0]) >= 0 && (e = e.slice(1)), e === ".inf" ? n === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY : e === ".nan" ? NaN : n * parseFloat(e, 10);
}
var BD = /^[-+]?[0-9]+e/;
function UD(t, e) {
var n;
if (isNaN(t)) switch (e) {
case "lowercase":
return ".nan";
case "uppercase":
return ".NAN";
case "camelcase":
return ".NaN";
}
else if (Number.POSITIVE_INFINITY === t) switch (e) {
case "lowercase":
return ".inf";
case "uppercase":
return ".INF";
case "camelcase":
return ".Inf";
}
else if (Number.NEGATIVE_INFINITY === t) switch (e) {
case "lowercase":
return "-.inf";
case "uppercase":
return "-.INF";
case "camelcase":
return "-.Inf";
}
else if (Fi.isNegativeZero(t)) return "-0.0";
return n = t.toString(10), BD.test(n) ? n.replace("e", ".e") : n;
}
function VD(t) {
return Object.prototype.toString.call(t) === "[object Number]" && (t % 1 !== 0 || Fi.isNegativeZero(t));
}
var HD = new Ci("tag:yaml.org,2002:float", { kind: "scalar", resolve: zD, construct: qD, predicate: VD, represent: UD, defaultStyle: "lowercase" }), WD = kD.extend({ implicit: [$D, OD, DD, HD] }), GD = WD, KO = new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"), ZO = 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 KD(t) {
return t === null ? !1 : KO.exec(t) !== null || ZO.exec(t) !== null;
}
function ZD(t) {
var e, n, r, a, i, s, o, l = 0, c = null, u, p, f;
if (e = KO.exec(t), e === null && (e = ZO.exec(t)), e === null) throw new Error("Date resolve error");
if (n = +e[1], r = +e[2] - 1, a = +e[3], !e[4]) return new Date(Date.UTC(n, r, a));
if (i = +e[4], s = +e[5], o = +e[6], e[7]) {
for (l = e[7].slice(0, 3); l.length < 3; ) l += "0";
l = +l;
}
return e[9] && (u = +e[10], p = +(e[11] || 0), c = (u * 60 + p) * 6e4, e[9] === "-" && (c = -c)), f = new Date(Date.UTC(n, r, a, i, s, o, l)), c && f.setTime(f.getTime() - c), f;
}
function YD(t) {
return t.toISOString();
}
var XD = new Ci("tag:yaml.org,2002:timestamp", { kind: "scalar", resolve: KD, construct: ZD, instanceOf: Date, represent: YD });
function JD(t) {
return t === "<<" || t === null;
}
var QD = new Ci("tag:yaml.org,2002:merge", { kind: "scalar", resolve: JD }), d2 = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
\r`;
function eL(t) {
if (t === null) return !1;
var e, n, r = 0, a = t.length, i = d2;
for (n = 0; n < a; n++) if (e = i.indexOf(t.charAt(n)), !(e > 64)) {
if (e < 0) return !1;
r += 6;
}
return r % 8 === 0;
}
function tL(t) {
var e, n, r = t.replace(/[\r\n=]/g, ""), a = r.length, i = d2, s = 0, o = [];
for (e = 0; e < a; e++) e % 4 === 0 && e && (o.push(s >> 16 & 255), o.push(s >> 8 & 255), o.push(s & 255)), s = s << 6 | i.indexOf(r.charAt(e));
return n = a % 4 * 6, n === 0 ? (o.push(s >> 16 & 255), o.push(s >> 8 & 255), o.push(s & 255)) : n === 18 ? (o.push(s >> 10 & 255), o.push(s >> 2 & 255)) : n === 12 && o.push(s >> 4 & 255), new Uint8Array(o);
}
function nL(t) {
var e = "", n = 0, r, a, i = t.length, s = d2;
for (r = 0; r < i; r++) r % 3 === 0 && r && (e += s[n >> 18 & 63], e += s[n >> 12 & 63], e += s[n >> 6 & 63], e += s[n & 63]), n = (n << 8) + t[r];
return a = i % 3, a === 0 ? (e += s[n >> 18 & 63], e += s[n >> 12 & 63], e += s[n >> 6 & 63], e += s[n & 63]) : a === 2 ? (e += s[n >> 10 & 63], e += s[n >> 4 & 63], e += s[n << 2 & 63], e += s[64]) : a === 1 && (e += s[n >> 2 & 63], e += s[n << 4 & 63], e += s[64], e += s[64]), e;
}
function rL(t) {
return Object.prototype.toString.call(t) === "[object Uint8Array]";
}
var aL = new Ci("tag:yaml.org,2002:binary", { kind: "scalar", resolve: eL, construct: tL, predicate: rL, represent: nL }), iL = Object.prototype.hasOwnProperty, sL = Object.prototype.toString;
function oL(t) {
if (t === null) return !0;
var e = [], n, r, a, i, s, o = t;
for (n = 0, r = o.length; n < r; n += 1) {
if (a = o[n], s = !1, sL.call(a) !== "[object Object]") return !1;
for (i in a) if (iL.call(a, i)) if (!s) s = !0;
else return !1;
if (!s) return !1;
if (e.indexOf(i) === -1) e.push(i);
else return !1;
}
return !0;
}
function lL(t) {
return t !== null ? t : [];
}
var cL = new Ci("tag:yaml.org,2002:omap", { kind: "sequence", resolve: oL, construct: lL }), uL = Object.prototype.toString;
function pL(t) {
if (t === null) return !0;
var e, n, r, a, i, s = t;
for (i = new Array(s.length), e = 0, n = s.length; e < n; e += 1) {
if (r = s[e], uL.call(r) !== "[object Object]" || (a = Object.keys(r), a.length !== 1)) return !1;
i[e] = [a[0], r[a[0]]];
}
return !0;
}
function dL(t) {
if (t === null) return [];
var e, n, r, a, i, s = t;
for (i = new Array(s.length), e = 0, n = s.length; e < n; e += 1) r = s[e], a = Object.keys(r), i[e] = [a[0], r[a[0]]];
return i;
}
var fL = new Ci("tag:yaml.org,2002:pairs", { kind: "sequence", resolve: pL, construct: dL }), hL = Object.prototype.hasOwnProperty;
function mL(t) {
if (t === null) return !0;
var e, n = t;
for (e in n) if (hL.call(n, e) && n[e] !== null) return !1;
return !0;
}
function gL(t) {
return t !== null ? t : {};
}
var bL = new Ci("tag:yaml.org,2002:set", { kind: "mapping", resolve: mL, construct: gL }), vL = GD.extend({ implicit: [XD, QD], explicit: [aL, cL, fL, bL] }), Ic = Object.prototype.hasOwnProperty, yv = 1, YO = 2, XO = 3, _v = 4, I1 = 1, yL = 2, oj = 3, _L = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, wL = /[\x85\u2028\u2029]/, xL = /[,\[\]\{\}]/, JO = /^(?:!|!!|![a-z\-]+!)$/i, QO = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
function lj(t) {
return Object.prototype.toString.call(t);
}
function Bo(t) {
return t === 10 || t === 13;
}
function Mu(t) {
return t === 9 || t === 32;
}
function Ki(t) {
return t === 9 || t === 32 || t === 10 || t === 13;
}
function Up(t) {
return t === 44 || t === 91 || t === 93 || t === 123 || t === 125;
}
function kL(t) {
var e;
return 48 <= t && t <= 57 ? t - 48 : (e = t | 32, 97 <= e && e <= 102 ? e - 97 + 10 : -1);
}
function CL(t) {
return t === 120 ? 2 : t === 117 ? 4 : t === 85 ? 8 : 0;
}
function AL(t) {
return 48 <= t && t <= 57 ? t - 48 : -1;
}
function cj(t) {
return t === 48 ? "\0" : t === 97 ? "\x07" : t === 98 ? "\b" : t === 116 || t === 9 ? " " : t === 110 ? `
` : t === 118 ? "\v" : t === 102 ? "\f" : t === 114 ? "\r" : t === 101 ? "\x1B" : t === 32 ? " " : t === 34 ? '"' : t === 47 ? "/" : t === 92 ? "\\" : t === 78 ? "
" : t === 95 ? " " : t === 76 ? "\u2028" : t === 80 ? "\u2029" : "";
}
function jL(t) {
return t <= 65535 ? String.fromCharCode(t) : String.fromCharCode((t - 65536 >> 10) + 55296, (t - 65536 & 1023) + 56320);
}
for (var e6 = new Array(256), t6 = new Array(256), kp = 0; kp < 256; kp++) e6[kp] = cj(kp) ? 1 : 0, t6[kp] = cj(kp);
function $L(t, e) {
this.input = t, this.filename = e.filename || null, this.schema = e.schema || vL, this.onWarning = e.onWarning || null, this.legacy = e.legacy || !1, this.json = e.json || !1, this.listener = e.listener || null, this.implicitTypes = this.schema.compiledImplicit, this.typeMap = this.schema.compiledTypeMap, this.length = t.length, this.position = 0, this.line = 0, this.lineStart = 0, this.lineIndent = 0, this.firstTabInLine = -1, this.documents = [];
}
function n6(t, e) {
var n = { name: t.filename, buffer: t.input.slice(0, -1), position: t.position, line: t.line, column: t.position - t.lineStart };
return n.snippet = fD(n), new wl(e, n);
}
function Wt(t, e) {
throw n6(t, e);
}
function wv(t, e) {
t.onWarning && t.onWarning.call(null, n6(t, e));
}
var uj = { YAML: function(t, e, n) {
var r, a, i;
t.version !== null && Wt(t, "duplication of %YAML directive"), n.length !== 1 && Wt(t, "YAML directive accepts exactly one argument"), r = /^([0-9]+)\.([0-9]+)$/.exec(n[0]), r === null && Wt(t, "ill-formed argument of the YAML directive"), a = parseInt(r[1], 10), i = parseInt(r[2], 10), a !== 1 && Wt(t, "unacceptable YAML version of the document"), t.version = n[0], t.checkLineBreaks = i < 2, i !== 1 && i !== 2 && wv(t, "unsupported YAML version of the document");
}, TAG: function(t, e, n) {
var r, a;
n.length !== 2 && Wt(t, "TAG directive accepts exactly two arguments"), r = n[0], a = n[1], JO.test(r) || Wt(t, "ill-formed tag handle (first argument) of the TAG directive"), Ic.call(t.tagMap, r) && Wt(t, 'there is a previously declared suffix for "' + r + '" tag handle'), QO.test(a) || Wt(t, "ill-formed tag prefix (second argument) of the TAG directive");
try {
a = decodeURIComponent(a);
} catch {
Wt(t, "tag prefix is malformed: " + a);
}
t.tagMap[r] = a;
} };
function jc(t, e, n, r) {
var a, i, s, o;
if (e < n) {
if (o = t.input.slice(e, n), r) for (a = 0, i = o.length; a < i; a += 1) s = o.charCodeAt(a), s === 9 || 32 <= s && s <= 1114111 || Wt(t, "expected valid JSON character");
else _L.test(o) && Wt(t, "the stream contains non-printable characters");
t.result += o;
}
}
function pj(t, e, n, r) {
var a, i, s, o;
for (Fi.isObject(n) || Wt(t, "cannot merge mappings; the provided source object is unacceptable"), a = Object.keys(n), s = 0, o = a.length; s < o; s += 1) i = a[s], Ic.call(e, i) || (e[i] = n[i], r[i] = !0);
}
function Vp(t, e, n, r, a, i, s, o, l) {
var c, u;
if (Array.isArray(a)) for (a = Array.prototype.slice.call(a), c = 0, u = a.length; c < u; c += 1) Array.isArray(a[c]) && Wt(t, "nested arrays are not supported inside keys"), typeof a == "object" && lj(a[c]) === "[object Object]" && (a[c] = "[object Object]");
if (typeof a == "object" && lj(a) === "[object Object]" && (a = "[object Object]"), a = String(a), e === null && (e = {}), r === "tag:yaml.org,2002:merge") if (Array.isArray(i)) for (c = 0, u = i.length; c < u; c += 1) pj(t, e, i[c], n);
else pj(t, e, i, n);
else !t.json && !Ic.call(n, a) && Ic.call(e, a) && (t.line = s || t.line, t.lineStart = o || t.lineStart, t.position = l || t.position, Wt(t, "duplicated mapping key")), a === "__proto__" ? Object.defineProperty(e, a, { configurable: !0, enumerable: !0, writable: !0, value: i }) : e[a] = i, delete n[a];
return e;
}
function f2(t) {
var e;
e = t.input.charCodeAt(t.position), e === 10 ? t.position++ : e === 13 ? (t.position++, t.input.charCodeAt(t.position) === 10 && t.position++) : Wt(t, "a line break is expected"), t.line += 1, t.lineStart = t.position, t.firstTabInLine = -1;
}
function Da(t, e, n) {
for (var r = 0, a = t.input.charCodeAt(t.position); a !== 0; ) {
for (; Mu(a); ) a === 9 && t.firstTabInLine === -1 && (t.firstTabInLine = t.position), a = t.input.charCodeAt(++t.position);
if (e && a === 35) do
a = t.input.charCodeAt(++t.position);
while (a !== 10 && a !== 13 && a !== 0);
if (Bo(a)) for (f2(t), a = t.input.charCodeAt(t.position), r++, t.lineIndent = 0; a === 32; ) t.lineIndent++, a = t.input.charCodeAt(++t.position);
else break;
}
return n !== -1 && r !== 0 && t.lineIndent < n && wv(t, "deficient indentation"), r;
}
function iy(t) {
var e = t.position, n;
return n = t.input.charCodeAt(e), !!((n === 45 || n === 46) && n === t.input.charCodeAt(e + 1) && n === t.input.charCodeAt(e + 2) && (e += 3, n = t.input.charCodeAt(e), n === 0 || Ki(n)));
}
function h2(t, e) {
e === 1 ? t.result += " " : e > 1 && (t.result += Fi.repeat(`
`, e - 1));
}
function SL(t, e, n) {
var r, a, i, s, o, l, c, u, p = t.kind, f = t.result, h;
if (h = t.input.charCodeAt(t.position), Ki(h) || Up(h) || h === 35 || h === 38 || h === 42 || h === 33 || h === 124 || h === 62 || h === 39 || h === 34 || h === 37 || h === 64 || h === 96 || (h === 63 || h === 45) && (a = t.input.charCodeAt(t.position + 1), Ki(a) || n && Up(a))) return !1;
for (t.kind = "scalar", t.result = "", i = s = t.position, o = !1; h !== 0; ) {
if (h === 58) {
if (a = t.input.charCodeAt(t.position + 1), Ki(a) || n && Up(a)) break;
} else if (h === 35) {
if (r = t.input.charCodeAt(t.position - 1), Ki(r)) break;
} else {
if (t.position === t.lineStart && iy(t) || n && Up(h)) break;
if (Bo(h)) if (l = t.line, c = t.lineStart, u = t.lineIndent, Da(t, !1, -1), t.lineIndent >= e) {
o = !0, h = t.input.charCodeAt(t.position);
continue;
} else {
t.position = s, t.line = l, t.lineStart = c, t.lineIndent = u;
break;
}
}
o && (jc(t, i, s, !1), h2(t, t.line - l), i = s = t.position, o = !1), Mu(h) || (s = t.position + 1), h = t.input.charCodeAt(++t.position);
}
return jc(t, i, s, !1), t.result ? !0 : (t.kind = p, t.result = f, !1);
}
function EL(t, e) {
var n, r, a;
if (n = t.input.charCodeAt(t.position), n !== 39) return !1;
for (t.kind = "scalar", t.result = "", t.position++, r = a = t.position; (n = t.input.charCodeAt(t.position)) !== 0; ) if (n === 39) if (jc(t, r, t.position, !0), n = t.input.charCodeAt(++t.position), n === 39) r = t.position, t.position++, a = t.position;
else return !0;
else Bo(n) ? (jc(t, r, a, !0), h2(t, Da(t, !1, e)), r = a = t.position) : t.position === t.lineStart && iy(t) ? Wt(t, "unexpected end of the document within a single quoted scalar") : (t.position++, a = t.position);
Wt(t, "unexpected end of the stream within a single quoted scalar");
}
function NL(t, e) {
var n, r, a, i, s, o;
if (o = t.input.charCodeAt(t.position), o !== 34) return !1;
for (t.kind = "scalar", t.result = "", t.position++, n = r = t.position; (o = t.input.charCodeAt(t.position)) !== 0; ) {
if (o === 34) return jc(t, n, t.position, !0), t.position++, !0;
if (o === 92) {
if (jc(t, n, t.position, !0), o = t.input.charCodeAt(++t.position), Bo(o)) Da(t, !1, e);
else if (o < 256 && e6[o]) t.result += t6[o], t.position++;
else if ((s = CL(o)) > 0) {
for (a = s, i = 0; a > 0; a--) o = t.input.charCodeAt(++t.position), (s = kL(o)) >= 0 ? i = (i << 4) + s : Wt(t, "expected hexadecimal character");
t.result += jL(i), t.position++;
} else Wt(t, "unknown escape sequence");
n = r = t.position;
} else Bo(o) ? (jc(t, n, r, !0), h2(t, Da(t, !1, e)), n = r = t.position) : t.position === t.lineStart && iy(t) ? Wt(t, "unexpected end of the document within a double quoted scalar") : (t.position++, r = t.position);
}
Wt(t, "unexpected end of the stream within a double quoted scalar");
}
function OL(t, e) {
var n = !0, r, a, i, s = t.tag, o, l = t.anchor, c, u, p, f, h, m = /* @__PURE__ */ Object.create(null), v, g, b, y;
if (y = t.input.charCodeAt(t.position), y === 91) u = 93, h = !1, o = [];
else if (y === 123) u = 125, h = !0, o = {};
else return !1;
for (t.anchor !== null && (t.anchorMap[t.anchor] = o), y = t.input.charCodeAt(++t.position); y !== 0; ) {
if (Da(t, !0, e), y = t.input.charCodeAt(t.position), y === u) return t.position++, t.tag = s, t.anchor = l, t.kind = h ? "mapping" : "sequence", t.result = o, !0;
n ? y === 44 && Wt(t, "expected the node content, but found ','") : Wt(t, "missed comma between flow collection entries"), g = v = b = null, p = f = !1, y === 63 && (c = t.input.charCodeAt(t.position + 1), Ki(c) && (p = f = !0, t.position++, Da(t, !0, e))), r = t.line, a = t.lineStart, i = t.position, Cd(t, e, yv, !1, !0), g = t.tag, v = t.result, Da(t, !0, e), y = t.input.charCodeAt(t.position), (f || t.line === r) && y === 58 && (p = !0, y = t.input.charCodeAt(++t.position), Da(t, !0, e), Cd(t, e, yv, !1, !0), b = t.result), h ? Vp(t, o, m, g, v, b, r, a, i) : p ? o.push(Vp(t, null, m, g, v, b, r, a, i)) : o.push(v), Da(t, !0, e), y = t.input.charCodeAt(t.position), y === 44 ? (n = !0, y = t.input.charCodeAt(++t.position)) : n = !1;
}
Wt(t, "unexpected end of the stream within a flow collection");
}
function TL(t, e) {
var n, r, a = I1, i = !1, s = !1, o = e, l = 0, c = !1, u, p;
if (p = t.input.charCodeAt(t.position), p === 124) r = !1;
else if (p === 62) r = !0;
else return !1;
for (t.kind = "scalar", t.result = ""; p !== 0; ) if (p = t.input.charCodeAt(++t.position), p === 43 || p === 45) I1 === a ? a = p === 43 ? oj : yL : Wt(t, "repeat of a chomping mode identifier");
else if ((u = AL(p)) >= 0) u === 0 ? Wt(t, "bad explicit indentation width of a block scalar; it cannot be less than one") : s ? Wt(t, "repeat of an indentation width identifier") : (o = e + u - 1, s = !0);
else break;
if (Mu(p)) {
do
p = t.input.charCodeAt(++t.position);
while (Mu(p));
if (p === 35) do
p = t.input.charCodeAt(++t.position);
while (!Bo(p) && p !== 0);
}
for (; p !== 0; ) {
for (f2(t), t.lineIndent = 0, p = t.input.charCodeAt(t.position); (!s || t.lineIndent < o) && p === 32; ) t.lineIndent++, p = t.input.charCodeAt(++t.position);
if (!s && t.lineIndent > o && (o = t.lineIndent), Bo(p)) {
l++;
continue;
}
if (t.lineIndent < o) {
a === oj ? t.result += Fi.repeat(`
`, i ? 1 + l : l) : a === I1 && i && (t.result += `
`);
break;
}
for (r ? Mu(p) ? (c = !0, t.result += Fi.repeat(`
`, i ? 1 + l : l)) : c ? (c = !1, t.result += Fi.repeat(`
`, l + 1)) : l === 0 ? i && (t.result += " ") : t.result += Fi.repeat(`
`, l) : t.result += Fi.repeat(`
`, i ? 1 + l : l), i = !0, s = !0, l = 0, n = t.position; !Bo(p) && p !== 0; ) p = t.input.charCodeAt(++t.position);
jc(t, n, t.position, !1);
}
return !0;
}
function dj(t, e) {
var n, r = t.tag, a = t.anchor, i = [], s, o = !1, l;
if (t.firstTabInLine !== -1) return !1;
for (t.anchor !== null && (t.anchorMap[t.anchor] = i), l = t.input.charCodeAt(t.position); l !== 0 && (t.firstTabInLine !== -1 && (t.position = t.firstTabInLine, Wt(t, "tab characters must not be used in indentation")), !(l !== 45 || (s = t.input.charCodeAt(t.position + 1), !Ki(s)))); ) {
if (o = !0, t.position++, Da(t, !0, -1) && t.lineIndent <= e) {
i.push(null), l = t.input.charCodeAt(t.position);
continue;
}
if (n = t.line, Cd(t, e, XO, !1, !0), i.push(t.result), Da(t, !0, -1), l = t.input.charCodeAt(t.position), (t.line === n || t.lineIndent > e) && l !== 0) Wt(t, "bad indentation of a sequence entry");
else if (t.lineIndent < e) break;
}
return o ? (t.tag = r, t.anchor = a, t.kind = "sequence", t.result = i, !0) : !1;
}
function FL(t, e, n) {
var r, a, i, s, o, l, c = t.tag, u = t.anchor, p = {}, f = /* @__PURE__ */ Object.create(null), h = null, m = null, v = null, g = !1, b = !1, y;
if (t.firstTabInLine !== -1) return !1;
for (t.anchor !== null && (t.anchorMap[t.anchor] = p), y = t.input.charCodeAt(t.position); y !== 0; ) {
if (!g && t.firstTabInLine !== -1 && (t.position = t.firstTabInLine, Wt(t, "tab characters must not be used in indentation")), r = t.input.charCodeAt(t.position + 1), i = t.line, (y === 63 || y === 58) && Ki(r)) y === 63 ? (g && (Vp(t, p, f, h, m, null, s, o, l), h = m = v = null), b = !0, g = !0, a = !0) : g ? (g = !1, a = !0) : Wt(t, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"), t.position += 1, y = r;
else {
if (s = t.line, o = t.lineStart, l = t.position, !Cd(t, n, YO, !1, !0)) break;
if (t.line === i) {
for (y = t.input.charCodeAt(t.position); Mu(y); ) y = t.input.charCodeAt(++t.position);
if (y === 58) y = t.input.charCodeAt(++t.position), Ki(y) || Wt(t, "a whitespace character is expected after the key-value separator within a block mapping"), g && (Vp(t, p, f, h, m, null, s, o, l), h = m = v = null), b = !0, g = !1, a = !1, h = t.tag, m = t.result;
else if (b) Wt(t, "can not read an implicit mapping pair; a colon is missed");
else return t.tag = c, t.anchor = u, !0;
} else if (b) Wt(t, "can not read a block mapping entry; a multiline key may not be an implicit key");
else return t.tag = c, t.anchor = u, !0;
}
if ((t.line === i || t.lineIndent > e) && (g && (s = t.line, o = t.lineStart, l = t.position), Cd(t, e, _v, !0, a) && (g ? m = t.result : v = t.result), g || (Vp(t, p, f, h, m, v, s, o, l), h = m = v = null), Da(t, !0, -1), y = t.input.charCodeAt(t.position)), (t.line === i || t.lineIndent > e) && y !== 0) Wt(t, "bad indentation of a mapping entry");
else if (t.lineIndent < e) break;
}
return g && Vp(t, p, f, h, m, null, s, o, l), b && (t.tag = c, t.anchor = u, t.kind = "mapping", t.result = p), b;
}
function PL(t) {
var e, n = !1, r = !1, a, i, s;
if (s = t.input.charCodeAt(t.position), s !== 33) return !1;
if (t.tag !== null && Wt(t, "duplication of a tag property"), s = t.input.charCodeAt(++t.position), s === 60 ? (n = !0, s = t.input.charCodeAt(++t.position)) : s === 33 ? (r = !0, a = "!!", s = t.input.charCodeAt(++t.position)) : a = "!", e = t.position, n) {
do
s = t.input.charCodeAt(++t.position);
while (s !== 0 && s !== 62);
t.position < t.length ? (i = t.input.slice(e, t.position), s = t.input.charCodeAt(++t.position)) : Wt(t, "unexpected end of the stream within a verbatim tag");
} else {
for (; s !== 0 && !Ki(s); ) s === 33 && (r ? Wt(t, "tag suffix cannot contain exclamation marks") : (a = t.input.slice(e - 1, t.position + 1), JO.test(a) || Wt(t, "named tag handle cannot contain such characters"), r = !0, e = t.position + 1)), s = t.input.charCodeAt(++t.position);
i = t.input.slice(e, t.position), xL.test(i) && Wt(t, "tag suffix cannot contain flow indicator characters");
}
i && !QO.test(i) && Wt(t, "tag name cannot contain such characters: " + i);
try {
i = decodeURIComponent(i);
} catch {
Wt(t, "tag name is malformed: " + i);
}
return n ? t.tag = i : Ic.call(t.tagMap, a) ? t.tag = t.tagMap[a] + i : a === "!" ? t.tag = "!" + i : a === "!!" ? t.tag = "tag:yaml.org,2002:" + i : Wt(t, 'undeclared tag handle "' + a + '"'), !0;
}
function RL(t) {
var e, n;
if (n = t.input.charCodeAt(t.position), n !== 38) return !1;
for (t.anchor !== null && Wt(t, "duplication of an anchor property"), n = t.input.charCodeAt(++t.position), e = t.position; n !== 0 && !Ki(n) && !Up(n); ) n = t.input.charCodeAt(++t.position);
return t.position === e && Wt(t, "name of an anchor node must contain at least one character"), t.anchor = t.input.slice(e, t.position), !0;
}
function ML(t) {
var e, n, r;
if (r = t.input.charCodeAt(t.position), r !== 42) return !1;
for (r = t.input.charCodeAt(++t.position), e = t.position; r !== 0 && !Ki(r) && !Up(r); ) r = t.input.charCodeAt(++t.position);
return t.position === e && Wt(t, "name of an alias node must contain at least one character"), n = t.input.slice(e, t.position), Ic.call(t.anchorMap, n) || Wt(t, 'unidentified alias "' + n + '"'), t.result = t.anchorMap[n], Da(t, !0, -1), !0;
}
function Cd(t, e, n, r, a) {
var i, s, o, l = 1, c = !1, u = !1, p, f, h, m, v, g;
if (t.listener !== null && t.listener("open", t), t.tag = null, t.anchor = null, t.kind = null, t.result = null, i = s = o = _v === n || XO === n, r && Da(t, !0, -1) && (c = !0, t.lineIndent > e ? l = 1 : t.lineIndent === e ? l = 0 : t.lineIndent < e && (l = -1)), l === 1) for (; PL(t) || RL(t); ) Da(t, !0, -1) ? (c = !0, o = i, t.lineIndent > e ? l = 1 : t.lineIndent === e ? l = 0 : t.lineIndent < e && (l = -1)) : o = !1;
if (o && (o = c || a), (l === 1 || _v === n) && (yv === n || YO === n ? v = e : v = e + 1, g = t.position - t.lineStart, l === 1 ? o && (dj(t, g) || FL(t, g, v)) || OL(t, v) ? u = !0 : (s && TL(t, v) || EL(t, v) || NL(t, v) ? u = !0 : ML(t) ? (u = !0, (t.tag !== null || t.anchor !== null) && Wt(t, "alias node should not have any properties")) : SL(t, v, yv === n) && (u = !0, t.tag === null && (t.tag = "?")), t.anchor !== null && (t.anchorMap[t.anchor] = t.result)) : l === 0 && (u = o && dj(t, g))), t.tag === null) t.anchor !== null && (t.anchorMap[t.anchor] = t.result);
else if (t.tag === "?") {
for (t.result !== null && t.kind !== "scalar" && Wt(t, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + t.kind + '"'), p = 0, f = t.implicitTypes.length; p < f; p += 1) if (m = t.implicitTypes[p], m.resolve(t.result)) {
t.result = m.construct(t.result), t.tag = m.tag, t.anchor !== null && (t.anchorMap[t.anchor] = t.result);
break;
}
} else if (t.tag !== "!") {
if (Ic.call(t.typeMap[t.kind || "fallback"], t.tag)) m = t.typeMap[t.kind || "fallback"][t.tag];
else for (m = null, h = t.typeMap.multi[t.kind || "fallback"], p = 0, f = h.length; p < f; p += 1) if (t.tag.slice(0, h[p].tag.length) === h[p].tag) {
m = h[p];
break;
}
m || Wt(t, "unknown tag !<" + t.tag + ">"), t.result !== null && m.kind !== t.kind && Wt(t, "unacceptable node kind for !<" + t.tag + '> tag; it should be "' + m.kind + '", not "' + t.kind + '"'), m.resolve(t.result, t.tag) ? (t.result = m.construct(t.result, t.tag), t.anchor !== null && (t.anchorMap[t.anchor] = t.result)) : Wt(t, "cannot resolve a node with !<" + t.tag + "> explicit tag");
}
return t.listener !== null && t.listener("close", t), t.tag !== null || t.anchor !== null || u;
}
function IL(t) {
var e = t.position, n, r, a, i = !1, s;
for (t.version = null, t.checkLineBreaks = t.legacy, t.tagMap = /* @__PURE__ */ Object.create(null), t.anchorMap = /* @__PURE__ */ Object.create(null); (s = t.input.charCodeAt(t.position)) !== 0 && (Da(t, !0, -1), s = t.input.charCodeAt(t.position), !(t.lineIndent > 0 || s !== 37)); ) {
for (i = !0, s = t.input.charCodeAt(++t.position), n = t.position; s !== 0 && !Ki(s); ) s = t.input.charCodeAt(++t.position);
for (r = t.input.slice(n, t.position), a = [], r.length < 1 && Wt(t, "directive name must not be less than one character in length"); s !== 0; ) {
for (; Mu(s); ) s = t.input.charCodeAt(++t.position);
if (s === 35) {
do
s = t.input.charCodeAt(++t.position);
while (s !== 0 && !Bo(s));
break;
}
if (Bo(s)) break;
for (n = t.position; s !== 0 && !Ki(s); ) s = t.input.charCodeAt(++t.position);
a.push(t.input.slice(n, t.position));
}
s !== 0 && f2(t), Ic.call(uj, r) ? uj[r](t, r, a) : wv(t, 'unknown document directive "' + r + '"');
}
if (Da(t, !0, -1), t.lineIndent === 0 && t.input.charCodeAt(t.position) === 45 && t.input.charCodeAt(t.position + 1) === 45 && t.input.charCodeAt(t.position + 2) === 45 ? (t.position += 3, Da(t, !0, -1)) : i && Wt(t, "directives end mark is expected"), Cd(t, t.lineIndent - 1, _v, !1, !0), Da(t, !0, -1), t.checkLineBreaks && wL.test(t.input.slice(e, t.position)) && wv(t, "non-ASCII line breaks are interpreted as content"), t.documents.push(t.result), t.position === t.lineStart && iy(t)) {
t.input.charCodeAt(t.position) === 46 && (t.position += 3, Da(t, !0, -1));
return;
}
if (t.position < t.length - 1) Wt(t, "end of the stream or a document separator is expected");
else return;
}
function r6(t, e) {
t = String(t), e = e || {}, t.length !== 0 && (t.charCodeAt(t.length - 1) !== 10 && t.charCodeAt(t.length - 1) !== 13 && (t += `
`), t.charCodeAt(0) === 65279 && (t = t.slice(1)));
var n = new $L(t, e), r = t.indexOf("\0");
for (r !== -1 && (n.position = r, Wt(n, "null byte is not allowed in input")), n.input += "\0"; n.input.charCodeAt(n.position) === 32; ) n.lineIndent += 1, n.position += 1;
for (; n.position < n.length - 1; ) IL(n);
return n.documents;
}
function DL(t, e, n) {
e !== null && typeof e == "object" && typeof n > "u" && (n = e, e = null);
var r = r6(t, n);
if (typeof e != "function") return r;
for (var a = 0, i = r.length; a < i; a += 1) e(r[a]);
}
function LL(t, e) {
var n = r6(t, e);
if (n.length !== 0) {
if (n.length === 1) return n[0];
throw new wl("expected a single document in the stream, but found more");
}
}
var zL = DL, qL = LL, BL = { loadAll: zL, load: qL }, UL = BL.load;
function VL(t, e) {
const n = UL(t, e);
return eD(t, n, e), n;
}
const HL = /* @__PURE__ */ lt({
__name: "OAContextAsync",
props: {
spec: {
type: Object,
required: !1
},
specUrl: {
type: String,
required: !1
}
},
emits: ["update:spec"],
async setup(t, { emit: e }) {
let n, r;
const a = t, i = e, s = a.spec || ([n, r] = aj(() => l(a.specUrl)), n = await n, r(), n);
i("update:spec", s);
const o = Wb({
spec: ([n, r] = aj(() => Pw().parseAsync({ spec: s })), n = await n, r(), n)
});
async function l(c) {
var p;
if (!c)
return null;
const u = await fetch(c);
if (!u.ok)
throw new Error(`Failed to fetch ${c}: ${u.status} ${u.statusText}`);
return (p = u.headers.get("content-type")) != null && p.toLowerCase().includes("yaml") || c.endsWith(".yaml") || c.endsWith(".yml") ? VL(await u.text()) : u.json();
}
return (c, u) => (I(), Ne(HO, { openapi: N(o) }, {
default: de(({ openapi: p }) => [
Ke(c.$slots, "default", { openapi: p })
]),
_: 3
}, 8, ["openapi"]));
}
}), WL = { key: 2 }, lp = {
__name: "OAContextProvider",
props: {
spec: {
type: Object,
required: !1,
default: null
},
specUrl: {
type: String,
required: !1,
default: null
}
},
emits: ["update:spec"],
setup(t, { emit: e }) {
const n = t, r = e, a = WI();
return (i, s) => n.spec || n.specUrl ? (I(), Ne(AI, { key: 0 }, {
fallback: de(() => [
Ee(VO)
]),
default: de(() => [
Ee(HL, {
spec: n.spec,
"spec-url": n.specUrl,
"onUpdate:spec": s[0] || (s[0] = (o) => r("update:spec", o))
}, {
default: de(({ openapi: o }) => [
Ke(i.$slots, "default", { openapi: o })
]),
_: 3
}, 8, ["spec", "spec-url"])
]),
_: 3
})) : N(a) ? (I(), Ne(HO, {
key: 1,
openapi: N(a)
}, {
default: de(({ openapi: o }) => [
Ke(i.$slots, "default", { openapi: o })
]),
_: 3
}, 8, ["openapi"])) : (I(), ye("div", WL, s[1] || (s[1] = [
Te("p", null, "OpenAPI instance not found", -1)
])));
}
};
function m2(t) {
if (typeof t != "string")
throw new TypeError("Expected a string");
return t.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
}
const GL = [
// German umlauts
["ß", "ss"],
["ẞ", "Ss"],
["ä", "ae"],
["Ä", "Ae"],
["ö", "oe"],
["Ö", "Oe"],
["ü", "ue"],
["Ü", "Ue"],
// Latin
["À", "A"],
["Á", "A"],
["Â", "A"],
["Ã", "A"],
["Ä", "Ae"],
["Å", "A"],
["Æ", "AE"],
["Ç", "C"],
["È", "E"],
["É", "E"],
["Ê", "E"],
["Ë", "E"],
["Ì", "I"],
["Í", "I"],
["Î", "I"],
["Ï", "I"],
["Ð", "D"],
["Ñ", "N"],
["Ò", "O"],
["Ó", "O"],
["Ô", "O"],
["Õ", "O"],
["Ö", "Oe"],
["Ő", "O"],
["Ø", "O"],
["Ù", "U"],
["Ú", "U"],
["Û", "U"],
["Ü", "Ue"],
["Ű", "U"],
["Ý", "Y"],
["Þ", "TH"],
["ß", "ss"],
["à", "a"],
["á", "a"],
["â", "a"],
["ã", "a"],
["ä", "ae"],
["å", "a"],
["æ", "ae"],
["ç", "c"],
["è", "e"],
["é", "e"],
["ê", "e"],
["ë", "e"],
["ì", "i"],
["í", "i"],
["î", "i"],
["ï", "i"],
["ð", "d"],
["ñ", "n"],
["ò", "o"],
["ó", "o"],
["ô", "o"],
["õ", "o"],
["ö", "oe"],
["ő", "o"],
["ø", "o"],
["ù", "u"],
["ú", "u"],
["û", "u"],
["ü", "ue"],
["ű", "u"],
["ý", "y"],
["þ", "th"],
["ÿ", "y"],
["ẞ", "SS"],
// Vietnamese
["à", "a"],
["À", "A"],
["á", "a"],
["Á", "A"],
["â", "a"],
["Â", "A"],
["ã", "a"],
["Ã", "A"],
["è", "e"],
["È", "E"],
["é", "e"],
["É", "E"],
["ê", "e"],
["Ê", "E"],
["ì", "i"],
["Ì", "I"],
["í", "i"],
["Í", "I"],
["ò", "o"],
["Ò", "O"],
["ó", "o"],
["Ó", "O"],
["ô", "o"],
["Ô", "O"],
["õ",