UNPKG

vue-mermaid-string

Version:

A Vue.js component that turns a Mermaid string into a diagram.

1,197 lines 641 kB
import { defineComponent as t0, useTemplateRef as e0, computed as rs, onBeforeUnmount as r0, onMounted as i0, watch as n0, nextTick as a0, createElementBlock as s0, openBlock as o0, toDisplayString as l0 } from "vue"; var Yl = { name: "mermaid", version: "11.12.2", description: "Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.", type: "module", module: "./dist/mermaid.core.mjs", types: "./dist/mermaid.d.ts", exports: { ".": { types: "./dist/mermaid.d.ts", import: "./dist/mermaid.core.mjs", default: "./dist/mermaid.core.mjs" }, "./*": "./*" }, keywords: [ "diagram", "markdown", "flowchart", "sequence diagram", "gantt", "class diagram", "git graph", "mindmap", "packet diagram", "c4 diagram", "er diagram", "pie chart", "pie diagram", "quadrant chart", "requirement diagram", "graph" ], scripts: { clean: "rimraf dist", dev: "pnpm -w dev", "docs:code": "typedoc src/defaultConfig.ts src/config.ts src/mermaid.ts && prettier --write ./src/docs/config/setup", "docs:build": "rimraf ../../docs && pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts", "docs:verify": "pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts --verify", "docs:pre:vitepress": "pnpm --filter ./src/docs prefetch && rimraf src/vitepress && pnpm docs:code && tsx scripts/docs.cli.mts --vitepress && pnpm --filter ./src/vitepress install --no-frozen-lockfile --ignore-scripts", "docs:build:vitepress": "pnpm docs:pre:vitepress && (cd src/vitepress && pnpm run build) && cpy --flat src/docs/landing/ ./src/vitepress/.vitepress/dist/landing", "docs:dev": 'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev" "tsx scripts/docs.cli.mts --watch --vitepress"', "docs:dev:docker": 'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev:docker" "tsx scripts/docs.cli.mts --watch --vitepress"', "docs:serve": "pnpm docs:build:vitepress && vitepress serve src/vitepress", "docs:spellcheck": 'cspell "src/docs/**/*.md"', "docs:release-version": "tsx scripts/update-release-version.mts", "docs:verify-version": "tsx scripts/update-release-version.mts --verify", "types:build-config": "tsx scripts/create-types-from-json-schema.mts", "types:verify-config": "tsx scripts/create-types-from-json-schema.mts --verify", checkCircle: "npx madge --circular ./src", prepublishOnly: "pnpm docs:verify-version" }, repository: { type: "git", url: "https://github.com/mermaid-js/mermaid" }, author: "Knut Sveidqvist", license: "MIT", standard: { ignore: [ "**/parser/*.js", "dist/**/*.js", "cypress/**/*.js" ], globals: [ "page" ] }, dependencies: { "@braintree/sanitize-url": "^7.1.1", "@iconify/utils": "^3.0.1", "@mermaid-js/parser": "workspace:^", "@types/d3": "^7.4.3", cytoscape: "^3.29.3", "cytoscape-cose-bilkent": "^4.1.0", "cytoscape-fcose": "^2.2.0", d3: "^7.9.0", "d3-sankey": "^0.12.3", "dagre-d3-es": "7.0.13", dayjs: "^1.11.18", dompurify: "^3.2.5", katex: "^0.16.22", khroma: "^2.1.0", "lodash-es": "^4.17.21", marked: "^16.2.1", roughjs: "^4.6.6", stylis: "^4.3.6", "ts-dedent": "^2.2.0", uuid: "^11.1.0" }, devDependencies: { "@adobe/jsonschema2md": "^8.0.5", "@iconify/types": "^2.0.0", "@types/cytoscape": "^3.21.9", "@types/cytoscape-fcose": "^2.2.4", "@types/d3-sankey": "^0.12.4", "@types/d3-scale": "^4.0.9", "@types/d3-scale-chromatic": "^3.1.0", "@types/d3-selection": "^3.0.11", "@types/d3-shape": "^3.1.7", "@types/jsdom": "^21.1.7", "@types/katex": "^0.16.7", "@types/lodash-es": "^4.17.12", "@types/micromatch": "^4.0.9", "@types/stylis": "^4.2.7", "@types/uuid": "^10.0.0", ajv: "^8.17.1", canvas: "^3.1.2", chokidar: "3.6.0", concurrently: "^9.1.2", "csstree-validator": "^4.0.1", globby: "^14.1.0", jison: "^0.4.18", "js-base64": "^3.7.8", jsdom: "^26.1.0", "json-schema-to-typescript": "^15.0.4", micromatch: "^4.0.8", "path-browserify": "^1.0.1", prettier: "^3.5.3", remark: "^15.0.1", "remark-frontmatter": "^5.0.0", "remark-gfm": "^4.0.1", rimraf: "^6.0.1", "start-server-and-test": "^2.0.13", "type-fest": "^4.35.0", typedoc: "^0.28.12", "typedoc-plugin-markdown": "^4.8.1", typescript: "~5.7.3", "unist-util-flatmap": "^1.0.0", "unist-util-visit": "^5.0.0", vitepress: "^1.6.4", "vitepress-plugin-search": "1.0.4-alpha.22" }, files: [ "dist/", "README.md" ], publishConfig: { access: "public" } }; function c0(e) { return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e; } var wn = { exports: {} }, h0 = wn.exports, Ul; function u0() { return Ul || (Ul = 1, (function(e, t) { (function(r, i) { e.exports = i(); })(h0, (function() { var r = 1e3, i = 6e4, n = 36e5, a = "millisecond", s = "second", o = "minute", l = "hour", c = "day", h = "week", u = "month", f = "quarter", d = "year", g = "date", m = "Invalid Date", y = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, x = /\[([^\]]+)]|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, b = { 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(B) { var L = ["th", "st", "nd", "rd"], T = B % 100; return "[" + B + (L[(T - 20) % 10] || L[T] || L[0]) + "]"; } }, C = function(B, L, T) { var E = String(B); return !E || E.length >= L ? B : "" + Array(L + 1 - E.length).join(T) + B; }, k = { s: C, z: function(B) { var L = -B.utcOffset(), T = Math.abs(L), E = Math.floor(T / 60), M = T % 60; return (L <= 0 ? "+" : "-") + C(E, 2, "0") + ":" + C(M, 2, "0"); }, m: function B(L, T) { if (L.date() < T.date()) return -B(T, L); var E = 12 * (T.year() - L.year()) + (T.month() - L.month()), M = L.clone().add(E, u), q = T - M < 0, X = L.clone().add(E + (q ? -1 : 1), u); return +(-(E + (T - M) / (q ? M - X : X - M)) || 0); }, a: function(B) { return B < 0 ? Math.ceil(B) || 0 : Math.floor(B); }, p: function(B) { return { M: u, y: d, w: h, d: c, D: g, h: l, m: o, s, ms: a, Q: f }[B] || String(B || "").toLowerCase().replace(/s$/, ""); }, u: function(B) { return B === void 0; } }, w = "en", A = {}; A[w] = b; var S = "$isDayjsObject", D = function(B) { return B instanceof N || !(!B || !B[S]); }, I = function B(L, T, E) { var M; if (!L) return w; if (typeof L == "string") { var q = L.toLowerCase(); A[q] && (M = q), T && (A[q] = T, M = q); var X = L.split("-"); if (!M && X.length > 1) return B(X[0]); } else { var K = L.name; A[K] = L, M = K; } return !E && M && (w = M), M || !E && w; }, O = function(B, L) { if (D(B)) return B.clone(); var T = typeof L == "object" ? L : {}; return T.date = B, T.args = arguments, new N(T); }, $ = k; $.l = I, $.i = D, $.w = function(B, L) { return O(B, { locale: L.$L, utc: L.$u, x: L.$x, $offset: L.$offset }); }; var N = (function() { function B(T) { this.$L = I(T.locale, null, !0), this.parse(T), this.$x = this.$x || T.x || {}, this[S] = !0; } var L = B.prototype; return L.parse = function(T) { this.$d = (function(E) { var M = E.date, q = E.utc; if (M === null) return /* @__PURE__ */ new Date(NaN); if ($.u(M)) return /* @__PURE__ */ new Date(); if (M instanceof Date) return new Date(M); if (typeof M == "string" && !/Z$/i.test(M)) { var X = M.match(y); if (X) { var K = X[2] - 1 || 0, J = (X[7] || "0").substring(0, 3); return q ? new Date(Date.UTC(X[1], K, X[3] || 1, X[4] || 0, X[5] || 0, X[6] || 0, J)) : new Date(X[1], K, X[3] || 1, X[4] || 0, X[5] || 0, X[6] || 0, J); } } return new Date(M); })(T), this.init(); }, L.init = function() { var T = this.$d; this.$y = T.getFullYear(), this.$M = T.getMonth(), this.$D = T.getDate(), this.$W = T.getDay(), this.$H = T.getHours(), this.$m = T.getMinutes(), this.$s = T.getSeconds(), this.$ms = T.getMilliseconds(); }, L.$utils = function() { return $; }, L.isValid = function() { return this.$d.toString() !== m; }, L.isSame = function(T, E) { var M = O(T); return this.startOf(E) <= M && M <= this.endOf(E); }, L.isAfter = function(T, E) { return O(T) < this.startOf(E); }, L.isBefore = function(T, E) { return this.endOf(E) < O(T); }, L.$g = function(T, E, M) { return $.u(T) ? this[E] : this.set(M, T); }, L.unix = function() { return Math.floor(this.valueOf() / 1e3); }, L.valueOf = function() { return this.$d.getTime(); }, L.startOf = function(T, E) { var M = this, q = !!$.u(E) || E, X = $.p(T), K = function(re, yt) { var ie = $.w(M.$u ? Date.UTC(M.$y, yt, re) : new Date(M.$y, yt, re), M); return q ? ie : ie.endOf(c); }, J = function(re, yt) { return $.w(M.toDate()[re].apply(M.toDate("s"), (q ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(yt)), M); }, Z = this.$W, ct = this.$M, at = this.$D, bt = "set" + (this.$u ? "UTC" : ""); switch (X) { case d: return q ? K(1, 0) : K(31, 11); case u: return q ? K(1, ct) : K(0, ct + 1); case h: var Ct = this.$locale().weekStart || 0, Pt = (Z < Ct ? Z + 7 : Z) - Ct; return K(q ? at - Pt : at + (6 - Pt), ct); case c: case g: return J(bt + "Hours", 0); case l: return J(bt + "Minutes", 1); case o: return J(bt + "Seconds", 2); case s: return J(bt + "Milliseconds", 3); default: return this.clone(); } }, L.endOf = function(T) { return this.startOf(T, !1); }, L.$set = function(T, E) { var M, q = $.p(T), X = "set" + (this.$u ? "UTC" : ""), K = (M = {}, M[c] = X + "Date", M[g] = X + "Date", M[u] = X + "Month", M[d] = X + "FullYear", M[l] = X + "Hours", M[o] = X + "Minutes", M[s] = X + "Seconds", M[a] = X + "Milliseconds", M)[q], J = q === c ? this.$D + (E - this.$W) : E; if (q === u || q === d) { var Z = this.clone().set(g, 1); Z.$d[K](J), Z.init(), this.$d = Z.set(g, Math.min(this.$D, Z.daysInMonth())).$d; } else K && this.$d[K](J); return this.init(), this; }, L.set = function(T, E) { return this.clone().$set(T, E); }, L.get = function(T) { return this[$.p(T)](); }, L.add = function(T, E) { var M, q = this; T = Number(T); var X = $.p(E), K = function(ct) { var at = O(q); return $.w(at.date(at.date() + Math.round(ct * T)), q); }; if (X === u) return this.set(u, this.$M + T); if (X === d) return this.set(d, this.$y + T); if (X === c) return K(1); if (X === h) return K(7); var J = (M = {}, M[o] = i, M[l] = n, M[s] = r, M)[X] || 1, Z = this.$d.getTime() + T * J; return $.w(Z, this); }, L.subtract = function(T, E) { return this.add(-1 * T, E); }, L.format = function(T) { var E = this, M = this.$locale(); if (!this.isValid()) return M.invalidDate || m; var q = T || "YYYY-MM-DDTHH:mm:ssZ", X = $.z(this), K = this.$H, J = this.$m, Z = this.$M, ct = M.weekdays, at = M.months, bt = M.meridiem, Ct = function(yt, ie, Pe, ne) { return yt && (yt[ie] || yt(E, q)) || Pe[ie].slice(0, ne); }, Pt = function(yt) { return $.s(K % 12 || 12, yt, "0"); }, re = bt || function(yt, ie, Pe) { var ne = yt < 12 ? "AM" : "PM"; return Pe ? ne.toLowerCase() : ne; }; return q.replace(x, (function(yt, ie) { return ie || (function(Pe) { switch (Pe) { case "YY": return String(E.$y).slice(-2); case "YYYY": return $.s(E.$y, 4, "0"); case "M": return Z + 1; case "MM": return $.s(Z + 1, 2, "0"); case "MMM": return Ct(M.monthsShort, Z, at, 3); case "MMMM": return Ct(at, Z); case "D": return E.$D; case "DD": return $.s(E.$D, 2, "0"); case "d": return String(E.$W); case "dd": return Ct(M.weekdaysMin, E.$W, ct, 2); case "ddd": return Ct(M.weekdaysShort, E.$W, ct, 3); case "dddd": return ct[E.$W]; case "H": return String(K); case "HH": return $.s(K, 2, "0"); case "h": return Pt(1); case "hh": return Pt(2); case "a": return re(K, J, !0); case "A": return re(K, J, !1); case "m": return String(J); case "mm": return $.s(J, 2, "0"); case "s": return String(E.$s); case "ss": return $.s(E.$s, 2, "0"); case "SSS": return $.s(E.$ms, 3, "0"); case "Z": return X; } return null; })(yt) || X.replace(":", ""); })); }, L.utcOffset = function() { return 15 * -Math.round(this.$d.getTimezoneOffset() / 15); }, L.diff = function(T, E, M) { var q, X = this, K = $.p(E), J = O(T), Z = (J.utcOffset() - this.utcOffset()) * i, ct = this - J, at = function() { return $.m(X, J); }; switch (K) { case d: q = at() / 12; break; case u: q = at(); break; case f: q = at() / 3; break; case h: q = (ct - Z) / 6048e5; break; case c: q = (ct - Z) / 864e5; break; case l: q = ct / n; break; case o: q = ct / i; break; case s: q = ct / r; break; default: q = ct; } return M ? q : $.a(q); }, L.daysInMonth = function() { return this.endOf(u).$D; }, L.$locale = function() { return A[this.$L]; }, L.locale = function(T, E) { if (!T) return this.$L; var M = this.clone(), q = I(T, E, !0); return q && (M.$L = q), M; }, L.clone = function() { return $.w(this.$d, this); }, L.toDate = function() { return new Date(this.valueOf()); }, L.toJSON = function() { return this.isValid() ? this.toISOString() : null; }, L.toISOString = function() { return this.$d.toISOString(); }, L.toString = function() { return this.$d.toUTCString(); }, B; })(), R = N.prototype; return O.prototype = R, [["$ms", a], ["$s", s], ["$m", o], ["$H", l], ["$W", c], ["$M", u], ["$y", d], ["$D", g]].forEach((function(B) { R[B[1]] = function(L) { return this.$g(L, B[0], B[1]); }; })), O.extend = function(B, L) { return B.$i || (B(L, N, O), B.$i = !0), O; }, O.locale = I, O.isDayjs = D, O.unix = function(B) { return O(1e3 * B); }, O.en = A[w], O.Ls = A, O.p = {}, O; })); })(wn)), wn.exports; } var f0 = u0(); const d0 = /* @__PURE__ */ c0(f0); var Bh = Object.defineProperty, p = (e, t) => Bh(e, "name", { value: t, configurable: !0 }), p0 = (e, t) => { for (var r in t) Bh(e, r, { get: t[r], enumerable: !0 }); }, Ae = { trace: 0, debug: 1, info: 2, warn: 3, error: 4, fatal: 5 }, F = { trace: /* @__PURE__ */ p((...e) => { }, "trace"), debug: /* @__PURE__ */ p((...e) => { }, "debug"), info: /* @__PURE__ */ p((...e) => { }, "info"), warn: /* @__PURE__ */ p((...e) => { }, "warn"), error: /* @__PURE__ */ p((...e) => { }, "error"), fatal: /* @__PURE__ */ p((...e) => { }, "fatal") }, To = /* @__PURE__ */ p(function(e = "fatal") { let t = Ae.fatal; typeof e == "string" ? e.toLowerCase() in Ae && (t = Ae[e]) : typeof e == "number" && (t = e), F.trace = () => { }, F.debug = () => { }, F.info = () => { }, F.warn = () => { }, F.error = () => { }, F.fatal = () => { }, t <= Ae.fatal && (F.fatal = console.error ? console.error.bind(console, Qt("FATAL"), "color: orange") : console.log.bind(console, "\x1B[35m", Qt("FATAL"))), t <= Ae.error && (F.error = console.error ? console.error.bind(console, Qt("ERROR"), "color: orange") : console.log.bind(console, "\x1B[31m", Qt("ERROR"))), t <= Ae.warn && (F.warn = console.warn ? console.warn.bind(console, Qt("WARN"), "color: orange") : console.log.bind(console, "\x1B[33m", Qt("WARN"))), t <= Ae.info && (F.info = console.info ? console.info.bind(console, Qt("INFO"), "color: lightblue") : console.log.bind(console, "\x1B[34m", Qt("INFO"))), t <= Ae.debug && (F.debug = console.debug ? console.debug.bind(console, Qt("DEBUG"), "color: lightgreen") : console.log.bind(console, "\x1B[32m", Qt("DEBUG"))), t <= Ae.trace && (F.trace = console.debug ? console.debug.bind(console, Qt("TRACE"), "color: lightgreen") : console.log.bind(console, "\x1B[32m", Qt("TRACE"))); }, "setLogLevel"), Qt = /* @__PURE__ */ p((e) => `%c${d0().format("ss.SSS")} : ${e} : `, "format"); const kn = { /* 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 kn.hue2rgb(a, n, e + 1 / 3) * 255; case "g": return kn.hue2rgb(a, n, e) * 255; case "b": return kn.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), s = (n + a) / 2; if (i === "l") return s * 100; if (n === a) return 0; const o = n - a, l = s > 0.5 ? o / (2 - n - a) : o / (n + a); if (i === "s") return l * 100; switch (n) { case e: return ((t - r) / o + (t < r ? 6 : 0)) * 60; case t: return ((r - e) / o + 2) * 60; case r: return ((e - t) / o + 4) * 60; default: return -1; } } }, g0 = { /* 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 }, m0 = { /* API */ dec2hex: (e) => { const t = Math.round(e).toString(16); return t.length > 1 ? t : `0${t}`; } }, st = { channel: kn, lang: g0, unit: m0 }, Ne = {}; for (let e = 0; e <= 255; e++) Ne[e] = st.unit.dec2hex(e); const Et = { ALL: 0, RGB: 1, HSL: 2 }; class y0 { constructor() { this.type = Et.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 = Et.ALL; } is(t) { return this.type === t; } } class x0 { /* CONSTRUCTOR */ constructor(t, r) { this.color = r, this.changed = !1, this.data = t, this.type = new y0(); } /* API */ set(t, r) { return this.color = r, this.changed = !1, this.data = t, this.type.type = Et.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(Et.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(Et.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(Et.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(Et.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(Et.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(Et.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(Et.RGB), this.changed = !0, this.data.r = t; } set g(t) { this.type.set(Et.RGB), this.changed = !0, this.data.g = t; } set b(t) { this.type.set(Et.RGB), this.changed = !0, this.data.b = t; } set h(t) { this.type.set(Et.HSL), this.changed = !0, this.data.h = t; } set s(t) { this.type.set(Et.HSL), this.changed = !0, this.data.s = t; } set l(t) { this.type.set(Et.HSL), this.changed = !0, this.data.l = t; } set a(t) { this.changed = !0, this.data.a = t; } } const ba = new x0({ r: 0, g: 0, b: 0, a: 0 }, "transparent"), Er = { /* 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(Er.re); if (!t) return; const r = t[1], i = parseInt(r, 16), n = r.length, a = n % 4 === 0, s = n > 4, o = s ? 1 : 17, l = s ? 8 : 4, c = a ? 0 : -1, h = s ? 255 : 15; return ba.set({ r: (i >> l * (c + 3) & h) * o, g: (i >> l * (c + 2) & h) * o, b: (i >> l * (c + 1) & h) * o, a: a ? (i & h) * o / 255 : 1 }, e); }, stringify: (e) => { const { r: t, g: r, b: i, a: n } = e; return n < 1 ? `#${Ne[Math.round(t)]}${Ne[Math.round(r)]}${Ne[Math.round(i)]}${Ne[Math.round(n * 255)]}` : `#${Ne[Math.round(t)]}${Ne[Math.round(r)]}${Ne[Math.round(i)]}`; } }, ir = { /* 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(ir.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(ir.re); if (!r) return; const [, i, n, a, s, o] = r; return ba.set({ h: ir._hue2deg(i), s: st.channel.clamp.s(parseFloat(n)), l: st.channel.clamp.l(parseFloat(a)), a: s ? st.channel.clamp.a(o ? parseFloat(s) / 100 : parseFloat(s)) : 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)}%)`; } }, Bi = { /* 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 = Bi.colors[e]; if (t) return Er.parse(t); }, stringify: (e) => { const t = Er.stringify(e); for (const r in Bi.colors) if (Bi.colors[r] === t) return r; } }, xi = { /* 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(xi.re); if (!r) return; const [, i, n, a, s, o, l, c, h] = r; return ba.set({ r: st.channel.clamp.r(n ? parseFloat(i) * 2.55 : parseFloat(i)), g: st.channel.clamp.g(s ? parseFloat(a) * 2.55 : parseFloat(a)), b: st.channel.clamp.b(l ? parseFloat(o) * 2.55 : parseFloat(o)), 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)})`; } }, _e = { /* VARIABLES */ format: { keyword: Bi, hex: Er, rgb: xi, rgba: xi, hsl: ir, hsla: ir }, /* API */ parse: (e) => { if (typeof e != "string") return e; const t = Er.parse(e) || xi.parse(e) || ir.parse(e) || Bi.parse(e); if (t) return t; throw new Error(`Unsupported color format: "${e}"`); }, stringify: (e) => !e.changed && e.color ? e.color : e.type.is(Et.HSL) || e.data.r === void 0 ? ir.stringify(e) : e.a < 1 || !Number.isInteger(e.r) || !Number.isInteger(e.g) || !Number.isInteger(e.b) ? xi.stringify(e) : Er.stringify(e) }, Ah = (e, t) => { const r = _e.parse(e); for (const i in t) r[i] = st.channel.clamp[i](t[i]); return _e.stringify(r); }, Ai = (e, t, r = 0, i = 1) => { if (typeof e != "number") return Ah(e, { a: t }); const n = ba.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 _e.stringify(n); }, b0 = (e) => { const { r: t, g: r, b: i } = _e.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); }, C0 = (e) => b0(e) >= 0.5, Ui = (e) => !C0(e), Lh = (e, t, r) => { const i = _e.parse(e), n = i[t], a = st.channel.clamp[t](n + r); return n !== a && (i[t] = a), _e.stringify(i); }, H = (e, t) => Lh(e, "l", t), et = (e, t) => Lh(e, "l", -t), v = (e, t) => { const r = _e.parse(e), i = {}; for (const n in t) t[n] && (i[n] = r[n] + t[n]); return Ah(e, i); }, _0 = (e, t, r = 50) => { const { r: i, g: n, b: a, a: s } = _e.parse(e), { r: o, g: l, b: c, a: h } = _e.parse(t), u = r / 100, f = u * 2 - 1, d = s - h, m = ((f * d === -1 ? f : (f + d) / (1 + f * d)) + 1) / 2, y = 1 - m, x = i * m + o * y, b = n * m + l * y, C = a * m + c * y, k = s * u + h * (1 - u); return Ai(x, b, C, k); }, z = (e, t = 100) => { const r = _e.parse(e); return r.r = 255 - r.r, r.g = 255 - r.g, r.b = 255 - r.b, _0(r, e, t); }; const { entries: Mh, setPrototypeOf: Gl, isFrozen: w0, getPrototypeOf: k0, getOwnPropertyDescriptor: v0 } = Object; let { freeze: Ht, seal: Jt, create: Ss } = Object, { apply: Ts, construct: Bs } = typeof Reflect < "u" && Reflect; Ht || (Ht = function(t) { return t; }); Jt || (Jt = function(t) { return t; }); Ts || (Ts = function(t, r) { for (var i = arguments.length, n = new Array(i > 2 ? i - 2 : 0), a = 2; a < i; a++) n[a - 2] = arguments[a]; return t.apply(r, n); }); Bs || (Bs = function(t) { for (var r = arguments.length, i = new Array(r > 1 ? r - 1 : 0), n = 1; n < r; n++) i[n - 1] = arguments[n]; return new t(...i); }); const hn = jt(Array.prototype.forEach), S0 = jt(Array.prototype.lastIndexOf), Xl = jt(Array.prototype.pop), si = jt(Array.prototype.push), T0 = jt(Array.prototype.splice), vn = jt(String.prototype.toLowerCase), is = jt(String.prototype.toString), ns = jt(String.prototype.match), oi = jt(String.prototype.replace), B0 = jt(String.prototype.indexOf), A0 = jt(String.prototype.trim), ae = jt(Object.prototype.hasOwnProperty), Nt = jt(RegExp.prototype.test), li = L0(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 Ts(e, t, i); }; } function L0(e) { return function() { for (var t = arguments.length, r = new Array(t), i = 0; i < t; i++) r[i] = arguments[i]; return Bs(e, r); }; } function ot(e, t) { let r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : vn; Gl && Gl(e, null); let i = t.length; for (; i--; ) { let n = t[i]; if (typeof n == "string") { const a = r(n); a !== n && (w0(t) || (t[i] = a), n = a); } e[n] = !0; } return e; } function M0(e) { for (let t = 0; t < e.length; t++) ae(e, t) || (e[t] = null); return e; } function me(e) { const t = Ss(null); for (const [r, i] of Mh(e)) ae(e, r) && (Array.isArray(i) ? t[r] = M0(i) : i && typeof i == "object" && i.constructor === Object ? t[r] = me(i) : t[r] = i); return t; } function ci(e, t) { for (; e !== null; ) { const i = v0(e, t); if (i) { if (i.get) return jt(i.get); if (typeof i.value == "function") return jt(i.value); } e = k0(e); } function r() { return null; } return r; } const Vl = Ht(["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", "search", "section", "select", "shadow", "slot", "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"]), as = Ht(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "enterkeyhint", "exportparts", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "inputmode", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "part", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), ss = Ht(["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"]), $0 = Ht(["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"]), os = Ht(["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"]), E0 = Ht(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), Zl = Ht(["#text"]), Kl = Ht(["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", "exportparts", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inert", "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", "part", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "slot", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns", "slot"]), ls = Ht(["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", "mask-type", "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"]), Ql = Ht(["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"]), un = Ht(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), F0 = Jt(/\{\{[\w\W]*|[\w\W]*\}\}/gm), D0 = Jt(/<%[\w\W]*|[\w\W]*%>/gm), O0 = Jt(/\$\{[\w\W]*/gm), R0 = Jt(/^data-[\-\w.\u00B7-\uFFFF]+$/), I0 = Jt(/^aria-[\-\w]+$/), $h = Jt( /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i // eslint-disable-line no-useless-escape ), P0 = Jt(/^(?:\w+script|data):/i), N0 = Jt( /[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g // eslint-disable-line no-control-regex ), Eh = Jt(/^html$/i), z0 = Jt(/^[a-z][.\w]*(-[.\w]+)+$/i); var Jl = /* @__PURE__ */ Object.freeze({ __proto__: null, ARIA_ATTR: I0, ATTR_WHITESPACE: N0, CUSTOM_ELEMENT: z0, DATA_ATTR: R0, DOCTYPE_NAME: Eh, ERB_EXPR: D0, IS_ALLOWED_URI: $h, IS_SCRIPT_OR_DATA: P0, MUSTACHE_EXPR: F0, TMPLIT_EXPR: O0 }); const hi = { element: 1, text: 3, // Deprecated progressingInstruction: 7, comment: 8, document: 9 }, W0 = function() { return typeof window > "u" ? null : window; }, q0 = 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(s) { return s; }, createScriptURL(s) { return s; } }); } catch { return console.warn("TrustedTypes policy " + a + " could not be created."), null; } }, tc = function() { return { afterSanitizeAttributes: [], afterSanitizeElements: [], afterSanitizeShadowDOM: [], beforeSanitizeAttributes: [], beforeSanitizeElements: [], beforeSanitizeShadowDOM: [], uponSanitizeAttribute: [], uponSanitizeElement: [], uponSanitizeShadowNode: [] }; }; function Fh() { let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : W0(); const t = (tt) => Fh(tt); if (t.version = "3.3.1", t.removed = [], !e || !e.document || e.document.nodeType !== hi.document || !e.Element) return t.isSupported = !1, t; let { document: r } = e; const i = r, n = i.currentScript, { DocumentFragment: a, HTMLTemplateElement: s, Node: o, Element: l, NodeFilter: c, NamedNodeMap: h = e.NamedNodeMap || e.MozNamedAttrMap, HTMLFormElement: u, DOMParser: f, trustedTypes: d } = e, g = l.prototype, m = ci(g, "cloneNode"), y = ci(g, "remove"), x = ci(g, "nextSibling"), b = ci(g, "childNodes"), C = ci(g, "parentNode"); if (typeof s == "function") { const tt = r.createElement("template"); tt.content && tt.content.ownerDocument && (r = tt.content.ownerDocument); } let k, w = ""; const { implementation: A, createNodeIterator: S, createDocumentFragment: D, getElementsByTagName: I } = r, { importNode: O } = i; let $ = tc(); t.isSupported = typeof Mh == "function" && typeof C == "function" && A && A.createHTMLDocument !== void 0; const { MUSTACHE_EXPR: N, ERB_EXPR: R, TMPLIT_EXPR: B, DATA_ATTR: L, ARIA_ATTR: T, IS_SCRIPT_OR_DATA: E, ATTR_WHITESPACE: M, CUSTOM_ELEMENT: q } = Jl; let { IS_ALLOWED_URI: X } = Jl, K = null; const J = ot({}, [...Vl, ...as, ...ss, ...os, ...Zl]); let Z = null; const ct = ot({}, [...Kl, ...ls, ...Ql, ...un]); let at = Object.seal(Ss(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 } })), bt = null, Ct = null; const Pt = Object.seal(Ss(null, { tagCheck: { writable: !0, configurable: !1, enumerable: !0, value: null }, attributeCheck: { writable: !0, configurable: !1, enumerable: !0, value: null } })); let re = !0, yt = !0, ie = !1, Pe = !0, ne = !1, rn = !0, Ke = !1, Ua = !1, Ga = !1, wr = !1, nn = !1, an = !1, Al = !0, Ll = !1; const Um = "user-content-"; let Xa = !0, ni = !1, kr = {}, de = null; const Va = ot({}, ["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 Ml = null; const $l = ot({}, ["audio", "video", "img", "source", "image", "track"]); let Za = null; const El = ot({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), sn = "http://www.w3.org/1998/Math/MathML", on = "http://www.w3.org/2000/svg", Se = "http://www.w3.org/1999/xhtml"; let vr = Se, Ka = !1, Qa = null; const Gm = ot({}, [sn, on, Se], is); let ln = ot({}, ["mi", "mo", "mn", "ms", "mtext"]), cn = ot({}, ["annotation-xml"]); const Xm = ot({}, ["title", "style", "font", "a", "script"]); let ai = null; const Vm = ["application/xhtml+xml", "text/html"], Zm = "text/html"; let kt = null, Sr = null; const Km = r.createElement("form"), Fl = function(_) { return _ instanceof RegExp || _ instanceof Function; }, Ja = function() { let _ = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; if (!(Sr && Sr === _)) { if ((!_ || typeof _ != "object") && (_ = {}), _ = me(_), ai = // eslint-disable-next-line unicorn/prefer-includes Vm.indexOf(_.PARSER_MEDIA_TYPE) === -1 ? Zm : _.PARSER_MEDIA_TYPE, kt = ai === "application/xhtml+xml" ? is : vn, K = ae(_, "ALLOWED_TAGS") ? ot({}, _.ALLOWED_TAGS, kt) : J, Z = ae(_, "ALLOWED_ATTR") ? ot({}, _.ALLOWED_ATTR, kt) : ct, Qa = ae(_, "ALLOWED_NAMESPACES") ? ot({}, _.ALLOWED_NAMESPACES, is) : Gm, Za = ae(_, "ADD_URI_SAFE_ATTR") ? ot(me(El), _.ADD_URI_SAFE_ATTR, kt) : El, Ml = ae(_, "ADD_DATA_URI_TAGS") ? ot(me($l), _.ADD_DATA_URI_TAGS, kt) : $l, de = ae(_, "FORBID_CONTENTS") ? ot({}, _.FORBID_CONTENTS, kt) : Va, bt = ae(_, "FORBID_TAGS") ? ot({}, _.FORBID_TAGS, kt) : me({}), Ct = ae(_, "FORBID_ATTR") ? ot({}, _.FORBID_ATTR, kt) : me({}), kr = ae(_, "USE_PROFILES") ? _.USE_PROFILES : !1, re = _.ALLOW_ARIA_ATTR !== !1, yt = _.ALLOW_DATA_ATTR !== !1, ie = _.ALLOW_UNKNOWN_PROTOCOLS || !1, Pe = _.ALLOW_SELF_CLOSE_IN_ATTR !== !1, ne = _.SAFE_FOR_TEMPLATES || !1, rn = _.SAFE_FOR_XML !== !1, Ke = _.WHOLE_DOCUMENT || !1, wr = _.RETURN_DOM || !1, nn = _.RETURN_DOM_FRAGMENT || !1, an = _.RETURN_TRUSTED_TYPE || !1, Ga = _.FORCE_BODY || !1, Al = _.SANITIZE_DOM !== !1, Ll = _.SANITIZE_NAMED_PROPS || !1, Xa = _.KEEP_CONTENT !== !1, ni = _.IN_PLACE || !1, X = _.ALLOWED_URI_REGEXP || $h, vr = _.NAMESPACE || Se, ln = _.MATHML_TEXT_INTEGRATION_POINTS || ln, cn = _.HTML_INTEGRATION_POINTS || cn, at = _.CUSTOM_ELEMENT_HANDLING || {}, _.CUSTOM_ELEMENT_HANDLING && Fl(_.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (at.tagNameCheck = _.CUSTOM_ELEMENT_HANDLING.tagNameCheck), _.CUSTOM_ELEMENT_HANDLING && Fl(_.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (at.attribut