@oiij/naive-ui
Version:
Som Composable Functions And Components for Vue 3
1,138 lines (1,137 loc) • 328 kB
JavaScript
import { inject as Rr, onBeforeMount as Io, defineComponent as de, createBlock as N, openBlock as P, Transition as Bo, mergeProps as X, unref as E, withCtx as O, renderSlot as z, ref as U, toValue as $e, isRef as Qt, isReactive as zo, watchEffect as Ie, watch as uu, computed as K, nextTick as Or, normalizeClass as $u, createElementVNode as tu, normalizeStyle as an, createVNode as V, createCommentVNode as Y, resolveDynamicComponent as Ce, Teleport as Uo, normalizeProps as ke, guardReactiveProps as Ke, createSlots as Mr, onMounted as qo, createElementBlock as me, createTextVNode as lu, toDisplayString as je, onScopeDispose as ln, onUnmounted as jo, reactive as pu, toRefs as Ho, useTemplateRef as mt, Fragment as Ne, h as De, renderList as vu, toRaw as be, withModifiers as Go, mergeModels as Vo, useModel as Wo } from "vue";
import { NEl as sn, NAvatar as Zo, NFlex as eu, NSpin as Lr, cM as Hn, NConfigProvider as Yo, NLoadingBarProvider as Xo, NDialogProvider as Qo, NModalProvider as Jo, NNotificationProvider as Ko, NMessageProvider as ei, NGlobalStyle as ui, useDialog as ti, useLoadingBar as ni, useMessage as ri, useModal as oi, useNotification as ii, NTooltip as cn, NButton as Ve, NInputGroup as ai, NInput as fn, NFormItem as li, NTimePicker as si, NSwitch as ci, NSlider as fi, NSelect as Nr, NRate as di, NRadioGroup as pi, NInputNumber as hi, NDynamicTags as bi, NDatePicker as mi, NDivider as dn, NCheckboxGroup as gi, NColorPicker as ki, NCheckbox as xi, NRadio as vi, NGrid as Jt, NGi as Kt, NBadge as $r, NCollapseTransition as Ir, NDataTable as yi, NPagination as Br, NModal as zr, NForm as _i, NButtonGroup as Ei } from "naive-ui";
import { createEventHook as it, useClipboard as Ai, useTimeoutFn as wi, useDebounceFn as Ur } from "@vueuse/core";
function Ci(e) {
let u = ".", t = "__", n = "--", r;
if (e) {
let d = e.blockPrefix;
d && (u = d), d = e.elementPrefix, d && (t = d), d = e.modifierPrefix, d && (n = d);
}
const o = {
install(d) {
r = d.c;
const _ = d.context;
_.bem = {}, _.bem.b = null, _.bem.els = null;
}
};
function a(d) {
let _, w;
return {
before(A) {
_ = A.bem.b, w = A.bem.els, A.bem.els = null;
},
after(A) {
A.bem.b = _, A.bem.els = w;
},
$({ context: A, props: h }) {
return d = typeof d == "string" ? d : d({ context: A, props: h }), A.bem.b = d, `${h?.bPrefix || u}${A.bem.b}`;
}
};
}
function i(d) {
let _;
return {
before(w) {
_ = w.bem.els;
},
after(w) {
w.bem.els = _;
},
$({ context: w, props: A }) {
return d = typeof d == "string" ? d : d({ context: w, props: A }), w.bem.els = d.split(",").map((h) => h.trim()), w.bem.els.map((h) => `${A?.bPrefix || u}${w.bem.b}${t}${h}`).join(", ");
}
};
}
function l(d) {
return {
$({ context: _, props: w }) {
d = typeof d == "string" ? d : d({ context: _, props: w });
const A = d.split(",").map((g) => g.trim());
function h(g) {
return A.map((p) => `&${w?.bPrefix || u}${_.bem.b}${g !== void 0 ? `${t}${g}` : ""}${n}${p}`).join(", ");
}
const m = _.bem.els;
if (m !== null) {
if (process.env.NODE_ENV !== "production" && m.length >= 2)
throw Error(`[css-render/plugin-bem]: m(${d}) is invalid, using modifier inside multiple elements is not allowed`);
return h(m[0]);
} else
return h();
}
};
}
function s(d) {
return {
$({ context: _, props: w }) {
d = typeof d == "string" ? d : d({ context: _, props: w });
const A = _.bem.els;
if (process.env.NODE_ENV !== "production" && A !== null && A.length >= 2)
throw Error(`[css-render/plugin-bem]: notM(${d}) is invalid, using modifier inside multiple elements is not allowed`);
return `&:not(${w?.bPrefix || u}${_.bem.b}${A !== null && A.length > 0 ? `${t}${A[0]}` : ""}${n}${d})`;
}
};
}
return Object.assign(o, {
cB: ((...d) => r(a(d[0]), d[1], d[2])),
cE: ((...d) => r(i(d[0]), d[1], d[2])),
cM: ((...d) => r(l(d[0]), d[1], d[2])),
cNotM: ((...d) => r(s(d[0]), d[1], d[2]))
}), o;
}
function Di(e) {
let u = 0;
for (let t = 0; t < e.length; ++t)
e[t] === "&" && ++u;
return u;
}
const qr = /\s*,(?![^(]*\))\s*/g, Fi = /\s+/g;
function Si(e, u) {
const t = [];
return u.split(qr).forEach((n) => {
let r = Di(n);
if (r) {
if (r === 1) {
e.forEach((a) => {
t.push(n.replace("&", a));
});
return;
}
} else {
e.forEach((a) => {
t.push(
// eslint-disable-next-line @typescript-eslint/strict-boolean-expressions
(a && a + " ") + n
);
});
return;
}
let o = [
n
];
for (; r--; ) {
const a = [];
o.forEach((i) => {
e.forEach((l) => {
a.push(i.replace("&", l));
});
}), o = a;
}
o.forEach((a) => t.push(a));
}), t;
}
function Ti(e, u) {
const t = [];
return u.split(qr).forEach((n) => {
e.forEach((r) => {
t.push((r && r + " ") + n);
});
}), t;
}
function Pi(e) {
let u = [""];
return e.forEach((t) => {
t = t && t.trim(), // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions
t && (t.includes("&") ? u = Si(u, t) : u = Ti(u, t));
}), u.join(", ").replace(Fi, " ");
}
function Gn(e) {
if (!e)
return;
const u = e.parentElement;
u && u.removeChild(e);
}
function pn(e, u) {
return (u ?? document.head).querySelector(`style[cssr-id="${e}"]`);
}
function Ri(e) {
const u = document.createElement("style");
return u.setAttribute("cssr-id", e), u;
}
function Xu(e) {
return e ? /^\s*@(s|m)/.test(e) : !1;
}
const Oi = /[A-Z]/g;
function jr(e) {
return e.replace(Oi, (u) => "-" + u.toLowerCase());
}
function Mi(e, u = " ") {
return typeof e == "object" && e !== null ? ` {
` + Object.entries(e).map((t) => u + ` ${jr(t[0])}: ${t[1]};`).join(`
`) + `
` + u + "}" : `: ${e};`;
}
function Li(e, u, t) {
return typeof e == "function" ? e({
context: u.context,
props: t
}) : e;
}
function Vn(e, u, t, n) {
if (!u)
return "";
const r = Li(u, t, n);
if (!r)
return "";
if (typeof r == "string")
return `${e} {
${r}
}`;
const o = Object.keys(r);
if (o.length === 0)
return t.config.keepEmptyBlock ? e + ` {
}` : "";
const a = e ? [
e + " {"
] : [];
return o.forEach((i) => {
const l = r[i];
if (i === "raw") {
a.push(`
` + l + `
`);
return;
}
i = jr(i), l != null && a.push(` ${i}${Mi(l)}`);
}), e && a.push("}"), a.join(`
`);
}
function en(e, u, t) {
e && e.forEach((n) => {
if (Array.isArray(n))
en(n, u, t);
else if (typeof n == "function") {
const r = n(u);
Array.isArray(r) ? en(r, u, t) : r && t(r);
} else n && t(n);
});
}
function Hr(e, u, t, n, r) {
const o = e.$;
let a = "";
if (!o || typeof o == "string")
Xu(o) ? a = o : u.push(o);
else if (typeof o == "function") {
const s = o({
context: n.context,
props: r
});
Xu(s) ? a = s : u.push(s);
} else if (o.before && o.before(n.context), !o.$ || typeof o.$ == "string")
Xu(o.$) ? a = o.$ : u.push(o.$);
else if (o.$) {
const s = o.$({
context: n.context,
props: r
});
Xu(s) ? a = s : u.push(s);
}
const i = Pi(u), l = Vn(i, e.props, n, r);
a ? t.push(`${a} {`) : l.length && t.push(l), e.children && en(e.children, {
context: n.context,
props: r
}, (s) => {
if (typeof s == "string") {
const c = Vn(i, { raw: s }, n, r);
t.push(c);
} else
Hr(s, u, t, n, r);
}), u.pop(), a && t.push("}"), o && o.after && o.after(n.context);
}
function Ni(e, u, t) {
const n = [];
return Hr(e, [], n, u, t), n.join(`
`);
}
function $i(e) {
for (var u = 0, t, n = 0, r = e.length; r >= 4; ++n, r -= 4)
t = e.charCodeAt(n) & 255 | (e.charCodeAt(++n) & 255) << 8 | (e.charCodeAt(++n) & 255) << 16 | (e.charCodeAt(++n) & 255) << 24, t = /* Math.imul(k, m): */
(t & 65535) * 1540483477 + ((t >>> 16) * 59797 << 16), t ^= /* k >>> r: */
t >>> 24, u = /* Math.imul(k, m): */
(t & 65535) * 1540483477 + ((t >>> 16) * 59797 << 16) ^ /* Math.imul(h, m): */
(u & 65535) * 1540483477 + ((u >>> 16) * 59797 << 16);
switch (r) {
case 3:
u ^= (e.charCodeAt(n + 2) & 255) << 16;
case 2:
u ^= (e.charCodeAt(n + 1) & 255) << 8;
case 1:
u ^= e.charCodeAt(n) & 255, u = /* Math.imul(h, m): */
(u & 65535) * 1540483477 + ((u >>> 16) * 59797 << 16);
}
return u ^= u >>> 13, u = /* Math.imul(h, m): */
(u & 65535) * 1540483477 + ((u >>> 16) * 59797 << 16), ((u ^ u >>> 15) >>> 0).toString(36);
}
typeof window < "u" && (window.__cssrContext = {});
function Ii(e, u, t, n) {
const { els: r } = u;
if (t === void 0)
r.forEach(Gn), u.els = [];
else {
const o = pn(t, n);
o && r.includes(o) && (Gn(o), u.els = r.filter((a) => a !== o));
}
}
function Wn(e, u) {
e.push(u);
}
function Bi(e, u, t, n, r, o, a, i, l) {
let s;
if (t === void 0 && (s = u.render(n), t = $i(s)), l) {
l.adapter(t, s ?? u.render(n));
return;
}
i === void 0 && (i = document.head);
const c = pn(t, i);
if (c !== null && !o)
return c;
const f = c ?? Ri(t);
if (s === void 0 && (s = u.render(n)), f.textContent = s, c !== null)
return c;
if (a) {
const v = i.querySelector(`meta[name="${a}"]`);
if (v)
return i.insertBefore(f, v), Wn(u.els, f), f;
}
return r ? i.insertBefore(f, i.querySelector("style, link")) : i.appendChild(f), Wn(u.els, f), f;
}
function zi(e) {
return Ni(this, this.instance, e);
}
function Ui(e = {}) {
const { id: u, ssr: t, props: n, head: r = !1, force: o = !1, anchorMetaName: a, parent: i } = e;
return Bi(this.instance, this, u, n, r, o, a, i, t);
}
function qi(e = {}) {
const { id: u, parent: t } = e;
Ii(this.instance, this, u, t);
}
const Qu = function(e, u, t, n) {
return {
instance: e,
$: u,
props: t,
children: n,
els: [],
render: zi,
mount: Ui,
unmount: qi
};
}, ji = function(e, u, t, n) {
return Array.isArray(u) ? Qu(e, { $: null }, null, u) : Array.isArray(t) ? Qu(e, u, null, t) : Array.isArray(n) ? Qu(e, u, t, n) : Qu(e, u, t, null);
};
function Hi(e = {}) {
const u = {
c: ((...t) => ji(u, ...t)),
use: (t, ...n) => t.install(u, ...n),
find: pn,
context: {},
config: e
};
return u;
}
function Gi(e) {
const { namespace: u = "n", blockPrefix: t = `.${u}-`, elementPrefix: n = "__", modifierPrefix: r = "--" } = e ?? {}, o = Hi(), a = Ci({
blockPrefix: t,
elementPrefix: n,
modifierPrefix: r
});
return o.use(a), {
namespace: u,
blockPrefix: t,
elementPrefix: n,
modifierPrefix: r,
cssr: o,
plugin: a
};
}
const Vi = "@css-render/vue3-ssr";
function Wi(e, u) {
return `<style cssr-id="${e}">
${u}
</style>`;
}
function Zi(e, u, t) {
const { styles: n, ids: r } = t;
r.has(e) || n !== null && (r.add(e), n.push(Wi(e, u)));
}
const Yi = typeof document < "u";
function Xi() {
if (Yi)
return;
const e = Rr(Vi, null);
if (e !== null)
return {
adapter: (u, t) => Zi(u, t, e),
context: e
};
}
function gt(e, u) {
const t = Xi();
function n() {
u.mount({
id: e,
head: !0,
ssr: t
});
}
t ? n() : Io(() => {
n();
});
}
const { cssr: kt, plugin: xt, namespace: qu } = Gi(), { c: Qi } = kt, { cB: Ju } = xt, Ji = `${qu}-transition`;
function Ki({
name: e = "fade",
enterDuration: u = ".3s",
leaveDuration: t = ".3s",
enterCubicBezier: n = "cubic-bezier(.4, 0, .2, 1)",
leaveCubicBezier: r = "cubic-bezier(.4, 0, .2, 1)"
} = {}) {
return [
Ju(`${e}-enter-active`, {
transition: `all ${u} ${n}!important`
}),
Ju(`${e}-leave-active`, {
transition: `all ${t} ${r}!important`
}),
Ju(`${e}-enter-from`, {
opacity: 0
}),
Ju(`${e}-leave-to`, {
opacity: 0
})
];
}
function ea() {
return Qi([
Ki()
]);
}
const Gr = /* @__PURE__ */ de({
__name: "BaseTransition",
props: {
name: { default: "fade" },
transitionProps: {}
},
setup(e) {
return gt(Ji, ea()), (u, t) => (P(), N(Bo, X({
name: `${E(qu)}-${u.name}`,
appear: "",
mode: "out-in"
}, u.transitionProps), {
default: O(() => [
z(u.$slots, "default")
]),
_: 3
}, 16, ["name"]));
}
});
/*! @license DOMPurify 3.2.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.6/LICENSE */
const {
entries: Vr,
setPrototypeOf: Zn,
isFrozen: ua,
getPrototypeOf: ta,
getOwnPropertyDescriptor: na
} = Object;
let {
freeze: xe,
seal: Re,
create: Wr
} = Object, {
apply: un,
construct: tn
} = typeof Reflect < "u" && Reflect;
xe || (xe = function(u) {
return u;
});
Re || (Re = function(u) {
return u;
});
un || (un = function(u, t, n) {
return u.apply(t, n);
});
tn || (tn = function(u, t) {
return new u(...t);
});
const Ku = ve(Array.prototype.forEach), ra = ve(Array.prototype.lastIndexOf), Yn = ve(Array.prototype.pop), Su = ve(Array.prototype.push), oa = ve(Array.prototype.splice), at = ve(String.prototype.toLowerCase), Pt = ve(String.prototype.toString), Xn = ve(String.prototype.match), Tu = ve(String.prototype.replace), ia = ve(String.prototype.indexOf), aa = ve(String.prototype.trim), Le = ve(Object.prototype.hasOwnProperty), ge = ve(RegExp.prototype.test), Pu = la(TypeError);
function ve(e) {
return function(u) {
u instanceof RegExp && (u.lastIndex = 0);
for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), r = 1; r < t; r++)
n[r - 1] = arguments[r];
return un(e, u, n);
};
}
function la(e) {
return function() {
for (var u = arguments.length, t = new Array(u), n = 0; n < u; n++)
t[n] = arguments[n];
return tn(e, t);
};
}
function q(e, u) {
let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : at;
Zn && Zn(e, null);
let n = u.length;
for (; n--; ) {
let r = u[n];
if (typeof r == "string") {
const o = t(r);
o !== r && (ua(u) || (u[n] = o), r = o);
}
e[r] = !0;
}
return e;
}
function sa(e) {
for (let u = 0; u < e.length; u++)
Le(e, u) || (e[u] = null);
return e;
}
function Je(e) {
const u = Wr(null);
for (const [t, n] of Vr(e))
Le(e, t) && (Array.isArray(n) ? u[t] = sa(n) : n && typeof n == "object" && n.constructor === Object ? u[t] = Je(n) : u[t] = n);
return u;
}
function Ru(e, u) {
for (; e !== null; ) {
const n = na(e, u);
if (n) {
if (n.get)
return ve(n.get);
if (typeof n.value == "function")
return ve(n.value);
}
e = ta(e);
}
function t() {
return null;
}
return t;
}
const Qn = xe(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "section", "select", "shadow", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), Rt = xe(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), Ot = xe(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), ca = xe(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), Mt = xe(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]), fa = xe(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), Jn = xe(["#text"]), Kn = xe(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns", "slot"]), Lt = xe(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), er = xe(["accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), et = xe(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), da = Re(/\{\{[\w\W]*|[\w\W]*\}\}/gm), pa = Re(/<%[\w\W]*|[\w\W]*%>/gm), ha = Re(/\$\{[\w\W]*/gm), ba = Re(/^data-[\-\w.\u00B7-\uFFFF]+$/), ma = Re(/^aria-[\-\w]+$/), Zr = Re(
/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
// eslint-disable-line no-useless-escape
), ga = Re(/^(?:\w+script|data):/i), ka = Re(
/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
// eslint-disable-line no-control-regex
), Yr = Re(/^html$/i), xa = Re(/^[a-z][.\w]*(-[.\w]+)+$/i);
var ur = /* @__PURE__ */ Object.freeze({
__proto__: null,
ARIA_ATTR: ma,
ATTR_WHITESPACE: ka,
CUSTOM_ELEMENT: xa,
DATA_ATTR: ba,
DOCTYPE_NAME: Yr,
ERB_EXPR: pa,
IS_ALLOWED_URI: Zr,
IS_SCRIPT_OR_DATA: ga,
MUSTACHE_EXPR: da,
TMPLIT_EXPR: ha
});
const Ou = {
element: 1,
text: 3,
// Deprecated
progressingInstruction: 7,
comment: 8,
document: 9
}, va = function() {
return typeof window > "u" ? null : window;
}, ya = function(u, t) {
if (typeof u != "object" || typeof u.createPolicy != "function")
return null;
let n = null;
const r = "data-tt-policy-suffix";
t && t.hasAttribute(r) && (n = t.getAttribute(r));
const o = "dompurify" + (n ? "#" + n : "");
try {
return u.createPolicy(o, {
createHTML(a) {
return a;
},
createScriptURL(a) {
return a;
}
});
} catch {
return console.warn("TrustedTypes policy " + o + " could not be created."), null;
}
}, tr = function() {
return {
afterSanitizeAttributes: [],
afterSanitizeElements: [],
afterSanitizeShadowDOM: [],
beforeSanitizeAttributes: [],
beforeSanitizeElements: [],
beforeSanitizeShadowDOM: [],
uponSanitizeAttribute: [],
uponSanitizeElement: [],
uponSanitizeShadowNode: []
};
};
function Xr() {
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : va();
const u = (I) => Xr(I);
if (u.version = "3.2.6", u.removed = [], !e || !e.document || e.document.nodeType !== Ou.document || !e.Element)
return u.isSupported = !1, u;
let {
document: t
} = e;
const n = t, r = n.currentScript, {
DocumentFragment: o,
HTMLTemplateElement: a,
Node: i,
Element: l,
NodeFilter: s,
NamedNodeMap: c = e.NamedNodeMap || e.MozNamedAttrMap,
HTMLFormElement: f,
DOMParser: v,
trustedTypes: x
} = e, d = l.prototype, _ = Ru(d, "cloneNode"), w = Ru(d, "remove"), A = Ru(d, "nextSibling"), h = Ru(d, "childNodes"), m = Ru(d, "parentNode");
if (typeof a == "function") {
const I = t.createElement("template");
I.content && I.content.ownerDocument && (t = I.content.ownerDocument);
}
let g, p = "";
const {
implementation: b,
createNodeIterator: C,
createDocumentFragment: T,
getElementsByTagName: D
} = t, {
importNode: B
} = n;
let $ = tr();
u.isSupported = typeof Vr == "function" && typeof m == "function" && b && b.createHTMLDocument !== void 0;
const {
MUSTACHE_EXPR: H,
ERB_EXPR: ee,
TMPLIT_EXPR: S,
DATA_ATTR: G,
ARIA_ATTR: ie,
IS_SCRIPT_OR_DATA: ze,
ATTR_WHITESPACE: Z,
CUSTOM_ELEMENT: ye
} = ur;
let {
IS_ALLOWED_URI: _e
} = ur, Q = null;
const oe = q({}, [...Qn, ...Rt, ...Ot, ...Mt, ...Jn]);
let ne = null;
const Ee = q({}, [...Kn, ...Lt, ...er, ...et]);
let W = Object.seal(Wr(null, {
tagNameCheck: {
writable: !0,
configurable: !1,
enumerable: !0,
value: null
},
attributeNameCheck: {
writable: !0,
configurable: !1,
enumerable: !0,
value: null
},
allowCustomizedBuiltInElements: {
writable: !0,
configurable: !1,
enumerable: !0,
value: !1
}
})), Te = null, Ue = null, nu = !0, ru = !0, ue = !1, re = !0, Me = !1, ae = !0, y = !1, R = !1, M = !1, j = !1, cu = !1, fu = !1, Cn = !0, Dn = !1;
const To = "user-content-";
let At = !0, Cu = !1, hu = {}, bu = null;
const Fn = q({}, ["annotation-xml", "audio", "colgroup", "desc", "foreignobject", "head", "iframe", "math", "mi", "mn", "mo", "ms", "mtext", "noembed", "noframes", "noscript", "plaintext", "script", "style", "svg", "template", "thead", "title", "video", "xmp"]);
let Sn = null;
const Tn = q({}, ["audio", "video", "img", "source", "image", "track"]);
let wt = null;
const Pn = q({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), Vu = "http://www.w3.org/1998/Math/MathML", Wu = "http://www.w3.org/2000/svg", Ye = "http://www.w3.org/1999/xhtml";
let mu = Ye, Ct = !1, Dt = null;
const Po = q({}, [Vu, Wu, Ye], Pt);
let Zu = q({}, ["mi", "mo", "mn", "ms", "mtext"]), Yu = q({}, ["annotation-xml"]);
const Ro = q({}, ["title", "style", "font", "a", "script"]);
let Du = null;
const Oo = ["application/xhtml+xml", "text/html"], Mo = "text/html";
let se = null, gu = null;
const Lo = t.createElement("form"), Rn = function(k) {
return k instanceof RegExp || k instanceof Function;
}, Ft = function() {
let k = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
if (!(gu && gu === k)) {
if ((!k || typeof k != "object") && (k = {}), k = Je(k), Du = // eslint-disable-next-line unicorn/prefer-includes
Oo.indexOf(k.PARSER_MEDIA_TYPE) === -1 ? Mo : k.PARSER_MEDIA_TYPE, se = Du === "application/xhtml+xml" ? Pt : at, Q = Le(k, "ALLOWED_TAGS") ? q({}, k.ALLOWED_TAGS, se) : oe, ne = Le(k, "ALLOWED_ATTR") ? q({}, k.ALLOWED_ATTR, se) : Ee, Dt = Le(k, "ALLOWED_NAMESPACES") ? q({}, k.ALLOWED_NAMESPACES, Pt) : Po, wt = Le(k, "ADD_URI_SAFE_ATTR") ? q(Je(Pn), k.ADD_URI_SAFE_ATTR, se) : Pn, Sn = Le(k, "ADD_DATA_URI_TAGS") ? q(Je(Tn), k.ADD_DATA_URI_TAGS, se) : Tn, bu = Le(k, "FORBID_CONTENTS") ? q({}, k.FORBID_CONTENTS, se) : Fn, Te = Le(k, "FORBID_TAGS") ? q({}, k.FORBID_TAGS, se) : Je({}), Ue = Le(k, "FORBID_ATTR") ? q({}, k.FORBID_ATTR, se) : Je({}), hu = Le(k, "USE_PROFILES") ? k.USE_PROFILES : !1, nu = k.ALLOW_ARIA_ATTR !== !1, ru = k.ALLOW_DATA_ATTR !== !1, ue = k.ALLOW_UNKNOWN_PROTOCOLS || !1, re = k.ALLOW_SELF_CLOSE_IN_ATTR !== !1, Me = k.SAFE_FOR_TEMPLATES || !1, ae = k.SAFE_FOR_XML !== !1, y = k.WHOLE_DOCUMENT || !1, j = k.RETURN_DOM || !1, cu = k.RETURN_DOM_FRAGMENT || !1, fu = k.RETURN_TRUSTED_TYPE || !1, M = k.FORCE_BODY || !1, Cn = k.SANITIZE_DOM !== !1, Dn = k.SANITIZE_NAMED_PROPS || !1, At = k.KEEP_CONTENT !== !1, Cu = k.IN_PLACE || !1, _e = k.ALLOWED_URI_REGEXP || Zr, mu = k.NAMESPACE || Ye, Zu = k.MATHML_TEXT_INTEGRATION_POINTS || Zu, Yu = k.HTML_INTEGRATION_POINTS || Yu, W = k.CUSTOM_ELEMENT_HANDLING || {}, k.CUSTOM_ELEMENT_HANDLING && Rn(k.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (W.tagNameCheck = k.CUSTOM_ELEMENT_HANDLING.tagNameCheck), k.CUSTOM_ELEMENT_HANDLING && Rn(k.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (W.attributeNameCheck = k.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), k.CUSTOM_ELEMENT_HANDLING && typeof k.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (W.allowCustomizedBuiltInElements = k.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), Me && (ru = !1), cu && (j = !0), hu && (Q = q({}, Jn), ne = [], hu.html === !0 && (q(Q, Qn), q(ne, Kn)), hu.svg === !0 && (q(Q, Rt), q(ne, Lt), q(ne, et)), hu.svgFilters === !0 && (q(Q, Ot), q(ne, Lt), q(ne, et)), hu.mathMl === !0 && (q(Q, Mt), q(ne, er), q(ne, et))), k.ADD_TAGS && (Q === oe && (Q = Je(Q)), q(Q, k.ADD_TAGS, se)), k.ADD_ATTR && (ne === Ee && (ne = Je(ne)), q(ne, k.ADD_ATTR, se)), k.ADD_URI_SAFE_ATTR && q(wt, k.ADD_URI_SAFE_ATTR, se), k.FORBID_CONTENTS && (bu === Fn && (bu = Je(bu)), q(bu, k.FORBID_CONTENTS, se)), At && (Q["#text"] = !0), y && q(Q, ["html", "head", "body"]), Q.table && (q(Q, ["tbody"]), delete Te.tbody), k.TRUSTED_TYPES_POLICY) {
if (typeof k.TRUSTED_TYPES_POLICY.createHTML != "function")
throw Pu('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
if (typeof k.TRUSTED_TYPES_POLICY.createScriptURL != "function")
throw Pu('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
g = k.TRUSTED_TYPES_POLICY, p = g.createHTML("");
} else
g === void 0 && (g = ya(x, r)), g !== null && typeof p == "string" && (p = g.createHTML(""));
xe && xe(k), gu = k;
}
}, On = q({}, [...Rt, ...Ot, ...ca]), Mn = q({}, [...Mt, ...fa]), No = function(k) {
let F = m(k);
(!F || !F.tagName) && (F = {
namespaceURI: mu,
tagName: "template"
});
const L = at(k.tagName), te = at(F.tagName);
return Dt[k.namespaceURI] ? k.namespaceURI === Wu ? F.namespaceURI === Ye ? L === "svg" : F.namespaceURI === Vu ? L === "svg" && (te === "annotation-xml" || Zu[te]) : !!On[L] : k.namespaceURI === Vu ? F.namespaceURI === Ye ? L === "math" : F.namespaceURI === Wu ? L === "math" && Yu[te] : !!Mn[L] : k.namespaceURI === Ye ? F.namespaceURI === Wu && !Yu[te] || F.namespaceURI === Vu && !Zu[te] ? !1 : !Mn[L] && (Ro[L] || !On[L]) : !!(Du === "application/xhtml+xml" && Dt[k.namespaceURI]) : !1;
}, qe = function(k) {
Su(u.removed, {
element: k
});
try {
m(k).removeChild(k);
} catch {
w(k);
}
}, ku = function(k, F) {
try {
Su(u.removed, {
attribute: F.getAttributeNode(k),
from: F
});
} catch {
Su(u.removed, {
attribute: null,
from: F
});
}
if (F.removeAttribute(k), k === "is")
if (j || cu)
try {
qe(F);
} catch {
}
else
try {
F.setAttribute(k, "");
} catch {
}
}, Ln = function(k) {
let F = null, L = null;
if (M)
k = "<remove></remove>" + k;
else {
const le = Xn(k, /^[\r\n\t ]+/);
L = le && le[0];
}
Du === "application/xhtml+xml" && mu === Ye && (k = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + k + "</body></html>");
const te = g ? g.createHTML(k) : k;
if (mu === Ye)
try {
F = new v().parseFromString(te, Du);
} catch {
}
if (!F || !F.documentElement) {
F = b.createDocument(mu, "template", null);
try {
F.documentElement.innerHTML = Ct ? p : te;
} catch {
}
}
const pe = F.body || F.documentElement;
return k && L && pe.insertBefore(t.createTextNode(L), pe.childNodes[0] || null), mu === Ye ? D.call(F, y ? "html" : "body")[0] : y ? F.documentElement : pe;
}, Nn = function(k) {
return C.call(
k.ownerDocument || k,
k,
// eslint-disable-next-line no-bitwise
s.SHOW_ELEMENT | s.SHOW_COMMENT | s.SHOW_TEXT | s.SHOW_PROCESSING_INSTRUCTION | s.SHOW_CDATA_SECTION,
null
);
}, St = function(k) {
return k instanceof f && (typeof k.nodeName != "string" || typeof k.textContent != "string" || typeof k.removeChild != "function" || !(k.attributes instanceof c) || typeof k.removeAttribute != "function" || typeof k.setAttribute != "function" || typeof k.namespaceURI != "string" || typeof k.insertBefore != "function" || typeof k.hasChildNodes != "function");
}, $n = function(k) {
return typeof i == "function" && k instanceof i;
};
function Xe(I, k, F) {
Ku(I, (L) => {
L.call(u, k, F, gu);
});
}
const In = function(k) {
let F = null;
if (Xe($.beforeSanitizeElements, k, null), St(k))
return qe(k), !0;
const L = se(k.nodeName);
if (Xe($.uponSanitizeElement, k, {
tagName: L,
allowedTags: Q
}), ae && k.hasChildNodes() && !$n(k.firstElementChild) && ge(/<[/\w!]/g, k.innerHTML) && ge(/<[/\w!]/g, k.textContent) || k.nodeType === Ou.progressingInstruction || ae && k.nodeType === Ou.comment && ge(/<[/\w]/g, k.data))
return qe(k), !0;
if (!Q[L] || Te[L]) {
if (!Te[L] && zn(L) && (W.tagNameCheck instanceof RegExp && ge(W.tagNameCheck, L) || W.tagNameCheck instanceof Function && W.tagNameCheck(L)))
return !1;
if (At && !bu[L]) {
const te = m(k) || k.parentNode, pe = h(k) || k.childNodes;
if (pe && te) {
const le = pe.length;
for (let Ae = le - 1; Ae >= 0; --Ae) {
const Qe = _(pe[Ae], !0);
Qe.__removalCount = (k.__removalCount || 0) + 1, te.insertBefore(Qe, A(k));
}
}
}
return qe(k), !0;
}
return k instanceof l && !No(k) || (L === "noscript" || L === "noembed" || L === "noframes") && ge(/<\/no(script|embed|frames)/i, k.innerHTML) ? (qe(k), !0) : (Me && k.nodeType === Ou.text && (F = k.textContent, Ku([H, ee, S], (te) => {
F = Tu(F, te, " ");
}), k.textContent !== F && (Su(u.removed, {
element: k.cloneNode()
}), k.textContent = F)), Xe($.afterSanitizeElements, k, null), !1);
}, Bn = function(k, F, L) {
if (Cn && (F === "id" || F === "name") && (L in t || L in Lo))
return !1;
if (!(ru && !Ue[F] && ge(G, F))) {
if (!(nu && ge(ie, F))) {
if (!ne[F] || Ue[F]) {
if (
// First condition does a very basic check if a) it's basically a valid custom element tagname AND
// b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
// and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
!(zn(k) && (W.tagNameCheck instanceof RegExp && ge(W.tagNameCheck, k) || W.tagNameCheck instanceof Function && W.tagNameCheck(k)) && (W.attributeNameCheck instanceof RegExp && ge(W.attributeNameCheck, F) || W.attributeNameCheck instanceof Function && W.attributeNameCheck(F)) || // Alternative, second condition checks if it's an `is`-attribute, AND
// the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
F === "is" && W.allowCustomizedBuiltInElements && (W.tagNameCheck instanceof RegExp && ge(W.tagNameCheck, L) || W.tagNameCheck instanceof Function && W.tagNameCheck(L)))
) return !1;
} else if (!wt[F]) {
if (!ge(_e, Tu(L, Z, ""))) {
if (!((F === "src" || F === "xlink:href" || F === "href") && k !== "script" && ia(L, "data:") === 0 && Sn[k])) {
if (!(ue && !ge(ze, Tu(L, Z, "")))) {
if (L)
return !1;
}
}
}
}
}
}
return !0;
}, zn = function(k) {
return k !== "annotation-xml" && Xn(k, ye);
}, Un = function(k) {
Xe($.beforeSanitizeAttributes, k, null);
const {
attributes: F
} = k;
if (!F || St(k))
return;
const L = {
attrName: "",
attrValue: "",
keepAttr: !0,
allowedAttributes: ne,
forceKeepAttr: void 0
};
let te = F.length;
for (; te--; ) {
const pe = F[te], {
name: le,
namespaceURI: Ae,
value: Qe
} = pe, Fu = se(le), Tt = Qe;
let he = le === "value" ? Tt : aa(Tt);
if (L.attrName = Fu, L.attrValue = he, L.keepAttr = !0, L.forceKeepAttr = void 0, Xe($.uponSanitizeAttribute, k, L), he = L.attrValue, Dn && (Fu === "id" || Fu === "name") && (ku(le, k), he = To + he), ae && ge(/((--!?|])>)|<\/(style|title)/i, he)) {
ku(le, k);
continue;
}
if (L.forceKeepAttr)
continue;
if (!L.keepAttr) {
ku(le, k);
continue;
}
if (!re && ge(/\/>/i, he)) {
ku(le, k);
continue;
}
Me && Ku([H, ee, S], (jn) => {
he = Tu(he, jn, " ");
});
const qn = se(k.nodeName);
if (!Bn(qn, Fu, he)) {
ku(le, k);
continue;
}
if (g && typeof x == "object" && typeof x.getAttributeType == "function" && !Ae)
switch (x.getAttributeType(qn, Fu)) {
case "TrustedHTML": {
he = g.createHTML(he);
break;
}
case "TrustedScriptURL": {
he = g.createScriptURL(he);
break;
}
}
if (he !== Tt)
try {
Ae ? k.setAttributeNS(Ae, le, he) : k.setAttribute(le, he), St(k) ? qe(k) : Yn(u.removed);
} catch {
ku(le, k);
}
}
Xe($.afterSanitizeAttributes, k, null);
}, $o = function I(k) {
let F = null;
const L = Nn(k);
for (Xe($.beforeSanitizeShadowDOM, k, null); F = L.nextNode(); )
Xe($.uponSanitizeShadowNode, F, null), In(F), Un(F), F.content instanceof o && I(F.content);
Xe($.afterSanitizeShadowDOM, k, null);
};
return u.sanitize = function(I) {
let k = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, F = null, L = null, te = null, pe = null;
if (Ct = !I, Ct && (I = "<!-->"), typeof I != "string" && !$n(I))
if (typeof I.toString == "function") {
if (I = I.toString(), typeof I != "string")
throw Pu("dirty is not a string, aborting");
} else
throw Pu("toString is not a function");
if (!u.isSupported)
return I;
if (R || Ft(k), u.removed = [], typeof I == "string" && (Cu = !1), Cu) {
if (I.nodeName) {
const Qe = se(I.nodeName);
if (!Q[Qe] || Te[Qe])
throw Pu("root node is forbidden and cannot be sanitized in-place");
}
} else if (I instanceof i)
F = Ln("<!---->"), L = F.ownerDocument.importNode(I, !0), L.nodeType === Ou.element && L.nodeName === "BODY" || L.nodeName === "HTML" ? F = L : F.appendChild(L);
else {
if (!j && !Me && !y && // eslint-disable-next-line unicorn/prefer-includes
I.indexOf("<") === -1)
return g && fu ? g.createHTML(I) : I;
if (F = Ln(I), !F)
return j ? null : fu ? p : "";
}
F && M && qe(F.firstChild);
const le = Nn(Cu ? I : F);
for (; te = le.nextNode(); )
In(te), Un(te), te.content instanceof o && $o(te.content);
if (Cu)
return I;
if (j) {
if (cu)
for (pe = T.call(F.ownerDocument); F.firstChild; )
pe.appendChild(F.firstChild);
else
pe = F;
return (ne.shadowroot || ne.shadowrootmode) && (pe = B.call(n, pe, !0)), pe;
}
let Ae = y ? F.outerHTML : F.innerHTML;
return y && Q["!doctype"] && F.ownerDocument && F.ownerDocument.doctype && F.ownerDocument.doctype.name && ge(Yr, F.ownerDocument.doctype.name) && (Ae = "<!DOCTYPE " + F.ownerDocument.doctype.name + `>
` + Ae), Me && Ku([H, ee, S], (Qe) => {
Ae = Tu(Ae, Qe, " ");
}), g && fu ? g.createHTML(Ae) : Ae;
}, u.setConfig = function() {
let I = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
Ft(I), R = !0;
}, u.clearConfig = function() {
gu = null, R = !1;
}, u.isValidAttribute = function(I, k, F) {
gu || Ft({});
const L = se(I), te = se(k);
return Bn(L, te, F);
}, u.addHook = function(I, k) {
typeof k == "function" && Su($[I], k);
}, u.removeHook = function(I, k) {
if (k !== void 0) {
const F = ra($[I], k);
return F === -1 ? void 0 : oa($[I], F, 1)[0];
}
return Yn($[I]);
}, u.removeHooks = function(I) {
$[I] = [];
}, u.removeAllHooks = function() {
$ = tr();
}, u;
}
var _a = Xr();
const nr = {};
function Ea(e) {
let u = nr[e];
if (u)
return u;
u = nr[e] = [];
for (let t = 0; t < 128; t++) {
const n = String.fromCharCode(t);
u.push(n);
}
for (let t = 0; t < e.length; t++) {
const n = e.charCodeAt(t);
u[n] = "%" + ("0" + n.toString(16).toUpperCase()).slice(-2);
}
return u;
}
function Eu(e, u) {
typeof u != "string" && (u = Eu.defaultChars);
const t = Ea(u);
return e.replace(/(%[a-f0-9]{2})+/gi, function(n) {
let r = "";
for (let o = 0, a = n.length; o < a; o += 3) {
const i = parseInt(n.slice(o + 1, o + 3), 16);
if (i < 128) {
r += t[i];
continue;
}
if ((i & 224) === 192 && o + 3 < a) {
const l = parseInt(n.slice(o + 4, o + 6), 16);
if ((l & 192) === 128) {
const s = i << 6 & 1984 | l & 63;
s < 128 ? r += "��" : r += String.fromCharCode(s), o += 3;
continue;
}
}
if ((i & 240) === 224 && o + 6 < a) {
const l = parseInt(n.slice(o + 4, o + 6), 16), s = parseInt(n.slice(o + 7, o + 9), 16);
if ((l & 192) === 128 && (s & 192) === 128) {
const c = i << 12 & 61440 | l << 6 & 4032 | s & 63;
c < 2048 || c >= 55296 && c <= 57343 ? r += "���" : r += String.fromCharCode(c), o += 6;
continue;
}
}
if ((i & 248) === 240 && o + 9 < a) {
const l = parseInt(n.slice(o + 4, o + 6), 16), s = parseInt(n.slice(o + 7, o + 9), 16), c = parseInt(n.slice(o + 10, o + 12), 16);
if ((l & 192) === 128 && (s & 192) === 128 && (c & 192) === 128) {
let f = i << 18 & 1835008 | l << 12 & 258048 | s << 6 & 4032 | c & 63;
f < 65536 || f > 1114111 ? r += "����" : (f -= 65536, r += String.fromCharCode(55296 + (f >> 10), 56320 + (f & 1023))), o += 9;
continue;
}
}
r += "�";
}
return r;
});
}
Eu.defaultChars = ";/?:@&=+$,#";
Eu.componentChars = "";
const rr = {};
function Aa(e) {
let u = rr[e];
if (u)
return u;
u = rr[e] = [];
for (let t = 0; t < 128; t++) {
const n = String.fromCharCode(t);
/^[0-9a-z]$/i.test(n) ? u.push(n) : u.push("%" + ("0" + t.toString(16).toUpperCase()).slice(-2));
}
for (let t = 0; t < e.length; t++)
u[e.charCodeAt(t)] = e[t];
return u;
}
function ju(e, u, t) {
typeof u != "string" && (t = u, u = ju.defaultChars), typeof t > "u" && (t = !0);
const n = Aa(u);
let r = "";
for (let o = 0, a = e.length; o < a; o++) {
const i = e.charCodeAt(o);
if (t && i === 37 && o + 2 < a && /^[0-9a-f]{2}$/i.test(e.slice(o + 1, o + 3))) {
r += e.slice(o, o + 3), o += 2;
continue;
}
if (i < 128) {
r += n[i];
continue;
}
if (i >= 55296 && i <= 57343) {
if (i >= 55296 && i <= 56319 && o + 1 < a) {
const l = e.charCodeAt(o + 1);
if (l >= 56320 && l <= 57343) {
r += encodeURIComponent(e[o] + e[o + 1]), o++;
continue;
}
}
r += "%EF%BF%BD";
continue;
}
r += encodeURIComponent(e[o]);
}
return r;
}
ju.defaultChars = ";/?:@&=+$,-_.!~*'()#";
ju.componentChars = "-_.!~*'()";
function hn(e) {
let u = "";
return u += e.protocol || "", u += e.slashes ? "//" : "", u += e.auth ? e.auth + "@" : "", e.hostname && e.hostname.indexOf(":") !== -1 ? u += "[" + e.hostname + "]" : u += e.hostname || "", u += e.port ? ":" + e.port : "", u += e.pathname || "", u += e.search || "", u += e.hash || "", u;
}
function ft() {
this.protocol = null, this.slashes = null, this.auth = null, this.port = null, this.hostname = null, this.hash = null, this.search = null, this.pathname = null;
}
const wa = /^([a-z0-9.+-]+:)/i, Ca = /:[0-9]*$/, Da = /^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/, Fa = ["<", ">", '"', "`", " ", "\r", `
`, " "], Sa = ["{", "}", "|", "\\", "^", "`"].concat(Fa), Ta = ["'"].concat(Sa), or = ["%", "/", "?", ";", "#"].concat(Ta), ir = ["/", "?", "#"], Pa = 255, ar = /^[+a-z0-9A-Z_-]{0,63}$/, Ra = /^([+a-z0-9A-Z_-]{0,63})(.*)$/, lr = {
javascript: !0,
"javascript:": !0
}, sr = {
http: !0,
https: !0,
ftp: !0,
gopher: !0,
file: !0,
"http:": !0,
"https:": !0,
"ftp:": !0,
"gopher:": !0,
"file:": !0
};
function bn(e, u) {
if (e && e instanceof ft) return e;
const t = new ft();
return t.parse(e, u), t;
}
ft.prototype.parse = function(e, u) {
let t, n, r, o = e;
if (o = o.trim(), !u && e.split("#").length === 1) {
const s = Da.exec(o);
if (s)
return this.pathname = s[1], s[2] && (this.search = s[2]), this;
}
let a = wa.exec(o);
if (a && (a = a[0], t = a.toLowerCase(), this.protocol = a, o = o.substr(a.length)), (u || a || o.match(/^\/\/[^@\/]+@[^@\/]+/)) && (r = o.substr(0, 2) === "//", r && !(a && lr[a]) && (o = o.substr(2), this.slashes = !0)), !lr[a] && (r || a && !sr[a])) {
let s = -1;
for (let d = 0; d < ir.length; d++)
n = o.indexOf(ir[d]), n !== -1 && (s === -1 || n < s) && (s = n);
let c, f;
s === -1 ? f = o.lastIndexOf("@") : f = o.lastIndexOf("@", s), f !== -1 && (c = o.slice(0, f), o = o.slice(f + 1), this.auth = c), s = -1;
for (let d = 0; d < or.length; d++)
n = o.indexOf(or[d]), n !== -1 && (s === -1 || n < s) && (s = n);
s === -1 && (s = o.length), o[s - 1] === ":" && s--;
const v = o.slice(0, s);
o = o.slice(s), this.parseHost(v), this.hostname = this.hostname || "";
const x = this.hostname[0] === "[" && this.hostname[this.hostname.length - 1] === "]";
if (!x) {
const d = this.hostname.split(/\./);
for (let _ = 0, w = d.length; _ < w; _++) {
const A = d[_];
if (A && !A.match(ar)) {
let h = "";
for (let m = 0, g = A.length; m < g; m++)
A.charCodeAt(m) > 127 ? h += "x" : h += A[m];
if (!h.match(ar)) {
const m = d.slice(0, _), g = d.slice(_ + 1), p = A.match(Ra);
p && (m.push(p[1]), g.unshift(p[2])), g.length && (o = g.join(".") + o), this.hostname = m.join(".");
break;
}
}
}
}
this.hostname.length > Pa && (this.hostname = ""), x && (this.hostname = this.hostname.substr(1, this.hostname.length - 2));
}
const i = o.indexOf("#");
i !== -1 && (this.hash = o.substr(i), o = o.slice(0, i));
const l = o.indexOf("?");
return l !== -1 && (this.search = o.substr(l), o = o.slice(0, l)), o && (this.pathname = o), sr[t] && this.hostname && !this.pathname && (this.pathname = ""), this;
};
ft.prototype.parseHost = function(e) {
let u = Ca.exec(e);
u && (u = u[0], u !== ":" && (this.port = u.substr(1)), e = e.substr(0, e.length - u.length)), e && (this.hostname = e);
};
const Oa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
__proto__: null,
decode: Eu,
encode: ju,
format: hn,
parse: bn
}, Symbol.toStringTag, { value: "Module" })), Qr = /[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, Jr = /[\0-\x1F\x7F-\x9F]/, Ma = /[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/, mn = /[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\