vitepress-mermaid-preview
Version:
Mermaid preview for vitepress
1,135 lines • 703 kB
JavaScript
import { getCurrentScope as g0, onScopeDispose as m0, onMounted as on, nextTick as is, watch as wn, getCurrentInstance as Lu, toRef as y0, readonly as x0, ref as pt, customRef as b0, computed as bt, toValue as pe, shallowRef as vn, unref as Lt, defineComponent as Cn, reactive as w0, h as v0, useAttrs as C0, watchEffect as ar, createElementBlock as St, openBlock as wt, Fragment as He, createCommentVNode as mr, createElementVNode as Ft, renderList as po, mergeProps as ra, createBlock as Xr, normalizeStyle as ia, normalizeClass as Te, withCtx as yr, renderSlot as de, createVNode as ir, isVNode as Ai, onBeforeUnmount as _0, resolveDynamicComponent as Mi, normalizeProps as Pc, createTextVNode as Nc, toDisplayString as Ui, useCssVars as k0, withDirectives as S0, vShow as T0 } from "vue";
function B0(e) {
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
}
var na = { exports: {} }, L0 = na.exports, zc;
function A0() {
return zc || (zc = 1, function(e, t) {
(function(r, i) {
e.exports = i();
})(L0, function() {
var r = 1e3, i = 6e4, n = 36e5, a = "millisecond", o = "second", s = "minute", l = "hour", c = "day", h = "week", u = "month", f = "quarter", d = "year", g = "date", m = "Invalid Date", x = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, b = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, y = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(M) {
var $ = ["th", "st", "nd", "rd"], A = M % 100;
return "[" + M + ($[(A - 20) % 10] || $[A] || $[0]) + "]";
} }, w = function(M, $, A) {
var P = String(M);
return !P || P.length >= $ ? M : "" + Array($ + 1 - P.length).join(A) + M;
}, _ = { s: w, z: function(M) {
var $ = -M.utcOffset(), A = Math.abs($), P = Math.floor(A / 60), R = A % 60;
return ($ <= 0 ? "+" : "-") + w(P, 2, "0") + ":" + w(R, 2, "0");
}, m: function M($, A) {
if ($.date() < A.date()) return -M(A, $);
var P = 12 * (A.year() - $.year()) + (A.month() - $.month()), R = $.clone().add(P, u), q = A - R < 0, Y = $.clone().add(P + (q ? -1 : 1), u);
return +(-(P + (A - R) / (q ? R - Y : Y - R)) || 0);
}, a: function(M) {
return M < 0 ? Math.ceil(M) || 0 : Math.floor(M);
}, p: function(M) {
return { M: u, y: d, w: h, d: c, D: g, h: l, m: s, s: o, ms: a, Q: f }[M] || String(M || "").toLowerCase().replace(/s$/, "");
}, u: function(M) {
return M === void 0;
} }, v = "en", L = {};
L[v] = y;
var B = "$isDayjsObject", I = function(M) {
return M instanceof D || !(!M || !M[B]);
}, k = function M($, A, P) {
var R;
if (!$) return v;
if (typeof $ == "string") {
var q = $.toLowerCase();
L[q] && (R = q), A && (L[q] = A, R = q);
var Y = $.split("-");
if (!R && Y.length > 1) return M(Y[0]);
} else {
var U = $.name;
L[U] = $, R = U;
}
return !P && R && (v = R), R || !P && v;
}, E = function(M, $) {
if (I(M)) return M.clone();
var A = typeof $ == "object" ? $ : {};
return A.date = M, A.args = arguments, new D(A);
}, T = _;
T.l = k, T.i = I, T.w = function(M, $) {
return E(M, { locale: $.$L, utc: $.$u, x: $.$x, $offset: $.$offset });
};
var D = function() {
function M(A) {
this.$L = k(A.locale, null, !0), this.parse(A), this.$x = this.$x || A.x || {}, this[B] = !0;
}
var $ = M.prototype;
return $.parse = function(A) {
this.$d = function(P) {
var R = P.date, q = P.utc;
if (R === null) return /* @__PURE__ */ new Date(NaN);
if (T.u(R)) return /* @__PURE__ */ new Date();
if (R instanceof Date) return new Date(R);
if (typeof R == "string" && !/Z$/i.test(R)) {
var Y = R.match(x);
if (Y) {
var U = Y[2] - 1 || 0, rt = (Y[7] || "0").substring(0, 3);
return q ? new Date(Date.UTC(Y[1], U, Y[3] || 1, Y[4] || 0, Y[5] || 0, Y[6] || 0, rt)) : new Date(Y[1], U, Y[3] || 1, Y[4] || 0, Y[5] || 0, Y[6] || 0, rt);
}
}
return new Date(R);
}(A), this.init();
}, $.init = function() {
var A = this.$d;
this.$y = A.getFullYear(), this.$M = A.getMonth(), this.$D = A.getDate(), this.$W = A.getDay(), this.$H = A.getHours(), this.$m = A.getMinutes(), this.$s = A.getSeconds(), this.$ms = A.getMilliseconds();
}, $.$utils = function() {
return T;
}, $.isValid = function() {
return this.$d.toString() !== m;
}, $.isSame = function(A, P) {
var R = E(A);
return this.startOf(P) <= R && R <= this.endOf(P);
}, $.isAfter = function(A, P) {
return E(A) < this.startOf(P);
}, $.isBefore = function(A, P) {
return this.endOf(P) < E(A);
}, $.$g = function(A, P, R) {
return T.u(A) ? this[P] : this.set(R, A);
}, $.unix = function() {
return Math.floor(this.valueOf() / 1e3);
}, $.valueOf = function() {
return this.$d.getTime();
}, $.startOf = function(A, P) {
var R = this, q = !!T.u(P) || P, Y = T.p(A), U = function(lt, ct) {
var vt = T.w(R.$u ? Date.UTC(R.$y, ct, lt) : new Date(R.$y, ct, lt), R);
return q ? vt : vt.endOf(c);
}, rt = function(lt, ct) {
return T.w(R.toDate()[lt].apply(R.toDate("s"), (q ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(ct)), R);
}, J = this.$W, ut = this.$M, it = this.$D, Tt = "set" + (this.$u ? "UTC" : "");
switch (Y) {
case d:
return q ? U(1, 0) : U(31, 11);
case u:
return q ? U(1, ut) : U(0, ut + 1);
case h:
var O = this.$locale().weekStart || 0, xt = (J < O ? J + 7 : J) - O;
return U(q ? it - xt : it + (6 - xt), ut);
case c:
case g:
return rt(Tt + "Hours", 0);
case l:
return rt(Tt + "Minutes", 1);
case s:
return rt(Tt + "Seconds", 2);
case o:
return rt(Tt + "Milliseconds", 3);
default:
return this.clone();
}
}, $.endOf = function(A) {
return this.startOf(A, !1);
}, $.$set = function(A, P) {
var R, q = T.p(A), Y = "set" + (this.$u ? "UTC" : ""), U = (R = {}, R[c] = Y + "Date", R[g] = Y + "Date", R[u] = Y + "Month", R[d] = Y + "FullYear", R[l] = Y + "Hours", R[s] = Y + "Minutes", R[o] = Y + "Seconds", R[a] = Y + "Milliseconds", R)[q], rt = q === c ? this.$D + (P - this.$W) : P;
if (q === u || q === d) {
var J = this.clone().set(g, 1);
J.$d[U](rt), J.init(), this.$d = J.set(g, Math.min(this.$D, J.daysInMonth())).$d;
} else U && this.$d[U](rt);
return this.init(), this;
}, $.set = function(A, P) {
return this.clone().$set(A, P);
}, $.get = function(A) {
return this[T.p(A)]();
}, $.add = function(A, P) {
var R, q = this;
A = Number(A);
var Y = T.p(P), U = function(ut) {
var it = E(q);
return T.w(it.date(it.date() + Math.round(ut * A)), q);
};
if (Y === u) return this.set(u, this.$M + A);
if (Y === d) return this.set(d, this.$y + A);
if (Y === c) return U(1);
if (Y === h) return U(7);
var rt = (R = {}, R[s] = i, R[l] = n, R[o] = r, R)[Y] || 1, J = this.$d.getTime() + A * rt;
return T.w(J, this);
}, $.subtract = function(A, P) {
return this.add(-1 * A, P);
}, $.format = function(A) {
var P = this, R = this.$locale();
if (!this.isValid()) return R.invalidDate || m;
var q = A || "YYYY-MM-DDTHH:mm:ssZ", Y = T.z(this), U = this.$H, rt = this.$m, J = this.$M, ut = R.weekdays, it = R.months, Tt = R.meridiem, O = function(ct, vt, Bt, he) {
return ct && (ct[vt] || ct(P, q)) || Bt[vt].slice(0, he);
}, xt = function(ct) {
return T.s(U % 12 || 12, ct, "0");
}, lt = Tt || function(ct, vt, Bt) {
var he = ct < 12 ? "AM" : "PM";
return Bt ? he.toLowerCase() : he;
};
return q.replace(b, function(ct, vt) {
return vt || function(Bt) {
switch (Bt) {
case "YY":
return String(P.$y).slice(-2);
case "YYYY":
return T.s(P.$y, 4, "0");
case "M":
return J + 1;
case "MM":
return T.s(J + 1, 2, "0");
case "MMM":
return O(R.monthsShort, J, it, 3);
case "MMMM":
return O(it, J);
case "D":
return P.$D;
case "DD":
return T.s(P.$D, 2, "0");
case "d":
return String(P.$W);
case "dd":
return O(R.weekdaysMin, P.$W, ut, 2);
case "ddd":
return O(R.weekdaysShort, P.$W, ut, 3);
case "dddd":
return ut[P.$W];
case "H":
return String(U);
case "HH":
return T.s(U, 2, "0");
case "h":
return xt(1);
case "hh":
return xt(2);
case "a":
return lt(U, rt, !0);
case "A":
return lt(U, rt, !1);
case "m":
return String(rt);
case "mm":
return T.s(rt, 2, "0");
case "s":
return String(P.$s);
case "ss":
return T.s(P.$s, 2, "0");
case "SSS":
return T.s(P.$ms, 3, "0");
case "Z":
return Y;
}
return null;
}(ct) || Y.replace(":", "");
});
}, $.utcOffset = function() {
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
}, $.diff = function(A, P, R) {
var q, Y = this, U = T.p(P), rt = E(A), J = (rt.utcOffset() - this.utcOffset()) * i, ut = this - rt, it = function() {
return T.m(Y, rt);
};
switch (U) {
case d:
q = it() / 12;
break;
case u:
q = it();
break;
case f:
q = it() / 3;
break;
case h:
q = (ut - J) / 6048e5;
break;
case c:
q = (ut - J) / 864e5;
break;
case l:
q = ut / n;
break;
case s:
q = ut / i;
break;
case o:
q = ut / r;
break;
default:
q = ut;
}
return R ? q : T.a(q);
}, $.daysInMonth = function() {
return this.endOf(u).$D;
}, $.$locale = function() {
return L[this.$L];
}, $.locale = function(A, P) {
if (!A) return this.$L;
var R = this.clone(), q = k(A, P, !0);
return q && (R.$L = q), R;
}, $.clone = function() {
return T.w(this.$d, this);
}, $.toDate = function() {
return new Date(this.valueOf());
}, $.toJSON = function() {
return this.isValid() ? this.toISOString() : null;
}, $.toISOString = function() {
return this.$d.toISOString();
}, $.toString = function() {
return this.$d.toUTCString();
}, M;
}(), F = D.prototype;
return E.prototype = F, [["$ms", a], ["$s", o], ["$m", s], ["$H", l], ["$W", c], ["$M", u], ["$y", d], ["$D", g]].forEach(function(M) {
F[M[1]] = function($) {
return this.$g($, M[0], M[1]);
};
}), E.extend = function(M, $) {
return M.$i || (M($, D, E), M.$i = !0), E;
}, E.locale = k, E.isDayjs = I, E.unix = function(M) {
return E(1e3 * M);
}, E.en = L[v], E.Ls = L, E.p = {}, E;
});
}(na)), na.exports;
}
var M0 = A0();
const E0 = /* @__PURE__ */ B0(M0), aa = {
/* CLAMP */
min: {
r: 0,
g: 0,
b: 0,
s: 0,
l: 0,
a: 0
},
max: {
r: 255,
g: 255,
b: 255,
h: 360,
s: 100,
l: 100,
a: 1
},
clamp: {
r: (e) => e >= 255 ? 255 : e < 0 ? 0 : e,
g: (e) => e >= 255 ? 255 : e < 0 ? 0 : e,
b: (e) => e >= 255 ? 255 : e < 0 ? 0 : e,
h: (e) => e % 360,
s: (e) => e >= 100 ? 100 : e < 0 ? 0 : e,
l: (e) => e >= 100 ? 100 : e < 0 ? 0 : e,
a: (e) => e >= 1 ? 1 : e < 0 ? 0 : e
},
/* CONVERSION */
//SOURCE: https://planetcalc.com/7779
toLinear: (e) => {
const t = e / 255;
return e > 0.03928 ? Math.pow((t + 0.055) / 1.055, 2.4) : t / 12.92;
},
//SOURCE: https://gist.github.com/mjackson/5311256
hue2rgb: (e, t, r) => (r < 0 && (r += 1), r > 1 && (r -= 1), r < 1 / 6 ? e + (t - e) * 6 * r : r < 1 / 2 ? t : r < 2 / 3 ? e + (t - e) * (2 / 3 - r) * 6 : e),
hsl2rgb: ({ h: e, s: t, l: r }, i) => {
if (!t)
return r * 2.55;
e /= 360, t /= 100, r /= 100;
const n = r < 0.5 ? r * (1 + t) : r + t - r * t, a = 2 * r - n;
switch (i) {
case "r":
return aa.hue2rgb(a, n, e + 1 / 3) * 255;
case "g":
return aa.hue2rgb(a, n, e) * 255;
case "b":
return aa.hue2rgb(a, n, e - 1 / 3) * 255;
}
},
rgb2hsl: ({ r: e, g: t, b: r }, i) => {
e /= 255, t /= 255, r /= 255;
const n = Math.max(e, t, r), a = Math.min(e, t, r), o = (n + a) / 2;
if (i === "l")
return o * 100;
if (n === a)
return 0;
const s = n - a, l = o > 0.5 ? s / (2 - n - a) : s / (n + a);
if (i === "s")
return l * 100;
switch (n) {
case e:
return ((t - r) / s + (t < r ? 6 : 0)) * 60;
case t:
return ((r - e) / s + 2) * 60;
case r:
return ((e - t) / s + 4) * 60;
default:
return -1;
}
}
}, $0 = {
/* API */
clamp: (e, t, r) => t > r ? Math.min(t, Math.max(r, e)) : Math.min(r, Math.max(t, e)),
round: (e) => Math.round(e * 1e10) / 1e10
}, F0 = {
/* API */
dec2hex: (e) => {
const t = Math.round(e).toString(16);
return t.length > 1 ? t : `0${t}`;
}
}, st = {
channel: aa,
lang: $0,
unit: F0
}, er = {};
for (let e = 0; e <= 255; e++)
er[e] = st.unit.dec2hex(e);
const Ht = {
ALL: 0,
RGB: 1,
HSL: 2
};
class D0 {
constructor() {
this.type = Ht.ALL;
}
/* API */
get() {
return this.type;
}
set(t) {
if (this.type && this.type !== t)
throw new Error("Cannot change both RGB and HSL channels at the same time");
this.type = t;
}
reset() {
this.type = Ht.ALL;
}
is(t) {
return this.type === t;
}
}
class O0 {
/* CONSTRUCTOR */
constructor(t, r) {
this.color = r, this.changed = !1, this.data = t, this.type = new D0();
}
/* API */
set(t, r) {
return this.color = r, this.changed = !1, this.data = t, this.type.type = Ht.ALL, this;
}
/* HELPERS */
_ensureHSL() {
const t = this.data, { h: r, s: i, l: n } = t;
r === void 0 && (t.h = st.channel.rgb2hsl(t, "h")), i === void 0 && (t.s = st.channel.rgb2hsl(t, "s")), n === void 0 && (t.l = st.channel.rgb2hsl(t, "l"));
}
_ensureRGB() {
const t = this.data, { r, g: i, b: n } = t;
r === void 0 && (t.r = st.channel.hsl2rgb(t, "r")), i === void 0 && (t.g = st.channel.hsl2rgb(t, "g")), n === void 0 && (t.b = st.channel.hsl2rgb(t, "b"));
}
/* GETTERS */
get r() {
const t = this.data, r = t.r;
return !this.type.is(Ht.HSL) && r !== void 0 ? r : (this._ensureHSL(), st.channel.hsl2rgb(t, "r"));
}
get g() {
const t = this.data, r = t.g;
return !this.type.is(Ht.HSL) && r !== void 0 ? r : (this._ensureHSL(), st.channel.hsl2rgb(t, "g"));
}
get b() {
const t = this.data, r = t.b;
return !this.type.is(Ht.HSL) && r !== void 0 ? r : (this._ensureHSL(), st.channel.hsl2rgb(t, "b"));
}
get h() {
const t = this.data, r = t.h;
return !this.type.is(Ht.RGB) && r !== void 0 ? r : (this._ensureRGB(), st.channel.rgb2hsl(t, "h"));
}
get s() {
const t = this.data, r = t.s;
return !this.type.is(Ht.RGB) && r !== void 0 ? r : (this._ensureRGB(), st.channel.rgb2hsl(t, "s"));
}
get l() {
const t = this.data, r = t.l;
return !this.type.is(Ht.RGB) && r !== void 0 ? r : (this._ensureRGB(), st.channel.rgb2hsl(t, "l"));
}
get a() {
return this.data.a;
}
/* SETTERS */
set r(t) {
this.type.set(Ht.RGB), this.changed = !0, this.data.r = t;
}
set g(t) {
this.type.set(Ht.RGB), this.changed = !0, this.data.g = t;
}
set b(t) {
this.type.set(Ht.RGB), this.changed = !0, this.data.b = t;
}
set h(t) {
this.type.set(Ht.HSL), this.changed = !0, this.data.h = t;
}
set s(t) {
this.type.set(Ht.HSL), this.changed = !0, this.data.s = t;
}
set l(t) {
this.type.set(Ht.HSL), this.changed = !0, this.data.l = t;
}
set a(t) {
this.changed = !0, this.data.a = t;
}
}
const ns = new O0({ r: 0, g: 0, b: 0, a: 0 }, "transparent"), Jr = {
/* VARIABLES */
re: /^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,
/* API */
parse: (e) => {
if (e.charCodeAt(0) !== 35)
return;
const t = e.match(Jr.re);
if (!t)
return;
const r = t[1], i = parseInt(r, 16), n = r.length, a = n % 4 === 0, o = n > 4, s = o ? 1 : 17, l = o ? 8 : 4, c = a ? 0 : -1, h = o ? 255 : 15;
return ns.set({
r: (i >> l * (c + 3) & h) * s,
g: (i >> l * (c + 2) & h) * s,
b: (i >> l * (c + 1) & h) * s,
a: a ? (i & h) * s / 255 : 1
}, e);
},
stringify: (e) => {
const { r: t, g: r, b: i, a: n } = e;
return n < 1 ? `#${er[Math.round(t)]}${er[Math.round(r)]}${er[Math.round(i)]}${er[Math.round(n * 255)]}` : `#${er[Math.round(t)]}${er[Math.round(r)]}${er[Math.round(i)]}`;
}
}, vr = {
/* VARIABLES */
re: /^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,
hueRe: /^(.+?)(deg|grad|rad|turn)$/i,
/* HELPERS */
_hue2deg: (e) => {
const t = e.match(vr.hueRe);
if (t) {
const [, r, i] = t;
switch (i) {
case "grad":
return st.channel.clamp.h(parseFloat(r) * 0.9);
case "rad":
return st.channel.clamp.h(parseFloat(r) * 180 / Math.PI);
case "turn":
return st.channel.clamp.h(parseFloat(r) * 360);
}
}
return st.channel.clamp.h(parseFloat(e));
},
/* API */
parse: (e) => {
const t = e.charCodeAt(0);
if (t !== 104 && t !== 72)
return;
const r = e.match(vr.re);
if (!r)
return;
const [, i, n, a, o, s] = r;
return ns.set({
h: vr._hue2deg(i),
s: st.channel.clamp.s(parseFloat(n)),
l: st.channel.clamp.l(parseFloat(a)),
a: o ? st.channel.clamp.a(s ? parseFloat(o) / 100 : parseFloat(o)) : 1
}, e);
},
stringify: (e) => {
const { h: t, s: r, l: i, a: n } = e;
return n < 1 ? `hsla(${st.lang.round(t)}, ${st.lang.round(r)}%, ${st.lang.round(i)}%, ${n})` : `hsl(${st.lang.round(t)}, ${st.lang.round(r)}%, ${st.lang.round(i)}%)`;
}
}, tn = {
/* VARIABLES */
colors: {
aliceblue: "#f0f8ff",
antiquewhite: "#faebd7",
aqua: "#00ffff",
aquamarine: "#7fffd4",
azure: "#f0ffff",
beige: "#f5f5dc",
bisque: "#ffe4c4",
black: "#000000",
blanchedalmond: "#ffebcd",
blue: "#0000ff",
blueviolet: "#8a2be2",
brown: "#a52a2a",
burlywood: "#deb887",
cadetblue: "#5f9ea0",
chartreuse: "#7fff00",
chocolate: "#d2691e",
coral: "#ff7f50",
cornflowerblue: "#6495ed",
cornsilk: "#fff8dc",
crimson: "#dc143c",
cyanaqua: "#00ffff",
darkblue: "#00008b",
darkcyan: "#008b8b",
darkgoldenrod: "#b8860b",
darkgray: "#a9a9a9",
darkgreen: "#006400",
darkgrey: "#a9a9a9",
darkkhaki: "#bdb76b",
darkmagenta: "#8b008b",
darkolivegreen: "#556b2f",
darkorange: "#ff8c00",
darkorchid: "#9932cc",
darkred: "#8b0000",
darksalmon: "#e9967a",
darkseagreen: "#8fbc8f",
darkslateblue: "#483d8b",
darkslategray: "#2f4f4f",
darkslategrey: "#2f4f4f",
darkturquoise: "#00ced1",
darkviolet: "#9400d3",
deeppink: "#ff1493",
deepskyblue: "#00bfff",
dimgray: "#696969",
dimgrey: "#696969",
dodgerblue: "#1e90ff",
firebrick: "#b22222",
floralwhite: "#fffaf0",
forestgreen: "#228b22",
fuchsia: "#ff00ff",
gainsboro: "#dcdcdc",
ghostwhite: "#f8f8ff",
gold: "#ffd700",
goldenrod: "#daa520",
gray: "#808080",
green: "#008000",
greenyellow: "#adff2f",
grey: "#808080",
honeydew: "#f0fff0",
hotpink: "#ff69b4",
indianred: "#cd5c5c",
indigo: "#4b0082",
ivory: "#fffff0",
khaki: "#f0e68c",
lavender: "#e6e6fa",
lavenderblush: "#fff0f5",
lawngreen: "#7cfc00",
lemonchiffon: "#fffacd",
lightblue: "#add8e6",
lightcoral: "#f08080",
lightcyan: "#e0ffff",
lightgoldenrodyellow: "#fafad2",
lightgray: "#d3d3d3",
lightgreen: "#90ee90",
lightgrey: "#d3d3d3",
lightpink: "#ffb6c1",
lightsalmon: "#ffa07a",
lightseagreen: "#20b2aa",
lightskyblue: "#87cefa",
lightslategray: "#778899",
lightslategrey: "#778899",
lightsteelblue: "#b0c4de",
lightyellow: "#ffffe0",
lime: "#00ff00",
limegreen: "#32cd32",
linen: "#faf0e6",
magenta: "#ff00ff",
maroon: "#800000",
mediumaquamarine: "#66cdaa",
mediumblue: "#0000cd",
mediumorchid: "#ba55d3",
mediumpurple: "#9370db",
mediumseagreen: "#3cb371",
mediumslateblue: "#7b68ee",
mediumspringgreen: "#00fa9a",
mediumturquoise: "#48d1cc",
mediumvioletred: "#c71585",
midnightblue: "#191970",
mintcream: "#f5fffa",
mistyrose: "#ffe4e1",
moccasin: "#ffe4b5",
navajowhite: "#ffdead",
navy: "#000080",
oldlace: "#fdf5e6",
olive: "#808000",
olivedrab: "#6b8e23",
orange: "#ffa500",
orangered: "#ff4500",
orchid: "#da70d6",
palegoldenrod: "#eee8aa",
palegreen: "#98fb98",
paleturquoise: "#afeeee",
palevioletred: "#db7093",
papayawhip: "#ffefd5",
peachpuff: "#ffdab9",
peru: "#cd853f",
pink: "#ffc0cb",
plum: "#dda0dd",
powderblue: "#b0e0e6",
purple: "#800080",
rebeccapurple: "#663399",
red: "#ff0000",
rosybrown: "#bc8f8f",
royalblue: "#4169e1",
saddlebrown: "#8b4513",
salmon: "#fa8072",
sandybrown: "#f4a460",
seagreen: "#2e8b57",
seashell: "#fff5ee",
sienna: "#a0522d",
silver: "#c0c0c0",
skyblue: "#87ceeb",
slateblue: "#6a5acd",
slategray: "#708090",
slategrey: "#708090",
snow: "#fffafa",
springgreen: "#00ff7f",
tan: "#d2b48c",
teal: "#008080",
thistle: "#d8bfd8",
transparent: "#00000000",
turquoise: "#40e0d0",
violet: "#ee82ee",
wheat: "#f5deb3",
white: "#ffffff",
whitesmoke: "#f5f5f5",
yellow: "#ffff00",
yellowgreen: "#9acd32"
},
/* API */
parse: (e) => {
e = e.toLowerCase();
const t = tn.colors[e];
if (t)
return Jr.parse(t);
},
stringify: (e) => {
const t = Jr.stringify(e);
for (const r in tn.colors)
if (tn.colors[r] === t)
return r;
}
}, Yi = {
/* VARIABLES */
re: /^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,
/* API */
parse: (e) => {
const t = e.charCodeAt(0);
if (t !== 114 && t !== 82)
return;
const r = e.match(Yi.re);
if (!r)
return;
const [, i, n, a, o, s, l, c, h] = r;
return ns.set({
r: st.channel.clamp.r(n ? parseFloat(i) * 2.55 : parseFloat(i)),
g: st.channel.clamp.g(o ? parseFloat(a) * 2.55 : parseFloat(a)),
b: st.channel.clamp.b(l ? parseFloat(s) * 2.55 : parseFloat(s)),
a: c ? st.channel.clamp.a(h ? parseFloat(c) / 100 : parseFloat(c)) : 1
}, e);
},
stringify: (e) => {
const { r: t, g: r, b: i, a: n } = e;
return n < 1 ? `rgba(${st.lang.round(t)}, ${st.lang.round(r)}, ${st.lang.round(i)}, ${st.lang.round(n)})` : `rgb(${st.lang.round(t)}, ${st.lang.round(r)}, ${st.lang.round(i)})`;
}
}, Me = {
/* VARIABLES */
format: {
keyword: tn,
hex: Jr,
rgb: Yi,
rgba: Yi,
hsl: vr,
hsla: vr
},
/* API */
parse: (e) => {
if (typeof e != "string")
return e;
const t = Jr.parse(e) || Yi.parse(e) || vr.parse(e) || tn.parse(e);
if (t)
return t;
throw new Error(`Unsupported color format: "${e}"`);
},
stringify: (e) => !e.changed && e.color ? e.color : e.type.is(Ht.HSL) || e.data.r === void 0 ? vr.stringify(e) : e.a < 1 || !Number.isInteger(e.r) || !Number.isInteger(e.g) || !Number.isInteger(e.b) ? Yi.stringify(e) : Jr.stringify(e)
}, Au = (e, t) => {
const r = Me.parse(e);
for (const i in t)
r[i] = st.channel.clamp[i](t[i]);
return Me.stringify(r);
}, en = (e, t, r = 0, i = 1) => {
if (typeof e != "number")
return Au(e, { a: t });
const n = ns.set({
r: st.channel.clamp.r(e),
g: st.channel.clamp.g(t),
b: st.channel.clamp.b(r),
a: st.channel.clamp.a(i)
});
return Me.stringify(n);
}, R0 = (e) => {
const { r: t, g: r, b: i } = Me.parse(e), n = 0.2126 * st.channel.toLinear(t) + 0.7152 * st.channel.toLinear(r) + 0.0722 * st.channel.toLinear(i);
return st.lang.round(n);
}, I0 = (e) => R0(e) >= 0.5, _n = (e) => !I0(e), Mu = (e, t, r) => {
const i = Me.parse(e), n = i[t], a = st.channel.clamp[t](n + r);
return n !== a && (i[t] = a), Me.stringify(i);
}, H = (e, t) => Mu(e, "l", t), et = (e, t) => Mu(e, "l", -t), S = (e, t) => {
const r = Me.parse(e), i = {};
for (const n in t)
t[n] && (i[n] = r[n] + t[n]);
return Au(e, i);
}, P0 = (e, t, r = 50) => {
const { r: i, g: n, b: a, a: o } = Me.parse(e), { r: s, g: l, b: c, a: h } = Me.parse(t), u = r / 100, f = u * 2 - 1, d = o - h, m = ((f * d === -1 ? f : (f + d) / (1 + f * d)) + 1) / 2, x = 1 - m, b = i * m + s * x, y = n * m + l * x, w = a * m + c * x, _ = o * u + h * (1 - u);
return en(b, y, w, _);
}, W = (e, t = 100) => {
const r = Me.parse(e);
return r.r = 255 - r.r, r.g = 255 - r.g, r.b = 255 - r.b, P0(r, e, t);
};
/*! @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: Eu,
setPrototypeOf: Wc,
isFrozen: N0,
getPrototypeOf: z0,
getOwnPropertyDescriptor: W0
} = Object;
let {
freeze: Qt,
seal: ge,
create: $u
} = Object, {
apply: go,
construct: mo
} = typeof Reflect < "u" && Reflect;
Qt || (Qt = function(t) {
return t;
});
ge || (ge = function(t) {
return t;
});
go || (go = function(t, r, i) {
return t.apply(r, i);
});
mo || (mo = function(t, r) {
return new t(...r);
});
const Hn = Jt(Array.prototype.forEach), q0 = Jt(Array.prototype.lastIndexOf), qc = Jt(Array.prototype.pop), Ei = Jt(Array.prototype.push), H0 = Jt(Array.prototype.splice), sa = Jt(String.prototype.toLowerCase), zs = Jt(String.prototype.toString), Hc = Jt(String.prototype.match), $i = Jt(String.prototype.replace), j0 = Jt(String.prototype.indexOf), U0 = Jt(String.prototype.trim), ye = Jt(Object.prototype.hasOwnProperty), Gt = Jt(RegExp.prototype.test), Fi = Y0(TypeError);
function Jt(e) {
return function(t) {
t instanceof RegExp && (t.lastIndex = 0);
for (var r = arguments.length, i = new Array(r > 1 ? r - 1 : 0), n = 1; n < r; n++)
i[n - 1] = arguments[n];
return go(e, t, i);
};
}
function Y0(e) {
return function() {
for (var t = arguments.length, r = new Array(t), i = 0; i < t; i++)
r[i] = arguments[i];
return mo(e, r);
};
}
function ht(e, t) {
let r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : sa;
Wc && Wc(e, null);
let i = t.length;
for (; i--; ) {
let n = t[i];
if (typeof n == "string") {
const a = r(n);
a !== n && (N0(t) || (t[i] = a), n = a);
}
e[n] = !0;
}
return e;
}
function G0(e) {
for (let t = 0; t < e.length; t++)
ye(e, t) || (e[t] = null);
return e;
}
function ze(e) {
const t = $u(null);
for (const [r, i] of Eu(e))
ye(e, r) && (Array.isArray(i) ? t[r] = G0(i) : i && typeof i == "object" && i.constructor === Object ? t[r] = ze(i) : t[r] = i);
return t;
}
function Di(e, t) {
for (; e !== null; ) {
const i = W0(e, t);
if (i) {
if (i.get)
return Jt(i.get);
if (typeof i.value == "function")
return Jt(i.value);
}
e = z0(e);
}
function r() {
return null;
}
return r;
}
const jc = Qt(["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"]), Ws = Qt(["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"]), qs = Qt(["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"]), V0 = Qt(["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"]), Hs = Qt(["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"]), X0 = Qt(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), Uc = Qt(["#text"]), Yc = Qt(["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"]), js = Qt(["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"]), Gc = Qt(["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"]), jn = Qt(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), Z0 = ge(/\{\{[\w\W]*|[\w\W]*\}\}/gm), K0 = ge(/<%[\w\W]*|[\w\W]*%>/gm), Q0 = ge(/\$\{[\w\W]*/gm), J0 = ge(/^data-[\-\w.\u00B7-\uFFFF]+$/), tx = ge(/^aria-[\-\w]+$/), Fu = ge(
/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
// eslint-disable-line no-useless-escape
), ex = ge(/^(?:\w+script|data):/i), rx = ge(
/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
// eslint-disable-line no-control-regex
), Du = ge(/^html$/i), ix = ge(/^[a-z][.\w]*(-[.\w]+)+$/i);
var Vc = /* @__PURE__ */ Object.freeze({
__proto__: null,
ARIA_ATTR: tx,
ATTR_WHITESPACE: rx,
CUSTOM_ELEMENT: ix,
DATA_ATTR: J0,
DOCTYPE_NAME: Du,
ERB_EXPR: K0,
IS_ALLOWED_URI: Fu,
IS_SCRIPT_OR_DATA: ex,
MUSTACHE_EXPR: Z0,
TMPLIT_EXPR: Q0
});
const Oi = {
element: 1,
text: 3,
// Deprecated
progressingInstruction: 7,
comment: 8,
document: 9
}, nx = function() {
return typeof window > "u" ? null : window;
}, ax = function(t, r) {
if (typeof t != "object" || typeof t.createPolicy != "function")
return null;
let i = null;
const n = "data-tt-policy-suffix";
r && r.hasAttribute(n) && (i = r.getAttribute(n));
const a = "dompurify" + (i ? "#" + i : "");
try {
return t.createPolicy(a, {
createHTML(o) {
return o;
},
createScriptURL(o) {
return o;
}
});
} catch {
return console.warn("TrustedTypes policy " + a + " could not be created."), null;
}
}, Xc = function() {
return {
afterSanitizeAttributes: [],
afterSanitizeElements: [],
afterSanitizeShadowDOM: [],
beforeSanitizeAttributes: [],
beforeSanitizeElements: [],
beforeSanitizeShadowDOM: [],
uponSanitizeAttribute: [],
uponSanitizeElement: [],
uponSanitizeShadowNode: []
};
};
function Ou() {
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : nx();
const t = (tt) => Ou(tt);
if (t.version = "3.2.6", t.removed = [], !e || !e.document || e.document.nodeType !== Oi.document || !e.Element)
return t.isSupported = !1, t;
let {
document: r
} = e;
const i = r, n = i.currentScript, {
DocumentFragment: a,
HTMLTemplateElement: o,
Node: s,
Element: l,
NodeFilter: c,
NamedNodeMap: h = e.NamedNodeMap || e.MozNamedAttrMap,
HTMLFormElement: u,
DOMParser: f,
trustedTypes: d
} = e, g = l.prototype, m = Di(g, "cloneNode"), x = Di(g, "remove"), b = Di(g, "nextSibling"), y = Di(g, "childNodes"), w = Di(g, "parentNode");
if (typeof o == "function") {
const tt = r.createElement("template");
tt.content && tt.content.ownerDocument && (r = tt.content.ownerDocument);
}
let _, v = "";
const {
implementation: L,
createNodeIterator: B,
createDocumentFragment: I,
getElementsByTagName: k
} = r, {
importNode: E
} = i;
let T = Xc();
t.isSupported = typeof Eu == "function" && typeof w == "function" && L && L.createHTMLDocument !== void 0;
const {
MUSTACHE_EXPR: D,
ERB_EXPR: F,
TMPLIT_EXPR: M,
DATA_ATTR: $,
ARIA_ATTR: A,
IS_SCRIPT_OR_DATA: P,
ATTR_WHITESPACE: R,
CUSTOM_ELEMENT: q
} = Vc;
let {
IS_ALLOWED_URI: Y
} = Vc, U = null;
const rt = ht({}, [...jc, ...Ws, ...qs, ...Hs, ...Uc]);
let J = null;
const ut = ht({}, [...Yc, ...js, ...Gc, ...jn]);
let it = Object.seal($u(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
}
})), Tt = null, O = null, xt = !0, lt = !0, ct = !1, vt = !0, Bt = !1, he = !0, Yt = !1, Rn = !1, $s = !1, Wr = !1, In = !1, Pn = !1, wc = !0, vc = !1;
const o0 = "user-content-";
let Fs = !0, Ti = !1, qr = {}, Hr = null;
const Cc = ht({}, ["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 _c = null;
const kc = ht({}, ["audio", "video", "img", "source", "image", "track"]);
let Ds = null;
const Sc = ht({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), Nn = "http://www.w3.org/1998/Math/MathML", zn = "http://www.w3.org/2000/svg", De = "http://www.w3.org/1999/xhtml";
let jr = De, Os = !1, Rs = null;
const l0 = ht({}, [Nn, zn, De], zs);
let Wn = ht({}, ["mi", "mo", "mn", "ms", "mtext"]), qn = ht({}, ["annotation-xml"]);
const c0 = ht({}, ["title", "style", "font", "a", "script"]);
let Bi = null;
const h0 = ["application/xhtml+xml", "text/html"], u0 = "text/html";
let It = null, Ur = null;
const f0 = r.createElement("form"), Tc = function(C) {
return C instanceof RegExp || C instanceof Function;
}, Is = function() {
let C = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
if (!(Ur && Ur === C)) {
if ((!C || typeof C != "object") && (C = {}), C = ze(C), Bi = // eslint-disable-next-line unicorn/prefer-includes
h0.indexOf(C.PARSER_MEDIA_TYPE) === -1 ? u0 : C.PARSER_MEDIA_TYPE, It = Bi === "application/xhtml+xml" ? zs : sa, U = ye(C, "ALLOWED_TAGS") ? ht({}, C.ALLOWED_TAGS, It) : rt, J = ye(C, "ALLOWED_ATTR") ? ht({}, C.ALLOWED_ATTR, It) : ut, Rs = ye(C, "ALLOWED_NAMESPACES") ? ht({}, C.ALLOWED_NAMESPACES, zs) : l0, Ds = ye(C, "ADD_URI_SAFE_ATTR") ? ht(ze(Sc), C.ADD_URI_SAFE_ATTR, It) : Sc, _c = ye(C, "ADD_DATA_URI_TAGS") ? ht(ze(kc), C.ADD_DATA_URI_TAGS, It) : kc, Hr = ye(C, "FORBID_CONTENTS") ? ht({}, C.FORBID_CONTENTS, It) : Cc, Tt = ye(C, "FORBID_TAGS") ? ht({}, C.FORBID_TAGS, It) : ze({}), O = ye(C, "FORBID_ATTR") ? ht({}, C.FORBID_ATTR, It) : ze({}), qr = ye(C, "USE_PROFILES") ? C.USE_PROFILES : !1, xt = C.ALLOW_ARIA_ATTR !== !1, lt = C.ALLOW_DATA_ATTR !== !1, ct = C.ALLOW_UNKNOWN_PROTOCOLS || !1, vt = C.ALLOW_SELF_CLOSE_IN_ATTR !== !1, Bt = C.SAFE_FOR_TEMPLATES || !1, he = C.SAFE_FOR_XML !== !1, Yt = C.WHOLE_DOCUMENT || !1, Wr = C.RETURN_DOM || !1, In = C.RETURN_DOM_FRAGMENT || !1, Pn = C.RETURN_TRUSTED_TYPE || !1, $s = C.FORCE_BODY || !1, wc = C.SANITIZE_DOM !== !1, vc = C.SANITIZE_NAMED_PROPS || !1, Fs = C.KEEP_CONTENT !== !1, Ti = C.IN_PLACE || !1, Y = C.ALLOWED_URI_REGEXP || Fu, jr = C.NAMESPACE || De, Wn = C.MATHML_TEXT_INTEGRATION_POINTS || Wn, qn = C.HTML_INTEGRATION_POINTS || qn, it = C.CUSTOM_ELEMENT_HANDLING || {}, C.CUSTOM_ELEMENT_HANDLING && Tc(C.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (it.tagNameCheck = C.CUSTOM_ELEMENT_HANDLING.tagNameCheck), C.CUSTOM_ELEMENT_HANDLING && Tc(C.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (it.attributeNameCheck = C.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), C.CUSTOM_ELEMENT_HANDLING && typeof C.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (it.allowCustomizedBuiltInElements = C.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), Bt && (lt = !1), In && (Wr = !0), qr && (U = ht({}, Uc), J = [], qr.html === !0 && (ht(U, jc), ht(J, Yc)), qr.svg === !0 && (ht(U, Ws), ht(J, js), ht(J, jn)), qr.svgFilters === !0 && (ht(U, qs), ht(J, js), ht(J, jn)), qr.mathMl === !0 && (ht(U, Hs), ht(J, Gc), ht(J, jn))), C.ADD_TAGS && (U === rt && (U = ze(U)), ht(U, C.ADD_TAGS, It)), C.ADD_ATTR && (J === ut && (J = ze(J)), ht(J, C.ADD_ATTR, It)), C.ADD_URI_SAFE_ATTR && ht(Ds, C.ADD_URI_SAFE_ATTR, It), C.FORBID_CONTENTS && (Hr === Cc && (Hr = ze(Hr)), ht(Hr, C.FORBID_CONTENTS, It)), Fs && (U["#text"] = !0), Yt && ht(U, ["html", "head", "body"]), U.table && (ht(U, ["tbody"]), delete Tt.tbody), C.TRUSTED_TYPES_POLICY) {
if (typeof C.TRUSTED_TYPES_POLICY.createHTML != "function")
throw Fi('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
if (typeof C.TRUSTED_TYPES_POLICY.createScriptURL != "function")
throw Fi('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
_ = C.TRUSTED_TYPES_POLICY, v = _.createHTML("");
} else
_ === void 0 && (_ = ax(d, n)), _ !== null && typeof v == "string" && (v = _.createHTML(""));
Qt && Qt(C), Ur = C;
}
}, Bc = ht({}, [...Ws, ...qs, ...V0]), Lc = ht({}, [...Hs, ...X0]), d0 = function(C) {
let z = w(C);
(!z || !z.tagName) && (z = {
namespaceURI: jr,
tagName: "template"
});
const V = sa(C.tagName), _t = sa(z.tagName);
return Rs[C.namespaceURI] ? C.namespaceURI === zn ? z.namespaceURI === De ? V === "svg" : z.namespaceURI === Nn ? V === "svg" && (_t === "annotation-xml" || Wn[_t]) : !!Bc[V] : C.namespaceURI === Nn ? z.namespaceURI === De ? V === "math" : z.namespaceURI === zn ? V === "math" && qn[_t] : !!Lc[V] : C.namespaceURI === De ? z.namespaceURI === zn && !qn[_t] || z.namespaceURI === Nn && !Wn[_t] ? !1 : !Lc[V] && (c0[V] || !Bc[V]) : !!(Bi === "application/xhtml+xml" && Rs[C.namespaceURI]) : !1;
}, Ce = function(C) {
Ei(t.removed, {
element: C
});
try {
w(C).removeChild(C);
} catch {
x(C);
}
}, Yr = function(C, z) {
try {
Ei(t.removed, {
attribute: z.getAttributeNode(C),
from: z
});
} catch {
Ei(t.removed, {
attribute: null,
from: z
});
}
if (z.removeAttribute(C), C === "is")
if (Wr || In)
try {
Ce(z);
} catch {
}
else
try {
z.setAttribute(C, "");
} catch {
}
}, Ac = function(C) {
let z = null, V = null;
if ($s)
C = "<remove></remove>" + C;
else {
const Et = Hc(C, /^[\r\n\t ]+/);
V = Et && Et[0];
}
Bi === "application/xhtml+xml" && jr === De && (C = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + C + "</body></html>");
const _t = _ ? _.createHTML(C) : C;
if (jr === De)
try {
z = new f().parseFromString(_t, Bi);
} catch {
}
if (!z || !z.documentElement) {
z = L.createDocument(jr, "template", null);
try {
z.documentElement.innerHTML = Os ? v : _t;
} catch {
}
}
const Wt = z.body || z.documentElement;
return C && V && Wt.insertBefore(r.createTextNode(V), Wt.childNodes[0] || null), jr === De ? k.call(z, Yt ? "html" : "body")[0] : Yt ? z.documentElement : Wt;
}, Mc = function(C) {
return B.call(
C.ownerDocument || C,
C,
// eslint-disable-next-line no-bitwise
c.SHOW_ELEMENT | c.SHOW_COMMENT | c.SHOW_TEXT | c.SHOW_PROCESSING_INSTRUCTION | c.SHOW_CDATA_SECTION,
null
);
}, Ps = function(C) {
return C instanceof u && (typeof C.nodeName != "string" || typeof C.textContent != "string" || typeof C.removeChild != "function" || !(C.attributes instanceof h) || typeof C.removeAttribute != "function" || typeof C.setAttribute != "function" || typeof C.namespaceURI != "string" || typeof C.insertBefore != "function" || typeof C.hasChildNodes != "function");
}, Ec = function(C) {
return typeof s == "function" && C instanceof s;
};
function Oe(tt, C, z) {
Hn(tt, (V) => {
V.call(t, C, z, Ur);
});
}
const $c = function(C) {
let z = null;
if (Oe(T.beforeSanitizeElements, C, null), Ps(C))
return Ce(C), !0;
const V = It(C.nodeName);
if (Oe(T.uponSanitizeElement, C, {
tagName: V,
allowedTags: U
}), he && C.hasChildNodes() && !Ec(C.firstElementChild) && Gt(/<[/\w!]/g, C.innerHTML) && Gt(/<[/\w!]/g, C.textContent) || C.nodeType === Oi.progressingInstruction || he && C.nodeType === Oi.comment && Gt(/<[/\w]/g, C.data))
return Ce(C), !0;
if (!U[V] || Tt[V]) {
if (!Tt[V] && Dc(V) && (it.tagNameCheck instanceof RegExp && Gt(it.tagNameCheck, V) || it.tagNameCheck instanceof Function && it.tagNameCheck(V)))
return !1;
if (Fs && !Hr[V]) {
const _t = w(C) || C.parentNode, Wt = y(C) || C.childNodes;
if (Wt && _t) {
const Et = Wt.length;
for (let te = Et - 1; te >= 0; --te) {
const Re = m(Wt[te], !0);
Re.__removalCount = (C.__removalCount || 0) + 1, _t.insertBefore(Re, b(C));
}
}
}
return Ce(C), !0;
}
return C instanceof l && !d0(C) || (V === "noscript" || V === "noembed" || V === "noframes") && Gt(/<\/no(script|embed|frames)/i, C.innerHTML) ? (Ce(C), !0) : (Bt && C.nodeType === Oi.text && (z = C.textContent, Hn([D, F, M], (_t) => {
z = $i(z, _t, " ");
}), C.textContent !== z && (Ei(t.removed, {
element: C.cloneNode()
}), C.textContent = z)), Oe(T.afterSanitizeElements, C, null), !1);
}, Fc = function(C, z, V) {
if (wc && (z === "id" || z === "name") && (V in r || V in f0))
return !1;
if (!(lt && !O[z] && Gt($, z))) {
if (!(xt && Gt(A, z))) {
if (!J[z] || O[z]) {
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